# HG changeset patch # User Maciej Seroka # Date 1259324532 0 # Node ID 0c32c669a39d707b15d8aabcf98c0f2c0688aee3 # Parent 893b85cda81b257d866d50493a053697510e6cde Added new smoke test for phone languages diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/Group/bld.inf --- a/common/tools/ats/smoketest/Group/bld.inf Wed Nov 25 14:14:19 2009 +0000 +++ b/common/tools/ats/smoketest/Group/bld.inf Fri Nov 27 12:22:12 2009 +0000 @@ -30,3 +30,5 @@ #include "../uiresources/group/bld.inf" #include "../inputmethods/group/Bld.inf" #include "../IM/group/bld.inf" +#include "../localisation/uiftestfw/group/BLD.INF" +#include "../localisation/apparchitecture/group/BLD.INF" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/Group/smoketest.pl --- a/common/tools/ats/smoketest/Group/smoketest.pl Wed Nov 25 14:14:19 2009 +0000 +++ b/common/tools/ats/smoketest/Group/smoketest.pl Fri Nov 27 12:22:12 2009 +0000 @@ -13,6 +13,9 @@ mkpath "temp/smoketest/emailsettings/general"; mkpath "temp/smoketest/wallpaper/general"; mkpath "temp/smoketest/appinstall/general"; +mkpath "temp/smoketest/10003a3f/general"; +mkpath "temp/smoketest/resource/general"; +mkpath "temp/smoketest/localisation/general"; my $epoc=$ENV{'EPOCROOT'} . "epoc32/"; copy("smoketest.xml", "temp/test.xml"); @@ -34,10 +37,50 @@ copy($epoc . "data/z/smoketest/smoketest_email.script", "temp/smoketest/general/smoketest_email.script"); copy($epoc . "data/z/smoketest/smoketest_lbs.ini", "temp/smoketest/general/smoketest_lbs.ini"); copy($epoc . "data/z/smoketest/smoketest_lbs.script", "temp/smoketest/general/smoketest_lbs.script"); +copy($epoc . "data/z/smoketest/smoketest_language.script", "temp/smoketest/general/smoketest_language.script"); copy($epoc . "data/z/smoketest/sms/message1.txt", "temp/smoketest/sms/general/message1.txt"); copy($epoc . "data/z/smoketest/MachineName.txt", "temp/smoketest/general/MachineName.txt"); copy($epoc . "data/z/smoketest/emailmessage/20KBody.txt", "temp/smoketest/emailmessage/general/20KBody.txt"); copy($epoc . "data/z/smoketest/emailsettings/popsettings_test908.txt", "temp/smoketest/emailsettings/general/popsettings_test908.txt"); +copy($epoc . "data/z/private/10003a3f/apps/openservice1a.rsc", "temp/smoketest/10003a3f/general/openservice1a.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/openservice1b.rsc", "temp/smoketest/10003a3f/general/openservice1b.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/serverapp2_reg.rsc", "temp/smoketest/10003a3f/general/serverapp2_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/serverapp3_reg.rsc", "temp/smoketest/10003a3f/general/serverapp3_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/serverapp4_reg.rsc", "temp/smoketest/10003a3f/general/serverapp4_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/serverapp6_reg.rsc", "temp/smoketest/10003a3f/general/serverapp6_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/serverapp7_reg.rsc", "temp/smoketest/10003a3f/general/serverapp7_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/serverapp_reg.rsc", "temp/smoketest/10003a3f/general/serverapp_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/t_dataprioritysystem3_reg.rsc", "temp/smoketest/10003a3f/general/t_dataprioritysystem3_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/t_groupname_reg.rsc", "temp/smoketest/10003a3f/general/t_groupname_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/t_groupnamever1_reg.rsc","temp/smoketest/10003a3f/general/t_groupnamever1_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/t_groupnamever2_reg.rsc","temp/smoketest/10003a3f/general/t_groupnamever2_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/tctrlpnlapp_reg.rsc", "temp/smoketest/10003a3f/general/tctrlpnlapp_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/testtrustedpriorityapp1_reg.rsc","temp/smoketest/10003a3f/general/testtrustedpriorityapp1_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/apps/testtrustedpriorityapp2_reg.rsc","temp/smoketest/10003a3f/general/testtrustedpriorityapp2_reg.rsc"); +copy($epoc . "data/z/resource/apps/customisedefaulticonapp_loc.rsc","temp/smoketest/resource/general/customisedefaulticonapp_loc.rsc"); +copy($epoc . "data/z/resource/apps/default_app_icon.m02", "temp/smoketest/resource/general/default_app_icon.m02"); +copy($epoc . "data/z/resource/apps/serverapp_loc.rsc", "temp/smoketest/resource/general/serverapp_loc.rsc"); +copy($epoc . "data/z/resource/apps/t_groupname_loc.rsc", "temp/smoketest/resource/general/t_groupname_loc.rsc"); +copy($epoc . "data/z/resource/apps/t_groupnamever1_loc.rsc", "temp/smoketest/resource/general/t_groupnamever1_loc.rsc"); +copy($epoc . "data/z/resource/apps/t_groupnamever2_loc.rsc", "temp/smoketest/resource/general/t_groupnamever2_loc.rsc"); +copy($epoc . "data/z/resource/apps/tstapp02.m02", "temp/smoketest/resource/general/tstapp02.m02"); +copy($epoc . "data/z/resource/apps/tstapp.mbm", "temp/smoketest/resource/general/tstapp.mbm"); +copy($epoc . "data/z/resource/apps/tstapp.rsc", "temp/smoketest/resource/general/tstapp.rsc"); +copy($epoc . "data/z/resource/apps/tstapp_loc.r01", "temp/smoketest/resource/general/tstapp_loc.r01"); +copy($epoc . "data/z/resource/apps/tstapp_loc.r02", "temp/smoketest/resource/general/tstapp_loc.r02"); +copy($epoc . "data/z/resource/apps/tstapp_loc.r03", "temp/smoketest/resource/general/tstapp_loc.r03"); +copy($epoc . "data/z/resource/apps/tstapp_loc.r04", "temp/smoketest/resource/general/tstapp_loc.r04"); +copy($epoc . "data/z/resource/apps/tstapp_loc.r05", "temp/smoketest/resource/general/tstapp_loc.r05"); +copy($epoc . "data/z/resource/apps/tstapp_loc.rsc", "temp/smoketest/resource/general/tstapp_loc.rsc"); +copy($epoc . "data/z/resource/apps/tstappview", "temp/smoketest/resource/general/tstappview"); +copy($epoc . "data/z/resource/apps/tstappview01.m01", "temp/smoketest/resource/general/tstappview01.m01"); +copy($epoc . "data/z/resource/apps/tstappview01.m02", "temp/smoketest/resource/general/tstappview01.m02"); +copy($epoc . "data/z/resource/apps/tstappview02.k", "temp/smoketest/resource/general/tstappview02.k"); +copy($epoc . "data/z/private/10003a3f/import/apps/customisedefaulticonapp_reg.rsc", "temp/smoketest/localisation/general/customisedefaulticonapp_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/import/apps/testuntrustedpriorityapp1_reg.rsc","temp/smoketest/localisation/general/testuntrustedpriorityapp1_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/import/apps/testuntrustedpriorityapp2_reg.rsc","temp/smoketest/localisation/general/testuntrustedpriorityapp2_reg.rsc"); +copy($epoc . "data/z/private/10003a3f/import/apps/tstapp_reg.rsc", "temp/smoketest/localisation/general/tstapp_reg.rsc"); +copy($epoc . "data/z/resource/plugins/tstapp_embedded.rsc", "temp/smoketest/localisation/general/tstapp_embedded.rsc"); copy($epoc . "release/winscw/udeb/SmokeTestSecureFSclient.dll", "temp/smoketest/winscw_udeb/SmokeTestSecureFSclient.dll"); copy($epoc . "release/winscw/udeb/SmokeTestSecureFSserver.exe", "temp/smoketest/winscw_udeb/SmokeTestSecureFSserver.exe"); copy($epoc . "release/winscw/udeb/Smoketest_Agenda_Server.exe", "temp/smoketest/winscw_udeb/Smoketest_Agenda_Server.exe"); @@ -56,6 +99,12 @@ copy($epoc . "release/winscw/udeb/lbstestserver.exe", "temp/smoketest/winscw_udeb/lbstestserver.exe"); copy($epoc . "release/winscw/udeb/ctlbsexeclient.exe", "temp/smoketest/winscw_udeb/ctlbsexeclient.exe"); copy($epoc . "release/winscw/udeb/lbsclienttestserver.exe", "temp/smoketest/winscw_udeb/lbsclienttestserver.exe"); +copy($epoc . "release/winscw/udeb/appfwk_test_AppUi.dll", "temp/smoketest/winscw_udeb/appfwk_test_AppUi.dll"); +copy($epoc . "release/winscw/udeb/appfwk_test_utils.dll", "temp/smoketest/winscw_udeb/appfwk_test_utils.dll"); +copy($epoc . "release/winscw/udeb/TIconLoaderAndIconArrayForLeaks.dll", "temp/smoketest/winscw_udeb/TIconLoaderAndIconArrayForLeaks.dll"); +copy($epoc . "release/winscw/udeb/TSTAPP_embedded.dll", "temp/smoketest/winscw_udeb/TSTAPP_embedded.dll"); +copy($epoc . "release/winscw/udeb/apparctestserver.exe", "temp/smoketest/winscw_udeb/apparctestserver.exe"); +copy($epoc . "release/winscw/udeb/tstapp.exe", "temp/smoketest/winscw_udeb/tstapp.exe"); copy($epoc . "release/winscw/udeb/ProfileSmokeTestModule.dll", "temp/smoketest/winscw_udeb/ProfileSmokeTestModule.dll"); copy($epoc . "winscw/c/smoketest/ProfileSmokeTestModule.cfg", "temp/smoketest/general/ProfileSmokeTestModule.cfg"); diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/Group/smoketest.xml --- a/common/tools/ats/smoketest/Group/smoketest.xml Wed Nov 25 14:14:19 2009 +0000 +++ b/common/tools/ats/smoketest/Group/smoketest.xml Fri Nov 27 12:22:12 2009 +0000 @@ -62,6 +62,69 @@ install + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + @@ -229,6 +292,60 @@ + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + + + + install + + + + + + execute @@ -307,6 +424,17 @@ + + execute + + + + + + + + + @@ -548,10 +676,50 @@ smoketest/general/smoketest_email.script smoketest/general/smoketest_lbs.ini smoketest/general/smoketest_lbs.script + smoketest/general/smoketest_language.script smoketest/sms/general/message1.txt smoketest/general/MachineName.txt smoketest/emailmessage/general/20KBody.txt smoketest/emailsettings/general/popsettings_test908.txt + smoketest/10003a3f/general/openservice1a.rsc" + smoketest/10003a3f/general/openservice1b.rsc" + smoketest/10003a3f/general/serverapp2_reg.rsc" + smoketest/10003a3f/general/serverapp3_reg.rsc" + smoketest/10003a3f/general/serverapp4_reg.rsc" + smoketest/10003a3f/general/serverapp6_reg.rsc" + smoketest/10003a3f/general/serverapp7_reg.rsc" + smoketest/10003a3f/general/serverapp_reg.rsc" + smoketest/10003a3f/general/t_dataprioritysystem3_reg.rsc" + smoketest/10003a3f/general/t_groupname_reg.rsc" + smoketest/10003a3f/general/t_groupnamever1_reg.rsc" + smoketest/10003a3f/general/t_groupnamever2_reg.rsc" + smoketest/10003a3f/general/tctrlpnlapp_reg.rsc" + smoketest/10003a3f/general/testtrustedpriorityapp1_reg.rsc" + smoketest/10003a3f/general/testtrustedpriorityapp2_reg.rsc" + smoketest/resource/general/customisedefaulticonapp_loc.rsc" + smoketest/resource/general/default_app_icon.m02" + smoketest/resource/general/serverapp_loc.rsc" + smoketest/resource/general/t_groupname_loc.rsc" + smoketest/resource/general/t_groupnamever1_loc.rsc" + smoketest/resource/general/t_groupnamever2_loc.rsc" + smoketest/resource/general/tstapp02.m02" + smoketest/resource/general/tstapp.mbm" + smoketest/resource/general/tstapp.rsc" + smoketest/resource/general/tstapp_loc.r01" + smoketest/resource/general/tstapp_loc.r02" + smoketest/resource/general/tstapp_loc.r03" + smoketest/resource/general/tstapp_loc.r04" + smoketest/resource/general/tstapp_loc.r05" + smoketest/resource/general/tstapp_loc.rsc" + smoketest/resource/general/tstappview" + smoketest/resource/general/tstappview01.m01" + smoketest/resource/general/tstappview01.m02" + smoketest/resource/general/tstappview02.k" + smoketest/localisation/general/customisedefaulticonapp_reg.rsc" + smoketest/localisation/general/testuntrustedpriorityapp1_reg.rsc" + smoketest/localisation/general/testuntrustedpriorityapp2_reg.rsc" + smoketest/localisation/general/tstapp_reg.rsc" + smoketest/localisation/general/tstapp_embedded.rsc" smoketest/winscw_udeb/SmokeTestSecureFSclient.dll smoketest/winscw_udeb/SmokeTestSecureFSserver.exe smoketest/winscw_udeb/Smoketest_Agenda_Server.exe @@ -570,6 +738,12 @@ smoketest/winscw_udeb/lbstestserver.exe smoketest/winscw_udeb/ctlbsexeclient.exe smoketest/winscw_udeb/lbsclienttestserver.exe + smoketest/winscw_udeb/appfwk_test_AppUi.dll + smoketest/winscw_udeb/appfwk_test_utils.dll + smoketest/winscw_udeb/TIconLoaderAndIconArrayForLeaks.dll + smoketest/winscw_udeb/TSTAPP_embedded.dll + smoketest/winscw_udeb/apparctestserver.exe + smoketest/winscw_udeb/tstapp.exe smoketest/winscw_udeb/ProfileSmokeTestModule.dll smoketest/general/ProfileSmokeTestModule.cfg smoketest/winscw_udeb/TestNpdApi.dll @@ -587,6 +761,5 @@ smoketest/general/InputMethodSmokeTestModule.cfg smoketest/winscw_udeb/IMApiTest.dll smoketest/general/imapitest.ini - diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFILE.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFILE.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,74 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// APFILE.MMP for component APFILE +// + +/** +@file + +@SYMPurpose apfile.dll Internal server helpers +*/ + + +target apfile.dll +CAPABILITY All -Tcb +targettype DLL +UID 0x1000008D 0x10003A3B +VENDORID 0x70000001 + +SOURCEPATH ../apfile + +userinclude ../inc +systeminclude /epoc32/include + +macro UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +source APFREC.CPP APFSTD.CPP aprfndr.cpp APRuleBased.CPP ApLaunchChecker.cpp ApSidChecker.cpp apuninstallmonitor.cpp +source apfmimecontentpolicy.cpp + +library euser.lib efsrv.lib apparc.lib apgrfx.lib bafl.lib apserv.lib ecom.lib +library apmime.lib caf.lib + +#if !defined(WINC) +macro USING_ECOM_RECOGS +#endif + +#if defined(SYMBIAN_APPARC_APPINFO_CACHE) +deffile APFILE_UI_FRAMEWORKS.DEF +#else +deffile APFILE_9_REMOVE_UI_FRAMEWORKS_V1.DEF +#endif + + +START RESOURCE ../apfile/apfmimecontentpolicy.rss +HEADER +TARGETPATH /resource/apps +END + +START WINS + baseaddress 0x43000000 +END + +START MARM +END + +// For the benefit of Eshell which cannot build a resource registration file +START RESOURCE eshell_reg.rss +TARGETPATH /private/10003a3f/apps +END + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFREC.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFREC.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,419 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include +#include +#include +#include "APFSTD.H" // Panics etc. + +#ifdef USING_ECOM_RECOGS +#include +#endif + +// +// class TRecognizer +// + +CApaScanningFileRecognizer::TRecognizer::TRecognizer(HBufC* aName) + : iName(aName) + { + } + +/////////////////////////////// +// CApaRecognizerDll +/////////////////////////////// + +class CApaRecognizerDll : public CBase + { +public: + CApaRecognizerDll(HBufC* aName); + ~CApaRecognizerDll(); // closes lib and deletes next + + enum TPresence { ENotPresent, EIsPresent, ESuperseded }; + inline TPresence Present() const { return iPresent; } + inline void Present(TPresence aPresence) { iPresent = aPresence; } + + inline CApaFileRecognizerType* Recognizer() { return iRec; } + inline void SetRecognizer(CApaFileRecognizerType& aRec) { iRec = &aRec; } +public: + //lint --e{1925} Suppress "public data member" - bad OO but handy + CApaRecognizerDll* iNext; + CApaScanningFileRecognizer::TRecognizer iId; // cached so that this data can be accessed from other threads (RLibrary cant be used in this case) +private: + RLibrary iLibrary; + TPresence iPresent; + CApaFileRecognizerType* iRec; // not ownership + }; + + +CApaRecognizerDll::~CApaRecognizerDll() + { + delete iId.iName; + iLibrary.Close(); + delete iNext; + iRec = NULL; + } + +CApaRecognizerDll::CApaRecognizerDll(HBufC* aName) + : iId(aName) + { + } + +#ifdef USING_ECOM_RECOGS +// CleanupEComArray function is used for cleanup support +// of locally declared arrays. +void CleanUpEComInfoArray(TAny* aInfoArray) + { + RImplInfoPtrArray* infoArray = (static_cast(aInfoArray)); + infoArray->ResetAndDestroy(); + infoArray->Close(); + } +#endif + +// class CApaBackupOperationObserver +CApaScanningFileRecognizer::CApaBackupOperationObserver::CApaBackupOperationObserver(CApaScanningFileRecognizer& aRecognizer) + : iRecognizer(aRecognizer) + { + TRAP_IGNORE(iSession = CBaBackupSessionWrapper::NewL()); + } + +CApaScanningFileRecognizer::CApaBackupOperationObserver::~CApaBackupOperationObserver() + { + if (iSession) + { + iSession->DeRegisterBackupOperationObserver(*this); + delete iSession; + } + } + +void CApaScanningFileRecognizer::CApaBackupOperationObserver::RegisterObserverL() + { + if (iSession) + { + iSession->RegisterBackupOperationObserverL(*this); + } + } + +void CApaScanningFileRecognizer::CApaBackupOperationObserver::HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes) + { + if ((aBackupOperationAttributes.iFileFlag == MBackupObserver::EReleaseLockReadOnly || + aBackupOperationAttributes.iFileFlag == MBackupObserver::EReleaseLockNoAccess) + && aBackupOperationAttributes.iOperation == EStart) + { + // release recognizers not in rom + CApaRecognizerDll* rec=iRecognizer.iRecognizerLib; + while (rec) + { + CApaRecognizerDll* next=rec->iNext; + TDriveUnit drive(rec->iId.iDrive); + const TChar driveName=drive.Name()[0]; + if(driveName != TChar('Z')) + { + iRecognizer.RemoveRecognizer(*rec);// ignore errors + } + rec = next; + } + } + + if (aBackupOperationAttributes.iFileFlag == MBackupObserver::ETakeLock && + (aBackupOperationAttributes.iOperation == EEnd || + aBackupOperationAttributes.iOperation == EAbort)) + { + iRecognizer.ScanForRecognizersL(); + } + } + +TInt CApaScanningFileRecognizer::CApaBackupOperationObserver::UpdateCounter() const + { + return iUpdateCounter; + } + +void CApaScanningFileRecognizer::CApaBackupOperationObserver::SetUpdateCounter(TInt aValue) + { + iUpdateCounter = aValue; + } + + +/////////////////////////////// +// CApaScanningFileRecognizer +/////////////////////////////// + + +EXPORT_C CApaScanningFileRecognizer* CApaScanningFileRecognizer::NewL(RFs& aFs,MApaAppStarter* aAppStarter) + { + CApaScanningFileRecognizer* self=new(ELeave) CApaScanningFileRecognizer(aFs,aAppStarter); + CleanupStack::PushL(self); + self->ConstructL(); + self->ScanForRecognizersL(); + CleanupStack::Pop(); // self + return self; + } + + +EXPORT_C CApaScanningFileRecognizer::CApaScanningFileRecognizer(RFs& aFs,MApaAppStarter* aAppStarter) + : CApaFileRecognizer(aFs), iAppStarter(aAppStarter) + {} + + +EXPORT_C void CApaScanningFileRecognizer::ConstructL() + { + iObserver = new (ELeave) CApaBackupOperationObserver(*this); + iObserver->RegisterObserverL(); + } + + +EXPORT_C CApaScanningFileRecognizer::~CApaScanningFileRecognizer() + { + DestroyRecognizerList(); + delete iRecognizerLib; + delete iObserver; + iAppStarter = NULL; + } + +EXPORT_C void CApaScanningFileRecognizer::ScanForRecognizersL() + { + // set all recognizers to not present - pending rediscoivery + CApaRecognizerDll* rec=iRecognizerLib; + while (rec) + { + rec->Present(CApaRecognizerDll::ENotPresent); + rec = rec->iNext; + } + + ScanForEcomRecognizersL(); + // + // remove any recognizers that are no longer present + rec=iRecognizerLib; + while (rec) + { + CApaRecognizerDll* next=rec->iNext; + if (rec->Present()==CApaRecognizerDll::ENotPresent) + RemoveRecognizer(*rec); + rec = next; + } + } + + +TInt CApaScanningFileRecognizer::RemoveRecognizer(CApaRecognizerDll& aDll) + { + // try to remove the recognizer from the list + TInt ret=RemoveFileRecognizerType(aDll.Recognizer()); + if (ret!=KErrNone && ret!=KErrNotFound) + return ret; + // + // get a handle to the previous entry in the list + CApaRecognizerDll* prev=NULL; + CApaRecognizerDll* dll=iRecognizerLib; + while (dll && (dll != &aDll)) + { + prev = dll; + dll = dll->iNext; + } + + if (!dll) + { + Panic(EPanicLibraryNotInList); + } + else + { + // remove the dll + if (prev) + prev->iNext = dll->iNext; + else + iRecognizerLib = dll->iNext; + dll->iNext = NULL; + delete dll; + iObserver->SetUpdateCounter( iObserver->UpdateCounter()+ 1 ); + } + return KErrNone; + } + +EXPORT_C TInt CApaScanningFileRecognizer::RecognizerCount() + { + CApaRecognizerDll* lib=iRecognizerLib; + TInt count=0; + while (lib) + { + count++; + lib = lib->iNext; + } + return count; + } + + +EXPORT_C CApaScanningFileRecognizer::CRecognizerArray* CApaScanningFileRecognizer::RecognizerListLC()const + { + CRecognizerArray* list=new(ELeave) CArrayFixFlat(1); + CleanupStack::PushL(list); + CApaRecognizerDll* dll=iRecognizerLib; + while (dll) + { + list->AppendL(dll->iId); + dll = dll->iNext; + } + return list; + } + +EXPORT_C const CApaScanningFileRecognizer::TRecognizer& CApaScanningFileRecognizer::operator[](TInt aIndex)const + { + __ASSERT_ALWAYS(aIndex>=0,Panic(EPanicNegativeIndex)); + // scan to correct dll + TInt num=0; + CApaRecognizerDll* dll=iRecognizerLib; + while (dll && num++iNext; + __ASSERT_ALWAYS(dll,Panic(EPanicIndexOutOfRange)); + // + // get info from dll + return dll->iId; //lint !e613 Suppress possible use of null pointer - asserted above + } + +EXPORT_C TInt CApaScanningFileRecognizer::UpdateCounter()const + { + return iObserver->UpdateCounter(); + } + +EXPORT_C void CApaScanningFileRecognizer::SetEcomRecognizersFromListL(const CRecognizerArray& aList) + { + //for ecom style + for (TInt i=0 ; iImplementationUid(); + if(uid.iUid == aImplUID.iUid ) + { + HBufC* recogName = info->DisplayName().AllocL(); + CleanupStack::PopAndDestroy(&implementationInfoArray); + return recogName; + } + } + CleanupStack::PopAndDestroy(&implementationInfoArray); + return KNullDesC().AllocL(); + } + +//load the ecom file recognizer +void CApaScanningFileRecognizer::LoadEcomRecognizerL(TDriveUnit& aDrive,TUid aUid) + { + // check we haven't loaded this one already + CApaRecognizerDll* lib=iRecognizerLib; + CApaRecognizerDll* last=NULL; // the previous one in the list + while (lib) + { + if (lib->iId.iUid==aUid) + {// we may have to override one + if (lib->Present()!=CApaRecognizerDll::ENotPresent) + { + return; // already found + } + else + { + lib->Present(CApaRecognizerDll::EIsPresent); + return; + } + } + last = lib; + lib = lib->iNext; + } + // load the library + HBufC* recogName=RecognizerNameL(aUid); + CleanupStack::PushL(recogName); + lib = new(ELeave) CApaRecognizerDll(recogName); + CleanupStack::Pop(recogName); + CleanupStack::PushL(lib); + TRAPD(error,lib->SetRecognizer(*CApaFileRecognizerType::CreateFileRecognizerL(aUid))); + if(!error && lib->Recognizer()) + { + lib->Present(CApaRecognizerDll::EIsPresent); + SetAppStarter(lib->Recognizer(),iAppStarter); + AddFileRecognizerType(lib->Recognizer()); + lib->iId.iUid = aUid; + lib->iId.iDrive = aDrive; + iObserver->SetUpdateCounter( iObserver->UpdateCounter() + 1 ); + // + // add lib to the library list + if (last) + { + while (last->iNext) + { + last=last->iNext; + } + __ASSERT_ALWAYS(last->iNext==NULL,Panic(EPanicIndexOutOfRange)); + last->iNext = lib; + } + else + { + iRecognizerLib = lib; + } + CleanupStack::Pop(lib); // lib + } + else + { + CleanupStack::PopAndDestroy(lib); // lib + } + } +#else +void CApaScanningFileRecognizer::LoadEcomRecognizerL(TDriveUnit&,TUid) + { + } //lint !e1762 Suppress member function could be made const + +#endif + +void CApaScanningFileRecognizer::ScanForEcomRecognizersL() + { +#ifdef USING_ECOM_RECOGS + //scan ecom plugin + RImplInfoPtrArray implementationArray; + TCleanupItem cleanup(CleanUpEComInfoArray, &implementationArray); + CleanupStack::PushL(cleanup); + REComSession::ListImplementationsL(KUidFileRecogInterfaceUid,implementationArray); + const TInt availCount = implementationArray.Count(); + for (TInt count=0;countImplementationUid(); + TDriveUnit drive=info-> Drive(); + TRAP_IGNORE(LoadEcomRecognizerL(drive,uid)); + } + CleanupStack::PopAndDestroy(&implementationArray); +#endif + } //lint !e1762 Suppress member function could be made const diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFSTD.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFSTD.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APFSTD.H" + + +GLDEF_C void Panic(TApfPanic aPanic) +// +// Panic the process with APPARC as the category. +// + { + _LIT(KAppFilePanic,"APFILE"); + User::Panic(KAppFilePanic,aPanic); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFSTD.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/APFSTD.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__APFSTD_H__) +#define __APFSTD_H__ + +#if !defined(__E32STD_H__) +#include +#endif + +enum TApfPanic + { + EPanicFindAllAppsNotCalled, + EPanicLibraryNotInList, + EPanicInvalidFilename, + EPanicIndexOutOfRange, + EPanicNegativeIndex, + // + EDPanicBadDirName, + EDPanicDriveOutOfRange, + EDPanicStartDriveOutOfRange + }; + + +GLREF_C void Panic(TApfPanic aPanic); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/APRuleBased.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/APRuleBased.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,157 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// @file +// +// + +#include +#include +#include "APFSTD.H" // Panics etc. + +void CleanUpEComInfoArray(TAny* aInfoArray); + +/////////////////////////////// +// CApaRuleBasedDll +/////////////////////////////// +/** The rule-based framework. Mantain all rule-based plug-ins available in the system */ +class CApaRuleBasedDll : public CBase + { +public: + CApaRuleBasedDll(); + ~CApaRuleBasedDll(); // closes lib and deletes next +public: + enum TPresence { ENotPresent, EIsPresent }; + inline TPresence Present() const { return iPresent; } + inline void Present(TPresence aPresence) { iPresent = aPresence; } + inline TUid Uid() const { return iUid; } + inline void Uid(TUid aUid) { iUid = aUid; } + inline CAppLaunchChecker* LaunchChecker() { return iLaunchChecker; } + inline void LaunchChecker(CAppLaunchChecker* aLaunchChecker) { iLaunchChecker = aLaunchChecker; } +private: + TPresence iPresent; + TUid iUid; + CAppLaunchChecker* iLaunchChecker; // pointer to plug-in implementation + }; + +CApaRuleBasedDll::CApaRuleBasedDll() + { + } + +CApaRuleBasedDll::~CApaRuleBasedDll() + { + delete iLaunchChecker; + } + +/** The function provides access to launch checker interface by index */ +EXPORT_C CAppLaunchChecker* CApaScanningRuleBasedPlugIns::operator[](TInt aIndex) const + { + return iRuleBasedLib[aIndex]->LaunchChecker(); + } + +EXPORT_C CApaScanningRuleBasedPlugIns* CApaScanningRuleBasedPlugIns::NewL() + { + CApaScanningRuleBasedPlugIns* self = new(ELeave) CApaScanningRuleBasedPlugIns(); + CleanupStack::PushL(self); + self -> ScanForRuleBasedPlugInsL(); + CleanupStack::Pop(self); + return self; + } + +EXPORT_C CApaScanningRuleBasedPlugIns::~CApaScanningRuleBasedPlugIns() + { + iRuleBasedLib.ResetAndDestroy(); + } + +/** The function loads the ecom rule-based plug-ins */ +void CApaScanningRuleBasedPlugIns::LoadEcomRuleBasedPlugInL(TUid aUid) + { + // check we haven't loaded this one already + for(TInt index = 0; index < iRuleBasedLib.Count(); index++) + { + CApaRuleBasedDll* lib = iRuleBasedLib[index]; + if (lib->Uid() == aUid) + {// already found + lib -> Present(CApaRuleBasedDll::EIsPresent); + return; + } + } + + // load the library + CApaRuleBasedDll* lib = new(ELeave) CApaRuleBasedDll(); + CleanupStack::PushL(lib); + TRAPD(error, lib -> LaunchChecker(CAppLaunchChecker::NewL(aUid))); + if((error == KErrNone) && lib -> LaunchChecker()) + { + lib->Present(CApaRuleBasedDll::EIsPresent); + lib->Uid(aUid); + + // add lib to the library list + iRuleBasedLib.Append(lib); + CleanupStack::Pop(lib); + } + else + { + CleanupStack::PopAndDestroy(lib); + } + } + +/** The function scans and initializes all rule-based plug-ins available in the system */ +EXPORT_C void CApaScanningRuleBasedPlugIns::ScanForRuleBasedPlugInsL() + { + // set all rule based plug-ins to not present - pending rediscoivery + TInt index; + for (index = 0; index < iRuleBasedLib.Count(); index++) + { + CApaRuleBasedDll* rule = iRuleBasedLib[index]; + rule -> Present(CApaRuleBasedDll::ENotPresent); + } + + //scan ecom plugin + RImplInfoPtrArray implementationArray; + TCleanupItem cleanup(CleanUpEComInfoArray, &implementationArray); + CleanupStack::PushL(cleanup); + REComSession::ListImplementationsL(KUidRuleBasedInterfaceUid, implementationArray); + const TInt availCount = implementationArray.Count(); + for (TInt count = 0; count < availCount; ++count) + { + const CImplementationInformation* info = implementationArray[count]; + TUid uid = info -> ImplementationUid(); + LoadEcomRuleBasedPlugInL(uid); + } + CleanupStack::PopAndDestroy(&implementationArray); + + // remove any rule based plug-ins that are no longer present + index = 0; + while (index < iRuleBasedLib.Count()) + { + CApaRuleBasedDll* rule = iRuleBasedLib[index]; + if (rule -> Present() == CApaRuleBasedDll::ENotPresent) + { + iRuleBasedLib.Remove(index); + delete rule; + } + else + { + index++; + } + } + } + +/** The function returns number of plug-ins available in the system*/ +EXPORT_C TInt CApaScanningRuleBasedPlugIns::ImplementationCount() const + { + return iRuleBasedLib.Count(); + } + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/ApLaunchChecker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/ApLaunchChecker.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +CAppLaunchChecker* CAppLaunchChecker::NewL(const TUid aUid) +/** Create an interface implementation to satisfy the specified interface. +@param aUid Com interface implementation UID. +@return The new application launch checker object. */ + { + TAny* ptr = REComSession::CreateImplementationL(aUid, + _FOFF(CAppLaunchChecker, iDtor_ID_Key)); + return reinterpret_cast (ptr); + } + +/** The destruction of interface implementation. */ +EXPORT_C CAppLaunchChecker::~CAppLaunchChecker() + { + REComSession::DestroyedImplementation(iDtor_ID_Key); + } + +EXPORT_C void CAppLaunchChecker::Reserved_1() + { + + } + +EXPORT_C void CAppLaunchChecker::Reserved_2() + { + + } + +EXPORT_C void CAppLaunchChecker::Reserved_3() + { + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/ApSidChecker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/ApSidChecker.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,103 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include + +//const TUid KAppSidCheckerInterfaceUid = {0x10281FBB}; //old interface used when checking based only on SID +const TUid KAppSidCheckerInterfaceUid = {0x20007D8C}; // current interface used when checking based on SID and drive number + + +CAppSidChecker* CAppSidChecker::CheckerForAppType(const TUid &aAppTypeUid) + { + TEComResolverParams resolverParams; + TBuf8 sidName; + sidName.Copy(aAppTypeUid.Name()); + resolverParams.SetDataType(sidName); + TAny* ptr = NULL; + TRAP_IGNORE( ptr = REComSession::CreateImplementationL( + KAppSidCheckerInterfaceUid, + _FOFF(CAppSidChecker, iDtor_ID_Key), + NULL, resolverParams) ); + return reinterpret_cast(ptr); + } + +/** The destruction of the interface implementation */ +EXPORT_C CAppSidChecker::~CAppSidChecker() + { + REComSession::DestroyedImplementation(iDtor_ID_Key); + iReserved1 = NULL; + iReserved2 = NULL; + iReserved3 = NULL; + } + +EXPORT_C void CAppSidChecker::SetRescanCallBackL(const TCallBack&) + { + } + +EXPORT_C void CAppSidChecker::reserved1() + { + } + +EXPORT_C void CAppSidChecker::reserved2() + { + } + +EXPORT_C void CAppSidChecker::reserved3() + { + } + +RSidCheckerMap::RSidCheckerMap( TCallBack aRescanCallBack ) : + iRescanCallBack( aRescanCallBack ) + { + } + +CAppSidChecker& RSidCheckerMap::FindSidCheckerL(TUid aAppType) + { + CAppSidChecker* checker = NULL; + CAppSidChecker** checkerPtr = Find(aAppType.iUid); + if(checkerPtr) + { + checker = *checkerPtr; + } + else + { + // No CAppSidChecker instance loaded, try to find one + checker = CAppSidChecker::CheckerForAppType(aAppType); + if(checker) + { + CleanupStack::PushL(checker); + InsertL(aAppType.iUid, checker); + CleanupStack::Pop(checker); + checker->SetRescanCallBackL(iRescanCallBack); + } + else + { + User::Leave(KErrNotFound); + } + } + return *checker; + } + +void RSidCheckerMap::Close() + { + TIter iter(*this); + while(iter.NextValue()) + { + delete *(iter.CurrentValue()); + iter.RemoveCurrent(); + } + RHashMap::Close(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/apfmimecontentpolicy.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/apfmimecontentpolicy.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,526 @@ +// 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 the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +// INCLUDE FILES +#include +#include // RFs +#include +#include +#include +#include +#include +#include // For RApaLsSession + +// Resource file name. +_LIT(KCEResourceFile, "z:\\resource\\apps\\apfmimecontentpolicy.rsc"); + +// This is needed for resource reading. +const TInt KCCMask(0x00000fff); + + +NONSHARABLE_CLASS(CApfMimeContentPolicyImpl) : public CBase + { +public: // Constructors and destructor + static CApfMimeContentPolicyImpl* NewL(); + static CApfMimeContentPolicyImpl* NewL(RFs& aFs); + ~CApfMimeContentPolicyImpl(); + +public: // New functions + TBool IsClosedType(const TDesC& aMimeType) const; + TBool IsClosedExtension(const TDesC& aFileExtension) const; + TBool IsClosedFileL(const TDesC& aFileName) const; + TBool IsDRMEnvelopeL(const TDesC& aFileName) const; + TBool IsClosedFileL(RFile& aFileHandle) const; + TBool IsDRMEnvelopeL(RFile& aFileHandle) const; + +private: + CApfMimeContentPolicyImpl(); + void ConstructL(); + void ConstructL(RFs& aFs); + TBool IsClosedFileL(RFile& aFileHandle, const TDesC& aFileName) const; + void ReadResourcesL(RFs& aFs); + +private: + CDesCArrayFlat* iCcl; // Closed content list. + CDesCArrayFlat* iExtList; // Closed extensions list. + RApaLsSession iLs; // A session to the Application Architecture server. + mutable RFs iFs; // File session + TBool iFsConnected; // ETrue if connected to file server, else EFalse + }; + + +// +// class CApfMimeContentPolicy +// + +/** +C++ default constructor. +*/ +CApfMimeContentPolicy::CApfMimeContentPolicy() + { + // Nothing to do here. + } + +/** +By default Symbian 2nd phase constructor is private. +*/ +void CApfMimeContentPolicy::ConstructL() + { + iImpl = CApfMimeContentPolicyImpl::NewL(); + } + +/** +By default Symbian 2nd phase constructor is private. +@param aFs A handle to a shared file server session. +*/ +void CApfMimeContentPolicy::ConstructL(RFs& aFs) + { + iImpl = CApfMimeContentPolicyImpl::NewL(aFs); + } + +/** +Creates a new Mime Content Policy object, and puts a pointer to it onto the cleanup stack. +@return The new Mime Content Policy object. +*/ +EXPORT_C CApfMimeContentPolicy* CApfMimeContentPolicy::NewLC() + { + CApfMimeContentPolicy* self = new (ELeave) CApfMimeContentPolicy(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +/** +Creates a new Mime Content Policy object, and puts a pointer to it onto the cleanup stack. +@param aFs A handle to a shared file server session. +@return The new Mime Content Policy object. +*/ +EXPORT_C CApfMimeContentPolicy* CApfMimeContentPolicy::NewLC(RFs& aFs) + { + CApfMimeContentPolicy* self = new (ELeave) CApfMimeContentPolicy(); + CleanupStack::PushL(self); + self->ConstructL(aFs); + return self; + } + +/** +Creates a new Mime Content Policy object. +@return The new Mime Content Policy object. +*/ +EXPORT_C CApfMimeContentPolicy* CApfMimeContentPolicy::NewL() + { + CApfMimeContentPolicy* self = NewLC(); + CleanupStack::Pop(); + return self; + } + +/** +Creates a new Mime Content Policy object. +@param aFs A handle to a shared file server session. +@return The new Mime Content Policy object. +*/ +EXPORT_C CApfMimeContentPolicy* CApfMimeContentPolicy::NewL(RFs& aFs) + { + CApfMimeContentPolicy* self = NewLC(aFs); + CleanupStack::Pop(); + return self; + } + + +/** +Destructor. +*/ +EXPORT_C CApfMimeContentPolicy::~CApfMimeContentPolicy() + { + delete iImpl; + } + +/** +Checks if given MIME type is included in closed content list. +@param aMimeType The mime type to be checked. +@return ETrue if given MIME type is in closed content list else returns EFalse. +*/ +EXPORT_C TBool CApfMimeContentPolicy::IsClosedType(const TDesC& aMimeType) + { + return iImpl->IsClosedType(aMimeType); + } + +/** +Checks the extension of given file against list of closed file extensions. +@param aFileExtension File extension to be checked. +@return ETrue if extension of given file name is in closed extensions list else returns EFalse. +*/ +EXPORT_C TBool CApfMimeContentPolicy::IsClosedExtension(const TDesC& aFileExtension) + { + return iImpl->IsClosedExtension(aFileExtension); + } + +/** +Checks if given file is Closed or not. +This method checks for forward lock and superdistribution statuses of the file, in addition to IsClosedExtension +and IsClosedType checks. + +@param aFileName A file to be checked +@return ETrue if given file is closed else returns EFalse. +@leave KErrNone, if successful; otherwise one of the other system-wide error codes +*/ +EXPORT_C TBool CApfMimeContentPolicy::IsClosedFileL(const TDesC& aFileName) + { + return iImpl->IsClosedFileL(aFileName); + } + + +/** +Checks if given file is a DRM envelope. Can leave if file handling fails. +@param aFileName A file to be checked. +@return ETrue if file is DRM envelope else returns EFalse. +@leave KErrCANotSupported if the requested attribute does not exist. +KErrPermissionDenied if the access to the protected content is not permitted +by the CAF Agent. Otherwise one of the other CAF error codes defined in +caferr.h or one of the other system-wide error codes for any other errors. +*/ +EXPORT_C TBool CApfMimeContentPolicy::IsDRMEnvelopeL(const TDesC& aFileName) + { + return iImpl->IsDRMEnvelopeL(aFileName); + } + +/** +Checks if given file is Closed or not. This method checks for forward lock and +superdistribution statuses of the file, in addition to IsClosedExtension and IsClosedType checks. +Remember to make a file handle sharable. When a file handle is shared, the RFs handle has to be shared too. +@param aFileHandle Handle to the file to be checked. +@return ETrue if given file is closed else returns EFalse. +@leave KErrNone, if successful; KErrBadHandle if an invalid handle has been passed as a parameter. +otherwise one of the other system-wide error codes +*/ +EXPORT_C TBool CApfMimeContentPolicy::IsClosedFileL(RFile& aFileHandle) + { + return iImpl->IsClosedFileL(aFileHandle); + } + + +/** +Checks if given file is a DRM envelope. Can leave if file handling fails. +@param aFileHandle Handle to the file to be checked. +@return ETrue if file is DRM envelope else returns EFalse. +@leave KErrCANotSupported if the requested attribute does not exist. +KErrPermissionDenied if the access to the protected content is not permitted +by the CAF Agent. Otherwise one of the other CAF error codes defined in +caferr.h or one of the other system-wide error codes for any other errors. +*/ +EXPORT_C TBool CApfMimeContentPolicy::IsDRMEnvelopeL(RFile& aFileHandle) + { + return iImpl->IsDRMEnvelopeL(aFileHandle); + } + +// +// class CApfMimeContentPolicyImpl +// + +/** +C++ default constructor. +*/ +CApfMimeContentPolicyImpl::CApfMimeContentPolicyImpl() + { + // C++ default constructor can NOT contain any code, that + } + +/** +By default Symbian 2nd phase constructor is private. +*/ +void CApfMimeContentPolicyImpl::ConstructL() + { + // Resource reading is done without coe & eikon env. + User::LeaveIfError(iFs.Connect()); + iFsConnected = ETrue; + + User::LeaveIfError(iFs.ShareProtected()); + ReadResourcesL(iFs); + } + +/** +By default Symbian 2nd phase constructor is private. +@param aFs A handle to a shared file server session. +*/ +void CApfMimeContentPolicyImpl::ConstructL(RFs& aFs) + { + iFsConnected = EFalse; + iFs = aFs; + ReadResourcesL(iFs); + } + +/** +Two-phased constructor. +*/ +CApfMimeContentPolicyImpl* CApfMimeContentPolicyImpl::NewL() + { + CApfMimeContentPolicyImpl* self = new (ELeave) CApfMimeContentPolicyImpl(); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + + return self; + } + +/** +Two-phased constructor. +*/ +CApfMimeContentPolicyImpl* CApfMimeContentPolicyImpl::NewL(RFs& aFs) + { + CApfMimeContentPolicyImpl* self = new (ELeave) CApfMimeContentPolicyImpl(); + CleanupStack::PushL(self); + self->ConstructL(aFs); + CleanupStack::Pop(self); + + return self; + } + +/** +Destructor. +*/ +CApfMimeContentPolicyImpl::~CApfMimeContentPolicyImpl() + { + iLs.Close(); + + if(iFsConnected) + iFs.Close(); + + delete iCcl; + delete iExtList; + } + +/** +Checks if given MIME type is included in closed content list. +@param aMimeType The mime type to be checked. +@return ETrue if given MIME type is in closed content list else returns EFalse. +*/ +TBool CApfMimeContentPolicyImpl::IsClosedType(const TDesC& aMimeType) const + { + TInt dummy = 0; + + // Check if given descriptor is in closed content list. + // Find() returns 0 if found from array, non-zero if not. + const TBool found = (iCcl->FindIsq(aMimeType, dummy) == 0); + return found; + } + +/** +Checks the extension of given file against list of closed file extensions. +@param aFileExtension File extension to be checked. +@return ETrue if extension of given file name is in closed extensions list else returns EFalse. +*/ +TBool CApfMimeContentPolicyImpl::IsClosedExtension(const TDesC& aFileExtension) const + { + TInt dummy = 0; + + // Check if given descriptor is in closed content list. + // Find() returns 0 if found from array, non-zero if not. + const TBool found = (iExtList->FindIsq(aFileExtension, dummy) == 0); + return found; + } + +/** +Checks if given file is Closed or not. This method checks for forward lock and superdistribution statuses +of the file, in addition to IsClosedExtension and IsClosedType checks. +@param aFileName A file to be checked. +@return ETrue if given file is closed else returns EFalse. +@leave KErrNone, if successful; otherwise one of the other system-wide error codes. +*/ +TBool CApfMimeContentPolicyImpl::IsClosedFileL(const TDesC& aFileName) const + { + RFile file; + TInt protectionError; + + // open file to be checked for protection + protectionError = file.Open(iFs, aFileName, EFileRead | EFileShareReadersOnly); + + // If the file is already opened using EFileShareAny (which is against best practices), we have to use it also. + if (protectionError == KErrInUse) + protectionError = file.Open(iFs, aFileName, EFileRead | EFileShareAny); + + User::LeaveIfError(protectionError); + + CleanupClosePushL(file); + const TBool retVal = IsClosedFileL(file, aFileName); + CleanupStack::PopAndDestroy(); // file + return retVal; + } + +/** +Checks if given file is Closed or not. This method checks for forward lock and superdistribution statuses +of the file, in addition to IsClosedExtension and IsClosedType checks. +@param aFileHandle Handle to the file to be checked. +@return ETrue if given file is closed else returns EFalse. +@leave KErrNone, if successful; KErrBadHandle if an invalid handle has been passed as a parameter. +otherwise one of the other system-wide error codes. +*/ +TBool CApfMimeContentPolicyImpl::IsClosedFileL(RFile& aFileHandle) const + { + if (aFileHandle.SubSessionHandle()) + { + TFileName name; + aFileHandle.Name(name); + return IsClosedFileL(aFileHandle, name); + } + + User::Leave(KErrBadHandle); + return EFalse; // to keep compiler happy + } + +/** +Checks if given file is Closed or not. +@param aFileHandle Handle to the file to be checked. +@param aFileName File to be checked. +@return ETrue if given file is closed else returns EFalse. +@leave KErrNone, if successful; KErrBadHandle if an invalid handle has been passed as a parameter. +otherwise one of the other system-wide error codes. +*/ +TBool CApfMimeContentPolicyImpl::IsClosedFileL(RFile& aFileHandle, const TDesC& aFileName) const + { + TInt value = 0; + // allocate a content object + ContentAccess::CContent* content = ContentAccess::CContent::NewL(aFileHandle); + + // Check if file is protected + // If the file type can not be determined just forget it. + if (content->GetAttribute(ContentAccess::EIsProtected, value) == KErrNone) + { + if (value) + { + // File is DRM protected + value = 0; + // Check if file is forwardable + if (content->GetAttribute(ContentAccess::EIsForwardable, value) == KErrNone) + { + delete content; + if (!value) + { + // EIsProtected == ETrue && EIsForwardable == EFalse => EForwardLocked + // If forwardlocked, sending never allowed, so return without further ado. + return ETrue; + } + else + { + // EIsProtected == ETrue && EIsForwardable == ETrue => ESuperDistributable + // No need to check extension or mime type for files that are superdistributable, + // they must not be blocked in any case. + return EFalse; + } + } + } + } + + delete content; + content = NULL; + + // Check file extension. + TParse parser; + parser.Set(aFileName, NULL, NULL); + if (IsClosedExtension(parser.Ext())) + return ETrue; + + // Recognize and check MIME type. + TDataType recData; + TUid uid; + const TInt err(iLs.AppForDocument(aFileHandle, uid, recData)); + User::LeaveIfError(err); + + return IsClosedType(recData.Des()); // Check MIME type. + } + +/** +Checks if given file is a DRM envelope. Can leave if file handling fails. +@param aFileName A file to be checked. +@return ETrue if file is DRM envelope else returns EFalse. +@leave KErrCANotSupported if the requested attribute does not exist. +KErrPermissionDenied if the access to the protected content is not permitted +by the CAF Agent. Otherwise one of the other CAF error codes defined in +caferr.h or one of the other system-wide error codes for any other errors. +*/ +TBool CApfMimeContentPolicyImpl::IsDRMEnvelopeL(const TDesC& aFileName) const + { + // allocate a content object + ContentAccess::CContent* content = ContentAccess::CContent::NewLC(aFileName, ContentAccess::EContentShareReadOnly); + + TInt value = 0; + User::LeaveIfError(content->GetAttribute(ContentAccess::EIsProtected, value)); + CleanupStack::PopAndDestroy(content); + + return (value != 0); // File is DRM protected if value != 0 + } + +/** +Checks if given file is a DRM envelope. Can leave if file handling fails. +@param aFileHandle Handle to the file to be checked. +@return ETrue if file is DRM envelope else returns EFalse. +@leave KErrCANotSupported if the requested attribute does not exist. +KErrPermissionDenied if the access to the protected content is not permitted +by the CAF Agent. Otherwise one of the other CAF error codes defined in +caferr.h or one of the other system-wide error codes for any other errors. +*/ +TBool CApfMimeContentPolicyImpl::IsDRMEnvelopeL(RFile& aFileHandle) const + { + // allocate a content object + ContentAccess::CContent* content = ContentAccess::CContent::NewLC(aFileHandle); + + TInt value = 0; + User::LeaveIfError(content->GetAttribute(ContentAccess::EIsProtected, value)); + CleanupStack::PopAndDestroy(content); + + return (value != 0); // File is DRM protected if value != 0 + } + + +/** +Reads closed content list and closed extensions list. Connects to RApaLsSession. +Called by constructor. +@param aFs A handle to a shared file server session. +*/ +void CApfMimeContentPolicyImpl::ReadResourcesL(RFs& aFs) + { + TResourceReader reader; + + // Resource reading is done without coe & eikon env. + RResourceFile rsFile; + rsFile.OpenL(aFs, KCEResourceFile); + CleanupClosePushL(rsFile); + + // Read closed content list. + // Remove offset from id + HBufC8* rBuffer = rsFile.AllocReadLC(R_COMMONENG_CLOSED_CONTENT_LIST & KCCMask); + reader.SetBuffer(rBuffer); + ASSERT(!iCcl); + iCcl = reader.ReadDesCArrayL(); + CleanupStack::PopAndDestroy(rBuffer); // rBuffer + + // Read closed extensions list. + // Remove offset from id + rBuffer = rsFile.AllocReadLC(R_COMMONENG_CLOSED_EXTENSIONS_LIST & KCCMask); + reader.SetBuffer(rBuffer); + ASSERT(!iExtList); + iExtList = reader.ReadDesCArrayL(); + CleanupStack::PopAndDestroy(2); // rBuffer, rsFile + + // Sort lists to enable binary find + iCcl->Sort(); + iExtList->Sort(); + + // Connect RApaLsSession and leave it open for the whole + // lifetime of the object. + User::LeaveIfError(iLs.Connect()); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/apfmimecontentpolicy.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/apfmimecontentpolicy.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,79 @@ +// 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 the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +NAME CCLS + +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +//---------------------------------------------------- +// r_commoneng_closed_content_list +// Contains all MIME types in closed content list. +//---------------------------------------------------- +// +RESOURCE ARRAY r_commoneng_closed_content_list + { + items= + { + LBUF { txt="application/vnd.oma.drm.message"; }, + LBUF { txt="application/vnd.oma.drm.rights+xml"; }, + LBUF { txt="application/vnd.oma.drm.rights+wbxml"; }, + LBUF { txt="application/vnd.nokia.ringing-tone"; }, + LBUF { txt="audio/amr-wb"; }, + LBUF { txt="audio/sp-midi"; }, + LBUF { txt="image/vnd.nok.3Dscreensaver"; }, + LBUF { txt="image/vnd.nok-wallpaper"; }, + LBUF { txt="image/vnd.nok-oplogo"; }, + LBUF { txt="image/vnd.nok-oplogo-color"; }, + LBUF { txt="application/java"; }, + LBUF { txt="application/java-archive"; }, + LBUF { txt="application/x-java-archive"; }, + LBUF { txt="text/vnd.sun.j2me.app-descriptor"; }, + LBUF { txt="application/x-NokiaGameData"; }, + LBUF { txt="application/vnd.symbian.install"; }, + LBUF { txt="x-epoc/x-sisx-app"; } + }; + } + +//---------------------------------------------------- +// r_commoneng_closed_extensions_list +// List of closed file extensions. +//---------------------------------------------------- +// +RESOURCE ARRAY r_commoneng_closed_extensions_list + { + items= + { + LBUF { txt=".dm"; }, + LBUF { txt=".dr"; }, + LBUF { txt=".drc"; }, + LBUF { txt=".ott"; }, + LBUF { txt=".awb"; }, + LBUF { txt=".mid"; }, + LBUF { txt=".c3d"; }, + LBUF { txt=".jar"; }, + LBUF { txt=".ngd"; }, + LBUF { txt=".sis"; }, + LBUF { txt=".sisx"; } + }; + } + + +// End of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/aprfndr.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/aprfndr.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,458 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "aprfndr.h" +#include "APFDEF.H" +#include "APFSTD.H" +#include "../apgrfx/APGAIR.H" +#include +#include "../apgrfx/apprivate.h" +#include + +///////////////////////////// +// CApaAppRegFinder +///////////////////////////// + +EXPORT_C CApaAppRegFinder* CApaAppRegFinder::NewL(const RFs& aFs) + { + CApaAppRegFinder* self=NewLC(aFs); + CleanupStack::Pop(self); + return self; + } + +EXPORT_C CApaAppRegFinder* CApaAppRegFinder::NewLC(const RFs& aFs) + { + CApaAppRegFinder* self=new (ELeave) CApaAppRegFinder(aFs); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +CApaAppRegFinder::CApaAppRegFinder(const RFs& aFs) + : iFs(aFs), + iListOfFolders(2), + iSidCheckerMap(CApaAppListServer::Self()?CApaAppListServer::Self()->RescanCallBack():TCallBack(NULL,NULL)) +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + ,iRemovableMediaDriveScan(EFalse) +#endif // SYMBIAN_APPARC_APPINFO_CACHE + + { + } + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +CApaAppRegFinder::~CApaAppRegFinder() + { + iListOfFolders.ResetAndDestroy(); + iListOfFolders.Close(); + iListOfDrives.Close(); + iSidCheckerMap.Close(); + delete iFileList; // should already be deleted and NULL at this point + } +#else +CApaAppRegFinder::~CApaAppRegFinder() + { + iListOfFolders.ResetAndDestroy(); + iListOfFolders.Close(); + if (iListOfDrives) + { + iListOfDrives->Close(); + delete iListOfDrives; + } + iSidCheckerMap.Close(); + + delete iFileList; // should already be deleted and NULL at this point + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +void CApaAppRegFinder::ConstructL() + { +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + BuildDriveListL(); +#else + GetDriveListL(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + GetFolderListL(); + } + +#ifndef SYMBIAN_APPARC_APPINFO_CACHE +void CApaAppRegFinder::GetDriveListL() + { + TDriveList driveList; + User::LeaveIfError(iFs.DriveList(driveList)); + iListOfDrives = new(ELeave) RArray(4); + BuildDriveListL(iFs, driveList, *iListOfDrives); + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +_LIT(KAppRegRscSearchPath,"\\private\\10003a3f\\apps\\"); +_LIT(KAppRegRscImportSearchPath,"\\private\\10003a3f\\import\\apps\\"); +_LIT(KAppRegRscImportNonNativeSearchPath,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\"); + +void CApaAppRegFinder::GetFolderListL() + { + TPtrC ptr(KAppRegRscSearchPath); + HBufC* searchPath = ptr.AllocLC(); + User::LeaveIfError(iListOfFolders.Append(searchPath)); + CleanupStack::Pop(searchPath); + searchPath = NULL; + + ptr.Set(KAppRegRscImportSearchPath); + searchPath = ptr.AllocLC(); + User::LeaveIfError(iListOfFolders.Append(searchPath)); + CleanupStack::Pop(searchPath); + + ptr.Set(KAppRegRscImportNonNativeSearchPath); + searchPath = ptr.AllocLC(); + User::LeaveIfError(iListOfFolders.Append(searchPath)); + CleanupStack::Pop(searchPath); + } + +#ifndef SYMBIAN_APPARC_APPINFO_CACHE +void CApaAppRegFinder::BuildDriveListL(const RFs& aFs, const TDriveList& aSourceDriveList, RArray& aDestDriveList) + { // static + TInt drive(EDriveY); + TDriveUnitInfo driveUnitInfo; + while(drive >= EDriveA) + { + if (aSourceDriveList[drive]!=KDriveAbsent) + { + TDriveInfo driveInfo; + TInt ret = aFs.Drive(driveInfo,drive); + if (ret==KErrNone) + { + if (driveInfo.iType!=EMediaNotPresent && driveInfo.iType!=EMediaRemote) + { + driveUnitInfo.iDriveUnit=drive; + driveUnitInfo.iDriveAtt=driveInfo.iDriveAtt; + User::LeaveIfError(aDestDriveList.Append(driveUnitInfo)); + } + } + } + --drive; + } + driveUnitInfo.iDriveUnit=EDriveZ; + driveUnitInfo.iDriveAtt=KDriveAttRom; + User::LeaveIfError(aDestDriveList.Append(driveUnitInfo)); + } + +EXPORT_C void CApaAppRegFinder::FindAllAppsL() + { + delete iFileList; + iFileList = NULL; + if(iListOfDrives) + { + iListOfDrives->Close(); + delete iListOfDrives; + iListOfDrives = NULL; + } + GetDriveListL(); + iCurrentIndexInDriveList=-1; + iCurrentIndexInFolderList=0; + iScanStage=EScanStageNonImportROM; + iLastChkedApp = KNullUid; + } + +#else +void CApaAppRegFinder::BuildDriveListL() + { + TDriveList driveList; + User::LeaveIfError(iFs.DriveList(driveList)); + + TInt drive(EDriveY); + TDriveUnitInfo driveUnitInfo; + while(drive >= EDriveA) + { + if (driveList[drive]!=KDriveAbsent) + { + TDriveInfo driveInfo; + TInt ret = iFs.Drive(driveInfo,drive); + if (ret==KErrNone) + { + if (iRemovableMediaDriveScan) + {// iListOfDrives should have list of all the removable drives irrespective of presence of the media + if ((driveInfo.iType != EMediaRemote) && (driveInfo.iDriveAtt & KDriveAttRemovable)) + { + driveUnitInfo.iDriveUnit=drive; + driveUnitInfo.iDriveAtt=driveInfo.iDriveAtt; + User::LeaveIfError(iListOfDrives.Append(driveUnitInfo)); + } + } + else + { + if (driveInfo.iType!=EMediaNotPresent && driveInfo.iType!=EMediaRemote) + { + driveUnitInfo.iDriveUnit=drive; + driveUnitInfo.iDriveAtt=driveInfo.iDriveAtt; + User::LeaveIfError(iListOfDrives.Append(driveUnitInfo)); + } + } + } + } + --drive; + } + if (!iRemovableMediaDriveScan) + { + driveUnitInfo.iDriveUnit=EDriveZ; + driveUnitInfo.iDriveAtt=KDriveAttRom; + User::LeaveIfError(iListOfDrives.Append(driveUnitInfo)); + } + } + +EXPORT_C void CApaAppRegFinder::FindAllRemovableMediaAppsL() + { + iRemovableMediaDriveScan = ETrue; + FindAllAppsL(); + } + +EXPORT_C const RArray& CApaAppRegFinder::DriveList() const + { + return (iListOfDrives); + } + +EXPORT_C void CApaAppRegFinder::FindAllAppsL() + { + delete iFileList; + iFileList = NULL; + iListOfDrives.Reset(); + BuildDriveListL(); + iCurrentIndexInDriveList=-1; + iCurrentIndexInFolderList=0; + iScanStage = EScanStageNonImportROM; + iRemovableMediaDriveScan = EFalse; + iLastChkedApp = KNullUid; + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +/** Scans the applications in following order: +1. non-import y-a,z but only on ROM drives +2. import on all non-ROM drives in the order y-a,z +3. import on all ROM drives in the order y-a,z + +Upgrades of apparc server (via Software Install) are currently disallowed. +This means it is not possible to install registration files to \private\10003a3f\apps +(on any drive), so there is no need to scan \private\10003a3f\apps on non ROM based drives. +*/ +EXPORT_C TBool CApaAppRegFinder::NextL(TApaAppEntry& aAppRegistrationEntry, const RPointerArray& aForcedRegistrations) + { + TBool entryFound = EFalse; + while (DoNextL(aAppRegistrationEntry, aForcedRegistrations, entryFound)) + { + //do nothing. the point is to keep calling DoNextL + } + return entryFound; + } + +TBool CApaAppRegFinder::DoNextL(TApaAppEntry& aAppRegistrationEntry, const RPointerArray& aForcedRegistrations, TBool& aEntryFound) + { +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + __ASSERT_ALWAYS(iListOfDrives.Count(),Panic(EPanicFindAllAppsNotCalled)); +#else + __ASSERT_ALWAYS(iListOfDrives,Panic(EPanicFindAllAppsNotCalled)); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + + if (!iFileList) + {// scan the next drive/dir + iFileIndex = 0; + while (GetNextDriveAndFolder()) + { +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + if (GetFileListL((iListOfDrives[iCurrentIndexInDriveList]).iDriveUnit, *iListOfFolders[iCurrentIndexInFolderList])==KErrNone) +#else + if (GetFileListL(((*iListOfDrives)[iCurrentIndexInDriveList]).iDriveUnit, *iListOfFolders[iCurrentIndexInFolderList])==KErrNone) +#endif // SYMBIAN_APPARC_APPINFO_CACHE + { + break; + } + } + if (!iFileList) + { + aEntryFound = EFalse; + return EFalse; // no more drives to scan + } + } + // scan the file list + while (iFileIndexCount()) + { + const TEntry& entry=(*iFileList)[iFileIndex++]; + if (!ApaUtils::HandleAsRegistrationFile(entry.iType)) + { + continue; // only interested in app registration resource files + } + + TParse parse; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + const TDriveName driveName = (iListOfDrives[iCurrentIndexInDriveList]).iDriveUnit.Name(); +#else + const TDriveName driveName = ((*iListOfDrives)[iCurrentIndexInDriveList]).iDriveUnit.Name(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + parse.Set(entry.iName, iListOfFolders[iCurrentIndexInFolderList], &driveName); + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + if (iListOfDrives[iCurrentIndexInDriveList].iDriveAtt&KDriveAttRemovable) +#else + if ((*iListOfDrives)[iCurrentIndexInDriveList].iDriveAtt&KDriveAttRemovable) +#endif // SYMBIAN_APPARC_APPINFO_CACHE + { + if (entry[2] != iLastChkedApp) //Check for validity only if it has not yet been checked + { + TUid appTypeUid; + if(entry[0].iUid == KUidPrefixedNonNativeRegistrationResourceFile) + { + appTypeUid = entry[1]; + } + else + { + appTypeUid = KNullUid; + } + + // Get the CAppSidChecker for this type of executable + TBool validRegistration = ETrue; + #ifdef SYMBIAN_APPARC_APPINFO_CACHE + TRAPD(err, validRegistration = iSidCheckerMap.FindSidCheckerL(appTypeUid).AppRegisteredAt(entry[2], (iListOfDrives)[iCurrentIndexInDriveList].iDriveUnit)); + #else + TRAPD(err, validRegistration = iSidCheckerMap.FindSidCheckerL(appTypeUid).AppRegisteredAt(entry[2], (*iListOfDrives)[iCurrentIndexInDriveList].iDriveUnit)); + #endif // SYMBIAN_APPARC_APPINFO_CACHE + iLastChkedApp = entry[2]; + if(err == KErrNone) + { + if(!validRegistration) + { + // Check if this registration file should be included + // despite not being officially reported as a valid registration + HBufC* fullName = parse.FullName().AllocLC(); + TInt pos = aForcedRegistrations.FindInOrder(fullName, TLinearOrder(CApaAppList::CompareStrings)); + CleanupStack::PopAndDestroy(fullName); + if (pos == KErrNotFound) + { + continue; + } + } + } + else if(err != KErrNotFound) + { + User::Leave(err); + } + } + else + { + continue; + } + } + aAppRegistrationEntry.iUidType = entry.iType; + aAppRegistrationEntry.iFullName = parse.FullName(); + aEntryFound = ETrue; // we found one + return EFalse; + } + // current Drive has been exhausted + delete iFileList; + iFileList = NULL; + return ETrue; // scan the next drive + } + +TBool CApaAppRegFinder::GetNextDriveAndFolder() + { + TBool found=ETrue; + TBool checkNextFolder=ETrue; + TDriveUnitInfo driveUnitInfo; + while (checkNextFolder) + { + // move to next folder +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + if (++iCurrentIndexInDriveList>=iListOfDrives.Count()) +#else + if (++iCurrentIndexInDriveList>=iListOfDrives->Count()) +#endif // SYMBIAN_APPARC_APPINFO_CACHE + { + iCurrentIndexInDriveList=0; + ++iScanStage; + } + + //Get drive info +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + driveUnitInfo=iListOfDrives[iCurrentIndexInDriveList]; +#else + driveUnitInfo=(*iListOfDrives)[iCurrentIndexInDriveList]; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + //check folder + switch (iScanStage) + { + case EScanStageNonImportROM: + if (driveUnitInfo.iDriveAtt==KDriveAttRom) + { + iCurrentIndexInFolderList=0; + checkNextFolder=EFalse; + } + break; + case EScanStageImportNonROM: + if (driveUnitInfo.iDriveAtt!=KDriveAttRom) + { + iCurrentIndexInFolderList=1; + checkNextFolder=EFalse; + } + break; + case EScanStageImportNonNativeResourceNonROM: + if (driveUnitInfo.iDriveAtt!=KDriveAttRom) + { + iCurrentIndexInFolderList=2; + checkNextFolder=EFalse; + } + break; + case EScanStageImportROM: + if (driveUnitInfo.iDriveAtt==KDriveAttRom) + { + iCurrentIndexInFolderList=1; + checkNextFolder=EFalse; + } + break; + case EScanStageImportNonNativeResourceROM: + if (driveUnitInfo.iDriveAtt==KDriveAttRom) + { + iCurrentIndexInFolderList=2; + checkNextFolder=EFalse; + } + break; + case EScanStageComplete: + checkNextFolder=EFalse; + found=EFalse; + break; + default: + break; + } + } + return found; + } + +_LIT(KAppRegRscSearchAnyFile,"*"); + +TInt CApaAppRegFinder::GetFileListL(TDriveUnit aDriveUnit, const TDesC& aPathName) + { + const TDriveName driveName=aDriveUnit.Name(); + TParse parse; + TInt error = parse.Set(KAppRegRscSearchAnyFile,&aPathName,&driveName); + User::LeaveIfError(error); + TInt ret = iFs.GetDir(parse.FullName(), KEntryAttAllowUid, ESortNone, iFileList); + CheckErrorL(ret); + return ret; + } + +void CApaAppRegFinder::CheckErrorL(TInt aError) +// static + { + if (aError!=KErrNone && aError!=KErrNotFound && aError!=KErrPathNotFound && aError!=KErrNotReady + && aError!=KErrDisMounted && aError!=KErrCorrupt && aError!=KErrNotSupported && aError!=KErrBadName && aError!=KErrLocked) + { + User::Leave(aError); + } + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/aprfndr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/aprfndr.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,96 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APRFNDR_H__ +#define __APRFNDR_H__ + +#include +#include +#include + +class TDriveUnitInfo; + +/** +@internalComponent +*/ +class CApaAppRegFinder : public CBase + { +public: // Construction / Destruction + IMPORT_C static CApaAppRegFinder* NewL(const RFs& aFs); + IMPORT_C static CApaAppRegFinder* NewLC(const RFs& aFs); + ~CApaAppRegFinder(); +private: // Private construction + CApaAppRegFinder(const RFs& aFs); + void ConstructL(); +public: + IMPORT_C TBool NextL(TApaAppEntry& aEntry, const RPointerArray& aForcedRegistrations); // increments a scan for all apps + IMPORT_C void FindAllAppsL(); // sets up a scan for all apps +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + IMPORT_C const RArray& DriveList() const; + IMPORT_C void FindAllRemovableMediaAppsL(); // sets up a scan for all removable media apps +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void BuildDriveListL(); +#else + void GetDriveListL(); + static void BuildDriveListL(const RFs& aFs, const TDriveList& aSourceDriveList, RArray& aDestDriveList); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + TInt GetFileListL(TDriveUnit aDriveUnit, const TDesC& aPathName); + void GetFolderListL(); + static void CheckErrorL(TInt aError); + TBool DoNextL(TApaAppEntry& aEntry, const RPointerArray& aForcedRegistrations, + TBool& aEntryFound); + TBool GetNextDriveAndFolder(); + +private: + enum TScanStage + { + EScanStageNonImportROM, + EScanStageImportNonROM, + EScanStageImportNonNativeResourceNonROM, + EScanStageImportROM, + EScanStageImportNonNativeResourceROM, + EScanStageComplete + }; + + +private: + CDir* iFileList; + TInt iCurrentIndexInDriveList; + TInt iCurrentIndexInFolderList; + TInt iFileIndex; + const RFs& iFs; + RPointerArray iListOfFolders; + TInt iScanStage; + RSidCheckerMap iSidCheckerMap; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + RArray iListOfDrives; + TBool iRemovableMediaDriveScan; +#else + RArray* iListOfDrives; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + TUid iLastChkedApp; //Uid of the last app whose sid cheking has been done. + }; + +class TDriveUnitInfo +{ +public: + TDriveUnit iDriveUnit; + TUint iDriveAtt; +}; + +#endif // __APRFNDR_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/apuninstallmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/apuninstallmonitor.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,109 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "apuninstallmonitor.h" + +// This active object has lower priority than CApaAppListServer but higher than file scanning periodic timer. +const TInt KAppUninstallPriority=CActive::EPriorityStandard-10; + +// +// CApaAppUnInstallMonitor class +// +EXPORT_C CApaAppUnInstallMonitor* CApaAppUnInstallMonitor::NewL(CApaAppListServer* aApaServer) + { + CApaAppUnInstallMonitor* self = new(ELeave) CApaAppUnInstallMonitor(aApaServer); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +CApaAppUnInstallMonitor::CApaAppUnInstallMonitor(CApaAppListServer* aApaServer) : + CActive(KAppUninstallPriority), + iApaServer(aApaServer), + iWaitingForStartUninstall(ETrue) + { + CActiveScheduler::Add(this); + } + +void CApaAppUnInstallMonitor::ConstructL() + { + User::LeaveIfError(iSwisProperty.Attach(KUidSystemCategory, Swi::KUidSoftwareInstallKey)); + } + +EXPORT_C CApaAppUnInstallMonitor::~CApaAppUnInstallMonitor() + { + Cancel(); + iSwisProperty.Close(); + } + +EXPORT_C void CApaAppUnInstallMonitor::Start() + { + DoStart(); + } + +TBool CApaAppUnInstallMonitor::UnInstallInProgress() const + { + return ((iSwisState & Swi::KSwisOperationMask) & Swi::ESwisUninstall) + && ((iSwisState & Swi::KSwisOperationStatusMask) == Swi::ESwisStatusNone); + } + +void CApaAppUnInstallMonitor::RunL() + { + if(iStatus.Int() == KErrNone) + { + DoStart(); + + if (iWaitingForStartUninstall) + { + if (UnInstallInProgress()) + { + iWaitingForStartUninstall = EFalse; + iApaServer->HandleStartUninstallEvent(); + } + } + else + { // waiting for end uninstall + if (!UnInstallInProgress()) + { + iWaitingForStartUninstall = ETrue; + TRAP_IGNORE(iApaServer->HandleEndUninstallEventL()); // let user try again if OOM + } + + } + } + } + +void CApaAppUnInstallMonitor::DoStart() + { + iSwisProperty.Subscribe(iStatus); + TInt err = iSwisProperty.Get(KUidSystemCategory, Swi::KUidSoftwareInstallKey, iSwisState); + if(err == KErrNone) + { + SetActive(); + } + else + { + iSwisProperty.Cancel(); + } + } + +void CApaAppUnInstallMonitor::DoCancel() + { + iSwisProperty.Cancel(); + } + + +// End of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/apuninstallmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/apuninstallmonitor.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,56 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APUNINSTALLMONITOR_H__ +#define __APUNINSTALLMONITOR_H__ + +#include +#include +#include +#include + + +class CApaAppListServer; + +NONSHARABLE_CLASS(CApaAppUnInstallMonitor) : public CActive +/** +CApaAppUnInstallMonitor + +A low priority (EPriorityLow) active object which monitors software +install for installations/uninstallation of applications. + +@internalComponent +*/ + { +public: + IMPORT_C static CApaAppUnInstallMonitor* NewL(CApaAppListServer*); + IMPORT_C ~CApaAppUnInstallMonitor(); + IMPORT_C void Start(); +private: + CApaAppUnInstallMonitor(CApaAppListServer*); + void ConstructL(); + void RunL(); + void RunError(); + void DoStart(); + void DoCancel(); + TBool UnInstallInProgress() const; +private: + CApaAppListServer* iApaServer; + RProperty iSwisProperty; + TInt iSwisState; + TBool iWaitingForStartUninstall; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apfile/eshell_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apfile/eshell_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,31 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// eshell ui registration resource file, provided so that +// eshell can be handled as an application in UIs such as Techview +// +// + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x101F7AE7 + +RESOURCE APP_REGISTRATION_INFO + { + app_file="eshell"; + // + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAIR.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAIR.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,254 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APGAIR.H" +#include "APGAPLST.H" +#include "APGICNFL.H" +#include "APFDEF.H" + +extern void CleanupServiceArray(TAny* aServiceArray); + +CApaAppInfoReader::CApaAppInfoReader(RFs& aFs, const TUid aAppUid) + : iFs(aFs), + iAppUid(aAppUid), + iTimeStamp(0), + iDefaultScreenNumber(0), +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + iDefaultIconsUsed(EFalse), +#endif //SYMBIAN_APPARC_APPINFO_CACHE + iNonMbmIconFile(EFalse), + iLocalisableResourceFileTimeStamp(0), + iApplicationLanguage(ELangNone), + iIndexOfFirstOpenService(-1) + { + } + +CApaAppInfoReader::~CApaAppInfoReader() + { + delete iAppBinaryFullName; + delete iCaption; + delete iShortCaption; + delete iIcons; + if (iViewDataArray) + { + iViewDataArray->ResetAndDestroy(); + delete iViewDataArray; + } + delete iOwnedFileArray; + delete iIconFileName; + delete iLocalisableResourceFileName; + + if (iServiceArray) + { + CleanupServiceArray(iServiceArray); + iServiceArray = NULL; + } + delete iOpaqueData; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +HBufC* CApaAppInfoReader::AppBinaryFullName() + { + HBufC* fileName = iAppBinaryFullName; + iAppBinaryFullName = NULL; // ownership transferred to caller + return fileName; + } + +TUidType CApaAppInfoReader::AppBinaryUidType() const + { + return iAppBinaryUidType; + } + +TTime CApaAppInfoReader::TimeStamp() const + { + return iTimeStamp; + } + +TTime CApaAppInfoReader::IconFileTimeStamp() const + { + return iIconFileTimeStamp; + } + +void CApaAppInfoReader::Capability(TDes8& aCapabilityBuf) const + { + TApaAppCapabilityBuf buf(iCapability); + TApaAppCapability::CopyCapability(aCapabilityBuf, buf); + } + +TUint CApaAppInfoReader::DefaultScreenNumber() const + { + return iDefaultScreenNumber; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +HBufC* CApaAppInfoReader::Caption() + { + HBufC* caption = iCaption; + iCaption = NULL; // ownership transferred to caller + return caption; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +HBufC* CApaAppInfoReader::ShortCaption() + { + HBufC* shortCaption = iShortCaption; + iShortCaption = NULL; // ownership transferred to caller + return shortCaption; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +CApaAppIconArray* CApaAppInfoReader::Icons() + { + CApaAppIconArray* icons = iIcons; + iIcons = NULL; // ownership transferred to caller + return icons; + } + +#ifndef SYMBIAN_APPARC_APPINFO_CACHE +TBool CApaAppInfoReader::DefaultIconsUsed() const + { + return iDefaultIconsUsed; + } +#else +TInt CApaAppInfoReader::NumOfAppIcons() const + { + return iNumOfAppIcons; + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +CArrayPtrFlat* CApaAppInfoReader::Views() + { + CArrayPtrFlat* viewDataArray = iViewDataArray; + iViewDataArray = NULL; // ownership transferred to caller + return viewDataArray; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +CDesCArray* CApaAppInfoReader::OwnedFiles() + { + CDesCArray* ownedFileArray = iOwnedFileArray; + iOwnedFileArray = NULL; // ownership transferred to caller + return ownedFileArray; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +HBufC* CApaAppInfoReader::IconFileName() + { + HBufC* iconFileName = iIconFileName; + iIconFileName = NULL; // ownership transferred to caller + return iconFileName; + } + +TBool CApaAppInfoReader::NonMbmIconFile() const + { + return iNonMbmIconFile; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +HBufC* CApaAppInfoReader::LocalisableResourceFileName() + { + HBufC* localisableResourceFileName = iLocalisableResourceFileName; + iLocalisableResourceFileName = NULL; // ownership transferred to caller + return localisableResourceFileName; + } + +TTime CApaAppInfoReader::LocalisableResourceFileTimeStamp() const + { + return iLocalisableResourceFileTimeStamp; + } + +TLanguage CApaAppInfoReader::AppLanguage() const + { + return iApplicationLanguage; + } + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +CArrayFixFlat* CApaAppInfoReader::ServiceArray(TInt& aIndexOfFirstOpenService) + { + CArrayFixFlat* serviceArray = iServiceArray; + iServiceArray = NULL; + aIndexOfFirstOpenService = iIndexOfFirstOpenService; + return serviceArray; + } + + +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReader derived object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +HBufC8* CApaAppInfoReader::OpaqueData() + { + HBufC8* opaqueData = iOpaqueData; + iOpaqueData = NULL; + return opaqueData; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAIR.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAIR.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,258 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGAIR_H__) +#define __APGAIR_H__ + +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__APMSTD_H__) +#include +#endif + +#include +#include + +/** +@internalComponent +*/ +class ApaUtils + { +public: + IMPORT_C static TBool HandleAsRegistrationFile(const TUidType& aUidType); + }; + +/** The 2nd UID that defines a resource file as being an application registration resource file. + +@internalComponent +*/ +const TUid KUidAppRegistrationFile ={0x101F8021}; + +class CApaMaskedBitmap; +class CApaAppViewData; +class TEntry; +class RFs; +class CResourceFile; +class RResourceReader; +class CApaAppList; +class CApaAppIconArray; + +/** +@internalComponent +*/ + +NONSHARABLE_CLASS(CApaIconLoader) : public CBase + { +public: + static CApaIconLoader* NewL(RFs& aFs); + static CApaIconLoader* NewLC(RFs& aFs); + ~CApaIconLoader(); + + void AddIconArrayL(const CApaAppIconArray& aIcons); + void LoadAllIconsL(); + TBool LoadIconsL(TInt aNumOfIcons, const TDesC& aMbmFileName, CArrayPtr& aIcons); + +private: + CApaIconLoader(RFs& aFs); + void ConstructL(); + TInt IconIndexL(const TDesC& aFileName, TBool& aUseCache); + static TInt CompareIcons(const CApaMaskedBitmap& aFirst, const CApaMaskedBitmap& aSecond); + +private: + struct TKeyValuePair + { + public: + HBufC* iFileName; // key + TInt iIndex; // value + }; +private: + RFs& iFs; + RArray iIconIndexArray; + TInt iCachedArrayIndex; + RPointerArray iIconArrays; + }; + +/** +@internalComponent +*/ +NONSHARABLE_CLASS(CApaAppIconArray) : public CBase + { +public: + static CApaAppIconArray* NewL(); // creates a dummy icon array + static CApaAppIconArray* NewAppIconsL(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader); + static CApaAppIconArray* NewViewIconsL(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader); + static CApaAppIconArray* NewDefaultIconsL(); // creates a CApaAppIconArray that uses the default icons + static CApaAppIconArray* NewRealDefaultIconsLC(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader); // creates the CApaAppIconArray that contains the default icons + ~CApaAppIconArray(); + + TBool LoadIconsL(); + + CApaMaskedBitmap* IconBySize(const TSize& aSize) const; + CArrayFixFlat* IconSizesL() const; + TInt Count() const; + TBool DefaultIconsUsed() const; + CApaMaskedBitmap* operator[](TInt aIndex) const; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + TBool AreAppIconsLoaded() const; + TBool AreViewIconsLoaded() const; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: + static CApaAppIconArray* NewL(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader, TBool aFallbackToDefaultIcons); + static CApaAppIconArray* NewLC(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader, TBool aFallbackToDefaultIcons); + CApaAppIconArray(); + CApaAppIconArray(TInt aNumOfIcons, CApaIconLoader& aIconLoader, TBool aFallbackToDefaultIcons); + void ConstructL(const TDesC& aMbmFileName); + void GetDefaultIconsL(); + const CApaAppIconArray& DefaultIcons() const; + +private: + TInt iNumOfIcons; + CApaIconLoader* iIconLoader; + TBool iFallbackToDefaultIcons; + HBufC* iMbmFileName; + TBool iDefaultIconsUsed; + CArrayPtrFlat* iIcons; + CApaAppList* iDefaultIconsProvider; + }; + +class CApaAppInfoReader : public CBase +/** +Abstract base class for application information readers. + +Concrete implementations should read information from some +data source and implement policy specific to each reader. + +@internalComponent +*/ + { +public: + ~CApaAppInfoReader(); +public: + HBufC* AppBinaryFullName(); + TUidType AppBinaryUidType() const; + TTime TimeStamp() const; + TTime IconFileTimeStamp() const; + void Capability(TDes8& aCapabilityBuf) const; + TUint DefaultScreenNumber() const; + HBufC* Caption(); + HBufC* ShortCaption(); + CApaAppIconArray* Icons(); +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + TInt NumOfAppIcons() const; + virtual CApaIconLoader* IconLoader() = 0; +#else + TBool DefaultIconsUsed() const; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + CArrayPtrFlat* Views(); + CDesCArray* OwnedFiles(); + HBufC* IconFileName(); + TBool NonMbmIconFile() const; + HBufC* LocalisableResourceFileName(); + TTime LocalisableResourceFileTimeStamp() const; + TLanguage AppLanguage() const; + CArrayFixFlat* ServiceArray(TInt& aIndexOfFirstOpenService); + HBufC8* OpaqueData(); + +public: + virtual TBool Read()=0; +protected: + CApaAppInfoReader(RFs& aFs, const TUid aAppUid); + +protected: + RFs& iFs; + TUid iAppUid; + HBufC* iAppBinaryFullName; + TUidType iAppBinaryUidType; + TTime iTimeStamp; + TTime iIconFileTimeStamp; + TApaAppCapability iCapability; + TUint iDefaultScreenNumber; + HBufC* iCaption; + HBufC* iShortCaption; + CApaAppIconArray* iIcons; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + TInt iNumOfAppIcons; +#else + TBool iDefaultIconsUsed; +#endif + CArrayPtrFlat* iViewDataArray; + CDesCArray* iOwnedFileArray; + HBufC* iIconFileName; + TBool iNonMbmIconFile; // ETrue if icon filename is not an MBM file, however, EFalse does not necessarily mean it is an MBM file + HBufC* iLocalisableResourceFileName; + TTime iLocalisableResourceFileTimeStamp; + TLanguage iApplicationLanguage; + CArrayFixFlat* iServiceArray; + TInt iIndexOfFirstOpenService; + TBool iOpenServiceIsLegacy; + HBufC8* iOpaqueData; + }; + +class CApaAppInfoReaderV2 : public CApaAppInfoReader +/** +Reads application information from a combination of registration file, +optional localisable resource file and optional icon file. +Application information stored in this way is referred to as version 2. + +@internalComponent +*/ + { +public: +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + static CApaAppInfoReaderV2* NewL(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid); + virtual CApaIconLoader* IconLoader(); +#else + static CApaAppInfoReaderV2* NewL(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid,const TDesC& aDefaultAppIconFileName); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + ~CApaAppInfoReaderV2(); + +public: + virtual TBool Read(); + static TBool FileIsMbm(const TDesC& aFileName); + +private: +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + CApaAppInfoReaderV2(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid); +#else + CApaAppInfoReaderV2(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid, const TDesC& aDefaultAppIconFileName); +#endif + void ConstructL(); + void ReadMandatoryInfoL(CResourceFile*& aRegistrationFile, RResourceReader& aResourceReader); + void ReadNonLocalisableInfoL(RResourceReader& aResourceReader, CResourceFile*& aLocalisableResourceFile, TUint& aLocalisableResourceId); + void ReadNonLocalisableOptionalInfoL(RResourceReader& aResourceReader, const CResourceFile* aRegistrationFile, CResourceFile* aLocalisableResourceFile); + void ReadDataTypesL(RResourceReader& aResourceReader, CArrayFixFlat& aDatatypes); + void ReadLocalisableInfoL(const CResourceFile* aResourceFile, TUint aResourceId, TBool& aUseDefaultIcons); + HBufC* FullIconFileNameL(const TDesC& aIconFileName) const; + TBool HasWriteDeviceDataCap(); + void ReadAppSecurityInfo(); + + TBool FileIsMbmWithGenericExtensionL(const TDesC& aFileName) const; + static HBufC8* ReadOpaqueDataL(TUint aResourceId, const CResourceFile* aRegistrationFile, CResourceFile* aLocalisableResourceFile); + +private: + const TDesC& iRegistrationFileName; + TBool iHasWriteDeviceDataCap; + TBool iIsSidTrusted; + // This flag is used to determine if app security info was allready read + TBool iSecurityInfoHasBeenRead; + CApaIconLoader* iIconLoader; +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + const TDesC& iDefaultAppIconFileName; +#endif + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAIRV2.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAIRV2.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1281 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APGAIR.H" +#include +#include +#include "APGICNFL.H" +#include "APFDEF.H" +#include "apprivate.h" +#include +#include +#include +#include "APGSTD.H" + +#include "apsecutils.h" + +const TUint KResourceOffsetMask = 0xFFFFF000; + + +_LIT(KAppBinaryPathAndExtension,"\\sys\\bin\\.exe"); +_LIT(KV1AppPathAndExtension, "\\system\\apps\\.app"); +const TInt KAppRegistrationInfoResourceId = 1; + +#ifndef SYMBIAN_APPARC_APPINFO_CACHE +CApaAppInfoReaderV2* CApaAppInfoReaderV2::NewL(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid,const TDesC& aDefaultAppIconFileName) + { + CApaAppInfoReaderV2* self = new(ELeave) CApaAppInfoReaderV2(aFs, aRegistrationFileName, aAppUid,aDefaultAppIconFileName); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +CApaAppInfoReaderV2::CApaAppInfoReaderV2(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid,const TDesC& aDefaultAppIconFileName) + : CApaAppInfoReader(aFs, aAppUid), + iRegistrationFileName(aRegistrationFileName),iDefaultAppIconFileName(aDefaultAppIconFileName) + { + } +#else +CApaAppInfoReaderV2* CApaAppInfoReaderV2::NewL(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid) + { + CApaAppInfoReaderV2* self = new(ELeave) CApaAppInfoReaderV2(aFs, aRegistrationFileName, aAppUid); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +CApaAppInfoReaderV2::CApaAppInfoReaderV2(RFs& aFs, const TDesC& aRegistrationFileName, const TUid aAppUid) + : CApaAppInfoReader(aFs, aAppUid), + iRegistrationFileName(aRegistrationFileName) + { + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +void CApaAppInfoReaderV2::ConstructL() + { + iIconLoader = CApaIconLoader::NewL(iFs); + } + +CApaAppInfoReaderV2::~CApaAppInfoReaderV2() + { + delete iIconLoader; + } + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +// The behaviour of the following function is a little non-standard, as it +// transfers ownership of the pointer owned by a CApaAppInfoReaderV2 object +// to the caller. This means that this function is only designed to be called once. +// Doing things this way provides a small performance optimisation by enabling the caller +// to delete it's stored pointer, and replace it with one returned by this function, +// instead of having to copy the object (copying could be expensive for the methods +// of this class that need to return arrays). +CApaIconLoader* CApaAppInfoReaderV2::IconLoader() + { + CApaIconLoader* iconLoader = iIconLoader; + iIconLoader = NULL; // ownership transferred to caller + return iconLoader; + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +// this method reads the minimum information required to register an app +// if this fails (Leaves), we say the read has been unsuccessful +void CApaAppInfoReaderV2::ReadMandatoryInfoL(CResourceFile*& aRegistrationFile, RResourceReader& aResourceReader) + { + TEntry entry; + User::LeaveIfError(iFs.Entry(iRegistrationFileName, entry)); + iTimeStamp = entry.iModified; + + TUint fileOffset = 0; + TInt fileLength = 0; + TUid middleUid(KUidApp); + + // in the case of a non-native application, the resource file + // has been padded with the application type uid + + if (TParsePtrC(iRegistrationFileName).Path().CompareF(KLitPathForNonNativeResourceAndIconFiles)==0) + { + fileOffset=sizeof(TCheckedUid); + fileLength=entry.iSize-fileOffset; + middleUid=entry[1]; + if (middleUid.iUid==KNullUid.iUid) + { + User::Leave(KErrCorrupt); + } + } + + aRegistrationFile = CResourceFile::NewL(iFs, iRegistrationFileName, fileOffset, fileLength); + aResourceReader.OpenL(aRegistrationFile, KAppRegistrationInfoResourceId); + + aResourceReader.ReadUint32L(); // skip over LONG reserved_long + aResourceReader.ReadUint32L(); // skip over LLINK reserved_llink + + // read LTEXT app_file + const TPtrC appFile(aResourceReader.ReadTPtrCL()); + TParse parse; // this object gets used for 2 purposes: first to check that a TParsePtrC can be created over "appFile" without it panicking, and second to construct iAppBinaryFullName + User::LeaveIfError(parse.SetNoWild(appFile, NULL, NULL)); // do this before creating a TParsePtrC, since TParsePtrC's constructor panics if it fails (which would provide an easy way for malware to kill the Apparc server) + const TParsePtrC appFileParser(appFile); + + // read LONG attributes + iCapability.iAttributes = aResourceReader.ReadUint32L(); + + if (!appFileParser.NamePresent()) + { + User::Leave(KErrCorrupt); + } + const TPtrC appNameWithoutExtension(appFileParser.Name()); + const TPtrC registrationFileDrive(TParsePtrC(iRegistrationFileName).Drive()); + TUid firstUid(TUid::Null()); + if (iCapability.iAttributes & TApaAppCapability::ENonNative) + { + if (!appFileParser.PathPresent() || !appFileParser.ExtPresent()) + { + User::Leave(KErrCorrupt); + } + const TPtrC appFilePath(appFileParser.Path()); + const TPtrC appFileNameAndExt(appFileParser.NameAndExt()); + TPtrC appFileDrive(registrationFileDrive); + if (appFileParser.DrivePresent()) + { + appFileDrive.Set(appFileParser.Drive()); + } + User::LeaveIfError(parse.SetNoWild(appFileDrive, &appFilePath, &appFileNameAndExt)); + // keep firstUid as TUid::Null() + } + else if (iCapability.iAttributes & TApaAppCapability::EBuiltAsDll) + { + // legacy dll-style app + User::LeaveIfError(parse.SetNoWild(registrationFileDrive, &KV1AppPathAndExtension, &appNameWithoutExtension)); + User::LeaveIfError(parse.AddDir(appNameWithoutExtension)); + firstUid = KDynamicLibraryUid; + } + else + { + // exe-style app + User::LeaveIfError(parse.SetNoWild(registrationFileDrive, &KAppBinaryPathAndExtension, &appNameWithoutExtension)); + firstUid = KExecutableImageUid; + } + iAppBinaryFullName = parse.FullName().AllocL(); + + // set the TUidType for the app binary + // cannot read the TEntry info from the app binary because it's in \sys\bin + iAppBinaryUidType = TUidType(firstUid, middleUid, iAppUid); + } + +// reads as much info as it can +// at least captions and icons must be setup on return from this method (using defaults if necessary) +TBool CApaAppInfoReaderV2::Read() + { + CResourceFile* registrationFile = NULL; + RResourceReader resourceReader; + TRAPD(ret, ReadMandatoryInfoL(registrationFile, resourceReader)); + if (ret != KErrNone) + { + resourceReader.Close(); + delete registrationFile; + return EFalse; // might have read something, but failed to setup enough info to make it worthwhile trying to read any more + } + + CResourceFile* localisableFile = NULL; + TUint localisableResourceId = 1; // only initialising this here to keep the compiler happy, as it's concerned that the variable might be used without having been initialised. The variable should be initialised later, before it's used + TRAP(ret, ReadNonLocalisableInfoL(resourceReader, localisableFile, localisableResourceId)); + + if (ret == KErrNone) + { + TRAP(ret, ReadNonLocalisableOptionalInfoL(resourceReader, registrationFile, localisableFile)); + } + + TBool useDefaultIcons=ETrue; + + if (ret == KErrNone && localisableFile) + { + TRAP(ret, ReadLocalisableInfoL(localisableFile, localisableResourceId, useDefaultIcons)); + } + delete localisableFile; + resourceReader.Close(); + delete registrationFile; + + // if anything went wrong, we tell the caller that the read was unsuccessful. Some + // of the members of this class may not contain complete data, but this doesn't matter + // because the caller shouldn't try to access the data if the read was unsuccessful + TBool readSuccessful = (ret == KErrNone); + + if (useDefaultIcons) + { + delete iIcons; + iIcons = NULL; + TRAP_IGNORE(iIcons = CApaAppIconArray::NewDefaultIconsL()); + } + + return readSuccessful; + } + +HBufC* CApaAppInfoReaderV2::FullIconFileNameL(const TDesC& aIconFileName) const + { + HBufC* filename = NULL; + if (aIconFileName.Length() == 0) + { + return NULL; + } + /* + * aIconFileName may contain a valid string in some format (for eg. URI format) other than path to a regular file on disk + * and that can be a mbm or non-mbm file. Such a filename will be reported as invalid filename by iFs.IsValidName() method. + * aIconFileName will be returned since it is a valid string. + */ + if(!iFs.IsValidName(aIconFileName)) + { + filename = aIconFileName.AllocL(); + return filename; + } + + TParsePtrC parsePtr(aIconFileName); + if (parsePtr.IsWild() + || !parsePtr.PathPresent() + || !parsePtr.NamePresent()) + { + return NULL; + } + // check for fully qualified icon filename + if (parsePtr.DrivePresent() && BaflUtils::FileExists(iFs, aIconFileName)) + { + filename = aIconFileName.AllocL(); + } + else + { + // check for icon file on same drive as localisable resource file + TParse parse; + TPtrC localisableResourceFileDrive = TParsePtrC(*iLocalisableResourceFileName).Drive(); + TInt ret = parse.SetNoWild(localisableResourceFileDrive, &aIconFileName, NULL); + if (ret == KErrNone && BaflUtils::FileExists(iFs, parse.FullName())) + { + filename = parse.FullName().AllocL(); + } + else + { + TPtrC registrationFileDrive = TParsePtrC(iRegistrationFileName).Drive(); + if (TInt(TDriveUnit(registrationFileDrive)) != TInt(TDriveUnit(localisableResourceFileDrive))) + { + // check for icon file on same drive as registration file + ret = parse.SetNoWild(registrationFileDrive, &aIconFileName, NULL); + if (ret == KErrNone && BaflUtils::FileExists(iFs, parse.FullName())) + { + filename = parse.FullName().AllocL(); + } + } + } + } + return filename; + } + +void CApaAppInfoReaderV2::ReadLocalisableInfoL(const CResourceFile* aResourceFile, TUint aResourceId, TBool& aUseDefaultIcons) + { + RResourceReader resourceReader; + resourceReader.OpenLC(aResourceFile, aResourceId); + + resourceReader.ReadUint32L(); // skip over LONG reserved_long + resourceReader.ReadUint32L(); // skip over LLINK reserved_llink + + // read LTEXT short_caption + iShortCaption = resourceReader.ReadHBufCL(); + + resourceReader.ReadUint32L(); // skip over LONG reserved_long + resourceReader.ReadUint32L(); // skip over LLINK reserved_llink + + // read LTEXT caption + iCaption = resourceReader.ReadHBufCL(); + + // read WORD number_of_icons + const TInt numOfIcons = resourceReader.ReadInt16L(); +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + iNumOfAppIcons = numOfIcons; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + + // read LTEXT icon_file + TPtrC iconFile = resourceReader.ReadTPtrCL(); + + iIconFileName = FullIconFileNameL(iconFile); + if (iIconFileName) + { + TEntry entry; + TInt ret = iFs.Entry(*iIconFileName, entry); + if (KErrNone == ret) + { + iIconFileTimeStamp = entry.iModified; + } + + aUseDefaultIcons = EFalse; + if (iFs.IsValidName(*iIconFileName)) + { + if(FileIsMbmWithGenericExtensionL(*iIconFileName)) + { + if (numOfIcons > 0) + { + CApaAppIconArray* iconArray = CApaAppIconArray::NewAppIconsL(numOfIcons, *iIconFileName, *iIconLoader); + delete iIcons; + iIcons = iconArray; + } + else + { + aUseDefaultIcons = ETrue; + } + } + else + { + iNonMbmIconFile = ETrue; + } + } + //If the filename is not a valid name then the file is treated as a non-mbm file. + else + { + iNonMbmIconFile = ETrue; + } + } + // read LEN WORD STRUCT view_list[] + const TInt numOfViews = resourceReader.ReadInt16L(); + if (numOfViews > 0) + { + iViewDataArray = new(ELeave) CArrayPtrFlat(1); + } + for(TInt view = 0; view < numOfViews; ++view) + { + CApaAppViewData* viewData=CApaAppViewData::NewLC(); + resourceReader.ReadUint32L(); // skip over LONG reserved_long + resourceReader.ReadUint32L(); // skip over LLINK reserved_llink + + // read LONG uid + const TUid viewUid = {resourceReader.ReadInt32L()}; + viewData->SetUid(viewUid); + // read LONG screen_mode + const TInt screenMode = {resourceReader.ReadInt32L()}; + viewData->SetScreenMode(screenMode); + + resourceReader.ReadUint32L(); // skip over LONG reserved_long + resourceReader.ReadUint32L(); // skip over LLINK reserved_llink + + // read LTEXT caption + TPtrC viewCaption = resourceReader.ReadTPtrCL(); + viewData->SetCaptionL(viewCaption); + // read WORD number_of_icons + const TInt numOfViewIcons = resourceReader.ReadInt16L(); +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + viewData->SetNumOfViewIcons(numOfViewIcons); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + // read LTEXT icon_file + TPtrC viewIconFile = resourceReader.ReadTPtrCL(); + HBufC* const fullViewIconFileName = FullIconFileNameL(viewIconFile); + if (fullViewIconFileName) + { + CleanupStack::PushL(fullViewIconFileName); + viewIconFile.Set(*fullViewIconFileName); + viewData->SetIconFileNameL(viewIconFile); + + if (iFs.IsValidName(viewIconFile)) + { + if(!FileIsMbmWithGenericExtensionL(viewIconFile)) + { + viewData->SetNonMbmIconFile(ETrue); + } + } + //If the filename is not a valid name then the file is treated as a non-mbm file. + else + { + viewData->SetNonMbmIconFile(ETrue); + } + } + else + { + viewIconFile.Set(KNullDesC); + if (numOfViewIcons > 0 && iIconFileName) + { + viewIconFile.Set(*iIconFileName); // default to app icon filename + } + } + if (numOfViewIcons > 0 && iFs.IsValidName(viewIconFile) && (FileIsMbmWithGenericExtensionL(viewIconFile))) + { + CApaAppIconArray* iconArray = CApaAppIconArray::NewViewIconsL(numOfViewIcons, viewIconFile, *iIconLoader); + viewData->SetIconArray(iconArray); + iconArray = NULL; + } + if (fullViewIconFileName) + { + CleanupStack::PopAndDestroy(fullViewIconFileName); + } + iViewDataArray->AppendL(viewData); + CleanupStack::Pop(viewData); + } +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + iIconLoader->LoadAllIconsL(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + // Read LTEXT group_name + // If a localised group name has been specified, it overrides + // The group name (if any), specified by APP_REGISTRATION_INFO + + TApaAppGroupName groupName; + TRAPD(ret, (groupName = resourceReader.ReadTPtrCL())); + if (ret != KErrNone) + { + if (ret != KErrEof) + { + User::Leave(ret); + } + } + else + { + if (groupName.Length() > 0) + { + iCapability.iGroupName = groupName; + } + } + + CleanupStack::PopAndDestroy(&resourceReader); + } + + +TBool CApaAppInfoReaderV2::FileIsMbm(const TDesC& aFileName) + { // static + if (aFileName.Length() > 0) + { + TParsePtrC parsePtr(aFileName); + _LIT(KFileExtensionMBM, ".MBM"); + if (parsePtr.Ext().CompareF(KFileExtensionMBM) == 0) + { + return ETrue; + } + } + return EFalse; + } + + + + +/*An MBM file may have a generic icon extension. In this case, as a way to check whether the file is an MBM one, +it is necessary to read the content of the fist four 32bit words of it and find out whether these words correspond to +KWriteonceFileStoreUid, KMultiBitmapFileImageUid, zero and KMultiBitmapFileImageChecksum respectively (defined in graphics/gditools/bmconv/bmconv.h). +So the file is opened and the first 4 32 bit words are extracted and compared with the header information of standard MBM file. +If they match, the function returns ETrue, else it returns EFalse */ +TBool CApaAppInfoReaderV2::FileIsMbmWithGenericExtensionL(const TDesC& aFileName) const + { + if (aFileName.Length() > 0) + { + //open a file in Share mode - this will allow other methods to access it too + RFile file; + User::LeaveIfError(file.Open(iFs,aFileName,EFileShareReadersOnly)); + //this is done beacuse the file can also be accessed by applist at the same time + //buffer stores the 16 bytes of the file + CleanupClosePushL(file); + TBuf8<16> buffer; + User::LeaveIfError(file.Read(buffer,16)); + CleanupStack::PopAndDestroy();//file + //we use a constant pointer to the buffer to read header info + TPtrC8 filePointer(buffer); + + /*The first 16 bytes of an MBM file are the same for any generic MBM file. + These are : + KWriteOnceFileStoreUid = 0x10000037(Emulator MBM file) 0x10000041(ROM image) + KMultiBitMapFileImageUid = 0x10000042(Emulator MBM file) 0x00000001(ROM image) + Zero = 0x00000000(Emulator MBM file) 0x0000000C(ROM image) + checksum = 0x47396439(Emulator MBM file) 0x10000040(ROM image) + The first 16 bytes of the given file is compared with these standard values to ascertain it is MBM file*/ + if((filePointer[3]==0x10)&&(filePointer[2]==0x00)&&(filePointer[1]==0x00)&&(filePointer[0]==0x37)) + {//KWriteOnceFileStoreUid = 0x10000037 + if((filePointer[7]==0x10)&&(filePointer[6]==0x00)&&(filePointer[5]==0x00)&&(filePointer[4]==0x42)) + {//KMultiBitMapFileImageUid = 0x10000042 + if((filePointer[11]==0x00)&&(filePointer[10]==0x00)&&(filePointer[9]==0x00)&&(filePointer[8]==0x00)) + {//Zero = 0x00000000) + if((filePointer[15]==0x47)&&(filePointer[14]==0x39)&&(filePointer[13]==0x64)&&(filePointer[12]==0x39)) + {//checksum = 0x47396439 + return ETrue; + } + } + } + } + //Else Check for ROM Image MBM file's header + else if((filePointer[3]==0x10)&&(filePointer[2]==0x00)&&(filePointer[1]==0x00)&&(filePointer[0]==0x41)) + {//KWriteOnceFileStoreUid = 0x10000041 + if((filePointer[7]==0x00)&&(filePointer[6]==0x00)&&(filePointer[5]==0x00)&&(filePointer[4]==0x01)) + {//KMultiBitMapFileImageUid = 0x00000001 + if((filePointer[11]==0x00)&&(filePointer[10]==0x00)&&(filePointer[9]==0x00)&&(filePointer[8]==0x0C)) + {//Zero = 0x0000000C) + if((filePointer[15]==0x10)&&(filePointer[14]==0x00)&&(filePointer[13]==0x00)&&(filePointer[12]==0x40)) + {//checksum = 0x10000040 + return ETrue; + } + } + } + } + } + return EFalse; + } + +HBufC8* CApaAppInfoReaderV2::ReadOpaqueDataL(TUint aResourceId, const CResourceFile* aRegistrationFile, CResourceFile* aLocalisableResourceFile) + { // static + HBufC8* opaqueData = NULL; + if (aResourceId == 0) + { + opaqueData = HBufC8::NewL(0); + } + else + { + if (aResourceId & KResourceOffsetMask) + { + // expecting opaque data to be in the localisable resource file + if (aLocalisableResourceFile) + { + aLocalisableResourceFile->ConfirmSignatureL(); + opaqueData = aLocalisableResourceFile->AllocReadLC(aResourceId); + CleanupStack::Pop(opaqueData); + } + else + { + opaqueData = HBufC8::NewL(0); + } + } + else + { + // expecting opaque data to be in the registration file + __ASSERT_ALWAYS(aRegistrationFile, Panic(EPanicNullPointer)); + opaqueData = aRegistrationFile->AllocReadLC(aResourceId); //lint !e613 Suppress ossible use of null pointer + CleanupStack::Pop(opaqueData); + } + } + return opaqueData; + } + +void CApaAppInfoReaderV2::ReadNonLocalisableOptionalInfoL(RResourceReader& aResourceReader, const CResourceFile* aRegistrationFile, CResourceFile* aLocalisableResourceFile) + { + // read LEN WORD STRUCT service_list[] + TInt serviceCount = 0; + // service information was not present in the first release of the registration file + // APP_REGISTRATION_INFO resource struct + // this method must not leave if the registration file doesn't contain service information, so the + // following call to ReadInt16L is trapped to ensure this method doesn't leave just because + // there is no more information in the resource to read (KErrEof) + TRAPD(err, serviceCount = aResourceReader.ReadInt16L()); + if (err != KErrNone) + { + if (err != KErrEof) + { + User::Leave(err); + } + return; // end of resource reached + } + else + { + if ((!iServiceArray) && (serviceCount > 0)) + { + iServiceArray = new(ELeave) CArrayFixFlat(4); + } + while (serviceCount--) + { + const TUid serviceUid = {aResourceReader.ReadUint32L()}; + + if ((serviceUid == KOpenServiceUid) && (iOpenServiceIsLegacy)) + { + __ASSERT_DEBUG(iIndexOfFirstOpenService == 0, User::Invariant()); + // If we found an Open service in the SERVICE_INFO declaration + // then we must ignore the legacy one + (*iServiceArray)[0].Release(); + iServiceArray->Delete(0); + iOpenServiceIsLegacy = EFalse; + iIndexOfFirstOpenService = -1; + } + + CArrayFixFlat* datatypes = new(ELeave) CArrayFixFlat(5); + CleanupStack::PushL(datatypes); + ReadDataTypesL(aResourceReader, *datatypes); + + const TUint resourceId = aResourceReader.ReadUint32L(); + HBufC8* opaqueData = NULL; + opaqueData = ReadOpaqueDataL(resourceId, aRegistrationFile, aLocalisableResourceFile); + CleanupStack::PushL(opaqueData); + + TApaAppServiceInfo serviceInfo(serviceUid, datatypes, opaqueData); // takes ownership of opaqueData + iServiceArray->AppendL(serviceInfo); + CleanupStack::Pop(opaqueData); + CleanupStack::Pop(datatypes); + if ((serviceUid == KOpenServiceUid) && (iIndexOfFirstOpenService < 0)) + { + iIndexOfFirstOpenService = iServiceArray->Count() - 1; + } + } + // read LLINK opaque_data + const TUint resourceId = aResourceReader.ReadUint32L(); + delete iOpaqueData; + iOpaqueData = NULL; + iOpaqueData = ReadOpaqueDataL(resourceId, aRegistrationFile, aLocalisableResourceFile); + } + } + +void CApaAppInfoReaderV2::ReadNonLocalisableInfoL(RResourceReader& aResourceReader, CResourceFile*& aLocalisableResourceFile, TUint& aLocalisableResourceId) + { + __ASSERT_DEBUG(aLocalisableResourceFile == NULL, User::Invariant()); + + // read LTEXT localisable_resource_file + TPtrC localisableResourceFileName(aResourceReader.ReadTPtrCL()); + if (localisableResourceFileName.Length() > 0 && iFs.IsValidName(localisableResourceFileName)) + { + // determine the language specific name of the localisable resource file + TParse parse; + TParsePtrC parsePtr(iRegistrationFileName); + User::LeaveIfError(parse.SetNoWild(parsePtr.Drive(), &KAppResourceFileExtension, &localisableResourceFileName)); + TFileName resourceFileName(parse.FullName()); + BaflUtils::NearestLanguageFile(iFs, resourceFileName, iApplicationLanguage); + iLocalisableResourceFileName = resourceFileName.AllocL(); + + TEntry entry; + User::LeaveIfError(iFs.Entry(*iLocalisableResourceFileName, entry)); + iLocalisableResourceFileTimeStamp = entry.iModified; + + + // open the localisable resource file + aLocalisableResourceFile = CResourceFile::NewL(iFs, resourceFileName, 0, 0); + } + + // read LONG localisable_resource_id + aLocalisableResourceId = aResourceReader.ReadUint32L(); + if (aLocalisableResourceFile && (aLocalisableResourceId & KResourceOffsetMask)) + { + aLocalisableResourceFile->ConfirmSignatureL(); + } + + iCapability.iAppIsHidden=aResourceReader.ReadInt8L(); + iCapability.iEmbeddability = static_cast(aResourceReader.ReadInt8L()); + iCapability.iSupportsNewFile=aResourceReader.ReadInt8L(); + iCapability.iLaunchInBackground = aResourceReader.ReadInt8L(); + iCapability.iGroupName = aResourceReader.ReadTPtrCL(); + + // read BYTE default_screen_number + iDefaultScreenNumber = aResourceReader.ReadUint8L(); + + //read the datatypes + CArrayFixFlat* datatypes = new(ELeave) CArrayFixFlat(5); + CleanupStack::PushL(datatypes); + ReadDataTypesL(aResourceReader, *datatypes); + //dataTypes is deleted if + // A. There are no legacy datatypes + // B. Control panel plugin apps are not allowed to register MIME types.If they happen to have any, these datatypes should be ignored. + if ((iCapability.iAttributes & TApaAppCapability::EControlPanelItem) || (datatypes->Count() == 0)) + { + CleanupStack::PopAndDestroy(datatypes); + } + else + { + __ASSERT_DEBUG(!iServiceArray, User::Invariant()); + iServiceArray = new(ELeave) CArrayFixFlat(4); + HBufC8* opaqueData = HBufC8::NewL(0); + CleanupStack::PushL(opaqueData); + TApaAppServiceInfo serviceInfo(KOpenServiceUid, datatypes, opaqueData); + iServiceArray->AppendL(serviceInfo); + CleanupStack::Pop(opaqueData); + CleanupStack::Pop(datatypes); + iIndexOfFirstOpenService = 0; + iOpenServiceIsLegacy = ETrue; + } + + // read LEN WORD STRUCT file_ownership_list[] + const TInt fileOwnershipArraySize = aResourceReader.ReadInt16L(); + if (fileOwnershipArraySize > 0) + { + iOwnedFileArray = new(ELeave) CDesCArraySeg(1); + } + for (TInt i=0; i < fileOwnershipArraySize; i++) + { + TPtrC fileNamePtr = aResourceReader.ReadTPtrCL(); + iOwnedFileArray->AppendL(fileNamePtr); + } + } + +void CApaAppInfoReaderV2::ReadDataTypesL(RResourceReader& aResourceReader, + CArrayFixFlat& aDatatypes) + { + // read LEN WORD STRUCT datatype_list[] + const TInt dataTypeArraySize = aResourceReader.ReadInt16L(); + if (dataTypeArraySize <= 0) + { + return; + } + + for (TInt i=0; i < dataTypeArraySize; i++) + { + TDataTypePriority priority = static_cast(aResourceReader.ReadInt32L()); + + //Check for data priority of UnTrusted apps however the trusted apps will not have any restrictions + //over the data priority. + //If an untrusted app has write device data capability (i.e. still has priority = KDataTypePrioritySystem), + //do not restrict to KDataTypeUnTrustedPriorityThreshold + if (priority > KDataTypeUnTrustedPriorityThreshold || priority == KDataTypePrioritySystem ) + { + ReadAppSecurityInfo(); + + if (priority == KDataTypePrioritySystem) + { + // Check that the app has capability WriteDeviceData + if (!iHasWriteDeviceDataCap) + { + priority = KDataTypePriorityNormal; + } + } + else + { + //data priority for UnTrusted apps would be capped if it is greater than the threshold priority i.e, KMaxTInt16. + TInt match=iRegistrationFileName.MatchF(KLitPathForUntrustedRegistrationResourceFiles); + if (match != KErrNotFound && !iIsSidTrusted) + { + //if registration file is in import directory and + //its sid is in unprotected range - downgrade the priority + priority = KDataTypeUnTrustedPriorityThreshold; + } + } + } + TPtrC8 dataTypePtr = aResourceReader.ReadTPtrC8L(); + TDataType dataType(dataTypePtr); + TDataTypeWithPriority dataTypeWithPriority(dataType, priority); + aDatatypes.AppendL(dataTypeWithPriority); + } + } + +// This method can be used to check whether app has a WriteDeviceCap +// and its sid is trusted +void CApaAppInfoReaderV2::ReadAppSecurityInfo() + { + if (!iSecurityInfoHasBeenRead) + { + __ASSERT_DEBUG( iAppBinaryFullName, Panic(EPanicNullPointer) ); + const TInt err = CApaSecurityUtils::CheckAppSecurity( *iAppBinaryFullName, + iHasWriteDeviceDataCap, + iIsSidTrusted); + if ( KErrNone != err ) + { + iHasWriteDeviceDataCap = EFalse; + iIsSidTrusted = EFalse; + } + iSecurityInfoHasBeenRead = ETrue; + } + } + +// +// Class CApaIconLoader +// + +CApaIconLoader* CApaIconLoader::NewL(RFs& aFs) + { + CApaIconLoader* self = NewLC(aFs); + CleanupStack::Pop(self); + return self; + } + +CApaIconLoader* CApaIconLoader::NewLC(RFs& aFs) + { + CApaIconLoader* self = new(ELeave) CApaIconLoader(aFs); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +CApaIconLoader::CApaIconLoader(RFs& aFs) : + iFs(aFs) + { + } + +void CApaIconLoader::ConstructL() + { + } //lint !e1762 Suppress member function could be made const + + +CApaIconLoader::~CApaIconLoader() + { + TInt arrayCount = iIconIndexArray.Count(); + while (--arrayCount >= 0) + { + delete (iIconIndexArray[arrayCount].iFileName); + } + iIconIndexArray.Close(); + iIconArrays.Close(); + } + +void CApaIconLoader::AddIconArrayL(const CApaAppIconArray& aIcons) + { + iIconArrays.AppendL(&aIcons); + } + +void CApaIconLoader::LoadAllIconsL() + { + const TInt iconArraysCount = iIconArrays.Count(); + CleanupClosePushL(iIconArrays); + for (TInt ii = 0; ii LoadIconsL(); + } + CleanupStack::PopAndDestroy(&iIconArrays); + } + +// given an mbm filename, returns the next index to read from the file +// always set aUseCache to EFalse on first call in a sequence of calls +TInt CApaIconLoader::IconIndexL(const TDesC& aFileName, TBool& aUseCache) + { + if (aUseCache) + { + TInt ret = iIconIndexArray[iCachedArrayIndex].iIndex++; + return ret; + } + else + { + aUseCache = ETrue; + } + + // if filename in array, get the next index + TInt ret = 0; + const TInt arrayCount = iIconIndexArray.Count(); + TInt arrayIndex; + for (arrayIndex = 0; arrayIndex < arrayCount; arrayIndex++) + { + __ASSERT_DEBUG(iIconIndexArray[arrayIndex].iFileName, Panic(EDPanicInvalidIconIndexArray)); + if (iIconIndexArray[arrayIndex].iFileName->CompareF(aFileName) == 0) + { + ret = iIconIndexArray[arrayIndex].iIndex++; + iCachedArrayIndex = arrayIndex; + break; + } + } + + if (arrayIndex >= arrayCount) + { + // filename not found, add it to array + TKeyValuePair keyValuePair; + keyValuePair.iFileName = aFileName.AllocL(); + keyValuePair.iIndex = 0; + ret = keyValuePair.iIndex++; + User::LeaveIfError(iIconIndexArray.Append(keyValuePair)); + iCachedArrayIndex = arrayCount; + } + return ret; + } + + + +// returns EFalse if there was an error obtaining aMbmFileName's entry information, +// otherwise returns ETrue. +// Leaves if an error occurs while trying to populate aIcons or sort icons +TBool CApaIconLoader::LoadIconsL(TInt aNumOfIcons, const TDesC& aMbmFileName, CArrayPtr& aIcons) + { + TEntry entry; + TInt error=iFs.Entry(aMbmFileName,entry); + if (error!=KErrNone) + { + return EFalse; + } + TInt iconIndex; + TInt fileIndex; + TBool useCache = EFalse; + + + // create link to CApaAppList which owns this object as it has a separate share protected RFs + // which can be used to load bitmap icons + CApaAppList* const appList = CApaAppList::Self(); + + RFile mbmFile; + CleanupClosePushL(mbmFile); + User::LeaveIfError(mbmFile.Open(appList->ShareProtectedFileServer(), aMbmFileName, EFileShareReadersOnly)); + + for(iconIndex=0; iconIndexLoad(mbmFile, 2*fileIndex)); + User::LeaveIfError((bitmap->Mask())->Load(mbmFile,2*fileIndex+1)); + aIcons.AppendL(bitmap); + CleanupStack::Pop(bitmap); + } + + CleanupStack::PopAndDestroy(&mbmFile); // close mbmFile + + // now sort them in ascending order of size + TInt numberOfIcons = aIcons.Count(); + // create a new array that we can sort by area, populated from aIcons + RPointerArray ptrArray(numberOfIcons); + CleanupClosePushL(ptrArray); + TLinearOrder order(CApaIconLoader::CompareIcons); + for (iconIndex=0; iconIndexGetDefaultIconsL(); + CleanupStack::Pop(self); + return self; + } + +CApaAppIconArray* CApaAppIconArray::NewRealDefaultIconsLC(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader) + { + return NewLC(aNumOfIcons,aMbmFileName,aIconLoader,EFalse); + } + +/* real NewL and NewLC, private */ +CApaAppIconArray* CApaAppIconArray::NewL(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader, TBool aFallbackToDefaultIcons) + { + CApaAppIconArray* self = NewLC(aNumOfIcons,aMbmFileName,aIconLoader,aFallbackToDefaultIcons); + CleanupStack::Pop(self); + return self; + } + +CApaAppIconArray* CApaAppIconArray::NewLC(TInt aNumOfIcons, const TDesC& aMbmFileName, CApaIconLoader& aIconLoader, TBool aFallbackToDefaultIcons) + { + CApaAppIconArray* self = new(ELeave) CApaAppIconArray(aNumOfIcons,aIconLoader,aFallbackToDefaultIcons); + CleanupStack::PushL(self); + self->ConstructL(aMbmFileName); + return self; + } + +CApaAppIconArray::CApaAppIconArray() + { + } + +CApaAppIconArray::CApaAppIconArray(TInt aNumOfIcons, CApaIconLoader& aIconLoader, TBool aFallbackToDefaultIcons) : + iNumOfIcons(aNumOfIcons), + iIconLoader(&aIconLoader), + iFallbackToDefaultIcons(aFallbackToDefaultIcons) + { + } + +void CApaAppIconArray::ConstructL(const TDesC& aMbmFileName) + { + iMbmFileName = aMbmFileName.AllocL(); + ASSERT(iIconLoader); + iIconLoader->AddIconArrayL(*this); + } + +CApaAppIconArray::~CApaAppIconArray() + { + if(iDefaultIconsUsed) + { + ASSERT(iDefaultIconsProvider); + if(iDefaultIconsProvider) + iDefaultIconsProvider->ReleaseDefaultIconArray(); + } + delete iMbmFileName; + if (iIcons) + { + iIcons->ResetAndDestroy(); + delete iIcons; + } + iDefaultIconsProvider = NULL; + iIconLoader = NULL; + } + +// returns EFalse if there was an error obtaining iMbmFileName's entry information, +// otherwise returns ETrue or leaves with a system-wide error code +TBool CApaAppIconArray::LoadIconsL() + { + ASSERT(iIconLoader); + ASSERT(!iDefaultIconsUsed); + ASSERT(!iIcons); + iIcons = new(ELeave) CArrayPtrFlat(5); + TBool badMbmEntryInfo = EFalse; + TRAPD(err,badMbmEntryInfo = !iIconLoader->LoadIconsL(iNumOfIcons,*iMbmFileName,*iIcons)); + + // We'll be called by the iconLoader at most once, and after we've been called, + // it might be destroyed. So we shouldn't keep a pointer to it anymore. + iIconLoader = NULL; + + if ((badMbmEntryInfo || err != KErrNone) && iFallbackToDefaultIcons) + { + GetDefaultIconsL(); + } + else if (badMbmEntryInfo) + { + return EFalse; + } + else if (err != KErrNone) + { + User::Leave(err); + } + return ETrue; + } + +CApaMaskedBitmap* CApaAppIconArray::IconBySize(const TSize& aSize) const + { + if(iDefaultIconsUsed) + { + return DefaultIcons().IconBySize(aSize); + } + else if(iIcons == NULL && iIconLoader == NULL) + { + // Then we've been created with the default constructor, just pretend + // there's no icon of the right size + return NULL; + } + else if(iIcons == NULL) + { +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + // Arriving here means the the icons need loading but havn't been loaded yet. + // when we have lazy loading, this will be a trigger condition for loading them + ASSERT(iIcons); + return NULL; + } + else + { +#else + // Arriving here means the the icons need loading but havn't been loaded yet. + TRAPD(err, iIconLoader->LoadAllIconsL()); + if (err != KErrNone) + { + return NULL; + } + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + + const TInt count = iIcons->Count(); + CApaMaskedBitmap* bmp=NULL; + for (TInt ii=0;iiSizeInPixels()==aSize) + bmp=(*iIcons)[ii]; + } + if (!bmp) + {// if the exact size has not been found get one with nearest but smaller area + TInt differenceOfClosest=KMaxTInt; + TInt indexOfClosest=KMaxTInt; + TInt reqArea=aSize.iHeight*aSize.iWidth; + TSize bmpSize; + TInt difference; + for (TInt jj=0;jjSizeInPixels(); + difference=reqArea-bmpSize.iHeight*bmpSize.iWidth; + if (difference=0) + { + differenceOfClosest=difference; + indexOfClosest=jj; + } + } + if (indexOfClosest* CApaAppIconArray::IconSizesL() const + { + if(iDefaultIconsUsed) + { + return DefaultIcons().IconSizesL(); + } + else if(iIcons == NULL && iIconLoader == NULL) + { + return new(ELeave)CArrayFixFlat(1); + } + else if(iIcons == NULL) + { +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + // Arriving here means the the icons need loading but havn't been loaded yet. + // when we have lazy loading, this will be a trigger condition for loading them + ASSERT(iIcons); + return new(ELeave)CArrayFixFlat(1); + } + else + { +#else + // Arriving here means the the icons need loading but havn't been loaded yet. + TRAPD(err, iIconLoader->LoadAllIconsL()); + if (err != KErrNone) + { + return new(ELeave)CArrayFixFlat(1); + } + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + const TInt count=iIcons->Count(); + CArrayFixFlat* arrayOfSizes=new(ELeave)CArrayFixFlat(1); + CleanupStack::PushL(arrayOfSizes); + for(TInt ii=0;iiAppendL((*iIcons)[ii]->SizeInPixels()); + } + CleanupStack::Pop(arrayOfSizes); + return arrayOfSizes; +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + } + +TInt CApaAppIconArray::Count() const + { + if(iDefaultIconsUsed) + { + return DefaultIcons().Count(); + } + else if(iIcons == NULL && iIconLoader == NULL) + { + return 0; + } +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + else if(iIcons == NULL) + { + // Arriving here means the the icons need loading but havn't been loaded yet. + // when we have lazy loading, this will be a trigger condition for loading them + ASSERT(iIcons); + return 0; + } + else + { + return iIcons->Count(); + } +#else + else if(iIcons == NULL) + { + // Arriving here means the the icons need loading but havn't been loaded yet. + TRAPD(err, iIconLoader->LoadAllIconsL()); + if (err != KErrNone) + { + return 0; + } + } + return iIcons->Count(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + } + +TBool CApaAppIconArray::DefaultIconsUsed() const + { + return iDefaultIconsUsed; + } + +CApaMaskedBitmap* CApaAppIconArray::operator[](TInt aIndex) const + { + if(iDefaultIconsUsed) + { + return DefaultIcons()[aIndex]; + } + else if(iIcons == NULL && iIconLoader == NULL) + { + Panic(EPanicIndexOutOfRange); + return NULL; + } +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + else if(iIcons == NULL) + { + // Arriving here means the the icons need loading but havn't been loaded yet. + // when we have lazy loading, this will be a trigger condition for loading them + ASSERT(iIcons); + return NULL; + } + else + { + return (*iIcons)[aIndex]; + } +#else + else if(iIcons == NULL) + { + // Arriving here means the the icons need loading but havn't been loaded yet. + TRAPD(err, iIconLoader->LoadAllIconsL()); + if (err != KErrNone) + { + return NULL; + } + } + return (*iIcons)[aIndex]; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + } + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +TBool CApaAppIconArray::AreAppIconsLoaded() const + { + if (iDefaultIconsUsed) + { + return ETrue; + } + if (iNumOfIcons > 0 && !iIcons) + { + return EFalse; + } + return ETrue; + } + +TBool CApaAppIconArray::AreViewIconsLoaded() const + { + if (iNumOfIcons > 0 && !iIcons ) + { + return EFalse; + } + return ETrue; + } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +void CApaAppIconArray::GetDefaultIconsL() + { + ASSERT(!iDefaultIconsUsed); + iDefaultIconsProvider = CApaAppList::Self(); + ASSERT(iDefaultIconsProvider); + iDefaultIconsProvider->AcquireDefaultIconArrayL(); + iDefaultIconsUsed = ETrue; + delete iMbmFileName; + iMbmFileName = NULL; + if (iIcons) + { + iIcons->ResetAndDestroy(); + delete iIcons; + iIcons = NULL; + } + } + +const CApaAppIconArray& CApaAppIconArray::DefaultIcons() const + { + ASSERT(iDefaultIconsUsed && iDefaultIconsProvider); + return iDefaultIconsProvider->DefaultIconArray(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAPLST.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAPLST.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2157 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "apgaplst.h" +#include "apgstd.h" +#include "apfdef.h" +#include "..\apparc\trace.h" +#include "apgnotif.h" +#include "..\apfile\aprfndr.h" +#include +#include +#include +#include "apgpriv.h" +#include "apgair.h" +#include "apgicnfl.h" +#include "apprivate.h" +#include + + +// Delays in the pseudo idle object that builds the application list +// + +const TInt KIdleStartDelay=0; +const TInt KMaxOpaqueDataLength = 0x1000; // maximum length of opaque data that can be passed between client and apparc server via a TApaAppServiceInfo object - this can be increased in future if needed +const TInt KBufferExpansionGranularity = 0x100; +const TInt KNumberOfIconsInDefaultMbm = 3; +const TInt KAppListToFileStartDelay = 60000000; + + +// +// Class CApaLangChangeMonitor +// + +NONSHARABLE_CLASS(CApaAppList::CApaLangChangeMonitor) : public CActive + { + /** + Utility class used to monitor locale/language change event. + @internalComponent + */ + public: + static CApaLangChangeMonitor* NewL(CApaAppList& aAppList); + ~CApaLangChangeMonitor(); + void Start(); + + private: + CApaLangChangeMonitor(CApaAppList& aAppList); + void ConstructL(); + + private: //from CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + + private: + RChangeNotifier iLangNotifier; + CApaAppList& iAppList; + TLanguage iPrevLanguage; + }; + + + +// +// Local functions +// + +void CleanupServiceArray(TAny* aServiceArray) + { + __ASSERT_DEBUG(aServiceArray, Panic(EPanicNullPointer)); + CArrayFixFlat* serviceArray = static_cast*>(aServiceArray); + TInt serviceCount = serviceArray->Count(); + if (serviceCount > 0) + { + for (TInt i = serviceCount - 1; i >= 0; i--) + { + (*serviceArray)[i].Release(); + } + } + delete serviceArray; + serviceArray = 0; + } + + +// +// Class CApaAppViewData +// + +CApaAppViewData::~CApaAppViewData() + { + delete iIcons; + delete iCaption; + delete iIconFileName; + } + +CApaAppViewData::CApaAppViewData() + : iNonMbmIconFile(EFalse) + { + } + +void CApaAppViewData::ConstructL() + { + iIcons=CApaAppIconArray::NewL(); + } + +CApaAppViewData* CApaAppViewData::NewLC() + { + CApaAppViewData* self=new(ELeave) CApaAppViewData(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +void CApaAppViewData::SetUid(TUid aUid) + { + iUid=aUid; + } + +void CApaAppViewData::SetScreenMode(TInt aScreenMode) + { + iScreenMode=aScreenMode; + } + +EXPORT_C TInt CApaAppViewData::ScreenMode() const + { + return iScreenMode; + } + +void CApaAppViewData::SetCaptionL(const TDesC& aCaption) + { + HBufC* newCaption=aCaption.AllocL(); + delete(iCaption); // after the AllocL succeeds + iCaption=newCaption; + } + +void CApaAppViewData::SetIconArray(CApaAppIconArray* aIcons) + { + delete iIcons; + iIcons = aIcons; + } + +void CApaAppViewData::SetIconFileNameL(const TDesC& aFileName) + { + HBufC* fileName = aFileName.AllocL(); + delete iIconFileName; // after the AllocL succeeds + iIconFileName = fileName; + } + +void CApaAppViewData::SetNonMbmIconFile(TBool aNonMbmIconFile) + { + iNonMbmIconFile = aNonMbmIconFile; + } + +EXPORT_C TUid CApaAppViewData::Uid() const + { + return iUid; + } + +EXPORT_C CApaMaskedBitmap* CApaAppViewData::Icon(const TSize& aSize) const + { + __ASSERT_ALWAYS(iIcons, Panic(EPanicNullPointer)); + return iIcons->IconBySize(aSize); + } + +EXPORT_C CArrayFixFlat* CApaAppViewData::IconSizesL() const + { + __ASSERT_ALWAYS(iIcons, Panic(EPanicNullPointer)); + return iIcons->IconSizesL(); + } + +EXPORT_C TPtrC CApaAppViewData::IconFileName() const + { + if (iIconFileName) + { + return *iIconFileName; + } + else + { + return TPtrC(KNullDesC); + } + } + +EXPORT_C TBool CApaAppViewData::NonMbmIconFile() const + { + return iNonMbmIconFile; + } + + +// +// class CApaAppEntry +// + +CApaAppEntry* CApaAppEntry::NewL(const TApaAppEntry& aAppEntry) + { // static + CApaAppEntry* self=new(ELeave) CApaAppEntry(aAppEntry.iUidType); + CleanupStack::PushL(self); + self->ConstructL(aAppEntry.iFullName); + CleanupStack::Pop(self); + return self; + } + +CApaAppEntry::~CApaAppEntry() + { + delete iFullName; + } + +void CApaAppEntry::Get(TApaAppEntry& aAppEntry) const + { + aAppEntry.iFullName=*iFullName; + aAppEntry.iUidType=iUidType; + } + +CApaAppEntry::CApaAppEntry(const TUidType& aUidType) + : iUidType(aUidType) + { + } + +void CApaAppEntry::ConstructL(const TDesC& aFileName) + { + iFullName=aFileName.AllocL(); + } + + +// +// class TApaAppServiceInfo +// + +TApaAppServiceInfo::TApaAppServiceInfo() + : iUid(KNullUid), + iDataTypes(0), + iOpaqueData(NULL) + { + } + +TApaAppServiceInfo::TApaAppServiceInfo(TUid aUid, + CArrayFixFlat* aDataTypes, HBufC8* aOpaqueData) + : iUid(aUid), + iDataTypes(aDataTypes), + iOpaqueData(aOpaqueData) + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + __ASSERT_DEBUG(iOpaqueData, Panic(EPanicNullPointer)); + } + +void TApaAppServiceInfo::ExternalizeL(RWriteStream& aStream) const + { + __ASSERT_DEBUG(iDataTypes, User::Invariant()); + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + __ASSERT_DEBUG(iOpaqueData, Panic(EPanicNullPointer)); + aStream << iUid; + aStream << *iDataTypes; //lint !e613 Possible use of null pointer - Asserted above + aStream << *iOpaqueData;//lint !e613 Possible use of null pointer - Asserted above + } + +void TApaAppServiceInfo::InternalizeL(RReadStream& aStream) + { + aStream >> iUid; + iDataTypes = new(ELeave) CArrayFixFlat(1); + aStream >> *iDataTypes; + iOpaqueData = HBufC8::NewL(aStream, KMaxOpaqueDataLength); + } + +void TApaAppServiceInfo::Release() + { + if (iDataTypes) + { + iDataTypes->Reset(); + delete iDataTypes; + iDataTypes = NULL; + } + if (iOpaqueData) + { + delete iOpaqueData; + iOpaqueData = NULL; + } + } + +CArrayFixFlat& TApaAppServiceInfo::DataTypes() + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + return *iDataTypes; //lint !e613 Possible use of null pointer - Asserted above + } + +/** Returns the service UID. + +Note that some APIs may store a UID other than a service UID +in a TApaAppServiceInfo object. Such APIs clearly state what +the UID represents. + +@return the service UID. +*/ +EXPORT_C TUid TApaAppServiceInfo::Uid() const + { + return iUid; + } + +EXPORT_C const CArrayFixFlat& TApaAppServiceInfo::DataTypes() const + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + return *iDataTypes; //lint !e613 Possible use of null pointer - Asserted above + } + +/** Returns the service implementation's opaque data. + +For each service UID registered by an application, the associated +opaque data indicates how the service is implemented by that application. + +The meaning of the opaque data is not known to the framework, it will vary +according to the service. + +For some services the opaque data may be a name intended for user display, +for others it may be structured data that the service's client-side code can interpret. + +@return the service implementation's opaque data. +*/ +EXPORT_C const TDesC8& TApaAppServiceInfo::OpaqueData() const + { + if (iOpaqueData) + { + return *iOpaqueData; + } + return KNullDesC8; + } + +// +// class CApaAppServiceInfoArray +// + +CApaAppServiceInfoArray::CApaAppServiceInfoArray() + { + } + +// +// class CApaAppServiceInfoArrayWrapper +// + +CApaAppServiceInfoArrayWrapper* CApaAppServiceInfoArrayWrapper::NewL(CArrayFix* aServiceInfoArray) + { + CApaAppServiceInfoArrayWrapper* self = new CApaAppServiceInfoArrayWrapper(aServiceInfoArray); + if (!self) + { + CleanupServiceArray(aServiceInfoArray); + User::LeaveNoMemory(); + } + return self; + } + +CApaAppServiceInfoArrayWrapper::CApaAppServiceInfoArrayWrapper(CArrayFix* aServiceInfoArray) + : iServiceInfoArray(aServiceInfoArray) + { + } + +CApaAppServiceInfoArrayWrapper::~CApaAppServiceInfoArrayWrapper() + { + CleanupServiceArray(iServiceInfoArray); + iServiceInfoArray = NULL; + } + +TArray CApaAppServiceInfoArrayWrapper::Array() + { + __ASSERT_ALWAYS(iServiceInfoArray, Panic(EPanicNullPointer)); + return iServiceInfoArray->Array(); + } + + +// +// Class CApaAppData +// + +EXPORT_C CApaAppData* CApaAppData::NewL(const TApaAppEntry& aAppEntry, RFs& aFs, const TDesC& aDefaultAppIconFileName) + { + CApaAppData* self=new(ELeave) CApaAppData(aFs); + CleanupStack::PushL(self); + self->ConstructL(aAppEntry, aDefaultAppIconFileName); + CleanupStack::Pop(); // self + return self; + } + +CApaAppData::CApaAppData(RFs& aFs) + :iCaption(NULL), iShortCaption(NULL), + iIsPresent(CApaAppData::EIsPresent), iFs(aFs), + iNonMbmIconFile(EFalse), + iApplicationLanguage(ELangNone), iIndexOfFirstOpenService(-1), + iNonNativeApplicationType(TUid::Null()) + { + } + +void CApaAppData::ConstructL(const TApaAppEntry& aAppEntry, const TDesC& aDefaultAppIconFileName) + { + iUidType = aAppEntry.iUidType; // if the 2nd UID is KUidAppRegistrationFile, iUidType will be updated in StoreApplicationInformation to reflect the TUidType for the application binary + if (ApaUtils::HandleAsRegistrationFile(aAppEntry.iUidType)) + { + iRegistrationFile = aAppEntry.iFullName.AllocL(); + } + else + { + iFullName = aAppEntry.iFullName.AllocL(); + } + + iCapabilityBuf.FillZ(iCapabilityBuf.MaxLength()); + iIcons = CApaAppIconArray::NewL(); + iViewDataArray=new(ELeave) CArrayPtrFlat(1); + iOwnedFileArray=new(ELeave) CDesCArraySeg(1); + User::LeaveIfError(StoreApplicationInformation(aDefaultAppIconFileName)); + } + + + +// Return a standard error code +// The value returned only reflect the caption status +// If there is errors setting up captions the old values are retained +// All other errors are silently ignored +// General notes: +// 1. This method is deliberately very similar to the old CApaAppData::GetAifData +// in order to maintain behavioural compatibility for V1 apps +// 2. Be very careful in this method, because it can be called on a newly constructed object, +// or on an existing object, so don't assume member data pointers will be NULL +TInt CApaAppData::StoreApplicationInformation(const TDesC& aDefaultAppIconFileName) + { + HBufC* caption = NULL; + HBufC* shortCaption = NULL; + + iTimeStamp = TTime(0); // cannot init in constructor because this function can be called on an existing CApaAppData object + + CApaAppInfoReader* appInfoReader = NULL; + TBool readSuccessful = EFalse; + TBool isNonNativeApp = EFalse; + if (iRegistrationFile != NULL) + { + if (TParsePtrC(*iRegistrationFile).Path().CompareF(KLitPathForNonNativeResourceAndIconFiles)==0) + { + isNonNativeApp = ETrue; + } + __ASSERT_ALWAYS(&aDefaultAppIconFileName,Panic(EPanicNullDefaultAppIconFileName)); + + TRAPD(err,appInfoReader = CApaAppInfoReaderV2::NewL(iFs, *iRegistrationFile, iUidType[2], aDefaultAppIconFileName)); + if(err != KErrNone) + { + appInfoReader = NULL; + } + + if (appInfoReader == NULL) + { + if (iFullName == NULL) + { + // assume that if iFullName is NULL, this method has been called as part + // of constructing a new app data object. The CApaAppInfoReader derived object + // could not be created, therefore we have no way to determine the full filename + // of the app binary, so give up + return KErrNoMemory; + } + } + else + { + readSuccessful = appInfoReader->Read(); + HBufC* appBinaryFullName=appInfoReader->AppBinaryFullName(); + if (appBinaryFullName) + { + delete iFullName; + iFullName = appBinaryFullName; + } + if (iFullName == NULL) + { + delete appInfoReader; + return KErrNoMemory; + } + // if this object has just been constructed, iUidType is currently the TUidType + // of the registration file, it should be the TUidType of the app binary file + TUidType uidType = appInfoReader->AppBinaryUidType(); + if (uidType[1].iUid != KNullUid.iUid) + { + iUidType = uidType; + } + } + } + + if (appInfoReader != NULL) + { + // must get captions and icons regardless of value of readSuccessful, + // because the V1 reader might have read captions + // and default icons from a caption file/default AIF, even if other info wasn't read + // from an application specific AIF file (!readSuccessful) + // this is done to maintain behavioural compatibility with V1 + caption = appInfoReader->Caption(); + shortCaption = appInfoReader->ShortCaption(); + + CApaAppIconArray* icons = appInfoReader->Icons(); + if(icons) + { + delete iIcons; + iIcons = icons; + } + else + { + TRAPD(err,icons = CApaAppIconArray::NewL()); + if(err == KErrNone) + { + delete iIcons; + iIcons = icons; + } + } + + iTimeStamp = appInfoReader->TimeStamp(); + delete iLocalisableResourceFileName; + iLocalisableResourceFileName = appInfoReader->LocalisableResourceFileName(); + iLocalisableResourceFileTimeStamp = appInfoReader->LocalisableResourceFileTimeStamp(); + + if (isNonNativeApp) + { + // In the case of a non-native app, the resource file has been prefixed with a + // TCheckedUid, the second of whose UIDs is the non-native application type uid. + TEntry entry; + __ASSERT_ALWAYS(iRegistrationFile, Panic(EPanicNullPointer)); + const TInt error=iFs.Entry(*iRegistrationFile, entry); + if (error!=KErrNone) + { + delete appInfoReader; + return error; + } + __ASSERT_DEBUG(entry.iType[0].iUid==KUidPrefixedNonNativeRegistrationResourceFile, Panic(EPanicUnexpectedUid)); + iNonNativeApplicationType=entry.iType[1]; + } + + delete iOpaqueData; + iOpaqueData = appInfoReader->OpaqueData(); + + if (readSuccessful) + { + appInfoReader->Capability(iCapabilityBuf); + + iDefaultScreenNumber = appInfoReader->DefaultScreenNumber(); + + delete iIconFileName; + iIconFileName = appInfoReader->IconFileName(); + iNonMbmIconFile = appInfoReader->NonMbmIconFile(); + iApplicationLanguage = appInfoReader->AppLanguage(); + + // views + iViewDataArray->ResetAndDestroy(); + CArrayPtrFlat* viewDataArray = appInfoReader->Views(); + if (viewDataArray) + { + delete iViewDataArray; + iViewDataArray = viewDataArray; + } + + // owned files + iOwnedFileArray->Reset(); + CDesCArray* ownedFileArray = appInfoReader->OwnedFiles(); + if (ownedFileArray) + { + delete iOwnedFileArray; + iOwnedFileArray = ownedFileArray; + } + + UpdateServiceArray(appInfoReader->ServiceArray(iIndexOfFirstOpenService)); + } + delete appInfoReader; + } + + if (!caption) + { + TParsePtrC parse (*iFullName); + caption = parse.Name().Alloc(); + } + + // Put the captions into place + if (caption) + { + if (!shortCaption) + { + shortCaption = caption->Alloc(); + if (!shortCaption) + { + delete caption; + caption = NULL; + } + } + } + if (caption) + { + delete iCaption; + iCaption = caption; + delete iShortCaption; + iShortCaption = shortCaption; + } + + return caption ? KErrNone : KErrNoMemory; + } + +EXPORT_C CApaAppData::~CApaAppData() +// Just delete components, NOT iNext (next CApaAppData in the list). + { + delete iSuccessor; + delete iCaption; + delete iShortCaption; + delete iFullName; + delete iIcons; + + if(iViewDataArray) + { + iViewDataArray->ResetAndDestroy(); + delete iViewDataArray; + } + delete iOwnedFileArray; + delete iIconFileName; + delete iLocalisableResourceFileName; + if (iServiceArray) + { + CleanupServiceArray(iServiceArray); + iServiceArray = NULL; + } + delete iOpaqueData; + delete iRegistrationFile; + iNext = NULL; + } + +void CApaAppData::UpdateServiceArray(CArrayFixFlat* aNewServiceArray) + { + // clear out any existing service info + if (iServiceArray) + { + CleanupServiceArray(iServiceArray); + iServiceArray = NULL; + } + // store new service array + iServiceArray = aNewServiceArray; + } + +TDataTypePriority CApaAppData::DataType(const TDataType& aDataType, const CArrayFixFlat& aDataTypeArray) const + { + TInt count=aDataTypeArray.Count(); + for (TInt ii=0;iiIconBySize(aSize); + } + +/** + * Returns a pointer to the small, medium or large application icon for aIconIndex equal to 0, 1 or 2 respectively. + * Panics if aIconIndex is not one of these three values. + * + * This method is superseded by an overload which returns the icon by finding the closest match to a specified size. + * + * @deprecated + */ +EXPORT_C CApaMaskedBitmap* CApaAppData::Icon(TInt aIconIndex) const + { + __ASSERT_DEBUG(aIconIndex>-1 && aIconIndex<3, Panic(EDPanicBadIconSize)); //only support old behaviour + TSize sizeExpected; + switch(aIconIndex) + { + case KApaIconIndexSmall: + sizeExpected=TSize(24,24); + break; + case KApaIconIndexMedium: + sizeExpected=TSize(32,32); + break; + case KApaIconIndexLarge: + sizeExpected=TSize(48,48); + break; + default: + break; + } + return Icon(sizeExpected); + } + +EXPORT_C CArrayFixFlat* CApaAppData::IconSizesL() const +/** Gets the sizes of icons available for the application. + +@return A pointer to an array of the icon sizes. The caller takes ownership. */ + { + __ASSERT_ALWAYS(iIcons, Panic(EPanicNullPointer));; + return iIcons->IconSizesL(); + } + +EXPORT_C TApaAppEntry CApaAppData::AppEntry() const +/** Constructs an application entry based on this object. + +@return The application entry. */ + { + return TApaAppEntry(iUidType,*iFullName); + } + + +EXPORT_C void CApaAppData::Capability(TDes8& aCapabilityBuf)const +/** Gets the application's capabilities. + +@param aCapabilityBuf On return, contains the application's capabilities, +specified as a TApaAppCapabilityBuf object. */ + { + TApaAppCapability::CopyCapability(aCapabilityBuf,iCapabilityBuf); + } + +/** + * Returns a pointer to the array of view data objects current for this application. Does not imply transfer of ownership. + * + * @since App-Framework_6.1 + */ +EXPORT_C CArrayPtrFlat* CApaAppData::Views() const + { + return iViewDataArray; + } + +/** + * Returns a pointer to the array of files for which this application claims ownership. Does not imply transfer of ownership. + * + * @since App-Framework_6.1 + */ +EXPORT_C CDesCArray* CApaAppData::OwnedFiles() const + { + return iOwnedFileArray; + } + +TBool CApaAppData::Update(const TDesC& aDefaultAppIconFileName) +// returns true if changes were made to the cached data + { + __APA_PROFILE_START(17); + TBool changed=EFalse; + + // Get app info file entry + TEntry entry; + TInt ret; + if (iRegistrationFile != NULL) + { + ret = iFs.Entry(*iRegistrationFile, entry); + if (ret==KErrNone && entry.iModified!=iTimeStamp) + { + // assume registration file may have changed + changed = ETrue; + } + else + { + if (iLocalisableResourceFileName) + { + // see if localisable resource information might have changed + TParse parse; + ret = parse.SetNoWild(KAppResourceFileExtension, iLocalisableResourceFileName, NULL); + if (ret == KErrNone) + { + TFileName resourceFileName(parse.FullName()); + BaflUtils::NearestLanguageFile(iFs, resourceFileName); + if (resourceFileName.CompareF(*iLocalisableResourceFileName)!=0) + { + changed = ETrue; + } + else + { + ret = iFs.Entry(*iLocalisableResourceFileName, entry); + if ((ret==KErrNotFound && iLocalisableResourceFileTimeStamp!=TTime(0)) || + (ret==KErrNone && entry.iModified!=iLocalisableResourceFileTimeStamp)) + { + changed = ETrue; + } + } + } + } + } + } + if (changed) + { + // Ignore result, nothing we can do in case failure + // and the old values should be preserved + const TInt ignore = StoreApplicationInformation(aDefaultAppIconFileName); + } //lint !e529 Suppress symbol 'ignore' not subsequently referenced + + __APA_PROFILE_END(17); + return changed; + } + +EXPORT_C TDataTypePriority CApaAppData::DataType(const TDataType& aDataType) const +// returns the priority of the data type +/** If the application supports the specified data type, the function returns +the priority with which it should be selected for handling it. + +If the application does not support the specified data type, +KDataTypePriorityNotSupported is returned. + +Note that the function supports wildcard matching, using "*" and "?". In the case +of a wildcard match, the priority value returned is reduced by 1, so that in this +case, the application could never have the maximum priority +(KDataTypePriorityUserSpecified). + +@param aDataType The data type of interest. +@return The priority with which the application should be selected for handling +the specified data type, or KDataTypePriorityNotSupported if the data type is +not supported. */ + { + if (iIndexOfFirstOpenService >= 0) + { + __ASSERT_ALWAYS(iServiceArray, Panic(EPanicNullPointer)); + const CArrayFixFlat& dataTypeArray = + (*iServiceArray)[iIndexOfFirstOpenService].DataTypes(); + return DataType(aDataType, dataTypeArray); + } + return KDataTypePriorityNotSupported; + } + + +EXPORT_C TBool CApaAppData::IsPending() const + { + return (iIsPresent==CApaAppData::EPresentPendingUpdate + || iIsPresent==CApaAppData::ENotPresentPendingUpdate); + } + +EXPORT_C TBool CApaAppData::CanUseScreenMode(TInt aScreenMode) +/** Tests whether the specified screen mode is valid for any of +this application's views. If the app has no views, the function +assumes that only the default screen mode (at screen mode index +zero) is allowed. This function is used by CApaAppList to create +a list of valid applications. + +@param aScreenMode The index of the screen mode. +@return True if screen mode is valid, otherwise false. */ + { + const TInt count=iViewDataArray->Count(); + // If there are no views, assume only the default screen mode is allowed + TBool ret=(count==0 && aScreenMode==0); + for(TInt ii=0;iiScreenMode()==aScreenMode) + { + ret=ETrue; + break; + } + } + return ret; + } + +EXPORT_C void CApaAppData::GetIconInfo(TInt& aIconCount, TInt& aDefaultIconsUsed) const +/** Gets icon information for the app + +@param aIconCount On return, this contains the number of app icons +@param aDefaultIconsUsed On return, this indicates whether the default icons have been used +*/ + { + __ASSERT_ALWAYS(iIcons, Panic(EPanicNullPointer));; + aIconCount = iIcons->Count(); + aDefaultIconsUsed = iIcons->DefaultIconsUsed(); + } + +/** Gets the default screen number used by the application. + +A device may have more than once screen. This function +returns the number associated with the screen which will +be the default screen used by the application. + +@return The default screen number +*/ +EXPORT_C TUint CApaAppData::DefaultScreenNumber() const + { + return iDefaultScreenNumber; + } + +/** Returns true if app info was provided by a registration file + +@return true if app info was provided by a registration file +*/ +EXPORT_C TBool CApaAppData::RegistrationFileUsed() const + { + return iRegistrationFile != NULL; + } + +/** Returns the full filename of the registration resource file + +@return The full path and filename of the registration resource file. +@internalTechnology +*/ +EXPORT_C TPtrC CApaAppData::RegistrationFileName() const + { + if (iRegistrationFile) + { + return *iRegistrationFile; + } + else + { + return TPtrC(KNullDesC); + } + } + + +/** Returns the full filename of the localisable resource file + +@return The full path and filename of the localisable resource file. +@internalTechnology +*/ +EXPORT_C TPtrC CApaAppData::LocalisableResourceFileName() const + { + if (iLocalisableResourceFileName) + { + return *iLocalisableResourceFileName; + } + else + { + return TPtrC(KNullDesC); + } + } + + +/** Returns the non-native application opaque data + +@return The non-native application opaque data. +@internalComponent +*/ +EXPORT_C TPtrC8 CApaAppData::OpaqueData() const + { + if (iOpaqueData) + { + return *iOpaqueData; + } + else + { + return TPtrC8(KNullDesC8); + } + } + +EXPORT_C TUid CApaAppData::NonNativeApplicationType() const +/** @internalComponent */ + { + return iNonNativeApplicationType; + } + +/** Returns the full filename of the file containing application icons + +@return The full path and filename of the icon file. +*/ +EXPORT_C TPtrC CApaAppData::IconFileName() const + { + if (iIconFileName) + { + return *iIconFileName; + } + else + { + return TPtrC(KNullDesC); + } + } + +/** Returns true if the application provides a non-MBM icon filename. + +If this function returns false, this does not necessarily mean +an MBM icon filename is provided. + +@return true if the application provides a non-MBM icon filename. +*/ +EXPORT_C TBool CApaAppData::NonMbmIconFile() const + { + return iNonMbmIconFile; + } + + +/** Determines the current language the application is using to display its +user interface. +@return The current language. +*/ +EXPORT_C TLanguage CApaAppData::ApplicationLanguage() const + { + return iApplicationLanguage; + } + +/** Returns true if the application implements the specified service. +@param aServiceUid The service UID. +@return true if the application implements the specified service. +@internalComponent +*/ +EXPORT_C TBool CApaAppData::ImplementsService(TUid aServiceUid) const + { + if (iServiceArray) + { + TInt count = iServiceArray->Count(); + for (TInt i = count-1; i >= 0; i--) + { + if ((*iServiceArray)[i].Uid() == aServiceUid) + { + return ETrue; + } + } + } + return EFalse; + } + +/** Checks if the application implements the specified service and if the +service explicitly supports the datatype. Explicitly means that the datatype is +listed in the service's list of datatype in the registration file and is +not the general datatype associated with the application (aka the Open service). +@param aServiceUid The service UID. +@param aDataType The datattype +@return The priority. KDataTypePriorityNotSupported if the app doesn't support +this service with this datatype. +@internalComponent +*/ +TInt CApaAppData::ImplementsServiceWithDataType(TUid aServiceUid, const TDataType& aDataType) const + { + TInt result = KDataTypePriorityNotSupported; + if (iServiceArray) + { + TInt count = iServiceArray->Count(); + for (TInt i = count-1; i >= 0; i--) + { + // There can be more than one instance of a given service so we iterate + // through the whole service list even if we have already found a suitable + // service. + if ((*iServiceArray)[i].Uid() == aServiceUid) + { + const CArrayFixFlat& datatypes = + (*iServiceArray)[i].DataTypes(); + TInt priority = DataType(aDataType, datatypes); + if (priority > result) + { + result = priority; + } + } + } + } + return result; + } + +EXPORT_C void CApaAppData::SetShortCaptionL(const TDesC& aShortCaption) + { + __ASSERT_ALWAYS(iShortCaption, Panic(EPanicNullPointer)); + if(iShortCaption->Compare(aShortCaption) != 0) + { + HBufC* newShortCaption=aShortCaption.AllocL(); + delete iShortCaption; // after the AllocL succeeds + iShortCaption = newShortCaption; + } + } + +// +// Class CApaAppList +// + +EXPORT_C CApaAppList* CApaAppList::NewL(RFs& aFs,CApaAppRegFinder* aAppRegFinder,TBool aLoadMbmIconsOnDemand, TInt aIdlePeriodicDelay) + { + CApaAppList* self=new CApaAppList(aFs, aAppRegFinder,aLoadMbmIconsOnDemand, aIdlePeriodicDelay); + if (!self) + { + delete aAppRegFinder; + User::LeaveNoMemory(); + } + else + { + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + } + return self; + } + +CApaAppList::CApaAppList(RFs& aFs, CApaAppRegFinder* aAppRegFinder,TBool aLoadMbmIconsOnDemand, TInt aIdlePeriodicDelay) + :iFs(aFs), + iFlags(0), + iAppRegFinder(aAppRegFinder), + iIdlePeriodicDelay(aIdlePeriodicDelay), + iLoadMbmIconsOnDemand(aLoadMbmIconsOnDemand) + { + } + +void CApaAppList::ConstructL() + { + User::LeaveIfError(iFsShareProtected.Connect()); + User::LeaveIfError(iFsShareProtected.ShareProtected()); + User::LeaveIfError(Dll::SetTls(this)); + + //Start language change monitor. + iAppLangMonitor = CApaLangChangeMonitor::NewL(*this); + } + +EXPORT_C CApaAppList::~CApaAppList() +/** Frees all resources prior to destruction, including the application data list. */ + { + iValidFirstAppData = NULL; + iFlags&=~EFirstScanComplete; + CApaAppData* next = NULL; + for (CApaAppData* appData=iAppData; appData; appData = next) + { + next = appData->iNext; + delete appData; + } + iAppData = NULL; + iObserver = NULL; + + iFsShareProtected.Close(); + + delete iDefaultIconArray; + delete iDefaultAppIcon; + delete iAppRegFinder; + delete iAppIdler; + } + +EXPORT_C void CApaAppList::StartIdleUpdateL() +/** Updates the list asynchronously, using an idle time active object, +and no observer. When the update is finished, the resulting app +list is stored. */ + { + + // find the default icons (.mbm file) for applications, wrt current locale + TFileName* tempFileName = new(ELeave) TFileName; + CleanupStack::PushL(tempFileName); + tempFileName->Append(KDefaultAppIconMbm); + BaflUtils::NearestLanguageFile(iFs, *tempFileName); + delete iDefaultAppIcon; + iDefaultAppIcon = NULL; + iDefaultAppIcon = HBufC::NewL(tempFileName->Size()); + + TPtr iconptr = iDefaultAppIcon->Des(); + iconptr.Append(*tempFileName); + CleanupStack::PopAndDestroy(tempFileName); + + // DEF076594 - if changing locale, need to update the default icons here + // If updating the default icons array fails, the array is left in the state + // it was in before the call. + if(iDefaultIconArray) + { + TRAP_IGNORE(UpdateDefaultIconsL()); + } + + // start to scan. + if (iAppIdler) + { + delete iAppIdler; + iAppIdler=NULL; + } + + // DEF072701 + // When performing the update scan let the idle object have lower priority. + if (IsFirstScanComplete()) + { + iAppIdler=CPeriodic::NewL(CActive::EPriorityLow); + } + else + { + iAppIdler=CPeriodic::NewL(CActive::EPriorityStandard); + } + SetPending(iAppData); + iCurrentApp=TApaAppEntry(); + iScanStage=EFirstStageScan; + __ASSERT_ALWAYS(iAppRegFinder, Panic(EPanicNullPointer)); + iAppRegFinder->FindAllAppsL(); + + // DEF072701 + // If this is the first scan i.e the boot scan then it may take some time. Thus + // the periodic delay value should be used so that this process will stop periodically + // to allow time for other processes. + // If this is just a re-scan it should take much less time. Therefore it should just + // be completed in one go rather than periodically delayed. Thus the delay value + // should be set to 0. + iAppIdler->Start(KIdleStartDelay, IsFirstScanComplete()? 0 : iIdlePeriodicDelay, TCallBack(IdleUpdateCallbackL, this)); + } + +EXPORT_C void CApaAppList::StartIdleUpdateL(MApaAppListObserver* aObserver) +/** Updates the list asynchronously, using an idle time active object +and an observer. When the update is finished, the resulting app list +is stored and the observer is notified with an MApaAppListServObserver::EAppListChanged +message, if the list changed. +@param aObserver Observer to be notified when the update has finished. */ + { + iObserver=aObserver; + if (iAppIdler==NULL) + { + // if iAppIdler exists then we're already in the middle of an update and + // may have changed iUpdateCounter without yet reporting the changes + iOldUpdateCounter=iUpdateCounter; + } + + StartIdleUpdateL(); + } + +// Stop scanning applications if and uninstallation has started +EXPORT_C void CApaAppList::StopScan() + { + if (iAppIdler) + { + delete iAppIdler; + iAppIdler=NULL; + } + UndoSetPending(iAppData); + } + +// Allow scanning when uninstallation is complete +EXPORT_C void CApaAppList::RestartScanL() + { + TRAP_IGNORE(PurgeL()); + StartIdleUpdateL(); + } + +EXPORT_C void CApaAppList::InitListL(MApaAppListObserver* aObserver) +/** Starts updating the list asynchronously, by calling StartIdleUpdateL(). + +@param aObserver Observer to be notified when the update has finished. */ + { + StartIdleUpdateL(aObserver); + } + +TInt CApaAppList::IdleUpdateCallbackL(TAny* aObject) + { + CApaAppList* self=reinterpret_cast(aObject); + const TBool moreToCome=self->IdleUpdateL(); + if (moreToCome==EFalse) + { + if(self->iScanStage==EFirstStageScan) + { + self->iScanStage=EScanFinished; + self->StopIdlerL(); + } + } + return moreToCome; + } + +void CApaAppList::StopIdlerL() + { + + delete iAppIdler; + iAppIdler=NULL; + + // now that the scan is finished, iDefaultAppIcon is deleted + delete iDefaultAppIcon; + iDefaultAppIcon=NULL; + + if (iObserver) + { + if (iOldUpdateCounter!=iUpdateCounter) + { + //NotifyUpdate will notify clients for both list update and scan complete. + iObserver->NotifyUpdate(MApaAppListServObserver::EAppListChanged); + } + else + { + //NotifyScanComplete will notify clients for scan complete. + iObserver->NotifyScanComplete(); + } + + iObserver=NULL; + } + } + +TInt CApaAppList::IdleUpdateL() +// returns ETrue if there is more scanning to be done. + { + TBool more=EFalse; + __ASSERT_ALWAYS(iAppRegFinder, Panic(EPanicNullPointer)); + TRAPD(err,more=iAppRegFinder->NextL(iCurrentApp, iForcedRegistrations)); + if (err!=KErrNone) + return more; + TBool hasChanged=EFalse; + if (more) + { + TRAPD(err,UpdateNextAppL(iCurrentApp,hasChanged)); + if (err!=KErrNone) + { + SetNotFound(iAppData,hasChanged); + more=EFalse; // abandon ship + } + } + else + { + SetNotFound(iAppData,hasChanged); + PurgeL(); + } + // + if (hasChanged) + iUpdateCounter++; + return more; + } + +EXPORT_C TBool CApaAppList::IsIdleUpdateComplete() const +/** Tests whether an asynchronous update of the list is currently in progress. + +@return True if no asynchronous update of the list is currently in progress, +otherwise false. */ + { + return iAppIdler == NULL; + } + +void CApaAppList::SetPending(CApaAppData* aAppData) + // set all apps to pending update - we'll find them again as we scan + { + for (; aAppData; aAppData = aAppData->iNext) + { + if (aAppData->iIsPresent==CApaAppData::ENotPresent + || aAppData->iIsPresent==CApaAppData::ENotPresentPendingUpdate) + { + aAppData->iIsPresent = CApaAppData::ENotPresentPendingUpdate; + } + else + { + aAppData->iIsPresent = CApaAppData::EPresentPendingUpdate; + } + } + } + +void CApaAppList::UndoSetPending(CApaAppData* aAppData) + // Reset all apps to pevious pending state so they don't get purged + { + for (; aAppData; aAppData = aAppData->iNext) + { + if (aAppData->iIsPresent == CApaAppData::EPresentPendingUpdate) + { + aAppData->iIsPresent = CApaAppData::EIsPresent; + } + } + } + +void CApaAppList::SetNotFound(CApaAppData* aAppData, TBool& aHasChanged) + // mark any unfound apps not present + { + while (aAppData) + { + if (aAppData->IsPending()) + { + aAppData->iIsPresent = CApaAppData::ENotPresent; + aHasChanged = ETrue; + } + aAppData = aAppData->iNext; + } + } + +void CApaAppList::AddToList( CApaAppData* aAppData ) +{ + __ASSERT_DEBUG(aAppData, Panic(EPanicNullPointer)); + aAppData->iNext=iAppData; + iAppData=aAppData; +} + +void CApaAppList::UpdateNextAppL(const TApaAppEntry& aAppEntry,TBool& aHasChanged) + { + CApaAppData* appData=AppDataByUid(aAppEntry.iUidType[2]); + if (appData==NULL) + {// not in list, so add it at the start + TRAPD(err,appData=CApaAppData::NewL(aAppEntry, iFs, *iDefaultAppIcon)); + if (err==KErrNone) + { + AddToList( appData ); + aHasChanged=ETrue; + } + } + else if (appData->IsPending()) + { // not found yet during current scan - we may need to override this one + + // On a system which scans for registration .RSC files (V2 apps) first, followed by + // .APP files (V1 apps), it's valid for a V1 app to override a V2 app (if the V2 app + // has just been removed). If this is the case, assume it's ok to compare the V1 .APP filename, + // with the V2 .RSC filename as their filenames will never match (which is what we want in this case). + TPtrC currentFileName; + if (appData->RegistrationFileUsed()) + { + currentFileName.Set(*appData->iRegistrationFile); + } + else + { + currentFileName.Set(*appData->iFullName); + } + if (aAppEntry.iFullName.CompareF(currentFileName)!=0) + { + delete appData->iSuccessor; + appData->iSuccessor = NULL; + appData->iSuccessor = CApaAppEntry::NewL(aAppEntry); + + + appData->iIsPresent = CApaAppData::ESuperseded; + aHasChanged=ETrue; + } + else + { + if (appData->Update(*iDefaultAppIcon) + || appData->iIsPresent==CApaAppData::ENotPresentPendingUpdate) + { + aHasChanged=ETrue; + } + appData->iIsPresent = CApaAppData::EIsPresent; + } + } + + } + +/** +@internalComponent +*/ +EXPORT_C CApaAppData* CApaAppList::FindAndAddSpecificAppL(CApaAppRegFinder* aFinder, TUid aAppUid) + { +//Scans and adds the specified application to the app list if found + __ASSERT_DEBUG(aFinder, Panic(EPanicNullPointer)); + TBool found = EFalse; + TApaAppEntry appEntry; + aFinder->FindAllAppsL(); + while (aFinder->NextL(appEntry, iForcedRegistrations)) + { + if (appEntry.iUidType[2] == aAppUid) + { + found = ETrue; + break; + } + } + + CApaAppData* app = NULL; + if (found) + { + // add the app to the list + TBool hasChanged = EFalse; + CApaAppData* prevFirstAppInList = iAppData; + UpdateNextAppL(appEntry, hasChanged); + if (iAppData != prevFirstAppInList) + { + // assume the new app was added to the list + app = iAppData; + } + if (hasChanged) + iUpdateCounter++; + } + return app; + } + +EXPORT_C void CApaAppList::PurgeL() +/** Removes any applications from the list if they are no longer present +on the phone. It updates applications that have been +superceded. */ + { + CApaAppData* appData=iAppData; + CApaAppData* prev=NULL; + while (appData) + { + CApaAppData* next=appData->iNext; + if (appData->iIsPresent==CApaAppData::ENotPresent) + { + if (prev) + prev->iNext=next; + else + iAppData=next; + delete appData; + } + else if (appData->iIsPresent==CApaAppData::ESuperseded) + { + CApaAppData* newApp=NULL; + TApaAppEntry appEntry; + appData->iSuccessor->Get(appEntry); + TRAPD(err,newApp=CApaAppData::NewL(appEntry, iFs,*iDefaultAppIcon)); + if (err==KErrNone) + { + // remove the old one and add the new one in its place + if (prev) + prev->iNext=newApp; + else + iAppData=newApp; + newApp->iNext = appData->iNext; + delete appData; + // increment the iterator + prev = newApp; + } + } + else + prev=appData; + appData=next; + } + + ScanComplete(); + } + +EXPORT_C TInt CApaAppList::Count() const +/** Gets the count of applications present in the app list. + +@return The number of applications in the list. */ + + { + TInt count=0; + CApaAppData* appData=iAppData; + while (appData) + { + count++; + appData=appData->iNext; + } + return count; + } + +EXPORT_C CApaAppData* CApaAppList::FirstApp() const +/** Gets a pointer to the first application in the list +that can use the default screen mode. + +@return A pointer to the first application. */ + { + return FirstApp(0); + } + +EXPORT_C CApaAppData* CApaAppList::FirstApp(TInt aScreenMode) const +/** Gets a pointer to the first application in the list +that can use the specified screen mode. + +@param aScreenMode The index of the screen mode. Specifying +KIgnoreScreenMode returns the first application in the list, +regardless of screen mode. +@return A pointer to the first application that can use the +specified screen mode. */ + { + + CApaAppData* appData=iValidFirstAppData; + + if(aScreenMode!=KIgnoreScreenMode) + { + while (appData && !appData->CanUseScreenMode(aScreenMode)) + appData = appData->iNext; + } + + return appData; + } + +EXPORT_C CApaAppData* CApaAppList::NextApp(const CApaAppData* aApp) const +/** Gets a pointer to the next application after aApp in the list +that can use the default screen mode. + +@param aApp A pointer to an application in the list. +@return A pointer to the next application after aApp in the list +that can use the default screen mode. +@panic APGRFX 12 aApp is NULL. */ + { + return NextApp(aApp,0); + } + +EXPORT_C CApaAppData* CApaAppList::NextApp(const CApaAppData* aApp, TInt aScreenMode) const +/** Gets a pointer to the next application after aApp in the list +that can use the specified screen mode. + +@param aApp A pointer to an application in the list. +@param aScreenMode The index of the screen mode. Specifying +KIgnoreScreenMode returns the next application in the list, +regardless of screen mode. +@return A pointer to the next application after aApp in the list +that can use the specified screen mode. +@panic APGRFX 12 aApp is NULL. */ + + { + __ASSERT_ALWAYS(aApp,Panic(EPanicNoAppDataSupplied)); + // + CApaAppData* iApp=aApp->iNext; //lint !e613 Possible use of null pointer - Asserted above + + if(aScreenMode!=KIgnoreScreenMode) + while (iApp && !iApp->CanUseScreenMode(aScreenMode)) + iApp = iApp->iNext; + + return iApp; + } + +EXPORT_C CApaAppData* CApaAppList::AppDataByUid(TUid aAppUid) const +/** Gets a pointer to the application in the list whose third +UID matches the specified UID. + +@param aAppUid An application's third UID. +@return A pointer to the application, if successful. Null, +if no match is found or if KNullUid was specified. */ + { + if (aAppUid==KNullUid) + return NULL; // never match null UID as it represents an un-UIDed file + CApaAppData* appData=iAppData; + while (appData) + { + if (appData->AppEntry().iUidType[2]==aAppUid) + return appData; + appData=appData->iNext; + } + return NULL; + } + +EXPORT_C CApaAppData* CApaAppList::AppDataByFileName(const TDesC& aFullFileName) const +/** Gets a pointer to the application in the list whose application +file name matches the one specified + +@param aFullFileName a file name. +@return A pointer to the application, if successful. Null, +if no match is found or if KNullDesC was specified. +@internalTechnology +*/ + { + if (aFullFileName.Length()==0) + { + return NULL; // never match null UID as it represents an un-UIDed file + } + CApaAppData* appData=iAppData; + while (appData) + { + if (appData->AppEntry().iFullName.CompareF(aFullFileName)==0) + { + return appData; + } + appData=appData->iNext; + } + return NULL; + } + +/** +Adds a registration file to the iForcedRegistrations array. + +@param aRegistrationFile The function takes ownership of the HBufC. +@internalComponent +*/ +EXPORT_C void CApaAppList::AddForcedRegistrationL(HBufC* aRegistrationFile) + { + TInt err = iForcedRegistrations.InsertInOrder(aRegistrationFile, TLinearOrder(CompareStrings)); + if (err == KErrAlreadyExists) // We silently ignore attempts to insert duplicates + { + delete aRegistrationFile; + } + else + { + User::LeaveIfError(err); + } + } //lint !e818 Suppress pointer parameter 'aRegistrationFile' could be declared as pointing to const + +EXPORT_C void CApaAppList::ResetForcedRegistrations() + { + iForcedRegistrations.ResetAndDestroy(); + } + +EXPORT_C TInt CApaAppList::UpdateCounter() const +/** Gets the number of times the application list has been updated. +It returns zero for a newly created empty list. + +@return The number of times the list has been changed since it was +created. */ + { + return iUpdateCounter; + } + +EXPORT_C TUid CApaAppList::PreferredDataHandlerL(const TDataType& aDataType) const +/** Finds the preferred application to handle the specified data type. + +@param aDataType The data type of interest. +@return The third UID of the application in the list which has the +highest priority for handling the specified data type. A null UID is +returned if no application in the list can handle the specified data type. */ + { + TInt dummy; + return PreferredDataHandlerL(aDataType, NULL, dummy); + } + +EXPORT_C TUid CApaAppList::PreferredDataHandlerL(const TDataType& aDataType, const TUid* aServiceUid, TInt& aPriority) const +/** Finds the preferred application to handle the specified data type. + +@param aDataType The data type of interest. +@param aServiceUid The optional service UID. +@param aPriority The priority associated with the returned app. +@return The third UID of the application in the list which has the +highest priority for handling a combination of the specified data type +and service. A null UID is returned if no application in the list can +handle the combination of specified data type and service. +@internalComponent +*/ + { + // If there is a service uid we first try to use the service specific list + // of datatypes + if (aServiceUid) + { + CApaAppData* appData=iAppData; + aPriority=KDataTypePriorityNotSupported; + TUid uid={0}; + while (appData) + { + TInt priority = appData->ImplementsServiceWithDataType(*aServiceUid, aDataType); + if (priority > aPriority) + { + aPriority=priority; + uid=appData->AppEntry().iUidType[2]; + } + appData=appData->iNext; + } + if (aPriority != KDataTypePriorityNotSupported) + { + return uid; + } + } + + CApaAppData* appData=iAppData; + aPriority=KDataTypePriorityNotSupported; + TUid uid={0}; + while (appData) + { + TInt priority=appData->DataType(aDataType); + if ((priority > aPriority) && + (!aServiceUid || (aServiceUid && appData->ImplementsService(*aServiceUid)))) + { + aPriority=priority; + uid=appData->AppEntry().iUidType[2]; + } + appData=appData->iNext; + } + return uid; + } + +void CApaAppList::ScanComplete() + { + if(!IsFirstScanComplete() && iObserver) + iObserver->InitialListPopulationComplete(); + iValidFirstAppData = iAppData; + iFlags|=EFirstScanComplete; + } + +/** + * + * Tests whether the first scan for list of Apps has completed. + * + * @return "TBool" + * True, if the first scan for list of Apps has completed; false, otherwise. + * @internalComponent + */ +EXPORT_C TBool CApaAppList::IsFirstScanComplete() const + { + return iFlags&EFirstScanComplete; + } + +EXPORT_C TBool CApaAppList::AppScanInProgress() const +/** @internalComponent */ + { + return (iAppIdler!=NULL) && iAppIdler->IsActive(); + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceArrayBufferL(TUid aAppUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + while (app && app->AppEntry().iUidType[2] != aAppUid) + { + app = NextApp(app, KIgnoreScreenMode); + } + + if (app) + { + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + if (app->iServiceArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *(app->iServiceArray); + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + return buf; + } + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceUidBufferL(TUid aAppUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + while (app && app->AppEntry().iUidType[2] != aAppUid) + { + app = NextApp(app, KIgnoreScreenMode); + } + + if (app) + { + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + if (app->iServiceArray) + { + CArrayFixFlat& serviceArray = *(app->iServiceArray); + CArrayFixFlat* uidArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(uidArray); + for (TInt i = serviceArray.Count()-1; i >= 0; i--) + { + uidArray->AppendL(serviceArray[i].Uid()); + } + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *uidArray; + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(uidArray); + return buf; + } + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceOpaqueDataBufferL(TUid aAppUid, TUid aServiceUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + while (app && app->AppEntry().iUidType[2] != aAppUid) + { + app = NextApp(app, KIgnoreScreenMode); + } + + if (app) + { + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + if (app->iServiceArray) + { + CArrayFixFlat* implArray = NULL; + CArrayFixFlat& serviceArray = *(app->iServiceArray); + for (TInt i = serviceArray.Count()-1; i >= 0; i--) + { + const TApaAppServiceInfo& infoRef = serviceArray[i]; + if (infoRef.Uid() == aServiceUid) + { + if (!implArray) + { + implArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, implArray)); + } + CArrayFixFlat* dummy = + new(ELeave) CArrayFixFlat(1); + CleanupStack::PushL(dummy); + TApaAppServiceInfo info(aServiceUid, dummy, infoRef.OpaqueData().AllocLC()); + implArray->AppendL(info); + CleanupStack::Pop(const_cast(&info.OpaqueData())); + CleanupStack::Pop(dummy); + } + } + if (implArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *implArray; + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(implArray); + return buf; + } + } + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceImplArrayBufferL(TUid aServiceUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + // build an array containing all implementations of the service identified by aServiceUid + CArrayFixFlat* implArray = NULL; + while (app) + { + if (app->iServiceArray) + { + for (TInt i = app->iServiceArray->Count()-1; i >= 0; i--) + { + const TApaAppServiceInfo& infoRef = (*app->iServiceArray)[i]; + if (infoRef.Uid() == aServiceUid) + { + if (!implArray) + { + implArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, implArray)); + } + CArrayFixFlat* datatypes = DataTypeArrayDeepCopyLC(infoRef.DataTypes()); + HBufC8* data = infoRef.OpaqueData().AllocLC(); + TApaAppServiceInfo info(app->AppEntry().iUidType[2], datatypes, data); + implArray->AppendL(info); + CleanupStack::Pop(data); + CleanupStack::Pop(datatypes); + } + } + } + app = NextApp(app, KIgnoreScreenMode); + } + + if (implArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *(implArray); + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(implArray); + return buf; + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +EXPORT_C CBufFlat* CApaAppList::ServiceImplArrayBufferL(TUid aServiceUid, const TDataType& aDataType) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + // build an array containing all implementations of the service identified by aServiceUid + CArrayFixFlat* implArray = NULL; + while (app) + { + if (app->iServiceArray) + { + for (TInt i = app->iServiceArray->Count()-1; i >= 0; i--) + { + const TApaAppServiceInfo& infoRef = (*app->iServiceArray)[i]; + if (infoRef.Uid() == aServiceUid) + { + if (KDataTypePriorityNotSupported != app->DataType(aDataType, infoRef.DataTypes())) + { + if (!implArray) + { + implArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, implArray)); + } + CArrayFixFlat* datatypes = DataTypeArrayDeepCopyLC(infoRef.DataTypes()); + HBufC8* data = infoRef.OpaqueData().AllocLC(); + TApaAppServiceInfo info(app->AppEntry().iUidType[2], datatypes, data); + implArray->AppendL(info); + CleanupStack::Pop(data); + CleanupStack::Pop(datatypes); + } + } + } + } + app = NextApp(app, KIgnoreScreenMode); + } + + if (implArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *(implArray); + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(implArray); + return buf; + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +CArrayFixFlat* CApaAppList::DataTypeArrayDeepCopyLC(const CArrayFixFlat& aOriginal) const + { + CArrayFixFlat* result = new(ELeave) CArrayFixFlat(1); + CleanupStack::PushL(result); + TInt ii = 0; + TInt end = aOriginal.Count(); + while (ii < end) + { + result->AppendL(aOriginal[ii]); + ii++; + } + return result; + } + +EXPORT_C TInt CApaAppList::CompareStrings(const HBufC& aFirst, const HBufC& aSecond) + { + return aFirst.CompareF(aSecond); + } + +EXPORT_C CApaAppList* CApaAppList::Self() + { // static + return static_cast(Dll::Tls()); + } + +/*EXPORT_C*/ RFs& CApaAppList::ShareProtectedFileServer() + { + return iFsShareProtected; //lint !e1536 Exposing low access member - need to consider a redesign or design clarification here(iFsShareProtected should be owned be the one that needs it) but postpone for now as that may require large changes + } + +CApaAppIconArray* CApaAppList::LoadDefaultIconsL() const + { + __ASSERT_ALWAYS(iDefaultAppIcon, Panic(EPanicNullPointer)); + CApaIconLoader* iconLoader = CApaIconLoader::NewLC(iFs); + CApaAppIconArray* icons = CApaAppIconArray::NewRealDefaultIconsLC(KNumberOfIconsInDefaultMbm,*iDefaultAppIcon, *iconLoader); + const TBool badMbmEntryInfo = !icons->LoadIconsL(); + if(badMbmEntryInfo) + { + CleanupStack::PopAndDestroy(2,iconLoader); + return CApaAppIconArray::NewL(); + } + else + { + CleanupStack::Pop(icons); + CleanupStack::PopAndDestroy(iconLoader); + } + return icons; + } + +void CApaAppList::AcquireDefaultIconArrayL() const + { + ASSERT(iDefaultIconUsageCount >= 0); + if (iDefaultIconUsageCount == 0) + { + iDefaultIconArray = LoadDefaultIconsL(); + } + ++iDefaultIconUsageCount; + } + +// Should NEVER be called by an object that does not call AcquireDefaultIconArrayL and +// ReleaseDefaultIconArray at the beginning and end of its lifetime respectively +const CApaAppIconArray& CApaAppList::DefaultIconArray() const + { + __ASSERT_ALWAYS(iDefaultIconArray, Panic(EPanicNullPointer)); + return *iDefaultIconArray; + } + +void CApaAppList::ReleaseDefaultIconArray() const + { + ASSERT(iDefaultIconUsageCount > 0); + if(0 == --iDefaultIconUsageCount) + { + delete iDefaultIconArray; + iDefaultIconArray = NULL; + } + } + +// DEF077478 - Required to update the default icons that the app list holds. +void CApaAppList::UpdateDefaultIconsL() + { + CApaAppIconArray* iconArray = LoadDefaultIconsL(); + if (iconArray) + { + delete iDefaultIconArray; + iDefaultIconArray = iconArray; + } + } + + +// ApaUtils + +EXPORT_C TBool ApaUtils::HandleAsRegistrationFile(const TUidType& aUidType) + { // static + return (aUidType[1].iUid==KUidAppRegistrationFile.iUid || + aUidType[0].iUid==KUidPrefixedNonNativeRegistrationResourceFile); + } + +// Returns ETrue if a language change event is received and a re-scan is in progress otherwise EFalse. +EXPORT_C TBool CApaAppList::IsLanguageChangePending() const + { + return (iFlags & ELangChangePending); + } +// +// Class CApaLangChangeMonitor +// + +CApaAppList::CApaLangChangeMonitor::~CApaLangChangeMonitor() + { + Cancel(); + iLangNotifier.Close(); + } + +CApaAppList::CApaLangChangeMonitor* CApaAppList::CApaLangChangeMonitor::NewL(CApaAppList& aAppList) + { // static + CApaLangChangeMonitor* self=new(ELeave) CApaLangChangeMonitor(aAppList); + self->ConstructL(); + return self; + } + +CApaAppList::CApaLangChangeMonitor::CApaLangChangeMonitor(CApaAppList& aAppList) + : CActive(EPriorityNormal), + iAppList(aAppList) + { + iPrevLanguage = User::Language(); + CActiveScheduler::Add(this); + } + +void CApaAppList::CApaLangChangeMonitor::ConstructL() + { + User::LeaveIfError(iLangNotifier.Create()); + Start(); + } + +void CApaAppList::CApaLangChangeMonitor::Start() + { + iLangNotifier.Logon(iStatus); + SetActive(); + } + +void CApaAppList::CApaLangChangeMonitor::DoCancel() + { + iLangNotifier.LogonCancel(); + } + +void CApaAppList::CApaLangChangeMonitor::RunL() + { + // Logon to get further events before handling current request. + TRequestStatus status = iStatus; + Start(); + + // if it is a language change event, start a rescan on app-list. + if (status.Int() == EChangesLocale && iPrevLanguage != User::Language()) + { + iPrevLanguage = User::Language(); + iAppList.iFlags |= CApaAppList::ELangChangePending; + iAppList.StartIdleUpdateL(iAppList.iObserver); + } + } + +TInt CApaAppList::CApaLangChangeMonitor::RunError(TInt /*aError*/) + { + // Reset ELangChangePending flag if RunL leaves. + iAppList.iFlags &= ~CApaAppList::ELangChangePending; + // Reset iPrevLanguage to ELangNone if RunL leaves. + iPrevLanguage = ELangNone; + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAPLSTV2.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGAPLSTV2.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,3082 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APGAPLST.H" +#include "APGSTD.H" +#include "APFDEF.H" +#include "../apparc/TRACE.H" +#include "apgnotif.h" +#include "../apfile/aprfndr.h" +#include +#include +#include +#include "APGPRIV.H" +#include "APGAIR.H" +#include "APGICNFL.H" +#include "apprivate.h" +#include +#ifdef SYMBIAN_BAFL_SYSUTIL +#include +#endif + + +// Delays in the pseudo idle object that builds the application list +// + +const TInt KIdleStartDelay=0; +const TInt KMaxOpaqueDataLength = 0x1000; // maximum length of opaque data that can be passed between client and apparc server via a TApaAppServiceInfo object - this can be increased in future if needed +const TInt KBufferExpansionGranularity = 0x100; +const TInt KNumberOfIconsInDefaultMbm = 3; +const TInt KAppListToFileStartDelay = 60000000; +#ifdef SYMBIAN_BAFL_SYSUTIL +const TInt KInfoBufLength=KSysUtilVersionTextLength; +//This file is used for storing the rom version. If actual rom version differs from the one stored here the applist is not restored. +//This file is versioned to avoid a data compatability break on adding further information to this file. +//On adding further info to this file, KROMVersionCacheFileMajorVersion or KROMVersionCacheFileMinorVersion or KROMVersionCacheFileBuildVersion needs to be incremented appropriately. +_LIT(KROMVersionStringCacheFileName, "ROMVersionCache.bin"); +const TInt8 KROMVersionCacheFileMajorVersion=1; +const TInt8 KROMVersionCacheFileMinorVersion=0; +const TInt16 KROMVersionCacheFileBuildVersion=0; +#endif + +// +// Class CApaLangChangeMonitor +// + +NONSHARABLE_CLASS(CApaAppList::CApaLangChangeMonitor) : public CActive + { + /** + Utility class used to monitor locale/language change event. + @internalComponent + */ + public: + static CApaLangChangeMonitor* NewL(CApaAppList& aAppList); + ~CApaLangChangeMonitor(); + void Start(); + + private: + CApaLangChangeMonitor(CApaAppList& aAppList); + void ConstructL(); + + private: //from CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + + private: + RChangeNotifier iLangNotifier; + CApaAppList& iAppList; + TLanguage iPrevLanguage; + }; + + +// +// Local functions +// + +void CleanupServiceArray(TAny* aServiceArray) + { + __ASSERT_DEBUG(aServiceArray, Panic(EPanicNullPointer)); + CArrayFixFlat* serviceArray = static_cast*>(aServiceArray); + TInt serviceCount = serviceArray->Count(); + if (serviceCount > 0) + { + for (TInt i = serviceCount - 1; i >= 0; i--) + { + (*serviceArray)[i].Release(); + } + } + delete serviceArray; + serviceArray = 0; + } + + +// +// Class CApaAppViewData +// + +CApaAppViewData::~CApaAppViewData() + { + delete iIcons; + delete iCaption; + delete iIconFileName; + } + +CApaAppViewData::CApaAppViewData() + : iNonMbmIconFile(EFalse) + { + } + +void CApaAppViewData::ConstructL() + { + iIcons=CApaAppIconArray::NewL(); + } + +CApaAppViewData* CApaAppViewData::NewLC() + { + CApaAppViewData* self=new(ELeave) CApaAppViewData(); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +void CApaAppViewData::SetUid(TUid aUid) + { + iUid=aUid; + } + +void CApaAppViewData::SetScreenMode(TInt aScreenMode) + { + iScreenMode=aScreenMode; + } + +EXPORT_C TInt CApaAppViewData::ScreenMode() const + { + return iScreenMode; + } + +void CApaAppViewData::SetCaptionL(const TDesC& aCaption) + { + HBufC* newCaption=aCaption.AllocL(); + delete(iCaption); // after the AllocL succeeds + iCaption=newCaption; + } + +void CApaAppViewData::SetIconArray(CApaAppIconArray* aIcons) + { + delete iIcons; + iIcons = aIcons; + } + +void CApaAppViewData::SetIconFileNameL(const TDesC& aFileName) + { + HBufC* fileName = aFileName.AllocL(); + delete iIconFileName; // after the AllocL succeeds + iIconFileName = fileName; + } + +void CApaAppViewData::SetNumOfViewIcons(TInt aNumOfViewIcons) + { + iNumOfViewIcons = aNumOfViewIcons; + } + +void CApaAppViewData::SetNonMbmIconFile(TBool aNonMbmIconFile) + { + iNonMbmIconFile = aNonMbmIconFile; + } + +EXPORT_C TUid CApaAppViewData::Uid() const + { + return iUid; + } + +EXPORT_C CApaMaskedBitmap* CApaAppViewData::Icon(const TSize& aSize) const + { + return iIcons->IconBySize(aSize); + } + +EXPORT_C CArrayFixFlat* CApaAppViewData::IconSizesL() const + { + return iIcons->IconSizesL(); + } + +EXPORT_C TPtrC CApaAppViewData::IconFileName() const + { + if (iIconFileName) + { + return *iIconFileName; + } + else + { + return TPtrC(KNullDesC); + } + } + +EXPORT_C TBool CApaAppViewData::NonMbmIconFile() const + { + return iNonMbmIconFile; + } + + +// +// class CApaAppEntry +// + +CApaAppEntry* CApaAppEntry::NewL(const TApaAppEntry& aAppEntry) + { // static + CApaAppEntry* self=new(ELeave) CApaAppEntry(aAppEntry.iUidType); + CleanupStack::PushL(self); + self->ConstructL(aAppEntry.iFullName); + CleanupStack::Pop(self); + return self; + } + +CApaAppEntry::~CApaAppEntry() + { + delete iFullName; + } + +void CApaAppEntry::Get(TApaAppEntry& aAppEntry) const + { + aAppEntry.iFullName=*iFullName; + aAppEntry.iUidType=iUidType; + } + +CApaAppEntry::CApaAppEntry(const TUidType& aUidType) + : iUidType(aUidType) + { + } + +void CApaAppEntry::ConstructL(const TDesC& aFileName) + { + iFullName=aFileName.AllocL(); + } + + +// +// class TApaAppServiceInfo +// + +TApaAppServiceInfo::TApaAppServiceInfo() + : iUid(KNullUid), + iDataTypes(0), + iOpaqueData(NULL) + { + } + +TApaAppServiceInfo::TApaAppServiceInfo(TUid aUid, + CArrayFixFlat* aDataTypes, HBufC8* aOpaqueData) + : iUid(aUid), + iDataTypes(aDataTypes), + iOpaqueData(aOpaqueData) + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + __ASSERT_DEBUG(iOpaqueData, Panic(EPanicNullPointer)); + } + +void TApaAppServiceInfo::ExternalizeL(RWriteStream& aStream) const + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + __ASSERT_DEBUG(iOpaqueData, Panic(EPanicNullPointer)); + aStream << iUid; + aStream << *iDataTypes; //lint !e613 Possible use of null pointer - Asserted above + aStream << *iOpaqueData;//lint !e613 Possible use of null pointer - Asserted above + } + +void TApaAppServiceInfo::InternalizeL(RReadStream& aStream) + { + aStream >> iUid; + iDataTypes = new(ELeave) CArrayFixFlat(1); + aStream >> *iDataTypes; + iOpaqueData = HBufC8::NewL(aStream, KMaxOpaqueDataLength); + } + +void TApaAppServiceInfo::Release() + { + if (iDataTypes) + { + iDataTypes->Reset(); + delete iDataTypes; + } + if (iOpaqueData) + { + delete iOpaqueData; + iOpaqueData = NULL; + } + } + +CArrayFixFlat& TApaAppServiceInfo::DataTypes() + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + return *iDataTypes; //lint !e613 Possible use of null pointer - Asserted above + } + +/** Returns the service UID. + +Note that some APIs may store a UID other than a service UID +in a TApaAppServiceInfo object. Such APIs clearly state what +the UID represents. + +@return the service UID. +*/ +EXPORT_C TUid TApaAppServiceInfo::Uid() const + { + return iUid; + } + +EXPORT_C const CArrayFixFlat& TApaAppServiceInfo::DataTypes() const + { + __ASSERT_DEBUG(iDataTypes, Panic(EPanicNullPointer)); + return *iDataTypes; //lint !e613 Possible use of null pointer - Asserted above + } + +/** Returns the service implementation's opaque data. + +For each service UID registered by an application, the associated +opaque data indicates how the service is implemented by that application. + +The meaning of the opaque data is not known to the framework, it will vary +according to the service. + +For some services the opaque data may be a name intended for user display, +for others it may be structured data that the service's client-side code can interpret. + +@return the service implementation's opaque data. +*/ +EXPORT_C const TDesC8& TApaAppServiceInfo::OpaqueData() const + { + if (iOpaqueData) + { + return *iOpaqueData; + } + return KNullDesC8; + } + +// +// class CApaAppServiceInfoArray +// + +CApaAppServiceInfoArray::CApaAppServiceInfoArray() + { + } + +// +// class CApaAppServiceInfoArrayWrapper +// + +CApaAppServiceInfoArrayWrapper* CApaAppServiceInfoArrayWrapper::NewL(CArrayFix* aServiceInfoArray) + { + CApaAppServiceInfoArrayWrapper* self = new CApaAppServiceInfoArrayWrapper(aServiceInfoArray); + if (!self) + { + CleanupServiceArray(aServiceInfoArray); + User::LeaveNoMemory(); + } + return self; + } + +CApaAppServiceInfoArrayWrapper::CApaAppServiceInfoArrayWrapper(CArrayFix* aServiceInfoArray) + : iServiceInfoArray(aServiceInfoArray) + { + } + +CApaAppServiceInfoArrayWrapper::~CApaAppServiceInfoArrayWrapper() + { + CleanupServiceArray(iServiceInfoArray); + iServiceInfoArray = NULL; + } + +TArray CApaAppServiceInfoArrayWrapper::Array() + { + return iServiceInfoArray->Array(); + } + + +// +// Class CApaAppData +// + +EXPORT_C CApaAppData* CApaAppData::NewL(const TApaAppEntry& aAppEntry, RFs& aFs) + { + CApaAppData* self=new(ELeave) CApaAppData(aFs); + CleanupStack::PushL(self); + self->ConstructL(aAppEntry); + CleanupStack::Pop(); // self + return self; + } + +CApaAppData::CApaAppData(RFs& aFs) + :iCaption(NULL), iShortCaption(NULL), + iIsPresent(CApaAppData::EIsPresent), iFs(aFs), + iNonMbmIconFile(EFalse), + iApplicationLanguage(ELangNone), iIndexOfFirstOpenService(-1), + iNonNativeApplicationType(TUid::Null()), + iShortCaptionFromResourceFile(NULL) + { + } + +void CApaAppData::ConstructL(const TApaAppEntry& aAppEntry) + { + iUidType = aAppEntry.iUidType; // if the 2nd UID is KUidAppRegistrationFile, iUidType will be updated in StoreApplicationInformation to reflect the TUidType for the application binary + if (ApaUtils::HandleAsRegistrationFile(aAppEntry.iUidType)) + { + iRegistrationFile = aAppEntry.iFullName.AllocL(); + } + else + { + iFullName = aAppEntry.iFullName.AllocL(); + } + + iCapabilityBuf.FillZ(iCapabilityBuf.MaxLength()); + iIcons = CApaAppIconArray::NewL(); + iViewDataArray=new(ELeave) CArrayPtrFlat(1); + iOwnedFileArray=new(ELeave) CDesCArraySeg(1); + User::LeaveIfError(StoreApplicationInformation()); + } + +// Return a standard error code +// The value returned only reflect the caption status +// If there is errors setting up captions the old values are retained +// All other errors are silently ignored +// General notes: +// 1. This method is deliberately very similar to the old CApaAppData::GetAifData +// in order to maintain behavioural compatibility for V1 apps +// 2. Be very careful in this method, because it can be called on a newly constructed object, +// or on an existing object, so don't assume member data pointers will be NULL +TInt CApaAppData::StoreApplicationInformation() + { + HBufC* caption = NULL; + HBufC* shortCaption = NULL; + + iTimeStamp = TTime(0); // cannot init in constructor because this function can be called on an existing CApaAppData object + + CApaAppInfoReader* appInfoReader = NULL; + TBool readSuccessful = EFalse; + TBool isNonNativeApp = EFalse; + if (iRegistrationFile != NULL) + { + if (TParsePtrC(*iRegistrationFile).Path().CompareF(KLitPathForNonNativeResourceAndIconFiles)==0) + { + isNonNativeApp = ETrue; + } + + TRAPD(err,appInfoReader = CApaAppInfoReaderV2::NewL(iFs, *iRegistrationFile, iUidType[2])); + if(err != KErrNone) + { + appInfoReader = NULL; + } + + if (appInfoReader == NULL) + { + if (iFullName == NULL) + { + // assume that if iFullName is NULL, this method has been called as part + // of constructing a new app data object. The CApaAppInfoReader derived object + // could not be created, therefore we have no way to determine the full filename + // of the app binary, so give up + return KErrNoMemory; + } + } + else + { + readSuccessful = appInfoReader->Read(); + HBufC* appBinaryFullName=appInfoReader->AppBinaryFullName(); + if (appBinaryFullName) + { + delete iFullName; + iFullName = appBinaryFullName; + } + if (iFullName == NULL) + { + delete appInfoReader; + return KErrNoMemory; + } + // if this object has just been constructed, iUidType is currently the TUidType + // of the registration file, it should be the TUidType of the app binary file + TUidType uidType = appInfoReader->AppBinaryUidType(); + if (uidType[1].iUid != KNullUid.iUid) + { + iUidType = uidType; + } + } + } + + if (appInfoReader != NULL) + { + // must get captions regardless of value of readSuccessful, + // because the V1 reader might have read captions + // this is done to maintain behavioural compatibility with V1 + caption = appInfoReader->Caption(); + shortCaption = appInfoReader->ShortCaption(); + + CApaAppIconArray* icons = appInfoReader->Icons(); + if(icons) + { + delete iIcons; + iIcons = icons; + iIconLoader = appInfoReader->IconLoader(); + } + else + { + TRAPD(err, icons = CApaAppIconArray::NewL()); + if(err == KErrNone) + { + delete iIcons; + iIcons = icons; + } + } + iTimeStamp = appInfoReader->TimeStamp(); + delete iLocalisableResourceFileName; + iLocalisableResourceFileName = appInfoReader->LocalisableResourceFileName(); + iLocalisableResourceFileTimeStamp = appInfoReader->LocalisableResourceFileTimeStamp(); + + if (isNonNativeApp) + { + // In the case of a non-native app, the resource file has been prefixed with a + // TCheckedUid, the second of whose UIDs is the non-native application type uid. + TEntry entry; + const TInt error=iFs.Entry(*iRegistrationFile, entry); + if (error!=KErrNone) + { + delete appInfoReader; + return error; + } + __ASSERT_DEBUG(entry.iType[0].iUid==KUidPrefixedNonNativeRegistrationResourceFile, Panic(EPanicUnexpectedUid)); + iNonNativeApplicationType=entry.iType[1]; + } + + delete iOpaqueData; + iOpaqueData = appInfoReader->OpaqueData(); + + if (readSuccessful) + { + appInfoReader->Capability(iCapabilityBuf); + + iDefaultScreenNumber = appInfoReader->DefaultScreenNumber(); + + delete iIconFileName; + iIconFileName = appInfoReader->IconFileName(); + iIconFileTimeStamp = appInfoReader->IconFileTimeStamp(); + iNonMbmIconFile = appInfoReader->NonMbmIconFile(); + iNumOfAppIcons = appInfoReader->NumOfAppIcons(); + iApplicationLanguage = appInfoReader->AppLanguage(); + + // views + iViewDataArray->ResetAndDestroy(); + CArrayPtrFlat* viewDataArray = appInfoReader->Views(); + if (viewDataArray) + { + delete iViewDataArray; + iViewDataArray = viewDataArray; + + if(!iIconLoader && ViewMbmIconsRequireLoading()) + { + //if VIEW_DATA contains a MBM icon we need to initialize iIconLoader + iIconLoader = appInfoReader->IconLoader(); + } + } + + // owned files + iOwnedFileArray->Reset(); + CDesCArray* ownedFileArray = appInfoReader->OwnedFiles(); + if (ownedFileArray) + { + delete iOwnedFileArray; + iOwnedFileArray = ownedFileArray; + } + + UpdateServiceArray(appInfoReader->ServiceArray(iIndexOfFirstOpenService)); + } + delete appInfoReader; + } + + if (!caption) + { + TParsePtrC parse (*iFullName); + caption = parse.Name().Alloc(); + } + + // Put the captions into place + if (caption) + { + if (!shortCaption) + { + shortCaption = caption->Alloc(); + if (!shortCaption) + { + delete caption; + caption = NULL; + } + } + } + if (caption) + { + delete iCaption; + iCaption = caption; + delete iShortCaption; + iShortCaption = shortCaption; + } + + return caption ? KErrNone : KErrNoMemory; + } + +EXPORT_C CApaAppData::~CApaAppData() +// Just delete components, NOT iNext (next CApaAppData in the list). + { + delete iSuccessor; + delete iCaption; + delete iShortCaption; + delete iFullName; + delete iShortCaptionFromResourceFile; + delete iCaptionFromResourceFile; + delete iIcons; + delete iIconLoader; + if(iViewDataArray) + { + iViewDataArray->ResetAndDestroy(); + delete iViewDataArray; + } + delete iOwnedFileArray; + delete iIconFileName; + delete iIconFileNameFromResourceFile; + delete iLocalisableResourceFileName; + if (iServiceArray) + { + CleanupServiceArray(iServiceArray); + iServiceArray = NULL; + } + delete iOpaqueData; + delete iRegistrationFile; + iNext = NULL; + } + +void CApaAppData::UpdateServiceArray(CArrayFixFlat* aNewServiceArray) + { + // clear out any existing service info + if (iServiceArray) + { + CleanupServiceArray(iServiceArray); + iServiceArray = NULL; + } + // store new service array + iServiceArray = aNewServiceArray; + } + +TDataTypePriority CApaAppData::DataType(const TDataType& aDataType, const CArrayFixFlat& aDataTypeArray) const + { + TInt count=aDataTypeArray.Count(); + for (TInt ii=0;iiIconBySize(aSize); + } + +/** + * Returns a pointer to the small, medium or large application icon for aIconIndex equal to 0, 1 or 2 respectively. + * Panics if aIconIndex is not one of these three values. + * + * This method is superseded by an overload which returns the icon by finding the closest match to a specified size. + * + * @deprecated + */ +EXPORT_C CApaMaskedBitmap* CApaAppData::Icon(TInt aIconIndex) const + { + __ASSERT_DEBUG(aIconIndex>-1 && aIconIndex<3, Panic(EDPanicBadIconSize)); //only support old behaviour + TSize sizeExpected; + switch(aIconIndex) + { + case KApaIconIndexSmall: + sizeExpected=TSize(24,24); + break; + case KApaIconIndexMedium: + sizeExpected=TSize(32,32); + break; + case KApaIconIndexLarge: + sizeExpected=TSize(48,48); + break; + default: + break; + } + return Icon(sizeExpected); + } + +void CApaAppData::LoadIconsL() + { + iIconLoader->LoadAllIconsL(); + } + +EXPORT_C CArrayFixFlat* CApaAppData::IconSizesL()const +/** Gets the sizes of icons available for the application. +* If the icons for the application are not yet loaded then it would be loaded first. + +@return A pointer to an array of the icon sizes. The caller takes ownership. */ + { + return iIcons->IconSizesL(); + } + +EXPORT_C TApaAppEntry CApaAppData::AppEntry() const +/** Constructs an application entry based on this object. + +@return The application entry. */ + { + return TApaAppEntry(iUidType,*iFullName); + } + + +EXPORT_C void CApaAppData::Capability(TDes8& aCapabilityBuf)const +/** Gets the application's capabilities. + +@param aCapabilityBuf On return, contains the application's capabilities, +specified as a TApaAppCapabilityBuf object. */ + { + TApaAppCapability::CopyCapability(aCapabilityBuf,iCapabilityBuf); + } + +/** + * Returns a pointer to the array of view data objects current for this application. Does not imply transfer of ownership. + * + * @since App-Framework_6.1 + */ +EXPORT_C CArrayPtrFlat* CApaAppData::Views() const + { + return iViewDataArray; + } + +/** + * Returns a pointer to the array of files for which this application claims ownership. Does not imply transfer of ownership. + * + * @since App-Framework_6.1 + */ +EXPORT_C CDesCArray* CApaAppData::OwnedFiles() const + { + return iOwnedFileArray; + } + +TBool CApaAppData::Update() +// returns true if changes were made to the cached data + { + __APA_PROFILE_START(17); + TBool changed=EFalse; + + // Get app info file entry + TEntry entry; + TInt ret; + if (iRegistrationFile != NULL) + { + ret = iFs.Entry(*iRegistrationFile, entry); + if (ret==KErrNone && entry.iModified!=iTimeStamp) + { + // assume registration file may have changed + changed = ETrue; + } + else + { + if (iLocalisableResourceFileName) + { + // see if localisable resource information might have changed + TParse parse; + ret = parse.SetNoWild(KAppResourceFileExtension, iLocalisableResourceFileName, NULL); + if (ret == KErrNone) + { + TFileName resourceFileName(parse.FullName()); + BaflUtils::NearestLanguageFile(iFs, resourceFileName); + if (resourceFileName.CompareF(*iLocalisableResourceFileName)!=0) + { + changed = ETrue; + } + else + { + ret = iFs.Entry(*iLocalisableResourceFileName, entry); + if ((ret==KErrNotFound && iLocalisableResourceFileTimeStamp!=TTime(0)) || + (ret==KErrNone && entry.iModified!=iLocalisableResourceFileTimeStamp)) + { + changed = ETrue; + } + } + } + } + } + } + if (changed) + { + // re-read data + // Ignore result, nothing we can do in case failure + // and the old values should be preserved +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + const TInt ignore = StoreApplicationInformation(); +#else + const TInt ignore = StoreApplicationInformation(aDefaultAppIconFileName); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + } //lint !e529 Symbol 'ignore' not subsequently referenced + + else + { + if (iIconFileName) + { + ret = iFs.Entry(*iIconFileName, entry); + // See if the icon file has been "modified" + // It could have been replaced with a differnt version, deleted or added + // if the icon file specified in the resource was missing + if ((ret==KErrNotFound && iIconFileTimeStamp!=TTime(0)) || + (ret==KErrNone && entry.iModified!=iIconFileTimeStamp)) + { + // Assume the icon file has changed + iIconFileTimeStamp = entry.iModified; + changed = ETrue; + } + } + } + + __APA_PROFILE_END(17); + return changed; + } + +EXPORT_C TDataTypePriority CApaAppData::DataType(const TDataType& aDataType) const +// returns the priority of the data type +/** If the application supports the specified data type, the function returns +the priority with which it should be selected for handling it. + +If the application does not support the specified data type, +KDataTypePriorityNotSupported is returned. + +Note that the function supports wildcard matching, using "*" and "?". In the case +of a wildcard match, the priority value returned is reduced by 1, so that in this +case, the application could never have the maximum priority +(KDataTypePriorityUserSpecified). + +@param aDataType The data type of interest. +@return The priority with which the application should be selected for handling +the specified data type, or KDataTypePriorityNotSupported if the data type is +not supported. */ + { + if (iIndexOfFirstOpenService >= 0) + { + const CArrayFixFlat& dataTypeArray = + (*iServiceArray)[iIndexOfFirstOpenService].DataTypes(); + return DataType(aDataType, dataTypeArray); + } + return KDataTypePriorityNotSupported; + } + + +EXPORT_C TBool CApaAppData::IsPending() const +/* Returns true if the app info is not yet updated by the current scan. */ + { + return (iIsPresent==CApaAppData::EPresentPendingUpdate + || iIsPresent==CApaAppData::ENotPresentPendingUpdate); + } + +EXPORT_C TBool CApaAppData::CanUseScreenMode(TInt aScreenMode) +/** Tests whether the specified screen mode is valid for any of +this application's views. If the app has no views, the function +assumes that only the default screen mode (at screen mode index +zero) is allowed. This function is used by CApaAppList to create +a list of valid applications. + +@param aScreenMode The index of the screen mode. +@return True if screen mode is valid, otherwise false. */ + { + const TInt count=iViewDataArray->Count(); + // If there are no views, assume only the default screen mode is allowed + TBool ret=(count==0 && aScreenMode==0); + for(TInt ii=0;iiScreenMode()==aScreenMode) + { + ret=ETrue; + break; + } + } + return ret; + } + +EXPORT_C void CApaAppData::GetIconInfo(TInt& aIconCount, TInt& aDefaultIconsUsed) const +/** Gets icon information for the app. If the icons for the application are not yet loaded then it would be loaded first. + +@param aIconCount On return, this contains the number of app icons +@param aDefaultIconsUsed On return, this indicates whether the default icons have been used +*/ + { + aIconCount = iIcons->Count(); + aDefaultIconsUsed = iIcons->DefaultIconsUsed(); + } + +/** Gets the default screen number used by the application. + +A device may have more than once screen. This function +returns the number associated with the screen which will +be the default screen used by the application. + +@return The default screen number +*/ +EXPORT_C TUint CApaAppData::DefaultScreenNumber() const + { + return iDefaultScreenNumber; + } + +/** Returns true if app info was provided by a registration file + +@return true if app info was provided by a registration file +*/ +EXPORT_C TBool CApaAppData::RegistrationFileUsed() const + { + return iRegistrationFile != NULL; + } + +/** Returns the full filename of the registration resource file + +@return The full path and filename of the registration resource file. +@internalTechnology +*/ +EXPORT_C TPtrC CApaAppData::RegistrationFileName() const + { + if (iRegistrationFile) + { + return *iRegistrationFile; + } + else + { + return TPtrC(KNullDesC); + } + } + + +/** Returns the full filename of the localisable resource file + +@return The full path and filename of the localisable resource file. +@internalTechnology +*/ +EXPORT_C TPtrC CApaAppData::LocalisableResourceFileName() const + { + if (iLocalisableResourceFileName) + { + return *iLocalisableResourceFileName; + } + else + { + return TPtrC(KNullDesC); + } + } + + +/** Returns the non-native application opaque data + +@return The non-native application opaque data. +@internalComponent +*/ +EXPORT_C TPtrC8 CApaAppData::OpaqueData() const + { + if (iOpaqueData) + { + return *iOpaqueData; + } + else + { + return TPtrC8(KNullDesC8); + } + } + +EXPORT_C TUid CApaAppData::NonNativeApplicationType() const +/** @internalComponent */ + { + return iNonNativeApplicationType; + } + +/** Returns the full filename of the file containing application icons + +@return The full path and filename of the icon file. +*/ +EXPORT_C TPtrC CApaAppData::IconFileName() const + { + if (iIconFileName) + { + return *iIconFileName; + } + else + { + return TPtrC(KNullDesC); + } + } + +/** Returns true if the application provides a non-MBM icon filename. + +If this function returns false, this does not necessarily mean +an MBM icon filename is provided. + +@return true if the application provides a non-MBM icon filename. +*/ +EXPORT_C TBool CApaAppData::NonMbmIconFile() const + { + return iNonMbmIconFile; + } + + +/** Determines the current language the application is using to display its +user interface. +@return The current language. +*/ +EXPORT_C TLanguage CApaAppData::ApplicationLanguage() const + { + return iApplicationLanguage; + } + +/** Returns true if the application implements the specified service. +@param aServiceUid The service UID. +@return true if the application implements the specified service. +@internalComponent +*/ +EXPORT_C TBool CApaAppData::ImplementsService(TUid aServiceUid) const + { + if (iServiceArray) + { + TInt count = iServiceArray->Count(); + for (TInt i = count-1; i >= 0; i--) + { + if ((*iServiceArray)[i].Uid() == aServiceUid) + { + return ETrue; + } + } + } + return EFalse; + } + +/** Checks if the application implements the specified service and if the +service explicitly supports the datatype. Explicitly means that the datatype is +listed in the service's list of datatype in the registration file and is +not the general datatype associated with the application (aka the Open service). +@param aServiceUid The service UID. +@param aDataType The datattype +@return The priority. KDataTypePriorityNotSupported if the app doesn't support +this service with this datatype. +@internalComponent +*/ +TInt CApaAppData::ImplementsServiceWithDataType(TUid aServiceUid, const TDataType& aDataType) const + { + TInt result = KDataTypePriorityNotSupported; + if (iServiceArray) + { + TInt count = iServiceArray->Count(); + for (TInt i = count-1; i >= 0; i--) + { + // There can be more than one instance of a given service so we iterate + // through the whole service list even if we have already found a suitable + // service. + if ((*iServiceArray)[i].Uid() == aServiceUid) + { + const CArrayFixFlat& datatypes = + (*iServiceArray)[i].DataTypes(); + TInt priority = DataType(aDataType, datatypes); + if (priority > result) + { + result = priority; + } + } + } + } + return result; + } + +EXPORT_C void CApaAppData::SetShortCaptionL(const TDesC& aShortCaption) + { + if(iShortCaption->Compare(aShortCaption) != 0) + { + HBufC* newShortCaption=aShortCaption.AllocL(); + if (!iShortCaptionFromResourceFile) + { // store the rsc file caption into iShortCaptionFromResourceFile so that it can be externalized. + iShortCaptionFromResourceFile = iShortCaption; + } + else + { + delete iShortCaption; + } + iShortCaption = newShortCaption; + } + } + +/** Sets the caption of the application. If the caption is from central repository, + it overrides tha value from the resource file. +*/ +EXPORT_C void CApaAppData::SetCaptionL(const TDesC& aCaption) + { + if(iCaption->Compare(aCaption) != 0) + { + HBufC* newCaption=aCaption.AllocL(); + if (!iCaptionFromResourceFile) + { // store the rsc file caption into iCaptionFromResourceFile so that it can be externalized. + iCaptionFromResourceFile = iCaption; + } + else + { + delete iCaption; + } + iCaption = newCaption; + } + } + +/** Sets the icon details of an application. If these details are from the central repository, + it overrides the value in the resource file and loads it. +*/ +EXPORT_C void CApaAppData::SetIconsL(const TDesC& aFileName, TInt aNumIcons) + { + if (iIconFileName && + iIconFileName->Compare(aFileName) == 0 && + iNumOfAppIcons == aNumIcons) + return; + + if (!iIconFileNameFromResourceFile) + { + iNumOfAppIconsFromResourceFile = iNumOfAppIcons; + iIconFileNameFromResourceFile = iIconFileName; + iIconFileName = NULL; + iNonMbmIconFileFromResourceFile = iNonMbmIconFile; + iIconFileTimeStampFromResourceFile = iIconFileTimeStamp; + } + + iNonMbmIconFile = !CApaAppInfoReaderV2::FileIsMbm(aFileName); + iNumOfAppIcons = aNumIcons; + + if (aFileName != KNullDesC) + { + iIconFileName = aFileName.AllocL(); + if (!iNonMbmIconFile) + { + if (iNumOfAppIcons > 0) + { + // Creates an Application Icon Array + CApaAppIconArray* icons = CApaAppIconArray::NewAppIconsL(iNumOfAppIcons, *iIconFileName, *iIconLoader); + delete iIcons; + iIcons = icons; + } + } + else + { // Creates an Empty Icon Array if application has Non-Mbm Icons + CApaAppIconArray* icons = CApaAppIconArray::NewL(); + delete iIcons; + iIcons = icons; + } + } + else + { + CApaAppIconArray* icons = CApaAppIconArray::NewDefaultIconsL(); + delete iIcons; + iIcons = icons; + } + } + +void CApaAppData::SetAppPending() + { + if (iIsPresent == CApaAppData::ENotPresent + || iIsPresent == CApaAppData::ENotPresentPendingUpdate) + { + iIsPresent = CApaAppData::ENotPresentPendingUpdate; + } + else + { + iIsPresent = CApaAppData::EPresentPendingUpdate; + } + } + +// +// Class CApaAppList +// + +EXPORT_C CApaAppList* CApaAppList::NewL(RFs& aFs,CApaAppRegFinder* aAppRegFinder, TBool aLoadMbmIconsOnDemand, TInt aIdlePeriodicDelay) + { + CApaAppList* self=new CApaAppList(aFs, aAppRegFinder, aLoadMbmIconsOnDemand, aIdlePeriodicDelay); + if (!self) + { + delete aAppRegFinder; + User::LeaveNoMemory(); + } + else + { + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + } + return self; + } + +CApaAppList::CApaAppList(RFs& aFs, CApaAppRegFinder* aAppRegFinder, TBool aLoadMbmIconsOnDemand, TInt aIdlePeriodicDelay) + :iFs(aFs), + iFlags(0), + iAppRegFinder(aAppRegFinder), + iIdlePeriodicDelay(aIdlePeriodicDelay), + iLoadMbmIconsOnDemand(aLoadMbmIconsOnDemand), + iUninstalledApps(NULL) + { + } + +void CApaAppList::ConstructL() + { + User::LeaveIfError(iFsShareProtected.Connect()); + User::LeaveIfError(iFsShareProtected.ShareProtected()); + User::LeaveIfError(Dll::SetTls(this)); + + //Start language change monitor. + iAppLangMonitor = CApaLangChangeMonitor::NewL(*this); + GetAppsListCachePathL(); + } + +EXPORT_C CApaAppList::~CApaAppList() +/** Frees all resources prior to destruction, including the application data list. */ + { + iValidFirstAppData = NULL; + DeleteAppData(); + + iAppData = NULL; + iObserver = NULL; + iFsShareProtected.Close(); + + delete iDefaultIconArray; + delete iDefaultAppIconMbmFileName; + delete iAppRegFinder; + delete iAppIdler; + delete iAppListStorer; + delete iAppIconLoader; + delete iAppLangMonitor; + iAppsListCacheFileName.Close(); + iAppsListCacheBackUpFileName.Close(); + iAppsListCachePath.Close(); + } + +// Stop scanning applications if and uninstallation has started +EXPORT_C void CApaAppList::StopScan(TBool aNNAInstall) + { + if (aNNAInstall) + { + iNNAInstallation = ETrue; + } + if (iAppIdler) + { + delete iAppIdler; + iAppIdler=NULL; + } + UndoSetPending(iAppData); + } + +// Allow scanning when uninstallation is complete +EXPORT_C void CApaAppList::RestartScanL() + { + TRAP_IGNORE(PurgeL()); + StartIdleUpdateL(); + } + +EXPORT_C TBool CApaAppList::AppListUpdatePending() + { + return iNNAInstallation; + } + +void CApaAppList::UndoSetPending(CApaAppData* aAppData) + // Reset all apps to pevious pending state so they don't get purged + { + for (; aAppData; aAppData = aAppData->iNext) + { + if (aAppData->iIsPresent == CApaAppData::EPresentPendingUpdate) + { + aAppData->iIsPresent = CApaAppData::EIsPresent; + } + } + } + +EXPORT_C void CApaAppList::StartIdleUpdateL() +/** Updates the list asynchronously, using an idle time active object, +and no observer. When the update is finished, the resulting app +list is stored. */ + { + // find the default icons (.mbm file) for applications, wrt current locale + CreateDefaultAppIconFileNameL(); + + // File operation is abandoned if it is in progress. + if (iAppListStorer && iAppListStorer->IsActive()) + { + delete iAppListStorer; + iAppListStorer = NULL; + } + + // Stops icon loading if it is in progress. + if (iAppIconLoader && iAppIconLoader->IsActive()) + { + delete iAppIconLoader; + iAppIconLoader = NULL; + } + + // DEF076594 - if changing locale, need to update the default icons here + // If updating the default icons array fails, the array is left in the state + // it was in before the call. + if(iDefaultIconArray) + { + TRAP_IGNORE(UpdateDefaultIconsL()); + } + + // start to scan. + if (iAppIdler) + { + delete iAppIdler; + iAppIdler=NULL; + } + + // DEF072701 + // When performing the update scan let the idle object have lower priority. + if (IsFirstScanComplete()) + { + iAppIdler=CPeriodic::NewL(CActive::EPriorityLow); + } + else + { + iAppIdler=CPeriodic::NewL(CActive::EPriorityStandard); + } + SetPending(iAppData); + iAppRegFinder->FindAllAppsL(); + + // DEF072701 + // If this is the first scan i.e the boot scan then it may take some time. Thus + // the periodic delay value should be used so that this process will stop periodically + // to allow time for other processes. + // If this is just a re-scan it should take much less time. Therefore it should just + // be completed in one go rather than periodically delayed. Thus the delay value + // should be set to 0. + iAppIdler->Start(KIdleStartDelay, IsFirstScanComplete()? 0 : iIdlePeriodicDelay, TCallBack(IdleUpdateCallbackL, this)); + } + +EXPORT_C void CApaAppList::StartIdleUpdateL(MApaAppListObserver* aObserver) +/** Updates the list asynchronously, using an idle time active object +and an observer. When the update is finished, the resulting app list +is stored and the observer is notified with an MApaAppListServObserver::EAppListChanged +message, if the list changed. +@param aObserver Observer to be notified when the update has finished. */ + { + iObserver=aObserver; + + // Rename Appslist.bin file to AppsList_Backup.bin, so that it can be renamed back, if rescan/update scan does not change applist. + TInt replaceError = iFs.Replace(iAppsListCacheFileName, iAppsListCacheBackUpFileName); + if (replaceError != KErrNone) + { + iFs.Delete(iAppsListCacheFileName); + } + StartIdleUpdateL(); + } + +void CApaAppList::CreateDefaultAppIconFileNameL() + { + TFileName tempFileName(KDefaultAppIconMbm); + BaflUtils::NearestLanguageFile(iFs, tempFileName); + delete iDefaultAppIconMbmFileName; + iDefaultAppIconMbmFileName = NULL; + iDefaultAppIconMbmFileName = tempFileName.AllocL(); + } + +EXPORT_C void CApaAppList::InitListL(MApaAppListObserver* aObserver) +/** It Restores the data present in the AppsList.bin file and updates the applist. + * If Restore operation fails then it + * starts updating the list asynchronously, by calling StartIdleUpdateL(). + +@param aObserver Observer to be notified when the update has finished. */ + { + DeleteAppsListBackUpAndTempFiles(); + TInt ret = KErrGeneral; +//#ifndef __WINS__ // on the emulator, don't read app list from file, as doing so means apps + // built while the emulator isn't running won't appear in the list + TRAP(ret, RestoreL()); +//#endif + if (ret != KErrNone) + { + // There was an error during restore, so update the list asynchronously. + DeleteAppData(); + iFs.Delete(iAppsListCacheFileName); + StartIdleUpdateL(aObserver); + } + else + { + iObserver = aObserver; + if (iLoadMbmIconsOnDemand) + { + InitiateStoringOfAppList(); + } + else + { + StartIconLoadingL(); + } + } + } + +void CApaAppList::StartIconLoadingL() + { + iAppIconLoader = new(ELeave) CApaIdleIconLoader(iAppData, iFs, *this); + iAppIconLoader->Start(); + } + +void CApaAppList::ScanRemovableDrivesAndUpdateL() +/** Rename Appslist.bin file to AppsList_Backup.bin, so that it can be renamed back, + if the update scan on removable media drives does not change applist. */ + { + const RArray& listOfRemovableMediaDrives = iAppRegFinder->DriveList(); + const TInt count = listOfRemovableMediaDrives.Count(); + + // Removable media scan would take place only if removable drives are present. + if (count) + { + CApaAppData* appData = iAppData; + while (appData) + { + for (TInt driveIndex = 0; driveIndex < count; ++driveIndex) + { + if (TParsePtrC(*appData->iRegistrationFile).Drive() == listOfRemovableMediaDrives[driveIndex].iDriveUnit.Name()) + { + appData->SetAppPending(); + break; + } + } + appData = appData->iNext; + } + + while (IdleUpdateL()) + { // It updates the removable media apps present in AppList if it has changed. + + }; + } + } + +void CApaAppList::DeleteAppsListBackUpAndTempFiles() +/** Deletes all files inside AppsListCache folder except AppsList.bin */ + { + _LIT(KTemp, "AppsList.bin"); + CDir* cache = NULL; + TInt ret = iFs.GetDir(iAppsListCachePath, KEntryAttNormal, ESortNone, cache); + if (ret == KErrNone) + { + const TInt count = cache->Count(); + for (TInt i = 0; i < count; ++i) + { + TBufC cacheFileName = (*cache)[i].iName; + #if defined (SYMBIAN_BAFL_SYSUTIL) + if ((cacheFileName.Match(KTemp) == KErrNotFound) && (cacheFileName.Match(KROMVersionStringCacheFileName) == KErrNotFound)) + #else + if ((cacheFileName.Match(KTemp) == KErrNotFound)) + #endif + { + TFileName fileNameToDelete; + fileNameToDelete.Append(iAppsListCachePath); + fileNameToDelete.Append(cacheFileName); + iFs.Delete(fileNameToDelete); + } + } + delete cache; + } + } + +void CApaAppList::RestoreL() +/** It restores the data present in the AppsList.bin file */ + { + RFileReadStream theReadStream; + User::LeaveIfError(theReadStream.Open(iFs, iAppsListCacheFileName, EFileRead)); + CleanupClosePushL(theReadStream); + + TLanguage appListFileLanguage = (TLanguage)theReadStream.ReadInt32L(); + if (appListFileLanguage != User::Language()) + { + User::Leave(KErrNotSupported); + } + +#if defined (SYMBIAN_BAFL_SYSUTIL) + //Build the filename for the cache file + TInt maxSizeofFileName = iAppsListCachePath.Length() + KROMVersionStringCacheFileName().Length(); + RBuf romVersionCacheFileName; + romVersionCacheFileName.CreateL(maxSizeofFileName); + romVersionCacheFileName.CleanupClosePushL(); + romVersionCacheFileName.Append(iAppsListCachePath); + romVersionCacheFileName.Append(KROMVersionStringCacheFileName()); + + RFileReadStream romVerStream; + User::LeaveIfError(romVerStream.Open(iFs,romVersionCacheFileName,EFileRead)); + CleanupClosePushL(romVerStream); + + TVersion actualROMVersionCacheFileVersion(KROMVersionCacheFileMajorVersion, KROMVersionCacheFileMinorVersion, KROMVersionCacheFileBuildVersion); + TVersionName actualROMVersionCacheFileVersionName = actualROMVersionCacheFileVersion.Name(); + + //read the rom file version + TInt8 romVersionCacheFileMajorVersion = romVerStream.ReadInt8L(); + TInt8 romVersionCacheFileMinorVersion = romVerStream.ReadInt8L(); + TInt16 romVersionCacheFileBuildVersion = romVerStream.ReadInt16L(); + TVersion romVersionCacheFileVersion(romVersionCacheFileMajorVersion, romVersionCacheFileMinorVersion, romVersionCacheFileBuildVersion); + TVersionName romVersionCacheFileVersionName = romVersionCacheFileVersion.Name(); + + //If persisted file version differs from what apparc can handle, recreate rom version file and applist.bin + if (romVersionCacheFileVersionName.Compare(actualROMVersionCacheFileVersionName) != 0) + { + User::Leave(KErrGeneral); + } + + //Read the length & value of software version from it. + TBuf softwareVersion; + TUint32 length = romVerStream.ReadUint32L(); + if (length>KInfoBufLength) + { + //File must be corrupt, an attempt to read will panic + User::Leave(KErrCorrupt); + } + romVerStream.ReadL(softwareVersion, length); + + //the persisted version has been successfully read + //read the actual current version string + TBuf actualSoftwareVersion; + TInt err = SysUtil::GetSWVersion(actualSoftwareVersion); //use the SysUtil implementation + if(err == KErrNone) + { + if (softwareVersion.Compare(actualSoftwareVersion) != 0) + { + //Leave if the current version is different from the previous stored version and recreate applist. +#ifdef _DEBUG + RDebug::Print(_L("!!Firmware update detected!! Rebuilding AppList")); +#endif + User::Leave(KErrGeneral); + } + } + else + { + //Leave if any error reading the version information, except if file is not present + if (err != KErrPathNotFound && err != KErrNotFound) + { +#ifdef _DEBUG + RDebug::Print(_L("!!Error %d reading Firmware version. Rebuilding AppList"),err); +#endif + User::Leave(err); + } + } + CleanupStack::PopAndDestroy(2); //romVerStream, romVersionCacheFileName +#endif + + // Create Default Icon File Name + CreateDefaultAppIconFileNameL(); + + TInt ret = KErrNone; + while (ret == KErrNone) + { + CApaAppData* const pApp = new (ELeave) CApaAppData(iFs); + CleanupStack::PushL(pApp); + + // Restore entries till we leave + TRAP(ret, pApp->InternalizeL(theReadStream)); + + if (ret != KErrNone && ret != KErrEof) + { + User::Leave(ret); + } + // Check that the app has not been added to the list twice + if (ret == KErrNone && !AppDataByUid(pApp->iUidType[2])) + { + AddToList(pApp); + CleanupStack::Pop(pApp); + } + else + { // Delete pApp if an End of File condition is reached or the app has been added to the list twice + CleanupStack::PopAndDestroy(pApp); + } + } + // Close the stream; + CleanupStack::PopAndDestroy(&theReadStream); + + iFs.Rename(iAppsListCacheFileName, iAppsListCacheBackUpFileName); + iAppRegFinder->FindAllRemovableMediaAppsL(); // Builds the Removable Media Drive List + + iFlags |= ENotifyUpdateOnFirstScanComplete; + + // It runs an update scan on removable media apps. + ScanRemovableDrivesAndUpdateL(); + } + +EXPORT_C TBool CApaAppList::IsLanguageChangePending() const +/** Returns ETrue if a language change event is received and a re-scan is in progress otherwise EFalse. */ + { + return (iFlags & ELangChangePending); + } + +void CApaAppData::InternalizeL(RReadStream& aReadStream) +/** Internalizes the appdata from the AppsList.bin file */ + { + TUint highTime = aReadStream.ReadUint32L(); + TUint lowTime = aReadStream.ReadUint32L(); + iTimeStamp = TTime(MAKE_TINT64(highTime, lowTime)); + + highTime = aReadStream.ReadUint32L(); + lowTime = aReadStream.ReadUint32L(); + iIconFileTimeStamp = TTime(MAKE_TINT64(highTime, lowTime)); + iCaption = HBufC::NewL(aReadStream, KMaxFileName); // Caption + iShortCaption = HBufC::NewL(aReadStream, KMaxFileName); // Shortcaption + iFullName = HBufC::NewL(aReadStream, KMaxFileName); // Filename of application binary + + TUid uid1; + uid1.iUid = aReadStream.ReadUint32L(); + TUid uid2; + uid2.iUid = aReadStream.ReadUint32L(); + TUid uid3; + uid3.iUid = aReadStream.ReadUint32L(); + iUidType = TUidType(uid1, uid2, uid3); // Application UID + + aReadStream >> iCapabilityBuf; + + iRegistrationFile = HBufC::NewL(aReadStream, KMaxFileName); // Registration Filename + + iDefaultScreenNumber = aReadStream.ReadUint32L(); // Default Screen number + + iNumOfAppIcons = aReadStream.ReadInt32L(); // No. of icons + + iNonMbmIconFile = aReadStream.ReadUint32L(); + + HBufC* iconFileName = HBufC::NewL(aReadStream, KMaxFileName); // Icon Filename + if (*iconFileName != KNullDesC) + { + iIconFileName = iconFileName; + if (!iNonMbmIconFile) + { + if (iNumOfAppIcons > 0) + { // Create IconLoader to load icons + iIconLoader = CApaIconLoader::NewL(iFs); + // Creates an Application Icon Array + iIcons = CApaAppIconArray::NewAppIconsL(iNumOfAppIcons, *iIconFileName, *iIconLoader); + } + else + TRAP_IGNORE(iIcons = CApaAppIconArray::NewDefaultIconsL()); // Creates and Loads Default Icons. + } + else + { // Creates an Empty Icon Array if application has Non-Mbm Icons + iIcons = CApaAppIconArray::NewL(); + } + } + else + { + delete iconFileName; + TRAP_IGNORE(iIcons = CApaAppIconArray::NewDefaultIconsL()); // Creates and Loads Default Icons. + } + + HBufC* localisableResourceFileName = HBufC::NewL(aReadStream, KMaxFileName); // Registration Filename + if (*localisableResourceFileName != KNullDesC) + { + iLocalisableResourceFileName = localisableResourceFileName; + } + else + { + delete localisableResourceFileName; + } + + highTime = aReadStream.ReadUint32L(); + lowTime = aReadStream.ReadUint32L(); + iLocalisableResourceFileTimeStamp = TTime(MAKE_TINT64(highTime, lowTime)); // Localisable file timestamp + + iApplicationLanguage = (TLanguage)aReadStream.ReadInt32L(); // Application Language + + iIndexOfFirstOpenService = aReadStream.ReadUint32L(); // Index of first open service + + iNonNativeApplicationType.iUid = aReadStream.ReadUint32L(); + + HBufC8* opaqueData = HBufC8::NewL(aReadStream, KMaxFileName); // Opaque Data + if (*opaqueData != KNullDesC8) + { + iOpaqueData = opaqueData; + } + else + { + delete opaqueData; + } + + iViewDataArray = new(ELeave) CArrayPtrFlat(1); // ViewDataArray + const TInt viewCount = aReadStream.ReadInt32L(); + TInt i; + for (i = 0; i < viewCount; ++i) + { + CApaAppViewData* pView = CApaAppViewData::NewLC(); + + pView->iCaption = HBufC::NewL(aReadStream, KMaxFileName); + pView->iNumOfViewIcons = aReadStream.ReadUint32L(); + pView->iNonMbmIconFile = aReadStream.ReadUint32L(); + HBufC* iconFileName = HBufC::NewL(aReadStream, KMaxFileName); // Icon Filename + if (*iconFileName != KNullDesC) + { + pView->iIconFileName = iconFileName; + if (!pView->iNonMbmIconFile) + { + if (pView->iNumOfViewIcons > 0) + { + if (!iIconLoader) + { // Create Icon Loader if it was not done for App or any of the previous views for the App. + iIconLoader = CApaIconLoader::NewL(iFs); + } + // Creates an Application View Icon Array + CApaAppIconArray* iconViewArray = CApaAppIconArray::NewViewIconsL(pView->iNumOfViewIcons, *pView->iIconFileName, *iIconLoader); + pView->SetIconArray(iconViewArray); + } + } + } + else + { + delete iconFileName; + } + pView->iScreenMode = aReadStream.ReadUint32L(); + pView->iUid.iUid = aReadStream.ReadUint32L(); + + iViewDataArray->AppendL(pView); + CleanupStack::Pop(pView); + } + + iServiceArray = new(ELeave) CArrayFixFlat(1); + const TInt serviceCount = aReadStream.ReadUint32L(); + + for (i = 0; i < serviceCount; ++i) + { + TApaAppServiceInfo serviceInfo ; + aReadStream >> serviceInfo; + iServiceArray->AppendL(serviceInfo); + } + + iOwnedFileArray = new(ELeave) CDesCArraySeg(1); + const TInt fileCount = aReadStream.ReadUint32L(); + for (i = 0; i < fileCount; ++i) + { + TFileName ownedFile; + aReadStream >> ownedFile; + iOwnedFileArray->AppendL(ownedFile); + } + } + +TBool CApaAppData::ViewMbmIconsRequireLoading() const + { + const TInt count = iViewDataArray->Count(); + for (TInt i = 0; i < count; ++i) + { + const CApaAppViewData* const viewData = iViewDataArray->At(i); + if ((!viewData->iNonMbmIconFile) && (!viewData->iIcons->AreViewIconsLoaded())) + { + return ETrue; + } + } + return EFalse; + } + +TBool CApaAppData::MbmIconsRequireLoading() const + { + if (!iNonMbmIconFile) + { + if (!iIcons->AreAppIconsLoaded()) + { + return ETrue; + } + } + + if (ViewMbmIconsRequireLoading()) + {// if a view has mbm icons, and its not yet loaded we should load its icons. + return ETrue; + } + return EFalse; // icons were loaded already so no need to load them again. + } + +void CApaAppData::ExternalizeL(RWriteStream& aWriteStream) const + { + aWriteStream.WriteUint32L(I64HIGH(iTimeStamp.Int64())); + aWriteStream.WriteUint32L(I64LOW(iTimeStamp.Int64())); + + if (iIconFileNameFromResourceFile) + { + aWriteStream.WriteUint32L(I64HIGH(iIconFileTimeStampFromResourceFile.Int64())); + aWriteStream.WriteUint32L(I64LOW(iIconFileTimeStampFromResourceFile.Int64())); + } + else + { + aWriteStream.WriteUint32L(I64HIGH(iIconFileTimeStamp.Int64())); + aWriteStream.WriteUint32L(I64LOW(iIconFileTimeStamp.Int64())); + } + + if (iCaptionFromResourceFile) // Caption present in the resource file would be externalized if the one in applist has dynamically changed + { + aWriteStream << *iCaptionFromResourceFile; + } + else + { + aWriteStream << *iCaption; + } + + if (iShortCaptionFromResourceFile) // Short caption present in the resource file would be externalized if the one in applist has dynamically changed + { + aWriteStream << *iShortCaptionFromResourceFile; + } + else + { + aWriteStream << *iShortCaption; + } + aWriteStream << *iFullName; // FullName + + TInt i; + for (i = 0; i < 3; ++i) + { + aWriteStream << iUidType[i]; // Uid Type + } + + aWriteStream << iCapabilityBuf; + aWriteStream << RegistrationFileName(); // Registration filename + aWriteStream.WriteUint32L(iDefaultScreenNumber); // Default screen number + + if (iIconFileNameFromResourceFile) + { + aWriteStream.WriteUint32L(iNumOfAppIconsFromResourceFile); // number of icons + + aWriteStream.WriteUint32L(iNonMbmIconFileFromResourceFile); + + aWriteStream << *iIconFileNameFromResourceFile; + } + else + { + aWriteStream.WriteUint32L(iNumOfAppIcons); // number of icons + + aWriteStream.WriteUint32L(iNonMbmIconFile); + + aWriteStream << IconFileName(); + } + + aWriteStream << LocalisableResourceFileName(); + + aWriteStream.WriteUint32L(I64HIGH(iLocalisableResourceFileTimeStamp.Int64())); + aWriteStream.WriteUint32L(I64LOW(iLocalisableResourceFileTimeStamp.Int64())); + + aWriteStream.WriteInt32L(iApplicationLanguage); + + aWriteStream.WriteUint32L(iIndexOfFirstOpenService); + + aWriteStream.WriteUint32L(iNonNativeApplicationType.iUid); + + aWriteStream << OpaqueData(); + + TInt count = iViewDataArray->Count(); + aWriteStream.WriteUint32L(count); + + for (i = 0; i < count; ++i) + { + const CApaAppViewData* const viewData = iViewDataArray->At(i); + aWriteStream << *(viewData->iCaption); + aWriteStream.WriteUint32L(viewData->iNumOfViewIcons); + aWriteStream.WriteUint32L(viewData->iNonMbmIconFile); + aWriteStream << viewData->IconFileName(); + aWriteStream.WriteUint32L(viewData->iScreenMode); + aWriteStream.WriteUint32L(viewData->iUid.iUid); + } + + // TApaAppServiceInfo service array + if (iServiceArray) + { + count = iServiceArray->Count(); + aWriteStream.WriteUint32L(count); + for (i = 0; i < count; ++i) + { + aWriteStream << iServiceArray->At(i); + } + } + else + { + aWriteStream.WriteUint32L(NULL); + } + + if (iOwnedFileArray) + { + count = iOwnedFileArray->MdcaCount(); + aWriteStream.WriteUint32L(count); + for (i = 0; i < count; ++i) + { + aWriteStream << (*iOwnedFileArray)[i]; + } + } + else + { + aWriteStream.WriteUint32L(0); + } + } + +TInt CApaAppList::IdleUpdateCallbackL(TAny* aObject) + { + CApaAppList* self=REINTERPRET_CAST(CApaAppList*,aObject); + const TBool moreToCome=self->IdleUpdateL(); + if (moreToCome==EFalse) + { + //Reset language change flag if scanning is over. + if (self->IsLanguageChangePending()) + { + self->iFlags &= ~ELangChangePending; + } + self->StopIdler(); + if (self->iLoadMbmIconsOnDemand) + { + self->InitiateStoringOfAppList(); + } + else + { + self->StartIconLoadingL(); + } + } + return moreToCome; + } + +void CApaAppList::StoreL() + { + iAppListStorer = CApaAppListStorer::NewL(iAppData, iFs, *this); + iAppListStorer->StartL(KAppListToFileStartDelay); + } + +void CApaAppList::NotifyObserver() + { + if (iObserver) + { + if (iFlags & EAppListHasChanged || iFlags & ENotifyUpdateOnFirstScanComplete) + { + // NotifyUpdate will notify clients for both list update and scan complete. + iObserver->NotifyUpdate(MApaAppListServObserver::EAppListChanged); + } + else + { + // NotifyScanComplete will notify clients for scan complete. + iObserver->NotifyScanComplete(); + } + iObserver=NULL; + } + } + +void CApaAppList::StopIdler() + { + delete iAppIdler; + iAppIdler=NULL; + } + +TInt CApaAppList::IdleUpdateL() +// returns ETrue if there is more scanning to be done. + { + TBool more=EFalse; + TApaAppEntry currentApp = TApaAppEntry(); + TRAPD(err,more=iAppRegFinder->NextL(currentApp, iForcedRegistrations)); + if (err!=KErrNone) + { + if (iFlags & ENotifyUpdateOnFirstScanComplete) + { + User::Leave(err); + } + return more; + } + TBool hasChanged=EFalse; + if (more) + { + TRAPD(err,UpdateNextAppL(currentApp,hasChanged)); + if (err!=KErrNone) + { + SetNotFound(iAppData,hasChanged); + if (iFlags & ENotifyUpdateOnFirstScanComplete) + { + User::Leave(err); + } + more=EFalse; // abandon ship + } + } + else + { + SetNotFound(iAppData,hasChanged); + PurgeL(); + } + + if (hasChanged) + { + iFlags |= EAppListHasChanged; + } + return more; + } + +EXPORT_C TBool CApaAppList::IsIdleUpdateComplete() const +/** Tests whether an asynchronous update of the list is currently in progress. + +@return True if no asynchronous update of the list is currently in progress, +otherwise false. */ + { + return iAppIdler == NULL; + } + +void CApaAppList::SetPending(CApaAppData* aAppData) + // set all apps to pending update - we'll find them again as we scan + { + for (; aAppData; aAppData = aAppData->iNext) + { + aAppData->SetAppPending(); + } + } + +void CApaAppList::SetNotFound(CApaAppData* aAppData, TBool& aHasChanged) + // mark any unfound apps not present + { + while (aAppData) + { + if (aAppData->IsPending()) + { + aAppData->iIsPresent = CApaAppData::ENotPresent; + aHasChanged = ETrue; + } + aAppData = aAppData->iNext; + } + } + +void CApaAppList::AddToList( CApaAppData* aAppData ) +{ + __ASSERT_DEBUG(aAppData, Panic(EPanicNullPointer)); + aAppData->iNext=iAppData; + iAppData=aAppData; +} + +void CApaAppList::UpdateNextAppL(const TApaAppEntry& aAppEntry,TBool& aHasChanged) + { + CApaAppData* appData=AppDataByUid(aAppEntry.iUidType[2]); + if (appData==NULL) + {// not in list, so add it at the start + TRAPD(err,appData=CApaAppData::NewL(aAppEntry, iFs)); + if (err==KErrNone) + { + AddToList( appData ); + aHasChanged=ETrue; + } + } + else if (appData->IsPending()) + { // not found yet during current scan - we may need to override this one + + // On a system which scans for registration .RSC files (V2 apps) first, followed by + // .APP files (V1 apps), it's valid for a V1 app to override a V2 app (if the V2 app + // has just been removed). If this is the case, assume it's ok to compare the V1 .APP filename, + // with the V2 .RSC filename as their filenames will never match (which is what we want in this case). + TPtrC currentFileName; + if (appData->RegistrationFileUsed()) + { + currentFileName.Set(*appData->iRegistrationFile); + } + else + { + currentFileName.Set(*appData->iFullName); + } + if (aAppEntry.iFullName.CompareF(currentFileName)!=0) + { + delete appData->iSuccessor; + appData->iSuccessor = NULL; + appData->iSuccessor = CApaAppEntry::NewL(aAppEntry); + + + appData->iIsPresent = CApaAppData::ESuperseded; + aHasChanged=ETrue; + } + else + { + if (appData->Update() + || appData->iIsPresent==CApaAppData::ENotPresentPendingUpdate) + { + aHasChanged=ETrue; + } + appData->iIsPresent = CApaAppData::EIsPresent; + } + } + } + +/** +@internalComponent +*/ +EXPORT_C CApaAppData* CApaAppList::FindAndAddSpecificAppL(CApaAppRegFinder* aFinder, TUid aAppUid) + { +//Scans and adds the specified application to the app list if found + __ASSERT_DEBUG(aFinder, Panic(EPanicNullPointer)); + TBool found = EFalse; + TApaAppEntry appEntry; + aFinder->FindAllAppsL(); + while (aFinder->NextL(appEntry, iForcedRegistrations)) + { + if (appEntry.iUidType[2] == aAppUid) + { + found = ETrue; + break; + } + } + + CApaAppData* app = NULL; + if (found) + { + // add the app to the list + TBool hasChanged = EFalse; + CApaAppData* prevFirstAppInList = iAppData; + UpdateNextAppL(appEntry, hasChanged); + if (iAppData != prevFirstAppInList) + { + // assume the new app was added to the list + app = iAppData; + } + if (hasChanged) + { + iFlags |= EAppListHasChanged; + } + } + return app; + } + +EXPORT_C void CApaAppList::PurgeL() +/** Removes any applications from the list if they are no longer present +on the phone. It updates applications that have been +superceded. */ + { + CApaAppData* appData=iAppData; + CApaAppData* prev=NULL; + while (appData) + { + CApaAppData* next=appData->iNext; + if (appData->iIsPresent==CApaAppData::ENotPresent) + { + if (prev) + prev->iNext=next; + else + iAppData=next; + + //Add uninstalled application UID to a list + if(iUninstalledApps==NULL) + iUninstalledApps=new(ELeave) CArrayFixFlat(1); + + iUninstalledApps->AppendL(appData->AppEntry().iUidType[2]); + + delete appData; + } + else if (appData->iIsPresent==CApaAppData::ESuperseded) + { + CApaAppData* newApp=NULL; + TApaAppEntry appEntry; + appData->iSuccessor->Get(appEntry); + TRAPD(err,newApp=CApaAppData::NewL(appEntry, iFs)); + if (err==KErrNone) + { + // remove the old one and add the new one in its place + if (prev) + prev->iNext=newApp; + else + iAppData=newApp; + newApp->iNext = appData->iNext; + delete appData; + // increment the iterator + prev = newApp; + } + } + else + prev=appData; + appData=next; + } + } + +EXPORT_C TInt CApaAppList::Count() const +/** Gets the count of applications present in the app list. + +@return The number of applications in the list. */ + + { + TInt count=0; + CApaAppData* appData=iAppData; + while (appData) + { + count++; + appData=appData->iNext; + } + return count; + } + +EXPORT_C CApaAppData* CApaAppList::FirstApp() const +/** Gets a pointer to the first application in the list +that can use the default screen mode. + +@return A pointer to the first application. */ + { + return FirstApp(0); + } + +EXPORT_C CApaAppData* CApaAppList::FirstApp(TInt aScreenMode) const +/** Gets a pointer to the first application in the list +that can use the specified screen mode. + +@param aScreenMode The index of the screen mode. Specifying +KIgnoreScreenMode returns the first application in the list, +regardless of screen mode. +@return A pointer to the first application that can use the +specified screen mode. */ + { + + CApaAppData* appData=iValidFirstAppData; + + if(aScreenMode!=KIgnoreScreenMode) + { + while (appData && !appData->CanUseScreenMode(aScreenMode)) + appData = appData->iNext; + } + + return appData; + } + +EXPORT_C CApaAppData* CApaAppList::NextApp(const CApaAppData* aApp) const +/** Gets a pointer to the next application after aApp in the list +that can use the default screen mode. + +@param aApp A pointer to an application in the list. +@return A pointer to the next application after aApp in the list +that can use the default screen mode. +@panic APGRFX 12 aApp is NULL. */ + { + return NextApp(aApp,0); + } + +EXPORT_C CApaAppData* CApaAppList::NextApp(const CApaAppData* aApp, TInt aScreenMode) const +/** Gets a pointer to the next application after aApp in the list +that can use the specified screen mode. + +@param aApp A pointer to an application in the list. +@param aScreenMode The index of the screen mode. Specifying +KIgnoreScreenMode returns the next application in the list, +regardless of screen mode. +@return A pointer to the next application after aApp in the list +that can use the specified screen mode. +@panic APGRFX 12 aApp is NULL. */ + + { + __ASSERT_ALWAYS(aApp,Panic(EPanicNoAppDataSupplied)); + // + CApaAppData* iApp=aApp->iNext; //lint !e613 Suppress possible use of null pointer - asserted above + + if(aScreenMode!=KIgnoreScreenMode) + while (iApp && !iApp->CanUseScreenMode(aScreenMode)) + iApp = iApp->iNext; + + return iApp; + } + +EXPORT_C CApaAppData* CApaAppList::AppDataByUid(TUid aAppUid) const +/** Gets a pointer to the application in the list whose third +UID matches the specified UID. + +@param aAppUid An application's third UID. +@return A pointer to the application, if successful. Null, +if no match is found or if KNullUid was specified. */ + { + if (aAppUid==KNullUid) + return NULL; // never match null UID as it represents an un-UIDed file + CApaAppData* appData=iAppData; + while (appData) + { + if (appData->AppEntry().iUidType[2]==aAppUid) + return appData; + appData=appData->iNext; + } + return NULL; + } + +EXPORT_C CApaAppData* CApaAppList::AppDataByFileName(const TDesC& aFullFileName) const +/** Gets a pointer to the application in the list whose application +file name matches the one specified + +@param aFullFileName a file name. +@return A pointer to the application, if successful. Null, +if no match is found or if KNullDesC was specified. +@internalTechnology +*/ + { + if (aFullFileName.Length()==0) + { + return NULL; // never match null UID as it represents an un-UIDed file + } + CApaAppData* appData=iAppData; + while (appData) + { + if (appData->AppEntry().iFullName.CompareF(aFullFileName)==0) + { + return appData; + } + appData=appData->iNext; + } + return NULL; + } + +/** +Adds a registration file to the iForcedRegistrations array. + +@param aRegistrationFile The function takes ownership of the HBufC. +@internalComponent +*/ +EXPORT_C void CApaAppList::AddForcedRegistrationL(HBufC* aRegistrationFile) + { + TInt err = iForcedRegistrations.InsertInOrder(aRegistrationFile, TLinearOrder(CompareStrings)); + if (err == KErrAlreadyExists) // We silently ignore attempts to insert duplicates + { + delete aRegistrationFile; + } + else + { + User::LeaveIfError(err); + } + } //lint !e818 Suppress pointer parameter 'aRegistrationFile' could be declared as pointing to const + +EXPORT_C void CApaAppList::ResetForcedRegistrations() + { + iForcedRegistrations.ResetAndDestroy(); + } + +EXPORT_C TUid CApaAppList::PreferredDataHandlerL(const TDataType& aDataType) const +/** Finds the preferred application to handle the specified data type. + +@param aDataType The data type of interest. +@return The third UID of the application in the list which has the +highest priority for handling the specified data type. A null UID is +returned if no application in the list can handle the specified data type. */ + { + TInt dummy; + return PreferredDataHandlerL(aDataType, NULL, dummy); + } + +EXPORT_C TUid CApaAppList::PreferredDataHandlerL(const TDataType& aDataType, const TUid* aServiceUid, TInt& aPriority) const +/** Finds the preferred application to handle the specified data type. + +@param aDataType The data type of interest. +@param aServiceUid The optional service UID. +@param aPriority The priority associated with the returned app. +@return The third UID of the application in the list which has the +highest priority for handling a combination of the specified data type +and service. A null UID is returned if no application in the list can +handle the combination of specified data type and service. +@internalComponent +*/ + { + // If there is a service uid we first try to use the service specific list + // of datatypes + if (aServiceUid) + { + CApaAppData* appData=iAppData; + aPriority=KDataTypePriorityNotSupported; + TUid uid={0}; + while (appData) + { + TInt priority = appData->ImplementsServiceWithDataType(*aServiceUid, aDataType); + if (priority > aPriority) + { + aPriority=priority; + uid=appData->AppEntry().iUidType[2]; + } + appData=appData->iNext; + } + if (aPriority != KDataTypePriorityNotSupported) + { + return uid; + } + } + + CApaAppData* appData=iAppData; + aPriority=KDataTypePriorityNotSupported; + TUid uid={0}; + while (appData) + { + TInt priority=appData->DataType(aDataType); + if ((priority > aPriority) && + (!aServiceUid || (aServiceUid && appData->ImplementsService(*aServiceUid)))) + { + aPriority=priority; + uid=appData->AppEntry().iUidType[2]; + } + appData=appData->iNext; + } + return uid; + } + +void CApaAppList::DeleteAppData() + { + iValidFirstAppData = NULL; + iFlags &= ~EFirstScanComplete; + iFlags &= ~EAppListHasChanged; + iFlags &= ~ELangChangePending; + + CApaAppData* next = NULL; + for (CApaAppData* appData=iAppData; appData; appData = next) + { + next = appData->iNext; + delete appData; + } + iAppData = NULL; + } + +void CApaAppList::ScanComplete() + { + if (!(iFlags & EFirstScanComplete) && iObserver) + iObserver->InitialListPopulationComplete(); + iValidFirstAppData = iAppData; + iFlags|=EFirstScanComplete; + iNNAInstallation = EFalse; + } + +/** + * + * Tests whether the first scan for list of Apps has completed. + * + * @return "TBool" + * True, if the first scan for list of Apps has completed; false, otherwise. + * @internalComponent + */ +EXPORT_C TBool CApaAppList::IsFirstScanComplete() const + { + return iFlags&EFirstScanComplete; + } + +EXPORT_C TBool CApaAppList::AppScanInProgress() const +/** @internalComponent */ + { + return (iAppIdler!=NULL) && iAppIdler->IsActive(); + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceArrayBufferL(TUid aAppUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + while (app && app->AppEntry().iUidType[2] != aAppUid) + { + app = NextApp(app, KIgnoreScreenMode); + } + + if (app) + { + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + if (app->iServiceArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *(app->iServiceArray); + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + return buf; + } + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceUidBufferL(TUid aAppUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + while (app && app->AppEntry().iUidType[2] != aAppUid) + { + app = NextApp(app, KIgnoreScreenMode); + } + + if (app) + { + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + if (app->iServiceArray) + { + CArrayFixFlat& serviceArray = *(app->iServiceArray); + CArrayFixFlat* uidArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(uidArray); + for (TInt i = serviceArray.Count()-1; i >= 0; i--) + { + uidArray->AppendL(serviceArray[i].Uid()); + } + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *uidArray; + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(uidArray); + return buf; + } + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceOpaqueDataBufferL(TUid aAppUid, TUid aServiceUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + while (app && app->AppEntry().iUidType[2] != aAppUid) + { + app = NextApp(app, KIgnoreScreenMode); + } + + if (app) + { + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + if (app->iServiceArray) + { + CArrayFixFlat* implArray = NULL; + CArrayFixFlat& serviceArray = *(app->iServiceArray); + for (TInt i = serviceArray.Count()-1; i >= 0; i--) + { + const TApaAppServiceInfo& infoRef = serviceArray[i]; + if (infoRef.Uid() == aServiceUid) + { + if (!implArray) + { + implArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, implArray)); + } + CArrayFixFlat* dummy = + new(ELeave) CArrayFixFlat(1); + CleanupStack::PushL(dummy); + TApaAppServiceInfo info(aServiceUid, dummy, infoRef.OpaqueData().AllocLC()); + implArray->AppendL(info); + CleanupStack::Pop(CONST_CAST(TDesC8*,&info.OpaqueData())); + CleanupStack::Pop(dummy); + } + } + if (implArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *implArray; + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(implArray); + return buf; + } + } + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +/** +@internalComponent +*/ +EXPORT_C CBufFlat* CApaAppList::ServiceImplArrayBufferL(TUid aServiceUid) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + // build an array containing all implementations of the service identified by aServiceUid + CArrayFixFlat* implArray = NULL; + while (app) + { + if (app->iServiceArray) + { + for (TInt i = app->iServiceArray->Count()-1; i >= 0; i--) + { + const TApaAppServiceInfo& infoRef = (*app->iServiceArray)[i]; + if (infoRef.Uid() == aServiceUid) + { + if (!implArray) + { + implArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, implArray)); + } + CArrayFixFlat* datatypes = DataTypeArrayDeepCopyLC(infoRef.DataTypes()); + HBufC8* data = infoRef.OpaqueData().AllocLC(); + TApaAppServiceInfo info(app->AppEntry().iUidType[2], datatypes, data); + implArray->AppendL(info); + CleanupStack::Pop(data); + CleanupStack::Pop(datatypes); + } + } + } + app = NextApp(app, KIgnoreScreenMode); + } + + if (implArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *(implArray); + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(implArray); + return buf; + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +EXPORT_C CBufFlat* CApaAppList::ServiceImplArrayBufferL(TUid aServiceUid, const TDataType& aDataType) const + { + CApaAppData* app = FirstApp(KIgnoreScreenMode); + // build an array containing all implementations of the service identified by aServiceUid + CArrayFixFlat* implArray = NULL; + while (app) + { + if (app->iServiceArray) + { + for (TInt i = app->iServiceArray->Count()-1; i >= 0; i--) + { + const TApaAppServiceInfo& infoRef = (*app->iServiceArray)[i]; + if (infoRef.Uid() == aServiceUid) + { + if (KDataTypePriorityNotSupported != app->DataType(aDataType, infoRef.DataTypes())) + { + if (!implArray) + { + implArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, implArray)); + } + CArrayFixFlat* datatypes = DataTypeArrayDeepCopyLC(infoRef.DataTypes()); + HBufC8* data = infoRef.OpaqueData().AllocLC(); + TApaAppServiceInfo info(app->AppEntry().iUidType[2], datatypes, data); + implArray->AppendL(info); + CleanupStack::Pop(data); + CleanupStack::Pop(datatypes); + } + } + } + } + app = NextApp(app, KIgnoreScreenMode); + } + + if (implArray) + { + CBufFlat* const buf = CBufFlat::NewL(KBufferExpansionGranularity); + CleanupStack::PushL(buf); + RBufWriteStream writeStream(*buf); + writeStream << *(implArray); + writeStream.CommitL(); + writeStream.Release(); + CleanupStack::Pop(buf); + CleanupStack::PopAndDestroy(implArray); + return buf; + } + User::Leave(KErrNotFound); + return NULL; // to keep compiler happy + } + +CArrayFixFlat* CApaAppList::DataTypeArrayDeepCopyLC(const CArrayFixFlat& aOriginal) const + { + CArrayFixFlat* result = new(ELeave) CArrayFixFlat(1); + CleanupStack::PushL(result); + TInt ii = 0; + TInt end = aOriginal.Count(); + while (ii < end) + { + result->AppendL(aOriginal[ii]); + ii++; + } + return result; + } + +EXPORT_C TInt CApaAppList::CompareStrings(const HBufC& aFirst, const HBufC& aSecond) + { + return aFirst.CompareF(aSecond); + } + +EXPORT_C CApaAppList* CApaAppList::Self() + { // static + return STATIC_CAST(CApaAppList*,Dll::Tls()); + } + +/*EXPORT_C*/ RFs& CApaAppList::ShareProtectedFileServer() + { + return iFsShareProtected; //lint !e1536 Exposing low access member - need to consider a redesign or design clarification here(iFsShareProtected should be owned be the one that needs it) but postpone for now as that may require large changes + } + +CApaAppIconArray* CApaAppList::LoadDefaultIconsL() const + { + CApaIconLoader* iconLoader = CApaIconLoader::NewLC(iFs); + CApaAppIconArray* icons = CApaAppIconArray::NewRealDefaultIconsLC(KNumberOfIconsInDefaultMbm,*iDefaultAppIconMbmFileName, *iconLoader); + const TBool badMbmEntryInfo = !icons->LoadIconsL(); + if(badMbmEntryInfo) + { + CleanupStack::PopAndDestroy(2,iconLoader); + return CApaAppIconArray::NewL(); + } + else + { + CleanupStack::Pop(icons); + CleanupStack::PopAndDestroy(iconLoader); + } + return icons; + } + +void CApaAppList::AcquireDefaultIconArrayL() const + { + ASSERT(iDefaultIconUsageCount >= 0); + if (iDefaultIconUsageCount == 0) + { + iDefaultIconArray = LoadDefaultIconsL(); + } + ++iDefaultIconUsageCount; + } + +// Should NEVER be called by an object that does not call AcquireDefaultIconArrayL and +// ReleaseDefaultIconArray at the beginning and end of its lifetime respectively +const CApaAppIconArray& CApaAppList::DefaultIconArray() const + { + __ASSERT_ALWAYS(iDefaultIconArray, Panic(EPanicNullPointer)); + return *iDefaultIconArray; + } + +void CApaAppList::ReleaseDefaultIconArray() const + { + ASSERT(iDefaultIconUsageCount > 0); + if(0 == --iDefaultIconUsageCount) + { + delete iDefaultIconArray; + iDefaultIconArray = NULL; + } + } + +// DEF077478 - Required to update the default icons that the app list holds. +void CApaAppList::UpdateDefaultIconsL() + { + CApaAppIconArray* iconArray = LoadDefaultIconsL(); + if (iconArray) + { + delete iDefaultIconArray; + iDefaultIconArray = iconArray; + } + } + +void CApaAppList::DeleteAppListStorer() + { + delete iAppListStorer; + iAppListStorer = NULL; + } + +void CApaAppList::DeleteAppIconLoader() + { + delete iAppIconLoader; + iAppIconLoader = NULL; + } + +void CApaAppList::InitiateStoringOfAppList() + { + ScanComplete(); + NotifyObserver(); + iFlags &= ~ENotifyUpdateOnFirstScanComplete; + // now that the scan is finished, iDefaultAppIconMbmFileName is deleted + delete iDefaultAppIconMbmFileName; + iDefaultAppIconMbmFileName=NULL; + // if applist has not changed and AppsList_Backup.bin file exists then it is replaced back to AppsList.bin + if (!(iFlags & EAppListHasChanged) && BaflUtils::FileExists(iFs, iAppsListCacheBackUpFileName)) + { + TInt replaceError = iFs.Replace(iAppsListCacheBackUpFileName, iAppsListCacheFileName); + if (replaceError == KErrNone) + { + return; + } + } + iFlags &= ~EAppListHasChanged; + iFs.Delete(iAppsListCacheBackUpFileName); + TInt err = iFs.MkDir(iAppsListCachePath); + if (err == KErrNone || err == KErrAlreadyExists) + { + TRAP(err, StoreL()); + if (err) + { + DeleteAppListStorer(); + } + } + } +// +// Class CApaAppListStorer +// + +CApaAppList::CApaAppListStorer::CApaAppListStorer(CApaAppData* aFirstAppData, RFs& aFs, CApaAppList& aAppList) : CActive(EPriorityIdle), iCurrentAppData(aFirstAppData), iFs(aFs), iAppList(aAppList) + { + } + +CApaAppList::CApaAppListStorer::~CApaAppListStorer() + { + Cancel(); + iWriteStream.Close(); + iFs.Delete(iTempFilename); + iTimer.Close(); + iCurrentAppData = NULL; + } + +CApaAppList::CApaAppListStorer* CApaAppList::CApaAppListStorer::NewL(CApaAppData* aFirstAppData, RFs& aFs, CApaAppList& aAppList) + { + CApaAppListStorer* self = new(ELeave) CApaAppListStorer(aFirstAppData, aFs, aAppList); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +void CApaAppList::CApaAppListStorer::ConstructL() + { + User::LeaveIfError(iTimer.CreateLocal()); + CActiveScheduler::Add(this); + } + +void CApaAppList::CApaAppListStorer::StartL(const TTimeIntervalMicroSeconds32& aDelay) + { + User::LeaveIfError(iWriteStream.Temp(iFs, iAppList.iAppsListCachePath, iTempFilename, EFileWrite)); + iWriteStream.WriteInt32L(User::Language()); + +#if defined (SYMBIAN_BAFL_SYSUTIL) + //Write a cache of the ROM version to a separate stream + //Build the filename for the cache file + TInt maxSizeofFileName = iAppList.iAppsListCachePath.Length() + KROMVersionStringCacheFileName().Length(); + RBuf romVersionCacheFileName; + romVersionCacheFileName.CreateL(maxSizeofFileName); + romVersionCacheFileName.CleanupClosePushL(); + romVersionCacheFileName.Append(iAppList.iAppsListCachePath); + romVersionCacheFileName.Append(KROMVersionStringCacheFileName()); + + RFileWriteStream romVerStream; + User::LeaveIfError(romVerStream.Replace(iFs,romVersionCacheFileName,EFileWrite)); + CleanupClosePushL(romVerStream); + + // Write the file version that apparc can handle. + romVerStream.WriteInt8L(KROMVersionCacheFileMajorVersion); + romVerStream.WriteInt8L(KROMVersionCacheFileMinorVersion); + romVerStream.WriteInt16L(KROMVersionCacheFileBuildVersion); + + TBuf version; + SysUtil::GetSWVersion(version); + + // Write the software version even if SysUtil returns err since all conditions are taken care during restore. + romVerStream.WriteUint32L(version.Length()); + romVerStream.WriteL(version, version.Length()); + CleanupStack::PopAndDestroy(2); //romVerStream, romVersionCacheFileName +#endif //(SYMBIAN_BAFL_SYSUTIL) + + iTimer.After(iStatus, aDelay); + SetActive(); + } + +void CApaAppList::CApaAppListStorer::RunL() + { + // iStatus could be KErrNone or negative when timer completes, irrespective of its status we need to re-queue the request. + if (iCurrentAppData) + { + StoreEntryL(iWriteStream, *iCurrentAppData); + iCurrentAppData = iCurrentAppData->Next(); + SetActive(); + TRequestStatus* status = &iStatus; + User::RequestComplete(status, KErrNone); + } + else + { + iWriteStream.CommitL(); + iWriteStream.Close(); + + TInt err = iFs.Replace(iTempFilename, iAppList.iAppsListCacheFileName); + if (err != KErrNone) + { + iFs.Delete(iTempFilename); + } + iAppList.DeleteAppListStorer(); + } + } + +void CApaAppList::CApaAppListStorer::StoreEntryL(RWriteStream& aWriteStream, const CApaAppData& aApp) + { + aWriteStream << aApp; + } + +void CApaAppList::CApaAppListStorer::DoCancel() + { + iTimer.Cancel(); + } + +TInt CApaAppList::CApaAppListStorer::RunError(TInt /*aError*/) + { + iAppList.DeleteAppListStorer(); + return KErrNone; + } + +// +// Class CApaIdleIconLoader +// + +CApaAppList::CApaIdleIconLoader::CApaIdleIconLoader(CApaAppData* aFirstAppData, RFs& aFs, CApaAppList& aAppList) : CActive(EPriorityLow), iCurrentAppData(aFirstAppData), iFs(aFs), iAppList(aAppList) + { // Priority is less than KAppListServerPriority, to maintain server responsiveness. + CActiveScheduler::Add(this); + } + +CApaAppList::CApaIdleIconLoader::~CApaIdleIconLoader() + { + Cancel(); + iCurrentAppData = NULL; + } + +void CApaAppList::CApaIdleIconLoader::Start() + { + SetActive(); + TRequestStatus* status = &iStatus; + User::RequestComplete(status, KErrNone); + } + +void CApaAppList::CApaIdleIconLoader::RunL() +/** if the icons are not already loaded on demand then it would be loaded here. */ + { + while (iCurrentAppData && !iCurrentAppData->MbmIconsRequireLoading()) + { + iCurrentAppData = iCurrentAppData->Next(); + } + + if(iCurrentAppData) + { + Start(); + CApaAppData* const appData = iCurrentAppData; + iCurrentAppData = iCurrentAppData->Next(); + appData->LoadIconsL(); + } + else + { + iAppList.InitiateStoringOfAppList(); + iAppList.DeleteAppIconLoader(); + } + } + +void CApaAppList::CApaIdleIconLoader::DoCancel() + { + } + +TInt CApaAppList::CApaIdleIconLoader::RunError(TInt /*aError*/) + { + return KErrNone; + } + +// ApaUtils + +EXPORT_C TBool ApaUtils::HandleAsRegistrationFile(const TUidType& aUidType) + { // static + return (aUidType[1].iUid==KUidAppRegistrationFile.iUid || + aUidType[0].iUid==KUidPrefixedNonNativeRegistrationResourceFile); + } + + +// +// Class CApaLangChangeMonitor +// + +CApaAppList::CApaLangChangeMonitor::~CApaLangChangeMonitor() + { + Cancel(); + iLangNotifier.Close(); + } + +CApaAppList::CApaLangChangeMonitor* CApaAppList::CApaLangChangeMonitor::NewL(CApaAppList& aAppList) + { // static + CApaLangChangeMonitor* self=new(ELeave) CApaLangChangeMonitor(aAppList); + self->ConstructL(); + return self; + } + +CApaAppList::CApaLangChangeMonitor::CApaLangChangeMonitor(CApaAppList& aAppList) + : CActive(EPriorityNormal), + iAppList(aAppList) + { + iPrevLanguage = User::Language(); + CActiveScheduler::Add(this); + } + +void CApaAppList::CApaLangChangeMonitor::ConstructL() + { + User::LeaveIfError(iLangNotifier.Create()); + Start(); + } + +void CApaAppList::CApaLangChangeMonitor::Start() + { + iLangNotifier.Logon(iStatus); + SetActive(); + } + +void CApaAppList::CApaLangChangeMonitor::DoCancel() + { + iLangNotifier.LogonCancel(); + } + +void CApaAppList::CApaLangChangeMonitor::RunL() + { + // Logon to get further events before handling current request. + TRequestStatus status = iStatus; + Start(); + + // if it is a language change event, start a rescan on app-list. + if (status.Int() == EChangesLocale && iPrevLanguage != User::Language()) + { + iPrevLanguage = User::Language(); + iAppList.iFlags |= CApaAppList::ELangChangePending; + iAppList.StartIdleUpdateL(iAppList.iObserver); + } + } + +TInt CApaAppList::CApaLangChangeMonitor::RunError(TInt /*aError*/) + { + // Reset ELangChangePending flag if RunL leaves. + iAppList.iFlags &= ~CApaAppList::ELangChangePending; + // Reset iPrevLanguage to ELangNone if RunL leaves. + iPrevLanguage = ELangNone; + return KErrNone; + } + +void CApaAppList::GetAppsListCachePathL() + { + _LIT(KAppsListCacheFileName, ":\\private\\10003a3f\\AppsListCache\\AppsList.bin"); + _LIT(KAppsListCacheBackUpFileName, ":\\private\\10003a3f\\AppsListCache\\AppsList_Backup.bin"); + _LIT(KAppsListCachePath, ":\\private\\10003a3f\\AppsListCache\\"); + TChar sysDrive = RFs::GetSystemDriveChar(); + TInt maxSizeofFileName = KAppsListCacheFileName().Length() + 1; + iAppsListCacheFileName.CreateL(maxSizeofFileName); + iAppsListCacheFileName.Append(sysDrive); + iAppsListCacheFileName.Append(KAppsListCacheFileName()); + maxSizeofFileName = KAppsListCacheBackUpFileName().Length() + 1; + iAppsListCacheBackUpFileName.CreateL(maxSizeofFileName); + iAppsListCacheBackUpFileName.Append(sysDrive); + iAppsListCacheBackUpFileName.Append(KAppsListCacheBackUpFileName()); + maxSizeofFileName = KAppsListCachePath().Length() + 1; + iAppsListCachePath.CreateL(maxSizeofFileName); + iAppsListCachePath.Append(sysDrive); + iAppsListCachePath.Append(KAppsListCachePath()); + } + + +// The function transfers ownership of the pointer owned by a CApaAppList to the caller +// to avoid copying the array. + +EXPORT_C CArrayFixFlat* CApaAppList::UninstalledAppArray() + { + CArrayFixFlat* uninstalledApps=iUninstalledApps; + iUninstalledApps=NULL; + return uninstalledApps; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGCLI.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGCLI.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,3096 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "../apserv/APSCLSV.H" +#include "APGCLI.H" +#include "APACMDLN.H" +#include "APGSTD.H" +#include "APGICNFL.H" +#include +#include +#include +#include "APGPRIV.H" +#include +#include "apprivate.h" + +#if defined(USE_IH_RAISE_EVENT) +#include +#include +#endif + +class CApaLsSessionExtension; + +const TUint KInitialIconBufSize=sizeof(TSize)*6+sizeof(TInt); +const TUint KInitialViewDataBufSize=sizeof(TApaAppViewInfo)*6+sizeof(TInt); +const TUint KInitialOwnedFilesBufSize=sizeof(TFileName)*6+sizeof(TInt); +const TUint KDefaultBufSize = 0x400; +const TUint KAsyncMessageSlots=4; //one slot each for, RApaLsSession::SetNotify, RApaLsSession:: + //RegisterListPopulationCompleteObserver and RApaLsSession::NotifyOnDataMappingChange + //CAsyncFileRecognition::Start makes an asynch request of apparc server. + +_LIT8(KAllDataTypes,"*"); + +extern void CleanupServiceArray(TAny* aServiceArray); + +IMPORT_C extern const TInt KMinApplicationStackSize; + +class MArrayFiller + { +public: + virtual void AppendItemL(RReadStream& aReadStream)=0; + }; + +class TSizeArrayFiller : public MArrayFiller + { +public: + inline TSizeArrayFiller(CArrayFixFlat& aArray) :iArray(aArray) {} + virtual void AppendItemL(RReadStream& aReadStream); +private: + CArrayFixFlat& iArray; + }; + +class TViewDataArrayFiller : public MArrayFiller + { +public: + inline TViewDataArrayFiller(CApaAppViewArray& aArray) :iArray(aArray) {} + virtual void AppendItemL(RReadStream& aReadStream); +private: + CApaAppViewArray& iArray; + }; + +class TDesCArrayFiller : public MArrayFiller + { +public: + inline TDesCArrayFiller(CDesCArray& aArray) :iArray(aArray) {} + virtual void AppendItemL(RReadStream& aReadStream); +private: + CDesCArray& iArray; + }; + +/** +This class is used to simplify the usage of the asynchronous RApaLsSession::RecognizeFilesL() function. +@internalComponent +*/ +class CAsyncFileRecognition : public CActive + { +public: + CAsyncFileRecognition(CDataRecognitionResultArray& aResult, TRequestStatus& aUsersRequestStatus, CApaLsSessionExtension& aSession); + ~CAsyncFileRecognition(); + void Start(const TDesC& aPath, const TDesC8& aDataType); +private: + void RunL(); + void DoCancel(); +private: // data + TPckgBuf iRequiredBufferSizePckg; + CDataRecognitionResultArray& iResult; + TRequestStatus& iUsersRequestStatus; + CApaLsSessionExtension& iSession; + const TDesC* iPath; + const TDesC8* iDataType; + }; + +/** +This class is an extension class for RApaLsSession. It was added to reduce the need +of BC breaks in later releases. +@internalComponent +*/ +class CApaLsSessionExtension : public CBase + { +public: + CApaLsSessionExtension(RApaLsSession& aSession); + ~CApaLsSessionExtension(); + + void SendReceive(TInt aFunction,const TIpcArgs& aArgs,TRequestStatus& aStatus) const; + TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const; + + // file recognition functions + void RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); + void CancelRecognizeFiles(); + void FilesRecognized(const TDesC& aPath, TInt aRequiredBufferSize, CDataRecognitionResultArray& aResult, TRequestStatus& aUsersRequestStatus, const TRequestStatus& aErrorCode); + TBool RecognitionActive() const; +private: + RApaLsSession& iSession; // we are a friend of this class! + CAsyncFileRecognition* iAsyncFileRecognition; + }; + +/** +An entry of a CDataRecognitionResultArray object. Stores TDataRecognitionResult and the file name +in a compact format. +@internalComponent +*/ +class CDataRecognitionResultArrayEntry : public CBase + { +public: + CDataRecognitionResultArrayEntry(HBufC* aFileName, HBufC8* aDataType, TUid aUid, TInt aConfidence); + ~CDataRecognitionResultArrayEntry(); + void GetDataRecognitionResult(TDataRecognitionResult& aResult) const; + const TDesC& FileName() const; +private: + HBufC* iFileName; + HBufC8* iDataType; + TUid iUid; + TInt iConfidence; + }; + +////////////////////////////// +// CAsyncFileRecognition +////////////////////////////// + +CAsyncFileRecognition::CAsyncFileRecognition(CDataRecognitionResultArray& aResult, TRequestStatus& aUsersRequestStatus, CApaLsSessionExtension& aSession) + : CActive(EPriorityStandard), + iResult(aResult), + iUsersRequestStatus(aUsersRequestStatus), + iSession(aSession) + { + CActiveScheduler::Add(this); + } + +void CAsyncFileRecognition::Start(const TDesC& aPath, const TDesC8& aDataType) + { + iPath = &aPath; + iDataType = &aDataType; + iStatus = KRequestPending; + iSession.SendReceive(EAppListServRecognizeFilesAsync,TIpcArgs(&aPath,&iRequiredBufferSizePckg,&aDataType),iStatus); + SetActive(); + } + +CAsyncFileRecognition::~CAsyncFileRecognition() + { + Cancel(); + iPath = NULL; + iDataType = NULL; + } + +void CAsyncFileRecognition::RunL() + { + iSession.FilesRecognized(*iPath, iRequiredBufferSizePckg(), iResult, iUsersRequestStatus, iStatus); + } + +void CAsyncFileRecognition::DoCancel() + { + iSession.SendReceive(ECancelRecognizeFiles,TIpcArgs(TIpcArgs::ENothing)); + TRequestStatus* status = &iUsersRequestStatus; + User::RequestComplete( status, KErrCancel ); + } + +////////////////////////////// +// CApaLsSessionExtension +////////////////////////////// + +CApaLsSessionExtension::CApaLsSessionExtension(RApaLsSession& aSession) + : iSession(aSession), + iAsyncFileRecognition(NULL) + { + } + +CApaLsSessionExtension::~CApaLsSessionExtension() + { + delete iAsyncFileRecognition; + } + +void CApaLsSessionExtension::SendReceive(TInt aFunction,const TIpcArgs& aArgs,TRequestStatus& aStatus) const + { + iSession.SendReceive(aFunction,aArgs,aStatus); //lint !e1060 Suppress protected member is not accessible to non-member non-friend + } + +TInt CApaLsSessionExtension::SendReceive(TInt aFunction,const TIpcArgs& aArgs) const + { + return iSession.SendReceive(aFunction,aArgs); //lint !e1060 Suppress protected member is not accessible to non-member non-friend + } + +/** +Asynchronous recognition of a directory. +Function uses an internal CAsyncFileRecognition object to hide the +second server message (transferring the data to the client) from the user. +When the path is not correct or the server is already busy with another +recognition request, the function completes the request with an error. +@internalComponent +*/ +void CApaLsSessionExtension::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus) + { + _LIT(KBackslash,"\\"); + + if(aPath.Right(1) != KBackslash) + { + TRequestStatus* status = &aStatus; + User::RequestComplete(status,KErrPathNotFound); + } + + aResult.SetPath(aPath); + aStatus = KRequestPending; + + if(!iAsyncFileRecognition) + { + iAsyncFileRecognition = new (ELeave) CAsyncFileRecognition(aResult, aStatus, *this); + iAsyncFileRecognition->Start(aPath, aDataType); + } + else + { + TRequestStatus* status = &aStatus; + User::RequestComplete(status,KErrInUse); + } + } + +TBool CApaLsSessionExtension::RecognitionActive() const + { + return iAsyncFileRecognition ? ETrue : EFalse; + } + +void CApaLsSessionExtension::CancelRecognizeFiles() + { + if(iAsyncFileRecognition) + { + iAsyncFileRecognition->Cancel(); + delete iAsyncFileRecognition; + iAsyncFileRecognition = NULL; + } + } + +void CApaLsSessionExtension::FilesRecognized(const TDesC& aPath, TInt aRequiredBufferSize, CDataRecognitionResultArray& aResult, TRequestStatus& aUsersRequestStatus, const TRequestStatus& aErrorCode) +/** +Callback function called by an CAsyncFileRecognition object, when an asynchronous +recognition has finished. If the recognition was successful, the data is transferred +to the client-side. +@internalComponent +*/ + { + TRequestStatus* status = &aUsersRequestStatus; + if(aErrorCode == KErrNone) + { + // transfer the result + TRAPD(error,iSession.TransferAndInternalizeDataL(aPath, aRequiredBufferSize, aResult)); + User::RequestComplete(status, error); + } + else + { + User::RequestComplete(status, aErrorCode.Int()); + } + delete iAsyncFileRecognition; + iAsyncFileRecognition = 0; + } + + +/////////////////////////////////////// +// CDataRecognitionResultArrayEntry +/////////////////////////////////////// + +CDataRecognitionResultArrayEntry::CDataRecognitionResultArrayEntry(HBufC* aFileName, HBufC8* aDataType, TUid aUid, TInt aConfidence) + : iFileName(aFileName), + iDataType(aDataType), + iUid(aUid), + iConfidence(aConfidence) + { + } + +CDataRecognitionResultArrayEntry::~CDataRecognitionResultArrayEntry() + { + delete iFileName; + delete iDataType; + } + +void CDataRecognitionResultArrayEntry::GetDataRecognitionResult(TDataRecognitionResult& aResult) const + { + TDataRecognitionResult result; + if(iDataType->Length() != 0) + { + TDataType dataType(*iDataType); + result.iDataType = dataType; + } + else + { + TDataType dataType(iUid); + result.iDataType = dataType; + } + result.iConfidence = iConfidence; + aResult = result; + } + +const TDesC& CDataRecognitionResultArrayEntry::FileName() const + { + if (iFileName == NULL) + return KNullDesC; + else + return *iFileName; + } + + +/////////////////////////////////// +// CDataRecognitionResultArray +/////////////////////////////////// + +/** +Constructor +@publishedAll +@released +*/ +EXPORT_C CDataRecognitionResultArray::CDataRecognitionResultArray() + { + } + +/** +Destructor +@publishedAll +@released +*/ +EXPORT_C CDataRecognitionResultArray::~CDataRecognitionResultArray() + { + iEntries.ResetAndDestroy(); + } + +/** +Returns the path of the recognition results. +@publishedAll +@released +@return The path of the recognition results +*/ +EXPORT_C const TFileName& CDataRecognitionResultArray::Path() const + { + return iPath; + } + +/** +Returns the number of entries in the CDataRecognitionResultArray. +@publishedAll +@released +@return The number of entries in the CDataRecognitionResultArray. +*/ +EXPORT_C TUint CDataRecognitionResultArray::Count() const + { + return iEntries.Count(); + } + +/** +Returns the recognition result of the given index. +@publishedAll +@released +@param aResult On successful completion, this parameter contains the recognition result at the given index. +@param aIndex The index of the recognition result to be returned. An invalid index causes +the function to leave with KErrNotFound. +@return The requested TDataRecognitionResult object +@leave KErrNotFound An invalid index is passed +*/ +EXPORT_C void CDataRecognitionResultArray::GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const + { + if( aIndex >= iEntries.Count() ) + { + User::Leave(KErrNotFound); + } + iEntries[aIndex]->GetDataRecognitionResult(aResult); + } + +/** +Returns the file name of the object at the given index. +@publishedAll +@released +@param aFileName On successful completion, this parameter contains the file name of the object at the given index. +@param aIndex Specifies which file name to be returned. An invalid index causes +the function to leave with KErrNotFound. +@return The requested file name +@leave KErrNotFound An invalid index is passed +*/ +EXPORT_C void CDataRecognitionResultArray::GetFileNameL(TFileName& aFileName, const TUint aIndex) const + { + if( aIndex >= iEntries.Count() ) + { + User::Leave(KErrNotFound); + } + aFileName.Zero(); + aFileName.Copy( (iEntries[aIndex]->FileName()) ); + } + +TUint CDataRecognitionResultArray::InternalizeL(const CBufFlat& aBuffer) + { + RBufReadStream readStream; + + readStream.Open(aBuffer); + const TInt count=readStream.ReadUint32L(); + for (TInt i=0; iDes(); + readStream.ReadL(fileNamePtr,fileNameLength); + + const TInt dataTypeLength = readStream.ReadUint8L(); + HBufC8* const dataType = HBufC8::NewLC(dataTypeLength); + TPtr8 dataTypePtr = dataType->Des(); + readStream.ReadL(dataTypePtr,dataTypeLength); + + TUid uid; + uid.iUid = readStream.ReadInt32L(); + + TInt const confidence = readStream.ReadInt32L(); + + CDataRecognitionResultArrayEntry* entry = new (ELeave) CDataRecognitionResultArrayEntry(fileName,dataType,uid,confidence); + iEntries.Append(entry); + + CleanupStack::Pop(dataType); // ownership was transferred to "entry" + CleanupStack::Pop(fileName); // ownership was transferred to "entry" + } + + readStream.Close(); + + return KErrNone; + } + +void CDataRecognitionResultArray::SetPath(const TFileName& aPath) + { + iPath.Copy(aPath); + } + +//////////////////////////////////// +//RApaLsSession +//////////////////////////////////// + +EXPORT_C RApaLsSession::RApaLsSession() + : iExtension(0) + {} + + + +/** Connects a client to the application architecture server, creating a session +with it. + +@return KErrNone if successful; otherwise, one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::Connect() + { + TInt r=CreateSession(KAppListServerName,Version(),KAsyncMessageSlots); + return(r); + } + + + +/** Gets the version of the application architecture server. + +@return The version number. +*/ +EXPORT_C TVersion RApaLsSession::Version(void) const + { + return(TVersion(KAppListServMajorVersionNumber,KAppListServMinorVersionNumber,KAppListServBuildVersionNumber)); + } + + + +/** Gets the total number of applications. + +Control panel applications are excluded. + +@param aCount On return, the total number of applications. +@return KErrNone if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::AppCount(TInt& aCount) const + { + return DoAppCount(aCount,EAppListServAppCount); + } + + + +/** Gets the total number of embeddable applications. + +Control panel applications are excluded. + +@param aCount On return, the total number of embeddable applications. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::EmbeddableAppCount(TInt& aCount) const + { + return DoAppCount(aCount,EAppListServEmbedCount); + } + +TInt RApaLsSession::DoAppCount(TInt& aCount,TInt aCommand) const +// returns the number of embeddable apps in the server side list + { + __ASSERT_DEBUG(aCommand==EAppListServEmbedCount || aCommand==EAppListServAppCount,Panic(EDPanicWrongCommand)); + const TInt returnValue=SendReceiveWithReconnect(aCommand,TIpcArgs()); + if (returnValue<0) + { + return returnValue; + } + aCount=returnValue; + return KErrNone; + } + + + +/** Initialises the process of getting all applications in the cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve all applications in the cached list. + +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAllApps() const + { + return GetAllApps(0); + } + + + +/** Initialises the process of getting all applications in the cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve all applications supporting aScreenMode in the cached list. + +@param aScreenMode Only applications which define a view supporting aScreenMode +will be returned by subsequent calls to GetNextApp(). If an application does not +define views in it's application information file, only screen mode 0 is supported. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAllApps(TInt aScreenMode) const + { + return GetFilteredApps(TApaAppCapability::EControlPanelItem, 0, aScreenMode); // exclude control panel apps + } + + + +/** Initialises the process of getting all embeddable applications from the cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve embeddable applications in the cached list. + +Only applications which specify KAppEmbeddable or KAppEmbeddableOnly in their +application information file will be returned by subsequent calls to GetNextApp(). + +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetEmbeddableApps() const + { + return GetEmbeddableApps(0); + } + + + +/** Initialises the process of getting embeddable applications from the cached list +that support the specified screen mode. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve embeddable applications in the cached list. + +Only applications which specify KAppEmbeddable or KAppEmbeddableOnly in their +application information file will be returned by subsequent calls to GetNextApp(). + +@param aScreenMode Only embeddable applications which define a view supporting +aScreenMode will be returned by subsequent calls to GetNextApp(). If an application +does not define views in it's application information file, only screen mode 0 is supported. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetEmbeddableApps(TInt aScreenMode) const + { + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + return GetFilteredApps(filter, aScreenMode); + } + + + +/** Initialises the process of getting all applications matching aFilter in the +cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve all applications matching aFilter in the cached list. + +@param aFilter Defines the filter to be applied to the cached list. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetFilteredApps(const TApaEmbeddabilityFilter& aFilter) const + { + return GetFilteredApps(aFilter, 0); + } + + + +/** Initialises the process of getting all applications matching aFilter in the +cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve all applications matching aFilter in the cached list. + +@param aFilter Defines the filter to be applied to the cached list. +@param aScreenMode Only applications which define a view supporting aScreenMode +will be returned by subsequent calls to GetNextApp(). If an application does not +define views in it's application information file, only screen mode 0 is supported. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetFilteredApps(const TApaEmbeddabilityFilter& aFilter, TInt aScreenMode) const + { + const TPckgC filter(aFilter); + return SendReceiveWithReconnect(EAppListServInitFilteredEmbedList,TIpcArgs(aScreenMode,&filter)); + } + + + +/** Initialises the process of getting all applications matching the specified +application attributes. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve all applications matching the filter in the cached list. + +Attributes are defined by TApaAppCapability::TCapabilityAttribute + +@param aCapabilityAttributeMask Specifies the attributes whose values will be +used to filter the cached list. If the mask specifies more than one attribute, +all associated attribute values must match. +@param aCapabilityAttributeValue Specifies the attribute values for each attribute +identified by the mask. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +@see TCapabilityAttribute +*/ +EXPORT_C TInt RApaLsSession::GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue) const + { + return GetFilteredApps(aCapabilityAttributeMask, aCapabilityAttributeValue, 0); + } + + + +/** Initialises the process of getting all applications matching the specified +application attributes. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve all applications matching the filter in the cached list. + +Attributes are defined by TApaAppCapability::TCapabilityAttribute + +@param aCapabilityAttributeMask Specifies the attributes whose values will be +used to filter the cached list. If the mask specifies more than one attribute, +all associated attribute values must match. +@param aCapabilityAttributeValue Specifies the attribute values for each attribute +identified by the mask. +@param aScreenMode Only applications which define a view supporting aScreenMode +will be returned by subsequent calls to GetNextApp(). If an application does not +define views in it's application information file, only screen mode 0 is supported. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +@see TCapabilityAttribute +*/ +EXPORT_C TInt RApaLsSession::GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue, TInt aScreenMode) const + { + return SendReceiveWithReconnect(EAppListServInitAttrFilteredList,TIpcArgs(aScreenMode, aCapabilityAttributeMask, aCapabilityAttributeValue)); + } + + + +/** Initialises the process of getting server applications in the cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve server applications in the cached list. + +Only applications which specify one or more services in their application +information file will be returned by subsequent calls to GetNextApp(). + +@return KErrNone, if successful, otherwise one of the system-wide error codes. +@publishedPartner +@released +*/ +EXPORT_C TInt RApaLsSession::GetServerApps(TUid aServiceUid) const + { + return GetServerApps(aServiceUid, 0); + } + + + +/** Initialises the process of getting server applications in the cached list. + +Control panel applications are excluded. + +A call to this function is followed by subsequent and repeated calls to GetNextApp() +to retrieve server applications in the cached list. + +Only applications which specify one or more services in their application +information file will be returned by subsequent calls to GetNextApp(). + +@param aScreenMode Only server applications which define a view supporting +aScreenMode will be returned by subsequent calls to GetNextApp(). If an application +does not define views in its application information file, only screen mode 0 is supported. +@return KErrNone, if successful, otherwise one of the system-wide error codes. +@publishedPartner +@released +*/ +EXPORT_C TInt RApaLsSession::GetServerApps(TUid aServiceUid, TInt aScreenMode) const + { + return SendReceiveWithReconnect(EAppListServInitServerAppList,TIpcArgs(aScreenMode, aServiceUid.iUid)); + } + + + +/** Gets information about the next application or embeddable application from +the cached list. + +A sequence of calls to this function must always be preceded by a call to +one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps(). + +@param aInfo On return, contains application information. +@return KErrNone if successful; ENoMoreAppsInList, if there are no more applications +in the list; EAppListInvalid if the server's initial population of the list has +not completed; otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetNextApp(TApaAppInfo& aInfo) const + { + return GetNextApp(aInfo,0); + } + + + +/** Gets information about the next application or embeddable application from +the cached list. + +A sequence of calls to this function must always be preceded by a call to +one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps(). + +@param aInfo On return, contains application information. +@param aScreenMode This parameter is ignored. +@return KErrNone if successful; ENoMoreAppsInList, if there are no more applications +in the list; EAppListInvalid if the server's initial population of the list has +not completed; otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetNextApp(TApaAppInfo& aInfo,TInt aScreenMode) const + { + TPckg info(aInfo); + TInt ret=SendReceiveWithReconnect(EAppListServGetNextApp,TIpcArgs(aScreenMode,&info)); + if (ret==KErrNone) + aInfo = info(); + else if (ret==KErrNotFound) + ret = ENoMoreAppsInList; + else if (ret==KErrCorrupt) + ret = EAppListInvalid; + return ret; + } + + + +/** Gets information about the application with the specified UID. + +@param aInfo On return, contains the application information, if an application +with the specified UID is found. If no matching application is found, then +this object is not changed. +@param aAppUid The application specific UID. +@return KErrNone if successful; KErrNotFound if a matching entry could not be found; +otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const + { + TPckg info(aInfo); + return SendReceiveWithReconnect(EAppListServGetAppInfo,TIpcArgs(aAppUid.iUid,&info)); + } //lint !e1764 Suppress reference parameter 'aInfo' could be declared const ref + +/** Sets the short caption of the application. + +Overrides the short caption specified in the localizable resource file for this application. +Short captions set using this API will only take effect until the next device reset. + +@param aShortCaption The short caption of the application. The maximum length allowed is KApaMaxAppCaption. +@param aLanguage The language corresponding to the caption. If this is ELangNone the caption is used +for all languages for which a language specific short caption has not been set. +@param aAppUid The uid of the application. +@return KErrNone if successful, otherwise one of the system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::SetAppShortCaption(const TDesC& aShortCaption, TLanguage aLanguage, TUid aAppUid) + { + if (aShortCaption.Length() > KApaMaxAppCaption || aShortCaption.Length() == 0) + { + return KErrArgument; + } + return SendReceiveWithReconnect(EAppListServSetAppShortCaption, TIpcArgs(aAppUid.iUid, &aShortCaption, aLanguage)); + } //lint !e1762 Suppress member function could be made const + +/** Gets the default screen-number of the application with the specified UID. + +@param aDefaultScreenNumber On return, contains the default screen-number, if an application +with the specified UID is found. If no matching application is found, then +this object is not changed. +@param aAppUid The application specific UID. +@return KErrNone if successful; KErrNotFound if a matching entry could not be found; +otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetDefaultScreenNumber(TInt& aDefaultScreenNumber, TUid aAppUid) const + { + const TInt result=SendReceiveWithReconnect(EAppListServGetDefaultScreenNumber, TIpcArgs(aAppUid.iUid)); + if (result<0) + { + return result; + } + aDefaultScreenNumber=result; + return KErrNone; + } + + +/** Gets the capabilities of the application with the specified UID. + +@param aCapabilityBuf A modifiable descriptor that, on return, contains the +application's capability information. The data returned in the descriptor +is mapped by the TApaAppCapability class. If no matching application is found, +then the content of this descriptor is not changed. +@param aAppUid The application specific UID. +@return KErrNone, if successful; KErrNotFound, if no matching entry can be found; otherwise +one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const + { + return SendReceiveWithReconnect(EAppListServGetAppCapability,TIpcArgs(&aCapabilityBuf,aAppUid.iUid)); + } + + + +/** Starts an application defined by the specified command line information. + This is an asynchronous method which doesn't wait for the process creation to complete. + To be informed of the process creation success, + then appropriate overloaded method taking a TRequestStatus parameter should be used. + +This is only recommended for non document based applications. + +View based applications are usually started by activating a specific view +using CCoeAppUi::ActivateViewL. Alternatively, using StartApp() to start a +view based application will activate the application's default view. + +@param aCommandLine The command line. +@return KErrNone, if successful; KErrNotFound, if the application cannot be +found; otherwise one of the other system-wide error codes. +@see CCoeAppUi::ActivateViewL() +*/ +EXPORT_C TInt RApaLsSession::StartApp(const CApaCommandLine& aCommandLine) + { + return DoStartApp(aCommandLine, NULL,NULL); + } + +/** Starts an application defined by the specified command line information. + This is an asynchronous method which doesn't wait for the process creation to complete. + To be informed of the process creation success, + then appropriate overloaded method taking a TRequestStatus parameter should be used. + +This is only recommended for non document based applications. + +View based applications are usually started by activating a specific view +using CCoeAppUi::ActivateViewL. Alternatively, using StartApp() to start a +view based application will activate the application's default view. + +@param aCommandLine The command line. +@param aThreadId On return, the id of the main thread started. +@return KErrNone, if successful; KErrNotFound, if the application cannot be +found; otherwise one of the other system-wide error codes. +@see CCoeAppUi::ActivateViewL() +*/ +EXPORT_C TInt RApaLsSession::StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId) + { + return DoStartApp(aCommandLine, &aThreadId,NULL); + } + + +/** Starts an application defined by the specified command line information. + +This is only recommended for non document based applications. + +View based applications are usually started by activating a specific view +using CCoeAppUi::ActivateViewL. Alternatively, using StartApp() to start a +view based application will activate the application's default view. + +@param aCommandLine The command line. +@param aThreadId On return, the id of the main thread started. +@param aRequestStatusForRendezvous If not NULL, the asynchronous RProcess::Rendezvous() +function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on +the new application process. If this function does not return KErrNone, RProcess::Rendezvous() will +not be called passing aRequestStatusForRendezvous, so in this case the caller must not wait +on aRequestStatusForRendezvous. +@return KErrNone, if successful; KErrNotFound, if the application cannot be +found; otherwise one of the other system-wide error codes. +@see CCoeAppUi::ActivateViewL() +*/ +EXPORT_C TInt RApaLsSession::StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId,TRequestStatus* aRequestStatusForRendezvous ) + { + return DoStartApp(aCommandLine, &aThreadId,aRequestStatusForRendezvous); + } + + +TInt RApaLsSession::DoStartApp(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous) + { + TRAPD(error, DoStartAppL(aCommandLine, aThreadId, aRequestStatusForRendezvous)); + return error; + } + +void RApaLsSession::DoStartAppL(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous) + { + // This function does not require "this" object to be connected to the Apparc server, + // but if not, it works with some limitations (see the following document for a list + // of these limitations: + // generic/app-framework/Documentation/PREQ967_solution_constraints.doc). + +#if defined(USE_IH_RAISE_EVENT) + const TInt appStartupInstrumentationEventIdBase=aCommandLine.AppStartupInstrumentationEventIdBase(); + if (appStartupInstrumentationEventIdBase!=0) + { + IH_DECLARE( lInstrumentationHandler ); + IH_CREATE( lInstrumentationHandler ); + IH_RAISE_EVENT( lInstrumentationHandler, appStartupInstrumentationEventIdBase+MTestInstrumentation::TIDOffsetBeginApplicationFirstRedraw ); + IH_RAISE_EVENT( lInstrumentationHandler, appStartupInstrumentationEventIdBase+MTestInstrumentation::TIDOffsetBeginApplicationReadyForInput ); + IH_DELETE( lInstrumentationHandler ); + } +#endif + + // Retrieve the executable name from the CApaCommandLine object passed in. + const TPtrC logicalExecutableName(aCommandLine.ExecutableName()); + // Rule-based app launching is not allowed unless there is a connected RApaLsSession object. + if(Handle() != KNullHandle) + { + // requesting from rule-based plug-ins if we can run an application + // if server fails while requested rule-based plug-ins it returns a negative value - proceed with launching the application in this case + TBool okayToRun = SendReceiveWithReconnect(EAppListServRuleBasedLaunching, TIpcArgs(&logicalExecutableName)); + if(!okayToRun) + { + User::Leave(KErrCancel); + } + } + + TFileName nativeExecutableNameOfNonNativeApplication; + RProcess process; + HBufC8* opaqueData=NULL; + CleanupStack::PushL(TCleanupItem(DeletePointerToPointerToTAny, &opaqueData)); + + // if we're connected to the Apparc server, try to get the opaque-data and native-executable name + // (the latter is only if it's a non-native application that we're launching) + if (Handle()!=KNullHandle) + { + const TInt lengthOfOpaqueData=User::LeaveIfError(SendReceiveWithReconnect(EAppListServGetNativeExecutableNameIfNonNative, TIpcArgs(&nativeExecutableNameOfNonNativeApplication, &logicalExecutableName))); + if (lengthOfOpaqueData>0) + { + User::LeaveIfError(GetOpaqueData(opaqueData, lengthOfOpaqueData)); + } + } + + // try first to create the application process without interacting with the Apparc server at all - + // assumes "logicalExecutableName" is itself a native executable + TUidType uidType(KNullUid, KNullUid, KNullUid); + TInt err = process.CreateWithStackOverride(logicalExecutableName, KNullDesC, uidType, MinApplicationStackSize(), EOwnerProcess); + + // If we haven't been able to create the process using the native executable name from the command line + // object, instead try to create it using the native executable name of the non-native application. + // Can only do this if apparc is connected and thus this name has been retrieved above and + // nativeExecutableNameOfNonNativeApplication populated. + if ((err != KErrNone) && nativeExecutableNameOfNonNativeApplication.Length()>0) + { + err = process.CreateWithStackOverride(nativeExecutableNameOfNonNativeApplication, KNullDesC, uidType, MinApplicationStackSize(), EOwnerProcess); + } + + // if we managed to create the process via either of the two methods attempted above (with the native + // name or the native name of the non-native app), finish setting it up and "resume" it + if (err == KErrNone) + { + CleanupStack::PushL(TCleanupItem(CleanupOperation, &process)); + if (opaqueData!=NULL) + { + const_cast(aCommandLine).SetOpaqueDataL(*opaqueData); + } + aCommandLine.SetProcessEnvironmentL(process); + if (aThreadId!=NULL) + { + GetThreadIdL(*aThreadId, process); + } + if (aRequestStatusForRendezvous!=NULL) + { + process.Rendezvous(*aRequestStatusForRendezvous); + } + // Note - must not leave between here and the end of this method because we only expect + // the caller to wait on aRequestStatusForRendezvous if this method does not leave. + if(aRequestStatusForRendezvous != NULL && *aRequestStatusForRendezvous != KRequestPending) + { + User::WaitForRequest(*aRequestStatusForRendezvous); + User::Leave(aRequestStatusForRendezvous->Int()); // item on cleanupstack terminates and closes the process + } + else + { + process.Resume(); + } + CleanupStack::Pop(&process); + process.Close(); + } + else // Couldn't create a process + { + if (Handle()==KNullHandle) // not connected to apparc + { + const TPtrC executableName(aCommandLine.ExecutableName()); + + // Java applications have an empty ExecutableName, as they use the CApaCommandLine's + // opaque-data attribute. Not connected to apparc so can't start a non-native app. + // Therefore we should handle this case with KErrNotSupported rather than whatever + // RProcess::Create returns when passed an empty descriptor. + if (executableName.Length() == 0) + { + User::Leave(KErrNotSupported); + } + + // Otherwise return the error code from RProcess::Create. + User::Leave(err); + + } + else // Handle()!=KNullHandle + { + // we can only proceed with the remaining option if we're connected to the Apparc server + // as a last resort, try use the legacy file-recognizer framework to launch the application + TThreadId dummyThreadId; + TPckg threadId((aThreadId!=NULL)? *aThreadId: dummyThreadId); + const TInt opcode=(aThreadId==NULL)? + EAppListServStartAppWithoutReturningThreadId: + EAppListServStartAppReturningThreadId; + TIpcArgs ipcArgs; + aCommandLine.GetIpcArgsLC(ipcArgs); + if (aThreadId!=NULL) + { + ipcArgs.Set(CApaCommandLine::EIpcFirstFreeSlot, &threadId); + } + User::LeaveIfError(SendReceiveWithReconnect(opcode, ipcArgs)); + if (aRequestStatusForRendezvous!=NULL) + { + User::RequestComplete(aRequestStatusForRendezvous,KErrNone); + } + CleanupStack::PopAndDestroy(); // the TIpcArgs + } + } + CleanupStack::PopAndDestroy(&opaqueData); + } //lint !e1762 Suppress member function could be made const + +void RApaLsSession::CleanupOperation(TAny* aAny) + { + RProcess* activeProcess = reinterpret_cast(aAny); + activeProcess->Terminate(KErrGeneral); + activeProcess->Close(); + } + +void RApaLsSession::GetThreadIdL(TThreadId& aThreadId, const RProcess& aProcess) + { // static + TFullName fullName(aProcess.Name()); + _LIT(KCCMain,"::Main"); + fullName.Append(KCCMain); + RThread thread; + User::LeaveIfError(thread.Open(fullName,EOwnerThread)); + aThreadId=thread.Id(); + thread.Close(); + } + +void RApaLsSession::DeletePointerToPointerToTAny(TAny* aPointerToPointerToTAny) + { // static + __ASSERT_ALWAYS(aPointerToPointerToTAny, Panic(EPanicNullPointer)); + delete *static_cast(aPointerToPointerToTAny); //lint !e613 Suppress possible use of null pointer + } //lint !e818 Suppress pointer parameter could be declared as pointing to const + +/** +Sets up slots 0 and 1 in aIpcArgs - assumes that slots 2 and 3 have already been set up; +it then invokes aOpcode +*/ +TInt RApaLsSession::GetExecutableName(TDes& aNativeExecutableName, TDes& aLogicalExecutableName, HBufC8*& aOpaqueData, TIpcArgs& aIpcArgs, TInt aOpcode) const + { + aNativeExecutableName.SetLength(0); // if this comes out zero-length from EAppListServExecutableNameForXxx below then use the logicalExecutableName in RProcess::Create (in this case it's a native C++ application) + aIpcArgs.Set(0, &aNativeExecutableName); + aIpcArgs.Set(1, &aLogicalExecutableName); + const TInt lengthOfOpaqueData=SendReceiveWithReconnect(aOpcode, aIpcArgs); + if (lengthOfOpaqueData<0) + { + return lengthOfOpaqueData; // it's an error code + } + if (lengthOfOpaqueData>0) + { + return GetOpaqueData(aOpaqueData, lengthOfOpaqueData); + } + aOpaqueData=NULL; + return KErrNone; + } + +TInt RApaLsSession::GetOpaqueData(HBufC8*& aOpaqueData, TInt aLengthOfOpaqueData) const + { + HBufC8* const opaqueData=HBufC8::New(aLengthOfOpaqueData); + if (opaqueData==NULL) + { + return KErrNoMemory; + } + TPtr8 opaqueData_asWritable(opaqueData->Des()); + const TInt error=SendReceiveWithReconnect(EAppListServGetOpaqueData, TIpcArgs(&opaqueData_asWritable)); + if (error!=KErrNone) + { + delete opaqueData; + return error; + } + aOpaqueData=opaqueData; + return error; + } + +TInt RApaLsSession::StartApplicationPassingFileHandle(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous) + { + TFileName documentName; + aFile.FullName(documentName); + CApaCommandLine* commandLine=NULL; + TRAPD(error, commandLine=CApaCommandLine::NewLC(); + commandLine->SetCommandL(EApaCommandOpen); + commandLine->SetExecutableNameL(aLogicalExecutableName); + commandLine->SetFileByHandleL(aFile); + commandLine->SetDocumentNameL(documentName); + if (aOpaqueData!=NULL) + { + commandLine->SetOpaqueDataL(*aOpaqueData); + } + StartApplicationL(aNativeExecutableName, *commandLine, aThreadId, aRequestStatusForRendezvous); + CleanupStack::PopAndDestroy(commandLine)); + return error; + } + +TInt RApaLsSession::StartApplicationPassingDocumentName(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const TDesC& aDocumentName, TThreadId& aThreadId,TApaCommand aCommand, TRequestStatus* aRequestStatusForRendezvous) + { + CApaCommandLine* commandLine=NULL; + TRAPD(error, commandLine=CApaCommandLine::NewLC(); + commandLine->SetCommandL(aCommand); + commandLine->SetExecutableNameL(aLogicalExecutableName); + commandLine->SetDocumentNameL(aDocumentName); + if (aOpaqueData!=NULL) + { + commandLine->SetOpaqueDataL(*aOpaqueData); + } + StartApplicationL(aNativeExecutableName, *commandLine, aThreadId, aRequestStatusForRendezvous); + CleanupStack::PopAndDestroy(commandLine)); + return error; + } + +void RApaLsSession::StartApplicationL(const TDesC& aNativeExecutableName, const CApaCommandLine& aCommandLine, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous) + { + RProcess process; + TPtrC actualNativeExecutableName(aNativeExecutableName); + if (actualNativeExecutableName.Length()==0) + { + actualNativeExecutableName.Set(aCommandLine.ExecutableName()); // it's a native C++ application, rather than a MIDlet, Python script, etc + } + + if(Handle() != KNullHandle) + { + //requesting from rule-based plug-ins if we can run an application + TBool okayToRun = SendReceiveWithReconnect(EAppListServRuleBasedLaunching, TIpcArgs(&actualNativeExecutableName)); + //If server fails while requested rule-based plug-ins it returns a negative value. + //We shall proceed with launching an application in this case. + if(!okayToRun) + { + User::Leave(KErrCancel); + } + } + + TUidType uidType(KNullUid, KNullUid, KNullUid); + User::LeaveIfError(process.CreateWithStackOverride(actualNativeExecutableName, KNullDesC, uidType, MinApplicationStackSize(), EOwnerProcess)); // RProcess::CreateWithStackOveride - TESTED + + CleanupClosePushL(process); + aCommandLine.SetProcessEnvironmentL(process); + GetThreadIdL(aThreadId, process); + if (aRequestStatusForRendezvous!=NULL) + { + process.Rendezvous(*aRequestStatusForRendezvous); + } + process.Resume(); + CleanupStack::PopAndDestroy(&process); + } //lint !e1762 Suppress member function could be made const + + + +/** Gets the data (MIME) type for data taken from a file with a specified name. + +@param aName The full filename, including drive and path, of the file containing the data. +@param aBuffer A buffer containing data taken from the specified file; typically +the data is read from the beginning of the file. +@param aDataType On return, contains the result of the attempt to recognize +data. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const + { + TPckg result(aDataType); + return SendReceiveWithReconnect(EAppListServRecognizeData,TIpcArgs(&result, &aName, &aBuffer)); + } //lint !e1764: Suppress reference parameter could be declared const ref + +/** Gets the data (MIME) type for data in a file passed by handle. + +@param aFile The file containing the data. Before this function can be called, +the file server session which owns this file handle must first be marked as shareable by +calling RFs::ShareProtected(). +@param aDataType On return, contains the result of the attempt to recognize +data. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. */ +EXPORT_C TInt RApaLsSession::RecognizeData(const RFile& aFile, TDataRecognitionResult& aDataType) const + { + TPckg result(aDataType); + TIpcArgs ipcArgs(&result); + const TInt error = aFile.TransferToServer(ipcArgs, 1, 2); + if (error != KErrNone) + { + return error; + } + return SendReceiveWithReconnect(EAppListServRecognizeDataPassedByFileHandle,ipcArgs); + } //lint !e1764 Suppress reference parameter 'aDataType' could be declared const ref + + + +/** Tests whether data taken from a named file has the specified +data (MIME) type. + +@param aName The name of the file containing the data. +@param aBuffer A buffer containing data taken from the specified file; typically +the data is read from the beginning of the file. +@param aDataType The data (MIME) type. +@param aResult On return, contains the result of the test. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const + { + const TPckgC dataType(aDataType); + const TInt returnValue=SendReceiveWithReconnect(EAppListServRecognizeSpecificData,TIpcArgs(&dataType, &aName, &aBuffer)); + if (returnValue<0) + { + return returnValue; + } + aResult=returnValue; + return KErrNone; + } + +EXPORT_C TInt RApaLsSession::RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult) const +/** +Gets the data (MIME) type for files in a specified directory. Because this call may take a long +time to complete, the asynchronous version is strongly recommended. Furthermore, it is not possible +to use this synchronous function while an asynchronous request is still active. +@publishedAll +@released +@param aPath A valid path. Note that the path must end with a backslash. +@param aResult If the call was successful, this parameter contains the recognition result. +@return KErrNone, if successful; otherwise one of the other system-wide error codes. +*/ + { + return RecognizeFilesL(aPath, KAllDataTypes, aResult); + } + +EXPORT_C TInt RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult) const +/** +Gets the data (MIME) type for files in a specified directory. Because this call may take a long +time to complete, the asynchronous version is strongly recommended. Furthermore, it is not possible +to use this synchronous function while an asynchronous request is still active. +@publishedAll +@released +@param aPath A valid path. Note that the path must end with a backslash. +@param aDataType A data type filter. Wildcards are allowed. For example, "text*" would also +add "text/plain" data types to the result. +@param aResult If the call was successful, this parameter contains the recognition result. +@return KErrNone, if successful; otherwise one of the other system-wide error codes. +*/ + { + if(iExtension && iExtension->RecognitionActive()) + { + return KErrInUse; + } + _LIT(KBackslash,"\\"); + if(aPath.Right(1) != KBackslash) + { + return KErrPathNotFound; + } + + TPckgBuf requiredBufferSizePckg; + aResult.SetPath(aPath); + TInt error = SendReceiveWithReconnect(EAppListServRecognizeFiles,TIpcArgs(&aPath,&requiredBufferSizePckg,&aDataType)); + if(KErrNone == error) + { + error=TransferAndInternalizeDataL(aPath, requiredBufferSizePckg(), aResult); + } + return error; + + } + +EXPORT_C void RApaLsSession::RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus) +/** +Gets the data (MIME) type for files in a specified directory. +@publishedAll +@released +@param aPath A valid path. Note that the path must end with a backslash. +@param aResult If the call was successful, this parameter contains the recognition result. +@param aStatus A request status object. +*/ + { + RecognizeFilesL(aPath,KAllDataTypes,aResult,aStatus); + } + +EXPORT_C void RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus) +/** +Gets the data (MIME) type for files in a specified directory. +@publishedAll +@released +@param aPath A valid path. Note that the path must end with a backslash. +@param aDataType A data type filter. Wildcards are allowed. For example, "text*" would also +add "text/plain" data types to the result. +@param aResult If the call was successful, this parameter contains the recognition result. +@param aStatus A request status object +*/ + { + if(iExtension == NULL) + { + iExtension = new (ELeave) CApaLsSessionExtension(*this); + } + iExtension->RecognizeFilesL(aPath, aDataType, aResult, aStatus); + } + +TInt RApaLsSession::TransferAndInternalizeDataL(const TDesC& aPath, const TInt aRequiredBufferSize, CDataRecognitionResultArray& aResult) const +/** +This function transfers the data to the client-side and "fills" the CDataRecognitionResultArray object. +@internalComponent +*/ +{ + CBufFlat* const buffer=CBufFlat::NewL(aRequiredBufferSize); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,aRequiredBufferSize); + TPtr8 bufPtr=buffer->Ptr(0); + + // transfer recognition buffer + TInt error = SendReceiveWithReconnect(EAppListServTransferRecognitionResult,TIpcArgs(&aPath,&bufPtr,aRequiredBufferSize)); + if(KErrNone == error) + { + error = aResult.InternalizeL(*buffer); + } + CleanupStack::PopAndDestroy(buffer); + return error; + } + +EXPORT_C void RApaLsSession::CancelRecognizeFiles() +/** +Cancels any outstanding asynchronous recognition requests. +@publishedAll +@released +*/ + { + if(iExtension) + { + iExtension->CancelRecognizeFiles(); + } + } + +EXPORT_C void RApaLsSession::Close() +/** +Closes the session. Needs to be called to avoid memory leaks. +@publishedAll +@released +*/ + { + CancelRecognizeFiles(); + RHandleBase::Close(); + delete iExtension; + iExtension = NULL; + } + +EXPORT_C TInt RApaLsSession::RecognizeSpecificData(const RFile& aFile, const TDataType& aDataType, TBool& aResult) const +/** Tests whether data taken from a file passed by handle has the specified +data (MIME) type. + +@param aFile The file containing the data. Before this function can be called, +the file server session which owns this file handle must first be marked as shareable by +calling RFs::ShareProtected(). +@param aDataType The data (MIME) type. +@param aResult On return, contains the result of the test. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. */ + { + const TPckgC dataType(aDataType); + TIpcArgs ipcArgs(&dataType); + TInt returnValue = aFile.TransferToServer(ipcArgs, 1, 2); + if (returnValue == KErrNone) + { + returnValue=SendReceiveWithReconnect(EAppListServRecognizeSpecificDataPassedByFileHandle,ipcArgs); + } + if (returnValue < KErrNone) + { + return returnValue; + } + aResult=returnValue; + return KErrNone; + } + + +/** Gets the UID of an application that can handle the specified data (MIME) type. + +If no application can be found, the function returns the UID of the preferred +default handler. If none of the default handlers can handle the data type, +then a NULL UID is returned. + +@param aDataType The data (MIME) type. +@param aAppUid On return, the UID of the application that can handle the data +(MIME) type; this may be NULL. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::AppForDataType(const TDataType& aDataType, TUid& aAppUid) const + { + const TPckgC dataType(aDataType); + TPckg uid(aAppUid); + return SendReceiveWithReconnect(EAppListServAppForDataType,TIpcArgs(&dataType,&uid)); + } //lint !e1764 Suppress reference parameter 'aAppUid' could be declared const ref + + +/** Finds and launches an application to handle the document contained in the specified +file. + +@param aFileName The document name. +@param aThreadId On return, the id of the main thread started. +@param aLaunchType Not used. Reserved for future use. +@return KErrNone, if successful; EAppListInvalid, if the server's initial population of +the list has not completed; KErrNotFound, if a matching entry could not be found; otherwise +one of the other system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::StartDocument(const TDesC& aFileName, TThreadId& aThreadId, TLaunchType /*aLaunchType*/) + { + HBufC8* buffer=NULL; + TInt error=GetBufferFromFile(buffer, aFileName); + if (error!=KErrNone) + { + return error; + } + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + TIpcArgs ipcArgs; + ipcArgs.Set(2, &aFileName); + ipcArgs.Set(3, buffer); + error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenDocument); + if (error!=KErrNone) + { + delete buffer; + return error; + } + error = StartApplicationPassingDocumentName(nativeExecutableName, logicalExecutableName, opaqueData, aFileName, aThreadId, EApaCommandOpen, NULL); + delete opaqueData; + if(error!=KErrNone && error!=KErrCancel) + { + TPckg threadId(aThreadId); + error = SendReceiveWithReconnect(EAppListServStartDocument,TIpcArgs(&threadId, &aFileName, buffer)); + } + delete buffer; + return error; + } + +EXPORT_C TInt RApaLsSession::StartDocument(RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous/*=NULL*/) +/** Finds and launches an application to handle the document contained in the specified file + +@param aFile The file handle. Before this function can be called, +the file server session which owns this file handle must first be marked as shareable by +calling RFs::ShareProtected(). +@param aThreadId On return, the id of the main thread started. +@param aRequestStatusForRendezvous If not NULL, the asynchronous RProcess::Rendezvous() +function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on +the new application process. +@return KErrNone, if successful; KErrNotFound, if no suitable application can +be found; otherwise one of the other system-wide error codes. */ + { + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + TIpcArgs ipcArgs; + TInt error=aFile.TransferToServer(ipcArgs, 2, 3); + if (error == KErrNone) + { + error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenDocumentPassedByFileHandle); + } + if (error!=KErrNone) + { + return error; + } + error=StartApplicationPassingFileHandle(nativeExecutableName, logicalExecutableName, opaqueData, aFile, aThreadId, aRequestStatusForRendezvous); + delete opaqueData; + return error; + } //lint !e1764 Suppress reference parameter could be declared const ref + + +/** Launches an application that can handle the specified data (MIME) type. + +The application handles the document contained in the specified file. + +@param aFileName The document name. +@param aDataType The data (MIME) type. +@param aThreadId On return, the id of the main thread started. +@param aLaunchType Not used. Reserved for future use. +@return KErrNone, if successful; EAppListInvalid if the server's initial population of +the list has not completed; KErrNotFound, if no suitable application can +be found; otherwise one of the other system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aThreadId, TLaunchType /*aLaunchType*/) + { + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + const TPckgC dataType(aDataType); + TIpcArgs ipcArgs; + ipcArgs.Set(2, &dataType); + TInt error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenDataType); + if (error!=KErrNone) + { + return error; + } + error = StartApplicationPassingDocumentName(nativeExecutableName, logicalExecutableName, opaqueData, aFileName, aThreadId,EApaCommandOpen,NULL); + delete opaqueData; + if(error!=KErrNone && error!=KErrCancel) + { + TPckg threadId(aThreadId); + error = SendReceiveWithReconnect(EAppListServStartDocumentByDataType,TIpcArgs(&threadId, &aFileName, &dataType)); + } + return error; + } + +EXPORT_C TInt RApaLsSession::StartDocument(RFile& aFile, const TDataType& aDataType, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous/*=NULL*/) +/** Finds and launches an application to handle the document contained in the specified file + +@param aFile The file handle. +@param aDataType The data (MIME) type. +@param aThreadId On return, the id of the main thread started. +@param aRequestStatusForRendezvous If not NULL, the asynchronous RProcess::Rendezvous() +function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on +the new application process. +@return KErrNone, if successful; KErrNotFound, if no suitable application can +be found; otherwise one of the other system-wide error codes. */ + { + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + const TPckgC dataType(aDataType); + TIpcArgs ipcArgs; + ipcArgs.Set(2, &dataType); + TInt error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenDataType); + if (error!=KErrNone) + { + return error; + } + error=StartApplicationPassingFileHandle(nativeExecutableName, logicalExecutableName, opaqueData, aFile, aThreadId, aRequestStatusForRendezvous); + delete opaqueData; + return error; + } //lint !e1764 Suppress reference parameter could be declared const ref + +EXPORT_C TInt RApaLsSession::StartDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType) +/** Launches the application identified by the specified UID. + +The application handles the document contained in the specified file. + +@param aFileName The document name. +@param aAppUid The application specific UID. +@param aThreadId On return, the id of the main thread started. +@param aLaunchType Not used. Reserved for future use. +@return KErrNone, if successful; EAppListInvalid if the server's initial population of +the list has not completed; KErrNotFound, if no suitable application can +be found; otherwise one of the other system-wide error codes. */ + { + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + TIpcArgs ipcArgs; + ipcArgs.Set(2, aAppUid.iUid); + TInt error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenAppUid); + if (error!=KErrNone) + { + return error; + } + error = StartApplicationPassingDocumentName(nativeExecutableName, logicalExecutableName, opaqueData, aFileName, aThreadId,EApaCommandOpen,NULL); + delete opaqueData; + if(error!=KErrNone && error!=KErrCancel) + { + error = StartAndCreate(EAppListServStartDocumentByUid,aFileName,aAppUid,aThreadId,aLaunchType); + } + return error; + } + +EXPORT_C TInt RApaLsSession::StartDocument(RFile& aFile, TUid aAppUid, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous/*=NULL*/) +/** Finds and launches an application to handle the document contained in the specified file + +@param aFile The file handle. +@param aAppUid The application specific UID. +@param aThreadId On return, the id of the main thread started. +@param aRequestStatusForRendezvous If not NULL, the asynchronous RProcess::Rendezvous() +function is called (being passed this TRequestStatus object) before RProcess::Resume() is called on +the new application process. +@return KErrNone, if successful; KErrNotFound, if no suitable application can +be found; otherwise one of the other system-wide error codes. */ + { + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + TIpcArgs ipcArgs; + ipcArgs.Set(2, aAppUid.iUid); + TInt error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenAppUid); + if (error!=KErrNone) + { + return error; + } + error=StartApplicationPassingFileHandle(nativeExecutableName, logicalExecutableName, opaqueData, aFile, aThreadId, aRequestStatusForRendezvous); + delete opaqueData; + return error; + } //lint !e1764 Suppress reference parameter could be declared const ref + + +/** Launches the application identified by the specified UID and creates a new document. + +To create a document file with the passed document name, the application needs to override the 3-parameter +overload of ProcessCommandParametersL() to call the 2-parameter overload. + +Otherwise, a document will be created with the default document name present in the application resource file. +If default document name is empty or not provided, no document is created. + +If the application resource file is not present, a document with application caption name is created. + +@param aFileName The document name. +@param aAppUid The application specific UID. +@param aThreadId On return, the id of the main thread started. +@param aLaunchType Not used. Reserved for future use. +@return KErrNone, if successful; EAppListInvalid if the server's initial population of +the list has not completed; KErrNotFound, if no suitable application can +be found; otherwise one of the other system-wide error codes. +@see CEikAppUi::ProcessCommandParametersL(). +*/ +EXPORT_C TInt RApaLsSession::CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType) + { + TFileName nativeExecutableName; // the name of the EXE that we pass to RProcess::Create + TFileName logicalExecutableName; // the name of the MIDlet, Python script, etc + HBufC8* opaqueData=NULL; + TIpcArgs ipcArgs; + ipcArgs.Set(2, aAppUid.iUid); + TInt error=GetExecutableName(nativeExecutableName, logicalExecutableName, opaqueData, ipcArgs, EAppListServGetExecutableNameGivenAppUid); + if (error!=KErrNone) + { + return error; + } + error = StartApplicationPassingDocumentName(nativeExecutableName, logicalExecutableName, opaqueData, aFileName, aThreadId,EApaCommandCreate,NULL); + delete opaqueData; + if(error!=KErrNone && error!=KErrCancel) + { + error = StartAndCreate(EAppListServCreateDocumentByUid,aFileName,aAppUid,aThreadId,aLaunchType); + } + return error; + } + +TInt RApaLsSession::StartAndCreate(TInt aRqst,const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType /*aLaunchType*/) + { + TPckg threadId(aThreadId); + return SendReceiveWithReconnect(aRqst,TIpcArgs(&threadId, &aFileName, aAppUid.iUid)); + } //lint !e1762 !e1764 + //Suppress reference parameter 'aThreadId' could be declared const ref + //Suppress member function could be made const + + + + +/** Gets the available icon sizes for the application with the specified UID. + +@param aAppUid The application specific UID. +@param aArrayToFill On return, the array contains all of the available icon +sizes. +@return KErrNone, if successful; KErrNotFound, if no matching application can +be found; KErrNotSupported, if the application provides icons in non-MBM format; +otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppIconSizes(TUid aAppUid, CArrayFixFlat& aArrayToFill) const + { + TRAPD(error,DoGetAppIconSizesL(aAppUid,aArrayToFill)); + return error; + } + +void RApaLsSession::FetchArrayL(MArrayFiller& aArrayFiller,TUid aAppUid, TInt aOpcode, TInt aInitialBufSize) const + { + CBufFlat* buffer=CBufFlat::NewL(aInitialBufSize); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,aInitialBufSize); + TPtr8 bufPtr=buffer->Ptr(0); + const TInt sizeRequired=User::LeaveIfError(SendReceiveWithReconnect(aOpcode,TIpcArgs(aAppUid.iUid,buffer->Size(),&bufPtr))); + if (sizeRequired>0) + { + __ASSERT_DEBUG(sizeRequired>buffer->Size(),User::Invariant()); + CleanupStack::PopAndDestroy(buffer); + buffer=CBufFlat::NewL(sizeRequired); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,sizeRequired); + bufPtr.Set(buffer->Ptr(0)); +#if defined(_DEBUG) + const TInt check= +#endif + User::LeaveIfError(SendReceiveWithReconnect(aOpcode,TIpcArgs(aAppUid.iUid,buffer->Size(),&bufPtr))); + __ASSERT_DEBUG(check==0,User::Invariant()); + } + RBufReadStream readStream; + readStream.Open(*buffer); + const TInt count=readStream.ReadUint32L(); + for (TInt i=0; i& aArrayToFill) const + { + TSizeArrayFiller arrayFiller(aArrayToFill); + FetchArrayL(arrayFiller, aAppUid, EAppListServGetAppIconSizes, KInitialIconBufSize); + } + + + +/** Gets the nearest matching application icon for the application with the specified +UID. + +The function gets the icon whose size matches the specified size. If there +is no exact match, then the function gets the closest smaller icon. + +This function should be used in preference to the TInt GetAppIcon(TUid,TInt,CApaMaskedBitmap&); +overload. + +@param aAppUid The application specific UID. +@param aSize The required size of the icon. +@param aAppBitmap On return, the application icon. +@return KErrNone, if successful; KErrNotFound, if a matching entry could not be found, or no +icon equal to or smaller than the specified size can be found; KErrNotSupported, if the +application provides icons in non-MBM format; otherwise one of the other system wide +error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const + { + SReturnData_AppIconByUidAndSize returnData = {0,0}; + TPckg returnData_asDescriptor(returnData); + TInt error=SendReceiveWithReconnect(EAppListServAppIconByUidAndSize,TIpcArgs(aAppUid.iUid,aSize.iWidth,aSize.iHeight,&returnData_asDescriptor)); + if (error==KErrNone) + { + error=aAppBitmap.Duplicate(returnData.iIcon); + if (error==KErrNone) + { + error=aAppBitmap.Mask()->Duplicate(returnData.iIconMask); + } + } + return error; + } + + + +/** + gets the bitmap handles from the Server, forms these up into a CApaMaskedBitmap + +Sets aAppBitmap to be the small, medium or large app icon of the app with uid +aAppUid, when aSize=0, 1 or 2 respectively. +Panics the caller if a different index is specified. +The overload which takes a TSize should be used instead. + +@deprecated +@param aAppUid The application specific UID. +@param aSize The required size of the icon. +@param aAppBitmap On return, the application icon. +@return KErrNone, if successful; KErrNotFound, if a matching entry could not be found, or no +icon equal to or smaller than the specified size can be found; KErrNotSupported, if the +application provides icons in non-MBM format, otherwise one of the other system wide +error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const + { + __ASSERT_ALWAYS((aSize>=0) && (aSize<3), Panic(EDPanicBadIconSize)); + SReturnData_AppIconByUid returnData = {0,0}; + TPckg returnData_asDescriptor(returnData); + TInt error=SendReceiveWithReconnect(EAppListServAppIconByUid,TIpcArgs(aAppUid.iUid,aSize,&returnData_asDescriptor)); + if (error==KErrNone) + { + error=aAppBitmap.Duplicate(returnData.iIcon); + if (error==KErrNone) + { + error=aAppBitmap.Mask()->Duplicate(returnData.iIconMask); + } + } + return error; + } + + + +EXPORT_C TInt RApaLsSession::GetAppIcon(TUid aAppUid, RFile& aFile) const +/** Gets an open shareable read only file handle to the application icon file for the +application with the specified UID. + +An icon file can only be defined by applications providing an application registration file. + +An icon file may be in any graphics format and contain one or more icons. + +On entering this function, aFile must be non-open. It is recommended that aFile is +pushed onto the cleanup-stack (via CleanupClosePushL()) before this function is called. + +@param aAppUid The application specific UID. +@param aFile On return, a read only open file handle to the icon file. +@return KErrNone, if successful; KErrNotFound, if a matching application could not be found, +or an icon filename was not defined; otherwise one of the other system wide error codes. +@see GetAppIcon +*/ + { + __ASSERT_ALWAYS(aFile.SubSessionHandle() == KNullHandle, Panic(EDPanicHandleAlreadySet)); + TPckgBuf fileHandle; + TInt sessionHandleOrErrorCode = SendReceiveWithReconnect(EAppListServAppIconFileHandle, TIpcArgs(aAppUid.iUid, &fileHandle)); + if (sessionHandleOrErrorCode >= KErrNone) + { + sessionHandleOrErrorCode = aFile.AdoptFromServer(sessionHandleOrErrorCode, fileHandle()); + } + return sessionHandleOrErrorCode; + } + + + +EXPORT_C TInt RApaLsSession::AppForDocument(const TDesC& aFileName, TUid& aAppUid, TDataType& aDataType) const +/** Gets the data (MIME) type of the data in the specified file and gets the UID +of an application that can handle this type. + +@param aFileName The name of the file containing the data. +@param aAppUid On return, the UID of the application that can handle the data +(MIME) type; this may be NULL. +@param aDataType On return, the data (MIME) type. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. */ + { + return DoAppForDocumentOptionallySpecifyingService(aFileName, TUid::Null(), aAppUid, aDataType, EAppListServAppForDocument); + } + + +/** Gets the data (MIME) type of the data in the specified file and gets the UID +of an application that can handle this type. + +@param aFile The file containing the data. Before this function can be called, +the file server session which owns this file handle must first be marked as shareable by +calling RFs::ShareProtected(). +@param aAppUid On return, the UID of the application that can handle the data +(MIME) type; this may be NULL. +@param aDataType On return, the data (MIME) type. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::AppForDocument(const RFile& aFile, TUid& aAppUid, TDataType& aDataType) const + { + return DoAppForDocumentOptionallySpecifyingService(aFile, TUid::Null(), aAppUid, aDataType, EAppListServAppForDocumentPassedByFileHandle); + } + +/** Tests whether the file is a native executable (DLL or EXE). + +@param aFileName The name of the file containing the data. +@param aProgram On return, true, if the file contains application code; false, +otherwise. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::IsProgram(const TDesC& aFileName, TBool& aProgram) const + { + _LIT(KLitSysBin, "\\sys\\bin\\"); + aProgram=(TParsePtrC(aFileName).Path().CompareF(KLitSysBin)==0); + return KErrNone; + } + +/** Gets the confidence threshold for successful data recognition. + +This is the minimum acceptable confidence level that must be reported by a +data recognizer for data to be accepted as of a given type. + +@param aConfidence On return, the confidence threshold. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::GetAcceptedConfidence(TInt& aConfidence) const + { + TPckg confidence(aConfidence); + return SendReceiveWithReconnect(EAppListServGetConfidence,TIpcArgs(&confidence)); + } //lint !e1764 Suppress reference parameter could be declared const ref + + + +/** Sets the confidence threshold for successful data recognition. + +This is the minimum acceptable confidence level that must be reported by a +data recognizer for data to be accepted as of a given type. + +@param aConfidence The confidence threshold. Although this is an integer value, +data recognizers use the discrete values defined by the CApaDataRecognizerType::TRecognitionConfidence +enumeration. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +@capability WriteDeviceData +*/ +EXPORT_C TInt RApaLsSession::SetAcceptedConfidence(TInt aConfidence) + { + return SendReceiveWithReconnect(EAppListServSetConfidence,TIpcArgs(aConfidence)); + } //lint !e1762 Suppress member function could be made const + + +EXPORT_C TInt RApaLsSession::GetPreferredBufSize(TInt& aPreferredBufSize) const +/** Gets the preferred number of bytes of data to read from a file for the purpose +of recognizing the data type. + +This should be used to determine the size of buffer to pass to the 3-parameter +overload of RecognizeData() or to the 4-parameter overload of RecognizeSpecificData(). + +@param aPreferredBufSize On return, contains either the largest buffer size required +by any of the currently installed data-recognizers, or the value that would be +returned by GetMaxDataBufSize(), whichever is less. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +@see GetMaxDataBufSize() */ + { + const TInt preferredBufSize=SendReceiveWithReconnect(EAppListServPreferredBufSize, TIpcArgs()); + if (preferredBufSize0) + { + CBufFlat* const buf=CBufFlat::NewL(ret); + CleanupStack::PushL(buf); + buf->ExpandL(0,ret); + TPtr8 ptr=buf->Ptr(0); + ret=SendReceiveWithReconnect(EAppListServGetDataTypesPhase2,TIpcArgs(&ptr)); + if (ret==KErrNone) + { + RBufReadStream readStream(*buf); + readStream >> aDataTypes; + } + CleanupStack::PopAndDestroy(buf); + } + return ret; + } + + + +/** Gets the icon for the specified view published by the application that has +the specified UID. + +The icon returned is that which is closest in size to the specified size. + +@param aAppUid The application specific UID. +@param aViewUid The UID identifying the view. +@param aSize The requested size of the icon. +@param aViewBitmap On return, the icon that is closest in size to the requested +size. +@return KErrNone, if successful; KErrNotFound, if no matching application nor matching view +can be found; KErrNotSupported, if the application provides icons in non-MBM format; +otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppViewIcon(TUid aAppUid, TUid aViewUid, const TSize& aSize, CApaMaskedBitmap& aViewBitmap) const + { + const TApaAppViewIconSizeData appViewIconSizeData(aAppUid, aViewUid, aSize); + const TPckgC inputData(appViewIconSizeData); + SReturnData_ViewIconByUidAndSize returnData = {0,0}; + TPckg returnData_asDescriptor(returnData); + TInt error=SendReceiveWithReconnect(EAppListServViewIconByUidAndSize,TIpcArgs(&inputData,&returnData_asDescriptor)); + if (error==KErrNone) + { + error=aViewBitmap.Duplicate(returnData.iIcon); + if (error==KErrNone) + { + error=aViewBitmap.Mask()->Duplicate(returnData.iIconMask); + } + } + return error; + } + + + +/** Gets the views published by the application that has the specified UID. + +Information on each view is contained in a TApaAppViewInfo object, and this +set of objects is put into the array supplied by the caller. + +@param aAppViews On return, the array contains information on all of the views +published by the specified application. +@param aAppUid The application specific UID. +@return KErrNone, if successful; KErrNotFound, if no matching application can +be found; otherwise one of the other system wide error codes. +@see TApaAppViewInfo +*/ +EXPORT_C TInt RApaLsSession::GetAppViews(CApaAppViewArray& aAppViews, TUid aAppUid) const + { + TRAPD(error,DoGetAppViewsL(aAppViews,aAppUid)); + return error; + } + +void RApaLsSession::DoGetAppViewsL(CApaAppViewArray& aArrayToFill, TUid aAppUid) const + { + TViewDataArrayFiller arrayFiller(aArrayToFill); + FetchArrayL(arrayFiller, aAppUid, EAppListServGetAppViews, KInitialViewDataBufSize); + } + + + +/** Gets the list of file names for which the application with the specified +UID claims ownership. + +The list is written to a descriptor array supplied by the caller. + +Note that if the function fails due to lack of memory, the array is left in +an undefined state. + +@param aAppOwnedFiles On return, the descriptor array contains the file names. +@param aAppUid The application specific UID. +@return KErrNone, if successful; KErrNotFound, if no matching application can +be found; otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppOwnedFiles(CDesCArray& aAppOwnedFiles, TUid aAppUid) const + { + TRAPD(error,DoGetAppOwnedFilesL(aAppOwnedFiles,aAppUid)); + return error; + } + + + +/** Gets the number of icons defined by the app that has the specified UID + +Applications that don't define icons in their application information file will +return an aCount value of zero when this function is called. + +@param aAppUid The application specific UID +@param aCount On return, contains the number of icons defined by the application +@return KErrNone, if successful; KErrNotFound, if a matching application could not be found; +KErrNotSupported, if the application provides icons in non-MBM format; otherwise one of +the other system-wide error codes. +*/ +EXPORT_C TInt RApaLsSession::NumberOfOwnDefinedIcons(TUid aAppUid, TInt& aCount) const + { + TPckgBuf pckg; + TInt ret=SendReceiveWithReconnect(EAppListServNumberOfOwnDefinedIcons,TIpcArgs(aAppUid.iUid,&pckg)); + if (ret==KErrNone) + { + aCount=pckg(); + } + return ret; + } + + + +/** Gets the full filename of a file containing application icons for the +application with the specified UID. + +An icon file can only be defined by applications providing an application registration file. + +An icon file may be in any graphics format and contain one or more icons. + +@param aAppUid The application specific UID. +@param aFullFileName On return, the full filename of a file containing one or more +application icons. Returns a pointer to the filename and transfers ownership to the caller. +@return KErrNone, if successful; KErrNotFound, if a matching application could not be found, +or an icon filename was not defined; KErrNotSupported, if the application does not +provide an application registration file; otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppIcon(TUid aAppUid, HBufC*& aFullFileName) const + { + TFileName fileName; + TPckg filenamePckg(fileName); + TInt ret=SendReceiveWithReconnect(EAppListServAppIconFileName, TIpcArgs(aAppUid.iUid, &filenamePckg)); + if (ret==KErrNone) + { + HBufC* fullFileName = HBufC::New(fileName.Length()); + if (fullFileName == NULL) + { + return KErrNoMemory; + } + else + { + *fullFileName = fileName; + aFullFileName = fullFileName; // ownership transferred to caller + } + } + return ret; + } + + + +/** Gets the full filename of a file containing view-specific icons for the application +with the specified UID and view. + +A file containing view-specific icons can only be defined by applications providing +an application registration file. + +A view icon file may be in any graphics format and contain one or more view icons. + +@param aAppUid The application specific UID. +@param aViewUid The UID identifying the view. +@param aFullFileName On return, the full filename of a file containing one or more +view icons. Returns a pointer to the filename and transfers ownership to the caller. +@return KErrNone, if successful; KErrNotFound, if no matching application nor matching view +could be found, or a view icon filename was not defined; KErrNotSupported, if the application +does not provide an application registration file; otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppViewIcon(TUid aAppUid, TUid aViewUid, HBufC*& aFullFileName) const + { + TFileName fileName; + TPckg filenamePckg(fileName); + TInt ret=SendReceiveWithReconnect(EAppListServAppViewIconFileName, TIpcArgs(aAppUid.iUid, aViewUid.iUid, &filenamePckg)); + if (ret==KErrNone) + { + HBufC* fullFileName = HBufC::New(fileName.Length()); + if (fullFileName == NULL) + { + return KErrNoMemory; + } + else + { + *fullFileName = fileName; + aFullFileName = fullFileName; // ownership transferred to caller + } + } + return ret; + } + + + +/** Changes an existing data type mapping, or adds a new one. + +If the data type is not currently mapped, a new mapping is added. +If the data type is mapped, its mapping is replaced. + +@capability WriteDeviceData Prevent addition of data type mappings by malicious programs. +@param aDataType A new or existing data type. +@param aPriority The priority with which the application handles the data type. +@param aUid The UID of the application to associate with the data type. +@return KErrNone on success, or a system-wide error code. +*/ +EXPORT_C TInt RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid) + { + return InsertDataMapping(aDataType, aPriority, aUid, KOpenServiceUid); + } + +/** Changes an existing data type mapping, or adds a new one. + +If the data type is not currently mapped, a new mapping is added. +If the data type is mapped, its mapping is replaced. + +@capability WriteDeviceData Prevent addition of data type mappings by malicious programs. +@param aDataType A new or existing data type. +@param aPriority The priority with which the application handles the data type. +@param aUid The UID of the application to associate with the data type. +@param aServiceUid The UID of the service. +@return KErrNone on success, or a system-wide error code. +*/ +EXPORT_C TInt RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, + TUid aUid, TUid aServiceUid) + { + const TPckgC dataType(aDataType); + return SendReceiveWithReconnect(EAppListInsertDataMapping, + TIpcArgs(&dataType, TInt(aPriority), aUid.iUid, aServiceUid.iUid)); + } //lint !e1762 Suppress member function could be made const + +/** Changes an existing data type mapping, or adds a new one. +If the data type is not currently mapped, it is added. +If the data type is mapped with a priority lower than aPriority, the new mapping replaces the existing one. +Otherwise, no change is made. + +@capability WriteDeviceData Prevent addition of data type mappings by malicious programs. +@param aDataType A new or existing data type. +@param aPriority The priority with which the application handles the data type. +@param aUid The UID of the application to associate with the data type. +@param aInserted Non-zero if the new mapping was added or an existing mapping replaced, zero otherwise. +@return KErrNone on success, or a system-wide error code. +*/ +EXPORT_C TInt RApaLsSession::InsertDataMappingIfHigher(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TBool& aInserted) + { + TPckgBuf inserted(EFalse); + const TPckgC dataType(aDataType); + const TInt ret = SendReceiveWithReconnect(EAppListInsertDataMappingIfHigher, TIpcArgs(&dataType, TInt(aPriority), aUid.iUid, &inserted)); + if(ret == KErrNone) + { + aInserted = inserted(); + } + return ret; + } //lint !e1762 Suppress member function could be made const + + + +/** Removes an existing user mapping between an application and data-type made through InsertDataMapping() or InsertDataMappingIfHigher(). + +@capability WriteDeviceData Prevent removal of data type mappings by malicious programs. +@param aDataType Data type whose mapping should be removed. +@panic USER 0 The specified data type cannot be found. Debug builds only. +@return KErrNone on success, or a system-wide error code. +@see InsertDataMapping() +@see InsertDataMappingIfHigher() +*/ +EXPORT_C TInt RApaLsSession::DeleteDataMapping(const TDataType& aDataType) + { + return DeleteDataMapping(aDataType, KOpenServiceUid); + } + +/** Removes an existing data type mapping. + +@capability WriteDeviceData Prevent removal of data type mappings by malicious programs. +@param aDataType Data type whose mapping should be removed. +@param aServiceUid The UID of the service. +@panic USER 0 The specified data type cannot be found. Debug builds only. +@return KErrNone on success, or a system-wide error code. +*/ +EXPORT_C TInt RApaLsSession::DeleteDataMapping(const TDataType& aDataType, TUid aServiceUid) + { + const TPckgC dataType(aDataType); + return SendReceiveWithReconnect(EAppListDeleteDataMapping, TIpcArgs(&dataType, aServiceUid.iUid)); + } //lint !e1762 Suppress member function could be made const + +/** Gets the application associated with the data type and the service uid from +the datatype store. + +The function will only look into the datatype store and will not use the +default type associations. This is different from the AppForDataTypeAndService() function. + +@param aDataType The data (MIME) type. +@param aAppUid On return, the UID of the application that can handle the data +(MIME) type; this may be NULL. +@param aServiceUid The UID of the service. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +*/ +EXPORT_C TInt RApaLsSession::GetAppByDataType(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const + { + const TPckgC dataType(aDataType); + TPckg uid(aAppUid); + const TInt returnValue=SendReceiveWithReconnect(EAppListServGetAppByDataType,TIpcArgs(&dataType, aServiceUid.iUid, &uid)); + if (returnValue<0) + { + return returnValue; + } + if (aAppUid == KNullUid) + { + return KErrNotFound; + } + else + { + return KErrNone; + } + } //lint !e1764 Suppress reference parameter 'aAppUid' could be declared const ref + +/** Determines the current language an application is using to display its +user interface. +@param aAppUid The application specific UID. +@param aLanguage On return, the application language. +@return KErrNone, if successful; KErrNotFound, if a matching application could not be found; +otherwise one of the other system wide error codes. +*/ +EXPORT_C TInt RApaLsSession::ApplicationLanguage(TUid aAppUid, TLanguage& aLanguage) const + { + TPckgBuf pckg; + TInt errVal = SendReceiveWithReconnect(EAppListServApplicationLanguage, TIpcArgs(aAppUid.iUid, &pckg)); + if (errVal == KErrNone) + { + aLanguage = pckg(); + } + return errVal; + } + +/** Gets the services implemented by the application that has the specified +application UID. + +The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects. + +Information on each service implementation is contained in a TApaAppServiceInfo object. + +TApaAppServiceInfo::Uid() returns the service UID of the service implemented by the +specified application UID. + +@param aAppUid The application specific UID. +@return A pointer to a CApaAppServiceInfoArray object left on the cleanup stack. +@leave KErrNotFound No matching application can be found, or a matching application +does not implement any services. +@leave KErrNotSupported The specified application does not provide an application +registration file. +@leave KErrNoMemory There is insufficient memory to perform the operation. +@see CApaAppServiceInfoArray::Array() +@see TApaAppServiceInfo +@publishedPartner +@released +*/ +EXPORT_C CApaAppServiceInfoArray* RApaLsSession::GetAppServicesLC(TUid aAppUid) const + { + CArrayFixFlat* serviceArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, serviceArray)); + CBufBase* buffer = GetServiceBufferLC(EAppListServGetAppServices, aAppUid); + RBufReadStream readStream(*buffer); + readStream >> *serviceArray; + CleanupStack::PopAndDestroy(buffer); + CleanupStack::Pop(serviceArray); + CApaAppServiceInfoArrayWrapper* wrapper = CApaAppServiceInfoArrayWrapper::NewL(serviceArray); // takes ownership of serviceArray + CleanupStack::PushL(wrapper); + return wrapper; + } + +CBufBase* RApaLsSession::GetServiceBufferLC(TInt aOpcode, TUid aUid1, TUid aUid2/*=KNullUid*/) const + { + CBufFlat* buffer=CBufFlat::NewL(KDefaultBufSize); // allocate buffer with a default size that should be large enough in most cases + CleanupStack::PushL(buffer); + buffer->ExpandL(0,KDefaultBufSize); + TPtr8 bufPtr=buffer->Ptr(0); + const TInt sizeRequired=User::LeaveIfError(SendReceiveWithReconnect(aOpcode,TIpcArgs(aUid1.iUid,aUid2.iUid,buffer->Size(),&bufPtr))); + if (sizeRequired>0) + { + CleanupStack::PopAndDestroy(buffer); + buffer=CBufFlat::NewL(sizeRequired); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,sizeRequired); + bufPtr.Set(buffer->Ptr(0)); +#if defined(_DEBUG) + const TInt check= +#endif + User::LeaveIfError(SendReceiveWithReconnect(aOpcode,TIpcArgs(aUid1.iUid,aUid2.iUid,0,&bufPtr))); + __ASSERT_DEBUG(check==0,User::Invariant()); + } + return buffer; + } + +CBufBase* RApaLsSession::GetServiceBufferLC(TInt aOpcode, TUid aUid1, const TDataType& aDataType) const + { + const TPckgC dataType(aDataType); + CBufFlat* buffer=CBufFlat::NewL(KDefaultBufSize); // allocate buffer with a default size that should be large enough in most cases + CleanupStack::PushL(buffer); + buffer->ExpandL(0,KDefaultBufSize); + TPtr8 bufPtr=buffer->Ptr(0); + const TInt sizeRequired=User::LeaveIfError(SendReceiveWithReconnect(aOpcode,TIpcArgs(aUid1.iUid,&dataType,buffer->Size(),&bufPtr))); + if (sizeRequired>0) + { + CleanupStack::PopAndDestroy(buffer); + buffer=CBufFlat::NewL(sizeRequired); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,sizeRequired); + bufPtr.Set(buffer->Ptr(0)); +#if defined(_DEBUG) + const TInt check= +#endif + User::LeaveIfError(SendReceiveWithReconnect(aOpcode,TIpcArgs(aUid1.iUid,&dataType,0,&bufPtr))); + __ASSERT_DEBUG(check==0,User::Invariant()); + } + return buffer; + } + + + +/** Gets the service implementations for the specified service UID. + +The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects. + +Information on each implementation is contained in a TApaAppServiceInfo object. + +TApaAppServiceInfo::Uid() returns the UID of the application that implements the +specified service UID. + +@param aServiceUid The service UID. +@return A pointer to a CApaAppServiceInfoArray object left on the cleanup stack. +@leave KErrNotFound No service implementations for the specified service UID can be found. +@leave EAppListInvalid The server's initial population of the list has not completed. +@leave KErrNoMemory There is insufficient memory to perform the operation. +@see CApaAppServiceInfoArray::Array() +@see TApaAppServiceInfo +@publishedPartner +@released +*/ +EXPORT_C CApaAppServiceInfoArray* RApaLsSession::GetServiceImplementationsLC(TUid aServiceUid) const + { + CArrayFixFlat* serviceArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, serviceArray)); + CBufBase* buffer = GetServiceBufferLC(EAppListServGetServiceImplementations, aServiceUid); + RBufReadStream readStream(*buffer); + readStream >> *serviceArray; + CleanupStack::PopAndDestroy(buffer); + CleanupStack::Pop(serviceArray); + CApaAppServiceInfoArrayWrapper* wrapper = CApaAppServiceInfoArrayWrapper::NewL(serviceArray); // takes ownership of serviceArray + CleanupStack::PushL(wrapper); + return wrapper; + } + +EXPORT_C CApaAppServiceInfoArray* RApaLsSession::GetServiceImplementationsLC(TUid aServiceUid, const TDataType& aDataType) const +/** Gets the service implementations for the specified service UID. The implementation must also be +able to handle the data type given as argument. + +The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects. + +Information on each implementation is contained in a TApaAppServiceInfo object. + +TApaAppServiceInfo::Uid() returns the UID of the application that implements the +specified service UID. + +@param aServiceUid The service UID. +@param aDataType The data type that must be supported by the implementation. +@return A pointer to a CApaAppServiceInfoArray object left on the cleanup stack. +@leave KErrNotFound No service implementations for the specified service UID can be found. +@leave EAppListInvalid The server's initial population of the list has not completed. +@leave KErrNoMemory There is insufficient memory to perform the operation. +@see CApaAppServiceInfoArray::Array() +@see TApaAppServiceInfo +@publishedPartner +@released +*/ + { + CArrayFixFlat* serviceArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, serviceArray)); + CBufBase* buffer = GetServiceBufferLC(EAppListServGetServiceImplementationsDataType, aServiceUid, aDataType); + RBufReadStream readStream(*buffer); + readStream >> *serviceArray; + CleanupStack::PopAndDestroy(buffer); + CleanupStack::Pop(serviceArray); + CApaAppServiceInfoArrayWrapper* wrapper = CApaAppServiceInfoArrayWrapper::NewL(serviceArray); // takes ownership of serviceArray + CleanupStack::PushL(wrapper); + return wrapper; + } + +/** Gets the service UIDs implemented by the application with the specified UID. + +@param aAppUid The application specific UID. +@param aServiceUids On return, contains the service UIDs implemented by the specified +application UID. +@leave KErrNotFound No matching application can be found, or a matching application +does not implement any services. +@leave KErrNotSupported The specified application does not provide an application +registration file. +@leave KErrNoMemory There is insufficient memory to perform the operation. +@publishedPartner +@released +*/ +EXPORT_C void RApaLsSession::GetAppServicesL(TUid aAppUid, CArrayFixFlat& aServiceUids) const + { + CBufBase* buffer = GetServiceBufferLC(EAppListServGetAppServiceUids, aAppUid); + RBufReadStream readStream(*buffer); + readStream >> aServiceUids; + CleanupStack::PopAndDestroy(buffer); + } + + + +/** Gets the service implementation's opaque data for the specified application and service. + +The specified application may provide more than one implementation of the specified service. + +The returned CApaAppServiceInfoArray object contains an array of TApaAppServiceInfo objects, +each of which provides information on an implementation. + +For each TApaAppServiceInfo object, TApaAppServiceInfo::Uid() returns the specified service UID. + +@param aAppUid The application specific UID. +@param aServiceUid The service UID. +@return A pointer to a CApaAppServiceInfoArray object left on the cleanup stack. +@leave KErrNotFound No matching application can be found, or a matching application +does not implement the specified service. +@leave KErrNotSupported The specified application does not provide an application +registration file. +@leave KErrNoMemory There is insufficient memory to perform the operation. +@see CApaAppServiceInfoArray::Array() +@see TApaAppServiceInfo +@publishedPartner +@released +*/ +EXPORT_C CApaAppServiceInfoArray* RApaLsSession::GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const + { + CArrayFixFlat* serviceArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(TCleanupItem(CleanupServiceArray, serviceArray)); + CBufBase* buffer = GetServiceBufferLC(EAppListServGetAppServiceOpaqueData, aAppUid, aServiceUid); + RBufReadStream readStream(*buffer); + readStream >> *serviceArray; + CleanupStack::PopAndDestroy(buffer); + CleanupStack::Pop(serviceArray); + CApaAppServiceInfoArrayWrapper* wrapper = CApaAppServiceInfoArrayWrapper::NewL(serviceArray); // takes ownership of serviceArray + CleanupStack::PushL(wrapper); + return wrapper; + } + + + +/** Gets the UID of an application that can handle the specified data (MIME) type and service. + +If no application can be found, the function returns the UID of the preferred +default handler. If none of the default handlers can handle the combination +of data type and service, then a NULL UID is returned in aAppUid. + +@param aDataType The data (MIME) type. +@param aServiceUid The service UID. +@param aAppUid On return, the UID of the application that can handle the data +(MIME) type and service; this may be NULL. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +@publishedPartner +@released +*/ +EXPORT_C TInt RApaLsSession::AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const + { + const TPckgC dataType(aDataType); + TPckg uid(aAppUid); + return SendReceiveWithReconnect(EAppListServAppForDataTypeAndService,TIpcArgs(&dataType, aServiceUid.iUid,&uid)); + } //lint !e1764 Suppress reference parameter 'aAppUid' could be declared const ref + +EXPORT_C TInt RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const +/** Gets the data (MIME) type of the data in the specified file and gets the UID +of an application that can handle this type and service. + +@param aFileName The name of the file containing the data. +@param aServiceUid The service UID +@param aUid On return, the UID of the application that can handle the data +(MIME) type and service; this may be NULL. +@param aDataType On return, the data (MIME) type. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +@publishedPartner +@released +*/ + { + return DoAppForDocumentOptionallySpecifyingService(aFileName, aServiceUid, aAppUid, aDataType, EAppListServAppForDocumentAndService); + } + +EXPORT_C TInt RApaLsSession::AppForDocumentAndService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const +/** Gets the data (MIME) type of the data in the specified file and gets the UID +of an application that can handle this type and service. + +@param aFile The file handle. Before this function can be called, +the file server session which owns this file handle must first be marked as shareable by +calling RFs::ShareProtected(). +@param aServiceUid The service UID. +@param aUid On return, the UID of the application that can handle the data +(MIME) type and service; this may be NULL. +@param aDataType On return, the data (MIME) type. +@return KErrNone, if successful; otherwise one of the other system-wide error +codes. +@publishedPartner +@released +*/ + { + return DoAppForDocumentOptionallySpecifyingService(aFile, aServiceUid, aAppUid, aDataType, EAppListServAppForDocumentAndServicePassedByFileHandle); + } + +TInt RApaLsSession::DoAppForDocumentOptionallySpecifyingService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const + { + if (aFileName.Length()==0) + { + aAppUid = KNullUid; + return KErrNone; + } + HBufC8* buffer=NULL; + TInt error=GetBufferFromFile(buffer, aFileName); + if (error!=KErrNone) + { + return error; + } + SReturnData_AppForDocument returnData; + TPckg returnData_asDescriptor(returnData); + error=SendReceiveWithReconnect(aOpcode,TIpcArgs(&returnData_asDescriptor, aServiceUid.iUid, &aFileName, buffer)); + delete buffer; + buffer=NULL; + if (error==KErrNone) + { + aAppUid=returnData.iUid; + aDataType=returnData.iDataType; + } + return error; + } + +TInt RApaLsSession::DoAppForDocumentOptionallySpecifyingService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const + { + SReturnData_AppForDocument returnData; + TPckg returnData_asDescriptor(returnData); + TIpcArgs ipcArgs(&returnData_asDescriptor, aServiceUid.iUid); + TInt error=aFile.TransferToServer(ipcArgs, 2, 3); + if (error == KErrNone) + { + error=SendReceiveWithReconnect(aOpcode, ipcArgs); + } + if (error==KErrNone) + { + aAppUid=returnData.iUid; + aDataType=returnData.iDataType; + } + return error; + } + +TInt RApaLsSession::GetBufferFromFile(HBufC8*& aBuffer, const TDesC& aFileName) const + { + TInt preferredBufSize=0; + const TInt error=GetPreferredBufSize(preferredBufSize); + if (errorIsValidName(aFileName)) + { + TPtr8 buffer_asWritable(buffer->Des()); + const TInt error=fsSession->ReadFileSection(aFileName, 0, buffer_asWritable, preferredBufSize); + if (error!=KErrNone) + { + delete buffer; + tempFsSession.Close(); + return error; + } + } + if (fsSession==&tempFsSession) + { + tempFsSession.Close(); + } + aBuffer=buffer; + return KErrNone; + } + +EXPORT_C void RApaLsSession::SetFsSessionL(RFs& aFsSession) +/** +@internalTechnology +*/ + { // static + User::LeaveIfError(Dll::SetTls(&aFsSession)); + } + +EXPORT_C void RApaLsSession::ClearFsSession() +/** +@internalTechnology +*/ + { // static + Dll::FreeTls(); + } + +EXPORT_C RFs* RApaLsSession::FsSession() +/** +@internalComponent +*/ + { // static + return static_cast(Dll::Tls()); + } + +/** @publishedPartner */ +EXPORT_C void RApaLsSession::RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable) + { + User::LeaveIfError(SendReceiveWithReconnect(EAppListServRegisterNonNativeApplicationType, TIpcArgs(aApplicationType.iUid, &aNativeExecutable))); + } //lint !e1762 Suppress member function could be made const + +/** @publishedPartner */ +EXPORT_C void RApaLsSession::DeregisterNonNativeApplicationTypeL(TUid aApplicationType) + { + User::LeaveIfError(SendReceiveWithReconnect(EAppListServDeregisterNonNativeApplicationType, TIpcArgs(aApplicationType.iUid))); + } //lint !e1762 Suppress member function could be made const + +/** @publishedPartner */ +EXPORT_C void RApaLsSession::PrepareNonNativeApplicationsUpdatesL() + { + TIpcArgs ipcArgs(0, 0, 0, 0); + User::LeaveIfError(SendReceiveWithReconnect(EAppListServPrepareNonNativeApplicationsUpdates, ipcArgs)); + } //lint !e1762 Suppress member function could be made const + +/** @publishedPartner */ +EXPORT_C void RApaLsSession::RegisterNonNativeApplicationL(TUid aApplicationType, const TDriveUnit& aDrive, CApaRegistrationResourceFileWriter& aRegistrationResourceFile, CApaLocalisableResourceFileWriter* aLocalisableResourceFile, const RFile* aIconFile) + { + TIpcArgs ipcArgs(0, 0, 0, 0); + RBuf8 ipcParameter0; + CleanupClosePushL(ipcParameter0); + RBuf8 ipcParameter1; + CleanupClosePushL(ipcParameter1); + if (aLocalisableResourceFile==NULL) + { + __ASSERT_ALWAYS(aIconFile==NULL, Panic(EPanicIconFileWithoutLocalisableResourceFile)); + ipcArgs.Set(1, NULL); + } + else + { + TParse* const parser=new(ELeave) TParse; + CleanupStack::PushL(parser); + const TDriveName driveName(aDrive.Name()); // TDriveName is a TBuf<2> + + if (aIconFile!=NULL) + { + User::LeaveIfError(aIconFile->TransferToServer(ipcArgs, 2, 3)); + + TFileName* const fileName=new(ELeave) TFileName; + CleanupStack::PushL(fileName); + User::LeaveIfError(aIconFile->Name(*fileName)); + parser->SetNoWild(*fileName, &KLitPathForNonNativeResourceAndIconFiles, &driveName); + aLocalisableResourceFile->SetIconFileL(parser->FullName()); + CleanupStack::PopAndDestroy(fileName); + } + aLocalisableResourceFile->GenerateFileContentsL(ipcParameter1); // must be done after the aLocalisableResourceFile->SetIconFileL call (if there is one) + const TDesC8& ipcParameter1_asConst=ipcParameter1; + ipcArgs.Set(1, &ipcParameter1_asConst); + + TBuf<30> fileName; + fileName.Format(KLitFormatForLocalisableResourceFile, aRegistrationResourceFile.AppUid().iUid); + parser->SetNoWild(fileName, &KLitPathForNonNativeResourceAndIconFiles, &driveName); + aRegistrationResourceFile.SetLocalisableResourceFileL(parser->FullName()); + + CleanupStack::PopAndDestroy(parser); + } + aRegistrationResourceFile.GenerateFileContentsL(ipcParameter0); // must be done after the aRegistrationResourceFile.SetLocalisableResourceFileL call (if there is one) + SNonNativeApplicationInfo nonNativeApplicationInfo; + nonNativeApplicationInfo.iApplicationType=aApplicationType; + nonNativeApplicationInfo.iDrive=aDrive; + ipcParameter0.ReAllocL(sizeof(SNonNativeApplicationInfo)+ipcParameter0.Length()); + ipcParameter0.Insert(0, TPckgC(nonNativeApplicationInfo)); + const TDesC8& ipcParameter0_asConst=ipcParameter0; + ipcArgs.Set(0, &ipcParameter0_asConst); + + User::LeaveIfError(SendReceiveWithReconnect(EAppListServRegisterNonNativeApplication, ipcArgs)); + CleanupStack::PopAndDestroy(2, &ipcParameter0); + } //lint !e1762 Suppress member function could be made const + +/** @publishedPartner */ +EXPORT_C void RApaLsSession::DeregisterNonNativeApplicationL(TUid aApplication) + { + User::LeaveIfError(SendReceiveWithReconnect(EAppListServDeregisterNonNativeApplication, TIpcArgs(aApplication.iUid))); + } //lint !e1762 Suppress member function could be made const + +/** +Commits the non-native application updates. This is a synchronous method which waits +until the application list is updated. + +@see ForceCommitNonNativeApplicationsUpdatesL +@publishedPartner +@released +*/ + +EXPORT_C void RApaLsSession::CommitNonNativeApplicationsUpdatesL() + { + TIpcArgs ipcArgs(EFalse, 0, 0, 0); + User::LeaveIfError(SendReceiveWithReconnect(EAppListServCommitNonNativeApplications, ipcArgs)); + } //lint !e1762 Suppress member function could be made const + + +/** +Commits the non-native application updates. This is an asynchronous method which will not wait until +the application list is updated. CApaAppListNotifier class should be used to synchronize the completion +of updating the application list. + +@see CommitNonNativeApplicationsUpdatesL +@see CApaAppListNotifier +@publishedPartner +@released +*/ + +EXPORT_C void RApaLsSession::ForceCommitNonNativeApplicationsUpdatesL() + { + TIpcArgs ipcArgs(ETrue, 0, 0, 0); + User::LeaveIfError(SendReceiveWithReconnect(EAppListServCommitNonNativeApplications, ipcArgs)); + } + +/** +Rolls back all changes made to the list of installed non-native applications since the last call to +PrepareNonNativeApplicationsUpdatesL(). + +This function can be called even if PrepareNonNativeApplicationsUpdatesL() hasn't been called before (in which +case it does nothing). + +@publishedPartner +*/ +EXPORT_C TInt RApaLsSession::RollbackNonNativeApplicationsUpdates() + { + TIpcArgs ipcArgs(0, 0, 0, 0); + return SendReceiveWithReconnect(EAppListServRollbackNonNativeApplications, ipcArgs); + } //lint !e1762 Suppress member function could be made const + +EXPORT_C void RApaLsSession::SetNotify(TBool aCompleteImmediatelyIfNoScanImpendingOrInProgress, TRequestStatus& aStatus) +/** +@internalTechnology */ + { + SendReceive(ESetNotify,TIpcArgs(aCompleteImmediatelyIfNoScanImpendingOrInProgress),aStatus); + } //lint !e1762 Suppress member function could be made const + +EXPORT_C void RApaLsSession::CancelNotify() +/** +@internalTechnology */ + { + SendReceive(ECancelNotify,TIpcArgs()); + } //lint !e1762 Suppress member function could be made const + +/** +Gets the application type of the application. For a native application the type is KNullUid. +@return A standard error code. +@publishedPartner +@released +@param aTypeUid On return contains the application's type +@param aAppUid The application's UID passed into TIpcArgs +*/ +EXPORT_C TInt RApaLsSession::GetAppType(TUid& aTypeUid, TUid aAppUid) const + { + TPckg uid(aTypeUid); + return SendReceiveWithReconnect(EAppListServGetAppType,TIpcArgs(aAppUid.iUid,&uid)); + } //lint !e1764 Suppress reference parameter 'aTypeUid' could be declared const ref + +/** +This function is only for use by Software Install. + +As part of the fix for defect INC069526, we added a check in apparc. We check if the application has +been installed before adding it to the apparc db. A side-effect of this fix is that it is not possible +to launch applications that are being installed from the installation process itself. This is a regresssion. + +To fix this regression we added this function. It allows Software Install to specify a list of registration +files that need to be included in apparc's list even if they have not been marked as installed in the +SISRegistry or JavaRegistry. The list of registration files is cleared once Software Install notifies +(via P&S) the end of the installation (whether successful or not). +The function also forces a rescan and only returns when this rescan is complete. This is because +Software Install needs to be sure the registration files have been added to apparc's list before +trying to launch the recently installed applications. + +@param aRegFiles The list of registration files for which the SISRegistry check must be ignored. +@return A standard error code. +@internalAll +@released +*/ +EXPORT_C TInt RApaLsSession::ForceRegistration(const RPointerArray& aRegFiles) + { + CBufFlat* buffer = 0; + TRAPD(err, buffer = CreateRegFilesBufferL(aRegFiles)); + if (err != KErrNone) + { + return err; + } + TPtr8 ptr = buffer->Ptr(0); + const TInt returnValue=SendReceiveWithReconnect(EAppListServForceRegistration,TIpcArgs(&ptr)); + delete buffer; + return returnValue; + } //lint !e1762 Suppress member function could be made const + +TInt RApaLsSession::SendReceiveWithReconnect(TInt aFunction,const TIpcArgs& aIpcArgs) const + { + TInt ret = SendReceive(aFunction, aIpcArgs); + if(ret != KErrServerTerminated) + { + return ret; + } + + RApaLsSession ls; + TInt err=ls.Connect(); + if (err==KErrNone) + { + RApaLsSession* const localThis = const_cast(this); + localThis->Close(); + localThis->iHandle=ls.iHandle; + ret = SendReceive(aFunction, aIpcArgs); + } + return ret; + } + +void RApaLsSession::DoGetAppOwnedFilesL(CDesCArray& aArrayToFill, TUid aAppUid) const + { + TDesCArrayFiller arrayFiller(aArrayToFill); + FetchArrayL(arrayFiller, aAppUid, EAppListServGetFileOwnershipInfo, KInitialOwnedFilesBufSize); + } + +EXPORT_C void RApaLsSession::RegisterListPopulationCompleteObserver(TRequestStatus& aStatus) const +/** Registers an observer with apparc server to notify when the initial population of applist is completed + +@param aStatus Request status object. On successful completion contains KErrNone, otherwise one of the +system-wide error codes. +@see CancelListPopulationCompleteObserver() +*/ + { + SendReceive(ERegisterListPopulationCompleteObserver,TIpcArgs(TIpcArgs::ENothing),aStatus); + } + +EXPORT_C TInt RApaLsSession::CancelListPopulationCompleteObserver() const +/** Cancels the observer registered with apparc server to notify when the initial population of applist is completed + +@return KErrNone, if successful; otherwise one of the system-wide error codes. +*/ + { + return SendReceiveWithReconnect(ECancelListPopulationCompleteObserver,TIpcArgs(TIpcArgs::ENothing)); + } + +EXPORT_C TInt RApaLsSession::MatchesSecurityPolicy(TBool& aMatches, TUid aAppUid, const TSecurityPolicy& aSecurityPolicy) const +/** Tests whether the given TSecurityPolicy matches with the application TSecurityPolicy. + +@param aMatches On return, contains the result. ETrue if the application TSecurityPolicy matches the given TSecurityPolicy or else EFalse +@param aAppUid Uid of the application for which the security policy has to be matched +@param aSecurityPolicy TSecurityPolicy to test whether the application with given uid matches with its TSecurityPolicy or not. +@return KErrNone, if successful; otherwise one of the other system-wide error codes. +@see TSecurityPolicy +*/ + { + const TPckgC securityPolicy(aSecurityPolicy); + const TInt result = SendReceiveWithReconnect(EMatchesSecurityPolicy,TIpcArgs(aAppUid.iUid, &securityPolicy)); + + if (result>=0) + { + aMatches = result; + } + return result; + } + +EXPORT_C void RApaLsSession::RApaLsSession_Reserved1() + { + } + +EXPORT_C void RApaLsSession::RApaLsSession_Reserved2() + { + } + +EXPORT_C void RApaLsSession::NotifyOnDataMappingChange(TRequestStatus& aRequestStatus) +/** Notification of changes in data-type mapping + +This asynchronous function (whose corresponding "cancel" operation is CancelNotifyOnDataTypeMappingChange) completes when any data-type / application-UID association changes, i.e. when the default application handling a particular MIME-type changes. + +@param aRequestStatus As is normal for an asynchronous operation, this object is set to something other than KRequestPending when the asynchronous operation that has been triggered by this function completes. +@see CancelNotifyOnDataTypeMappingChange +*/ + { + SendReceive(ENotifyOnDataMappingChange,TIpcArgs(), aRequestStatus); + } //lint !e1762 Suppress member function could be made const + +EXPORT_C void RApaLsSession::CancelNotifyOnDataMappingChange() +/** Cancellation of notification of changes in data-type mapping + +This cancels the outstanding the NotifyOnDataTypeMappingChange issued by this client, if there is one outstanding. Otherwise it does nothing. +@see NotifyOnDataTypeMappingChange +*/ + { + SendReceive(ECancelNotifyOnDataMappingChange,TIpcArgs()); + } //lint !e1762 Suppress member function could be made const + +CBufFlat* RApaLsSession::CreateRegFilesBufferL(const RPointerArray& aRegFiles) + { + // Serialize the array + // Format of the buffer is : + // 4 bytes for array item count + // for each item : 4 bytes for length and then the string contents + const TInt count = aRegFiles.Count(); + TInt requiredBufferSize = 4; // For the array item count + for (TInt index = 0; index < count; ++index) + { + requiredBufferSize += 4; // For the string length + requiredBufferSize += aRegFiles[index]->Size(); + } + + CBufFlat* const buffer = CBufFlat::NewL(requiredBufferSize); + CleanupStack::PushL(buffer); + buffer->ExpandL(0,requiredBufferSize); + RBufWriteStream writeStream; + writeStream.Open(*buffer); + CleanupClosePushL(writeStream); + writeStream.WriteUint32L(count); + for (TInt index = 0; index < count; ++index) + { + writeStream.WriteUint32L(aRegFiles[index]->Length()); + writeStream.WriteL(*aRegFiles[index]); + } + writeStream.CommitL(); + CleanupStack::PopAndDestroy(&writeStream); + CleanupStack::Pop(buffer); + return buffer; + } + +// TSizeArrayFiller + +void TSizeArrayFiller::AppendItemL(RReadStream& aReadStream) + { + TSize size; + size.iWidth =aReadStream.ReadUint32L(); + size.iHeight=aReadStream.ReadUint32L(); + iArray.AppendL(size); + } + + + +// TViewDataArrayFiller + +void TViewDataArrayFiller::AppendItemL(RReadStream& aReadStream) + { + TApaAppViewInfo info; + aReadStream >> info; + iArray.AppendL(info); + } + + + +// TDesCArrayFiller + +void TDesCArrayFiller::AppendItemL(RReadStream& aReadStream) + { + TFileName info; + aReadStream >> info; + iArray.AppendL(info); + } + +/* @internalComponent +*/ +EXPORT_C TUint MinApplicationStackSize() + { + return KMinApplicationStackSize; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGCTL.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGCTL.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,400 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "APGCTL.H" +#include "APGICNFL.H" +#include "APGSTD.H" +#include "APFDEF.H" +#include "../apparc/TRACE.H" +#include "APGCLI.H" +#include "APACMDLN.H" + +/////////////////////////////////////////// +// CApaSystemControl +/////////////////////////////////////////// + +CApaSystemControl* CApaSystemControl::NewL(RFs& aFs,const TDesC& aFullPath,const TUidType aUidType) + { + CApaSystemControl* self=new(ELeave) CApaSystemControl(aFs); + CleanupStack::PushL(self); + self->ConstructL(aFullPath,aUidType); + CleanupStack::Pop(); + return self; + } + +CApaSystemControl::CApaSystemControl(RFs& aFs) + :iExists(ETrue), + iFs(aFs) + {} + + +CApaSystemControl::~CApaSystemControl() + { + delete iCaption; + delete iShortCaption; + delete iIcon; + iNext = NULL; + } + +void CApaSystemControl::ConstructL(const TDesC& aFullPath,const TUidType aUidType) + { + // + // check the file type + if (aUidType[1]!=KUidApp) + User::Leave(KErrNotSupported); + + iFullPath=aFullPath; + iUidType=aUidType; + + //Construct the new style control panel application. + RApaLsSession ls; + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + TApaAppInfo info; + if(ls.GetAppInfo(info, aUidType[2])==KErrNone && info.iCaption.Length()>0) + { + iCaption=info.iCaption.AllocL(); + iShortCaption=iCaption->AllocL(); + } + // get the icon for the application + CApaMaskedBitmap *icon=CApaMaskedBitmap::NewLC(); + User::LeaveIfError(ls.GetAppIcon(aUidType[2], TSize(48,48), *icon)); + CleanupStack::Pop(icon); + iIcon=icon; + CleanupStack::PopAndDestroy(&ls); + + if (!iCaption) + { + TParsePtrC ptr(aFullPath); + iCaption = ptr.Name().AllocL(); + iShortCaption = iCaption->AllocL(); + } + } + +EXPORT_C void CApaSystemControl::CreateL() +/* +Connects to apparc server and ask the server to launch an application. +*/ + { + RApaLsSession apparcsession; + User::LeaveIfError(apparcsession.Connect()); + CleanupClosePushL(apparcsession); + TThreadId threadId; + CApaCommandLine *commandLine=CApaCommandLine::NewLC(); + commandLine->SetExecutableNameL(iFullPath); + commandLine->SetCommandL(EApaCommandRunWithoutViews); + User::LeaveIfError(apparcsession.StartApp(*commandLine,threadId)); + CleanupStack::PopAndDestroy(2,&apparcsession); + + //To preserve the existing synchronous behaviour of control panel items + //we logon to the newly started control panel thread and wait + //till it exits. + RThread thread; + User::LeaveIfError(thread.Open(threadId,EOwnerThread)); + TRequestStatus status; + thread.Logon(status); + User::WaitForRequest(status); + thread.Close(); + } //lint !e1762 Member function could be made const - Lint is wrong, it should not be const + +EXPORT_C TUid CApaSystemControl::Type()const +/** Gets the UID that uniquely identifies the control. + +@return The UID. */ + { + return iUidType[2]; + } + +EXPORT_C TFileName CApaSystemControl::FileName()const +/** Gets the full path name of the control. + +@return The full path name. */ + { + return iFullPath; + } + +EXPORT_C CApaMaskedBitmap* CApaSystemControl::Icon()const +/** Gets the control's icon. + +@return The icon bitmap. */ + { + return iIcon; + } + +EXPORT_C TPtrC CApaSystemControl::Caption()const +/** Gets the control's caption. + +@return A non-modifiable pointer descriptor representing the control's caption. */ + { + __ASSERT_DEBUG(iCaption,Panic(EDPanicNoCaptionInControl)); + return *iCaption; + } + + +EXPORT_C TPtrC CApaSystemControl::ShortCaption()const +/** Gets the control's short caption. + +@return A non-modifiable pointer descriptor representing the control's short +caption. */ + { + __ASSERT_DEBUG(iCaption,Panic(EDPanicNoCaptionInControl)); + if (iShortCaption) + return *iShortCaption; + else + return *iCaption; + } + +/////////////////////////////////////////// +// CApaSystemControlList +/////////////////////////////////////////// + +EXPORT_C CApaSystemControlList* CApaSystemControlList::NewL(RFs& aFs) +/** Allocates and constructs a control panel application list. After construction, +it calls UpdateL(), to initialise the list. + +@param aFs Handle to a file server session. +@return The newly created control panel application list. */ + { + CApaSystemControlList* self=new(ELeave) CApaSystemControlList(aFs); + CleanupStack::PushL(self); + self->UpdateL(); + CleanupStack::Pop(self); + return self; + } + +EXPORT_C CApaSystemControlList::~CApaSystemControlList() +/** Destructor. */ + { + CApaSystemControl* control=iControl; + CApaSystemControl* next; + while (control) + { + next = control->iNext; + delete control; + control = next; + } + iControl = NULL; + } + +EXPORT_C TInt CApaSystemControlList::Count()const +/** Gets the number of control panel applications in the list. + +@return The number of control panel applications in the list. */ + { + TInt count=0; + CApaSystemControl* control=iControl; + while (control) + { + count++; + control = control->iNext; + } + return count; + } + + +EXPORT_C TInt CApaSystemControlList::Index(TUid aType)const +/** Gets the index into the list of the control panel application +whose third UID matches the specified UID. + +@param aType The control panel application specific UID. +@return The index of the control panel application if there is a +match, or KErrNotFound if not. */ + { + TInt count=0; + CApaSystemControl* control=iControl; + while (control && control->Type()!=aType) + { + count++; + control = control->iNext; + } + if (!control) + count = KErrNotFound; + return count; + } + + +EXPORT_C CApaSystemControl* CApaSystemControlList::Control(TInt aIndex)const +/** Gets the control panel application at the specified index in the list. + +@param aIndex Index of a control panel application in the list. +@return The control panel application at the specified index in the list. +@panic APGRFX 10. The index is out of range. */ + + { + TInt count=0; + CApaSystemControl* control=iControl; + while (control && count!=aIndex) + { + count++; + control = control->iNext; + } + // + __ASSERT_ALWAYS(control,Panic(EPanicIndexOutOfRange)); + return control; + } + + +EXPORT_C CApaSystemControl* CApaSystemControlList::Control(TUid aType)const +/** Gets the control panel application in the list with the specified UID. + +@param aType The control panel application's third UID. +@return The control panel application whose type matches aType, or null +if none match. */ + + { + CApaSystemControl* control=iControl; + while (control && control->Type()!=aType) + control = control->iNext; + return control; + } + + +CApaSystemControl* CApaSystemControlList::PreviousControl(const CApaSystemControl* aControl) const + { + CApaSystemControl* control=iControl; + CApaSystemControl* previous=NULL; + while (control && control!=aControl) + { + previous = control; + control = control->iNext; + } + if (!control) + previous = NULL; + return previous; + } + + +EXPORT_C void CApaSystemControlList::UpdateL() +/** Updates the list of control panel applications. For each new one found, a CApaSystemControl +object is created and added to the list. Control panel applications that no longer +exist are removed, and applications already in the list can be replaced +by ones found on earlier drives in the search order(y:->a: then z:). */ + +// increments iUpdateCount if list has changed +// if an error occurs, the list will not be complete but will be functional + + { + __SHOW_TRACE(_L("Starting CApaSystemControlList::UpdateL()")); + // set all the current controls to "dont exist", so we can find them again + CApaSystemControl* control=iControl; + while (control) + { + control->iExists = EFalse; + control = control->iNext; + } + + //Connect to the apparc server and get the control panel application. + TBool listChanged=EFalse; + RApaLsSession apparcsession; + User::LeaveIfError(apparcsession.Connect()); + CleanupClosePushL(apparcsession); + //Set the filter + User::LeaveIfError(apparcsession.GetFilteredApps(TApaAppCapability::EControlPanelItem,TApaAppCapability::EControlPanelItem)); + + TApaAppInfo aInfo; + //Fetch the control panel information one by one and add a corresponding control + //to the control's list. + while(apparcsession.GetNextApp(aInfo) == KErrNone) + { + control=Control(aInfo.iUid); + if (control == NULL) + {// not in list, so add it at the start + __SHOW_TRACE(_L("...New control located")); + listChanged=ETrue; + TUidType uidType(KExecutableImageUid,KUidApp,aInfo.iUid); + TRAPD(err,control = CApaSystemControl::NewL(iFs,aInfo.iFullName,uidType)); + if (err==KErrNone) + { + __SHOW_TRACE(_L("...control added")); + control->iNext = iControl; + iControl = control; + } + } + else if (!control->iExists) + {// not already found - we made need to override this one + if (aInfo.iFullName.CompareF(control->FileName()) != 0) + { + __SHOW_TRACE(_L("...new instance of control - delete old one")); + // delete the old one before creating the new one so that the correct library is loaded + CApaSystemControl* prev=PreviousControl(control); + if (prev) + { + prev->iNext=control->iNext; + } + else + { + iControl=control->iNext; + } + delete control; + control=NULL; + listChanged=ETrue; + // create the new one. Add it to the list if this is successful + __SHOW_TRACE(_L("...create new one")); + TUidType uidType(KExecutableImageUid,KUidApp,aInfo.iUid); + TRAPD(err,control = CApaSystemControl::NewL(iFs,aInfo.iFullName,uidType)); + if (err==KErrNone) + { + __SHOW_TRACE(_L("...new one created")); + control->iNext=iControl; + iControl=control; + } + } + else + { + control->iExists=ETrue; + } + } + } + + CleanupStack::PopAndDestroy(&apparcsession); //apparcsession destroy + + CApaSystemControl* previousControl=NULL; + control = iControl; + while (control) + { + if (!control->iExists) + { + listChanged=ETrue; + if (!previousControl) + {// this must be the first control in the list, ie iControl + iControl = control->iNext; + delete control; + control = iControl; + } + else + { + previousControl->iNext = control->iNext; + delete control; + previousControl = previousControl->iNext; + control = previousControl->iNext; + } + } + else + { + control = control->iNext; + } + } + // + // increment the counter if the list has changed + if (listChanged) + { + iUpdateCount++; + } + } + +CApaSystemControlList::CApaSystemControlList(RFs& aFs):iFs(aFs) + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGDOOR.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGDOOR.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,870 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include + +#include "APGDOOR.H" +#include "APGICNFL.H" +#include "APGCLI.H" +#include "APACLN.H" +#include "APGSTD.H" +#include "APGPRIV.H" +#include "APFDEF.H" + +#include "../apparc/TRACE.H" + +const TUid KUidApaDoorStateStream={0x1000012a}; // build invariant +const TInt KHugeGranularity=4096; // 4k granularity for the door's host buffer +// default icon size only used if door was created by a model door, set to glass, but does not support glass +#define KDefaultIconSizeInTwips TSize(500,500) + +/////////////////////////////////////////// +// CApaDoor +/////////////////////////////////////////// + +EXPORT_C CApaDoor* CApaDoor::NewLC(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips) +/** Creates a new wrapper for the specified embedded document and places a +pointer to it onto the cleanup stack. + +The door is of the specified size. The wrapper takes ownership of the document; +if creation of the wrapper fails, the document object is destroyed. + +@param aFs A file server session. +@param aDoc The document for which the door is to be created. +@param aDefaultIconSizeInTwips The size of the door in twips. +@return The new embedded document wrapper object. */ + { + CApaDoor* self=new CApaDoor(aFs, aDoc,aDefaultIconSizeInTwips); + if (!self) + { + __ASSERT_DEBUG(aDoc.Process(), Panic(EDPanicNoProcess)); + aDoc.Process()->DestroyDocument(&aDoc); + User::LeaveNoMemory(); + } + CleanupStack::PushL(self); + self->ConstructL(); //lint !e613 Possible use of null pointer - Lint is wrong, see User::LeaveNoMemory() above + return self; + } + + +EXPORT_C CApaDoor* CApaDoor::NewL(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips) +/** Creates a new wrapper for the specified embedded document. + +The door is of the specified size. The wrapper takes ownership of the document; +if creation of the wrapper fails, the document object is destroyed. + +@param aFs A file server session. +@param aDoc The document for which the door is to be created. +@param aDefaultIconSizeInTwips The size of the door in twips. +@return The new embedded document wrapper object. */ + { + CApaDoor* self = CApaDoor::NewLC(aFs, aDoc,aDefaultIconSizeInTwips); + CleanupStack::Pop(); + return self; + } + + +EXPORT_C CApaDoor* CApaDoor::NewL(RFs& aFs, const CStreamStore& aStore,TStreamId aStreamId,CApaProcess& aProcess) +// Creates a door and restores it +// Should only be called by the TApaPictureFactory +// + { + CApaDoor* self=new(ELeave) CApaDoor(aFs, aProcess); + CleanupStack::PushL(self); + self->RestoreL(aStore,aStreamId); + CleanupStack::Pop(); + return self; + } + + +CApaDoor::CApaDoor(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips) + :iFs(aFs), + iApaProcess(aDoc.Process()), + iApaDoc(&aDoc), + iIconSizeInTwips(aDefaultIconSizeInTwips) + {__DECLARE_NAME(_S("CApaDoor"));} + + +CApaDoor::CApaDoor(RFs& aFs, CApaProcess& aProcess) + :iFs(aFs), + iApaProcess(&aProcess) + {__DECLARE_NAME(_S("CApaDoor"));} + + +EXPORT_C CApaDoor::~CApaDoor() +/** Destructor. + +Frees all resources owned by the object, prior to its destruction. In particular, +it destroys the document, removing all references to it from the application +process. */ + { + delete iPicture; + if (iApaDoc) + iApaProcess->DestroyDocument(iApaDoc); // removes it from the process and deletes it + delete iAppCaption; + delete iStore; + delete iStoreHost; + iApaProcess = NULL; + iApaDoc = NULL; + } + + +void CApaDoor::ConstructL() + { + __SHOW_TRACE(_L("Starting CApaDoor::ConstructL")); + __APA_PROFILE_START(3); + __ASSERT_ALWAYS(iApaDoc,Panic(EPanicNoDocumentOnConstruction)); + // + // check that the doc supports embedding + TApaAppCapabilityBuf buf; + __ASSERT_DEBUG(iApaDoc->Application(), Panic(EDPanicNoApplication)); + iApaDoc->Application()->Capability(buf); + if (buf().iEmbeddability==TApaAppCapability::ENotEmbeddable) + User::Leave(KErrNotSupported); + // + __SHOW_TRACE(_L("...doc is embeddable")); + // + // set up the icon + SetFormatToIconL(); + // + __PROFILE_END(3); + } + +TStreamId CApaDoor::StoreL(CStreamStore& aTargetStore)const +/** Stores the embedded document in the specified store as an embedded store. + +This function saves the format of the door. It also stores the document, if +the document exists in memory, otherwise, it simply copies the stream containing +the embedded document into the specified store. + +@param aStore The store into which the embedded document is to be stored. +@return The stream ID of the head stream for the embedded document. This stream +contains the stream dictionary through which the embedded document and its +door can be restored. */ + { + __SHOW_TRACE(_L("Starting CApaDoor::StoreL")); + __APA_PROFILE_START(4); + // create stream dictionary + CStreamDictionary* streamDic = CStreamDictionary::NewLC(); + // + // stream out door's state + ExternalizeBaseStreamL(aTargetStore,*streamDic); + ExternalizeStateStreamL(aTargetStore,*streamDic); + // + // store the doc if it exists, otherwise copy the persistent data directly + TStreamId id; + RStoreWriteStream stream; + if (iApaDoc) + { + // create an embedded store in a new write stream + id = stream.CreateL(aTargetStore); + CEmbeddedStore* target=CEmbeddedStore::NewLC(stream); // takes ownership of stream + streamDic->AssignL(KUidApaDoorDocStream,id); + StoreDocL(*target); + // close the new embedded store + target->CommitL(); + CleanupStack::PopAndDestroy(); // target + } + else if (iStore) + { + RStoreWriteStream trg; + id = trg.CreateLC(aTargetStore); + CopyStoreL(*iStore,trg); + CleanupStack::PopAndDestroy(); // trg + streamDic->AssignL(KUidApaDoorDocStream,id); + } + else + Panic(EPanicNoDocOrStoreWhenStoring); // impossible situation + // + // store the stream dictionary and return its stream id + id = stream.CreateLC(aTargetStore); + stream<< *streamDic; + stream.CommitL(); + CleanupStack::PopAndDestroy(); // stream + // + // tidy up + CleanupStack::PopAndDestroy(); // streamDic + __PROFILE_END(4); + return id; + } + + +void CApaDoor::CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream) +// static method +// copies an embedded store containing a doc to aTargetStream +// + { + __SHOW_TRACE(_L("Starting CApaDoor::CopyStoreL")); + // read the contents of aSourceStore's rootstream (so I can write it out in a mo') + CStreamDictionary* root=ReadStreamDictionaryLC(aSourceStore,aSourceStore.Root()); + // + // copy the source store directly + MStreamBuf* host=aSourceStore.Host(); + __ASSERT_DEBUG(host, Panic(EDPanicNoHostForStore)); + TStreamPos pos=aSourceStore.Position(aSourceStore.Root()); + host->SeekL(host->ERead,EStreamBeginning); + RReadStream stream(host); + aTargetStream.WriteL(stream,pos.Offset()); + // + // write the root stream + aTargetStream<< *root; + aTargetStream.CommitL(); + CleanupStack::PopAndDestroy(); // root + } + +EXPORT_C void CApaDoor::RestoreL(const CStreamStore& aSourceStore,TStreamId aStreamId) +/** Restores the embedded document from the specified store. + +The format of the door is set to iconic if the embedded document is password +protected. + +@param aStore The store from which the embedded document is to be restored. +@param aHeadStreamId The stream ID of the head stream for the embedded document. +This stream contains the stream dictionary through which the embedded document +and its door can be restored. */ + { + __SHOW_TRACE(_L("Starting CApaDoor::RestoreL")); + __APA_PROFILE_START(5); + __ASSERT_DEBUG(iApaProcess,Panic(EDPanicNoProcess)); + // + if (iApaDoc) + { + iApaProcess->DestroyDocument(iApaDoc); + iApaDoc = NULL; + } + delete iStore; + delete iStoreHost; + iStore=NULL; + iStoreHost = NULL; + // + // internalize the streamDic from the headstream + CStreamDictionary* streamDic=ReadStreamDictionaryLC(aSourceStore,aStreamId); + // + // internalize the door's state + __APA_PROFILE_START(13); + TSize currentSize=InternalizeBaseStreamL(aSourceStore,*streamDic); + InternalizeStateStreamL(aSourceStore,*streamDic,currentSize); + __APA_PROFILE_END(13); + // + // internalize the embedded store + __APA_PROFILE_START(14); + RStoreReadStream src; + src.OpenL(aSourceStore,streamDic->At(KUidApaDoorDocStream)); + iStore = CEmbeddedStore::FromL(src); + CleanupStack::PopAndDestroy(); // streamDic + streamDic = NULL; + __APA_PROFILE_END(14); + // + // internalize the doc's stream dict + streamDic = ReadStreamDictionaryLC(*iStore,iStore->Root()); + // + // set the door's format + if (iFormat==EIconic || (streamDic->At(KUidSecurityStream)!=KNullStreamId)) + // iconify automatically if a password is required for access + SetFormatToIconL(); + else + { + TRAPD(ret, SetFormatToGlassL() ); + if (ret==KErrNone) + { + __ASSERT_DEBUG(iPicture, Panic(EDPanicNoPictureOnDrawing)); + iPicture->SetSizeInTwips(currentSize); + } + else if (ret!=KErrNoMemory) + // problem loading app/doc - just iconify it for now... + SetFormatToIconL(); + else + User::Leave(ret); + } + CleanupStack::PopAndDestroy(); // streamDic + __PROFILE_END(5); + } + + +void CApaDoor::StoreDocL(CPersistentStore& aTargetStore)const +// stores the doc if it's in memory, otherwise panics! +// aStore should be protected before calling this method +// + { + __SHOW_TRACE(_L("Starting CApaDoor::StoreDocL")); + __ASSERT_ALWAYS(iApaDoc,Panic(EPanicNoDocumentOnStore)); // the doc must be in memory to be stored + // + // create a stream dic + CStreamDictionary* streamDic=CStreamDictionary::NewLC(); + // store the doc + iApaDoc->StoreL(aTargetStore,*streamDic); + // write store's root stream + CApaProcess::WriteRootStreamL(aTargetStore,*streamDic,*iApaDoc->Application()); + // tidy up + CleanupStack::PopAndDestroy(); // streamDic + } + + +void CApaDoor::RestoreDocL(const CPersistentStore& aSourceStore) +// restores the document from the embedded store +// leaves with KErrNotFound if the app dll cant be located +// + { + __SHOW_TRACE(_L("Starting CApaDoor::RestoreDocL")); + __ASSERT_ALWAYS(!iApaDoc,Panic(EPanicDocAlreadyExists)); + // + // read the stream dic from the doc's root stream + CStreamDictionary* streamDic=ReadStreamDictionaryLC(aSourceStore,aSourceStore.Root()); + // + // read the app id from the store + TApaAppIdentifier appId = CApaProcess::ReadAppIdentifierL(aSourceStore,*streamDic); + // + __ASSERT_DEBUG(iApaProcess,Panic(EDPanicNoProcess)); + // if the app exists find it, load it and create a doc, else leave if the correct app cannot be found + CApaDocument* doc = // create an unrestored doc and adds it to the process list + iApaProcess->AddNewDocumentL(appId.iAppUid); + TApaDocCleanupItem cleanup(iApaProcess,doc); + CleanupStack::PushL(cleanup); + doc->RestoreL(aSourceStore,*streamDic); // restores the doc + iApaDoc = doc; + CleanupStack::Pop(); // doc + CleanupStack::PopAndDestroy(); // streamDic + } + + +CStreamDictionary* CApaDoor::ReadStreamDictionaryLC(const CStreamStore& aSourceStore,TStreamId aStreamId) +// static method +// + { + __APA_PROFILE_START(12); + // read the stream dic from the doc's root stream + CStreamDictionary* streamDic=CStreamDictionary::NewLC(); + RStoreReadStream stream; + stream.OpenLC(aSourceStore,aStreamId); + stream>> *streamDic; + CleanupStack::PopAndDestroy(); // root + __APA_PROFILE_END(12); + return streamDic; + } + + +void CApaDoor::ExternalizeL(RWriteStream& /*aStream*/)const + { + Panic(EPanicMethodNotSupported); + } + + +void CApaDoor::ExternalizeStateStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const + { + __SHOW_TRACE(_L("Starting CApaDoor::ExternalizeStateStreamL")); + __ASSERT_ALWAYS(iAppCaption,Panic(EPanicNoCaption)); + __ASSERT_ALWAYS(iPicture,Panic(EPanicNoPictureInDoor)); + RStoreWriteStream stream; + TStreamId id=stream.CreateLC(aStore); + // + stream<< *iAppCaption; + TSize size; + if (iFormat==EIconic || iFormat==ETemporarilyIconic) + GetSizeInTwips(size); + else + size = iIconSizeInTwips; + stream<< size; + // + stream.CommitL(); + CleanupStack::PopAndDestroy(); // stream + aStreamDict.AssignL(KUidApaDoorStateStream,id); + } + + +void CApaDoor::InternalizeStateStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict,TSize aDefaultIconSize) + { + __SHOW_TRACE(_L("Starting CApaDoor::InternalizeStateStreamL")); + TStreamId id=aStreamDict.At(KUidApaDoorStateStream); + if (id!=KNullStreamId) + { + RStoreReadStream stream; + stream.OpenLC(aStore,id); + TApaAppCaption caption; + stream>> caption; + delete iAppCaption; + iAppCaption = NULL; + iAppCaption = caption.AllocL(); + stream>> iIconSizeInTwips; + CleanupStack::PopAndDestroy(); // stream + } + else + {// use default settings + delete iAppCaption; + iAppCaption = NULL; + iAppCaption = HBufC::NewL(0); + if (iFormat==EIconic) + iIconSizeInTwips = aDefaultIconSize; + else + iIconSizeInTwips = KDefaultIconSizeInTwips; + } + } + + +void CApaDoor::DetachFromStoreL(TDetach aDegree) +/** Detaches the door from its store, restoring any unrestored elements of the picture, +if necessary. + +@param aDegree Degree to which picture is detached. +@see CApaDocument::DetachFromStoreL() */ + { + __SHOW_TRACE(_L("Starting CApaDoor::DetachFromStoreL")); + if (iApaDoc) + { + iApaDoc->DetachFromStoreL(aDegree); + if (!iStoreHost) + { + delete iStore; + iStore = NULL; + } + } + else if (!iStoreHost) + { + if (aDegree==EDetachDraw) + { + delete iStore; + iStore = NULL; + // now all I can do is draw as I am, any attempt to change me will result in a panic + } + else + { + __ASSERT_ALWAYS(iStore,Panic(EPanicNoStoreOnDetach)); + // instantiate the mem buffer, and a stream to write to it + CBufSeg* bufSeg = CBufSeg::NewL(KHugeGranularity); + CleanupStack::PushL(bufSeg); + HBufBuf* buf=HBufBuf::NewL(*bufSeg,0); + RWriteStream writeStream(buf); + writeStream.PushL(); + // write the store to the mem buffer + CopyStoreL(*iStore,writeStream); + CleanupStack::Pop(2); // bufSeg,writeStream + // + // set iStoreHost as host for the embedded store + MStreamBuf* host=iStore->Host(); + __ASSERT_ALWAYS(host!=NULL,Panic(EDPanicNoHostForStore)); + iStore->Detach(); + host->Release(); //lint !e613 Suppress possible use of null pointer + iStore->Reattach(buf); + iStoreHost = bufSeg; + } + } + } + + +EXPORT_C CApaDocument* CApaDoor::DocumentL(TBool aCheckPassword) +// leaves with KErrNotFound if the doc needs to be restored but the app dll cannot be found +// +/** Returns a pointer to the embedded document represented by this wrapper. + +If necessary, the document is restored from its embedded store. + +Note that if the wrapper does not have a reference to the embedded document +store, then the function raises a APGRFX 13 panic. Constructing this wrapper +through a TApaPictureFactory or storing the embedded document through CApaDoor::StoreL() +ensures that this wrapper has a reference to the embedded document store. + +@param aCheckPassword If ETrue, any password is checked before returning a +pointer to the document. If EFalse, the password is not checked. +@return A pointer to the embedded document. +@see TApaPictureFactory +@see CApaDoor::StoreL() +@see CApaDocument::ValidatePasswordL() */ + { + __SHOW_TRACE(_L("Starting CApaDoor::DocumentL")); + // + if (!iApaDoc) + { + __ASSERT_ALWAYS(iStore,Panic(EPanicNoStoreOnRestore)); + RestoreDocL(*iStore); + } + else if (aCheckPassword) + iApaDoc->ValidatePasswordL(); + // + return iApaDoc; + } + +EXPORT_C void CApaDoor::SetFormatToTemporaryIconL(TBool aEnabled) +// if the door is currently iconic do nothing +// if the door is glass switch it's format to iconic, but ensure that when externalized the format will be persisted as glass +// +/** Switches the format of the door between temporarily iconic and glass. + +If the door is iconic, then the function does nothing. + +@param aEnabled If ETrue and the format is currently glass, then the format +switches to temporarily iconic; this is the default. If EFalse and the format +is currently temporarily iconic, then the format switches to glass. */ + { + __SHOW_TRACE(_L("Starting CApaDoor::SetFormatToTemporaryIconL")); + if (aEnabled && iFormat==EGlassDoor) + { + TSize glassSize; + GetSizeInTwips(glassSize); + SetFormatToIconL(); + iFormat = ETemporarilyIconic; + iIconSizeInTwips = glassSize; //abuse it! + } + else if (!aEnabled && iFormat==ETemporarilyIconic) + SetFormatToGlassL(); + } + +#ifdef __VC32__ +#pragma optimize("g", off) // Disable due to problem with MSVC +#endif +EXPORT_C void CApaDoor::SetFormatToIconL() +/** Sets the format of the door to iconic. + +The application's icon is used, or, if this cannot be found, the default icon +is used instead. The function leaves only if construction of the default icon +object fails. */ + { + __SHOW_TRACE(_L("Starting CApaDoor::SetFormatToIconL")); + __APA_PROFILE_START(6); + if (iFormat==ETemporarilyIconic && iPicture) + { + GetSizeInTwips(iIconSizeInTwips); + iFormat = EIconic; + } + else if (iFormat!=EIconic || !iPicture) + { + TUid appUid; + if (iApaDoc) + { + __ASSERT_DEBUG(iApaDoc->Application(), Panic(EDPanicNoApplication)); + appUid = iApaDoc->Application()->AppDllUid(); + } + else + { + appUid = AppUidFromStreamL(); + } + + TInt ret=KErrNone; + if (!iAppCaption) + { + RApaLsSession ls; + CleanupClosePushL(ls); + ret=ls.Connect(); + if (ret==KErrNone) + { + TApaAppInfo info; + ret=ls.GetAppInfo(info,appUid); + if (ret==KErrNone) + { + iAppCaption = info.iCaption.AllocL(); + } + } + CleanupStack::PopAndDestroy(&ls); + } + + if (!iAppCaption) // no caption found + iAppCaption = HBufC::NewL(0); + + CPicture* icon=CApaIconPicture::NewL(iIconSizeInTwips, appUid); + delete iPicture; + iPicture = icon; + iFormat = EIconic; + } + __PROFILE_END(6); + } +#ifdef __VC32__ +#pragma optimize("g", on) +#endif + + +TUid CApaDoor::AppUidFromStreamL() const + { + __ASSERT_DEBUG(iStore,Panic(EDPanicNoStoreOnIconify)); + __APA_PROFILE_START(15); + CStreamDictionary* streamDic=ReadStreamDictionaryLC(*iStore,iStore->Root()); + TApaAppIdentifier appId=CApaProcess::ReadAppIdentifierL(*iStore,*streamDic); + CleanupStack::PopAndDestroy(streamDic); + __APA_PROFILE_END(15); + return appId.iAppUid; + } + + +EXPORT_C void CApaDoor::SetFormatToGlassL() +/** Sets the format of the door to glass. + +The function asks the document to create a fresh copy of the door and destroys +any existing copy. If the process of creating the door completes without leaving, +but returns a zero pointer, then the function raises an APGRFX 17 panic. + +The function leaves with: + +KErrNotSupported, if the document does not support being represented by a +glass door. + +KErrNotFound, if the application DLL cannot be found. + +If the function leaves, the format remains unchanged. + +@see CApaDocument::GlassPictureL() */ + { + __SHOW_TRACE(_L("Starting CApaDoor::SetFormatToGlassL")); + __APA_PROFILE_START(7); + if (iFormat!=EGlassDoor || !iPicture) + { + if (!iApaDoc) + { + __ASSERT_DEBUG(iStore,Panic(EDPanicNoStoreOnGlassing)); + RestoreDocL(*iStore); + } + if (iApaDoc->Capability().CanDrawGlass()) + { + CPicture* glass = iApaDoc->GlassPictureL(); + __ASSERT_ALWAYS(glass,Panic(EPanicNoGlassPicture)); + if (iPicture) + iPicture->GetSizeInTwips(iIconSizeInTwips); // store the current icon size + delete iPicture; + iPicture = glass; + iFormat = EGlassDoor; + } + else + User::Leave(KErrNotSupported); // glass pic's not supported + } + __PROFILE_END(7); + } + + +EXPORT_C TUid CApaDoor::AppUidL()const +/** Gets the application specific UID associated with the embedded document. + +@return The application specific UID. */ + { + if (iApaDoc) + { + __ASSERT_DEBUG(iApaDoc->Application(), Panic(EDPanicNoApplication)); + return iApaDoc->Application()->AppDllUid(); + } + // + __ASSERT_ALWAYS(iStore,Panic(EPanicNoStoreOnAppUid)); + // + // read uid from store's headstream + CStreamDictionary* streamDic = ReadStreamDictionaryLC(*iStore,iStore->Root()); + TApaAppIdentifier appId = CApaProcess::ReadAppIdentifierL(*iStore,*streamDic); + CleanupStack::PopAndDestroy(); // streamDic + return appId.iAppUid; + } + + +void CApaDoor::Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect, + MGraphicsDeviceMap* aMap)const +/** Draws the door either as glass or as an icon depending on the format. + +@param aGc The graphics context. +@param aTopLeft The co-ordinates where the top left corner pixel of the picture +should be placed. Note that whether this is actually drawn depends on the +clipping area defined. +@param aClipRect A clipping rectangle. +@param aMap The device map for the graphics device. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPictureOnDrawing)); + // + iPicture->Draw(aGc,aTopLeft,aClipRect,aMap); + } + +void CApaDoor::GetOriginalSizeInTwips(TSize& aSize)const +/** Get the door's original size, in twips. + +@param aSize The size, in twips. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + iPicture->GetOriginalSizeInTwips(aSize); + } + +void CApaDoor::SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight) +/** Sets the door's scale factors. + +@param aScaleFactorWidth The width scale factor, in percent. +@param aScaleFactorHeight The height scale factor, in percent. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + iPicture->SetScaleFactor(aScaleFactorWidth,aScaleFactorHeight); + } + +TInt CApaDoor::ScaleFactorWidth()const +/** Gets the door's width scale factor. + +@return The width scale factor, in percent. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + return iPicture->ScaleFactorWidth(); + } + +TInt CApaDoor::ScaleFactorHeight()const +/** Gets the door's height scale factor. + +@return The height scale factor, in percent. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + return iPicture->ScaleFactorHeight(); + } + +void CApaDoor::SetCropInTwips(const TMargins& aMargins) +/** Sets the cropping margins of a picture in twips. + +These are relative to the original unscaled size of the picture. + +@param aMargins The cropping margins, in twips. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + iPicture->SetCropInTwips(aMargins); + } + +void CApaDoor::GetCropInTwips(TMargins& aMargins)const +/** Gets the cropping margins of the door in twips. + +These margins are relative to the original unscaled size of the picture. + +@param aMargins The cropping margins, in twips. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + iPicture->GetCropInTwips(aMargins); + } + +TPictureCapability CApaDoor::Capability()const +/** Gets the picture's capabilities. + +These include whether it is scalable and croppable. + +@return The capabilities of the picture. */ + { + __ASSERT_DEBUG(iPicture,Panic(EDPanicNoPicture)); + return iPicture->Capability(); + } + +TSize CApaDoor::GlassDoorSize()const + { + TSize size; + if (iFormat==EGlassDoor) + GetSizeInTwips(size); + else if (iFormat==ETemporarilyIconic) + { + if (!iApaDoc) + size = iIconSizeInTwips; + else + { + // there's a doc, so get a glass door from it just in case it's size has changed since I changed format + CPicture* glass = NULL; + TRAP_IGNORE(glass = iApaDoc->GlassPictureL()); + __ASSERT_ALWAYS(glass,Panic(EPanicNoGlassPicture)); + glass->GetSizeInTwips(size); //lint !e613 Possible use of null pointer - Asserted above + delete glass; + } + } + else + Panic(EIllegalCallToGlassDoorSize); + return size; + } + + +void CApaDoor::SetIconSizeInTwips(TSize aSize) +// for use of factory + { + if (iFormat==EGlassDoor) + iIconSizeInTwips = aSize; + else + SetSizeInTwips(aSize); + } + + +/////////////////////////////////// +// TApaPictureFactory +/////////////////////////////////// + +#define KDoNotApplyIconSize TSize(-1,-1) + +/** Constructor for TApaPictureFactory */ +EXPORT_C TApaPictureFactory::TApaPictureFactory() + :iApaProcess(NULL), + iIconSize(TSize(0,0)) + { + } + +EXPORT_C TApaPictureFactory::TApaPictureFactory(CApaProcess* aAppProcess) + :iApaProcess(aAppProcess), + iIconSize(KDoNotApplyIconSize) +/** Constructs a door factory object for the specified application process. + +@param aAppProcess The application process. */ + {} + +EXPORT_C void TApaPictureFactory::NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const +// called (by the containing doc) to restore an app door from its header +// +/** Constructs and restores an application's door (picture) from a stream in the +specified store. + +The restored door is a CApaDoor type object. + +Note that the function can leave with KErrNoMemory if creation of the CApaDoor +object fails. + +@param aPictureHeader The header identifying the door to be restored. The +UID identifying the door must be KUidPictureTypeDoor, otherwise the function +leaves with KErrNotSupported. On entry, the door picture must be represented +by a stream ID, otherwise the function leaves with KErrBadHandle; on return, +the door picture is represented by a pointer to an internalized CApaDoor object. +@param aPictureStore The store from which the door will be restored. +@see TPictureHeader +@see TPictureHeader::iPicture */ + { + __SHOW_TRACE(_L("Starting TApaPictureFactory::NewPictureL")); + if (aPictureHeader.iPictureType!=KUidPictureTypeDoor) + User::Leave(KErrNotSupported); // wrong type + if (!aPictureHeader.iPicture.IsId()) + User::Leave(KErrBadHandle); // not an id - can't restore + // + // create and restore the door + TStreamId id = aPictureHeader.iPicture.AsId(); +// RFs fs; +// User::LeaveIfError(fs.Connect()); +// CleanupClosePushL(fs); + __ASSERT_DEBUG(iApaProcess, Panic(EDPanicNoProcess)); + if(iApaProcess) + { + CApaDoor* door = CApaDoor::NewL(iApaProcess->FsSession()/*fs*/,aPictureStore,id,*CONST_CAST(CApaProcess*,iApaProcess)); + aPictureHeader.iPicture = door; + // + // set the icon size if requested + if (iIconSize!=KDoNotApplyIconSize) + door->SetIconSizeInTwips(iIconSize); + } +// CleanupStack::PopAndDestroy(); // fs - it's not needed any more as the base class doesn't use it + } + + +//////////////////////////////////// +// HBufBuf +//////////////////////////////////// + +HBufBuf* HBufBuf::NewL(CBufBase& aBuf,TInt aPos,TInt aMode) +// +// Create a pre-set buffer stream buffer. +// + { + HBufBuf* buf=new(ELeave) HBufBuf; + buf->Set(aBuf,aPos,aMode); + return buf; + } + +void HBufBuf::DoRelease() +// +// Finished with this stream buffer. +// + { + delete this; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGICNFL.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGICNFL.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2441 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "APGAIR.H" + +#ifdef _DEBUG +#include "APGSTD.H" // panic codes +#endif // _DEBUG + +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) +// the two #defines immediately below are #defined to "nothing" so that only the minimal set of functions that ought to be "removed" because of SYMBIAN_REMOVE_UI_FRAMEWORKS_V1 (but which are needed still because of UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) are actually exported +#define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER +#define EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER +#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +#include "APGICNFL.H" + +#if !defined(EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER) +// we're compiling a source file that doesn't define EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER, so give it it's default "value" of "EXPORT_C" +#define EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER EXPORT_C +#endif + +// +// Try and reduce the bitmap mask depth to 1bpp (2 colours) +// +LOCAL_D CFbsBitmap* TryCompressMaskL(const CFbsBitmap& aMask) + { + CFbsBitmap* newMask=NULL; + if (aMask.DisplayMode()!=EGray2 && aMask.IsMonochrome()) + { + newMask=new(ELeave) CFbsBitmap; + CleanupStack::PushL(newMask); + const TSize size=aMask.SizeInPixels(); + User::LeaveIfError(newMask->Create(size,EGray2)); + CFbsBitmapDevice* device=CFbsBitmapDevice::NewL(newMask); + CleanupStack::PushL(device); + CFbsBitGc* gc=NULL; + User::LeaveIfError(device->CreateContext(gc)); + CleanupStack::PushL(gc); + TPoint origin(0,0); + gc->BitBlt(origin,&aMask); + CleanupStack::PopAndDestroy(2); // gc, device + CleanupStack::Pop(newMask); + } + return newMask; + } + +// +// Class CApaMaskedBitmap +// + +CApaMaskedBitmap::CApaMaskedBitmap() +:CFbsBitmap() + {} + +EXPORT_C CApaMaskedBitmap::~CApaMaskedBitmap() +/** Destructor. + +Frees resources owned by the object prior to its destruction. */ + { + delete iMask; + } + +EXPORT_C CApaMaskedBitmap* CApaMaskedBitmap::NewLC() +/** Creates a default application icon object. + +@return A pointer to the new application icon object. */ + { + CApaMaskedBitmap* self=new(ELeave) CApaMaskedBitmap; + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +EXPORT_C CApaMaskedBitmap* CApaMaskedBitmap::NewL(const CApaMaskedBitmap* aSourceIcon) +/** Creates a new application icon object, making a duplicate copy of an existing +application icon. + +@param aSourceIcon A pointer to an existing application icon. +@return A pointer to the new application icon object. */ + { + CApaMaskedBitmap* self=new(ELeave) CApaMaskedBitmap; + CleanupStack::PushL(self); + self->ConstructL(); + User::LeaveIfError( self->iMask->Duplicate(aSourceIcon->Mask()->Handle()) ); + User::LeaveIfError( self->Duplicate(aSourceIcon->Handle()) ); + CleanupStack::Pop(self); + return self; + } + +void CApaMaskedBitmap::ConstructL() + { + __DECLARE_NAME(_S("CApaMaskedBitmap")); + if (!iFbs) + User::Leave(KErrCouldNotConnect); + iMask=new(ELeave) CFbsBitmap; + } + +EXPORT_C CFbsBitmap* CApaMaskedBitmap::Mask() const +/** Gets the icon's mask. + +@return A pointer to the mask bitmap. */ + { + return iMask; + } + +EXPORT_C void CApaMaskedBitmap::InternalizeL(RReadStream& aStream) +/** Internalizes the application icon from the read stream. + +@param aStream The read stream. */ + { + __ASSERT_DEBUG(iMask, Panic(EPanicNullPointer)); + CFbsBitmap::InternalizeL(aStream); + aStream >> *iMask; + + // Try to reduce the colour depth of the bitmap mask + CFbsBitmap* tempMask; + tempMask = TryCompressMaskL(*iMask); + // tempMask = NULL if iMask could not be reduced + if (tempMask != NULL) + { + delete iMask; + iMask = tempMask; + } + } + +void CApaMaskedBitmap::SetRomBitmapL(TUint8* aRomPointer) + { + __ASSERT_DEBUG(iMask, Panic(EPanicNullPointer)); + TInt bitmapSize = 0; + CFbsBitmap::SetRomBitmapL(reinterpret_cast(aRomPointer),bitmapSize); + + aRomPointer += bitmapSize; + + iMask->SetRomBitmapL(reinterpret_cast(aRomPointer),bitmapSize); + } + +EXPORT_C void CApaMaskedBitmap::ExternalizeL(RWriteStream& aStream) const +/** Externalises the application icon to the specified stream. + +@param aStream The write stream. */ + { + __ASSERT_DEBUG(iMask, Panic(EPanicNullPointer)); + CFbsBitmap::ExternalizeL(aStream); + aStream << *iMask; + } + + +EXPORT_C void CApaMaskedBitmap::SetMaskBitmap(CFbsBitmap* aMask) +/** +Sets the icon's mask + +@publishedAll +@released +@param aMask A pointer to the mask bitmap +*/ + { + delete iMask; + iMask = aMask; + } + + + +#if (defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)) + + + +// +// Class CApaAIFCaption +// + +CApaAIFCaption::~CApaAIFCaption() + { + delete iCaption; + } + +CApaAIFCaption* CApaAIFCaption::NewLC(TLanguage aLanguage,const TDesC& aCaption) + // static + { + CApaAIFCaption* self=new(ELeave) CApaAIFCaption; + CleanupStack::PushL(self); + self->ConstructL(aLanguage,aCaption); + return self; + } + +void CApaAIFCaption::ConstructL(TLanguage aLanguage,const TDesC& aCaption) + { + iLanguage=aLanguage; + HBufC* newCaption=aCaption.AllocL(); + delete(iCaption); // after the AllocL succeeds + iCaption=newCaption; + } + +TLanguage CApaAIFCaption::Language() const + { + return iLanguage; + } + +TApaAppCaption CApaAIFCaption::Caption() const + { + return *iCaption; + } + +CApaAIFCaption::CApaAIFCaption() + { + } + +void CApaAIFCaption::InternalizeL(RReadStream& aStream) + { + HBufC* newCaption=HBufC::NewL(aStream,KApaMaxAppCaption); + delete(iCaption); + iCaption=newCaption; + iLanguage=(TLanguage)aStream.ReadInt16L(); + } + +void CApaAIFCaption::ExternalizeL(RWriteStream& aStream) const + { + aStream << *iCaption; + aStream.WriteInt16L(iLanguage); + } + + +// +// Class CApaAIFViewData +// + +CApaAIFViewData::~CApaAIFViewData() + { + if (iCaptionArray) + iCaptionArray->ResetAndDestroy(); + delete iCaptionArray; + if (iIconArray) + iIconArray->ResetAndDestroy(); + delete iIconArray; + delete iIconIndexArray; + } + +CApaAIFViewData::CApaAIFViewData() + {} + +void CApaAIFViewData::ConstructL() + { + iCaptionArray=new(ELeave) CArrayPtrFlat(4); + iIconArray=new(ELeave) CArrayPtrFlat(4); + } + +CApaAIFViewData* CApaAIFViewData::NewLC() + // static + { + CApaAIFViewData* self=new(ELeave) CApaAIFViewData; + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +CApaAIFViewData* CApaAIFViewData::NewLC(const CApaAIFViewData& aSourceData) + { + CApaAIFViewData* self = CApaAIFViewData::NewLC(); + self->ConstructL(aSourceData); + return self; + } + +void CApaAIFViewData::ConstructL(const CApaAIFViewData& aSourceData) + { + // Make a copy of aSourceData in this object + // N.B. this is not an atomic operation and if the function leaves + // there is no guarantee that this object will be in a valid state. + // Should only be called from CApaAIFViewData::NewLC(const CApaAIFViewData& aSourceData) + // + // Screen mode + iScreenMode = aSourceData.iScreenMode; + // Icon array + TInt count = (aSourceData.iIconArray ? aSourceData.iIconArray->Count() : 0); + TInt i; + for (i=0; i < count; i++) + { + // Get the icon from array and duplicate it + const CApaMaskedBitmap& srcIcon = (*aSourceData.iIconArray->At(i)); + CApaMaskedBitmap* icon = CApaMaskedBitmap::NewLC(); + User::LeaveIfError(icon->Duplicate(srcIcon.Handle())); + + CFbsBitmap* mask = new(ELeave) CFbsBitmap(); + CleanupStack::PushL(mask); + User::LeaveIfError(mask->Duplicate(srcIcon.Mask()->Handle())); + icon->SetMaskBitmap(mask); + CleanupStack::Pop(mask); + + iIconArray->AppendL(icon); + CleanupStack::Pop(icon); + } + // Caption array + count = (aSourceData.iCaptionArray ? aSourceData.iCaptionArray->Count() : 0); + for (i=0; i < count; i++) + { + const CApaAIFCaption& srcCaption = (*aSourceData.iCaptionArray->At(i)); + CApaAIFCaption* caption = CApaAIFCaption::NewLC(srcCaption.Language(), srcCaption.Caption()); + iCaptionArray->AppendL(caption); + CleanupStack::Pop(caption); + } + // View UID + iViewUid = aSourceData.iViewUid; + // Icon index array + count = (aSourceData.iIconIndexArray ? aSourceData.iIconIndexArray->Count() : 0); + for (i=0; i < count; i++) + { + AddIconIndexL(aSourceData.iIconIndexArray->At(i)); + } + } + +void CApaAIFViewData::LoadIconsL(const TDesC& aFileName, TUint aMbmOffset) + { + // This function is called when loading the AIF version 2 format + // When loading the RSC block, any view icons will have been added to iIconIndexArray as MBM indexes. + // This function loads the view icons from the MBM using these indexes. + __ASSERT_DEBUG(iIconArray->Count()==0,Panic(EDPanicArrayNotEmpty)); + const TInt iconCount = (iIconIndexArray ? iIconIndexArray->Count() : 0); + for (TInt i=0; i < iconCount; i++) + { + const TInt mbmIndex = iIconIndexArray->At(i) * 2; // Each icon is a mask and bitmap == 2 items in MBM + CApaMaskedBitmap* icon = CApaMaskedBitmap::NewLC(); + CFbsBitmap* mask = new(ELeave) CFbsBitmap(); + CleanupStack::PushL(mask); + User::LeaveIfError(icon->Load(aFileName, mbmIndex, ETrue, aMbmOffset)); + User::LeaveIfError(mask->Load(aFileName, mbmIndex + 1, ETrue, aMbmOffset)); + icon->SetMaskBitmap(mask); + CleanupStack::Pop(mask); + iIconArray->AppendL(icon); + CleanupStack::Pop(icon); + } + } + +void CApaAIFViewData::InternalizeL(RReadStream& aStream) + { + // Uid + iViewUid.iUid=aStream.ReadInt32L(); + // Screen mode + iScreenMode=aStream.ReadInt32L(); + // Captions + if (iCaptionArray) + iCaptionArray->ResetAndDestroy(); + else + iCaptionArray=new(ELeave) CArrayPtrFlat(1); + TCardinality card; + aStream>>card; + const TInt captionCount(card); + CApaAIFCaption* caption=NULL; + for (TInt ii=0;ii> *caption; + iCaptionArray->AppendL(caption); + CleanupStack::Pop(caption); + } + // Icons + if (iIconArray) + iIconArray->ResetAndDestroy(); + else + iIconArray=new(ELeave) CArrayPtrFlat(2); + aStream>>card; + const TInt iconCount(card); + CApaMaskedBitmap* icon=NULL; + for (TInt jj=0;jj> *icon; + iIconArray->AppendL(icon); + CleanupStack::Pop(icon); + } + } + +void CApaAIFViewData::ExternalizeL(RWriteStream& aStream) const + { + // Uid + aStream.WriteInt32L(iViewUid.iUid); + // Screen Mode + aStream.WriteInt32L(iScreenMode); + // Captions + const TInt captionCount=iCaptionArray->Count(); + aStream<Count(); + aStream<AppendL(caption); + CleanupStack::Pop(caption); + } + +void CApaAIFViewData::AddIconL(CApaMaskedBitmap& aIcon) + { + CApaMaskedBitmap* icon=CApaMaskedBitmap::NewL(&aIcon); + CleanupStack::PushL(icon); + iIconArray->AppendL(icon); + CleanupStack::Pop(icon); + } + +void CApaAIFViewData::AddIconIndexL(TInt aIndex) + { + if (!iIconIndexArray) + { + iIconIndexArray = new(ELeave) CArrayFixFlat(4); + } + iIconIndexArray->AppendL(aIndex); + } + +void CApaAIFViewData::SetViewUid(TUid aUid) + { + iViewUid=aUid; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CApaAIFViewData::CaptionL(TLanguage aLanguage) const + { + RFs fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + RArray downgradePath; + CleanupClosePushL(downgradePath); + BaflUtils::GetDowngradePathL(fs,aLanguage,downgradePath); + TApaAppCaption result(KNullDesC); + const TInt languagecount=downgradePath.Count(); + const TInt count=iCaptionArray->Count(); + for (TInt j=0; jCount() : iIconArray->Count()); + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid CApaAIFViewData::ViewUid() const + { + return iViewUid; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt CApaAIFViewData::ScreenMode() const + { + return iScreenMode; + } + +// +// Class CApaAppInfoFile +// + +CApaAppInfoFile::CApaAppInfoFile(RFs& aFs) +:iFs(aFs) + {} + +void CApaAppInfoFile::TCaptionHeader::InternalizeL(RReadStream& aStream) + { + aStream >> iCaption; + iLanguage=(TLanguage)aStream.ReadInt16L(); + } + +void CApaAppInfoFile::TCaptionHeader::ExternalizeL(RWriteStream& aStream) const + { + aStream << iCaption; + aStream.WriteInt16L(iLanguage); + } + +void CApaAppInfoFile::TIconHeader::InternalizeL(RReadStream& aStream) + { + aStream >> iIcon; + iIconSideInPixels=aStream.ReadInt16L(); + } + +void CApaAppInfoFile::TIconHeader::ExternalizeL(RWriteStream& aStream) const + { + aStream << iIcon; + aStream.WriteInt16L(iIconSideInPixels); + } + +void CApaAppInfoFile::TDataTypeHeader::InternalizeL(RReadStream& aStream) + { + aStream >> iDataType; + iPriority=aStream.ReadInt16L(); + } + +void CApaAppInfoFile::TDataTypeHeader::ExternalizeL(RWriteStream& aStream) const + { + aStream << iDataType; + aStream.WriteInt16L(iPriority); + } + +void CApaAppInfoFile::TViewDataHeader::InternalizeL(RReadStream& aStream) + { + aStream >> iViewData; + } + +void CApaAppInfoFile::TViewDataHeader::ExternalizeL(RWriteStream& aStream) const + { + aStream << iViewData; + } + +void CApaAppInfoFile::TFileOwnershipInfoHeader::InternalizeL(RReadStream& aStream) + { + aStream >> iOwnedFileName; + } + +void CApaAppInfoFile::TFileOwnershipInfoHeader::ExternalizeL(RWriteStream& aStream) const + { + aStream << iOwnedFileName; + } + +CApaAppInfoFile::~CApaAppInfoFile() + { + if (iCaptionHeaderArray) + { + const TInt maxIndex=iCaptionHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TSwizzle& caption = iCaptionHeaderArray->At(i).iCaption; + if (caption.IsPtr()) + { + delete caption.AsPtr(); + iCaptionHeaderArray->Delete(i); + } + } + } + delete iCaptionHeaderArray; + delete iIconHeaderArray; + if (iDataTypeHeaderArray) + { + const TInt maxIndex=iDataTypeHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TSwizzle& dataType = iDataTypeHeaderArray->At(i).iDataType; + if (dataType.IsPtr()) + { + delete dataType.AsPtr(); + iDataTypeHeaderArray->Delete(i); + } + } + } + delete iDataTypeHeaderArray; + if (iViewDataHeaderArray) + { + const TInt maxIndex=iViewDataHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TSwizzle& viewData = iViewDataHeaderArray->At(i).iViewData; + if (viewData.IsPtr()) + { + delete viewData.AsPtr(); + iViewDataHeaderArray->Delete(i); + } + } + } + delete iViewDataHeaderArray; + if (iFileOwnershipInfoHeaderArray) + { + const TInt maxIndex=iFileOwnershipInfoHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TSwizzle& fileName = iFileOwnershipInfoHeaderArray->At(i).iOwnedFileName; + if (fileName.IsPtr()) + { + delete fileName.AsPtr(); + iFileOwnershipInfoHeaderArray->Delete(i); + } + } + } + delete iFileOwnershipInfoHeaderArray; + delete iStore; + } + +void CApaAppInfoFile::ConstructL() + { + iCaptionHeaderArray=new(ELeave) CArrayFixFlat(4); + iIconHeaderArray=new(ELeave) CArrayFixFlat(4); + iDataTypeHeaderArray=new(ELeave) CArrayFixFlat(4); + iViewDataHeaderArray=new(ELeave) CArrayFixFlat(4); + iFileOwnershipInfoHeaderArray=new(ELeave) CArrayFixFlat(4); + } + +// +// Class CApaAppInfoFileReader +// + +CApaAppInfoFileReader::CApaAppInfoFileReader(RFs& aFs) + :CApaAppInfoFile(aFs) + {} + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaAppInfoFileReader::~CApaAppInfoFileReader() +/** Destructor. + +Destroys all resources owned by the aif file reader. */ + { + delete iDefaultCaption; + delete iAifFileName; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaAppInfoFileReader* CApaAppInfoFileReader::NewLC(RFs& aFs, const TDesC& aFileName,TUid aUid) +/** Allocates and constructs the aif file reader and internalises the contents +of the specified aif file. + +@param aFs Connected session with the file server. +@param aFileName The full path and (language-neutral) filename of the aif file. +@param aApplicationUid The application's UID. If you specify a value other +than KNullUid, the aif file must have this value as its third (most derived) +UID. +@leave KErrCorrupt The UID specified is incorrect, or if KNullUid was specified, +the aif file's second UID was not KUidAppInfoFile. +@return Pointer to the newly constructed and initialised aif file reader. The +object is left on the cleanup stack. */ + { + CApaAppInfoFileReader* self=new(ELeave) CApaAppInfoFileReader(aFs); + CleanupStack::PushL(self); + self->ConstructL(aFileName,aUid); + return self; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaAppInfoFileReader* CApaAppInfoFileReader::NewL(RFs& aFs, const TDesC& aFileName,TUid aUid) +/** Allocates and constructs the aif file reader and internalises the contents +of the specified aif file. + +@param aFs Connected session with the file server. +@param aFileName The full path and (language-neutral) filename of the aif file. +@param aApplicationUid The application's UID. If you specify a value other +than KNullUid, the aif file must have this as its third (most derived) UID. +@leave KErrCorrupt The UID specified is incorrect, or if KNullUid was specified, +the aif file's second UID was not KUidAppInfoFile. +@return Pointer to the newly constructed and initialised aif file reader. The +object is popped from the cleanup stack. */ + { + CApaAppInfoFileReader* self=CApaAppInfoFileReader::NewLC(aFs, aFileName,aUid); + CleanupStack::Pop(self); + return self; + } + +void CApaAppInfoFileReader::ConstructL(const TDesC& aFileName,TUid aMostDerivedUid) + { + __DECLARE_NAME(_S("CApaAppInfoFileReader")); + CApaAppInfoFile::ConstructL(); + TParse parse; + User::LeaveIfError(parse.Set(aFileName,NULL,NULL)); + iDefaultCaption=parse.Name().AllocL(); + TFileName localFileName; + localFileName.Copy(aFileName); + BaflUtils::NearestLanguageFile(iFs,localFileName); + iRomPointer=iFs.IsFileInRom(localFileName); + + iAifFileName = localFileName.AllocL(); + + // Get the file type + TEntry entry; + User::LeaveIfError(iFs.Entry(localFileName, entry)); + if (!entry.IsTypeValid()) + { + // Invalid UID + User::Leave(KErrCorrupt); + } + + // Determine the type of AIF file + const TUidType& type = entry.iType; + if (( +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + type[1] == KUidInterimFormatFileForJavaMIDletInstaller +#endif + ) && (aMostDerivedUid == KNullUid || type[2] == aMostDerivedUid)) + { + // Read old AIF format file + CFileStore* store = CFileStore::OpenL(iFs,localFileName,EFileRead|EFileShareReadersOnly); + iStore = store; + RStoreReadStream inStream; + inStream.OpenLC(*store,store->Root()); + InternalizeL(inStream); + CleanupStack::PopAndDestroy(&inStream); + } + else + { + // it's the wrong file!!!!! + User::Leave(KErrCorrupt); + } + } + +void CApaAppInfoFileReader::LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid) + { + // Version 2 AIF format: + // + // +--------------------- - - -------- - - ---+ + // | UID | RSC len | RSC block | MBM block | + // +--------------------- - - -------- - - ---+ + // + // UID = 4 bytes (incl. checksum) + // RSC len = 4 bytes + // RSC block = RSC len bytes + padding to make MBM block 4-byte aligned + // MBM block = remainder of file, 4-byte aligned + // + // Read 16-bit block for length of RSC file + RFile file; + User::LeaveIfError(file.Open(iFs, aFileName, EFileRead | EFileShareReadersOnly)); + CleanupClosePushL(file); + TInt aifHeaderOffset = 16; // skip over UID and checksum + User::LeaveIfError(file.Seek(ESeekStart, aifHeaderOffset)); + TBuf8<4> buffer; + User::LeaveIfError(file.Read(buffer)); + const TInt rscLength = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); + TInt fileSize = 0; + User::LeaveIfError(file.Size(fileSize)); + CleanupStack::PopAndDestroy(&file); + + // Open RSC file using offset + RResourceFile resFile; + resFile.OpenL(iFs, aFileName, aifHeaderOffset + 4, rscLength); + CleanupClosePushL(resFile); + + // Read the first resource (AIF_DATA struct) + HBufC8* resource = resFile.AllocReadLC(1); + + TResourceReader reader; + reader.SetBuffer(resource); + + // Read app UID + const TInt uid = reader.ReadInt32(); + if ((aMostDerivedUid != KNullUid) && (uid != aMostDerivedUid.iUid)) + { + User::Leave(KErrCorrupt); + } + // Num icons + const TInt numIcons = reader.ReadInt16(); + + // Caption array + const TInt captionArraySize = reader.ReadInt16(); + TInt i; + for (i=0; i < captionArraySize; i++) + { + TCaptionHeader header; + header.iLanguage = static_cast(reader.ReadInt16()); + TPtrC caption = reader.ReadTPtrC(); + header.iCaption = caption.AllocLC(); + iCaptionHeaderArray->AppendL(header); + CleanupStack::Pop(header.iCaption); + } + + // Read capability flags + iCapability.iAppIsHidden = reader.ReadInt8(); + iCapability.iEmbeddability = static_cast(reader.ReadInt8()); + iCapability.iSupportsNewFile = reader.ReadInt8(); + iCapability.iLaunchInBackground = reader.ReadInt8(); + + // Group name + iCapability.iGroupName = reader.ReadTPtrC(); + + // Datatype list + const TInt dataTypeArraySize = reader.ReadInt16(); + for (i=0; i < dataTypeArraySize; i++) + { + TDataTypeHeader dataTypeHeader; + dataTypeHeader.iPriority = (TDataTypePriority)reader.ReadInt16(); + TPtrC8 dataTypePtr = reader.ReadTPtrC8(); + TDataType* dataType = new(ELeave) TDataType(dataTypePtr); + CleanupStack::PushL(dataType); + dataTypeHeader.iDataType = dataType; + iDataTypeHeaderArray->AppendL(dataTypeHeader); + CleanupStack::Pop(dataType); + } + + // Read MBM block + iMbmOffset = aifHeaderOffset + 4 + rscLength; + // Calculate any padding after the RSC (MBM block must be 4-byte aligned) + TInt mbmPadding = (rscLength % 4); + if (mbmPadding) + mbmPadding = 4 - mbmPadding; + iMbmOffset += mbmPadding; + TInt iconIndex = 0; + if (fileSize > iMbmOffset) + { + // Populate the icon array + AddIconHeadersL(aFileName, iMbmOffset, numIcons); + iconIndex += numIcons; + } + + // View list + const TInt viewListArraySize = reader.ReadInt16(); + for (i=0; i < viewListArraySize; i++) + { + CApaAIFViewData* viewData = CApaAIFViewData::NewLC(); + viewData->SetViewUid(TUid::Uid(reader.ReadInt32())); // Read UID + viewData->SetScreenMode(reader.ReadInt32()); // Read screenmode + TInt numViewIcons = reader.ReadInt16(); // Read num icons + TInt j = 0; + for ( ; j < numViewIcons; j++) + { + viewData->AddIconIndexL(iconIndex); + iconIndex++; + } + // Read caption array + const TInt viewCaptArraySize = reader.ReadInt16(); + for (j=0; j < viewCaptArraySize; j++) + { + TLanguage langCode = static_cast(reader.ReadInt16()); + TPtrC caption = reader.ReadTPtrC(); + viewData->AddCaptionL(langCode, caption); + } + TViewDataHeader header; + header.iViewData = viewData; + iViewDataHeaderArray->AppendL(header); + CleanupStack::Pop(viewData); + } + + // File ownership list + const TInt fileOwnershipArraySize = reader.ReadInt16(); + for (i=0; i < fileOwnershipArraySize; i++) + { + // Filename + TFileOwnershipInfoHeader ownership; + TPtrC fileNamePtr = reader.ReadTPtrC(); + ownership.iOwnedFileName = fileNamePtr.AllocLC(); + iFileOwnershipInfoHeaderArray->AppendL(ownership); + CleanupStack::Pop(ownership.iOwnedFileName); + } + CleanupStack::PopAndDestroy(2, &resFile); + } + +void CApaAppInfoFileReader::AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons) + { + CFbsBitmap* bmp = new(ELeave) CFbsBitmap(); + CleanupStack::PushL(bmp); + for (TInt i=0; i < aNumIcons; i++) + { + User::LeaveIfError(bmp->Load(aFileName, i * 2, ETrue, aFileOffset)); + TSize iconSize = bmp->SizeInPixels(); + TIconHeader header; + header.iIcon = NULL; + header.iIconMain = NULL; + header.iIconMask = NULL; + header.iIconSideInPixels = iconSize.iWidth; + iIconHeaderArray->AppendL(header); + } + CleanupStack::PopAndDestroy(bmp); + } + +void CApaAppInfoFileReader::InternalizeL(RReadStream& aStream) + { + aStream>> *iCaptionHeaderArray; // Internalizes the headers only + aStream>> *iIconHeaderArray; + aStream>> iCapability; + TInt version=EAifVersionOriginal; + TRAP_IGNORE(version=aStream.ReadInt32L()); + if (version> *iDataTypeHeaderArray; + if (version> *iViewDataHeaderArray; + if (version> *iFileOwnershipInfoHeaderArray; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + if (version downgradePath; + CleanupClosePushL(downgradePath); + BaflUtils::GetDowngradePathL(fs,aLanguage,downgradePath); + TApaAppCaption result(*iDefaultCaption); + const TInt count=iCaptionHeaderArray->Count(); + if (count>0) + { + const TInt languageCount=downgradePath.Count(); + TInt captionIndex=KErrNotFound; + for (TInt j=0; j> result; + CleanupStack::PopAndDestroy(&inStream); + } + else + { + __ASSERT_DEBUG(pCaptionHeader.iCaption.IsPtr(), Panic(EPanicNoCaption)); + result = *(pCaptionHeader.iCaption); + } + downgradePath.Reset(); + } + CleanupStack::PopAndDestroy(2, &fs); + return result; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileReader::StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels) +/** Creates a new bitmap based on another, stretched or compressed to the specified +size. + +@param aSource The source bitmap to copy. +@param aTarget The target bitmap. On return, this is set to be a copy of aSource, +but stretched or compressed to the specified size. +@param aSizeInPixels The required size for the target bitmap. */ + { + User::LeaveIfError(aTarget->Create(aSizeInPixels,aSource->DisplayMode())); + CFbsBitmapDevice* bitDev=CFbsBitmapDevice::NewL(aTarget); + CleanupStack::PushL(bitDev); + CFbsBitGc* gc; + User::LeaveIfError(bitDev->CreateContext((CGraphicsContext*&)gc)); + gc->DrawBitmap(TRect(aSizeInPixels),aSource); + delete gc; + CleanupStack::PopAndDestroy(bitDev); + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt CApaAppInfoFileReader::NumberOfBitmaps() const +/** Returns the number of icons in the aif file. + +@return The number of icons in the aif file. */ + { + return iIconHeaderArray->Count(); + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CApaAppInfoFileReader::CreateMaskedBitmapByIndexLC(TInt aIndex) + { + const TInt count=iIconHeaderArray->Count(); + if (count<=aIndex) // panic? + User::Leave(KErrNotFound); + // + CApaMaskedBitmap* icon=CApaMaskedBitmap::NewLC(); + if (iStore) + { + RStoreReadStream inStream; + inStream.OpenLC(*iStore,(*iIconHeaderArray)[aIndex].iIcon.AsId()); + MStreamBuf* src=inStream.Source(); + __ASSERT_DEBUG(src, Panic(EPanicNullPointer)); + const TUid uid = TUid::Uid(inStream.ReadInt32L()); + src->SeekL(MStreamBuf::ERead,-4); + if (uid==KCBitwiseBitmapUid) + { + TUint32* fileOffsetPtr=(TUint32*) src; + fileOffsetPtr+=4; + icon->SetRomBitmapL(iRomPointer+(*fileOffsetPtr)); + } + else + { + inStream >> *icon; + } + CleanupStack::PopAndDestroy(&inStream); + } + else + { + CFbsBitmap* mask = new(ELeave) CFbsBitmap(); + CleanupStack::PushL(mask); + TInt mbmIndex = aIndex * 2; // we need to map 'icon index' to 'mbm index' (bmp + mask) + __ASSERT_DEBUG(iAifFileName, Panic(EPanicNullPointer)); + User::LeaveIfError(icon->Load(*iAifFileName, mbmIndex, ETrue, iMbmOffset)); + User::LeaveIfError(mask->Load(*iAifFileName, mbmIndex + 1, ETrue, iMbmOffset)); + icon->SetMaskBitmap(mask); + CleanupStack::Pop(mask); + } + // + return icon; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CApaAppInfoFileReader::CreateMaskedBitmapL(TInt aIconSideInPixels) +// +// Use CreateMaskedBitmapByIndexLC. To access a bitmap by size use RApaLsSession APIs. +// +/** Creates a new masked bitmap based on the one in the aif file whose size is +closest to the size specified. + +If all bitmaps in the file are larger than the size specified, the new bitmap +is based on the smallest and is shrunk to the specified size. + +@deprecated +@param aIconSideInPixels The maximum width and height in pixels of the bitmap. +The new bitmap will be this size, or smaller. +@leave KErrNotFound There are no bitmaps in the file. +@return Pointer to the new bitmap. The caller takes ownership. */ + { + __ASSERT_DEBUG(iIconHeaderArray, Panic(EPanicNullPointer)); + const TInt count=iIconHeaderArray->Count(); + if (count==0) + User::Leave(KErrNotFound); + // + TInt closest=0; + TInt smallest=0; + TInt minSoFar=KMaxTInt; + TInt smallestSoFar=KMaxTInt; + TInt delta=0; + for (TInt i=0;iiIconSideInPixels; // Abs() + if (pIconHeader->iIconSideInPixelsiIconSideInPixels; + } + if (delta>=0 && deltaMask(),newIcon->Mask(),iconSize); + CleanupStack::Pop(newIcon); + CleanupStack::PopAndDestroy(icon); + return newIcon; + } + CleanupStack::Pop(icon); + return icon; + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileReader::Capability(TDes8& aInfo)const +/** Gets the capability information read from the aif file. + +@param aInfo A TApaAppCapabilityBuf object. On return, this contains the application's +capabilities. */ + { + TApaAppCapabilityBuf buf(iCapability); + TApaAppCapability::CopyCapability(aInfo,buf); + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileReader::DataTypesSupportedL(CArrayFix& aTypeList) const +/** Gets the MIME types supported by the application, and their priorities. + +@param aTypeList An empty array. On return, this contains the MIME type priorities +read from the aif file. MIME type priorities determine which application is +launched to display a particular document. +@panic APGRFX 29 The aTypeList array is not empty when calling the function. +Debug builds only. +@panic APGRFX 33 The internal array holding the MIME type information is uninitialised. +Debug builds only. */ + { + __ASSERT_DEBUG(aTypeList.Count()==0,Panic(EDPanicArrayNotEmpty)); + __ASSERT_DEBUG(iDataTypeHeaderArray,Panic(EDPanicInvalidDataTypeArray)); + TInt count=iDataTypeHeaderArray->Count(); + for (TInt i=0; i> dataType; + aTypeList.AppendL(TDataTypeWithPriority(dataType,header.iPriority)); + CleanupStack::PopAndDestroy(&inStream); + } + else + { + aTypeList.AppendL(TDataTypeWithPriority(*(header.iDataType), header.iPriority)); + } + } + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileReader::GetViewsL(CArrayPtr& aViewList) const +/** Gets the application view data contained in the aif file. + +The view data is an array of view UIDs and their associated captions and icons. + +@internalComponent +@param aViewList An empty array. On return, this contains the view data read +from the aif file. If the file does not contain any application view data, +this array will be empty on return. +@panic APGRFX 29 The aViewList array is not empty when calling the function. +Debug builds only. +@panic APGRFX 34 The internal array holding the view data is uninitialised. +Debug builds only. */ + { + __ASSERT_DEBUG(aViewList.Count()==0,Panic(EDPanicArrayNotEmpty)); + __ASSERT_DEBUG(iViewDataHeaderArray,Panic(EDPanicInvalidViewArray)); + TInt count=iViewDataHeaderArray->Count(); + for (TInt i=0; i> *viewData; + aViewList.AppendL(viewData); + CleanupStack::PopAndDestroy(&inStream); + CleanupStack::Pop(viewData); + } + else + { + // Load any icons for the view + // Have to create a copy here as the old AIF format (above) gives external ownership + // of CApaAIFViewData items in aViewList. + CApaAIFViewData* headerViewData = header.iViewData.AsPtr(); + CApaAIFViewData* viewData = CApaAIFViewData::NewLC(*headerViewData); + viewData->LoadIconsL(*iAifFileName, iMbmOffset); + aViewList.AppendL(viewData); + CleanupStack::Pop(viewData); + } + } + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileReader::GetOwnedFilesL(CDesCArray& aOwnedFilesList) const +/** Gets a list of the files that the application has claimed ownership of in the +aif file. + +@param aOwnedFilesList An empty array. On return, this contains the names +of the files identified as being owned by the application. +@panic APGRFX 29 The aOwnedFilesList array is not empty when calling the function. +Debug builds only. +@panic APGRFX 35 The internal array holding the owned files list is uninitialised. +Debug builds only. */ + { + __ASSERT_DEBUG(aOwnedFilesList.Count()==0,Panic(EDPanicArrayNotEmpty)); + __ASSERT_DEBUG(iFileOwnershipInfoHeaderArray,Panic(EDPanicInvalidFileOwnershipArray)); + const TInt count=iFileOwnershipInfoHeaderArray->Count(); + for (TInt ii=0; ii> fileName; + aOwnedFilesList.AppendL(fileName); + CleanupStack::PopAndDestroy(&inStream); + } + else + { + aOwnedFilesList.AppendL(*(header.iOwnedFileName)); + } + } + } + + +// +// Class CApaAppInfoFileWriter +// + +CApaAppInfoFileWriter::CApaAppInfoFileWriter(RFs& aFs) + :CApaAppInfoFile(aFs) + {} + +EXPORT_C CApaAppInfoFileWriter::~CApaAppInfoFileWriter() +// Must delete caption and icon pointers that have been set in AddCaptionL and AddIconL + { + if (iCaptionHeaderArray) + { + const TInt maxIndex=iCaptionHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TCaptionHeader& pCaption=(*iCaptionHeaderArray)[i]; + if (pCaption.iCaption.IsPtr()) + { + delete pCaption.iCaption.AsPtr(); + iCaptionHeaderArray->Delete(i); + } + } + } + if (iIconHeaderArray) + { + const TInt maxIndex=iIconHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TIconHeader& pIcon=(*iIconHeaderArray)[i]; + if (pIcon.iIcon.IsPtr()) + { + delete pIcon.iIcon.AsPtr(); + iIconHeaderArray->Delete(i); + } + } + } + if (iDataTypeHeaderArray) + { + const TInt maxIndex=iDataTypeHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TDataTypeHeader& pData=(*iDataTypeHeaderArray)[i]; + if (pData.iDataType.IsPtr()) + { + delete pData.iDataType.AsPtr(); + iDataTypeHeaderArray->Delete(i); + } + } + } + if (iViewDataHeaderArray) + { + const TInt maxIndex=iViewDataHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TViewDataHeader& pView=(*iViewDataHeaderArray)[i]; + if (pView.iViewData.IsPtr()) + { + delete pView.iViewData.AsPtr(); + iViewDataHeaderArray->Delete(i); + } + } + } + if (iFileOwnershipInfoHeaderArray) + { + const TInt maxIndex=iFileOwnershipInfoHeaderArray->Count() - 1; + for(TInt i=maxIndex; i>=0; i--) + { + const TFileOwnershipInfoHeader& pView=(*iFileOwnershipInfoHeaderArray)[i]; + if (pView.iOwnedFileName.IsPtr()) + { + delete pView.iOwnedFileName.AsPtr(); + iFileOwnershipInfoHeaderArray->Delete(i); + } + } + } + delete iMap; // Must delete before iStore + } + +// CApaResourceFileWriterBase::MDataSink + +void CApaResourceFileWriterBase::MDataSink::WriteBufferL(const TDesC8& aBuffer) + { + if (aBuffer.Length()>0) + { + if (iBufferSinkForCompressedUnicodeFormat!=NULL) + { + WriteInCompressedUnicodeFormatL(aBuffer.Length(), aBuffer, EFalse); + } + else + { + DoWriteBufferL(aBuffer); + iNumberOfBytesWhenUncompressed+=aBuffer.Length(); + } + } + } + +void CApaResourceFileWriterBase::MDataSink::WriteCompressedUnicodeRunL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aTextAsCompressedUnicode) + { + WriteInCompressedUnicodeFormatL(aNumberOfBytesWhenUncompressed, aTextAsCompressedUnicode, ETrue); + } + +void CApaResourceFileWriterBase::MDataSink::WriteInCompressedUnicodeFormatL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aData, TBool aCompressedUnicode) + { + __ASSERT_DEBUG(iBufferSinkForCompressedUnicodeFormat!=NULL, Panic(EPanicWrongResourceFormat1)); + const TInt dataLength=aData.Length(); + __ASSERT_DEBUG(((dataLength==0) && ((aNumberOfBytesWhenUncompressed==0) || (aNumberOfBytesWhenUncompressed==1))) || + ((dataLength>0) && (aNumberOfBytesWhenUncompressed>0)), Panic(EPanicBadCompressedUnicodeRun)); + if (dataLength>0) + { + if ((iNumberOfBytesWhenUncompressed==0) && (iBufferSinkForCompressedUnicodeFormat->iNumberOfBytesWhenUncompressed==0)) + { + if (aCompressedUnicode) + { + iFlags|=EFlag_InCompressedUnicodeRun; + } + else + { + iFlags&=~EFlag_InCompressedUnicodeRun; + } + } + else if ((iFlags&EFlag_InCompressedUnicodeRun)^(aCompressedUnicode? EFlag_InCompressedUnicodeRun: 0)) // if we're changing the state of the EFlag_InCompressedUnicodeRun flag + { + FlushL(EFalse); + iFlags^=EFlag_InCompressedUnicodeRun; // toggle the EFlag_InCompressedUnicodeRun flag + } + static_cast(iBufferSinkForCompressedUnicodeFormat)->DoWriteBufferL(aData); + } + iBufferSinkForCompressedUnicodeFormat->iNumberOfBytesWhenUncompressed+=aNumberOfBytesWhenUncompressed; + } + +TInt CApaResourceFileWriterBase::MDataSink::NumberOfBytesWhenUncompressed() const + { + TInt numberOfBytesWhenUncompressed=iNumberOfBytesWhenUncompressed; + if (iBufferSinkForCompressedUnicodeFormat!=NULL) + { + numberOfBytesWhenUncompressed+=iBufferSinkForCompressedUnicodeFormat->iNumberOfBytesWhenUncompressed; + } + return numberOfBytesWhenUncompressed; + } + +CApaResourceFileWriterBase::MDataSink::MDataSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat) + :iNumberOfBytesWhenUncompressed(0), + iFlags(0), + iBufferSinkForCompressedUnicodeFormat(aBufferSinkForCompressedUnicodeFormat) + { + } + +void CApaResourceFileWriterBase::MDataSink::FlushL(TBool aFinalFlush) + { + if (iBufferSinkForCompressedUnicodeFormat!=NULL) + { + RBuf8 run; + CleanupClosePushL(run); + TInt numberOfBytesInRunWhenUncompressed=0; + iBufferSinkForCompressedUnicodeFormat->FlushAndGetAndResetL(numberOfBytesInRunWhenUncompressed, run); + if (numberOfBytesInRunWhenUncompressed>0) + { + if ((iNumberOfBytesWhenUncompressed==0) && ((iFlags&EFlag_InCompressedUnicodeRun)==0)) + { + WriteRunLengthL(0); // insert initial zero-length run-length as we're not starting with compressed Unicode + } + __ASSERT_DEBUG(run.Length()>0, Panic(EPanicBadRunLength)); + WriteRunLengthL(run.Length()); + DoWriteBufferL(run); + iNumberOfBytesWhenUncompressed+=numberOfBytesInRunWhenUncompressed; + } + CleanupStack::PopAndDestroy(&run); + if (aFinalFlush && (iNumberOfBytesWhenUncompressed==0)) + { + WriteRunLengthL(0); // write a zero-length run-length as the resource is completely empty + } + } + } + +void CApaResourceFileWriterBase::MDataSink::Reset(TInt& aNumberOfBytesWhenUncompressed) + { + aNumberOfBytesWhenUncompressed=iNumberOfBytesWhenUncompressed; + iNumberOfBytesWhenUncompressed=0; + iFlags=0; + } + +void CApaResourceFileWriterBase::MDataSink::WriteRunLengthL(TInt aRunLength) + { + __ASSERT_DEBUG((aRunLength&~0x7fff)==0, Panic(EPanicBadRunLengthParameter)); + __ASSERT_DEBUG(CompressedUnicodeFormat(), Panic(EPanicWrongResourceFormat2)); + TBuf8<2> buffer; + if (aRunLength&~0x7f) + { + buffer.Append((aRunLength>>8)|0x80); + } + buffer.Append(aRunLength&0xff); + DoWriteBufferL(buffer); // must call DoWriteBufferL here (not WriteBufferL) so that iNumberOfBytesWhenUncompressed is not altered + } + +// CApaResourceFileWriterBase::RBufferSink + +CApaResourceFileWriterBase::RBufferSink::RBufferSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat) + :MDataSink(aBufferSinkForCompressedUnicodeFormat) + { + } + +void CApaResourceFileWriterBase::RBufferSink::ConstructLC() + { + iBuffer.CreateL(20); + CleanupClosePushL(*this); + } + +void CApaResourceFileWriterBase::RBufferSink::Close() + { + iBuffer.Close(); + } + +void CApaResourceFileWriterBase::RBufferSink::FlushAndGetAndResetL(TInt& aNumberOfBytesWhenUncompressed, RBuf8& aBuffer) + { + FlushL(ETrue); + iBuffer.Swap(aBuffer); + Reset(aNumberOfBytesWhenUncompressed); + } + +void CApaResourceFileWriterBase::RBufferSink::DoWriteBufferL(const TDesC8& aBuffer) + { + if (iBuffer.MaxLength()-iBuffer.Length()=mainResourceInFormatNotContainingCompressedUnicode.Length()) + { + mainResourceInCompressedUnicodeFormat=EFalse; + mainResourceInSmallestFormat.Set(mainResourceInFormatNotContainingCompressedUnicode); + } + TBool secondResourceInCompressedUnicodeFormat=EFalse; + const TDesC8* const secondResource=SecondResourceL(secondResourceInCompressedUnicodeFormat); + RBufferSink bufferSink(NULL); + bufferSink.ConstructLC(); + + WriteUidTypeL(bufferSink, aUid2, aUid3); + WriteUint8L(bufferSink, 0); // flags + WriteLittleEndianUint16L(bufferSink, (secondResource==NULL)? mainResourceSizeInBytesWhenUncompressed: Max(mainResourceSizeInBytesWhenUncompressed, secondResource->Length())); // the size in bytes of the largest resource in the file when uncompressed + TUint bitArray=0; // bit-array (one per top-level resource) indicating whether each top-level resource contains compressed unicode or not + if (mainResourceInCompressedUnicodeFormat) + { + bitArray|=0x01; + } + if (secondResourceInCompressedUnicodeFormat) + { + bitArray|=0x02; + } + WriteUint8L(bufferSink, bitArray); + WriteBufferL(bufferSink, mainResourceInSmallestFormat); + if (secondResource!=NULL) + { + WriteBufferL(bufferSink, *secondResource); + } + TInt filePosition=16+1+2+1; + WriteLittleEndianUint16L(bufferSink, filePosition); + filePosition+=mainResourceInSmallestFormat.Length(); + WriteLittleEndianUint16L(bufferSink, filePosition); + if (secondResource!=NULL) + { + filePosition+=secondResource->Length(); + WriteLittleEndianUint16L(bufferSink, filePosition); + } + TInt notUsed; + bufferSink.FlushAndGetAndResetL(notUsed, aBuffer); + + CleanupStack::PopAndDestroy(3, &mainResourceInFormatContainingCompressedUnicode); + } + +void CApaResourceFileWriterBase::WriteUidTypeL(MDataSink& aDataSink, TUid aUid2, TUid aUid3) const + { + aDataSink.WriteBufferL(TCheckedUid(TUidType(TUid::Uid(0x101f4a6b), aUid2, aUid3)).Des()); + } + +void CApaResourceFileWriterBase::WriteTextL(MDataSink& aDataSink, const TDesC& aText) const + { + // LTEXT + + WriteUint8L(aDataSink, aText.Length()); + if (!aDataSink.CompressedUnicodeFormat()) + { + if ((aDataSink.NumberOfBytesWhenUncompressed()%2)!=0) + { + WriteUint8L(aDataSink, 0xab); + } + const TInt lengthOfTextInBytes=aText.Size(); + WriteBufferL(aDataSink, TPtrC8(reinterpret_cast(aText.Ptr()), lengthOfTextInBytes)); + } + else + { + TInt numberOfBytesWhenUncompressed=aText.Size(); + if ((aDataSink.NumberOfBytesWhenUncompressed()%2)!=0) + { + ++numberOfBytesWhenUncompressed; // for the padding-byte 0xab when it's uncompressed + } + HBufC8* const textAsCompressedUnicode=AsCompressedUnicodeLC(aText); + aDataSink.WriteCompressedUnicodeRunL(numberOfBytesWhenUncompressed, *textAsCompressedUnicode); + CleanupStack::PopAndDestroy(textAsCompressedUnicode); + } + } + +void CApaResourceFileWriterBase::WriteText8L(MDataSink& aDataSink, const TDesC8& aText8) const + { + // LTEXT8 + + WriteUint8L(aDataSink, aText8.Length()); + WriteBufferL(aDataSink, aText8); + } + +void CApaResourceFileWriterBase::WriteUint8L(MDataSink& aDataSink, TUint aUint8) const + { + TBuf8<1> buffer; + buffer.Append(aUint8&0xff); + aDataSink.WriteBufferL(buffer); + } + +void CApaResourceFileWriterBase::WriteLittleEndianUint16L(MDataSink& aDataSink, TUint aUint16) const + { + TBuf8<2> buffer; + buffer.Append(aUint16&0xff); + buffer.Append((aUint16>>8)&0xff); + aDataSink.WriteBufferL(buffer); + } + +void CApaResourceFileWriterBase::WriteLittleEndianUint32L(MDataSink& aDataSink, TUint aUint32) const + { + TBuf8<4> buffer; + buffer.Append(aUint32&0xff); + buffer.Append((aUint32>>8)&0xff); + buffer.Append((aUint32>>16)&0xff); + buffer.Append((aUint32>>24)&0xff); + aDataSink.WriteBufferL(buffer); + } + +void CApaResourceFileWriterBase::WriteBufferL(MDataSink& aDataSink, const TDesC8& aBuffer) const + { + aDataSink.WriteBufferL(aBuffer); + } + +HBufC8* CApaResourceFileWriterBase::AsCompressedUnicodeLC(const TDesC& aUncompressedUnicode) + { + TUnicodeCompressor unicodeCompressor; + TMemoryUnicodeSource decompressedUnicode1(aUncompressedUnicode.Ptr()); + TMemoryUnicodeSource decompressedUnicode2(aUncompressedUnicode.Ptr()); + + // Create a buffer big enough to hold all the compressed output + TInt compressedUnicodeSizeInBytes = TUnicodeCompressor::CompressedSizeL(decompressedUnicode1, aUncompressedUnicode.Length()); + HBufC8* const compressedUnicodeBuffer=HBufC8::NewLC(compressedUnicodeSizeInBytes); + TUint8* const compressedUnicodeBuffer_asBytePointer=const_cast(compressedUnicodeBuffer->Ptr()); + + // Compress the Unicode string + TInt numberOfInputElementsConsumed = 0; + TInt numberOfOutputBytes = 0; + unicodeCompressor.CompressL(compressedUnicodeBuffer_asBytePointer, decompressedUnicode2, compressedUnicodeSizeInBytes, aUncompressedUnicode.Length(), &numberOfOutputBytes, &numberOfInputElementsConsumed); + TInt temp = 0; + unicodeCompressor.FlushL(compressedUnicodeBuffer_asBytePointer, compressedUnicodeSizeInBytes, temp); + numberOfOutputBytes+=temp; + TPtr8 compressedUnicodeBuffer_asWritable(compressedUnicodeBuffer->Des()); + compressedUnicodeBuffer_asWritable.SetLength(numberOfOutputBytes); + return compressedUnicodeBuffer; + } + +void CApaResourceFileWriterBase::MainResourceInCompiledFormatLC(TInt& aMainResourceSizeInBytesWhenUncompressed, RBuf8& aBuffer, TBool aCompressedUnicodeFormat) const + { + CleanupClosePushL(aBuffer); + RBufferSink bufferSinkForCompressedUnicodeFormat(NULL); + if (aCompressedUnicodeFormat) + { + bufferSinkForCompressedUnicodeFormat.ConstructLC(); + } + RBufferSink bufferSink(aCompressedUnicodeFormat? &bufferSinkForCompressedUnicodeFormat: NULL); + bufferSink.ConstructLC(); + MainResourceInCompiledFormatL(bufferSink); + bufferSink.FlushAndGetAndResetL(aMainResourceSizeInBytesWhenUncompressed, aBuffer); + CleanupStack::PopAndDestroy(&bufferSink); + if (aCompressedUnicodeFormat) + { + CleanupStack::PopAndDestroy(&bufferSinkForCompressedUnicodeFormat); + } + } + +// CApaRegistrationResourceFileWriter + +/** +Creates a new CApaRegistrationResourceFileWriter instance. + +@param aAppUid The UID of the application. +@param aAppFile The name and extension of the file to generate. +@param aAttributes The attributes of the application. See the TApaAppCapability class for more details. +@return A pointer to the new CApaRegistrationResourceFileWriter instance. + +@publishedPartner +@released +*/ +EXPORT_C CApaRegistrationResourceFileWriter* CApaRegistrationResourceFileWriter::NewL(TUid aAppUid, const TDesC& aAppFile, TUint aAttributes) +// aAppFile does not need to have the drive set + { // static + CApaRegistrationResourceFileWriter* const self=new(ELeave) CApaRegistrationResourceFileWriter(aAppUid, aAttributes); + CleanupStack::PushL(self); + self->ConstructL(aAppFile); + CleanupStack::Pop(self); + return self; + } + +/** +The destructor for the CApaRegistrationResourceFileWriter class. + +@publishedPartner +@released +*/ +EXPORT_C CApaRegistrationResourceFileWriter::~CApaRegistrationResourceFileWriter() + { + delete iAppFile; + delete iLocalisableResourceFile; + delete iGroupName; + delete iOpaqueData; + + TInt i; + for (i=iDataTypeList.Count()-1; i>=0; --i) + { + delete iDataTypeList[i].iType; + } + iDataTypeList.Close(); + + for (i=iFileOwnershipList.Count()-1; i>=0; --i) + { + delete iFileOwnershipList[i].iFileName; + } + iFileOwnershipList.Close(); + } + +TUid CApaRegistrationResourceFileWriter::AppUid() const +/** @internalComponent */ + { + return iAppUid; + } + +void CApaRegistrationResourceFileWriter::GenerateFileContentsL(RBuf8& aBuffer) const +/** @internalComponent */ + { + DoGenerateFileContentsL(aBuffer, KUidAppRegistrationFile, iAppUid); + } + +void CApaRegistrationResourceFileWriter::SetLocalisableResourceFileL(const TDesC& aLocalisableResourceFile) +/** @internalComponent */ + { + HBufC* const localisableResourceFile=aLocalisableResourceFile.AllocL(); + delete iLocalisableResourceFile; + iLocalisableResourceFile=localisableResourceFile; + } + +/** +Sets or clears the hidden attribute. The usual purpose of the hidden attribute is to +decide if the application should appear in the task list or not but this could vary between +products. + +@param aAppIsHidden The value of the hidden flag. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetAppIsHiddenL(TBool aAppIsHidden) + { + iAppIsHidden=aAppIsHidden? 1: 0; + } + +/** +Sets the embeddability attribute. See the TApaAppCapability::TEmbeddability class for more details. + +@param aEmbeddability The value of the embeddability flags. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetEmbeddabilityL(TApaAppCapability::TEmbeddability aEmbeddability) + { + iEmbeddability=aEmbeddability; + } + +/** +Specifies if the application supports the creation of a new file or not. + +@param aSupportsNewFile ETrue to specify that the application supports the creation of a new file. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetSupportsNewFileL(TBool aSupportsNewFile) + { + iSupportsNewFile=aSupportsNewFile? 1: 0; + } + +/** +Specifies if the application must be launched in the background. + +@param aLaunchInBackground ETrue if the application must be launched in the background, EFalse otherwise. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetLaunchInBackgroundL(TBool aLaunchInBackground) + { + iLaunchInBackground=aLaunchInBackground; + } + +/** +Sets the name of the application group. + +@param aGroupName The name of the application group. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetGroupNameL(const TDesC& aGroupName) + { + HBufC* const groupName=aGroupName.AllocL(); + delete iGroupName; + iGroupName=groupName; + } + +/** +Sets the default screen number. This can be used to specify the preferred screen on devices +that support more than one screen. + +@param aDefaultScreenNumber The name of the default screen. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetDefaultScreenNumberL(TInt aDefaultScreenNumber) + { + iDefaultScreenNumber=aDefaultScreenNumber; + } + +/** +Sets the opaque data. The opaque data is some data that is specific to the type of application. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::SetOpaqueDataL(const TDesC8& aOpaqueData) + { + HBufC8* const opaqueData=aOpaqueData.AllocL(); + delete iOpaqueData; + iOpaqueData=opaqueData; + } + +/** +Adds a datatype to the list of datatypes that the application can handle. + +@param aPriority The priority. +@param aType The datatype. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::AddDataTypeL(TInt aPriority, const TDesC8& aType) + { + SDataType dataType; + dataType.iPriority=aPriority; + dataType.iType=aType.AllocLC(); + iDataTypeList.AppendL(dataType); + CleanupStack::Pop(dataType.iType); + } + +/** +Adds a file to the list of files owned by the CApaRegistrationResourceFileWriter instances. These files +are deleted if an error occurs whil registering the new applications. + +@param aFileName The name of the file. + +@publishedPartner +@released +*/ +EXPORT_C void CApaRegistrationResourceFileWriter::AddFileOwnershipInfoL(const TDesC& aFileName) + { + SFileOwnershipInfo fileOwnershipInfo; + fileOwnershipInfo.iFileName=aFileName.AllocLC(); + iFileOwnershipList.AppendL(fileOwnershipInfo); + CleanupStack::Pop(fileOwnershipInfo.iFileName); + } + +CApaRegistrationResourceFileWriter::CApaRegistrationResourceFileWriter(TUid aAppUid, TUint aAttributes) + :iAppUid(aAppUid), + iAppFile(NULL), + iAttributes(aAttributes), + iLocalisableResourceFile(NULL), + iAppIsHidden(0), + iEmbeddability(TApaAppCapability::ENotEmbeddable), + iSupportsNewFile(0), + iLaunchInBackground(0), + iGroupName(NULL), + iDefaultScreenNumber(0), + iOpaqueData(NULL) + { + } + +void CApaRegistrationResourceFileWriter::ConstructL(const TDesC& aAppFile) + { + iAppFile=aAppFile.AllocL(); + iLocalisableResourceFile=NULL; + } + +void CApaRegistrationResourceFileWriter::WriteDataTypeL(MDataSink& aDataSink, const SDataType& aDataType) const + { + // DATATYPE + + // LONG priority + WriteLittleEndianUint32L(aDataSink, aDataType.iPriority); + + // LTEXT8 type(KMaxDataTypeLength) + WriteText8L(aDataSink, *aDataType.iType); + } + +void CApaRegistrationResourceFileWriter::WriteFileOwnershipInfoL(MDataSink& aDataSink, const SFileOwnershipInfo& aFileOwnershipInfo) const + { + // FILE_OWNERSHIP_INFO + + // LTEXT file_name(KMaxFileNameLength) + WriteTextL(aDataSink, *aFileOwnershipInfo.iFileName); + } + +void CApaRegistrationResourceFileWriter::MainResourceInCompiledFormatL(MDataSink& aDataSink) const + { + // APP_REGISTRATION_INFO + + // LONG reserved_long = 0 + WriteLittleEndianUint32L(aDataSink, 0); + + // LLINK reserved_llink = 0 + WriteLittleEndianUint32L(aDataSink, 0); + __ASSERT_DEBUG(iAppFile, Panic(EPanicNullPointer)); + // LTEXT app_file(KMaxFileNameLength) = "" + WriteTextL(aDataSink, *iAppFile); + + // LONG attributes = 0 + WriteLittleEndianUint32L(aDataSink, iAttributes); + + // LTEXT localisable_resource_file(KMaxFileNameLength) = "" + TPtrC localisableResourceFile(KNullDesC); + if (iLocalisableResourceFile!=NULL) + { + localisableResourceFile.Set(*iLocalisableResourceFile); + } + WriteTextL(aDataSink, localisableResourceFile); + + // LONG localisable_resource_id = 1 + WriteLittleEndianUint32L(aDataSink, 1); + + // BYTE hidden = KAppNotHidden + WriteUint8L(aDataSink, iAppIsHidden); + + // BYTE embeddability = KAppNotEmbeddable + WriteUint8L(aDataSink, iEmbeddability); + + // BYTE newfile = KAppDoesNotSupportNewFile + WriteUint8L(aDataSink, iSupportsNewFile); + + // BYTE launch = KAppLaunchInForeground + WriteUint8L(aDataSink, iLaunchInBackground); + + // LTEXT group_name(KAppMaxGroupName) = "" + TPtrC groupName(KNullDesC); + if (iGroupName!=NULL) + { + groupName.Set(*iGroupName); + } + WriteTextL(aDataSink, groupName); + + // BYTE default_screen_number = 0 + WriteUint8L(aDataSink, iDefaultScreenNumber); + + // LEN WORD STRUCT datatype_list[] + TInt i; + const TInt numberOfDataTypes=iDataTypeList.Count(); + WriteLittleEndianUint16L(aDataSink, numberOfDataTypes); + for (i=0; iConstructL(aShortCaption, aCaption, aGroupName); + CleanupStack::Pop(self); + return self; + } + +EXPORT_C CApaLocalisableResourceFileWriter::~CApaLocalisableResourceFileWriter() + { + delete iShortCaption; + delete iCaptionAndIcon.iCaption; + delete iCaptionAndIcon.iIconFile; + delete iGroupName; + } + +void CApaLocalisableResourceFileWriter::GenerateFileContentsL(RBuf8& aBuffer) const +/** @internalComponent */ + { + DoGenerateFileContentsL(aBuffer, TUid::Null(), TUid::Null()); + } + +void CApaLocalisableResourceFileWriter::SetIconFileL(const TDesC& aIconFile) +/** @internalComponent */ + { + HBufC* const iconFile=aIconFile.AllocL(); + delete iCaptionAndIcon.iIconFile; + iCaptionAndIcon.iIconFile=iconFile; + } + +CApaLocalisableResourceFileWriter::CApaLocalisableResourceFileWriter(TInt aNumberOfIcons) + :iShortCaption(NULL), + iGroupName(NULL) + { + iCaptionAndIcon.iCaption=NULL; + iCaptionAndIcon.iNumberOfIcons=aNumberOfIcons; + iCaptionAndIcon.iIconFile=NULL; + } + +void CApaLocalisableResourceFileWriter::ConstructL(const TDesC& aShortCaption, const TDesC& aCaption, const TDesC& aGroupName) + { + iShortCaption=aShortCaption.AllocL(); + iCaptionAndIcon.iCaption=aCaption.AllocL(); + iCaptionAndIcon.iIconFile=NULL; + iGroupName=aGroupName.AllocL(); + } + +void CApaLocalisableResourceFileWriter::WriteCaptionAndIconInfoL(MDataSink& aDataSink, const SCaptionAndIconInfo& aCaptionAndIcon) const + { + // CAPTION_AND_ICON_INFO + + // LONG reserved_long = 0 + WriteLittleEndianUint32L(aDataSink, 0); + + // LLINK reserved_llink = 0 + WriteLittleEndianUint32L(aDataSink, 0); + + // LTEXT caption(KMaxCaption) = "" + WriteTextL(aDataSink, *aCaptionAndIcon.iCaption); + + // WORD number_of_icons = 0 + WriteLittleEndianUint16L(aDataSink, aCaptionAndIcon.iNumberOfIcons); + + // LTEXT icon_file(KMaxFileNameLength) = "" + TPtrC iconFile(KNullDesC); + if (aCaptionAndIcon.iIconFile!=NULL) + { + iconFile.Set(*aCaptionAndIcon.iIconFile); + } + WriteTextL(aDataSink, iconFile); + } + +void CApaLocalisableResourceFileWriter::MainResourceInCompiledFormatL(MDataSink& aDataSink) const + { + // LOCALISABLE_APP_INFO + + // LONG reserved_long = 0 + WriteLittleEndianUint32L(aDataSink, 0); + + // LLINK reserved_llink = 0 + WriteLittleEndianUint32L(aDataSink, 0); + __ASSERT_DEBUG(iShortCaption, Panic(EPanicNullPointer)); + // LTEXT short_caption(KMaxCaption) = "" + WriteTextL(aDataSink, *iShortCaption); + + // STRUCT caption_and_icon + WriteCaptionAndIconInfoL(aDataSink, iCaptionAndIcon); + + // LEN WORD STRUCT view_list[] + WriteLittleEndianUint16L(aDataSink, 0); + __ASSERT_DEBUG(iGroupName, Panic(EPanicNullPointer)); + // LTEXT group_name(KAppMaxGroupName) = "" + WriteTextL(aDataSink, *iGroupName); + } + +const TDesC8* CApaLocalisableResourceFileWriter::SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const + { + aSecondResourceInCompressedUnicodeFormat=EFalse; + return NULL; + } + +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + +// ForJavaMIDletInstaller + +EXPORT_C void ForJavaMIDletInstaller::CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile) + { // static + RFile temporaryDuplicateOfFile; // this is needed as CFileStore::FromLC takes ownership of the file that it's passed, and closes the RFile object passed in - we still want to use it, so we'll create this temporary duplicate RFile object (it also handily means we don't have to rewind the RFile to the start when we copy it below) + User::LeaveIfError(temporaryDuplicateOfFile.Duplicate(aInterimFormatFile)); + CFileStore* const fileStore=CFileStore::FromLC(temporaryDuplicateOfFile); // CFileStore::FromLC takes *immediate* ownership of the file it's passed (i.e. before doing anything that can leave) + if (fileStore->Type()[1]!=KUidInterimFormatFileForJavaMIDletInstaller) + { + User::Leave(KErrCorrupt); + } + RStoreReadStream rootStream; + rootStream.OpenLC(*fileStore,fileStore->Root()); + RFs unconnectedFs; // should not actually be used, so we don't need to use a real, connected RFs + CApaAppInfoFileReader* const appInfoFileReader=new(ELeave) CApaAppInfoFileReader(unconnectedFs); + CleanupStack::PushL(appInfoFileReader); + appInfoFileReader->CApaAppInfoFile::ConstructL(); + appInfoFileReader->InternalizeL(rootStream); // will leave if the file is corrupt/badly formed + CleanupStack::PopAndDestroy(3, fileStore); + } + +EXPORT_C void ForJavaMIDletInstaller::GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet) + { // static + CApaAppInfoFileReader* const appInfoFileReader=CApaAppInfoFileReader::NewLC(aFs, aFileName); + aJavaMIDletInfo_AmsAuthId=appInfoFileReader->iJavaMIDletInfo_AmsAuthId; + aJavaMIDletInfo_MIDlet=appInfoFileReader->iJavaMIDletInfo_MIDlet; + CleanupStack::PopAndDestroy(appInfoFileReader); + } + +EXPORT_C CApaAppInfoFileWriter* ForJavaMIDletInstaller::NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet) + { // static + CApaAppInfoFileWriter* self=new(ELeave) CApaAppInfoFileWriter(aFs); + CleanupStack::PushL(self); + self->ConstructL(aFileName,aApplicationUid,KUidInterimFormatFileForJavaMIDletInstaller,aJavaMIDletInfo_AmsAuthId,aJavaMIDletInfo_MIDlet); + return self; + } + +#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaAppInfoFileWriter* CApaAppInfoFileWriter::NewLC(RFs& aFs, const TDesC& aFileName,TUid aUid) +/** Allocates and constructs an aif file writer. It leaves if the path of the +specified aif file does not exist. + +@param aFs Connected session with the file server. +@param aFileName The full path and (language-neutral) filename of the aif file. +@param aUid The application's third (most derived) UID. +@return Pointer to the newly constructed and initialised aif file writer. +The object is left on the cleanup stack. */ + { + CApaAppInfoFileWriter* self=new(ELeave) CApaAppInfoFileWriter(aFs); + CleanupStack::PushL(self); + self->ConstructL(aFileName,aUid); + return self; + } + +void CApaAppInfoFileWriter::ConstructL(const TDesC& aFileName,TUid aUid +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + ,TUid aMiddleUid/*=KUidAppInfoFile*/,TUint32 aJavaMIDletInfo_AmsAuthId/*=0*/,TInt aJavaMIDletInfo_MIDlet/*=0*/ +#endif + ) + { + __DECLARE_NAME(_S("CApaAppInfoFileWriter")); + CApaAppInfoFile::ConstructL(); + TInt ret=iFs.MkDirAll(aFileName); + if (ret!=KErrAlreadyExists) + User::LeaveIfError(ret); + CFileStore* store=CDirectFileStore::ReplaceL(iFs,aFileName,EFileRead|EFileWrite); + iStore = store; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + iJavaMIDletInfo_AmsAuthId=aJavaMIDletInfo_AmsAuthId; + iJavaMIDletInfo_MIDlet=aJavaMIDletInfo_MIDlet; +#else + const TUid aMiddleUid=KUidAppInfoFile; +#endif + store->SetTypeL(TUidType(KDirectFileStoreLayoutUid,aMiddleUid,aUid)); + iMap=CStoreMap::NewL(*store); // Ready for Storing components + } + +void CApaAppInfoFileWriter::ExternalizeL(RWriteStream& aStream) const + { + __ASSERT_DEBUG(iCaptionHeaderArray, Panic(EPanicNullPointer)); + aStream<< *iCaptionHeaderArray; + aStream<< *iIconHeaderArray; + aStream<< iCapability; + aStream.WriteInt32L( +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + EAifVersionAddsJavaMIDletInfo +#else + EAifVersionAddsFileOwnershipInfo +#endif + ); + aStream<< *iDataTypeHeaderArray; + aStream<< *iViewDataHeaderArray; + aStream << *iFileOwnershipInfoHeaderArray; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + aStream.WriteUint32L(iJavaMIDletInfo_AmsAuthId); + aStream.WriteInt32L(iJavaMIDletInfo_MIDlet); +#endif + } + +EXPORT_C void CApaAppInfoFileWriter::StoreL() + { + __ASSERT_DEBUG(iMap, Panic(EPanicNullPointer)); + __ASSERT_DEBUG(iStore, Panic(EPanicNullPointer)); + RStoreWriteStream outStream(*iMap); + TStreamId id=outStream.CreateLC(*iStore); + ExternalizeL(outStream); + outStream.CommitL(); + CleanupStack::PopAndDestroy(&outStream); + iMap->Reset(); + iStore->SetRootL(id); + iStore->CommitL(); + } + +EXPORT_C void CApaAppInfoFileWriter::AddCaptionL(TLanguage aLanguage,const TDesC& aCaption) +/** Appends a caption in the specified language to the aif file. + +@param aLanguage The language of the specified caption. +@param aCaption The new caption. +@leave KErrBadName The caption's name is longer than KApaMaxAppCaption characters. */ + +// Write caption out to a new stream and add to iCaptionHeaderArray + { + if (aCaption.Length()>KApaMaxAppCaption) + User::Leave(KErrBadName); + TCaptionHeader captionHeader; + captionHeader.iLanguage=aLanguage; + captionHeader.iCaption=aCaption.AllocL(); + CleanupStack::PushL(captionHeader.iCaption.AsPtr()); + RStoreWriteStream outStream; + __ASSERT_DEBUG(iStore, Panic(EPanicNullPointer)); + TStreamId id=outStream.CreateLC(*iStore); + outStream << *captionHeader.iCaption; + outStream.CommitL(); + CleanupStack::PopAndDestroy(&outStream); + iMap->BindL(captionHeader.iCaption,id); + iCaptionHeaderArray->AppendL(captionHeader); + CleanupStack::Pop(captionHeader.iCaption); + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::AddIconL(const TDesC& aIconFileName) +/** Loads the icon's bitmap and mask from the specified mbm file +and writes the icon to the aif file. Takes ownership of the icon. + +@param aIconFileName Full path and filename of the icon file (with a .mbm +extension) containing the icon bitmap at identifier 0 and its mask at 1. */ + +// Icon file must contain 2 bitmaps: icon and mask, and they are assumed to be the same size. + { + CApaMaskedBitmap* icon=CApaMaskedBitmap::NewLC(); + User::LeaveIfError(icon->Load(aIconFileName,0)); + User::LeaveIfError((icon->Mask())->Load(aIconFileName,1)); + CleanupStack::Pop(icon); + AddIconL(*icon); + } + +EXPORT_C void CApaAppInfoFileWriter::AddIconL(CApaMaskedBitmap& aIcon) +/** Writes the specified pre-loaded icon to the aif file, and takes ownership of it. + +@param aIcon The new icon. */ + +// Guaranteed to take ownership of the aIcon +// Will delete aIcon if it leaves + { + CleanupStack::PushL(&aIcon); + TIconHeader iconHeader; + iconHeader.iIcon = &aIcon; + iconHeader.iIconSideInPixels = aIcon.SizeInPixels().iWidth; + RStoreWriteStream outStream; + __ASSERT_DEBUG(iStore, Panic(EPanicNullPointer)); + TStreamId id=outStream.CreateLC(*iStore); + outStream << *iconHeader.iIcon; + outStream.CommitL(); + CleanupStack::PopAndDestroy(&outStream); + iMap->BindL(iconHeader.iIcon,id); + iIconHeaderArray->AppendL(iconHeader); + CleanupStack::Pop(&aIcon); + } + +EXPORT_C TInt CApaAppInfoFileWriter::SetCapability(const TDesC8& aInfo) +/** Sets the application's capability information. Note that the +information is not written to the aif file until StoreL() is called. +@param aInfo A TApaAppCapabilityBuf object. +@return KErrNone always. */ + { + // check that aInfo is of a permissable length + TApaAppCapabilityBuf buf; + TApaAppCapability::CopyCapability(buf,aInfo); + iCapability = buf(); + return KErrNone; + } + +EXPORT_C void CApaAppInfoFileWriter::AddDataTypeL(const TDataTypeWithPriority& aTypePriority) + { + __ASSERT_DEBUG(aTypePriority.iDataType.Des8().Length()>0,Panic(EDPanicBadDataType)); + __ASSERT_DEBUG(aTypePriority.iPriorityBindL(header.iDataType,id); + header.iPriority=aTypePriority.iPriority; + iDataTypeHeaderArray->AppendL(header); + CleanupStack::Pop(dataType); + } + +// +// Adds a view with id aViewId to the data to be stored in the AIF. Icons and captions can be added to the +// view before it is stored - view data is written to an inline store so all the information for the view must +// be added and then the call to store the data made. +// +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::AddViewL(TUid aViewId) +// Write view data out to a new stream and add to iViewDataHeaderArray + { + AddViewL(aViewId,0); + } + +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::AddViewL(TUid aViewId,TInt aScreenMode) + { + TViewDataHeader viewDataHeader; + CApaAIFViewData* viewData=CApaAIFViewData::NewLC(); + viewData->SetViewUid(aViewId); + viewData->SetScreenMode(aScreenMode); + viewDataHeader.iViewData=viewData; + __ASSERT_DEBUG(iViewDataHeaderArray, Panic(EPanicNullPointer)); + iViewDataHeaderArray->AppendL(viewDataHeader); + CleanupStack::Pop(viewData); + } + +// +// Stores the view data in the AIF, writing the store inline. +// +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::StoreViewL(TUid aViewId) + { + __ASSERT_DEBUG(iViewDataHeaderArray, Panic(EPanicNullPointer)); + const TInt count=iViewDataHeaderArray->Count(); + for (TInt ii=0;iiViewUid() == aViewId) + { + RStoreWriteStream outStream; + __ASSERT_DEBUG(iStore, Panic(EPanicNullPointer)); + TStreamId id=outStream.CreateLC(*iStore); + outStream << *pData.iViewData; + outStream.CommitL(); + CleanupStack::PopAndDestroy(&outStream); + iMap->BindL(pData.iViewData,id); + return; + } + } + } + +// +// Adds the icon aIcon to the view data with id aViewId which will later be stored in the AIF. +// +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewId) + { + CApaAIFViewData* viewData=NULL; + __ASSERT_DEBUG(iViewDataHeaderArray, Panic(EPanicNullPointer)); + const TInt count=iViewDataHeaderArray->Count(); + for (TInt ii=0;iiViewUid() == aViewId) + { + viewData=pData.iViewData.AsPtr(); + } + } + if (viewData) + viewData->AddIconL(aIcon); + } + +// +// Adds the caption aCaption in langauge aLanguage to the view data with id aViewId which will later be stored in the AIF. +// +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewId) + { + CApaAIFViewData* viewData=NULL; + const TInt count=iViewDataHeaderArray->Count(); + for (TInt ii=0;iiViewUid() == aViewId) + { + viewData=pData.iViewData.AsPtr(); + } + } + if (viewData) + viewData->AddCaptionL(aLanguage,aCaption); + } + +// +// Adds the name aOwnedFileName to the list of files described as being owned by this application to later be stored in the AIF. +// +EXPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void CApaAppInfoFileWriter::AddOwnedFileL(const TDesC& aOwnedFileName) + { + if (aOwnedFileName.Length()>KMaxFileName) + User::Leave(KErrBadName); + TFileOwnershipInfoHeader fileOwnershipInfoHeader; + fileOwnershipInfoHeader.iOwnedFileName=aOwnedFileName.AllocL(); + CleanupStack::PushL(fileOwnershipInfoHeader.iOwnedFileName.AsPtr()); + RStoreWriteStream outStream; + __ASSERT_DEBUG(iStore, Panic(EPanicNullPointer)); + TStreamId id=outStream.CreateLC(*iStore); + outStream << *fileOwnershipInfoHeader.iOwnedFileName; + outStream.CommitL(); + CleanupStack::PopAndDestroy(&outStream); + __ASSERT_DEBUG(iMap, Panic(EPanicNullPointer)); + iMap->BindL(fileOwnershipInfoHeader.iOwnedFileName,id); + __ASSERT_DEBUG(iFileOwnershipInfoHeaderArray, Panic(EPanicNullPointer)); + iFileOwnershipInfoHeaderArray->AppendL(fileOwnershipInfoHeader); + CleanupStack::Pop(fileOwnershipInfoHeader.iOwnedFileName); + } + +CApaAppCaptionFileReader::CApaAppCaptionFileReader(RFs& aFs,const TDesC& aAppFileName) +: iFs(aFs) + { + __ASSERT_DEBUG((aAppFileName.Length()+KApparcExtraLengthOfCaptionFileName +#include +#include "APGCLI.H" +#include "APGICNFL.H" +#include "APGSTD.H" + +#define KDefaultIconSizeInPixels TSize(96,96) + +CApaIconPicture* CApaIconPicture::NewL(const TSize& aIconSizeInTwips, const TUid aAppUid) + { + CApaIconPicture* self=new(ELeave) CApaIconPicture(aIconSizeInTwips, aAppUid); + CleanupStack::PushL(self); + self->ConstructL(); + self->CreateIconL(); + CleanupStack::Pop(self); + return self; + } + +CApaIconPicture::CApaIconPicture(const TSize& aIconSizeInTwips, const TUid aAppUid) + : iAppUid(aAppUid), + iOriginalSizeInTwips(aIconSizeInTwips), + iScaleFactorWidth(1000), + iScaleFactorHeight(1000) + { + __DECLARE_NAME(_S("CApaIconPicture")); + } + +void CApaIconPicture::ConstructL() + { + TMachineInfoV1Buf machineInfoBuf; + User::LeaveIfError( UserHal::MachineInfo(machineInfoBuf) ); + TMachineInfoV1& machineInfo=machineInfoBuf(); + iDisplaySizeInTwips = machineInfo.iPhysicalScreenSize; + iDisplaySizeInPixels = machineInfo.iDisplaySizeInPixels; + // + } + +CApaIconPicture::~CApaIconPicture() + { + delete iIcon; + } + + +void CApaIconPicture::CreateIconL() + { + // calculate the size of icon required in pixels + TSize sizeInPixels; + sizeInPixels.iWidth = (iOriginalSizeInTwips.iWidth*iDisplaySizeInPixels.iWidth*ScaleFactorWidth())/(iDisplaySizeInTwips.iWidth*1000); + sizeInPixels.iHeight = (iOriginalSizeInTwips.iHeight*iDisplaySizeInPixels.iHeight*ScaleFactorHeight())/(iDisplaySizeInTwips.iHeight*1000); + // if the required icon is not square get a large one and gdi will squash it during drawing + CApaMaskedBitmap* newIcon = CApaMaskedBitmap::NewLC(); + RApaLsSession ls; + CleanupClosePushL(ls); + User::LeaveIfError(ls.Connect()); + User::LeaveIfError(ls.GetAppIcon(iAppUid, sizeInPixels, *newIcon)); + delete iIcon; + iIcon = newIcon; + CleanupStack::PopAndDestroy(&ls); + CleanupStack::Pop(newIcon); + // + // set physical size + TSize iconSizeInTwips; + iconSizeInTwips.iWidth = (iOriginalSizeInTwips.iWidth*ScaleFactorWidth())/1000; + iconSizeInTwips.iHeight = (iOriginalSizeInTwips.iHeight*ScaleFactorHeight())/1000; + iIcon->SetSizeInTwips(iconSizeInTwips); + } + +void CApaIconPicture::Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect, + MGraphicsDeviceMap* aMap) const + { + __ASSERT_DEBUG(iIcon,Panic(EDPanicNoIconInPicture)); + // + TSize sizeInPixels(0,0); + sizeInPixels.iWidth = aMap->HorizontalTwipsToPixels(iOriginalSizeInTwips.iWidth); + sizeInPixels.iHeight = aMap->VerticalTwipsToPixels(iOriginalSizeInTwips.iHeight); + sizeInPixels.iWidth = (ScaleFactorWidth()*sizeInPixels.iWidth)/1000; + sizeInPixels.iHeight = (ScaleFactorHeight()*sizeInPixels.iHeight)/1000; + // + TRect originalRectInPixels(aTopLeft,sizeInPixels); + aGc.SetClippingRect(aClipRect); + aGc.DrawBitmap(originalRectInPixels,iIcon); + aGc.CancelClippingRect(); + } + + +void CApaIconPicture::InternalizeL(RReadStream& /*aStream*/) + {} //lint !e1762 Suppress member function could be made const + + + +void CApaIconPicture::ExternalizeL(RWriteStream& /*aStream*/)const + {} + + +void CApaIconPicture::GetOriginalSizeInTwips(TSize& aOriginalSize) const + { + aOriginalSize = iOriginalSizeInTwips; + } + + +void CApaIconPicture::SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight) + { + iScaleFactorWidth = aScaleFactorWidth; + iScaleFactorHeight = aScaleFactorHeight; + TRAP_IGNORE(CreateIconL()); // ignore any error, just keep using the current icon instead + } + + +TInt CApaIconPicture::ScaleFactorWidth() const + { + return iScaleFactorWidth; + } + + +TInt CApaIconPicture::ScaleFactorHeight() const + { + return iScaleFactorHeight; + } + + +TPictureCapability CApaIconPicture::Capability() const + { + return TPictureCapability(TPictureCapability::ENotScaleable,EFalse); // scalable, not cropable + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGPRIV.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGPRIV.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,87 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APAPRIV_H__ +#define __APAPRIV_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__S32MEM_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#include + +// classes referenced: +class CApaMaskedBitmap; +// + +class HBufBuf : public TBufBuf + { +public: + static HBufBuf* NewL(CBufBase& aBuf,TInt aPos,TInt aMode=ERead|EWrite); +private: + void DoRelease(); + }; + + +class CApaIconPicture : public CPicture + { +public: + static CApaIconPicture* NewL(const TSize& aIconSizeInTwips, const TUid aAppUid); + // + void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap)const; + TPictureCapability Capability() const; + TInt ScaleFactorWidth() const; + TInt ScaleFactorHeight() const; + void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + void GetOriginalSizeInTwips(TSize& aOriginalSize) const; + // + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream)const; + ~CApaIconPicture(); +private: + CApaIconPicture(const TSize& aIconSizeInTwips, const TUid aAppUid); + void ConstructL(); + void CreateIconL(); +private: + CApaMaskedBitmap* iIcon; // null unless the current format is EIcon + TUid iAppUid; + TSize iOriginalSizeInTwips; + TInt iScaleFactorWidth; // Stored as percent * 10 + TInt iScaleFactorHeight; // Stored as percent * 10 + TSize iDisplaySizeInPixels; + TSize iDisplaySizeInTwips; + }; + +class CApaAppServiceInfoArrayWrapper : public CApaAppServiceInfoArray + { +public: + static CApaAppServiceInfoArrayWrapper* NewL(CArrayFix* aServiceInfoArray); + ~CApaAppServiceInfoArrayWrapper(); + TArray Array(); +private: + CApaAppServiceInfoArrayWrapper(CArrayFix* aServiceInfoArray); +private: + CArrayFix* iServiceInfoArray; + }; + + + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGRFX.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGRFX.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,83 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// APGRFX.MMP for component APGRFX +// + +/** +@file + +@SYMPurpose apgrfx.dll Apparc server client APIs + wserv wrapper utilities +*/ + +target apgrfx.dll +CAPABILITY All -Tcb +targettype DLL +UID 0x1000008D 0x10003A3C +VENDORID 0x70000001 + +option MSVC /Od + +SOURCEPATH ../apgrfx + +userinclude ../inc +systeminclude /epoc32/include + +source APGCTL.CPP APGDOOR.CPP APGICNFL.CPP APGSTD.CPP APGTASK.CPP +source APGWGNAM.CPP APGCLI.CPP APGPRIV.CPP +source apgnotif.cpp APGAIR.CPP APGAIRV2.CPP APSCLI.CPP apgconstdata.cpp +SOURCE apsecutils.cpp + +#if defined SYMBIAN_APPARC_APPINFO_CACHE +source APGAPLSTV2.CPP +#else +source APGAPLST.CPP +#endif + +library euser.lib apparc.lib apmime.lib gdi.lib estor.lib efsrv.lib fbscli.lib +library bitgdi.lib ws32.lib bafl.lib +library apserv.lib apfile.lib + +#ifdef USE_IH_RAISE_EVENT +LIBRARY instrumentationhandler.lib +#endif // USE_IH_RAISE_EVENT + +#ifdef SYMBIAN_BAFL_SYSUTIL +library sysutil.lib +#endif + +macro SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1 + +#define UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER +macro UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + #if defined(SYMBIAN_APPARC_APPINFO_CACHE) + deffile APGRFX_UI_FRAMEWORKS.DEF + #else + deffile APGRFX_9_REMOVE_UI_FRAMEWORKS_V1_EXCEPT_REMNANT_FOR_JAVA_MIDLET_INSTALLER.DEF + #endif +#else +deffile APGRFX_9_REMOVE_UI_FRAMEWORKS_V1.DEF +#endif + +START WINS + baseaddress 0x42F00000 +END + +START MARM +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGSTD.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGSTD.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APGSTD.H" + + +GLDEF_C void Panic(TApgPanic aPanic) +// +// Panic the process with APPARC as the category. +// + { + _LIT(KApGrfxPanic,"APGRFX"); + User::Panic(KApGrfxPanic,aPanic); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGSTD.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGSTD.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,92 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__APGSTD_H__) +#define __APGSTD_H__ + +#if !defined(__E32STD_H__) +#include +#endif + + +enum TApgPanic + { + EPanicDefaultIcnFileDoesNotExist, + EIllegalCallToGlassDoorSize, + EPanicGetAppsNotInitialized, + EPanicNullWindowGroupName, + EPanicMethodNotSupported, + EPanicIconAlreadyExists, + EPanicDocAlreadyExists, + EPanicInvalidParameter, + EPanicNoDocumentOnConstruction, + EPanicNoDocOrStoreWhenStoring, + EPanicIndexOutOfRange, + EPanicNoDocumentOnStore, + EPanicNoAppDataSupplied, + EPanicNoStoreOnRestore, + EPanicNoStoreOnDetach, + EPanicNoStoreOnAppUid, + EPanicNoPictureInDoor, + EPanicNoGlassPicture, + EPanicNoStreamDic, + EPanicNoCaption, + // + EDPanicNoCaptionInControl, + EDPanicNoHostForStore, + EDPanicNoPictureOnDrawing, + EDPanicNoStoreOnGlassing, + EDPanicNoStoreOnIconify, + EDPanicNoIconInPicture, + EDPanicWrongCommand, + EDPanicNoProcess, + EDPanicBadList, + EDPanicArrayNotEmpty, + EDPanicBadDataType, + EDPanicBadIconSize, + EDPanicInvalidObserver, + EDPanicInvalidDataTypeArray, + EDPanicInvalidViewArray, + EDPanicInvalidFileOwnershipArray, + EDPanicInvalidHandle, + EPanicCaptionAlreadyExists, + EPanicShortCaptionAlreadyExists, + EFilenameTooLong, + EPanicNoAppName, + EPanicInconsistentResourceSizeInBytes, + EPanicBadUnicodeCompression1, + EPanicBadUnicodeCompression2, + EPanicWrongResourceFormat1, + EPanicWrongResourceFormat2, + EPanicBadCompressedUnicodeRun, + EPanicBadRunLengthParameter, + EPanicNullPointer, + EPanicIconFileWithoutLocalisableResourceFile, + EPanicUnexpectedUid, + EPanicBadRunLength, + EPanicUpdatedAppsListNotEmpty, // Unused + EPanicNullDefaultAppIconFileName, + EDPanicNoPicture, + EDPanicNoApplication, + EDPanicInvalidIconIndexArray, + EDPanicHandleAlreadySet + }; + + +GLREF_C void Panic(TApgPanic aPanic); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGTASK.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGTASK.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,514 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APGTASK.H" +#include "APGWGNAM.H" +#include + +// +// class TApatask +// + + + +EXPORT_C TApaTask::TApaTask(RWsSession& aWsSession) + : iWsSession(aWsSession), iWgId(0) +/** Constructs an empty task object, taking a reference to a window server session. + +An object of this type is constructed by an instance of the TApaTaskList class. + +The object represents a task when it is assigned a task's window group ID. + +@param aWsSession The window server session. +@see TApaTaskList */ + { + } + +EXPORT_C void TApaTask::SetWgId(TInt aWgId) +/** Sets this task's window group ID. + +@param aWgId The ID to be assigned. */ + { + iWgId=aWgId; + } + +EXPORT_C TInt TApaTask::WgId() const +/** Gets the ID of this task's window group. + +@return The window group ID. For an empty task object, this is zero. */ + { + return iWgId; + } + +EXPORT_C TBool TApaTask::Exists() const +/** Tests whether this TApaTask object is empty. This object represents the +state of the task at the time at which it was constructed and is not subsequently +updated. Therefore, this does not indicate that the task itself exists and should not +be used to test whether or not a particular task is running or not. + +@return True, if the task is not empty; false, otherwise. +@see TApaTaskList::FindDoc() +@see TApaTaskList::FindApp() +@see TApaTaskList::FindByPos() */ + { + return(iWgId>0); + } + +EXPORT_C TThreadId TApaTask::ThreadId() const +/** Gets the ID of this task's thread + +@return The thread ID. */ + { + TThreadId threadId; + if (iWsSession.GetWindowGroupClientThreadId(iWgId,threadId)==KErrNotFound) + { + threadId=TThreadId(KNullThreadId); + } + return(threadId); + } + +EXPORT_C void TApaTask::BringToForeground() +/** Brings this task to the foreground. + +If the task uses the View architecture, then the task's top view is activated. */ + { + iWsSession.SetWindowGroupOrdinalPosition(iWgId,0); + SendSystemEvent(EApaSystemEventBroughtToForeground); + } + +EXPORT_C void TApaTask::SendToBackground() +/** Sends this task to the background. + +The task whose window group is at the next ordinal position is brought up +to the foreground. In addition, the new foreground task's top view is activated, +if it uses the View architecture. */ + { + iWsSession.SetWindowGroupOrdinalPosition(iWgId,-1); + } + +EXPORT_C void TApaTask::EndTask() +/** Requests normal closing of this task. + +@capability PowerMgmt is required to close system tasks. */ + { + RProcess client; + if (client.HasCapability(ECapabilityPowerMgmt)) + { + SendSystemEvent(EApaSystemEventSecureShutdown, EEventPowerMgmt); + } + + // Always send the old shutdown message for backward compatibility. Will not shut down system tasks. + SendSystemEvent(EApaSystemEventShutdown); + } + +EXPORT_C void TApaTask::KillTask() +/** Kills this task. +@capability PowerMgmt +*/ + { + RThread thread; + TInt err=thread.Open(ThreadId()); + if (!err) + { + RProcess process; + thread.Process(process); + process.Terminate(0); + process.Close(); + thread.Close(); + } + } //lint !e1762 Suppress Member function 'TApaTask::KillTask(void)' could be made const + + +EXPORT_C TInt TApaTask::SwitchOpenFile(const TDesC& aFilename) +/** Requests the task to close its existing document, and to open an existing document. + +An application (task) may handle the request by overriding CEikAppUi::OpenFileL() if required. + +@param aFilename The name of the document to be opened. +@return KErrNone, if the request was successfully sent to the task; otherwise one of the other +system-wide error codes. */ + { + TInt err=CheckSwitchFile(); + if (!err) +#if defined(_UNICODE) + { + TPtrC8 messageBuffer((TUint8*) aFilename.Ptr(),aFilename.Length()<<1); + err=SendMessage(KUidApaMessageSwitchOpenFile,messageBuffer); + } +#else + err=SendMessage(KUidApaMessageSwitchOpenFile,aFilename); +#endif + return err; + } + +EXPORT_C TInt TApaTask::SwitchCreateFile(const TDesC& aFilename) +/** Requests the task to close its existing document, and to create and open a new +document. + +An application (task) may handle the request by overriding CEikAppUi::CreateFileL() if required. + +@param aFilename The name of the new document. +@return KErrNone, if the request was successfully sent to the task; otherwise one of the other +system-wide error codes. */ + { + TInt err=CheckSwitchFile(); + if (!err) +#if defined(_UNICODE) + { + TPtrC8 messageBuffer((TUint8*) aFilename.Ptr(),aFilename.Length()<<1); + err=SendMessage(KUidApaMessageSwitchCreateFile,messageBuffer); + } +#else + err=SendMessage(KUidApaMessageSwitchCreateFile,aFilename); +#endif + return err; + } + +TInt TApaTask::CheckSwitchFile() const + // + // private - checks whether the task will respond to a switch files event + // + { + HBufC* buf=HBufC::NewMax(CApaWindowGroupName::EMaxLength); + if (!buf) + return KErrNoMemory; + TInt err=KErrNone; + TPtr des=buf->Des(); + err=iWsSession.GetWindowGroupNameFromIdentifier(iWgId, des); + if (!err) + { + CApaWindowGroupName* wgName=CApaWindowGroupName::New(iWsSession, buf); // takes ownership (if it succeeds) + if (!wgName) + { + delete buf; + return KErrNoMemory; + } + if (wgName->IsBusy()) + err=KErrNotReady; + if (!(wgName->RespondsToSwitchFilesEvent())) + err=KErrNotSupported; + delete wgName; + } + else + delete buf; + return err; + } + +EXPORT_C TInt TApaTask::SendMessage(TUid aUid,const TDesC8& aParams) +/** Sends a message to this task's window group. + +The message is handled by the UI framework, specifically by CEikAppUI::ProcessMessageL(). + + +@param aUid The UID identifying the message. By default, the UI framework +recognizes only two messages, KUidApaMessageSwitchOpenFileValue and KUidApaMessageSwitchCreateFileValue. +@param aParams The message. The format and meaning of the message depends on +the specific type as identified by the UID. +@return KErrNone, if successful; otherwise, one of the other system-wide error +codes. +@see CEikAppUi::ProcessMessageL() +@see TEventCode +@see TWsEvent +@see RWindowGroup::FetchMessage() */ + { + return iWsSession.SendMessageToWindowGroup(iWgId,aUid,aParams); + } + +EXPORT_C void TApaTask::SendKey(TInt aKeyCode,TInt aModifiers) +/** Sends a key event encapsulating the specified character code and specified modifier +keys state to the task's window group. + +Key events are handled by the UI framework, specifically by CCoeAppui::HandleWsEventL(). + +@capability SwEvent +@param aKeyCode The character code. +@param aModifiers State of the modifier keys. +@see CCoeAppUi::HandleWsEventL() */ + { + TKeyEvent key; + key.iCode=aKeyCode; + key.iModifiers=aModifiers; + key.iRepeats=0; + SendKey(key); + } + +EXPORT_C void TApaTask::SendKey(const TKeyEvent& aKey) +/** Sends the specified key event to the task's window group. + +Key events are handled by the UI framework, specifically by CCoeAppui::HandleWsEventL(). + +@capability SwEvent +@param aKey The key event. +@see CCoeAppUi::HandleWsEventL() +@see TKeyEvent */ + { + TWsEvent event; + event.SetType(EEventKey); + *event.Key()=aKey; + event.SetTimeNow(); + iWsSession.SendEventToWindowGroup(iWgId,event); + } + +EXPORT_C void TApaTask::SendSystemEvent(TApaSystemEvent aEvent) +/** Sends a system event to this task's window group. + +Events are handled by the UI framework, specifically by CEikAppUi::HandleSystemEventL(). + +@capability SwEvent +@param aEvent The event type. +@see CEikAppUi +@see CCoeAppUi::HandleSystemEventL() +@see TApaSystemEvent */ + { + SendSystemEvent(aEvent, EEventUser); + } + +void TApaTask::SendSystemEvent(TApaSystemEvent aEvent, TEventCode aType) +/** +@internalTechnology +*/ + { + TWsEvent event; + event.SetType(aType); + *(TApaSystemEvent*)(event.EventData())=aEvent; + event.SetTimeNow(); + iWsSession.SendEventToWindowGroup(iWgId,event); + } + +// +// class TApaTaskList +// + + + +EXPORT_C TApaTaskList::TApaTaskList(RWsSession& aWsSession) + : iWsSession(aWsSession) +/** Constructs the task list object, taking a reference to a window server session. + +@param aWsSession The window server session. */ + { + } + +EXPORT_C TApaTask TApaTaskList::FindApp(const TDesC& aAppName) +/** Searches for a task that has the specified caption. + +The result of the search depends on the number of tasks that have the specified +caption. + +If there is only one task, then that task is returned. + +If there is more than one task, then the task returned depends on whether +the first one found is in the foreground: + +if the first task found is in the foreground, then the task returned by this +function is the one with the highest window group ordinal value, i.e. the +task which is furthest from the foreground. + +if the first task found is not in the foreground, then that is the task that +is returned. + +If no matching task is found, then the object returned is an empty task, and +calling TApaTask::Exists() on it returns false. + +@param aAppName The caption. +@return A task having the specified caption, or an empty task. */ + { + TApaTask task(iWsSession); + TInt wgId=0; + TInt matchId=0; + TInt fgWgId=FindByPos(0).WgId(); + CApaWindowGroupName::FindByCaption(aAppName, iWsSession, wgId); + if (wgId==fgWgId) + { + while (wgId>=0) + { + matchId=wgId; + CApaWindowGroupName::FindByCaption(aAppName, iWsSession, wgId); + } + } + else + matchId=wgId; + task.SetWgId(matchId); + return(task); + } + +EXPORT_C TApaTask TApaTaskList::FindDoc(const TDesC& aDocName) +/** Searches for the task that is handling the specified document. + +@param aDocName The name of the document. +@return The task that is handling the specified document. If no such task exists, +then this is an empty task, i.e. a subsequent call to TApaTask::Exists() returns +false. */ + { + TInt wgId=0; + CApaWindowGroupName::FindByDocName(aDocName, iWsSession, wgId); + TApaTask task(iWsSession); + task.SetWgId(wgId); + return(task); + } + +EXPORT_C TApaTask TApaTaskList::FindByPos(TInt aPos) +/** Searches for a task by the ordinal position of its window group. + +@param aPos The ordinal position of a task's window group. A zero value refers +to the foreground task. +@return The task at the specified position. If there is no task at the specified +position, or the specified position is invalid, then the object returned is +an empty task, and calling TApaTask::Exists() on it returns false. */ + { + TApaTask task(iWsSession); + TRAP_IGNORE(FindByPosL(task,aPos)); + return(task); + } + +void TApaTaskList::FindByPosL(TApaTask& aTask,TInt aPos) + { + TInt wgId=0; + const TInt count=iWsSession.NumWindowGroups(0); + if (count) + { + CArrayFixFlat* wgIdArray=new(ELeave) CArrayFixFlat(count); + CleanupStack::PushL(wgIdArray); + CApaWindowGroupName* wgName=CApaWindowGroupName::NewL(iWsSession); + CleanupStack::PushL(wgName); + User::LeaveIfError(iWsSession.WindowGroupList(0,wgIdArray)); // priority 0 == mostly normal apps but some may be hidden window groups + + for (TInt ii=0; iiCount(); ii++) // must ask for count each time as this may change + { + wgId=(*wgIdArray)[ii]; + wgName->ConstructFromWgIdL(wgId); + if(wgName->Hidden()) + { + wgIdArray->Delete(ii--); // array element removed so now need to do this index again + } + } + + if (aPos>=count || aPos<0) + aPos=count-1; + + if(aPosCount()) + wgId=(*wgIdArray)[aPos]; + + CleanupStack::PopAndDestroy(2); // wgIdArray, wgName + } + aTask.SetWgId(wgId); + } + + +EXPORT_C TApaTask TApaTaskList::FindApp(TUid aAppUid) +/** Searches for a task running the specified application. + +The result of the search depends on the number of tasks that are running the +specified application. + +If there is only one task, then that task is returned. + +If there is more than one task, then the task returned depends on whether +the first one found is in the foreground: + +if the first task found is in the foreground, then the task returned by this +function is the one with the highest window group ordinal value, i.e. the +task which is furthest from the foreground. + +if the first task found is not in the foreground, then that is the task that +is returned. + +If no matching task is found, then the object returned is an empty task, and +calling TApaTask::Exists() on it returns false. + +@param aAppUid The application specific UID. +@return A task having the specified caption, or an empty task. */ + { + TApaTask task(iWsSession); + TInt wgId=0; + TInt matchId=0; + TInt fgWgId=FindByPos(0).WgId(); + CApaWindowGroupName::FindByAppUid(aAppUid,iWsSession,wgId); + if (wgId==fgWgId) + { + while (wgId>=0) + { + matchId=wgId; + CApaWindowGroupName::FindByAppUid(aAppUid,iWsSession,wgId); + } + } + else + matchId=wgId; + task.SetWgId(matchId); + return task; + } + +EXPORT_C TInt TApaTaskList::CycleTasks(TUid aAppUid,TCycleDirection aDirection) +/** Brings the next task in the set of tasks running the specified application to +the foreground. + +If there is only one task, then no change occurs. + +If the foremost task in the set is not the foreground task, then this is made +the foreground task. + +Thereafter, successive calls to this function bring the next task in the set +to the foreground. The direction of the cycling can be specified and has the +following effect: + +for the forwards direction, the foreground task is sent to the background; +the next foremost task is made the foreground task. + +for the backwards direction, the task with the highest window group ordinal +value, i.e. the task in the set which is furthest from the foreground, is +brought to the foreground. The task that was the foremost task in the set +is moved back by one position. + +If the task brought to the foreground uses the View architecture, then the +its top view is activated. + +@param aAppUid The application specific UID. +@param aDirection The direction of cycling. +@return KErrNone, if successful; KErrNotFound, if there are no tasks running +the specified application. */ + { + TInt sendToBgWgId=KErrNotFound; + TInt wgId=0; + TInt fgWgId=FindByPos(0).WgId(); + CApaWindowGroupName::FindByAppUid(aAppUid,iWsSession,wgId); + TInt matchId=wgId; + if (wgId==fgWgId) // If first match is at foreground + { + if (aDirection==EBackwards) + { + while (wgId>=0) // Go for last match + { + matchId=wgId; + CApaWindowGroupName::FindByAppUid(aAppUid,iWsSession,wgId); + } + } + else + { + CApaWindowGroupName::FindByAppUid(aAppUid,iWsSession,wgId); + if (wgId<0) // If no other match + return KErrNone; + sendToBgWgId=matchId; + matchId=wgId; // Go for second match + } + } + if (matchId>=0) + { + iWsSession.SetWindowGroupOrdinalPosition(matchId,0); + if (sendToBgWgId>=0) + iWsSession.SetWindowGroupOrdinalPosition(sendToBgWgId,-1); // Send it to background + return KErrNone; + } + return KErrNotFound; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGWGNAM.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APGWGNAM.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,674 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APGWGNAM.H" +#include "APGSTD.H" +#include "APGTASK.H" + +const TInt KUidBufLength=8; +const TInt KMinWindowGroupNameLength=5/*delimiters+status)*/+KUidBufLength; +const TInt KMaxWindowGroupNameLength=KMinWindowGroupNameLength+2*KMaxFileName; +const TInt KMaxSearchStringLength=KMaxFileName+6/* 3*delim+3*wild */; +typedef TBuf TApaSearchString; + +_LIT(KDefaultWindowGroupName,"00\x00\x30\x30\x30\x30\x30\x30\x30\x30\x0\x0"); +_LIT(KSearchAnyFile,"*"); +_LIT(KFormatStatus,"%02x"); + +EXPORT_C CApaWindowGroupName::~CApaWindowGroupName() +/** Destructor. + +Frees resources owned by the object prior to its destruction. */ + { + delete iBuf; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::New(const RWsSession& aWsSession, HBufC* aWgName) + // + // non leaving static initializer from full name - takes ownership + // ONLY TO BE USED WITH A VALID (i.e existing) WINDOW GROUP NAME + // +/** Creates a window group name object and takes ownership of the heap descriptor +containing a name. + +The name must have valid format. Typically, this is an existing window group +name. + +Note that the function cannot leave. + +@param aWsSession A window server session. +@param aWgName A heap descriptor containing a valid window group name. This +pointer must not be null, otherwise the function raises an APGRFX 3 panic. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=NULL; + if (aWgName) + { + This=new CApaWindowGroupName(aWsSession); + if (This) + { + This->iBuf=aWgName; + This->GetStatusFromName(); + } + } + else + Panic(EPanicNullWindowGroupName); + return This; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::NewL(const RWsSession& aWsSession) + // + // static initializer for blank window group name + // +/** Creates a window group name object and assigns a default name to it. + +@param aWsSession A window server session. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=NewLC(aWsSession); + CleanupStack::Pop(); + return This; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::NewL(const RWsSession& aWsSession, TInt aWgId) + // + // static initializer for existing window group name given by aWgId + // +/** Creates a window group name object and assigns to it the name taken from the +specified window group. + +@param aWsSession A window server session. +@param aWgId The ID of a window group. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=NewLC(aWsSession, aWgId); + CleanupStack::Pop(); + return This; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::NewL(const RWsSession& aWsSession, const TDesC& aWgName) + // + // static initializer from full name + // ONLY TO BE USED WITH A VALID (i.e existing) WINDOW GROUP NAME + // +/** Creates a window group name object and assigns to it the specified name. + +The name must have a valid format. Typically, this is an existing window group +name. + +@param aWsSession A window server session. +@param aWgName A valid window group name. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=NewLC(aWsSession, aWgName); + CleanupStack::Pop(); + return This; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::NewLC(const RWsSession& aWsSession) + // + // static initializer for blank window group name + // +/** Creates a window group name object, assigns a default name to it, and puts +a pointer to the new object onto the cleanup stack. + +@param aWsSession A window server session. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=new(ELeave) CApaWindowGroupName(aWsSession); + CleanupStack::PushL(This); + This->DefaultConstructL(); + return This; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::NewLC(const RWsSession& aWsSession, TInt aWgId) + // + // static initializer for existing window group name given by aWgId + // +/** Creates a window group name object, assigns to it the name taken from the specified +window group, and puts a pointer to the new object onto the cleanup stack. + +@param aWsSession A window server session. +@param aWgId The ID of a window group. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=new(ELeave) CApaWindowGroupName(aWsSession); + CleanupStack::PushL(This); + This->ConstructFromWgIdL(aWgId); + return This; + } + +EXPORT_C CApaWindowGroupName* CApaWindowGroupName::NewLC(const RWsSession& aWsSession, const TDesC& aWgName) + // + // static initializer from full name + // ONLY TO BE USED WITH A VALID (i.e existing) WINDOW GROUP NAME + // +/** Creates a window group name object, assigns to it the specified name, and puts +a pointer to the new object onto the cleanup stack. + +The name must have valid format. Typically, this is an existing window group +name. + +@param aWsSession A window server session. +@param aWgName A valid window group name. +@return A pointer to the new window group name object. */ + { + CApaWindowGroupName* This=new(ELeave) CApaWindowGroupName(aWsSession); + CleanupStack::PushL(This); + This->iBuf=aWgName.AllocL(); + This->GetStatusFromName(); + return This; + } + +CApaWindowGroupName::CApaWindowGroupName(const RWsSession& aWsSession) + : iWsSession(aWsSession) + // + // private c'tor + // + { + } + + +void CApaWindowGroupName::DefaultConstructL() + { + iStatus=0; + iBuf = KDefaultWindowGroupName().AllocL(); + } + +EXPORT_C void CApaWindowGroupName::ConstructFromWgIdL(TInt aWgId) + // + // Allocate and format iBuf according to existing name given by aWgId + // +/** Assigns to this object the name taken from the specified window group. + +Any previously existing name contained by this window group name object is +lost. + +If the specified window group does not exist or it has no name, then a default +name is assigned. + +@param aWgId The ID of a window group. */ + { + delete iBuf; + iBuf=NULL; + if (aWgId>0) + { + TBuf name; + ((RWsSession&)iWsSession).GetWindowGroupNameFromIdentifier(aWgId, name); + if (name.Length()==0) // name not set + DefaultConstructL(); + else + { + iBuf=name.AllocL(); + GetStatusFromName(); + } + } + else + DefaultConstructL(); + } + +EXPORT_C void CApaWindowGroupName::SetWindowGroupNameL(const TDesC& aWgName) +/** Sets the full window group name in this object. + +@param aWgName The full window group name. */ + { + delete iBuf; + iBuf=NULL; + iBuf=aWgName.AllocL(); + GetStatusFromName(); + } + +EXPORT_C void CApaWindowGroupName::SetWindowGroupName(HBufC* aWgName) +/** Sets the full window group name in this object, taking ownership of the specified +heap descriptor. + +The function cannot leave. + +@param aWgName A heap descriptor containing the full window group name. The +pointer must not be null, otherwise the function raises a APGRFX 3 panic. */ + { + if (aWgName) + { + if (iBuf != aWgName) + { + delete iBuf; + iBuf=aWgName; + } + GetStatusFromName(); + } + else + Panic(EPanicNullWindowGroupName); + } + +EXPORT_C void CApaWindowGroupName::FindByAppUid(TUid aAppUid, RWsSession& aWsSession, TInt& aPrevWgId) +/** Searches for the next window group by application UID. + +A running application, also known as a task, is associated with a window group. +The function searches for the next task running the specified application, +and returns its associated window group ID. + +@param aAppUid The application specific UID. +@param aWsSession A window server session. +@param aPrevWgId On entry, the previous window group ID. On return, the next +window group ID. On first call to this function pass a zero value. When there +are no more matching window groups, contains KErrNotFound. */ + { + TBuf<20> match(KSearchAnyFile); // status + match.Append(0); + TBuf<8> uidBuf; + //Type casting the Uid (which is TInt) to TUint to perform proper conversion + //when aAppUid.iUid is negative. + uidBuf.Num(TUint(aAppUid.iUid), EHex); + match.Append(uidBuf); // uid + match.Append(0); + match.Append('*'); // caption + match.Append(0); + match.Append('*'); // docname + aPrevWgId=aWsSession.FindWindowGroupIdentifier(aPrevWgId, match, 0); + } + +EXPORT_C void CApaWindowGroupName::FindByCaption(const TDesC& aCaption, RWsSession& aWsSession, TInt& aPrevWgId) +/** Searches for the next window group by caption. + +A running application, also known as a task, is associated with a window group. +The function searches for the next task having the specified caption, and +returns its associated window group ID. + +@param aCaption The caption. +@param aWsSession A window server session. +@param aPrevWgId On entry, the previous window group ID. On return, the next +window group ID. On first call to this function pass a zero value. When there +are no more matching window groups, contains KErrNotFound. */ + { + TApaSearchString match(KSearchAnyFile); // status + match.Append(0); + match.Append('*'); // uid + match.Append(0); + match.Append(aCaption); // caption + match.Append(0); + match.Append('*'); //doc name + aPrevWgId=aWsSession.FindWindowGroupIdentifier(aPrevWgId, match, 0); + } + +EXPORT_C void CApaWindowGroupName::FindByDocName(const TDesC& aDocName, RWsSession& aWsSession, TInt& aPrevWgId) +/** Searches for the next window group by document name. + +A running application, also known as a task, is associated with a window group. +The function searches for the next task handling the specified document, and +returns its associated window group ID. + +@param aDocName The name of the document. +@param aWsSession A window server session. +@param aPrevWgId On entry, the previous window group ID. On return, the next +window group ID. On first call to this function pass a zero value. When there +are no more matching window groups, contains KErrNotFound. */ + { + TApaSearchString match(KSearchAnyFile); // status + match.Append(0); + match.Append('*'); // uid + match.Append(0); + match.Append('*'); // caption + match.Append(0); + match.Append(aDocName); + aPrevWgId=aWsSession.FindWindowGroupIdentifier(aPrevWgId, match, 0); + } + +EXPORT_C void CApaWindowGroupName::SetBusy(TBool aBusy) +/** Sets the task's busy status in this object. + +@param aBusy ETrue, marks the task as busy; EFalse, marks the task as not +busy. +@see CEikonEnv::SetBusy() */ + { + iStatus&=(~EBusy); + if (aBusy) + iStatus|=EBusy; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::IsBusy() const +/** Tests whether the task is marked as busy. + +@return True, if the task is marked as busy; false, otherwise. +@see CEikonEnv::IsBusy() */ + { + return iStatus&EBusy; + } + +EXPORT_C void CApaWindowGroupName::SetSystem(TBool aSystem) +/** Sets the task's system status in this object. + +@param aSystem ETrue, marks the task as a system task; EFalse, marks the task +as not a system task. +@see CEikonEnv::SetSystem() */ + { + iStatus&=(~ESystem); + if (aSystem) + iStatus|=ESystem; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::IsSystem() const +/** Tests whether the task is marked as a system task. + +@return True, if the task is marked as a system task; false, otherwise. +@see CEikonEnv::IsSystem() */ + { + return iStatus&ESystem; + } + +EXPORT_C void CApaWindowGroupName::SetDocNameIsAFile(TBool aDocNameIsAFile) +/** Sets the document name status in this object. + +@param aDocNameIsAFile ETrue, the document name is a filename; EFalse, the +document name is not a filename. +@see CEikonEnv::SetDocNameIsAFile() */ + { + iStatus&=(~EDocNameNotAFile); + if (!aDocNameIsAFile) + iStatus|=EDocNameNotAFile; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::DocNameIsAFile() const +/** Tests whether the document name is a file. + +@return True, if the document name is a file; false, otherwise. +@see CEikonEnv::DocNameIsAFile() */ + { + return !(iStatus&EDocNameNotAFile); + } + +EXPORT_C void CApaWindowGroupName::SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent) +/** Sets the task's shutdown handling status in this object. + +@param aRespondsToShutdownEvent ETrue, if the task can deal with a shutdown +request; EFalse, if the task cannot deal with a shutdown request. +@see CEikonEnv::SetRespondsToShutdownEvent() */ + { + iStatus&=(~EDoesNotRespondToShutdownEvent); + if (!aRespondsToShutdownEvent) + iStatus|=EDoesNotRespondToShutdownEvent; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::RespondsToShutdownEvent() const +/** Tests whether the task can deal with a request to shutdown. + +@return True, if the task can deal with a request to shutdown; false, otherwise. + +@see CEikonEnv::RespondsToShutdownEvent() */ + { + return !(iStatus&EDoesNotRespondToShutdownEvent); + } + +EXPORT_C void CApaWindowGroupName::SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent) +/** Sets the task's switch file handling status in this object. + +@param aRespondsToSwitchFilesEvent ETrue, if the task can deal with a request +to switch file; EFalse, if the task cannot deal with with a request to switch +files. +@see CEikonEnv::SetRespondsToSwitchFilesEvent() */ + { + iStatus&=(~EDoesNotRespondToSwitchFilesEvent); + if (!aRespondsToSwitchFilesEvent) + iStatus|=EDoesNotRespondToSwitchFilesEvent; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::RespondsToSwitchFilesEvent() const +/** Tests whether the task can deal with a request to switch files. + +@return True, if the task can deal with a request to switch files; false otherwise. +@see CEikonEnv::RespondsToSwitchFilesEvent() */ + { + return !(iStatus&EDoesNotRespondToSwitchFilesEvent); + } + +EXPORT_C void CApaWindowGroupName::SetHidden(TBool aIsHidden) +/** Marks the task as hidden. + +In general, tasks marked as hidden do not appear in tasklists. +Specifically, TApaTask::FindByPos() will ignore any tasks marked as hidden. + +@param aIsHidden ETrue if the task is to be marked as hidden; EFalse if not. */ + { + iStatus&=(~EIsHidden); + if (aIsHidden) + iStatus|=EIsHidden; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::Hidden() const +/** Tests whether the task is marked as hidden. + +@return True if the task is hidden; false otherwise. */ + { + return (iStatus&EIsHidden); + } + +EXPORT_C void CApaWindowGroupName::SetAppReady(TBool aIsReady) +/** Sets the task as ready. + +@param aIsReady ETrue if the task is to be marked as ready; EFalse if not. */ + { + iStatus&=(~EAppReady); + if (aIsReady) + iStatus|=EAppReady; + WriteStatusToName(); + } + +EXPORT_C TBool CApaWindowGroupName::IsAppReady() const +/** Tests whether the task is marked as ready. + +@return True if the task is ready; false otherwise. */ + { + return (iStatus&EAppReady); + } + +EXPORT_C void CApaWindowGroupName::SetAppUid(TUid aAppUid) +/** Sets the specified UID into the window group name in this object. + +@param aAppUid The application specific UID. */ + { + TInt start=FindDelimiter(EEndStatus); + if (start>0) + { + start++; + TInt end=FindDelimiter(EEndUid); + if (end>0) + { + TBuf uidBuf; + //Type casting the Uid (which is TInt) to TUint to perform proper conversion + //when aAppUid.iUid is negative. + uidBuf.Num(TUint(aAppUid.iUid), EHex); + TPtr des=iBuf->Des(); + des.Replace(start, end-start, uidBuf); + } + } + } + + +EXPORT_C TUid CApaWindowGroupName::AppUid() const +/** Gets the UID of the task's application. + +@return The application specific UID. If the format of the window group name +is not recognized, then this is zero. */ + { + TUid uid=TUid::Null(); + TInt start=FindDelimiter(EEndStatus); + if (start>0) + { + start++; + TInt end=FindDelimiter(EEndUid); + if ((end-start) == KUidBufLength) + { + TBuf uidBuf=iBuf->Mid(start, end-start); + TLex lex(uidBuf); + TUint32 val = 0; + lex.Val(val, EHex); //Ignoring error code since we anyways have to return null uid if this returns an error. + uid.iUid = val; + } + } + return uid; + } + +EXPORT_C void CApaWindowGroupName::SetCaptionL(const TDesC& aCaption) +/** Sets the specified caption into the window group name in this object. + +@param aCaption The caption. */ + { + TInt start=FindDelimiter(EEndUid); + if (start>0) + { + start++; + TInt end=FindDelimiter(EEndCaption); + if (end>0) + { + TInt length=end-start; + ReAllocIfNecessaryL(aCaption.Length()-length); + TPtr des=iBuf->Des(); + des.Replace(start, length, aCaption); + } + } + } + +EXPORT_C TPtrC CApaWindowGroupName::Caption() const +/** Gets the task's caption. + +@return A non-modifiable pointer descriptor representing the caption. If the +format of the window group name is not recognized, then this is a zero length +descriptor. */ + { + TInt start=FindDelimiter(EEndUid); + if (start>0) + { + start++; + TInt end=FindDelimiter(EEndCaption); + if (end>0) + return iBuf->Mid(start, end-start); + } + return TPtrC(); // error + } + +EXPORT_C void CApaWindowGroupName::SetDocNameL(const TDesC& aDocName) +/** Sets the specified document name into the window group name in this object. + +@param aDocName The document name. */ + { + TInt start=FindDelimiter(EEndCaption); + if (start>0) + { + start++; + TInt end=iBuf->Length(); + if (end>0) + { + TInt length=end-start; + ReAllocIfNecessaryL(aDocName.Length()-length); + TPtr des=iBuf->Des(); + des.Replace(start, length, aDocName); + } + } + } + +EXPORT_C TPtrC CApaWindowGroupName::DocName() const +/** Gets the name of the document that the task is handling. + +@return A non-modifiable pointer descriptor representing the document name. +If the format of the window group name is not recognized, then this is a zero +length descriptor. */ + { + TInt start=FindDelimiter(EEndCaption); + if (start>0) + { + start++; + TInt end=iBuf->Length(); + if (end>0) + return iBuf->Mid(start, end-start); + } + return TPtrC(); // error + } + +EXPORT_C TInt CApaWindowGroupName::SetWindowGroupName(RWindowGroup& aGroupWin) const + // + // Set aGroupWin's name to the current name in iBuf (returns WServ error code) + // +/** Sets the window group name contained by this object into the specified window +group. + +@param aGroupWin The window group. +@return KErrNone, if successful; otherwise, one of the other system-wide error +codes. */ + { + return aGroupWin.SetName(*iBuf); + } + +EXPORT_C TPtrC CApaWindowGroupName::WindowGroupName() const +/** Gets the full window group name. + +@return A non-modifiable pointer descriptor representing the full window group +name. */ + { + return *iBuf; + } + +void CApaWindowGroupName::WriteStatusToName() + // + // replaces two digit hex number at front of iBuf by iStatus + // + { + TBuf<2> status; + status.Format(KFormatStatus, iStatus); + TPtr des=iBuf->Des(); + des.Replace(0,2,status); + } + +void CApaWindowGroupName::GetStatusFromName() + // + // Extracts the two digit hex number at front of iBuf into iStatus + // + { + TBuf<2> status=iBuf->Left(2); + TLex lex(status); + lex.Val(iStatus, EHex); + } + +TInt CApaWindowGroupName::FindDelimiter(TApaDelimiter aDelim) const + // + // returns the pos of aDelim or KErrNotFound + // + { + TInt pos=-1; + TInt length=iBuf->Length(); + for (TInt i=0; iRight(length-pos-1)).Locate(0); + if (nextPos<0) + return KErrNotFound; + pos=pos+nextPos+1; + } + return pos; + } + +void CApaWindowGroupName::ReAllocIfNecessaryL(TInt aExtraLengthReqd) + // + // Reallocates iBuf if currentLength+extraLengthLength(); + TInt total=existing+aExtraLengthReqd; + if (total>iBuf->Des().MaxLength()) + iBuf=iBuf->ReAllocL(total); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APSCLI.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/APSCLI.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,101 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Client access to the AppArc server +// +// + +#include +#include +#include +#include +#include +#include + +_LIT(KNameApaImage,"APSEXE"); +const TUid KServerUid3 = { 0x10003A3F }; +const TInt KApaServThreadMaxHeapSize = 0x100000; // 1Mb +const TInt KApaServThreadStackSize = 0x3000; // Apparc server need extra stack as it has a lot of filenames and parse objects on stack from time to time + +EXPORT_C TInt StartupApaServer(MApaAppStarter& aAppStarter) +/** +Start the server in a thread, using the supplied app starter. + +@internalTechnology +*/ + { + RThread server; + TInt r=server.Create(NameApaServServerThread(),ApaServThreadStart,KApaServThreadStackSize,KMinHeapSize,KApaServThreadMaxHeapSize,&aAppStarter,EOwnerThread); + if (r!=KErrNone) + return r; + TRequestStatus stat; + server.Rendezvous(stat); + if (stat!=KRequestPending) + server.Kill(0); // abort startup + else + server.Resume(); // logon OK - start the server + User::WaitForRequest(stat); // wait for start or death + server.Close(); + return stat.Int(); + } + +EXPORT_C TInt StartupApaServerProcess() +/** +StartupApaServerProcess +Start the server in a process, (or thread in EKA1 WINS). Simultaneous launching +of two such processes should be detected when the second one attempts to +create the server object, failing with KErrAlreadyExists. + +@publishedPartner +*/ + { + const TUidType uidType(KNullUid, KNullUid, KServerUid3); + TInt r=KErrNone; + +#ifdef APA_SERVER_IN_THREAD + // In WINS the server is a DLL, the exported entrypoint returns a TInt + // which represents the real entry-point for the server thread + RLibrary lib; + r=lib.Load(KNameApaImage,uidType); + if (r!=KErrNone) + return r; + TLibraryFunction ordinal1=lib.Lookup(1); + TThreadFunction serverFunc=reinterpret_cast(ordinal1()); + // To deal with the unique thread (+semaphore!) naming in EPOC, and that we may + // be trying to restart a server that has just exited we attempt to create a + // unique thread name for the server. + // This uses Math::Random() to generate a 32-bit random number for the name + TName name(NameApaServServerThread()); + name.AppendNum(Math::Random(),EHex); + RThread server; + r=server.Create(name, serverFunc, KApaServThreadStackSize, NULL, &lib, NULL, KMinHeapSize,KApaServThreadMaxHeapSize, EOwnerProcess); + lib.Close(); +#else + // On ARM or any EKA2 target, the server is an EXE. + // Create a process from it. + RProcess server; + r=server.Create(KNameApaImage,KNullDesC,uidType); +#endif + + if (r!=KErrNone) + return r; + TRequestStatus stat; + server.Rendezvous(stat); + if (stat!=KRequestPending) + server.Kill(0); // abort startup + else + server.Resume(); // logon OK - start the server + User::WaitForRequest(stat); // wait for start or death + server.Close(); + return stat.Int(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apgconstdata.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apgconstdata.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +/* + * patchable const data values + * + * To patch these values, add a line to an iby or oby file that is included in the rom being built using the following format: + * + * "patchdata @ " + * + * e.g. to enable on-demand recognizer loading, use the following line: + * "patchdata apserv.dll @ KApaLoadDataRecognizersOnDemand 1" + */ + +/* The default value here is zero. A more appropriate value should + be set in the SystemGUI via the patchable constant. +*/ +EXPORT_C extern const TInt KMinApplicationStackSize = 0; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apgnotif.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apgnotif.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,92 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "apgnotif.h" +#include "APGSTD.H" + +EXPORT_C CApaAppListNotifier::~CApaAppListNotifier() +/** The destructor calls Cancel() and closes the session with the server. + +@see CActive::Cancel() */ + { + Cancel(); + iLsSession.Close(); + } + + +EXPORT_C CApaAppListNotifier* CApaAppListNotifier::NewL(MApaAppListServObserver* aObserver, TPriority aPriority) +/** Allocates and constructs an application list change notifier. + +It creates a session with the application architecture server (RApaLsSession), +issues the notification request to the server and adds itself to the active scheduler. + +@param aObserver Observer whose HandleAppListEvent() function is called when an +application is added or deleted. +@param aPriority The active object priority. +@return The application list change notifier. */ + { + __ASSERT_DEBUG(aObserver!=NULL,Panic(EDPanicInvalidObserver)); + CApaAppListNotifier* self=new(ELeave) CApaAppListNotifier(*aObserver, aPriority); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); // self + return self; + } + +CApaAppListNotifier::CApaAppListNotifier(MApaAppListServObserver& aObserver, TPriority aPriority) + :CActive(aPriority), + iObserver(aObserver) + { + } + +void CApaAppListNotifier::ConstructL() + { + User::LeaveIfError(iLsSession.Connect()); + iLsSession.SetNotify(EFalse, iStatus); + CActiveScheduler::Add(this); + SetActive(); + } + +void CApaAppListNotifier::DoCancel() + { + iLsSession.CancelNotify(); + } + +void CApaAppListNotifier::RunL() + { + TInt status=iStatus.Int(); + User::LeaveIfError(status); + iLsSession.SetNotify(EFalse, iStatus); // requeue before handling in case the handling changes things + SetActive(); + iObserver.HandleAppListEvent(status); + } + +// +// MApaAppListServObserver +// +/** Constructor for MApaAppListServObserver */ +EXPORT_C MApaAppListServObserver::MApaAppListServObserver() + { + } + +/** Reserved for future use */ +EXPORT_C void MApaAppListServObserver::MApaAppListServObserver_Reserved1() + { + } + +/** Reserved for future use */ +EXPORT_C void MApaAppListServObserver::MApaAppListServObserver_Reserved2() + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apprivate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apprivate.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,30 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// AP_PRIVATE.H +// +// + + +#if !defined(__AP_PRIVATE_H__) +#define __AP_PRIVATE_H__ + +#include + +const TUint KUidPrefixedNonNativeRegistrationResourceFile=0x1027289d; + +_LIT(KLitPathForNonNativeResourceAndIconFiles, "\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\"); +_LIT(KLitFormatForRegistrationResourceFile, "%08x_reg.rsc"); +_LIT(KLitFormatForLocalisableResourceFile, "%08x_loc.rsc"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apsecutils.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apsecutils.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,60 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Security issues related methods used across apparc +// +// + +#include +#include //for TSecureId +#include "apsecutils.h" + + +/** + * Check if application has a WriteDeviceData capability + * and if it's SID is in the protected range + * + * @param aAppFilename path to application exe file + * @param aHasWriteDeviceDataCap returns ETrue if app has WriteDeviceData cap + * @param aIsSidProtected returns ETrue if application SID is in the protected range + * @return KErrNone if succesful, error code otherwise + */ +EXPORT_C TInt CApaSecurityUtils::CheckAppSecurity( const TPtrC& aAppFilename, + TBool& aHasWriteDeviceDataCap, + TBool& aIsSidProtected ) + { + aHasWriteDeviceDataCap = EFalse; + aIsSidProtected = EFalse; + + RLibrary::TInfoBuf infoBuf; + TInt ret = RLibrary::GetInfo( aAppFilename, infoBuf ); + if ( KErrNone == ret ) + { + if ( infoBuf().iSecurityInfo.iCaps.HasCapability( + ECapabilityWriteDeviceData ) ) + { + aHasWriteDeviceDataCap = ETrue; + } + + const TSecureId appSid = infoBuf().iSecurityInfo.iSecureId; + + if( IsSidProtected( TUint32( appSid ) ) ) + { + aIsSidProtected = ETrue; + } + + } + return ret; + } + +//End of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apsecutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apsecutils.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APSECUTILS_H__ +#define __APSECUTILS_H__ + +/** AppArc security utils. + +This is a set of security related methods for apparc internal usage. + +@internalComponent +*/ +class CApaSecurityUtils + { +public: + IMPORT_C static TInt CheckAppSecurity( const TPtrC& aAppFilename, + TBool& aHasWriteDeviceDataCap, + TBool& aIsSidProtected ); +private: + inline static TBool IsSidProtected( const TUint32 aSid ); + }; + +#include "apsecutils.inl" + +#endif // __APSECUTILS_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apsecutils.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apgrfx/apsecutils.inl Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,31 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APSECUTILS_INL__ +#define __APSECUTILS_INL__ + +/** + * Determines whether an EXE SID is within the protected range\d + * + * @param aSid The SID to check + * @return ETrue if it is protected + */ +inline TBool CApaSecurityUtils::IsSidProtected( const TUint32 aSid ) + { + // If bit 31 is set then Sid is unprotected + return (aSid & 0x80000000) ? EFalse : ETrue; + } + +#endif // __APSECUTILS_INL__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APACMDLN.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APACMDLN.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,815 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "APASTD.H" // Panics etc. +#include + +#include + +_LIT(KLitTokenServerDifferentiator, "-srvDfr="); +_LIT(KLitTokenDefaultScreenNumber, "-dsc="); +_LIT(KLitTokenParentWindowGroupID, "-prntwgid="); +_LIT(KLitTokenDebugMemFail, "-debugMemFail:"); +_LIT(KLitTokenAppStartupInstrumentationEventIdBase, "-appStartupInstrEvIdBase="); +_LIT(KLitTokenOpaqueData, "-opaque="); + +// CApaCommandLine + +CApaCommandLine::CApaCommandLine() : + iDocumentName( NULL), iExecutableName(NULL), iOpaqueData(NULL), + iTailEnd(NULL), iCommand(EApaCommandRun), + iServerDifferentiator(0), iDefaultScreenNumber(-1), + iParentWindowGroupID(0), iDebugMemFail(0), iAppStartupInstrumentationEventIdBase(0), + iFile(), iParentProcessId(KNullProcessId) + // + // private c'tor - initialize using NewLC() + // + { + } + +EXPORT_C CApaCommandLine::~CApaCommandLine() +/** Destructor. + +Frees resources owned by the object prior to deletion. */ + { + delete iDocumentName; + delete iExecutableName; + delete iOpaqueData; + delete iTailEnd; + iFile.Close(); + } + +EXPORT_C CApaCommandLine* CApaCommandLine::NewL() +/** Creates an empty command line object. + +@return A pointer to the new command line object. */ + { + CApaCommandLine* This=CApaCommandLine::NewLC(); + CleanupStack::Pop(); + return This; + } + +EXPORT_C void CApaCommandLine::ConstructCmdLineFromMessageL(const RMessage2& aMessage) +/** Acts as a second constructor and completes a commandline object from + the aMessage object. + +@internalTechnology */ + { + const TInt bufLen = aMessage.GetDesLengthL(EIpcSlotMain); + HBufC8* const buffer=HBufC8::NewLC(bufLen); + {TPtr8 buffer_asWritable(buffer->Des()); + aMessage.ReadL(EIpcSlotMain, buffer_asWritable);} + RDesReadStream stream; + stream.Open(*buffer); + InternalizeL(stream); + CleanupStack::PopAndDestroy(buffer); + + iFile.AdoptFromClient(aMessage, EIpcSlotFsSession, EIpcSlotFile); // ignore the returned error - assume it means that no file has been passed across + } + +void CApaCommandLine::GetCommandLineFromProcessEnvironmentL() + { + const TInt bufLen = User::ParameterLength(EEnvironmentSlotMain); + if (bufLen==KErrNotFound) + { + HBufC* const commandLineString=HBufC::NewLC(User::CommandLineLength()); + {TPtr commandLineString_asWritable(commandLineString->Des()); + User::CommandLine(commandLineString_asWritable);} + User::LeaveIfError(Parse(*commandLineString)); + CleanupStack::PopAndDestroy(commandLineString); + } + else + { + User::LeaveIfError(bufLen); // in case bufLen is some error other than KErrNotFound + HBufC8* const buffer=HBufC8::NewLC(bufLen); + {TPtr8 buffer_asWritable(buffer->Des()); + User::LeaveIfError(User::GetDesParameter(EEnvironmentSlotMain, buffer_asWritable));} + RDesReadStream stream; + stream.Open(*buffer); + InternalizeL(stream); + CleanupStack::PopAndDestroy(buffer); + } + + iFile.AdoptFromCreator(EEnvironmentSlotFsSession, EEnvironmentSlotFile); // ignore the returned error - assume it means that no file has been passed across + } + +EXPORT_C CApaCommandLine* CApaCommandLine::NewLC() +/** Creates an empty command line object, and puts a pointer to it onto the cleanup +stack. + +@return A pointer to the new command line object. */ + { + CApaCommandLine* This=new(ELeave) CApaCommandLine; + CleanupStack::PushL(This); + return This; + } + +EXPORT_C void CApaCommandLine::SetDocumentNameL(const TDesC& aDocName) +/** Sets the document name from the specified descriptor. + +If the document name has embedded spaces, then it must be enclosed within +quotation marks. + +@param aDocName A descriptor containing the document name. */ + { + HBufC* const documentName=aDocName.AllocL(); + delete iDocumentName; // only done after the AllocL succeeds + iDocumentName=documentName; + } + +EXPORT_C TPtrC CApaCommandLine::DocumentName() const +/** Gets the document name from the launch information. + +@return A pointer descriptor representing the document name. The document +name is returned without any enclosing quotation marks. If the launch information +contains no document name, then the pointer descriptor has zero length. */ + { + if (iDocumentName!=NULL) + { + return *iDocumentName; + } + return KNullDesC(); + } + +EXPORT_C void CApaCommandLine::SetExecutableNameL(const TDesC& aExecutableName) +/** Sets the executable name from the specified descriptor. + +@param aExecutableName A descriptor containing the executable name. */ + { + HBufC* const executableName=aExecutableName.AllocL(); + delete iExecutableName; // only done after the AllocL succeeds + iExecutableName=executableName; + } + +EXPORT_C TPtrC CApaCommandLine::ExecutableName() const +/** Gets the executable name from the launch information. + +@return A pointer descriptor representing the executable name. */ + { + if (iExecutableName!=NULL) + { + return *iExecutableName; + } + return KNullDesC(); + } + +EXPORT_C void CApaCommandLine::SetOpaqueDataL(const TDesC8& aOpaqueData) +/** Sets the opaque-data from the specified 8-bit descriptor. + +This is called internally and populated from the data in the application's registration resource file, +i.e. from the resource indicated by the opaque_data field of the APP_REGISTRATION_INFO resource (if the +opaque_data field was non-zero). + +@param aOpaqueData An 8-bit descriptor containing the opaque-data. */ + { + HBufC8* const opaqueData = aOpaqueData.AllocL(); + delete iOpaqueData; + iOpaqueData = opaqueData; + } + +EXPORT_C TPtrC8 CApaCommandLine::OpaqueData() const +/** Gets the opaque-data from the launch information. + +See the description of SetOpaqueDataL. By default, this attribute is an empty descriptor. + +@see SetOpaqueDataL +@return An 8-bit pointer descriptor representing the opaque-data. */ + { + if (iOpaqueData != NULL) + { + return *iOpaqueData; + } + return KNullDesC8(); + } + +EXPORT_C void CApaCommandLine::SetCommandL(TApaCommand aCommand) +/** Sets the command code. + +The command code is used to indicate how an application is to be launched. + +@see TApaCommand +@param aCommand The command code. */ + { + iCommand=aCommand; + } + +EXPORT_C TApaCommand CApaCommandLine::Command() const +/** Gets the command code from the launch information. + +See the description of SetCommandL. + +@see SetCommandL +@see TApaCommand +@return The command code. */ + { + return iCommand; + } + +EXPORT_C void CApaCommandLine::SetTailEndL(const TDesC8& aTailEnd) +/** Sets the trailing data. + +The UI Framework provides a specific set of pre-defined command line +options. Additional user defined or pre-defined command line options, +may be passed to an application by setting the TailEnd. + +@param aTailEnd An 8 bit descriptor containing the trailing data. */ + { + HBufC8* const newTailEnd=aTailEnd.AllocL(); + delete iTailEnd; // only done after the AllocL succeeds + iTailEnd=newTailEnd; + } + +EXPORT_C TPtrC8 CApaCommandLine::TailEnd() const +/** Gets the trailing data from the launch information. + +See the description of SetTailEndL. + +@see SetTailEndL +@return A pointer descriptor representing the trailing data. If the launch +information contains no trailing data, then the pointer descriptor has zero +length. */ + { + if (iTailEnd!=NULL) + { + return *iTailEnd; + } + return KNullDesC8(); + } + +EXPORT_C void CApaCommandLine::SetFileByHandleL(const RFile& aFile) +/** Sets the file to be passed into the application (by handle). +This will then be retrieved by that application-process calling GetFileByHandleL(). + +@publishedPartner +@released +@param aFile The file object to be passed into the application. No transfer of this +object's ownership takes place in this function. */ + { + __ASSERT_ALWAYS(aFile.SubSessionHandle()!=KNullHandle, Panic(EPanicInvalidHandle)); + __ASSERT_ALWAYS(iFile.SubSessionHandle()==KNullHandle, Panic(EPanicHandleAlreadySet)); + User::LeaveIfError(iFile.Duplicate(aFile)); + } + +EXPORT_C void CApaCommandLine::GetFileByHandleL(RFile& aFile) const +/** Opens (by handle) the file that was passed into SetFileByHandleL by the process launching the local application. + +On entering this function, aFile must be non-open. It is recommended that aFile is +pushed onto the cleanup-stack (via CleanupClosePushL()) before this function is called. + +@publishedPartner +@released +@param aFile The file object to be set up from the handle passed into the application. The +caller has the responsibility to Close() this object, even if this function leaves. */ + { + __ASSERT_ALWAYS(aFile.SubSessionHandle()==KNullHandle, Panic(EPanicHandleAlreadySet)); + if (iFile.SubSessionHandle()!=KNullHandle) + { + User::LeaveIfError(aFile.Duplicate(iFile)); + } + } + +/** Assigns a command line to a process (EKA2 only). + +This replaces the EKA1 method which involved retrieving the full command line (using +CApaCommandLine::FullCommandLine()) and passing it to the process (or thread on the +emulator). + +This function is used as follows (the order of the first 2 steps is irrelevant):- +- create the process and load the executable (RProcess::Create()), +- create the command line object (CApaCommandLine::NewLC()), and set it up using +the various setter functions, for instance SetDocumentNameL(), +- call SetProcessEnvironmentL() to assign the command line to the process, +- call Resume() on the process. + +Note that this sequence of steps bypasses the application architecture, and is +not recommended. RApaLsSession::StartApp() is the recommended way to +launch an application with a command line. + +@param aProcess The process to which the command line is assigned. +@leave KErrNotSupported This indicates that the function was called on EKA1. +@see RApaLsSession::StartApp() +*/ +EXPORT_C void CApaCommandLine::SetProcessEnvironmentL(RProcess& aProcess) const + { + HBufC8* const streamableAttributes=StreamableAttributesLC(); + User::LeaveIfError(aProcess.SetParameter(EEnvironmentSlotMain, *streamableAttributes)); + CleanupStack::PopAndDestroy(streamableAttributes); + + if (iFile.SubSessionHandle()!=KNullHandle) + { + User::LeaveIfError(iFile.TransferToProcess(aProcess, EEnvironmentSlotFsSession, EEnvironmentSlotFile)); + } + } + +EXPORT_C void CApaCommandLine::GetIpcArgsLC(TIpcArgs& aIpcArgs) const +/** +@internalTechnology +*/ + { + aIpcArgs.Set(EIpcSlotMain, StreamableAttributesLC()); + if (iFile.SubSessionHandle()!=KNullHandle) + { + User::LeaveIfError(iFile.TransferToServer(aIpcArgs, EIpcSlotFsSession, EIpcSlotFile)); + } + } + +EXPORT_C TInt CApaCommandLine::GetCommandLineFromProcessEnvironment(CApaCommandLine*& aCommandLine) +/** Constructs a command line object. + +If command line information is provided in the environment-slots it creates command line object from +process environment-slots, else creates it from the information returned by User::CommandLine(). + +It can be called from a context where there is no CTrapCleanup. + +Calling this function more than once in a process is not supported and will result in an empty command +line being returned. If an application wants to inspect any part of its command line, it +should override CEikAppUi::ProcessCommandParametersL(CApaCommandLine& aCommandLine) and call the base +class implementation if required. + +@see CEikAppUi::ProcessCommandParametersL(CApaCommandLine& aCommandLine). +@param aCommandLine On return, a pointer to a newly constructed command line object. +@return KErrNone, if successful; otherwise one of the other system-wide error codes. +@internalTechnology */ + { // static + aCommandLine = NULL; + CApaCommandLine* const commandLine = new CApaCommandLine; + if(!commandLine) + return KErrNoMemory; + + CTrapCleanup* trapCleanup = NULL; + if (!User::TrapHandler()) + { + trapCleanup = CTrapCleanup::New(); // we're being called from an environment without a cleanup-stack, so temporarily create one here + if(!trapCleanup) + { + delete commandLine; + return KErrNoMemory; + } + } + + TRAPD(error, commandLine->GetCommandLineFromProcessEnvironmentL()); + aCommandLine = commandLine; + delete trapCleanup; + return error; + } + +EXPORT_C void CApaCommandLine::SetParentProcessId(TProcessId aProcessId) +/** Sets the Parent Process ID for the Child Process launched with this command line. + +This establishes a Parent-Child relationship which ensures that the child process is +terminated when the parent terminates. + +@param aProcessId The Process ID. */ + { + iParentProcessId=aProcessId; + } + +EXPORT_C TProcessId CApaCommandLine::ParentProcessId() const +/** Gets the Parent Process ID of the Child Process launched with this command line. + +See the description of SetParentProcessId. + +@see SetParentProcessId +@return The Parent Process ID. */ + { + return iParentProcessId; + } + + +void CApaCommandLine::ExternalizeL(RWriteStream& aStream) const + { + // iFile is not supported via RReadStream/RWriteStream + aStream << DocumentName(); + aStream << ExecutableName(); + aStream << OpaqueData(); + aStream << TailEnd(); + aStream.WriteInt32L(iCommand); + aStream.WriteInt32L(iServerDifferentiator); + aStream.WriteInt32L(iDefaultScreenNumber); + aStream.WriteInt32L(iParentWindowGroupID); + aStream.WriteInt32L(iDebugMemFail); + aStream.WriteInt32L(iAppStartupInstrumentationEventIdBase); + aStream.WriteInt32L(iParentProcessId); + } + + +void CApaCommandLine::InternalizeL(RReadStream& aStream) + { + // iFile is not supported via RReadStream/RWriteStream + const TInt KMaxBufLength = 4000; + iDocumentName = HBufC::NewL(aStream,KMaxBufLength); + iExecutableName = HBufC::NewL(aStream,KMaxBufLength); + iOpaqueData = HBufC8::NewL(aStream, KMaxBufLength); + iTailEnd = HBufC8::NewL(aStream,KMaxBufLength); + iCommand = static_cast(aStream.ReadInt32L()); + iServerDifferentiator = aStream.ReadInt32L(); + iDefaultScreenNumber = aStream.ReadInt32L(); + iParentWindowGroupID = aStream.ReadInt32L(); + iDebugMemFail = aStream.ReadInt32L(); + iAppStartupInstrumentationEventIdBase = aStream.ReadInt32L(); + iParentProcessId=aStream.ReadInt32L(); + } + +HBufC8* CApaCommandLine::StreamableAttributesLC() const + { + CBufFlat* const buffer = CBufFlat::NewL(128); + CleanupStack::PushL(buffer); + RBufWriteStream writeStream; + writeStream.Truncate(*buffer); + ExternalizeL(writeStream); + writeStream.CommitL(); + HBufC8* const bufferAsDescriptor = buffer->Ptr(0).AllocL(); + CleanupStack::PopAndDestroy(buffer); + CleanupStack::PushL(bufferAsDescriptor); + return bufferAsDescriptor; + } + +EXPORT_C void CApaCommandLine::SetServerNotRequiredL() +/** Sets that no server is required. + +The value of server differentiator is set to zero, to indicate that no server +is required. + +See the description of SetServerRequiredL. +@see SetServerRequiredL +*/ + { + SetServerDifferentiatorL(0); + } + +EXPORT_C void CApaCommandLine::SetServerRequiredL(TUint aServerDifferentiator) +/** Sets the required server. + +The server differentiator is a number generated by the client that helps to uniquely +identify the server. It is used by an application to indicate whether a server should +be created and how it should be named. + +@param aServerDifferentiator A differentiator for the required server.*/ + + { + SetServerDifferentiatorL(aServerDifferentiator); + } + +void CApaCommandLine::SetServerDifferentiatorL(TUint aServerDifferentiator) + { + iServerDifferentiator=aServerDifferentiator; + } + +EXPORT_C TUint CApaCommandLine::ServerRequired() const +/** Gets the server differentiator. + +See the description of SetServerRequiredL. + +@see SetServerRequiredL +@return The non-zero differentiator for the server, else zero indicating a server +is not required.*/ + { + return iServerDifferentiator; + } + +EXPORT_C void CApaCommandLine::SetDefaultScreenL(TInt aDefaultScreenNumber) +/** Provides support for devices with more than one screen. A number representing the default +or startup screen may be passed to an application. +Screen numbers and characteristics are defined in the window server initialisation +file (wsini.ini). + +@param aDefaultScreenNumber The number of the default (startup) screen. */ + { + __ASSERT_ALWAYS(aDefaultScreenNumber>=0, Panic(EPanicInvalidScreenNumber)); + iDefaultScreenNumber=aDefaultScreenNumber; + } + +EXPORT_C TInt CApaCommandLine::DefaultScreen() const +/** Extracts and returns the default (startup) screen that was specified in the command line. + +@return A number representing the default (startup) screen. 0 (Zero) if nothing present. */ + { + return Max(0, iDefaultScreenNumber); + } + +EXPORT_C TBool CApaCommandLine::IsDefaultScreenSet() const +/** +@internalTechnology +*/ + { + return (iDefaultScreenNumber>=0); + } + +EXPORT_C void CApaCommandLine::SetParentWindowGroupID(TInt aParentWindowGroupID) +/** Sets the ID of the parent window-group - the application should create its own +window-group as a child off this parent. + +@param aParentWindowGroupID The ID of the parent window-group - the application +should create its window-group as a child off this parent. */ + { + iParentWindowGroupID=aParentWindowGroupID; + } + +EXPORT_C TInt CApaCommandLine::ParentWindowGroupID() const +/** Returns the ID of the parent window-group - the application should create its own +window-group as a child of this parent. + +@return The ID of the parent window-group - the application should create its +window-group as a child off this . */ + { + return iParentWindowGroupID; + } + +EXPORT_C void CApaCommandLine::SetDebugMemFailL(TInt aDebugMemFail) +/** @internalAll */ + { + iDebugMemFail=aDebugMemFail; + } + +EXPORT_C TInt CApaCommandLine::DebugMemFail() const +/** @internalAll */ + { + return iDebugMemFail; + } + +EXPORT_C void CApaCommandLine::SetAppStartupInstrumentationEventIdBaseL(TInt aAppStartupInstrumentationEventIdBase) +/** @internalAll */ + { + iAppStartupInstrumentationEventIdBase=aAppStartupInstrumentationEventIdBase; + } + +EXPORT_C TInt CApaCommandLine::AppStartupInstrumentationEventIdBase() const +/** @internalAll */ + { + return iAppStartupInstrumentationEventIdBase; + } + +EXPORT_C TInt CApaCommandLine::EnvironmentSlotForPublicUse(TInt aIndex) +/** Returns the index of a process environment-slot for public use (in other words, +one that is not used internally by CApaCommandLine). The number of slots available +for public use can be found in the (private) enum value CApaCommandLine::ENumberOfEnvironmentSlotsForPublicUse, +(this value may be increased over time). The returned value can then be passed into +any of the Open(TInt,...) functions on RSessionBase, RMutex, RChunk, RCondVar, etc, +or into User::GetTIntParameter(), User::GetDesParameter(), etc, depending on the type +of the object in that environment slot. + +@param aIndex The logical index of the public environment-slot. This must be greater +than or equal to zero, and less than CApaCommandLine::ENumberOfEnvironmentSlotsForPublicUse. +@return The physical index of an environment-slot in the local process. */ + { // static + __ASSERT_ALWAYS((aIndex>=0) && (aIndex-1) + { + executableName=StripQuotes(aCmdLine.Left(endLibNameOffset+1)).Alloc(); + if (executableName==NULL) + { + delete documentName; + delete executableName; + delete tailEnd; + delete opaqueData; + return KErrNoMemory; + } + } + TInt offset=endDocNameOffset-endLibNameOffset; + if (offset>1) + { + TChar commandLetter=aCmdLine[endLibNameOffset+2]; + switch (commandLetter) + { + case KApaCommandLetterOpen: + command=EApaCommandOpen; + break; + case KApaCommandLetterCreate: + command=EApaCommandCreate; + break; + case KApaCommandLetterViewActivate: + command=EApaCommandViewActivate; + break; + case KApaCommandLetterRunWithoutViews: + command=EApaCommandRunWithoutViews; + break; + case KApaCommandLetterBackgroundAndWithoutViews: + command=EApaCommandBackgroundAndWithoutViews; + break; + case KApaCommandLetterRun: + default: + break; + case KApaCommandLetterBackground: + command=EApaCommandBackground; + break; + } + + if (offset>2) + { + const TInt documentNameStartPosition=endLibNameOffset+3; + documentName=StripQuotes(aCmdLine.Mid(documentNameStartPosition, (endDocNameOffset+1)-documentNameStartPosition)).Alloc(); + if (documentName==NULL) + { + delete documentName; + delete executableName; + delete tailEnd; + delete opaqueData; + return KErrNoMemory; + } + } + } + const TInt KNumberOfSupportedOptions=6; + TFixedArray optionArray; + optionArray[0].iToken=&KLitTokenServerDifferentiator; + optionArray[0].iResult=&serverDifferentiator; + optionArray[0].iRadix=EDecimal; + optionArray[1].iToken=&KLitTokenDefaultScreenNumber; + optionArray[1].iResult=&defaultScreenNumber; + optionArray[1].iRadix=EDecimal; + optionArray[2].iToken=&KLitTokenParentWindowGroupID; + optionArray[2].iResult=&parentWindowGroupID; + optionArray[2].iRadix=EDecimal; + optionArray[3].iToken=&KLitTokenDebugMemFail; + optionArray[3].iResult=&debugMemFail; + optionArray[3].iRadix=EHex; + optionArray[4].iToken=&KLitTokenAppStartupInstrumentationEventIdBase; + optionArray[4].iResult=&appStartupInstrumentationEventIdBase; + optionArray[4].iRadix=EDecimal; + optionArray[5].iToken=&KLitTokenOpaqueData; + optionArray[5].iResult=¬Used; + optionArray[5].iRadix=EDecimal; // should not used if the command-line is well-formed + TLex lex(aCmdLine.Mid(endDocNameOffset+1)); + lex.Mark(); + for (TInt optionIndex=0; optionIndexLength(); + if ((remainder.Length()>=tokenLength) && (remainder.Left(tokenLength).CompareF(*option.iToken)==0)) + { + if (option.iToken==&KLitTokenOpaqueData) + { + TInt endOfOpaqueDataIndex = 0; + for (TInt i=tokenLength; i tokenLength) + { + const TInt opaqueDataLength = endOfOpaqueDataIndex - tokenLength; + delete opaqueData; + opaqueData=TPtrC8(reinterpret_cast(remainder.Mid(tokenLength, opaqueDataLength).Ptr()),opaqueDataLength*sizeof(TText)).Alloc(); + if (opaqueData==NULL) + { + delete documentName; + delete executableName; + delete tailEnd; + return KErrNoMemory; + } + lex.Inc(tokenLength + opaqueDataLength); + lex.Mark(); + } + else + { + delete opaqueData; + delete documentName; + delete executableName; + delete tailEnd; + // invalid command line. copy TLex.Val behavior + return KErrGeneral; + } + } + else + { + ASSERT(option.iResult); + const TInt originalValue=*option.iResult; + lex.Inc(tokenLength); + TUint16 val = static_cast (*option.iResult); + if (lex.Val(val, option.iRadix)==KErrNone) + { + lex.Mark(); + } + else + { + *option.iResult=originalValue; + } + } + } + } + lex.UnGetToMark(); + lex.SkipSpace(); + const TPtrC remainder(lex.Remainder()); + const TInt lengthOfRemainder=remainder.Length(); + if (lengthOfRemainder>0) + { + tailEnd=TPtrC8(reinterpret_cast(remainder.Ptr()),lengthOfRemainder*sizeof(TText)).Alloc(); + if (tailEnd==NULL) + { + delete documentName; + delete executableName; + delete tailEnd; + delete opaqueData; + return KErrNoMemory; + } + } + + // we can now set the member variables as all memory-allocation has succeeded + delete iDocumentName; + iDocumentName=documentName; + delete iExecutableName; + iExecutableName=executableName; + delete iTailEnd; + iTailEnd=tailEnd; + iCommand=command; + iServerDifferentiator=serverDifferentiator; + iDefaultScreenNumber=defaultScreenNumber; + iParentWindowGroupID=parentWindowGroupID; + iDebugMemFail=debugMemFail; + iAppStartupInstrumentationEventIdBase=appStartupInstrumentationEventIdBase; + delete iOpaqueData; + iOpaqueData = opaqueData; + return KErrNone; + } + +TPtrC CApaCommandLine::StripQuotes(const TDesC& aDes) const + // + // return aDes stripped of any enclosing quotes + // + { + TInt start=0; + TInt end=aDes.Length()-1; + TPtrC ret; + if (end>=0) + { + if (aDes[0]=='"') + { + start++; + } + if (aDes[end]=='"') + { + end--; + } + TInt length=end-start+1; + if (length>0) + { + ret.Set(aDes.Mid(start, length)); + } + } + return ret; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APADLL.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APADLL.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,70 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APADLL_H__ +#define __APADLL_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APADEF_H__) +#include +#endif +#if !defined(__APPARC_H__) +#include +#endif + + +// classes referenced +class CApaApplication; +class RFs; + +NONSHARABLE_CLASS(CApaAppHolder) : public CBase +/** Provides an interface for obtaining data gathered differently for DLLs and EXEs. Derived +classes create and own the application object. The equivalent of the old CApaDll derives from this.*/ +{ +public: + CApaAppHolder(); + ~CApaAppHolder(); + + virtual TFileName FileName() const = 0; + virtual TUid Uid() const = 0; + virtual CApaApplication* Application() const = 0; + +protected: + void UpdateAppsRefToThis(); +}; + +NONSHARABLE_CLASS(CApaExe) : public CApaAppHolder + { +public: + CApaExe(); + ~CApaExe(); + + TFileName FileName() const; + TUid Uid() const; + CApaApplication* Application() const; + + void CreateApplicationL(TApaApplicationFactory aApplicationFactory); // Uses the factory to create the application +private: + CApaApplication* iApplication; + HBufC* iAppName; + TUid iFileUid; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APAFLREC.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APAFLREC.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,340 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include +#include +#include +#include "APASTD.H" +#include "APGCLI.H" + +#ifdef USING_ECOM_RECOGS +#include +#endif + +// +//CFileRecognizerExtension Class +// +//stores the destructor key to track the instance of ecom implementation class +class CFileRecognizerExtension : public CBase + { +public: + static CFileRecognizerExtension* NewL(TUid aDtorKey); + ~CFileRecognizerExtension(); + //returns the destructor key + TUid DestructorUid()const; +private: + CFileRecognizerExtension(TUid aDtorKey); +private: + //destructor key to track the instance of ecom implementation class + TUid iDtorKey; + }; + +// +// Class CApaFileRecognizer +// + +EXPORT_C CApaFileRecognizer::CApaFileRecognizer(RFs& aFs) + :iFs(aFs) + {} + + +EXPORT_C CApaFileRecognizer::~CApaFileRecognizer() + { + DestroyRecognizerList(); + delete iAppLocator; + //lint -esym(1740,CApaFileRecognizer::iFileRecognizerList) not directly freed - see DestroyRecognizerList() + } + + +EXPORT_C void CApaFileRecognizer::DestroyRecognizerList() +// this method exists to allow subclassers to destroy the list earlier if they wish + { + CApaFileRecognizerType* rec=iFileRecognizerList; + //delete one element after the other in the list + while (rec!=NULL ) + { + CApaFileRecognizerType* prev=NULL; + prev = rec; + rec=rec->iNext; + delete prev; + } + iFileRecognizerList=NULL; + } + + +EXPORT_C void CApaFileRecognizer::SetAppLocator(CApaAppLocator* aAppLocator) +// takes ownership of the locator + { + iAppLocator = aAppLocator; + } + +static TUidType UidTypeL(const TDesC& aFullFileName, const RFs& aFs) + { + _LIT(KSysBin, "\\sys\\bin\\"); + if (TParsePtrC(aFullFileName).Path().CompareF(KSysBin)==0) + { + RLoader loader; + User::LeaveIfError(loader.Connect()); + CleanupClosePushL(loader); + TPckgBuf dllInfo; + User::LeaveIfError(loader.GetInfo(aFullFileName, dllInfo)); + CleanupStack::PopAndDestroy(&loader); + return dllInfo().iUids; + } + TEntry entry; + User::LeaveIfError(aFs.Entry(aFullFileName,entry)); + return entry.iType; + } + +EXPORT_C CApaFileRecognizerType* CApaFileRecognizer::RecognizeFileL(const TDesC& aFullFileName,const TUidType* aUidType) +// Returns the specific recognizer if the file is recogized as a runnable file. or NULL if not. +// TUidType is optional, if not supplied it will be read from the file. +// Leaves, if any files required cannot be found or if OOM. +// Leaves with KErrNotSupported, if file cannot be recognized. + { + const TUidType uidType((aUidType!=NULL)? *aUidType: UidTypeL(aFullFileName, iFs)); + CApaFileRecognizerType* rec=iFileRecognizerList; + CApaFileRecognizerType::TRecognizedType type; + while (rec!=NULL) + { + type=rec->RecognizeFileL(iFs,aFullFileName,uidType); + if (type==CApaFileRecognizerType::EOtherFile) + { + rec=NULL; // Recognised but not runnable so stop search now + break; + } + if (type!=CApaFileRecognizerType::ENotRecognized) + { + break; + } + rec=rec->iNext; + } + if (rec==NULL) + { + User::Leave(KErrNotSupported); + } + return rec; + } + +EXPORT_C void CApaFileRecognizer::AddFileRecognizerType(CApaFileRecognizerType* aFileRecognizerType) +// Add given RecognizerType to the end of the recognizer list. +// Set's it's iFileRecognizer pointer to "this" - recognizers may call AppDataByUid + { + aFileRecognizerType->iNext=NULL; + aFileRecognizerType->iFileRecognizer=this; + CApaFileRecognizerType* rec=iFileRecognizerList; + if (rec==NULL) + iFileRecognizerList=aFileRecognizerType; + else + { + while (rec->iNext!=NULL) + rec=rec->iNext; + rec->iNext=aFileRecognizerType; + } + } + + +EXPORT_C TInt CApaFileRecognizer::RemoveFileRecognizerType(const CApaFileRecognizerType* aFileRecognizerType) +// remove the given recognizer from the list if it is not locked +// return an error code if removal failed + { + CApaFileRecognizerType* rec=iFileRecognizerList; + CApaFileRecognizerType* prev=NULL; + // find the recognizer in the list + while (rec!=NULL && rec!=aFileRecognizerType) + { + prev = rec; + rec=rec->iNext; + } + // did we find a match + if (!rec) + return KErrNotFound; + // is the matching recognizer locked + if (rec->Locked()) + return KErrLocked; + // remove the recognizer from the list, then delete it + if (prev) + prev->iNext = rec->iNext; + else + iFileRecognizerList = rec->iNext; + rec->iNext = NULL; + delete rec; + return KErrNone; + } + + +EXPORT_C CApaAppLocator* CApaFileRecognizer::AppLocator() const + { + __ASSERT_ALWAYS(iAppLocator,Panic(EPanicNoAppLocator)); + // + return iAppLocator; + } + + +// +// Class CApaFileRecognizerType +// + +EXPORT_C CApaFileRecognizerType::CApaFileRecognizerType():iFileRecognizerExtn(NULL) + { + } + + +EXPORT_C CApaFileRecognizerType::~CApaFileRecognizerType() + { +#ifdef USING_ECOM_RECOGS + //if ecom plugin is used destroy its implementation + if(iFileRecognizerExtn!=NULL) + { + REComSession::DestroyedImplementation(iFileRecognizerExtn->DestructorUid()); + delete iFileRecognizerExtn; + } +#else + iFileRecognizerExtn = NULL; +#endif + delete iCapabilityBuf; + delete iFullFileName; + iFileRecognizer = NULL; + iAppStarter = NULL; + iNext = NULL; + } + +EXPORT_C TThreadId CApaFileRecognizerType::AppRunL(const CApaCommandLine& aCommandLine) const + { + __ASSERT_ALWAYS(iAppStarter,Panic(EPanicNoAppStarter)); + // + return iAppStarter->StartAppL(aCommandLine); + } + +CApaFileRecognizerType::TRecognizedType CApaFileRecognizerType::RecognizeFileL(RFs& aFs,const TDesC& aFullFileName,TUidType aUidType) + { + // set the UID's and name + iFileType = aUidType[1]; + iAppUid = aUidType[2]; + delete iFullFileName; + iFullFileName = NULL; + iFullFileName = aFullFileName.AllocL(); + // + // see if we recognize it + iRecognizedType = ENotRecognized; + TRecognizedType type=DoRecognizeFileL(aFs,aUidType); + if (type==ENotRecognized) + { + delete iFullFileName; + iFullFileName=NULL; + } + else + { + if(!iCapabilityBuf) + { + // Actually, iCapabilityBuf is not needed anymore, but in order not to break BC, + // we must still support it (in case someone calls CApaFileRecognizerType::Capability). + iCapabilityBuf = new(ELeave) TApaAppCapabilityBuf; + iCapabilityBuf->FillZ(iCapabilityBuf->MaxLength()); + } + } + return type; + } + + +EXPORT_C void CApaFileRecognizerType::Capability(TDes8& aCapabilityBuf)const + { + __ASSERT_ALWAYS(iCapabilityBuf,Panic(EPanicCapabilityNotSet)); // capability has been called when no file has been recognized + // + TApaAppCapability::CopyCapability(aCapabilityBuf,*iCapabilityBuf); + } + + +EXPORT_C void CApaFileRecognizerType::Lock() + { + iLock++; + } + + +EXPORT_C void CApaFileRecognizerType::Unlock() + { + if (iLock>0) + iLock--; + } + + +TBool CApaFileRecognizerType::Locked()const + { + return (iLock>0); + } + +EXPORT_C void CApaFileRecognizerType::Reserved_1() + {} + +#ifdef USING_ECOM_RECOGS +// instantiate the ecom implementation class +EXPORT_C CApaFileRecognizerType* CApaFileRecognizerType::CreateFileRecognizerL(TUid aImplUid) + { + CApaFileRecognizerType* fileRecType = NULL; + TUid tempDtorKey = KNullUid; + fileRecType = static_cast(REComSession::CreateImplementationL(aImplUid, tempDtorKey)); + CleanupStack::PushL(fileRecType); + fileRecType->iFileRecognizerExtn=CFileRecognizerExtension::NewL(tempDtorKey); + CleanupStack::Pop(fileRecType); + return fileRecType; + } +#else +EXPORT_C CApaFileRecognizerType* CApaFileRecognizerType::CreateFileRecognizerL(TUid) + { + return NULL; + } +#endif + +CFileRecognizerExtension::CFileRecognizerExtension(TUid aDtorKey) + :iDtorKey(aDtorKey) + { + } + +CFileRecognizerExtension* CFileRecognizerExtension::NewL(TUid aDtorKey) + { + //instantiate CFileRecognizerExtension with the destructor key of the ecom implentation instance + CFileRecognizerExtension* self=new(ELeave) CFileRecognizerExtension(aDtorKey); + return self; + } + +CFileRecognizerExtension::~CFileRecognizerExtension() + { + } + +//returns the destructor key of the ecom implentation instance +TUid CFileRecognizerExtension::DestructorUid()const + { + return iDtorKey; + } + +// +// MApaAppStarter +// + +/** Constructor for MApaAppStarter. */ +EXPORT_C MApaAppStarter::MApaAppStarter() + { + } + +/** Reserved for future use */ +EXPORT_C void MApaAppStarter::MApaAppStarter_Reserved1() + { + } + +/** Reserved for future use */ +EXPORT_C void MApaAppStarter::MApaAppStarter_Reserved2() + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APAID.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APAID.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,379 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include +#include "APASTD.H" + + +///////////////////////////// +// TApaAppIdentifier +///////////////////////////// + +EXPORT_C TApaAppIdentifier::TApaAppIdentifier() +/** Constructs an empty application identifier. + +The data is not initialised. */ + {} + +EXPORT_C TApaAppIdentifier::TApaAppIdentifier(TUid aAppUid,const TFileName& aDllName) + : iAppUid(aAppUid), + iFullName(aDllName) +/** Constructs an application identifier from the specified application +DLL file name and extension, and the specified application UID. +@param aAppUid The application specific UID. +@param aDllName The filename and extension of the application DLL. */ + {} + +EXPORT_C void TApaAppIdentifier::ExternalizeL(RWriteStream& aStream)const +/** Externalises the application identifier to a write stream. + +@param aStream The write stream. */ + { + aStream<< iAppUid; + aStream<< iFullName; + } + +EXPORT_C void TApaAppIdentifier::InternalizeL(RReadStream& aStream) +/** Internalises the application identifier from a read stream. + +@param aStream The read stream. */ + { + aStream>> iAppUid; + aStream>> iFullName; + } + +///////////////////////////// +// TApaAppEntry +///////////////////////////// + +EXPORT_C TApaAppEntry::TApaAppEntry() + : iUidType(TUidType()), + iFullName(KNullDesC) +/** Constructs an empty application entry object. + +The full path name is empty, and the triplet of UIDs forming the UID type +are set to null UIDs. */ + {} + + +EXPORT_C TApaAppEntry::TApaAppEntry(const TUidType& aAppUidType,const TFileName& aDllName) + : iUidType(aAppUidType), + iFullName(aDllName) +/** Constructs an application entry object from the specified application +DLL full path name and UID type. +@param aAppUidType UID type. +@param aDllName Application DLL full path name. */ + {} + + +EXPORT_C void TApaAppEntry::ExternalizeL(RWriteStream& aStream)const +/** Externalises the application entry to a write stream. + +@param aStream The write stream. */ + { + aStream<< iUidType[0]; + aStream<< iUidType[1]; + aStream<< iUidType[2]; + aStream<< iFullName; + } + + +EXPORT_C void TApaAppEntry::InternalizeL(RReadStream& aStream) +/** Internalises the application entry from a read stream. + +@param aStream The read stream. */ + { + TUid uid1; + TUid uid2; + TUid uid3; + aStream>> uid1; + aStream>> uid2; + aStream>> uid3; + iUidType = TUidType(uid1,uid2,uid3); + aStream>> iFullName; + } + + +///////////////////////////// +// TApaAppInfo +///////////////////////////// + +EXPORT_C TApaAppInfo::TApaAppInfo() + : iUid(TUid()), + iFullName(KNullDesC), + iCaption(KNullDesC), + iShortCaption(KNullDesC) +/** Constructs an empty application information object. + +The full path name is empty, the captions are empty and the application specific +UID is set to the null UID. */ + {} + + +EXPORT_C TApaAppInfo::TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption) + : iUid(aAppUid), + iFullName(aDllName), + iCaption(aCaption), + iShortCaption(aCaption) +/** Constructs an application information object from the specified full DLL path +name, UID and full length caption. + +@param aAppUid The application specific UID. +@param aDllName The full path name of the application DLL. +@param aCaption The application caption. */ + {} + +EXPORT_C TApaAppInfo::TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption) + : iUid(aAppUid), + iFullName(aDllName), + iCaption(aCaption), + iShortCaption(aShortCaption) +/** Constructs an application information object from the specified full DLL path +name, UID, caption and short caption. + +@param aAppUid The application specific UID. +@param aDllName The full path name of the application DLL. +@param aCaption The application caption. +@param aShortCaption The application short caption. */ + {} + +EXPORT_C void TApaAppInfo::ExternalizeL(RWriteStream& aStream)const +/** Externalises the application information to a write stream. + +@param aStream The write stream. */ + { + aStream<< iUid; + aStream<< iFullName; + aStream<< iCaption; + aStream<< iShortCaption; + } + +EXPORT_C void TApaAppInfo::InternalizeL(RReadStream& aStream) +/** Internalises the application information from a read stream. + +@param aStream The read stream. */ + { + aStream>> iUid; + aStream>> iFullName; + aStream>> iCaption; + aStream>> iShortCaption; + } + + +///////////////////////////// +// TApaAppViewInfo +///////////////////////////// + +EXPORT_C TApaAppViewInfo::TApaAppViewInfo() + : iUid(KNullUid), + iViewCaption(KNullDesC) +/** Constructs an empty object. + +Specifically, it sets the view UID to KNullUid and empties the application +caption, i.e. sets it to KNullDesC. */ + {} + + +EXPORT_C TApaAppViewInfo::TApaAppViewInfo(TUid aAppUid,const TApaAppCaption& aViewCaption, TInt aScreenMode) + : iUid(aAppUid), + iViewCaption(aViewCaption), + iScreenMode(aScreenMode) + {} + + +EXPORT_C void TApaAppViewInfo::ExternalizeL(RWriteStream& aStream)const +/** Externalises the application view information to a write stream. + +@param aStream The write stream. */ + { + aStream<< iUid; + aStream<< iViewCaption; + aStream.WriteInt32L(iScreenMode); + } + + +EXPORT_C void TApaAppViewInfo::InternalizeL(RReadStream& aStream) +/** Internalises the application view information from a read stream. + +@param aStream The read stream. */ + { + aStream>> iUid; + aStream>> iViewCaption; + iScreenMode=aStream.ReadInt32L(); + } + + +/////////////////////////////////////// +// class TApaAppCapability +/////////////////////////////////////// + +EXPORT_C void TApaAppCapability::InternalizeL(RReadStream& aStream) + { + DoInternalizeL(aStream, iLaunchInBackground, iGroupName); + } + +EXPORT_C void TApaAppCapability::Internalize7_0L(RReadStream& aStream) +/** +@deprecated +*/ + { + TBool dummyBool; + TApaAppGroupName dummyGroupName; + DoInternalizeL(aStream,dummyBool,dummyGroupName); + } + +void TApaAppCapability::DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName) +/** Internalises the application capabilities from a read stream. + +@param aStream The read stream. */ + { + TInt version = aStream.ReadInt32L(); + iEmbeddability = TEmbeddability(aStream.ReadInt32L()); + iSupportsNewFile = aStream.ReadInt32L(); + iAppIsHidden = aStream.ReadInt32L(); + + // initialise values of members which may not be in the stream + aLaunchInBackground = EFalse; + aGroupName.Zero(); + + if (version==1) + return; + + // Calypso extension to allow apps to be launched in the background + aLaunchInBackground = aStream.ReadInt32L(); + if (version==2) + return; + + aStream >> aGroupName; + if (version == 3) + return; + + iAttributes = aStream.ReadUint32L(); + if (version == 4) + return; + + Panic(EDPanicInvalidVersionNumber); + } + +EXPORT_C void TApaAppCapability::ExternalizeL(RWriteStream& aStream) const +/** Externalises the application capabilities to a write stream. + +@param aStream The write stream. */ + { + aStream.WriteInt32L(EVersion); + aStream.WriteInt32L(iEmbeddability); + aStream.WriteInt32L(iSupportsNewFile); + aStream.WriteInt32L(iAppIsHidden); + aStream.WriteInt32L(iLaunchInBackground); + aStream << iGroupName; + aStream.WriteUint32L(iAttributes); + } + +const TInt KOldVersion=1; + +EXPORT_C void TApaAppCapability::Externalize7_0L(RWriteStream& aStream) const +/** Externalises the application capabilities to a write stream. + +@param aStream The write stream. +@deprecated*/ + { + aStream.WriteInt32L(KOldVersion); + aStream.WriteInt32L(iEmbeddability); + aStream.WriteInt32L(iSupportsNewFile); + aStream.WriteInt32L(iAppIsHidden); + } + +EXPORT_C void TApaAppCapability::CopyCapability(TDes8& aDest,const TDesC8& aSource) +/** A utility function that can copy capability information from one descriptor +to another. + +@param aDest Target descriptor. +@param aSource Source descriptor. */ + { + TInt maxLen=aDest.MaxLength(); + aDest.FillZ(maxLen); // zero fill in case aSource is shorter + aDest.Copy(aSource.Left(Min(aSource.Length(),maxLen))); + aDest.SetLength(maxLen); + } + + +/////////////////////////////////////// +// class TApaEmbeddabilityFilter +/////////////////////////////////////// +EXPORT_C TApaEmbeddabilityFilter::TApaEmbeddabilityFilter() + : iEmbeddabilityFlags(0) +/** Constructs an empty embeddability filter. */ + { + } + +EXPORT_C void TApaEmbeddabilityFilter::AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) +/** Adds aEmbeddability to the filter. + +@param aEmbeddability TEmbeddability value to add to the filter. */ + { + __ASSERT_ALWAYS(aEmbeddability >= 0 && static_cast(aEmbeddability) < (sizeof(TUint)*8), Panic(EPanicEmbeddabilityOutOfRange)); + iEmbeddabilityFlags |= (1 << aEmbeddability); + } + +EXPORT_C TBool TApaEmbeddabilityFilter::MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const +/** Compares aEmbeddability with the filter. + +@param aEmbeddability TEmbeddability value to compare. +@return True, if aEmbeddability is included in the filter; false, otherwise. */ + { + __ASSERT_ALWAYS(aEmbeddability >= 0 && static_cast(aEmbeddability) < (sizeof(TUint)*8), Panic(EPanicEmbeddabilityOutOfRange)); + TUint embeddabilityFlag = (1 << aEmbeddability); + if (embeddabilityFlag & iEmbeddabilityFlags) + { + return ETrue; + } + return EFalse; + } + +// +// CApaAppFinder +// + +/** Constructor for CApaAppFinder */ +EXPORT_C CApaAppFinder::CApaAppFinder() + { + } + +/* Reserved for future use */ +EXPORT_C void CApaAppFinder::CApaAppFinder_Reserved1() + { + } + +/* Reserved for future use */ +EXPORT_C void CApaAppFinder::CApaAppFinder_Reserved2() + { + } + +// +// CApaAppServiceInfoArray +// + +EXPORT_C CApaAppServiceInfoArray::CApaAppServiceInfoArray() + { + } + +EXPORT_C void CApaAppServiceInfoArray::CApaAppServiceInfoArray_Reserved1() + { + } + +EXPORT_C void CApaAppServiceInfoArray::CApaAppServiceInfoArray_Reserved2() + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APAMDR.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APAMDR.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,676 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APASTD.H" // Panics etc. +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef _UNICODE +#define KUidApaDoorBaseStream KUidApaDoorBaseStream16 +#else +#define KUidApaDoorBaseStream KUidApaDoorBaseStream8 +#endif + +#ifdef _UNICODE +const TUid KUidApaDoorBaseStream16={0x10003A36}; +#else +const TUid KUidApaDoorBaseStream8={0x10000146}; +#endif +const TInt KHugeGranularity=4096; // 4k granularity for the door's host buffer + +//////////////////////////////////// +// HBufBuf +//////////////////////////////////// + +class HBufBuf : public TBufBuf + { +public: + static HBufBuf* NewL(CBufBase& aBuf,TInt aPos,TInt aMode=ERead|EWrite); +private: + void DoRelease(); + }; + + +HBufBuf* HBufBuf::NewL(CBufBase& aBuf,TInt aPos,TInt aMode) +// +// Create a pre-set buffer stream buffer. +// + { + HBufBuf* buf=new(ELeave) HBufBuf; + buf->Set(aBuf,aPos,aMode); + return buf; + } + + +void HBufBuf::DoRelease() +// +// Finished with this stream buffer. +// + { + delete this; + } + + +//////////////////////////////////// +// CApaDoorBase +//////////////////////////////////// + +EXPORT_C CApaDoorBase::CApaDoorBase() + { + } + +EXPORT_C void CApaDoorBase::ExternalizeBaseStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const +/** Externalises the information contained in this base class to a stream in the +specified store. + +The resulting stream ID is associated with an internal UID, and placed in +the specified stream dictionary. + +@publishedAll +@released +@param aStore The store to contain the stream. +@param aStreamDict The stream dictionary to contain the stream ID (and an associated +internal UID). */ + { + RStoreWriteStream stream; + TStreamId id=stream.CreateLC(aStore); + // + // write the format + if (iFormat==ETemporarilyIconic) + stream.WriteInt8L(EGlassDoor); + else + stream.WriteInt8L(iFormat); + // + // write the size + TSize size; + if (iFormat==ETemporarilyIconic) + size = GlassDoorSize(); + else + GetSizeInTwips(size); + stream<< size; + // + // write the source and close + stream<< iSource; + stream.CommitL(); + CleanupStack::PopAndDestroy(); // stream + aStreamDict.AssignL(KUidApaDoorBaseStream,id); + } + + + +EXPORT_C TSize CApaDoorBase::InternalizeBaseStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict) +/** Internalises the information for this base class from a stream in the specified +store, and returns the size of the icon or glass door. + +The stream ID is extracted from the specified stream dictionary. The UID associated +with the stream ID is the same as that used when externalising. + +@publishedAll +@released +@param aStore The store containing the stream. +@param aStreamDict The steam dictionary containing the stream ID. +@return The size of the icon or glass door, in twips. */ + { + TStreamId id=aStreamDict.At(KUidApaDoorBaseStream); + if (id==KNullStreamId) + User::Leave(KErrCorrupt); // there is no base stream - the file is not valid (used to panic EPanicNoBaseDoorStream) + RStoreReadStream stream; + stream.OpenLC(aStore,id); + iFormat = (TFormat)stream.ReadInt8L(); + __ASSERT_DEBUG(iFormat==EIconic || iFormat==EGlassDoor,Panic(EDPanicIllegalDoorFormat)); + TSize size; + stream>> size; + stream>> iSource; + CleanupStack::PopAndDestroy(); // stream + return size; + } + +// Virtual functions from CPicture + +EXPORT_C TStreamId CApaDoorBase::StoreL(CStreamStore& aStore) const +/** Stores the Embedded Document to the specified store. + +@publishedAll +@released +@param aStore The store containing the stream. +@return The ID of the (head) stream used to store the Embedded Document */ + { + return CPicture::StoreL(aStore); + } + +EXPORT_C void CApaDoorBase::SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight) +/** Sets the Embedded Document's scale factors + +@publishedAll +@released +@param aScaleFactorWidth The width scale factor, in percent +@param aScaleFactorHeight The height scale factor, in percent +*/ + { + CPicture::SetScaleFactor(aScaleFactorWidth, aScaleFactorHeight); + } + +EXPORT_C void CApaDoorBase::SetCropInTwips(const TMargins& aMargins) +/** Sets the cropping margins of a Embedded Document in twips. +These are relative to the original unscaled size of the Embedded Document. + +@publishedAll +@released +@param aMargins The cropping margins of the Embedded Document, in twips +*/ + { + CPicture::SetCropInTwips(aMargins); + } + +EXPORT_C TPictureCapability CApaDoorBase::Capability() const +/** Gets the Embedded Document's capabilities. +These include whether it is scalable and croppable. + +@publishedAll +@released +@return The capabilities of the Embedded Document +*/ + { + return CPicture::Capability(); + } + +EXPORT_C void CApaDoorBase::GetCropInTwips(TMargins& aMargins) const +/** Gets the cropping margins of a Embedded Document in twips. +These margins are relative to the original unscaled size of the Embedded Document. + +@publishedAll +@released +@param aMargins The cropping margins of the Embedded Document, in twips +*/ + { + CPicture::GetCropInTwips(aMargins); + } + +EXPORT_C TInt CApaDoorBase::ScaleFactorWidth() const +/** Gets the Embedded Document's width scale factor. + +@publishedAll +@released +@return The width scale factor, in percent +*/ + { + return CPicture::ScaleFactorWidth(); + } + +EXPORT_C TInt CApaDoorBase::ScaleFactorHeight() const +/** Gets the Embedded Document height scale factor. + +@publishedAll +@released +@return The height scale factor, in percent +*/ + { + return CPicture::ScaleFactorHeight(); + } + +EXPORT_C TBool CApaDoorBase::LineBreakPossible(TUint aClass,TBool aBeforePicture,TBool aHaveSpaces) const +/** States whether a line break is possible, either before or after an Embedded Document. +The default implementation returns ETrue, implying that there is a break opportunity both before and after the Embedded Document, whether or not a space is present. +This may be overridden for special types of Embedded Documents. + +@publishedAll +@released +@param aClass The line breaking class of the adjacent character +@param aBeforePicture ETrue, if the adjacent character is before the Embedded Document; EFalse, if the adjacent character is afterwards +@param aHaveSpaces ETrue, if spaces occur between the adjacent character and the Embedded Document; EFalse, otherwise +@return ETrue, if a line break is possible; EFalse, otherwise. +*/ + { + return CPicture::LineBreakPossible(aClass, aBeforePicture, aHaveSpaces); + } + +EXPORT_C TBool CApaDoorBase::NativePixelSize(TSize& aPixelSize) +/** Returns the native pixel size of the bitmap. + +Derived classes might be implemented as bitmaps, in that case it might be interesting to know this. +@publishedAll +@released +@param aPixelSize The pixel size +@return TBool ETrue, if the derived classes are implemented as bitmaps; EFalse, otherwise. +*/ + { + return CPicture::NativePixelSize(aPixelSize); + } + +/** Reserved for future use */ +EXPORT_C void CApaDoorBase::CApaDoorBase_Reserved1() + { + } + +/** Reserved for future use */ +EXPORT_C void CApaDoorBase::CApaDoorBase_Reserved2() + { + } + +/////////////////////////////////// +// TApaModelDoorFactory +/////////////////////////////////// + +EXPORT_C TApaModelDoorFactory::TApaModelDoorFactory(const MApaModelHeaderFactory* aFactory) + :iHeaderFactory(aFactory) +/** Constructs a door factory object. + +@param aFactory A pointer to a factory object for constructing the application +model wrapper object, also known as the application model header, a CApaModelHeader +type. The application model wrapper is provided by the application model (not +the application UI), and supplies the knowledge for internalizing the application +model data from an embedded store. +@see CApaModelHeader +@see MApaModelHeaderFactory */ + {} + + +EXPORT_C void TApaModelDoorFactory::NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const +/** Constructs and restores an application's door (picture) from a stream in the +specified store. + +The restored door is a CApaModelDoor type object. + +@param aPictureHeader The header identifying the door to be restored. The +UID identifying the door must be KUidPictureTypeDoor, otherwise the function +leaves with KErrNotSupported. On entry, the door picture must be represented +by a stream ID, otherwise the function leaves with KErrBadHandle; on return, +the door picture is represented by a pointer to an internalized CApaModelDoor +object. +@param aPictureStore The store from which the door will be restored. +@see TPictureHeader::iPicture */ + { + if (aPictureHeader.iPictureType!=KUidPictureTypeDoor) + User::Leave(KErrNotSupported); // wrong type + if (!aPictureHeader.iPicture.IsId()) + User::Leave(KErrBadHandle); // not an id - can't restore + // + // create and restore the door + TStreamId id = aPictureHeader.iPicture.AsId(); + aPictureHeader.iPicture = CApaModelDoor::NewL(aPictureStore,id,iHeaderFactory); + } + + +/////////////////////////////////// +// CApaModelDoor +/////////////////////////////////// + + +EXPORT_C CApaModelDoor* CApaModelDoor::NewL(CApaModelHeader* aHeader) +/** Creates a model door object. + +@param aHeader A pointer to an existing concrete application model wrapper +object. +@return A pointer to the new model door object. */ + { + CApaModelDoor* self = new(ELeave) CApaModelDoor(aHeader); + return self; + } + + +EXPORT_C CApaModelDoor* CApaModelDoor::NewLC(CApaModelHeader* aHeader) +/** Creates a model door object, and puts a pointer to it onto the cleanup stack. + +@param aHeader A pointer to an existing concrete application model wrapper +object. +@return A pointer to the new model door object. */ + { + CApaModelDoor* self = CApaModelDoor::NewL(aHeader); + CleanupStack::PushL(self); + return self; + } + + +EXPORT_C CApaModelDoor* CApaModelDoor::NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory) +/** Creates a model door object and restores it from an embedded store within the +specified store. + +@param aStore The store from which the model door is to be restored. +@param aHeadStreamId The head stream ID. This is the ID of the stream containing +the stream dictionary which is restored as part of the process of creating +this model door object. The stream dictionary contains the ID of the stream +hosting the embedded store. +@param aFactory A pointer to a factory object for constructing the application +model wrapper object, also known as the application model header, a CApaModelHeader +type. +@return A pointer to the new model door object. +@see MApaModelHeaderFactory */ + { + CApaModelDoor* self = new(ELeave) CApaModelDoor(); + CleanupStack::PushL(self); + self->RestoreL(aStore,aHeadStreamId,aFactory); + CleanupStack::Pop(); + return self; + } + + +CApaModelDoor::CApaModelDoor() + {__DECLARE_NAME(_S("CApaModelDoor"));} + + +CApaModelDoor::CApaModelDoor(CApaModelHeader* aHeader) + :iModelHeader(aHeader) + {} + + +EXPORT_C CApaModelDoor::~CApaModelDoor() +/** Destructor. + +Frees all resources owned by the object, prior to its destruction. */ + { + delete iModelHeader; + delete iStore; + delete iStoreHost; + } + + +EXPORT_C TStreamId CApaModelDoor::StoreL(CStreamStore& aTargetStore)const +/** Stores the model data in the specified store as an embedded store. + +The function stores the model data, if the model exists in memory, otherwise, +it simply copies the stream containing the embedded document into the specified +store. + +@param aStore The store in which the model data is to be stored. +@return The stream ID of the head stream for the embedded model data. This +stream contains the stream dictionary through which the embedded data and +its door can be restored. */ + { + // create stream dictionary + CStreamDictionary* streamDic = CStreamDictionary::NewLC(); + // + // stream out door's state + ExternalizeBaseStreamL(aTargetStore,*streamDic); + // + // store the model + TStreamId id; + RStoreWriteStream stream; + if (iModelHeader) + { + // create an embedded store in a new write stream + id = stream.CreateL(aTargetStore); + CEmbeddedStore* target=CEmbeddedStore::NewLC(stream); // takes ownership of stream + streamDic->AssignL(KUidApaDoorDocStream,id); + // store the model + CStreamDictionary* rootDict=CStreamDictionary::NewLC(); + iModelHeader->StoreL(*target,*rootDict); + CApaProcess::WriteRootStreamL(*target,*rootDict,iModelHeader->AppId()); + CleanupStack::PopAndDestroy(); // rootDict + // close the new embedded store + target->CommitL(); + CleanupStack::PopAndDestroy(); // target + } + else if (iStore) + { + RStoreWriteStream trg; + id = trg.CreateLC(aTargetStore); + CopyStoreL(*iStore,trg); + CleanupStack::PopAndDestroy(); // trg + streamDic->AssignL(KUidApaDoorDocStream,id); + } + else + Panic(EPanicNoModelHeaderWhenStoring); // impossible situation + // + // store the stream dictionary and return its stream id + id = stream.CreateLC(aTargetStore); + stream<< *streamDic; + stream.CommitL(); + CleanupStack::PopAndDestroy(2); // stream,streamDic + return id; + } + + +void CApaModelDoor::CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream) +// static method +// copies an embedded store containing a doc to aTargetStream +// + { + // read the contents of aSourceStore's rootstream (so I can write it out in a mo') + CStreamDictionary* root=ReadStreamDictionaryLC(aSourceStore,aSourceStore.Root()); + // + // copy the source store directly + MStreamBuf* host=aSourceStore.Host(); + TStreamPos pos=aSourceStore.Position(aSourceStore.Root()); + host->SeekL(host->ERead,EStreamBeginning); + RReadStream stream(host); + aTargetStream.WriteL(stream,pos.Offset()); + // + // write the root stream + aTargetStream<< *root; + aTargetStream.CommitL(); + CleanupStack::PopAndDestroy(); // root + } + + +EXPORT_C void CApaModelDoor::RestoreL(const CStreamStore& aSourceStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory) +/** Restores the embedded model data from the specified store. + +@param aStore The store from which the embedded model data is to be restored. +@param aHeadStreamId The stream ID of the head stream for the embedded model +data. This stream contains the stream dictionary through which the embedded +model data and its door can be restored. +@param aFactory A pointer to a factory object for constructing the application +model wrapper object, also known as the application model header, a CApaModelHeader +type. The application model wrapper is provided by the application model (not +the application UI), and supplies the knowledge for internalizing the application +model data from an embedded store. The pointer must not be null, otherwise +the function raises an APPARC 22 panic. */ + { + __ASSERT_ALWAYS(aFactory,Panic(EPanicNoFactory)); + // + delete iStore; + delete iStoreHost; + iStore=NULL; + iStoreHost = NULL; + // + // internalize the streamDic from the headstream + CStreamDictionary* streamDic=ReadStreamDictionaryLC(aSourceStore,aHeadStreamId); + // + // internalize the door's state + TSize size=InternalizeBaseStreamL(aSourceStore,*streamDic); + SetSizeInTwips(size); + // + // internalize the embedded store + RStoreReadStream src; + src.OpenL(aSourceStore,streamDic->At(KUidApaDoorDocStream)); + CleanupStack::PopAndDestroy(); // streamDic + streamDic = NULL; + iStore = CEmbeddedStore::FromL(src); + // + // check for a security stream, then internalize the model + TRAP_IGNORE(InternalizeModelL(*aFactory)); //lint !e613 Possible use of null pointer - Asserted above + // ignore any leave, we still have the data in the store to fall back on + } + + +void CApaModelDoor::InternalizeModelL(const MApaModelHeaderFactory& aFactory) +// internalizes the model if the data is not encrypted +// if the factory does not recognize the doc type, NewHeaderL() will leave (probably KErrNotSupported) + { + CStreamDictionary* streamDic = ReadStreamDictionaryLC(*iStore,iStore->Root()); + if (streamDic->At(KUidSecurityStream)==KNullStreamId) + {// not encrypted, so internalize the model + TApaAppIdentifier appId = CApaProcess::ReadAppIdentifierL(*iStore,*streamDic); + iModelHeader = aFactory.NewHeaderL(*iStore,*streamDic,appId); + } + CleanupStack::PopAndDestroy(); // streamDic + } + + +CStreamDictionary* CApaModelDoor::ReadStreamDictionaryLC(const CStreamStore& aSourceStore,TStreamId aStreamId) +// static method +// + { + // read the stream dic from the doc's root stream + CStreamDictionary* streamDic=CStreamDictionary::NewLC(); + RStoreReadStream stream; + stream.OpenLC(aSourceStore,aStreamId); + stream>> *streamDic; + CleanupStack::PopAndDestroy(); // root + return streamDic; + } + + +TSize CApaModelDoor::GlassDoorSize()const + { + TSize size; + GetSizeInTwips(size); + return size; + } + + +EXPORT_C void CApaModelDoor::DetachFromStoreL(TDetach aDegree) +/** Restores the model to the specified degree. + +@param aDegree The degree to which restoration is needed. */ + { + if (iModelHeader) + { + iModelHeader->DetachFromStoreL(aDegree); + if (!iStoreHost) + { + delete iStore; + iStore = NULL; + } + } + else if (!iStoreHost) + { + if (aDegree==EDetachDraw) + { + delete iStore; + iStore = NULL; + // now all I can do is draw as I am, any attempt to change me will result in a panic + } + else + { + __ASSERT_ALWAYS(iStore,Panic(EPanicNoStoreOnDetach)); + // instantiate the mem buffer, and a stream to write to it + CBufSeg* bufSeg = CBufSeg::NewL(KHugeGranularity); + CleanupStack::PushL(bufSeg); + HBufBuf* buf=HBufBuf::NewL(*bufSeg,0); + RWriteStream writeStream(buf); + writeStream.PushL(); + // write the store to the mem buffer + CopyStoreL(*iStore,writeStream); + CleanupStack::Pop(2); // bufSeg,writeStream + // + // set iStoreHost as host for the embedded store + MStreamBuf* host=iStore->Host(); + __ASSERT_ALWAYS(host!=NULL,Panic(EDPanicNoHostForStore)); + iStore->Detach(); + host->Release(); //lint !e613 Possible use of null pointer - Asserted above + iStore->Reattach(buf); + iStoreHost = bufSeg; + } + } + } + + + +EXPORT_C void CApaModelDoor::Draw(CGraphicsContext& /*aGc*/,const TPoint& /*aTopLeft*/,const TRect& /*aClipRect*/, + MGraphicsDeviceMap* /*aMap*/)const +/** +Not supported; if called, raises an APPARC 17 panic. +@removed +*/ + { + Panic(EPanicNotSupported); + } + + + + +EXPORT_C void CApaModelDoor::ExternalizeL(RWriteStream& /*aStream*/)const +/** +Not supported; if called, raises an APPARC 17 panic. +@removed +*/ + { + Panic(EPanicNotSupported); + } + + +EXPORT_C void CApaModelDoor::GetOriginalSizeInTwips(TSize& aSize)const +/** Gets the door's original size, in twips. + +@param aSize This size, in twips. */ + { + aSize = TSize(500,500); // ? + } + + +EXPORT_C void CApaModelDoor::SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight) +/** Sets the door's scale factors. + +@param aScaleFactorWidth The width scale factor, in percent. +@param aScaleFactorHeight The height scale factor, in percent. */ + { + iScaleFactor.iWidth = aScaleFactorWidth; + iScaleFactor.iHeight = aScaleFactorHeight; + } + + +EXPORT_C TInt CApaModelDoor::ScaleFactorWidth()const +/** Gets the door's width scale factor. + +@return The width scale factor, in percent. */ + { + return iScaleFactor.iWidth; + } + + +EXPORT_C TInt CApaModelDoor::ScaleFactorHeight()const +/** Gets the door's height scale factor. + +@return The height scale factor, in percent. */ + { + return iScaleFactor.iHeight; + } + +// CApaModelHeader + +/** Constructor for CApaModelHeader */ +EXPORT_C CApaModelHeader::CApaModelHeader() + { + } + +/** Reserved for future use */ +EXPORT_C void CApaModelHeader::Reserved_1() + {} + +/** Reserved for future use */ +EXPORT_C void CApaModelHeader::Reserved_2() + {} + +// MApaModelHeaderFactory + +/** Constructor for MApaModelHeaderFactory */ +EXPORT_C MApaModelHeaderFactory::MApaModelHeaderFactory() + {} + +/** Reserved for future use */ +EXPORT_C void MApaModelHeaderFactory::MApaModelHeaderFactory_Reserved1() + {} + +/** Reserved for future use */ +EXPORT_C void MApaModelHeaderFactory::MApaModelHeaderFactory_Reserved2() + {} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APASTD.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APASTD.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APASTD.H" +#include + +GLDEF_C void Panic(TApaPanic aPanic) +// +// Panic the process with APPARC as the category. +// + { + _LIT(KAppArcPanic,"APPARC"); + User::Panic(KAppArcPanic,aPanic); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APASTD.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APASTD.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,86 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__APASTD_H__) +#define __APASTD_H__ + +#if !defined(__E32STD_H__) +#include +#endif + +enum TApaPanic + { + EPanicApplicationAlreadyExists, + EPanicDocumentNotCreated, + EPanicCapabilityNotSet, + EPanicNotExactlyOneDoc, + EPanicMoreThanOneDoc, + EPanicAppListNotEmpty, + EPanicDocListNotEmpty, + EPanicFileNameTooLong, + EPanicNoGlassDoorMethodSupplied, + EPanicNoModelHeaderWhenStoring, + EPanicNoBaseDoorStream, + EPanicAppNotInList, + EPanicNoCleanupItem, + EPanicNoApplication, + EPanicNoAppStarter, + EPanicNoAppLocator, + EPanicNoIconInDoor, + EPanicNotSupported, + EPanicNoStreamDic, + EPanicNoAppFinder, + EPanicNoDocument, + EPanicNoCaption, + EPanicNoFactory, + EPanicNoStore, + EPanicNoStoreOnDetach, + EPanicWrongStoreType, + // + EDPanicNoApp, + EDPanicDocWithNoApp, + EDPanicRemovingNullApp, + EDPanicIllegalDoorFormat, + EDPanicNoHostForStore, + EDPanicWrongCommand, + // + EPanicEmbeddabilityOutOfRange, + // + EPanicBadApplicationFactoryType, + EPanicUidsDoNotMatch, + // + EPanicServerDifferentiatorZero, + // + EPanicInvalidHandle, + EPanicHandleAlreadySet, + EPanicInvalidSubSession, + EPanicEnvironmentSlotNotForPublicUse, + EPanicBadHeapCellRestorerState, + // + EPanicInvalidScreenNumber, + EPanicNullPointer, + EDPanicInvalidToken, + EDPanicNoAppRemover, + EDPanicNoProcess, + EDPanicNoAppHolder, + EDPanicInvalidVersionNumber + }; + + +GLREF_C void Panic(TApaPanic aPanic); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APPARC.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APPARC.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1387 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include // stuff everyone will want ie most things +#include // CleanupStack protection for CApaDocument +#include "APADLL.H" // CApaDll CApaExe CApaAppHolder +#include "APASTD.H" // Panics etc. +#include // KExecutableImageUid + +#include +#include +#include + +#ifdef USING_ECOM_RECOGS +#include +#include +#endif + +#include "../apparc/TRACE.H" + +const TInt KAppProcessArrayGranularity(1); + +_LIT(KApplicationLocation,"\\sys\\bin\\"); + +///////////////////////////// +// Doc cleanup method +///////////////////////////// + +EXPORT_C void TApaDocCleanupItem::DoCleanup(TAny* aPtr) + { + __ASSERT_ALWAYS(aPtr,Panic(EPanicNoCleanupItem)); + TApaDocCleanupItem* cleanup = reinterpret_cast(aPtr); + __ASSERT_ALWAYS(cleanup->iApaProcess,Panic(EPanicNoCleanupItem));//lint !e613 Possible use of null pointer - Asserted above + cleanup->iApaProcess->DestroyDocument(cleanup->iApaDoc); //lint !e613 Possible use of null pointer - Asserted above + } + + +///////////////////////////// +// CApaAppHolder +///////////////////////////// + +CApaAppHolder::CApaAppHolder() + {} + + +CApaAppHolder::~CApaAppHolder() + { + } + +void CApaAppHolder::UpdateAppsRefToThis() + { + CApaApplication* app = Application(); + __ASSERT_ALWAYS(app,Panic(EPanicNoApplication)); + app->iAppHolder = this; //lint !e613 Possible use of null pointer - Asserted above + } + +#ifdef USING_ECOM_RECOGS +///////////////////////////// +// CApaExe +///////////////////////////// + +CApaExe::CApaExe() + {} + +CApaExe::~CApaExe() + { + delete iAppName; + delete iApplication; + } + +TFileName CApaExe::FileName()const + { + if (iAppName) + { + return *iAppName; + } + else + { + return KNullDesC(); + } + } + +TUid CApaExe::Uid()const + { + return iFileUid; + } + +CApaApplication* CApaExe::Application() const + { + return iApplication; + } + +void CApaExe::CreateApplicationL(TApaApplicationFactory aApplicationFactory) + { + __ASSERT_ALWAYS(!iApplication,Panic(EPanicApplicationAlreadyExists)); + iApplication = aApplicationFactory.CreateApplicationL(); + iFileUid = aApplicationFactory.AppFileUid(); + User::LeaveIfNull(iApplication); + iAppName = aApplicationFactory.AppFileNameL(); + UpdateAppsRefToThis(); + } + +#endif // USING_ECOM_RECOGS + +EXPORT_C void CApaDocument::OpenFileL(CFileStore*&, RFile&) + { + } + +EXPORT_C void CApaDocument::Reserved_2() + {} + + +///////////////////// +// CApaApplication +///////////////////// + +/** Constructor for CApaApplication */ +EXPORT_C CApaApplication::CApaApplication() + { + } + +EXPORT_C TFileName CApaApplication::AppFullName()const +/** Returns the full name and path of the application. + +The default implementation returns the full path name of the application DLL. + +An application can provide its own implementation. + +@return Full path name of the application. +@see CApaApplication::DllName() */ + { + return DllName(); + } + + +EXPORT_C TFileName CApaApplication::DllName()const +/** Returns the full name and path of the loaded application DLL. + +@return Full path name of the application DLL. */ + { + __ASSERT_DEBUG(iAppHolder, Panic(EDPanicNoAppHolder)); + return iAppHolder->FileName(); + } + + +EXPORT_C TInt CApaApplication::GenerateFileName(RFs& aFs,TFileName& aRootName) +/** Generates a unique filename based on the file name contained within the specified +full path name. + +If necessary, the function creates the directory structure that is defined +in the specified full path name. + +If the file name does not yet exist, then this is the file name chosen. If +this file name already exists, then a file name of the form: name(nn) is generated, +where nn are decimal digits. The value of nn is incremented until a name is +generated that is unique within the directory structure. A minimum of two +decimal digits is generated. + +The function is used by the UI framework. + +@param aFs Handle to a file server session. +@param aRootName The full path name. +@return KErrNone if successful, otherwise one of the other system-wide error +codes. Specifically: KErrBadName if the file name portion of the specified +full path name has invalid format; KErrArgument if the drive, path or file +name parts are missing from the specified full path name; KErrOverflow if +the generated filename becomes too long; KErrNoMemory if there is insufficient +memory to perform the operation. +@see CEikAppUi */ + { + // check that filename is valid + if (!aFs.IsValidName(aRootName)) + return KErrBadName; + // + // check that a drive, path and root filename have been specified + TParsePtr parsePtr(aRootName); + if (!parsePtr.DrivePresent() || !parsePtr.PathPresent() || !parsePtr.NamePresent()) + return KErrArgument; + // + // create the path if necessary + TInt ret=aFs.MkDirAll(parsePtr.DriveAndPath()); + if (ret!=KErrNone && ret!=KErrAlreadyExists) + return ret; + // + // Create the Rbuf object to hold a filename (return if no mem available) + RBuf newName; + ret = newName.Create(aRootName, KMaxFileName+8); + if (ret!=KErrNone) + return KErrNoMemory; + // + // generate a valid filename that doesn't already exist... + TEntry entry; + TInt i=1; + _LIT(KFormatStringOne,"%S%S(%02d)%S"); + TBuf<16> format; + format=KFormatStringOne; + while (aFs.Entry(newName,entry)==KErrNone) // Continue until DoesNotExist or PathDoesNotExist, etc + { + if (i>=100) + { + _LIT(KFormatStringTwo,"%S%S(%d)%S"); + format=KFormatStringTwo; + } + TPtrC driveAndPath=parsePtr.DriveAndPath(); + TPtrC name=parsePtr.Name(); + TPtrC ext=parsePtr.Ext(); + newName.Format(format,&driveAndPath,&name,i++,&ext); + if (newName.Length()>KMaxFileName) + { + newName.Close(); + return KErrOverflow; + } + } + // + // set the new filename and return + aRootName = newName; + newName.Close(); + return KErrNone; + } + + +EXPORT_C CDictionaryStore* CApaApplication::OpenIniFileL(RFs& aFs)const +/** Opens the .ini file associated with the application, constructs the dictionary +store object and returns a pointer to it. + +The implementation of this function is provided by the OpenIniFileLC() function. +The function pops the pointer returned by OpenIniFileLC() from the cleanup +stack. + +@param aFs Handle to a file server session. +@return A pointer to the dictionary store object representing the application's +.ini file. +@see CApaApplication::OpenIniFileLC() */ + { + CDictionaryStore* store=OpenIniFileLC(aFs); + CleanupStack::Pop(); // store + return store; + } + +EXPORT_C CApaApplication::~CApaApplication() + { +#ifdef USING_ECOM_RECOGS + if (iDtorKey!=TUid::Null()) // only some CApaApplication objects are ECom objects (i.e. only those corresponding to embedded applications, not top-level applications) + { + REComSession::DestroyedImplementation(iDtorKey); + } +#endif // USING_ECOM_RECOGS + iAppHolder = NULL; + } + +EXPORT_C void CApaApplication::NewAppServerL(CApaAppServer*& /*aAppServer*/) +/** Virtual function called by the framework when the application +has been launched as a server application. +Applications that wish to be used as server applications must +override this function to return their implemetation of the server. +@param aAppServer The server pointer to be set. */ + { + User::Leave(KErrNotSupported); + } + +/** Reserved for future use */ +EXPORT_C void CApaApplication::CApaApplication_Reserved1() + { + } + +/** Reserved for future use */ +EXPORT_C void CApaApplication::CApaApplication_Reserved2() + { + } + +///////////////////////////// +// CApaDocument +///////////////////////////// + +/** Constructor for CApaDocument */ +EXPORT_C CApaDocument::CApaDocument() + { + } + +EXPORT_C CApaDocument::CApaDocument(CApaApplication& aApp,CApaProcess& aProcess) + : iApplication(&aApp), + iApaProcess(&aProcess) +/** Constructs the document object with the specified application and process. + +Derived classes must define and implement a constructor through which both +the associated application and process can be specified. A typical implementation +calls this constructor through a constructor initialization list. + +@param aApp The application. +@param aProcess The process. +@see CEikDocument */ + {} + + +EXPORT_C CApaDocument::~CApaDocument() +/** Destructor. + +The implementation is empty. */ + { + iContainer = NULL; + iApplication = NULL; + iApaProcess = NULL; + } + + +EXPORT_C CApaDocument::TCapability CApaDocument::Capability() const +/** Gets the document's capabilities. + +Capabilities are encapsulated by an instance of a TCapability class, a public +class defined inside this class. + +The default implementation returns a default TCapability object, indicating +that the document does not support any of the defined capabilities. + +If a document does support one or more of the capabilities, it should override +this function to return a suitably initialised object. + +@return The document's capabilities */ + { + return TCapability(); + } + + +EXPORT_C void CApaDocument::ValidatePasswordL() const +/** Checks the document password. + +The default implementation is empty. + +If a document is intended to be password protected, the UI application should +provide an implementation that forces the user to enter the password and validate +the input. + +If the document is protected by a password and the password entered by the +user is incorrect, the function should leave with KErrLocked, otherwise it +should just return. */ + {} + + +EXPORT_C CPicture* CApaDocument::GlassPictureL() +// Return handle to glass picture, creating one if not already created. +// returns NULL as glass pictures are not supported by default +/** Gets an object that can draw a representation of the document's content. + +If the document supports being embedded as a glass door, then the UI application +must provide an implementation for this function. + +The default implementation raises an APPARC 8 panic. + +@return A pointer to a glass door. */ + { + Panic(EPanicNoGlassDoorMethodSupplied); + // + return NULL; + } + + +EXPORT_C void CApaDocument::ExternalizeL(RWriteStream& /*aStream*/)const + {} + +EXPORT_C CApaDocument::TCapability::TCapability() + :iCapability(0),TCapability_Reserved1(0) +/** Constructs a default capability object. + +All capabilities are marked as "not supported". */ + {} + +///////////////////////////// +// TApaAppHolderInfo +///////////////////////////// + +class TApaAppHolderInfo + { +public: + TApaAppHolderInfo(CApaAppHolder* aAppHolder); +public: + CApaAppHolder* iAppHolder; + TBool iToBeRemoved; + }; + +TApaAppHolderInfo::TApaAppHolderInfo(CApaAppHolder* aAppHolder) + :iAppHolder(aAppHolder), iToBeRemoved(EFalse) + { + } + +///////////////////////////// +// CApaParentProcessMonitor +///////////////////////////// + +class CApaParentProcessMonitor : public CActive + { +public: // Construction / destruction + static CApaParentProcessMonitor* NewL(TProcessId aProcessId); + ~CApaParentProcessMonitor(); + void ConstructL(); +private: + CApaParentProcessMonitor(TProcessId aProcessId); +public: // From CActive + void RunL(); + void DoCancel(); +private: + TProcessId iProcessId; + RProcess iProcess; + }; + +CApaParentProcessMonitor* CApaParentProcessMonitor::NewL(TProcessId aProcessId) + { + CApaParentProcessMonitor* self=new (ELeave) CApaParentProcessMonitor(aProcessId); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +CApaParentProcessMonitor::CApaParentProcessMonitor(TProcessId aProcessId) + : CActive(EPriorityLow) + { + iProcessId=aProcessId; + } + +CApaParentProcessMonitor::~CApaParentProcessMonitor() + { + Cancel(); + } + +void CApaParentProcessMonitor::ConstructL() + { + User::LeaveIfError(iProcess.Open(iProcessId)); + iProcess.Logon(iStatus); + if(iStatus==KErrNoMemory) + { + User::WaitForRequest(iStatus); + User::Leave(KErrNoMemory); + } + CActiveScheduler::Add(this); + SetActive(); + } + +void CApaParentProcessMonitor::RunL() + { + // Do something that will kill the child when the parent process terminates + if(iStatus==KErrNone) + { + RProcess proc; + proc.Terminate(KErrNone); + } + } + +void CApaParentProcessMonitor::DoCancel() + { + iProcess.LogonCancel(iStatus); + } + +///////////////////////////// +// CApaProcess +///////////////////////////// + +/** Constructor for CApaProcess */ +EXPORT_C CApaProcess::CApaProcess() + { + } + +EXPORT_C CApaProcess* CApaProcess::NewL(const RFs& aFs) +/** Creates and returns a pointer to a new application process. + +This function is not used by UI applications. + +@param aFs Handle to a file server session. +@return Pointer to the new application process. */ + { + CApaProcess* self=new(ELeave) CApaProcess(aFs); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +EXPORT_C CApaProcess::CApaProcess(const RFs& aFs) + :iFsSession(aFs) +/** Constructs the application process object with the specified file session handle. + +Derived classes must define and implement a constructor through which +the file session handle can be specified. A +typical implementation calls this constructor through a constructor initialization +list. + +This constructor is used by the UI framework. + +@deprecated +@param aFs Handle to a file server session */ + {} + +const TInt KPriorityGreaterThanShutter=102; + +EXPORT_C void CApaProcess::ConstructL() +/** Completes construction of the application process object. + +Implementers of derived classes must call this function as part of the second +stage construction of an object. Typically, derived classes implement their +own NewL() function and call ConstructL() as part of that implementation. */ + { + // + iAppList = new(ELeave) CArrayFixFlat(KAppProcessArrayGranularity); + iDocList = new(ELeave) CArrayFixFlat(KAppProcessArrayGranularity); + iMainDocFileName = HBufC::NewL(KMaxFileName); + iApplicationRemover=CIdle::NewL(KPriorityGreaterThanShutter); // Use an idle object so that app has chance to clear its call stack + } + +EXPORT_C void CApaProcess::ConstructL(TProcessId aParentProcessId) +/** Completes construction of the application process object, passing in a Parent Process Identifier. + +Implementers of derived classes must call this function as part of the second +stage construction of an object. Typically, derived classes implement their +own NewL() function and call ConstructL() as part of that implementation. + +@param aParentProcessId Id of the parent process. This process will terminate when the parent does. */ + { + ConstructL(); + if(KNullProcessId!=aParentProcessId) + { + iMonitor=CApaParentProcessMonitor::NewL(aParentProcessId); + } + } + +EXPORT_C CApaProcess::~CApaProcess() +// If this is called without calling ResetL() or CApaDocument::SaveL() first, data may be lost +// +/** Frees resources prior to destruction. + +Documents must be saved before the application process is deleted, otherwise +data may be lost. + +In debug mode, the destructor raises an APPARC 6 panic if documents still +exist, and an APPARC 5 panic if applications still exist. */ + { + if (iMainDoc) + { + DestroyDocument(iMainDoc); + iMainDoc = NULL; + } + if (iDocList) + { + __ASSERT_DEBUG(iDocList->Count()==0,Panic(EPanicDocListNotEmpty)); + for (TInt i=iDocList->Count()-1 ; i>=0 ; i--) + { + delete (*iDocList)[i]; // delete stray doc's in release mode, just to be tidy + } + } + if (iAppList) + { + for (TInt i=iAppList->Count()-1 ; i>=0 ; i--) + { + delete ((*iAppList)[i]).iAppHolder; + } + } + delete iAppList; + delete iDocList; + delete iMainDocFileName; + delete iApplicationRemover; + delete iMonitor; + } + + +EXPORT_C void CApaProcess::ResetL() +/** Resets the the application process to its initial state. + +Specifically, it saves the main document, deletes the main and all embedded +documents from memory, resets the main document filename and deletes all applications +except the main application. + +The function can leave if saving the main document fails. */ + { + if (iMainDoc) + { + iMainDoc->SaveL(); + DeleteAllDocs(); // sets iMainDoc to NULL, deletes all apps except main + } + __ASSERT_DEBUG(iMainDocFileName, Panic(EPanicNoDocument)); + *iMainDocFileName=KNullDesC; + } + + +void CApaProcess::DeleteAllDocs() +// deletes all docs +// deletes all apps except main app +// sets iMainDoc* to NULL +// + { + CApaAppHolder* mainAppHolder=NULL; + if (iMainDoc) + { + __ASSERT_DEBUG(iMainDoc->Application(), Panic(EDPanicNoApp)); + mainAppHolder = iMainDoc->Application()->iAppHolder; + for (TInt i=iDocList->Count()-1 ; i>=0 ; i--) + if ((*iDocList)[i]==iMainDoc) + { + iDocList->Delete(i); // removes from array, but doesnt destroy + delete iMainDoc; + iMainDoc = NULL; + } + } + __ASSERT_ALWAYS(iDocList->Count()==0,Panic(EPanicDocListNotEmpty)); + iDocList->Reset(); + if (iAppList) + { + for (TInt ii=iAppList->Count()-1 ; ii>=0 ; ii--) // need to iterate backwards as the array changes size during the loop + { + if ((*iAppList)[ii].iAppHolder!=mainAppHolder) + { + delete (*iAppList)[ii].iAppHolder; + iAppList->Delete(ii); + } + } + iAppList->Compress(); + } + } + + +EXPORT_C void CApaProcess::SetMainDocFileName(const TDesC& aMainDocFileName) +/** Sets the filename of the main document. + +@param aMainDocFileName The filename to be set. +@panic APPARC 7 If the length of aMainDocFileName is greater than KMaxFileName or the +length of the last filename set by SetMainDocFileNameL if greater +@see KMaxFileName */ + { + __ASSERT_DEBUG( iMainDocFileName, Panic(EPanicNullPointer)); + __ASSERT_ALWAYS( aMainDocFileName.Length()<=iMainDocFileName->Des().MaxLength() ,Panic(EPanicFileNameTooLong)); + *iMainDocFileName = aMainDocFileName; + } + +EXPORT_C void CApaProcess::SetMainDocFileNameL(const TDesC& aMainDocFileName) +/** Sets the filename of the main document. + +@param aMainDocFileName The filename to be set. There is no restriction on the +length of this descriptor. */ + { + __ASSERT_ALWAYS( iMainDocFileName, Panic(EPanicNullPointer)); + const TInt newLength = aMainDocFileName.Length() < KMaxFileName ? KMaxFileName : aMainDocFileName.Length(); + if (newLength != iMainDocFileName->Des().MaxLength()) + { + HBufC* const newMainDocFileName = HBufC::NewL(newLength); + delete iMainDocFileName; + iMainDocFileName = newMainDocFileName; + } + SetMainDocFileName(aMainDocFileName); + } + +EXPORT_C void CApaProcess::SetMainDocument(CApaDocument* aDocument) +/** Sets the main document. + +@param aDocument A pointer to the document to be set as the main document +of the application process. This must be a an object created by the AddNewDocumentL() +or OpenNewDocumentL() functions +@see CApaProcess::AddNewDocumentL() +@see CApaProcess::OpenNewDocumentL() */ + { + __ASSERT_ALWAYS( iDocList, Panic(EPanicNullPointer)); + // check that the prospective main doc has actually been added to the array + for (TInt i=iDocList->Count()-1 ; i>=0 ; i--) + { + if ((*iDocList)[i]==aDocument) + break; + if (i==0) + Panic(EPanicNoDocument); + } + // assign it once it has checked out + iMainDoc = aDocument; + } + +EXPORT_C CApaDocument* CApaProcess::AddNewDocumentL(TApaApplicationFactory aApplicationFactory) +/** Creates and adds a new document using the specified application factory. + +The document may be a main document or an embedded document. + +Any document created with this function must be destroyed using DestroyDocument(). + +@param aApplicationFactory Should be created implicitly by passing a pointer to +a factory function, an ECOM plugin UID, or a CImplementationInformation reference. +@return A pointer to the new document. +@see CApaProcess::DestroyDocument() +@see CApaApplication */ + { +#ifdef USING_ECOM_RECOGS + __SHOW_TRACE(_L("Starting CApaProcess::AddNewDocumentL")); + __APA_PROFILE_START(0); + + CApaAppHolder* appHolder = AddAppExeL(aApplicationFactory); + + // use the app to create a doc + CApaDocument* doc=NULL; + TRAPD(ret,doc=CreateDocL(appHolder->Application())); + if (ret!=KErrNone) + // remove app as it has been orphaned + RemoveApp(appHolder); + User::LeaveIfError(ret); + __PROFILE_END(0); + return doc; +#else // USING_ECOM_RECOGS + (void)aApplicationFactory; + return NULL; +#endif // USING_ECOM_RECOGS + } //lint !e1762 Member function could be made const - Not true + + + +void CApaProcess::RemoveApp(CApaAppHolder* aAppHolder) +// removes app holder from the list if it exists, panics otherwise + { + __ASSERT_ALWAYS(iAppList, Panic(EPanicNullPointer)); + TInt i = 0; + for (i=iAppList->Count()-1 ; i>=0 ; i--) + { + if ((*iAppList)[i].iAppHolder==aAppHolder) // the main app may be alive on its own if Reset() has just been called + { + delete aAppHolder; // the main app may be alive on its own if Reset() has just been called + iAppList->Delete(i); + break; + } + } + if (i<0) + Panic(EPanicAppNotInList); + } + + +EXPORT_C CApaDocument* CApaProcess::OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode) +/** Opens the specified file and restores the content as a document. + +The created document can be merged into or embedded in another document. + +Any document created with this function must be destroyed using DestroyDocument(). + +@param aStore On return, this contains a pointer to the store object created +during the restore. +@param aStreamDic On return, this contains a pointer to the stream dictionary +object created during the restore. +@param aDocFullFileName The name of the file containing the document. +@param aFileMode The mode in which to open the file. +@return A pointer to the restored document. +@see TFileMode +@see CApaProcess::DestroyDocument() */ + { + __SHOW_TRACE(_L("Starting CApaProcess::OpenNewDocumentL")); + __APA_PROFILE_START(1); + TParse parser; + User::LeaveIfError(iFsSession.Parse(aDocFullFileName,parser)); + // open doc as a file store & read in the header + CFileStore* docStore; + CStreamDictionary* streamDic = ReadRootStreamLC(FsSession(),docStore,parser.FullName(),aFileMode); + CleanupStack::PushL(docStore); + // read in the app id info + TApaAppIdentifier appId=ReadAppIdentifierL(*docStore,*streamDic); + // create the doc + CApaDocument* importedDoc = AddNewDocumentL(appId.iAppUid); + // restore the document + TApaDocCleanupItem cleanup(this,importedDoc); + CleanupStack::PushL(cleanup); + importedDoc->RestoreL(*docStore,*streamDic); + CleanupStack::Pop(3); //docStore,importedDoc,streamDic + aStore = docStore; + aStreamDic = streamDic; + __PROFILE_END(1); + return importedDoc; + } + +EXPORT_C TApaAppIdentifier CApaProcess::ReadAppIdentifierL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic) +// this is a static method +/** Reads the application identifier from its stream in the specified store and +returns it. + +The location of the stream is found in the specified stream dictionary. + +@param aStore The store from which the application identifier should be read. +@param aStreamDic The stream dictionary containing the stream ID of the application +identifier stream. The stream dictionary can be found in the root stream of +the store. +@return The application identifier. */ + { + __SHOW_TRACE(_L("Starting CApaProcess::ReadAppIdentifierL")); + TStreamId infoStreamId=aStreamDic.At(KUidAppIdentifierStream); + TApaAppIdentifier appId; + // create a stream and read in the data + RStoreReadStream stream; + stream.OpenLC(aStore,infoStreamId); + stream>> appId; + stream.Close(); + CleanupStack::PopAndDestroy(); // stream + return appId; + } + + +EXPORT_C void CApaProcess::WriteAppIdentifierL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId) +// this is a static method +/** Writes the application identifier to a new stream in the specified store and +records the location of this stream in the specified stream dictionary. + +@param aStore The store to which the application identifier should be written. + +@param aStreamDic The stream dictionary. +@param aAppId The application identifier to be externalised to a stream. */ + { + __SHOW_TRACE(_L("Starting CApaProcess::WriteAppIdentifierL")); + // create a stream + RStoreWriteStream stream; + TStreamId streamId=stream.CreateLC(aStore); + // stream the header + stream<< aAppId; + stream.CommitL(); + CleanupStack::PopAndDestroy(); // id stream + // enter the stream in the dictionary + aStreamDic.AssignL(KUidAppIdentifierStream,streamId); + } + + +EXPORT_C CStreamDictionary* CApaProcess::ReadRootStreamLC(RFs& aFs,CFileStore*& aStore,const TDesC& aDocFullFileName,TUint aFileMode) +/** Reads the stream dictionary contained as the root stream in the specified document +file. + +The function constructs, and returns a pointer to the stream dictionary object +and puts the pointer to the stream dictionary object onto the cleanup stack. +It also returns a pointer to the created file store object through an argument +reference. + +The file must be a valid document file; otherwise the function leaves with one of +the system-wide error codes. + +@param aFs Handle to a file server session. +@param aStore On return, a pointer to the newly created file store object. +@param aDocFullFileName The full path name of the document file. +@param aFileMode The mode in which to open the file. +@return A pointer to the stream dictionary object read from the root stream +of the store. +@see TFileMode */ + { // static + __SHOW_TRACE(_L("Starting CApaProcess::ReadRootStreamLC (file-name overload)")); + CStreamDictionary* const streamDictionary=CStreamDictionary::NewLC(); + CFileStore* const store=CFileStore::OpenLC(aFs,aDocFullFileName,aFileMode); + DoReadRootStreamL(*streamDictionary, *store); + aStore=store; // delay assignment until nothing can go wrong to avoid destroying the store twice if a leave occurs + CleanupStack::Pop(store); + return streamDictionary; + } + + +EXPORT_C CStreamDictionary* CApaProcess::ReadRootStreamLC(CFileStore*& aStore, const RFile& aFile) +/** +@internalTechnology +*/ + { // static + __SHOW_TRACE(_L("Starting CApaProcess::ReadRootStreamLC (file-handle overload)")); + CStreamDictionary* const streamDictionary=CStreamDictionary::NewLC(); + RFile duplicateFile; + CleanupClosePushL(duplicateFile); + User::LeaveIfError(duplicateFile.Duplicate(aFile)); // this is because CFileStore::FromLC closes the file its passed (and stores its own duplicate) + CFileStore* const store=CFileStore::FromL(duplicateFile); + CleanupStack::PopAndDestroy(&duplicateFile); + CleanupStack::PushL(store); + DoReadRootStreamL(*streamDictionary, *store); + aStore=store; // delay assignment until nothing can go wrong to avoid destroying the store twice if a leave occurs + CleanupStack::Pop(store); + return streamDictionary; + } + + +void CApaProcess::DoReadRootStreamL(CStreamDictionary& aStreamDictionary, const CFileStore& aStore) + { // static + const TStreamId rootStreamId=aStore.Root(); + if ((aStore.Type()[1]!=KUidAppDllDoc) || (rootStreamId==KNullStreamId)) + { + User::Leave(KErrCorrupt); + } + RStoreReadStream rootStream; + rootStream.OpenLC(aStore, rootStreamId); + rootStream>>aStreamDictionary; + CleanupStack::PopAndDestroy(&rootStream); + } + + +EXPORT_C void CApaProcess::WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const CApaApplication& aApp) +// this is a static method +/** Writes the application identifier (derived from the application object CApaApplication) +followed by the stream dictionary to the store and makes the stream dictionary the root stream of the +store. + +Typically, the function is called by the application when it +implements a file create or file save type operation. It is called after all +model and UI data has been persisted. The IDs of the streams containing the +model and UI data should have been lodged in the stream dictionary. + +In effect, the function finishes off the file save or file +create type operation, leaving the file containing the store in a valid state +with the standard interface. + +@param aStore The store to which the root stream is to be written. Before +calling this function, a reference to the store must be saved by putting a +pointer onto the cleanup stack or by making it member data of a class. This +ensures that it is not orphaned in the event of this function leaving. +@param aStreamDic The stream dictionary containing the locations and associated +UIDs of other streams in the store. +@param aApp The application used to create the main document in the file +being written. The application identifier to be written is constructed from +this application object. */ + { + __SHOW_TRACE(_L("Starting CApaProcess::WriteRootStreamL(app)")); + // get the app dll name + TParse dllPath; + dllPath.SetNoWild(aApp.DllName(),NULL,NULL); + // set up an app identifier + TApaAppIdentifier appId(aApp.AppDllUid(),dllPath.NameAndExt()); + // Write the root stream + WriteRootStreamL(aStore,aStreamDic,appId); + } + + +EXPORT_C void CApaProcess::WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId) +// this is a static method +/** Writes the application identifier followed by the stream dictionary +to the store and makes the stream dictionary the root stream of the store. + +Typically, the function is called by the application when it +implements a file create or file save type operation. It is called after all +model and UI data has been persisted. The IDs of the streams containing the +model and UI data should have been lodged in the stream dictionary. + +In effect, the function finishes off the file save or file +create type operation, leaving the file containing the store in a valid state +with the standard interface. + +@param aStore The store to which the root stream is to be written. Before +calling this function, a reference to the store must be saved by putting a +pointer onto the cleanup stack or by making it member data of a class. This +ensures that it is not orphaned in the event of this function leaving. +@param aStreamDic The stream dictionary containing the locations and associated +UIDs of other streams in the store. +@param aAppId The application identifier to be written into the application +identifier stream. */ + { + __SHOW_TRACE(_L("Starting CApaProcess::WriteRootStreamL(id)")); + // create a stream + WriteAppIdentifierL(aStore,aStreamDic,aAppId); + // externalize the dictionary + RStoreWriteStream stream; + TStreamId streamId=stream.CreateLC(aStore); + stream<< aStreamDic; + stream.CommitL(); + CleanupStack::PopAndDestroy(); // dictionary stream + // set the dictionary stream as the root stream + aStore.SetRootL(streamId); + } + + +EXPORT_C void CApaProcess::DestroyDocument(CApaDocument* aDoc) +/** Destroys the specified document. + +All references to the document are removed, and associated resources are freed. +Specifically, the function deletes any associated application and unloads +the application DLL, provided that no other documents of that application +type are still open. + +All document objects created through CApaProcess must be deleted using this +function. + +@param aDoc A pointer to the document to be destroyed. +@see CApaApplication +@see CApaProcess */ + { + __SHOW_TRACE(_L("Starting CApaProcess::DestroyDocument(app)")); + // + if (aDoc) + { + // delete the doc, keeping a handle to its app + CApaApplication* app=aDoc->Application(); + __ASSERT_DEBUG(app!=NULL,Panic(EDPanicDocWithNoApp)); + // remove the doc from the list, keeping a handle to the doc + TBool appStillRequired=EFalse; + __ASSERT_ALWAYS(iDocList, Panic(EPanicNullPointer)); + for (TInt i=iDocList->Count()-1 ; i>=0 ; i--) + {//check through the list, remove the right doc, and see if the app is used by any other docs + if ((*iDocList)[i]==aDoc) + { + iDocList->Delete(i); // removes from array, but doesnt destroy + iDocList->Compress(); + } + else if ((*iDocList)[i]->Application()==app) + appStillRequired = ETrue; + } + // null the main doc handle if we delete the main doc + if (aDoc==iMainDoc) + iMainDoc = NULL; + + delete aDoc; // del + + // remove app if no other doc's use it and it's not the main app + if ((!appStillRequired)&&(iMainDoc)&&(app!=iMainDoc->Application())) + { + MarkApplicationForRemoval(app); + __ASSERT_DEBUG(iApplicationRemover, Panic(EDPanicNoAppRemover)); + if (!iApplicationRemover->IsActive()) + { + iApplicationRemover->Start(TCallBack(CApaProcess::IdleRemoveApplications,this)); + } + } + } + } + + +TInt CApaProcess::IdleRemoveApplications(TAny* aThis) +// Remove applications on callback of idle object. Using an idle object gives an embedded application a chance to clear +// its call stack before its dll is closed +// + { + CApaProcess* process=reinterpret_cast(aThis); + __ASSERT_DEBUG(process, Panic(EDPanicNoProcess)); + process->RemoveMarkedApplications(); + return 0; + } + + +void CApaProcess::RemoveMarkedApplications() +// Remove any applications that have been marked for removal, closing their dlls also +// + { + __ASSERT_DEBUG(iAppList, Panic(EPanicNullPointer)); + for (TInt i=iAppList->Count()-1 ; i>=0 ; i--) + if ((*iAppList)[i].iToBeRemoved) + { + delete (*iAppList)[i].iAppHolder; + iAppList->Delete(i); // remove from array + iAppList->Compress(); + } + } + + +void CApaProcess::MarkApplicationForRemoval(const CApaApplication* aApp) +// Mark the application in the app list for removal by idle object +// + { + __ASSERT_DEBUG(aApp!=NULL,Panic(EDPanicRemovingNullApp)); + __ASSERT_DEBUG(iAppList, Panic(EPanicNullPointer)); + // remove the app from the list, keeping a handle to it + for (TInt i=iAppList->Count()-1 ; i>=0 ; i--) + { + __ASSERT_DEBUG((*iAppList)[i].iAppHolder, Panic(EDPanicNoAppHolder)); + if ((*iAppList)[i].iAppHolder->Application()==aApp) + { + (*iAppList)[i].iToBeRemoved=ETrue; + } + } + + } + + +CApaDocument* CApaProcess::CreateDocL(CApaApplication* aApp) +// creates a new doc with aApp and adds it to the list before returning a handle to it +// + { + __SHOW_TRACE(_L("Starting CApaProcess::CreateDocL")); + __ASSERT_DEBUG(aApp,Panic(EDPanicNoApp)); + // + // create a new doc with the app + CApaDocument* doc=aApp->CreateDocumentL(this); //lint !e613 Possible use of null pointer - Asserted above + __ASSERT_ALWAYS(doc!=NULL,Panic(EPanicDocumentNotCreated)); + // add the doc to the list + CleanupStack::PushL(doc); + iDocList->AppendL(doc); + CleanupStack::Pop(); // doc + // return a handle to the doc + return doc; + } + + +CApaAppHolder* CApaProcess::FindAppInListL(const TDesC& aAppFileName,TUid aUid)const +// returns pointer to a matching app, or NULL if not in list +// + { + __ASSERT_DEBUG(iAppList, Panic(EPanicNullPointer)); + TInt index=iAppList->Count(); + if (aUid!=KNullUid) + {// search by UID + while (--index>=0) + { + __ASSERT_DEBUG((*iAppList)[index].iAppHolder, Panic(EDPanicNoAppHolder)); + if ((*iAppList)[index].iAppHolder->Uid()==aUid) + { + (*iAppList)[index].iToBeRemoved = FALSE; + return (*iAppList)[index].iAppHolder; // match found + } + } + } + else + {// search by name as no UID has been supplied + TParse app; TParse suspect; + User::LeaveIfError(app.Set(aAppFileName,NULL,NULL)); + while (--index>=0) + { + __ASSERT_DEBUG((*iAppList)[index].iAppHolder, Panic(EDPanicNoAppHolder)); + suspect.SetNoWild((*iAppList)[index].iAppHolder->FileName(),NULL,NULL); + if (!app.Name().CompareF(suspect.Name())) + { + (*iAppList)[index].iToBeRemoved = FALSE; + return (*iAppList)[index].iAppHolder; // match found + } + } + } + return NULL; // no match found + } + +#ifdef USING_ECOM_RECOGS +CApaExe* CApaProcess::AddAppExeL(TApaApplicationFactory aApplicationFactory) + { + CApaExe* exe = new(ELeave) CApaExe(); + CleanupStack::PushL(exe); + + // create the app + exe->CreateApplicationL(aApplicationFactory); + __ASSERT_DEBUG(exe->Application(), Panic(EPanicNullPointer)); + exe->Application()->PreDocConstructL(); + + // add the application to the list and return a pointer to it + TApaAppHolderInfo info(exe); + __ASSERT_DEBUG(iAppList, Panic(EPanicNullPointer)); + iAppList->AppendL(info); + CleanupStack::Pop(exe); + + return exe; + } +#endif // USING_ECOM_RECOGS + + +EXPORT_C TPtrC CApaProcess::MainDocFileName()const +/** Returns the filename of the main document. + +@return A non-modifiable pointer descriptor to the main document filename. +For non file-based applications, the length of this descriptor is zero. */ + { + if (iMainDocFileName!=NULL) + { + return *iMainDocFileName; + } + return KNullDesC(); + } + +/** Reserved for future use */ +EXPORT_C void CApaProcess::CApaProcess_Reserved1() + { + } + +/** Reserved for future use */ +EXPORT_C void CApaProcess::CApaProcess_Reserved2() + { + } + +///////////////////////////// +// TApaApplicationFactory +///////////////////////////// + +/** +Default constructor +*/ + +/** Constructor for TApaApplicationFactory */ +EXPORT_C TApaApplicationFactory::TApaApplicationFactory() + :iType(ETypeFunction), + iData(0), + iApplication(NULL) + { + } + +/** +Constructor. +@publishedAll +@released +@param aFunction The function from which the application is to be created. +*/ +EXPORT_C TApaApplicationFactory::TApaApplicationFactory(TFunction aFunction) + :iType(ETypeFunction), + iData(reinterpret_cast(aFunction)), + iApplication(NULL) + { + } + +/** +Constructor. Use this constructor in preference to the constructor taking a "TUid" parameter +if at all possible as it is much more efficient. +@publishedAll +@released +@param aEmbeddedApplicationInformation The ECOM implementation-information of the embedded application to be created. +*/ +EXPORT_C TApaApplicationFactory::TApaApplicationFactory(const CImplementationInformation& aEmbeddedApplicationInformation) + :iType(ETypeEmbeddedApplicationInformation), + iData(reinterpret_cast(&aEmbeddedApplicationInformation)), + iApplication(NULL) + { + } + +/** +Constructor. Use the constructor taking a "const CImplementationInformation&" parameter in preference +to this constructor if at all possible as it is much more efficient. +@publishedAll +@released +@param aEmbeddedApplicationUid The ECOM implementation-UID of the embedded application to be created. +*/ +EXPORT_C TApaApplicationFactory::TApaApplicationFactory(TUid aEmbeddedApplicationUid) + :iType(ETypeEmbeddedApplicationUid), + iData(aEmbeddedApplicationUid.iUid), + iApplication(NULL) + { + } + +#ifdef USING_ECOM_RECOGS +CApaApplication* TApaApplicationFactory::CreateApplicationL() const + { + CApaApplication* application = NULL; + + switch (iType) + { + case ETypeFunction: + { + __ASSERT_DEBUG(iData, Panic(EPanicNullPointer)); + application=(*reinterpret_cast(iData))(); + break; + } + case ETypeEmbeddedApplicationInformation: + { + __ASSERT_DEBUG(iData, Panic(EPanicNullPointer)); + const CImplementationInformation& embeddedApplicationInformation=*reinterpret_cast(iData); + TUid uid = embeddedApplicationInformation.ImplementationUid(); + application=CreateEmbeddedApplicationL(uid); + break; + } + case ETypeEmbeddedApplicationUid: + { + TUid uid = TUid::Uid(iData); + application=CreateEmbeddedApplicationL(uid); + break; + } + default: + Panic(EPanicBadApplicationFactoryType); + } + + return application; + } + +HBufC* TApaApplicationFactory::AppFileNameL() const + { + HBufC* appFileName = NULL; + switch (iType) + { + case ETypeFunction: + { + // Assume that if the type is a function pointer then the app is not embedded (so + // the filename is the filename of this process). + appFileName = RProcess().FileName().AllocL(); + break; + } + case ETypeEmbeddedApplicationInformation: + { + const CImplementationInformation& embeddedApplicationInformation=*REINTERPRET_CAST(const CImplementationInformation*,iData); + appFileName = FullAppFileNameL(embeddedApplicationInformation.DisplayName()); + break; + } + case ETypeEmbeddedApplicationUid: + { + TUid uid = TUid::Uid(iData); + HBufC* displayName = EmbeddedApplicationDisplayNameLC(uid); + appFileName = FullAppFileNameL(*displayName); + CleanupStack::PopAndDestroy(displayName); + break; + } + default: + Panic(EPanicBadApplicationFactoryType); + } + + return appFileName; + } + +TUid TApaApplicationFactory::AppFileUid() const + { + TUid uid=KNullUid; + switch (iType) + { + case ETypeFunction: + { + uid = RProcess().Type()[2]; + break; + } + case ETypeEmbeddedApplicationInformation: + { + const CImplementationInformation& embeddedApplicationInformation=*REINTERPRET_CAST(const CImplementationInformation*,iData); + uid = embeddedApplicationInformation.ImplementationUid(); + break; + } + case ETypeEmbeddedApplicationUid: + { + uid = TUid::Uid(iData); + break; + } + default: + Panic(EPanicBadApplicationFactoryType); + } + return uid; + } + +HBufC* TApaApplicationFactory::FullAppFileNameL(const TDesC& aAppName) + { + // This was appropriately changed for data caging (binaries placed in \sys\bin\) + TFileName fileName; + Dll::FileName(fileName); + + TParse parse; + parse.SetNoWild(aAppName, &KApplicationLocation, &fileName); + return parse.FullName().AllocL(); + } + +CApaApplication* TApaApplicationFactory::CreateEmbeddedApplicationL(TUid aUid) + { // static + CApaApplication* const application=static_cast(REComSession::CreateImplementationL(aUid,_FOFF(CApaApplication,iDtorKey))); + const TUid appUid = application->AppDllUid(); + __ASSERT_ALWAYS(appUid==aUid, Panic(EPanicUidsDoNotMatch)); + return application; + } + + +HBufC* TApaApplicationFactory::EmbeddedApplicationDisplayNameLC(TUid aUid) + { // static + HBufC* displayName=NULL; + + RImplInfoPtrArray implementationArray; + CleanupStack::PushL(TCleanupItem(CleanupImplementationArray,&implementationArray)); + REComSession::ListImplementationsL(KUidFileEmbeddedApplicationInterfaceUid,implementationArray); + for (TInt i=implementationArray.Count()-1; i>=0; --i) + { + const CImplementationInformation& implementationInformation=*implementationArray[i]; + if (implementationInformation.ImplementationUid().iUid==aUid.iUid) + { + displayName=implementationInformation.DisplayName().AllocL(); + break; + } + } + CleanupStack::PopAndDestroy(&implementationArray); + if (displayName==NULL) + { + User::Leave(KErrNotFound); + } + CleanupStack::PushL(displayName); + + return displayName; + } + +void TApaApplicationFactory::CleanupImplementationArray(TAny* aImplementationArray) + { // static + __ASSERT_DEBUG(aImplementationArray, Panic(EPanicNullPointer)); + RImplInfoPtrArray& implementationArray=*static_cast(aImplementationArray); + implementationArray.ResetAndDestroy(); + implementationArray.Close(); + } + +// +// MApaEmbeddedDocObserver +// + +/** Constructor for MApaEmbeddedDocObserver */ +EXPORT_C MApaEmbeddedDocObserver::MApaEmbeddedDocObserver() + { + } + +/** Reserved for future use */ +EXPORT_C void MApaEmbeddedDocObserver::MApaEmbeddedDocObserver_Reserved1() + { + } + +/** Reserved for future use */ +EXPORT_C void MApaEmbeddedDocObserver::MApaEmbeddedDocObserver_Reserved2() + { + } +#endif // USING_ECOM_RECOGS diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/APPARC.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/APPARC.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,58 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// APPARC.MMP for component APPARC +// + +/** +@file + +@SYMPurpose apparc.dll Application apparc base classes +*/ + + +target apparc.dll +CAPABILITY All -Tcb +targettype DLL +UID 0x1000008D 0x10003A3D +VENDORID 0x70000001 + +SOURCEPATH ../apparc +userinclude ../inc +systeminclude /epoc32/include + +source APACMDLN.CPP APAFLREC.CPP APAID.CPP APAMDR.CPP +source APASTD.CPP APPARC.CPP +source ApaAppServer.cpp +source ApaAppClient.cpp + +library euser.lib efsrv.lib gdi.lib estor.lib + + +#if !defined(WINC) +macro USING_ECOM_RECOGS +library ecom.lib +#endif + +deffile APPARC_9_REMOVE_UI_FRAMEWORKS_V1.DEF + +START WINS + baseaddress 0x40000000 +END + +START MARM +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/ApaAppClient.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/ApaAppClient.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,222 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "ApaServerAppPriv.h" + +void AppServerPanic(TApaAppServerPanic aReason) + { + _LIT(KPanic, "ApaAppClient"); + User::Panic(KPanic, aReason); + } + +void CleanupServerName(TAny* aParam) + { + HBufC** pServerName = static_cast(aParam); + delete *pServerName; + *pServerName = NULL; + } + +/** Protected constructor, instantiable services must derive from this class.*/ +EXPORT_C RApaAppServiceBase::RApaAppServiceBase() +: iServerName(NULL) + { + } + +/** Closes the service and the connection to the server app.*/ +EXPORT_C void RApaAppServiceBase::Close() + { + delete iServerName; + iServerName = NULL; + RSessionBase::Close(); + } + +/** Connects to an already running server application, through an already connected service. +@param aClient A service which is already connected.*/ +EXPORT_C void RApaAppServiceBase::ConnectExistingAppL(const RApaAppServiceBase& aClient) + { + __ASSERT_DEBUG(!iServerName, AppServerPanic(EApaAppServerPanicClientAlreadyConnected)); + iServerName = aClient.iServerName->AllocL(); + ConnectL(); + } + +/** Connects to an already running server application, through an already connected service. +@param aClient A service which is already connected. +@param aSecurityPolicy The TSecurityPolicy which should be matched with the TSecurityPolicy of the app to be connected. + +@see TSecurityPolicy*/ +EXPORT_C void RApaAppServiceBase::ConnectExistingAppL(const RApaAppServiceBase& aClient, const TSecurityPolicy& aSecurityPolicy) + { + __ASSERT_DEBUG(!iServerName, AppServerPanic(EApaAppServerPanicClientAlreadyConnected)); + iServerName = aClient.iServerName->AllocL(); + ConnectL(aSecurityPolicy); + } + +/** Connects to an already running server application, by name. +@param aName The name of the server hosted by the server app.*/ +EXPORT_C void RApaAppServiceBase::ConnectExistingByNameL(const TDesC& aServerName) + { + __ASSERT_DEBUG(!iServerName, AppServerPanic(EApaAppServerPanicClientAlreadyConnected)); + iServerName = aServerName.AllocL(); + ConnectL(); + } + +/** Connects to an already running server application, by name. +@param aName The name of the server hosted by the server app. +@param aSecurityPolicy The TSecurityPolicy which should be matched with the TSecurityPolicy of the app to be connected. + +@see TSecurityPolicy*/ +EXPORT_C void RApaAppServiceBase::ConnectExistingByNameL(const TDesC& aServerName, const TSecurityPolicy& aSecurityPolicy) + { + __ASSERT_DEBUG(!iServerName, AppServerPanic(EApaAppServerPanicClientAlreadyConnected)); + iServerName = aServerName.AllocL(); + ConnectL(aSecurityPolicy); + } + +void RApaAppServiceBase::ConnectL() + { + CleanupStack::PushL(TCleanupItem(CleanupServerName, &iServerName)); + TUid serviceUid = ServiceUid(); + User::LeaveIfError(CreateSession(*iServerName,*reinterpret_cast(&serviceUid))); + CleanupStack::Pop(&iServerName); + } + +void RApaAppServiceBase::ConnectL(const TSecurityPolicy& aSecurityPolicy) + { + CleanupStack::PushL(TCleanupItem(CleanupServerName, &iServerName)); + TUid serviceUid = ServiceUid(); + User::LeaveIfError(CreateSession(*iServerName, *reinterpret_cast(&serviceUid), -1, EIpcSession_Unsharable, &aSecurityPolicy)); + CleanupStack::Pop(&iServerName); + } + +/** Gets the name of the server hosted by the server application. +@return the name of the server application, will be empty if +the service is not connected*/ +EXPORT_C TPtrC RApaAppServiceBase::ServerName() const + { + if (iServerName) + { + return *iServerName; + } + else + { + return KNullDesC(); + } + } + +/** Requests notification of server application exit. +@param aStatus On completion, this contains the exit code of the server application. +@see CApaServerAppExitMonitor*/ +EXPORT_C void RApaAppServiceBase::NotifyServerExit(TRequestStatus& aStatus) const + { + SendReceive(EApaAppServerNotifyServerExit,TIpcArgs(),aStatus); + } + +/** Cancels the request for notification of server application exit.*/ +EXPORT_C void RApaAppServiceBase::CancelNotifyServerExit() const + { + SendReceive(EApaAppServerCancelNotifyServerExit); + } + +/** Extension mechanism - for internal BC proofing. */ +EXPORT_C void RApaAppServiceBase::ExtensionInterface(TUid /*aInterfaceId*/, TAny*& /*aImplementaion*/) + { + } +EXPORT_C void RApaAppServiceBase::RApaAppServiceBase_Reserved1() + { + } + +EXPORT_C void RApaAppServiceBase::RApaAppServiceBase_Reserved2() + { + } + +/** Transfers the ownership of the session passed to self. +@param aClient A service which is already connected. On return, this service will be reset. +@leave KErrArgument The session passed is not connected. +@panic ApaAppClient 3 The client getting the ownership already has a connected session. Debug builds only. +*/ +EXPORT_C void RApaAppServiceBase::TransferExistingSessionL(RApaAppServiceBase& aClient) + { + __ASSERT_DEBUG(!iServerName, AppServerPanic(EApaAppServerPanicClientAlreadyConnected)); + if(aClient.iServerName == NULL) + { + User::Leave(KErrArgument); + } + if(this != &aClient) + { + iServerName = aClient.iServerName; + iApaReserved1 = aClient.iApaReserved1; + iApaReserved2 = aClient.iApaReserved2; + SetHandle(aClient.Handle()); + aClient.iServerName = NULL; + aClient.SetHandle(0); + } + } + +// +// CApaServerAppExitMonitor +// + +/** Creates a new monitor object and starts monitoring server app lifetime. +@param aClient A connected server app session, which requires monitoring. +@param aObserver An implementer of the MApaServerAppExitObserver that wants to be notified of server app exits. +@param aPriority The active object priority that this monitor should run at. +@return a new instance of a monitor. */ +EXPORT_C CApaServerAppExitMonitor* CApaServerAppExitMonitor::NewL(RApaAppServiceBase& aClient, MApaServerAppExitObserver& aObserver, TInt aPriority) + { + CApaServerAppExitMonitor* self = new(ELeave) CApaServerAppExitMonitor(aClient, aObserver, aPriority); + return self; + } + +/** Creates a new monitor object, places it on the cleanup stack and starts monitoring server app lifetime. +@param aClient A connected server app session, which requires monitoring. +@param aObserver An implementer of the MApaServerAppExitObserver that wants to be notified of server app exits. +@param aPriority The active object priority that this monitor should run at. +@return a new instance of a monitor, which is placed on the cleanup stack. */ +EXPORT_C CApaServerAppExitMonitor* CApaServerAppExitMonitor::NewLC(RApaAppServiceBase& aClient, MApaServerAppExitObserver& aObserver, TInt aPriority) + { + CApaServerAppExitMonitor* self = new(ELeave) CApaServerAppExitMonitor(aClient, aObserver, aPriority); + CleanupStack::PushL(self); + return self; + } + +/** The destructor stops monitoring of server app exit. */ +EXPORT_C CApaServerAppExitMonitor::~CApaServerAppExitMonitor() + { + Cancel(); + } + +CApaServerAppExitMonitor::CApaServerAppExitMonitor(RApaAppServiceBase& aClient, MApaServerAppExitObserver& aObserver, TInt aPriority) +: CActive(aPriority), iClient(aClient), iObserver(aObserver) + { + CActiveScheduler::Add(this); + iClient.NotifyServerExit(iStatus); + SetActive(); + } + +void CApaServerAppExitMonitor::RunL() + { + TInt reason = iStatus.Int(); + iObserver.HandleServerAppExit(reason); + } + +void CApaServerAppExitMonitor::DoCancel() + { + iClient.CancelNotifyServerExit(); + } + +TInt CApaServerAppExitMonitor::RunError(TInt aError) + { + return aError; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/ApaAppServer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/ApaAppServer.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,335 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "ApaServerAppPriv.h" + +// +// CApaAppServiceBase +// + +/** Constructor. */ +EXPORT_C CApaAppServiceBase::CApaAppServiceBase() + { + } + +/** An implementation of the CreateL() method from CSession2. +This can be further overridden by derived classes, but such +implementations should also base-call. */ +EXPORT_C void CApaAppServiceBase::CreateL() + { + } + +/** Destructor. */ +EXPORT_C CApaAppServiceBase::~CApaAppServiceBase() + { + if (!iNotifyExitMsg.IsNull() && (iExitReason != KRequestPending)) + { + iNotifyExitMsg.Complete(iExitReason); + } + } + +/** Virtual framework function that is called on receipt +of a message from the client. This allows the service implementation +to define a security policy for messages from the client. +The default behaviour of this function is to pass security checks. +@param aMsg The message to check. +@param aAction A reference to the action to take if the security check + fails. This is either a value from TFailureAction or a negative + value which has meaning to the CustomFailureActionL() method of + a derived class. + The policy server framework gives this value a default of + EFailClient. If a derived implementation wishes a + different value, then it should change this. +@param aMissing A reference to the list of security attributes missing + from the checked process. The policy server initialises this + object to zero (that is a sid of 0, a vid of 0, and no capabilities). + If derived implementations wish to take advantage of a list of + missing attributes in their implementation of CustomFailureActionL(), + then they should set those missing attributes here in + CustomSecurityCheckL(). +@return A value from CPolicyServer::TCustomResult. +@see CPolicyServer */ +EXPORT_C CPolicyServer::TCustomResult CApaAppServiceBase::SecurityCheckL(const RMessage2& /*aMsg*/, TInt& /*aAction*/, TSecurityInfo& /*aMissing*/) + { + return CPolicyServer::EPass; // default is to pass security checks + } + +/** Framework function to handle client messages. +Derived classes should override this method to receive messages from the client. +These messages should have function ids starting from +REikAppServiceBase::KServiceCmdBase. +The behaviour for any unrecognised messages must be to +base-call. +@param aMessage The clients request message. +@panic ApaAppServer 0 If this function does not recognise the function ID.*/ +EXPORT_C void CApaAppServiceBase::ServiceL(const RMessage2& aMessage) + { + switch (aMessage.Function()) + { + case EApaAppServerNotifyServerExit: + NotifyServerExit(aMessage); + break; + + case EApaAppServerCancelNotifyServerExit: + CancelNotifyServerExit(aMessage); + break; + + default: + PanicAppServerClient(aMessage, EApaAppServerPanicIllegalFunction); + break; + } + } + +/** Handle leave errors from ServiceL(). +@param aMessage The client message that was being processed when the leave occured. +@param aError The leave code. */ +EXPORT_C void CApaAppServiceBase::ServiceError(const RMessage2& aMessage,TInt aError) + { + CSession2::ServiceError(aMessage,aError); + } +EXPORT_C TInt CApaAppServiceBase::CountResources() + { + return CSession2::CountResources(); + } + +EXPORT_C void CApaAppServiceBase::Disconnect(const RMessage2& aMessage) + { + CSession2::Disconnect(aMessage); + } +void CApaAppServiceBase::NotifyServerExit(const RMessage2& aMessage) + { + if (!iNotifyExitMsg.IsNull()) + { + PanicAppServerClient(aMessage, EApaAppServerPanicNotifyExitActive); + } + else + { + iNotifyExitMsg = aMessage; + iExitReason = KRequestPending; + } + } + +void CApaAppServiceBase::CancelNotifyServerExit(const RMessage2& aMessage) const + { + if (!iNotifyExitMsg.IsNull()) + { + iNotifyExitMsg.Complete(KErrCancel); + } + aMessage.Complete(KErrNone); + } + +void CApaAppServiceBase::SendAppServerExitNotification(TInt aExitReason) + { + if (iExitReason == KRequestPending) + { + iExitReason = aExitReason; + } + } + +/** Extension mechanism - for internal BC proofing. */ +EXPORT_C void CApaAppServiceBase::ExtensionInterface(TUid /*aInterfaceId*/, TAny*& /*aImplementaion*/) + { + } +EXPORT_C void CApaAppServiceBase::CApaAppServiceBase_Reserved1() + { + } + +EXPORT_C void CApaAppServiceBase::CApaAppServiceBase_Reserved2() + { + } +// +// CApaAppServer +// + +const TUint KApaAppServerRangeCount = 1; +const TInt KApaAppServerRanges[KApaAppServerRangeCount] = + { + 0, //range is 0-KMaxTInt inclusive + }; +const TUint8 KApaAppServerElementsIndex[KApaAppServerRangeCount] = + { + CPolicyServer::ECustomCheck, //applies to 0th range (req num: 0-KMaxTInt) + }; +//const CPolicyServer::TPolicyElement KApaAppServerElements[0] = +// { +// } +const CPolicyServer::TPolicy KApaAppServerPolicy = + { + CPolicyServer::ECustomCheck, + KApaAppServerRangeCount, + KApaAppServerRanges, + KApaAppServerElementsIndex, + 0, + }; +/** Constructor. */ +EXPORT_C CApaAppServer::CApaAppServer() +:CPolicyServer(0, + KApaAppServerPolicy, + EUnsharableSessions) + { + } + +/** Destructor */ +EXPORT_C CApaAppServer::~CApaAppServer() + { + } + +/** Virtual ConstructL() function to allow second stage construction. +This can be overridden for derived class construction, but must be +base-called. +@param aFixedServerName - the name that this server will use. */ +EXPORT_C void CApaAppServer::ConstructL(const TDesC& aFixedServerName) + { + StartL(aFixedServerName); + } + +EXPORT_C CSession2* CApaAppServer::NewSessionL(const TVersion& /*aVersion*/,const RMessage2& aMessage) const + { + TUid serviceUid = ConnectMessageServiceUid(aMessage); + return CreateServiceL(serviceUid); + } + +/** The server's main security checking function. +This delegates connect checks to CreateServiceSecurityCheckL +and checks on other messages to the target service implementation's +SecurityCheckL function. +For framework use only. +@internalComponent */ +EXPORT_C CPolicyServer::TCustomResult CApaAppServer::CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing) + { + if (aMsg.Function() == RMessage2::EConnect) + { + TUid serviceUid = ConnectMessageServiceUid(aMsg); + return CreateServiceSecurityCheckL(serviceUid, aMsg, aAction, aMissing); + } + else + { + CApaAppServiceBase* service = static_cast(aMsg.Session()); + if (service) + { + return service->SecurityCheckL(aMsg, aAction, aMissing); + } + else + { + return CPolicyServer::EFail; + } + } + } + +/** Service creation function. +When a client wants to connect to a server app, this function will be +called to create the service requested by the client. +This function must be overridden by server apps to create their +implementations of the requested service. +If the server app's implementation of this function does not recognise +the service UID, it must base-call. +@param aServiceType The UID of the service that the client wants to connect to. +@return an object derived from CApaAppServiceBase that can handle the +service type requested by the client. */ +EXPORT_C CApaAppServiceBase* CApaAppServer::CreateServiceL(TUid /*aServiceType*/) const + { + User::Leave(KErrNotSupported); + return NULL; + } + +/** Notifies clients that the server is going to exit. +If a server application exits for any non-standard reason (ie anything +except EEikCmdExit) this function should be called to forward the reason +to the client. The UI framework will call this with EEikCmdExit if it has +not already been done. +@param aReason The exit reason from the server app. This will either be a + command ID, eg EEikCmdExit, or an error code, eg KErrServerTerminated. +@see CEikAppUi::Exit */ +EXPORT_C void CApaAppServer::NotifyServerExit(TInt aReason) + { + iSessionIter.SetToFirst(); + CSession2* s; + while ((s=iSessionIter++)!=NULL) + { + static_cast(s)->SendAppServerExitNotification(aReason); + } + } + +/** Function to allow security checks on the client before they +connect to a service. +Server apps should override this method if they want to restict +connections to some services to clients with particular capabilities. +@param aServiceType The UID of the service that the client wants to connect to. +@param aMsg The message to check. +@param aAction A reference to the action to take if the security check + fails. This is either a value from TFailureAction or a negative + value which has meaning to the CustomFailureActionL() method of + a derived class. + The policy server framework gives this value a default of + EFailClient. If a derived implementation wishes a + different value, then it should change this. +@param aMissing A reference to the list of security attributes missing + from the checked process. The policy server initialises this + object to zero (that is a sid of 0, a vid of 0, and no capabilities). + If derived implementations wish to take advantage of a list of + missing attributes in their implementation of CustomFailureActionL(), + then they should set those missing attributes here in + CustomSecurityCheckL(). +@return A value from CPolicyServer::TCustomResult. +@see CPolicyServer */ +EXPORT_C CPolicyServer::TCustomResult CApaAppServer::CreateServiceSecurityCheckL(TUid /*aServiceType*/, const RMessage2& /*aMsg*/, TInt& /*aAction*/, TSecurityInfo& /*aMissing*/) + { + return CPolicyServer::EPass; + } + +TUid CApaAppServer::ConnectMessageServiceUid(const RMessage2& aMessage) const + { + // note: this function uses knowledge of the internal structure + // of connect messages + return TUid::Uid(aMessage.Int0()); + } +// From CServer2 +EXPORT_C void CApaAppServer::DoConnect(const RMessage2& aMessage) + { + CServer2::DoConnect(aMessage); + } + +// Reserved +EXPORT_C void CApaAppServer::CApaAppServer_Reserved1() + { + } + +EXPORT_C void CApaAppServer::CApaAppServer_Reserved2() + { + } +/** Extension mechanism - for internal BC proofing. */ +EXPORT_C void CApaAppServer::ExtensionInterface(TUid /*aInterfaceId*/, TAny*& /*aImplementaion*/) + { + } +EXPORT_C MApaServerAppExitObserver::MApaServerAppExitObserver() + { + } + +EXPORT_C void MApaServerAppExitObserver::MApaServerAppExitObserver_Reserved1() + { + } + +EXPORT_C void MApaServerAppExitObserver::MApaServerAppExitObserver_Reserved2() + { + } +// +// static functions +// + +void PanicAppServerClient(const RMessagePtr2& aMessage,TInt aPanic) + { + _LIT(KPanic,"ApaAppServer"); + aMessage.Panic(KPanic,aPanic); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/ApaServerAppPriv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/ApaServerAppPriv.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef APASERVERAPPPRIV_H +#define APASERVERAPPPRIV_H + +#include "ApaServerApp.h" + + +// client/server command ids for RApaAppServiceBase and CApaAppServiceBase +enum TApaAppServerCommandId + { + EApaAppServerNotifyServerExit = 1, + EApaAppServerCancelNotifyServerExit + }; + + +void PanicAppServerClient(const RMessagePtr2& aMessage,TInt aCode); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apparc/TRACE.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apparc/TRACE.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// peppers apparc code with RDebug::Print()'s under certain circumstances... +// + +// #define __SHOW_TRACE(aString) RDebug::Print(aString) +// + + + +#define __SHOW_TRACE(aString) + +/* +#define __APA_PROFILE_START(aNum) RDebug::ProfileStart(aNum) +#define __APA_PROFILE_END(aNum) RDebug::ProfileEnd(aNum) +*/ +#define __APA_PROFILE_START(aNum) +#define __APA_PROFILE_END(aNum) diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSCLSV.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSCLSV.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,191 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGCLSV_H__) +#define __APGCLSV_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__APMSTD_H__) +#include +#endif + +// A version must be specifyed when creating a session with the server +const TUint KAppListServMajorVersionNumber=7; +const TUint KAppListServMinorVersionNumber=1; +const TUint KAppListServBuildVersionNumber=117; + +enum TAppListServRanges + { + EFirstUnrestrictedOpcodeInAppListServ, + EFirstOpcodeNeedingWriteDeviceDataInAppListServ=100, + }; + +// opcodes used in message passing between client and server +enum TCountServRqst + { + //No Capability requirement + EAppListServFirst = EFirstUnrestrictedOpcodeInAppListServ, + EAppListServInitFullList, + EAppListServInitEmbedList, + EAppListServGetNextApp, + EAppListServEmbedCount, + EAppListServAppCount, + EAppListServGetAppInfo, + EAppListServGetAppCapability, + EAppListServStartAppWithoutReturningThreadId, + EAppListServStartAppReturningThreadId, + EAppListServRecognizeData, + EAppListServRecognizeDataPassedByFileHandle, + EAppListServRecognizeSpecificData, + EAppListServRecognizeSpecificDataPassedByFileHandle, + EAppListServAppForDataType, + EAppListServStartDocument, + EAppListServStartDocumentByDataType, + EAppListServStartDocumentByUid, + EAppListServCreateDocumentByUid, + EAppListServGetExecutableNameGivenDocument, + EAppListServGetExecutableNameGivenDocumentPassedByFileHandle, + EAppListServGetExecutableNameGivenDataType, + EAppListServGetExecutableNameGivenAppUid, + EAppListServGetOpaqueData, + EAppListServGetNativeExecutableNameIfNonNative, + EAppListServAppIconByUid, + EAppListServAppForDocument, + EAppListServAppForDocumentPassedByFileHandle, + EAppListServGetConfidence, + EAppListServGetBufSize, + EAppListServSetBufSize, + EAppListServGetDataTypesPhase1, + EAppListServGetDataTypesPhase2, + ESetNotify, + ECancelNotify, + EDCloseServer, + EAppListServAppIconByUidAndSize, + EAppListServGetAppIconSizes, + EAppListServGetAppViews, + EAppListServViewIconByUidAndSize, + EAppListServGetFileOwnershipInfo, + EAppListServNumberOfOwnDefinedIcons, + EAppListServInitFilteredEmbedList, + EAppListServInitAttrFilteredList, + EAppListServAppIconFileName, + EAppListServAppViewIconFileName, + EAppListServInitServerAppList, + EAppListServGetAppServices, + EAppListServGetServiceImplementations, + EAppListServGetServiceImplementationsDataType, + EAppListServGetAppServiceUids, + EAppListServGetAppServiceOpaqueData, + EAppListServAppForDataTypeAndService, + EAppListServAppForDocumentAndService, + EAppListServAppForDocumentAndServicePassedByFileHandle, + EAppListServApplicationLanguage, + ERegisterListPopulationCompleteObserver, + ECancelListPopulationCompleteObserver, + EAppListServPreferredBufSize, + EAppListServRecognizeFiles, + EAppListServRecognizeFilesAsync, + ECancelRecognizeFiles, + EAppListServTransferRecognitionResult, + EAppListServGetAppByDataType, + EAppListServGetDefaultScreenNumber, + EAppListServRuleBasedLaunching, + EAppListServRegisterNonNativeApplicationType, + EAppListServDeregisterNonNativeApplicationType, + EAppListServPrepareNonNativeApplicationsUpdates, + EAppListServRegisterNonNativeApplication, + EAppListServDeregisterNonNativeApplication, + EAppListServCommitNonNativeApplications, + EAppListServRollbackNonNativeApplications, + EAppListServGetAppType, + ENotifyOnDataMappingChange, + ECancelNotifyOnDataMappingChange, + EMatchesSecurityPolicy, + EAppListServSetAppShortCaption, + EAppListServForceRegistration, + EDebugHeapMark, + EDebugHeapMarkEnd, + EDebugHeapFailNext, + EDebugClearAppInfoArray, + EDebugFlushRecognitionCache, + EDebugSetLoadRecognizersOnDemand, + EDebugPerformOutstandingRecognizerUnloading, + EAppListServAppIconFileHandle, + EDebugAddFailingNonNativeApplicationsUpdate, + EDebugAddPanicingNonNativeApplicationsUpdate, + EDebugAddRollbackPanicingNonNativeApplicationsUpdate, // = 89 + EAppListServAppInfoProvidedByRegistrationFile = 99, + //WriteDeviceData Capability requirement + // ER5 + EAppListServSetConfidence=EFirstOpcodeNeedingWriteDeviceDataInAppListServ, + // 8.1 + EAppListInsertDataMapping, + EAppListInsertDataMappingIfHigher, + EAppListDeleteDataMapping, + // End Marker no Capability + EAppListFirstUnusedOpcode, + }; + + +enum TApaClientPanic + { + EClientBadRequest, + EClientBadDescriptor, + ENotifierAlreadyPresent, + ENoSupportedDataTypes, + EObserverAlreadyPresent, + ENotifyOnDataMappingChangeRequestOutstanding +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + ,EInvalidFileName +#endif + }; + + +struct SReturnData_AppForDocument + { + TUid iUid; + TDataType iDataType; + }; + +struct SReturnData_AppIconByUid + { + TInt iIcon; + TInt iIconMask; + }; + +struct SReturnData_AppIconByUidAndSize + { + TInt iIcon; + TInt iIconMask; + }; + +struct SReturnData_ViewIconByUidAndSize + { + TInt iIcon; + TInt iIconMask; + }; + +struct SNonNativeApplicationInfo + { + TUid iApplicationType; + TInt iDrive; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSCONSTDATA.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSCONSTDATA.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,87 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +/* + * patchable const data values + * + * these values control whether apparc tries to save memory by unloading data + * recognizers when they are not being used + * + * To patch these values, add a line to an iby or oby file that is included in the rom being built using the following format: + * + * "patchdata @ " + * + * e.g. to enable on-demand recognizer loading, use the following line: + * "patchdata apserv.dll @ KApaLoadDataRecognizersOnDemand 1" + */ + + +/** + * Patchable constant. Determines whether, in the interest of saving memory, AppArc unloads data + * recognizers when they are not being used. + * + * @SYMPatchable + * @see KApaUnloadRecognizersTimeout + * + */ +EXPORT_C extern const TInt KApaLoadDataRecognizersOnDemand = 0; + +/** + * Patchable constant. Determines how long (in microseconds) a recognizer may remain unused before it gets deleted. + * + * @SYMPatchable + * @see KApaLoadDataRecognizersOnDemand + * + */ +EXPORT_C extern const TInt KApaUnloadRecognizersTimeout = 10000000; // 10 seconds in microseconds + + +/* + * emulator support + * to enable on-demand recognizer loading on the emulator, add the following line to your epoc.ini + * patchdata_apserv_dll_KApaLoadDataRecognizersOnDemand 1 + */ + +/* + * Patchable constant. + * + * @SYMPatchable + * @see KApaDrivesToMonitor + * + */ + +EXPORT_C extern const TInt KApaDrivesToMonitor = 0x3FFFFFF; +/* +The constant value 0x3FFFFFF represents that all drives (z->a(Least Significant Bit)) are monitored by default. +It is computed in the following way. + ZY XWVU TSRQ PONM LKJI HGFE DCBA + 11 1111 1111 1111 1111 1111 1111. +If the bit representing a drive is set (to 1) it is monitored for file change notifications. +Else it is not. +*/ + +/** + * Patchable constant. Determines whether apparc tries to save memory in the font bitmap + * server, by only loading MBM icons on demand. + * The default value is 0. + * When set to zero, all MBM icons are loaded at device boot and never unloaded. + * When set to non-zero, no MBM icons are loaded at device boot. MBM icons are + * loaded on demand (and never unloaded afterwards). + * + * @SYMPatchable + */ +EXPORT_C extern const TInt KApaLoadMbmIconsOnDemand = 0; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSERV.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSERV.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,65 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// APSERV.MMP for component APSERV +// + +/** +@file + +@SYMPurpose apserv.dll Apparc server +*/ + + +target apserv.dll +CAPABILITY All -Tcb +targettype DLL +UID 0x1000008D 0x10003A3E +VENDORID 0x70000001 + +SOURCEPATH ../apserv + +userinclude ../inc ../apparc +userinclude ../apgrfx +systeminclude /epoc32/include + + +source APSSERV.CPP APSSES.CPP APSSTD.CPP APSSCAN.CPP +source APSSTART.CPP APSRECCACHE.cpp APSRECUTIL.CPP +source APSCONSTDATA.CPP +source apsnnapps.cpp apsnnappupdates.cpp +source apsiconcaptionoverride.cpp + +library euser.lib efsrv.lib apparc.lib apgrfx.lib apmime.lib fbscli.lib apfile.lib +library estor.lib bafl.lib ws32.lib +library centralrepository.lib + +#if !defined(WINC) +macro USING_ECOM_RECOGS +library ecom.lib +#endif + +macro UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +deffile APSERV.DEF + +START WINS + baseaddress 0x43700000 +END + +START MARM +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECCACHE.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECCACHE.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,391 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APSRECCACHE.h" +#include "APSSES.H" + +////////////////////////////////////////////////////////////////////////////// +// Constants + +const TUint KMaxNumberOfEntries = 200; +////////////////////////////////////////////////////////////////////////////// + +CRecognitionResultHashMapEntry* CRecognitionResultHashMapEntry::NewL(const TDesC& aFileName, TTime aLastModified, const TDataRecognitionResult& aResult, CRecognitionResultHashMapEntry* aNext) + { + CRecognitionResult* result = CRecognitionResult::NewL(aFileName, aResult); + CleanupClosePushL(*result); + CRecognitionResultHashMapEntry* self = new(ELeave) CRecognitionResultHashMapEntry(aLastModified, result, aNext); + CleanupStack::Pop(result); + return self; + } + +CRecognitionResultHashMapEntry::CRecognitionResultHashMapEntry(TTime aLastModified, CRecognitionResult* aResult, CRecognitionResultHashMapEntry* aNext) + : iLastModified(aLastModified), iResult(aResult), iNext(aNext) + { + } + +CRecognitionResultHashMapEntry::~CRecognitionResultHashMapEntry() + { + iResult->Close(); + iResult = NULL; + delete iNext; + } + +void CRecognitionResultHashMapEntry::UpdateL(TTime aLastModified, const TDataRecognitionResult& aResult) + { + // since other objects might have a pointer to the CRecognitionResult object + // and rely on the value not changing we need to create a new object to take + // its place. + + CRecognitionResult* result = CRecognitionResult::NewL(FileName(), aResult); + iResult->Close(); + iResult = result; + + iLastModified = aLastModified; + } + +/////////////////////////////////////////////////////////////////////// +// CRecognitionResultHashMap +/////////////////////////////////////////////////////////////////////// + +CRecognitionResultHashMap::CRecognitionResultHashMap() + { + } + +CRecognitionResultHashMap::~CRecognitionResultHashMap() + { + for(TUint i = 0; i < KFileHashMapEntries; i++) + { + delete Entry(i); + } + } + +CRecognitionResult* CRecognitionResultHashMap::Get(const TDesC& aKey, TTime& aLastModified) const + { + const TUint index = GetIndex(aKey); + + for(const CRecognitionResultHashMapEntry* entry = Entry(index); entry; entry = entry->Next()) + { + if(entry->FileName().Compare(aKey) == 0) + { + aLastModified = entry->LastModified(); + return entry->Result(); + } + } + return NULL; + } + +/** +Adds a recognition result to the hash map of the particular directory. +This is only done if it isn't already existing. +The return value specifies if the number of entries was increased by one (ETrue) or not. +@internalComponent +*/ +TBool CRecognitionResultHashMap::AddL(const TDesC& aKey, TTime aLastModified, const TDataRecognitionResult& aResult) + { + const TUint index = GetIndex(aKey); + + //check if there already is an entry for the file + for(CRecognitionResultHashMapEntry* entry = Entry(index); entry; entry = entry->Next()) + { + if(entry->FileName().Compare(aKey) == 0) + { + // already there -> check modification date + if( entry->LastModified() != aLastModified ) + { + entry->UpdateL(aLastModified, aResult); + } + + return EFalse; + } + } + + //create new entry + SetEntry(index, CRecognitionResultHashMapEntry::NewL(aKey, aLastModified, aResult, Entry(index))); + iNumberOfEntries++; + return ETrue; + } + +TUint CRecognitionResultHashMap::GetIndex(const TDesC& aKey) const + { + // That's the hash algorithm + TUint hash = aKey.Length(); + for(TUint i=0;i< aKey.Length();i++) + { + hash += aKey[i]; + } + return hash % KFileHashMapEntries; + } + + +/////////////////////////////////////////////////////////////////////// +// CCacheDirectoryEntry +/////////////////////////////////////////////////////////////////////// + +CCacheDirectoryEntry* CCacheDirectoryEntry::NewL(const TDesC& aDirectory) + { + CCacheDirectoryEntry* self = new(ELeave) CCacheDirectoryEntry; + CleanupStack::PushL(self); + self->iDirectory = aDirectory.AllocL(); + CleanupStack::Pop(self); + return self; + } + +CCacheDirectoryEntry::CCacheDirectoryEntry() + { + } + +CCacheDirectoryEntry::~CCacheDirectoryEntry() + { + delete iDirectory; + } + +const TInt CCacheDirectoryEntry::iOffset = _FOFF(CCacheDirectoryEntry,iDlink); + +/////////////////////////////////////////////////////////////////////// +// CApsRecognitionCache +/////////////////////////////////////////////////////////////////////// + +CApsRecognitionCache::CApsRecognitionCache(RFs& aFs) + : iFs(aFs), + iDirectoryHeader(CCacheDirectoryEntry::iOffset), + iIter(iDirectoryHeader) + { + } + +CApsRecognitionCache::~CApsRecognitionCache() + { + CCacheDirectoryEntry* anyitem; + + iIter.SetToFirst(); + while ((anyitem = iIter++) != NULL) + { + anyitem->iDlink.Deque(); + delete anyitem; + }; + } + +/** +Adds a recognition result to the cache. An object is not added, when an up-to-date +version is already in the cache or if it's not possible to check the file's LastModified(). +@internalComponent +*/ +void CApsRecognitionCache::AddL(const TDesC& aDirectory, const TDesC& aFileName, const TDataRecognitionResult& aRecognitionResult) + { + TTime lastModified; + TFileName fullFileName(aDirectory); + fullFileName.Append(aFileName); + if(iFs.Modified(fullFileName, lastModified) != KErrNone) + { + #if defined(_DEBUG) + RDebug::Print(_L("CApsRecognitionCache::AddL(): File '%S' was not added to the cache, cannot get the modified attribute (full filename is required for the cache to work)."), &fullFileName); + #endif + return; + } + DoAddL(aDirectory, aFileName, lastModified, aRecognitionResult); + } + +/** +Adds a recognition result to the cache. An object is not added, when an up-to-date +version is already in the cache or if it's not possible to check the file's LastModified(). +@internalComponent +*/ +void CApsRecognitionCache::AddL(const RFile& aFile, const TDesC& aDirectory, const TDesC& aFileName, const TDataRecognitionResult& aRecognitionResult) + { + TTime lastModified; + if(aFile.Modified(lastModified) != KErrNone) + { + #if defined(_DEBUG) + TFileName fullFileName(aDirectory); + fullFileName.Append(aFileName); + RDebug::Print(_L("CApsRecognitionCache::AddL(): File '%S' was not added to the cache, cannot get the modified attribute."), &fullFileName); + #endif + return; + } + DoAddL(aDirectory, aFileName, lastModified, aRecognitionResult); + } + +/** +Adds a recognition result to the cache. An object is not added, when an up-to-date +version is already in the cache or if it's not possible to check the file's LastModified(). +@internalComponent +*/ +void CApsRecognitionCache::DoAddL(const TDesC& aDirectory, const TDesC& aFileName, const TTime& aLastModified, const TDataRecognitionResult& aRecognitionResult) + { + if(iNumberOfEntries > KMaxNumberOfEntries) + { + Cleanup(); + } + + CCacheDirectoryEntry* entry = NULL; + iIter.SetToFirst(); + while ((entry = iIter++) != NULL) + { + if(CompareDirectories(entry->Directory(),aDirectory)) + { + // move directory to top (it is likely to be used again soon) + entry->iDlink.Deque(); + iDirectoryHeader.AddFirst(*entry); + break; + } + } + + if(!entry) + { + // create directory and append it + entry = CCacheDirectoryEntry::NewL(aDirectory); + iDirectoryHeader.AddFirst(*entry); + } + + // insert to correct directory + if(entry->Files().AddL(aFileName, aLastModified, aRecognitionResult)) + { + iNumberOfEntries++; + } + } + +/** +Searches the cache for the particular recognition result. If the file was not modified since the +file was recognized, the stored recognition result is returned. +@internalComponent +*/ +TBool CApsRecognitionCache::Get(const TDesC& aDirectory, const TDesC& aFileName, TDataRecognitionResult& aRecognitionResult) + { + TTime lastModified; + TFileName fileName(aDirectory); + fileName.Append(aFileName); + const TInt error = iFs.Modified(fileName, lastModified); + if(error != KErrNone) + { + return EFalse; + } + + CRecognitionResult* result = DoGet(aDirectory, aFileName, lastModified); + if(result) + { + result->Get(aRecognitionResult); + result->Close(); // decrease reference count since we're not exposing the object + return ETrue; + } + return EFalse; + } + +/** +Searches the cache for the particular recognition result. If the file was not modified since the +file was recognized, the stored recognition result is returned. + +N.B. The returned value is reference counted! +@internalComponent +*/ +CRecognitionResult* CApsRecognitionCache::Get(const RFile& aFile, const TDesC& aDirectory, const TDesC& aFileName) + { + TTime lastModified; + const TInt error = aFile.Modified(lastModified); + if(error != KErrNone) + { + return NULL; + } + + return DoGet(aDirectory, aFileName, lastModified); + } + +/** +Searches the cache for the particular recognition result. If the file was not modified since the +file was recognized, the stored recognition result is returned. + +N.B. The returned value is reference counted! +@internalComponent +*/ +CRecognitionResult* CApsRecognitionCache::DoGet(const TDesC& aDirectory, const TDesC& aFileName, const TTime& aLastModified) + { + CRecognitionResult* result = NULL; + CCacheDirectoryEntry* entry; + + iIter.SetToFirst(); + while ((entry = iIter++) != NULL) + { + if(CompareDirectories(entry->Directory(),aDirectory)) + { + TTime cachedLastModified; + result = entry->Files().Get(aFileName, cachedLastModified); + if(result) + { + if(cachedLastModified != aLastModified) + { + result->Close(); + result = NULL; + } + } + + // move directory to top (it is likely to be used again soon) + entry->iDlink.Deque(); + iDirectoryHeader.AddFirst(*entry); + break; + } + } + return result; + } + +/** +A fast comparison of two directory names. +Should be faster than the "normal" TDesC16::Compare function, because +there is no need to check which string is "greater". +@internalComponent +*/ +TBool CApsRecognitionCache::CompareDirectories(const TDesC& aDir1, const TDesC& aDir2) const + { + TBool equal = ETrue; + if(aDir1.Length() == aDir2.Length()) + { + // start with the last character, as directories tend to be the same at the beginning + for(TInt i=aDir1.Length()-1; i>=0; i--) + { + if(aDir1[i] != aDir2[i]) + { + // return as soon one character is "wrong" + equal = EFalse; + break; + } + } + } + else + { + equal = EFalse; + } + return equal; + } +/** +Removes the least-often used directory in the cache. +@internalComponent +*/ +void CApsRecognitionCache::Cleanup() + { + CCacheDirectoryEntry* item = iDirectoryHeader.Last(); + iNumberOfEntries -= item->NumberOfEntries(); + item->iDlink.Deque(); + delete item; + } + +/** +Empties the cache. Useful mainly for testing. +@internalComponent +*/ +void CApsRecognitionCache::Flush() + { + while(!iDirectoryHeader.IsEmpty()) + { + Cleanup(); + } + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECCACHE.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECCACHE.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,157 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APSRECCACHE_H__) +#define __APSRECCACHE_H__ + +#include +#include +#include "APSRECUTIL.H" + +const TUint KFileHashMapEntries = 40; + +/** +An entry for a recognized file in the recognition cache. +The entries is organized as single-linked list. +The recognition result itself is reference-counted. +@internalComponent +*/ +class CRecognitionResultHashMapEntry : public CBase + { +public: + static CRecognitionResultHashMapEntry* NewL(const TDesC& aFileName, TTime aLastModified, const TDataRecognitionResult& aResult, CRecognitionResultHashMapEntry* aNext); + ~CRecognitionResultHashMapEntry(); + + inline const CRecognitionResultHashMapEntry* Next() const { return iNext; } + inline CRecognitionResultHashMapEntry* Next() { return iNext; } + inline TTime LastModified() const { return iLastModified; } + inline const TDesC& FileName() const { return iResult->FileName(); } + inline CRecognitionResult* Result() const { iResult->Open(); return iResult; } + + void UpdateL(TTime aLastModified, const TDataRecognitionResult& aResult); +private: + CRecognitionResultHashMapEntry(TTime aLastModified, CRecognitionResult* aResult, CRecognitionResultHashMapEntry* aNext); +private: + TTime iLastModified; + CRecognitionResult* iResult; + CRecognitionResultHashMapEntry* iNext; + }; + +/** +A hash map for finding and adding recognition results. + +@internalComponent +*/ +class CRecognitionResultHashMap : public CBase + { +public: + CRecognitionResultHashMap(); + ~CRecognitionResultHashMap(); + CRecognitionResult* Get(const TDesC& aKey, TTime& aLastModified) const; + TBool AddL(const TDesC& aKey, TTime aLastModified, const TDataRecognitionResult& aResult); + inline TUint NumberOfEntries() const { return iNumberOfEntries; } +protected: + TUint GetIndex(const TDesC& aKey) const; +private: + inline CRecognitionResultHashMapEntry* Entry(TUint aIndex); + inline const CRecognitionResultHashMapEntry* Entry(TUint aIndex) const; + inline void SetEntry(TUint aIndex, CRecognitionResultHashMapEntry* aEntry); +private: + TUint iNumberOfEntries; + CRecognitionResultHashMapEntry* iEntries[KFileHashMapEntries]; + }; + +/** +A directory entry in the cache. +Such an entry doesn't necessarily hold all files of a directory, but +only the ones that have been recognized so far. +@internalComponent +*/ +class CCacheDirectoryEntry : public CBase + { +public: + static CCacheDirectoryEntry* NewL(const TDesC& aDirectory); + ~CCacheDirectoryEntry(); + inline const TDesC& Directory() const { return *iDirectory; } + inline CRecognitionResultHashMap& Files() { return iFiles; } //lint !e1536 Suppress exposing low access member + inline TUint NumberOfEntries() const { return iFiles.NumberOfEntries(); } +private: + CCacheDirectoryEntry(); +public: + static const TInt iOffset; +private: + HBufC* iDirectory; // own copy! + CRecognitionResultHashMap iFiles; + TDblQueLink iDlink; + friend class CApsRecognitionCache; + }; + +/** +A recognition result cache. +The cache holds a list of directories (stored as an RPointerArray). Recently +used directories are stored on top of the list, rarely used directories are +stored at the bottom. + +This strategy improves performance: +search for files is started at the top (principle of locality) +and cleanup is done from the bottom. + +The files themselves are stored in a hash map (within directories). +@internalComponent +*/ +class CApsRecognitionCache : public CBase + { +public: + CApsRecognitionCache(RFs& aFs); + ~CApsRecognitionCache(); + void AddL(const TDesC& aDirectory, const TDesC& aFileName, const TDataRecognitionResult& aRecognitionResult); + void AddL(const RFile& aFile, const TDesC& aDirectory, const TDesC& aFileName, const TDataRecognitionResult& aRecognitionResult); + TBool Get(const TDesC& aDirectory, const TDesC& aFileName, TDataRecognitionResult& aRecognitionResult); + CRecognitionResult* Get(const RFile& aFile, const TDesC& aDirectory, const TDesC& aFileName); + void Flush(); +private: + void DoAddL(const TDesC& aDirectory, const TDesC& aFileName, const TTime& aLastModified, const TDataRecognitionResult& aRecognitionResult); + CRecognitionResult* DoGet(const TDesC& aDirectory, const TDesC& aFileName, const TTime& aLastModified); + TBool CompareDirectories(const TDesC& aDir1, const TDesC& aDir2) const; + void Cleanup(); +private: // data + RFs& iFs; + TDblQue iDirectoryHeader; + TDblQueIter iIter; + TUint iNumberOfEntries; + }; + + +//inlines + +inline CRecognitionResultHashMapEntry* CRecognitionResultHashMap::Entry(TUint aIndex) + { + ASSERT(aIndex < KFileHashMapEntries); + return iEntries[aIndex]; + } //lint !e1762 Suppress member function could be made const + +inline const CRecognitionResultHashMapEntry* CRecognitionResultHashMap::Entry(TUint aIndex) const + { + ASSERT(aIndex < KFileHashMapEntries); + return iEntries[aIndex]; + } + +inline void CRecognitionResultHashMap::SetEntry(TUint aIndex, CRecognitionResultHashMapEntry* aEntry) + { + ASSERT(Entry(aIndex) == aEntry->Next()); + iEntries[aIndex] = aEntry; + } + +#endif // __APSRECCACHE_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECUTIL.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECUTIL.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,275 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Classes for synchronous and asynchronous file recognitions (of a directory) +// +// + + +#include "APSRECUTIL.H" +#include "APSRECCACHE.h" + +////////////////////////////// +// CRecognitionResult +////////////////////////////// + +CRecognitionResult* CRecognitionResult::NewL(const TDesC& aFileName, const TDataRecognitionResult& aRecognitionResult) + { + ASSERT(aFileName.Find(_L("\\")) == KErrNotFound); // the filename should not contain any path + + HBufC* fileName = aFileName.AllocLC(); + HBufC8* dataType = aRecognitionResult.iDataType.Des8().AllocLC(); + CRecognitionResult* self = new(ELeave) CRecognitionResult(fileName, dataType, aRecognitionResult.iDataType.Uid(), aRecognitionResult.iConfidence); + CleanupStack::Pop(2, fileName); + return self; + } + +CRecognitionResult::CRecognitionResult(HBufC* aFileName, HBufC8* aDataType, TUid aUid, TInt aConfidence) + : iFileName(aFileName), + iDataType(aDataType), + iUid(aUid), + iConfidence(aConfidence) + { + } + +CRecognitionResult::~CRecognitionResult() + { + delete iFileName; + delete iDataType; + } + +void CRecognitionResult::Get(TDataRecognitionResult& aRecognitionResult) + { + if(iUid == KNullUid) + + { + aRecognitionResult.iDataType = TDataType(*iDataType); + } + else + { + aRecognitionResult.iDataType = TDataType(iUid); + } + aRecognitionResult.iConfidence = iConfidence; + } + + + +TUint CRecognitionResult::GetRequiredBufferSize() const + { + return iFileName->Size() + iDataType->Size() + sizeof(TUid) + sizeof(TInt) + 2; + } + +void CRecognitionResult::WriteToStreamL(RWriteStream& aWriteStream) + { + aWriteStream.WriteUint8L(iFileName->Length()); + aWriteStream.WriteL(*iFileName); + aWriteStream.WriteUint8L(iDataType->Length()); + aWriteStream.WriteL(*iDataType); + aWriteStream.WriteInt32L(iUid.iUid); + aWriteStream.WriteInt32L(iConfidence); + } + +/////////////////////////////////// +// CDirectoryRecognitionResult +/////////////////////////////////// + +CDirectoryRecognitionResult::CDirectoryRecognitionResult(HBufC* aPath, HBufC8* aDataTypeFilter) + : iPath(aPath), iDataTypeFilter(aDataTypeFilter) + { + iRequiredBufferSize = sizeof(TUint); + } + +CDirectoryRecognitionResult::~CDirectoryRecognitionResult() + { + delete iPath; + delete iDataTypeFilter; + + const TInt count = iEntries.Count(); + for(TInt i = 0; i < count; i++) + { + iEntries[i]->Close(); + } + iEntries.Reset(); + } + +void CDirectoryRecognitionResult::AppendL(CRecognitionResult* aEntry) + { + if(iDataTypeFilter) + { + if(aEntry->DataType().Match(*iDataTypeFilter) == KErrNotFound) + { + aEntry->Close(); //if we don't take ownership we must decrease reference count + return; + } + } + + iEntries.AppendL(aEntry); + iRequiredBufferSize += aEntry->GetRequiredBufferSize(); + } //lint !e818: Pointer parameter could be declared as pointing to const + +void CDirectoryRecognitionResult::WriteToStreamL(RWriteStream& aWriteStream) + { + aWriteStream.WriteUint32L(iEntries.Count()); + for (TInt i=0; i < iEntries.Count(); i++) + { + iEntries[i]->WriteToStreamL(aWriteStream); + } + aWriteStream.CommitL(); + } + +////////////////////////////////////////////////////////// +// CFileRecognitionUtility +////////////////////////////////////////////////////////// + +CFileRecognitionUtility::CFileRecognitionUtility(CApaAppListServer& aServer, TInt aMaxBufSize, RFs& aFs) + : CActive(0), + iServer(aServer), + iMaxBufSize(aMaxBufSize), + iFs(aFs), + iIndex(0), + iStep(0) + { + CActiveScheduler::Add(this); + } + +CFileRecognitionUtility::~CFileRecognitionUtility() + { + Cancel(); + delete iEntryList; + + iPath = NULL; + iResult = NULL; + } + +void CFileRecognitionUtility::RecognizeSynchronouslyL(CDirectoryRecognitionResult& aResult) + { + iPath = &(aResult.Path()); + iResult = &aResult; + + User::LeaveIfError(iFs.IsValidName(iPath->Des())); + + ReadDirectoryL(); + + // recognize files and calculate size of buffer + for(iIndex=0;iIndexCount();iIndex++) + { + RecognizeFileL(); + } + + delete iEntryList; + iEntryList = NULL; + } + +void CFileRecognitionUtility::RecognizeAsynchronously(CDirectoryRecognitionResult& aResult, const RMessage2& aMessage) + { + iIndex = 0; + iStep = 0; + iPath = &(aResult.Path()); + iResult = &aResult; + iMessage = aMessage; + + NextStep(); + } + +void CFileRecognitionUtility::ReadDirectoryL() + { + delete iEntryList; + iEntryList = NULL; + + // read directory content + User::LeaveIfError(iFs.GetDir(iPath->Des(),KEntryAttNormal,EDirsAnyOrder,iEntryList)); + } + +TInt CFileRecognitionUtility::BufferSizeL() const + { + const TInt preferredBufferSize = iServer.DataRecognizerPreferredBufSizeL(); + TInt bufSize=Min(preferredBufferSize,iMaxBufSize); + if (bufSize<1) + { + bufSize=8; // sensible minimum. + } + return bufSize; + } + +void CFileRecognitionUtility::RecognizeFileL() + { + TFileName fullFileName(*iPath); + fullFileName.Append((*iEntryList)[iIndex].iName); + RFile file; + User::LeaveIfError(file.Open(iFs, fullFileName, EFileRead | EFileShareReadersOnly)); + CleanupClosePushL(file); + + CRecognitionResult* result = NULL; + TRAP_IGNORE(result = iServer.RecognizeDataAsCRecognitionResultL(file, BufferSizeL())); + if(result) + { + CleanupClosePushL(*result); + iResult->AppendL(result); + CleanupStack::Pop(result); + } + + CleanupStack::PopAndDestroy(&file); + } + +void CFileRecognitionUtility::CancelRecognitionRequest() + { + if(iStep <= 1) + { + Cancel(); + iMessage.Complete(KErrCancel); + } + } + +void CFileRecognitionUtility::NextStep() + { + TRequestStatus* pStatus = &iStatus; + User::RequestComplete(pStatus, KErrNone); + SetActive(); + } + +void CFileRecognitionUtility::RunL() + { + switch(iStep) + { + case 0: // first step: read the directory content + ReadDirectoryL(); + iIndex=0; + iStep++; + NextStep(); + break; + case 1: // read current file and recognize it + if(iIndex < iEntryList->Count()) + { + RecognizeFileL(); + iIndex++; + NextStep(); + } + else // finished + { + iMessage.WriteL(1,TPckgBuf(iResult->RequiredBufferSize())); + iMessage.Complete(KErrNone); + iStep++; // to show that we have completed the request + delete iEntryList; + iEntryList = NULL; + } + break; + default: + break; + } + } + +void CFileRecognitionUtility::DoCancel() + { + iIndex = 0; + iStep = 0; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECUTIL.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSRECUTIL.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,110 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__APSRECUTIL_H__) +#define __APSRECUTIL_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#include +#include + +/** +Reference-counted object which stores a recognition result in a more compact format +than TDataRecognitionResult does. Also includes the file name. + +The reason why instances of this class are reference-counted is that they might +be "owned" by the cache and CDirectoryRecognitionResult at the same time. If both +of them had their own copies unnecessarily much memory would be wasted. +@internalComponent +*/ +class CRecognitionResult : public CObject + { +public: + static CRecognitionResult* NewL(const TDesC& aFileName, const TDataRecognitionResult& aRecognitionResult); + TUint GetRequiredBufferSize() const; + void WriteToStreamL(RWriteStream& aWriteStream); + + void Get(TDataRecognitionResult& aRecognitionResult); + inline const TDesC8& DataType() const { return *iDataType; } + inline const TDesC& FileName() const { return *iFileName; } + +private: + CRecognitionResult(HBufC* aFileName, HBufC8* aDataType, TUid aUid, TInt aConfidence); + ~CRecognitionResult(); +private: + HBufC* iFileName; + HBufC8* iDataType; + TUid iUid; + TInt iConfidence; + }; + +/** +Holds the recognition results of all files of a directory. +@internalComponent +*/ +class CDirectoryRecognitionResult : public CBase + { +public: + CDirectoryRecognitionResult(HBufC* aPath, HBufC8* aDataTypeFilter); + virtual ~CDirectoryRecognitionResult(); + void AppendL(CRecognitionResult* aEntry); + void WriteToStreamL(RWriteStream& aWriteStream); + inline TInt RequiredBufferSize() const {return iRequiredBufferSize;} + inline HBufC& Path() { return *iPath; } +private: + TInt iRequiredBufferSize; + HBufC* iPath; + HBufC8* iDataTypeFilter; + RPointerArray iEntries; + }; + +/** +Utility class which does synchronous and asynchronous file recognitions of a directory +@internalComponent +*/ +class CFileRecognitionUtility : public CActive + { +public: + CFileRecognitionUtility(CApaAppListServer& aServer, TInt aMaxBufSize, RFs& aFs); + ~CFileRecognitionUtility(); + void RecognizeSynchronouslyL(CDirectoryRecognitionResult& aResult); + void RecognizeAsynchronously(CDirectoryRecognitionResult& aResult, const RMessage2& aMessage); + void CancelRecognitionRequest(); +protected: + void ReadDirectoryL(); + void RecognizeFileL(); +private: + void NextStep(); + void RunL(); + void DoCancel(); + TInt BufferSizeL() const; + +private: + HBufC* iPath; + CDirectoryRecognitionResult* iResult; + CApaAppListServer& iServer; + TInt iMaxBufSize; + RFs& iFs; + CDir* iEntryList; + TInt iIndex; + TInt iStep; + RMessage2 iMessage; + }; + +#endif // __APSRECUTIL_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSCAN.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSCAN.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,343 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// AppArc recognizer and application scanning +// +// + +#include "APSSCAN.H" +#ifdef USING_ECOM_RECOGS +#include +#endif + +class CApaFsMonitor::CApaFsNotifier : public CActive + { +public: + ~CApaFsNotifier(); + static CApaFsNotifier* NewLC(RFs& aFs, const TDesC& aLocation, MApaFsChangeObserver& aObserver); + void Start(TNotifyType aNotifyType); +private: + CApaFsNotifier(RFs& aFs, MApaFsChangeObserver& aObserver); + void DoCancel(); + void RunL(); +private: + RFs& iFs; + MApaFsChangeObserver& iObserver; + HBufC* iLocation; + }; + +CApaFsMonitor::CApaFsNotifier::~CApaFsNotifier() + { + Cancel(); + delete iLocation; + } + +CApaFsMonitor::CApaFsNotifier* CApaFsMonitor::CApaFsNotifier::NewLC(RFs& aFs, const TDesC& aLocation, MApaFsChangeObserver& aObserver) + { // static + CApaFsNotifier* self=new(ELeave) CApaFsNotifier(aFs, aObserver); + CleanupStack::PushL(self); + self->iLocation = aLocation.AllocL(); + return self; + } + +CApaFsMonitor::CApaFsNotifier::CApaFsNotifier(RFs& aFs, MApaFsChangeObserver& aObserver) + : CActive(EPriorityLow), // priority must be higher than that of CApaFsMonitor::iFsTimer, to ensure the RunL of each completed CApaFsNotifier object is executed before the RunL of a completed CApaFsMonitor::iFsTimer + iFs(aFs), + iObserver(aObserver) + { + CActiveScheduler::Add(this); + } + + +void CApaFsMonitor::CApaFsNotifier::Start(TNotifyType aNotifyType) + { + if (iLocation->Length()) + { + iFs.NotifyChange(aNotifyType, iStatus, *iLocation); + } + else + { + iFs.NotifyChange(aNotifyType, iStatus); + } + SetActive(); + } + +void CApaFsMonitor::CApaFsNotifier::DoCancel() + { + iFs.NotifyChangeCancel(iStatus); + } + +void CApaFsMonitor::CApaFsNotifier::RunL() + { + if (iStatus == KErrNone) + { + iObserver.FsChanged(); + } + } + + + +// An FsMonitor checks for any changes to the file system +// If a change is detected, a CallBack function is called after a short pause. +// If there are further changes, the CallBack is not called again until after 3 secs have elapsed. + +const TInt KApaFsMonitorPause=250000; // Wait 0.25s before calling CallBack +const TInt KApaFsMonitorPeriod=3000000; // Don't call CallBack again before 3s have elapsed + +// +// Class CApaFsMonitor +// + +EXPORT_C CApaFsMonitor::~CApaFsMonitor() +/** Deletes the timer object, file system change notification +active objects and location descriptors. */ + { + if (iFsTimer) + { + iFsTimer->Cancel(); + delete iFsTimer; + } + iNotifiers.ResetAndDestroy(); + iNotifiers.Close(); + } + +CApaFsMonitor::CApaFsMonitor(RFs& aFs, TCallBack aCallBack) + :iFs(aFs), + iCallBack(aCallBack) + { + } + + +EXPORT_C CApaFsMonitor* CApaFsMonitor::NewL(RFs& aFs,const TDesC& aLocation, TCallBack aCallBack) +/** Allocates and constructs a file system monitor. + +@param aFs A session with the file server. +@param aLocation Optional name of the file or directory to be +monitored. If the length of the descriptor is zero, the object +monitors changes to all files and directories in the file system. +Additional locations to monitor may be specified by calling +AddLocationL. +@param aCallBack The callback function. +@return The file system monitor. +@see CApaFsMonitor::AddLocationL() */ + { + CApaFsMonitor* self=new(ELeave) CApaFsMonitor(aFs, aCallBack); + CleanupStack::PushL(self); + self->iFsTimer=CPeriodic::NewL(CActive::EPriorityIdle); + self->AddLocationL(aLocation); + CleanupStack::Pop(self); + return self; + } + +/** Adds an additional file system location to monitor. + +@param aLocation Name of the file or directory to be monitored. */ +EXPORT_C void CApaFsMonitor::AddLocationL(const TDesC& aLocation) + { + CApaFsNotifier* const notifier = CApaFsNotifier::NewLC(iFs, aLocation, *this); + User::LeaveIfError(iNotifiers.Append(notifier)); + CleanupStack::Pop(notifier); + } + +/** Cancels all file system notification active objects owned by +this monitor. + +A call to this function may be followed immediately by a call +to Start() to change the notification type. + +@see CApaFsMonitor::Start() */ +EXPORT_C void CApaFsMonitor::Cancel() + { + const TInt notifierCount = iNotifiers.Count(); + for (TInt ii=0; ii < notifierCount; ii++) + { + iNotifiers[ii]->Cancel(); + } + } + +TBool CApaFsMonitor::AnyNotificationImpending() const + { + for (TInt i=iNotifiers.Count()-1; i>=0; --i) + { + if (iNotifiers[i]->iStatus!=KRequestPending) + { + return ETrue; + } + } + return EFalse; + } + +void CApaFsMonitor::FsChanged() + { + iFsHasChanged=ETrue; + if (!iIsBlocked && !iFsTimer->IsActive()) + iFsTimer->Start(KApaFsMonitorPause,KApaFsMonitorPeriod,TCallBack(TimerCallBack,this)); + } + +EXPORT_C void CApaFsMonitor::Start(TNotifyType aNotifyType) +/** Sets the type of notification required and starts a file system notification +active object for each location being monitored. + +You can either request notification of changes to all files in the file system, +or to specific files, depending on the aLocation parameter specified in the NewL() +function. + +@param aNotifyType A set of flags that indicate what kinds of change should cause +notifications. */ + { + iNotifyType=aNotifyType; + + DoStart(); + } + +void CApaFsMonitor::DoStart() + { + const TInt notifierCount = iNotifiers.Count(); + for (TInt ii=0; ii < notifierCount; ii++) + { + CApaFsNotifier* const notifier = iNotifiers[ii]; + if (!notifier->IsActive()) + { + notifier->Start(iNotifyType); + } + } + } + +EXPORT_C TNotifyType CApaFsMonitor::NotifyType() const +/** Gets the type of notification as passed to Start(). + +If Start() has not yet been called, the type of notification is undefined. + +@return Flags that indicate what kinds of change should cause notifications. */ + { + return iNotifyType; + } + +EXPORT_C void CApaFsMonitor::SetBlocked(TBool aIsBlocked) +/** Blocks or unblocks file system monitoring. + +While in a blocked state, the callback never gets called. If monitoring is +unblocked using this function, and a change has occurred when in the blocked +state then the timer is started, causing the callback to be called initially +after 0.25 seconds, followed by subsequent delays of 3 seconds. + +@param aIsBlocked True to block callbacks, false to unblock them. */ + { + iIsBlocked=aIsBlocked; + if (iIsBlocked==EFalse) // If end of a blocked period, notify if a change was detected + { + if (iFsHasChanged && !iFsTimer->IsActive()) + { + iFsTimer->Start(KApaFsMonitorPause,KApaFsMonitorPeriod,TCallBack(TimerCallBack,this)); + } + } + } + +TInt CApaFsMonitor::TimerCallBack(TAny* aObject) + { + CApaFsMonitor* self=(CApaFsMonitor*)aObject; + if (self->iFsHasChanged && !self->iIsBlocked) + { + self->iFsHasChanged=EFalse; + self->DoStart(); + self->iCallBack.CallBack(); // Should not leave, but if it does, it's OK + } + else + self->iFsTimer->Cancel(); + return KErrNone; + } + + +#ifdef USING_ECOM_RECOGS +// +// CApaEComMonitor class +// +CApaEComMonitor::CApaEComMonitor(TCallBack aCallBack) + : CActive(EPriorityIdle), iCallBack (aCallBack) + { + CActiveScheduler::Add(this); + } + +CApaEComMonitor::~CApaEComMonitor() + { + Cancel(); + delete iEComTimer; + if (iEComSession) + { + iEComSession->Close(); + } + } + +CApaEComMonitor* CApaEComMonitor::NewL(TCallBack aCallBack) + { + CApaEComMonitor* self=new(ELeave) CApaEComMonitor(aCallBack); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + +void CApaEComMonitor::ConstructL() + { + iEComSession = &(REComSession::OpenL()); + iEComTimer = CPeriodic::NewL(CActive::EPriorityIdle); + } + +void CApaEComMonitor::DoCancel() + { + iEComTimer->Cancel(); + iEComSession->CancelNotifyOnChange(iStatus); + } + +void CApaEComMonitor::Start () + { + DoStart(); + } + +void CApaEComMonitor::DoStart() + { + iEComSession->NotifyOnChange (iStatus); + SetActive(); + } + +//callback to to call the ecomrecognizer scanning routine upon notification from ECom +TInt CApaEComMonitor::TimerCallBack(TAny* aObject) + { + CApaEComMonitor* self=(CApaEComMonitor*)aObject; + if (self->iEComHasChanged) + { + self->iEComHasChanged=EFalse; + self->DoStart(); + self->iCallBack.CallBack(); // Should not leave, but if it does, it's OK + } + else + self->iEComTimer->Cancel(); + return KErrNone; + } + +const TInt KApaEComMonitorPause=250000; // Wait 0.25s before calling CallBack +const TInt KApaEComMonitorPeriod=3000000; // Don't call CallBack again before 3s have elapsed + +void CApaEComMonitor::RunL() + { + if (iStatus == KErrNone) + { + iEComHasChanged = ETrue; + if (!iEComTimer->IsActive()) + { + iEComTimer->Start(KApaEComMonitorPause,KApaEComMonitorPeriod,TCallBack(TimerCallBack,this)); + } + } + } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSERV.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSERV.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1162 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#include +#include +#include +#include "APSSERV.H" +#include "APFREC.H" +#include "APSSES.H" +#include "APSSTD.H" +#include "../apfile/aprfndr.h" +#include "APGAPLST.H" +#include "APSSCAN.H" +#include "APSSTD.H" +#include "APASVST.H" +#include "datastor.h" +#include "APSRECCACHE.h" +#include "apsnnapps.h" +#include "../apfile/apuninstallmonitor.h" +#include "../apgrfx/apprivate.h" +#include "apsiconcaptionoverride.h" + +_LIT(KAppArcServerSemaphore,"AppArcServerSemaphore"); +_LIT(KAppArcServerThread,"AppArcServerThread"); +_LIT(KAppRegistrationFileImportLocation, "?:\\private\\10003a3f\\import\\apps\\"); +_LIT(KAppResourceAppsLocation, "?:\\resource\\apps\\"); +_LIT(KNonNativeApplicationTypeRegistry, ":\\private\\10003a3f\\NonNativeTypes.dat"); + +/* + * patchable const data values defined in ApsConstData.cpp + */ + +IMPORT_C extern const TInt KApaLoadDataRecognizersOnDemand; +IMPORT_C extern const TInt KApaUnloadRecognizersTimeout; +IMPORT_C extern const TInt KApaDrivesToMonitor; +IMPORT_C extern const TInt KApaLoadMbmIconsOnDemand; + +const TUint8 KPolicyElementWriteDeviceData = 0; + +//To monitor all drives. +const TInt KApaMonitorAllDrives = 0x3FFFFFF; + +const TUint KRangeCount = 3; + +const TInt KAppListServRanges[KRangeCount] = + { + EFirstUnrestrictedOpcodeInAppListServ, + EFirstOpcodeNeedingWriteDeviceDataInAppListServ, + EAppListFirstUnusedOpcode, + }; + +const TUint8 KElementsIndex[KRangeCount] = + { + CPolicyServer::EAlwaysPass, //Always passing no capability required [0-99] + KPolicyElementWriteDeviceData, //Requires WriteDeviceData [100-(EAppListFirstUnusedOpcode-1)] + CPolicyServer::ENotSupported, //Not Supported [EAppListFirstUnusedOpcode-End] + }; + +const CPolicyServer::TPolicyElement KPolicyElements[] = + { + {_INIT_SECURITY_POLICY_C1(ECapabilityWriteDeviceData), CPolicyServer::EFailClient} + }; + +const CPolicyServer::TPolicy KApaServPolicy = + { + CPolicyServer::EAlwaysPass, + KRangeCount, + KAppListServRanges, + KElementsIndex, + KPolicyElements + }; + + + +////////////////////////////// +// CApaAppListServer +////////////////////////////// + +const TInt KAppListServerPriority=CActive::EPriorityStandard; +/** +NameApaServStartSemaphore + +@internalTechnology +*/ +EXPORT_C TPtrC NameApaServStartSemaphore() + { + TPtrC nameApaServStartSemaphore(KAppArcServerSemaphore); + return nameApaServStartSemaphore; + } + +/** +NameApaServServerThread + +@internalTechnology +*/ +EXPORT_C TPtrC NameApaServServerThread() + { + TPtrC nameApaServServerThread(KAppArcServerThread); + return nameApaServServerThread; + } + +EXPORT_C CApaAppListServer* CApaAppListServer::Self() + { // static + return static_cast(Dll::Tls()); + } + +EXPORT_C CApaAppListServer* CApaAppListServer::NewL(MApaAppStarter* aAppStarter) +// Create a new CApaAppListServer which owns it's own resources + { + CApaAppListServer* self=new(ELeave) CApaAppListServer(KAppListServerPriority); + CleanupStack::PushL(self); + self->ConstructL(aAppStarter); + CleanupStack::Pop(); + return self; + } + +CApaAppListServer::CApaAppListServer(TInt aPriority) + : CPolicyServer(aPriority,KApaServPolicy), + iAppList(0), + iTypeStoreModified(0), + iLoadRecognizersOnDemand(KApaLoadDataRecognizersOnDemand), + iLoadMbmIconsOnDemand(KApaLoadMbmIconsOnDemand) + { + + #ifdef __WINS__ + // KApaLoadDataRecognizersOnDemand and KApaloadIconsOnDemand are Rom patchable constants, + // so need an emulator equivalent + // if WINS then read value from epoc.ini + // requires licencees to set property in epoc.ini + + TInt halValue = 0; + if (UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalIntProperty, (TAny*)"patchdata_apserv_dll_KApaLoadDataRecognizersOnDemand", &halValue) == KErrNone) + { + iLoadRecognizersOnDemand = halValue; + } + if (UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalIntProperty, (TAny*)"patchdata_apserv_dll_KApaLoadMbmIconsOnDemand", &halValue) == KErrNone) + { + iLoadMbmIconsOnDemand = halValue; + } + #endif + + __DECLARE_NAME(_S("CApaAppListServer")); + } + +void CApaAppListServer::ConstructL(MApaAppStarter* aAppStarter) + { + StartL(KAppListServerName); + User::LeaveIfError(Dll::SetTls(this)); + User::LeaveIfError(iFs.Connect()); + + iScanningFileRecognizer=CApaScanningFileRecognizer::NewL(iFs,aAppStarter); + + // Get the idle timeout delay from the commandline if specified. The default is 50000ms + const TInt cmdLineLen = User::CommandLineLength(); + TInt idlePeriodicDelay=50000; //default value + if(cmdLineLen) + { + _LIT(KIdleTimeout,"IDLE_TIMEOUT_PERIODIC_DELAY_"); + + // Extract the command line into a buffer + HBufC* cmdLine = HBufC::NewLC(cmdLineLen); + TPtr cmdLinePtr = cmdLine->Des(); + User::CommandLine(cmdLinePtr); + cmdLinePtr.UpperCase(); + + // Check if there is an idle timeout value given + TInt idleTimeOutArgPos = cmdLinePtr.Find(KIdleTimeout); + if(KErrNotFound != idleTimeOutArgPos) + { + // Extract the value out of the command line argument + const TInt idleTimeOutValuePos = idleTimeOutArgPos + KIdleTimeout().Length(); + TInt i = idleTimeOutValuePos; + while (i < cmdLineLen) + { + TChar c(cmdLinePtr[i]); + if (!c.IsDigit()) + { + break; + } + i++; + } + TLex idleTimeOutParser(cmdLinePtr.Mid(idleTimeOutValuePos, (i-idleTimeOutValuePos))); + User::LeaveIfError(idleTimeOutParser.Val(idlePeriodicDelay)); + } + + // Check if the recognition cache should be used or not. By default the cache is used + iRecognitionCache = 0; + _LIT(KWithoutRecognitionCache,"WITHOUT_RECOGNITION_CACHE"); + if(KErrNotFound == cmdLinePtr.Find(KWithoutRecognitionCache)) + { + iRecognitionCache = new (ELeave) CApsRecognitionCache(iFs); + } + + _LIT(KTextShellMode,"TEXT_SHELL_MODE"); + if (KErrNotFound == cmdLinePtr.Find(KTextShellMode)) + { + // We are NOT running in text shell mode so connect to wserv session + User::LeaveIfError(iWsSession.Connect()); + iRuleBasedPlugIns = CApaScanningRuleBasedPlugIns::NewL(); + } + + CleanupStack::PopAndDestroy(cmdLine); + } + else + { + // no arguments so cache is used + iRecognitionCache = new (ELeave) CApsRecognitionCache(iFs); + // and rule based plugins are enabled + User::LeaveIfError(iWsSession.Connect()); + iRuleBasedPlugIns = CApaScanningRuleBasedPlugIns::NewL(); + } + + CApaAppRegFinder* appRegFinder=CApaAppRegFinder::NewL(iFs); //non-standard transfer of ownership, no need for CleanupStack + iAppList=CApaAppList::NewL(iFs, appRegFinder, iLoadMbmIconsOnDemand, idlePeriodicDelay); // takes ownership of scanner + + // If the phone rebooted halfway through processing updates, there will be a log file left + // look for one and recover if neccessary + CApsNonNativeApplicationsManager::RecoverFromUpdateLogL(iFs); + + iDataRecognizer=CApaScanningDataRecognizer::NewL(iFs, !iLoadRecognizersOnDemand); + + ConstructPathsToMonitorL(); + + if ( iAppFsMonitor ) + { + iAppFsMonitor->Start(ENotifyFile); + iAppFsMonitor->SetBlocked(ETrue); + } + TRAP_IGNORE(iAppList->InitListL(this)); + +#ifdef USING_ECOM_RECOGS + iRecEcomMonitor=CApaEComMonitor::NewL(TCallBack(&PlugInNotifyCallBack,this)); + iRecEcomMonitor->Start(); +#endif + iTypeStoreManager=CTypeStoreManager::NewL(iFs); + TRAPD(err,iTypeStoreManager->RestoreL()); + if(err==KErrNone) + { + User::LeaveIfError(iFs.Modified(iTypeStoreManager->IniFileName(),iTypeStoreModified)); + } + iTypeStoreMonitor=CApaFsMonitor::NewL(iFs,iTypeStoreManager->IniFileName(),TCallBack(&TypeStoreNotifyCallback,this)); + iTypeStoreMonitor->Start(ENotifyWrite); // this presumably needs to be ENotifyWrite rather than ENotifyFile (the latter being used or the other CApaFsMonitor objects) because CTypeStoreManager internally uses CDictionaryFileStore::OpenL, which presumably itself uses RFile::Open, which isn't covered by ENotifyFile according to its documentation + TypeStoreNotifyCallback(this); + iBaBackupSessionWrapper=CBaBackupSessionWrapper::NewL(); + iBaBackupSessionWrapper->RegisterBackupOperationObserverL(*((MBackupOperationObserver*)this)); + + TChar sysDrive = RFs::GetSystemDriveChar(); + TInt maxSizeofFileName = KNonNativeApplicationTypeRegistry().Length() + 1; + iNonNativeApplicationTypeRegistry.CreateL(maxSizeofFileName); + iNonNativeApplicationTypeRegistry.Append(sysDrive); + iNonNativeApplicationTypeRegistry.Append(KNonNativeApplicationTypeRegistry()); + + TRAP_IGNORE(InternalizeNonNativeApplicationTypeArrayL()); // We don't want a corrupt file to prevent from starting + if(iLoadRecognizersOnDemand) + { + iRecognizerUnloadTimer=CPeriodic::NewL(EPriorityNormal); + } + iAppUnInstallMonitor = CApaAppUnInstallMonitor::NewL(this); + iAppUnInstallMonitor->Start(); + + iIconCaptionOverrides = new(ELeave) CApaIconCaptionOverrides(); + iIconCaptionObserver = CApaIconCaptionCenrepObserver::NewL(*iIconCaptionOverrides); + iIconCaptionObserver->LoadOverridesL(); + } + +void CApaAppListServer::ConstructPathsToMonitorL() + { + TInt drivesToMonitor = KApaDrivesToMonitor; + #ifdef __WINS__ + // KApaDrivesToMonitor is a Rom patchable constant, so need an emulator equivalent + // if WINS then read value from epoc.ini requires licencees to set property in epoc.ini + // Usage: In epoc.ini patchdata_apserv_dll_KApaDrivesToMonitor 4 + + TInt valueOfKApaDrivesToMonitor = 0; + if (UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"patchdata_apserv_dll_KApaDrivesToMonitor",&valueOfKApaDrivesToMonitor) == KErrNone) + { + drivesToMonitor = valueOfKApaDrivesToMonitor; + } + #endif + + if ( drivesToMonitor != KApaMonitorAllDrives ) + { + // 1. Create and add CApaFsNotifier for all locations belonging to a drive if the drive is set to monitor. + // 2. Do this for all the drives which are required to monitor. + TInt maskBit = 1; + TChar driveLetter; + //Only bits from 0(EDriveA)- 25(EDriveZ) are valid other bits are ignored from 32-bit KApaDrivesToMonitor. + for ( TInt i = EDriveA; i <= EDriveZ; i++ ) + { + if ( drivesToMonitor & maskBit ) + { + RFs::DriveToChar(i,driveLetter); + RBuf pathToBeMonitored; + TBuf<1> drive; + drive.Append(driveLetter); + + //Creating or Adding :\private\10003a3f\import\apps\ path to monitor. + pathToBeMonitored.CreateL(KAppRegistrationFileImportLocation()); + CleanupClosePushL(pathToBeMonitored); + pathToBeMonitored.Replace(0,1,drive); + if ( iAppFsMonitor == NULL ) + { + iAppFsMonitor=CApaFsMonitor::NewL(iFs, pathToBeMonitored, TCallBack(&AppFsNotifyCallBack, this)); + } + else + { + iAppFsMonitor->AddLocationL(pathToBeMonitored); + } + CleanupStack::PopAndDestroy(&pathToBeMonitored); + + //Adding :\resource\apps\ path to monitor. + pathToBeMonitored.CreateL(KAppResourceAppsLocation()); + CleanupClosePushL(pathToBeMonitored); + pathToBeMonitored.Replace(0,1,drive); + iAppFsMonitor->AddLocationL(pathToBeMonitored); + CleanupStack::PopAndDestroy(&pathToBeMonitored); + } + maskBit = maskBit << 1; + } + } + else + { + iAppFsMonitor=CApaFsMonitor::NewL(iFs, KAppRegistrationFileImportLocation, TCallBack(&AppFsNotifyCallBack, this)); + iAppFsMonitor->AddLocationL(KAppResourceAppsLocation); + } + } + +EXPORT_C CApaAppListServer::~CApaAppListServer() + { + delete iIconCaptionObserver; + delete iIconCaptionOverrides; + if(iBaBackupSessionWrapper) + iBaBackupSessionWrapper->DeRegisterBackupOperationObserver(*this); + delete iAppUnInstallMonitor; + delete iScanningFileRecognizer; + delete iAppList; // deletes scanners + delete iDataRecognizer; + delete iTypeStoreManager; + delete iAppFsMonitor; + delete iTypeStoreMonitor; + delete iBaBackupSessionWrapper; + delete iRecognitionCache; +#ifdef USING_ECOM_RECOGS + delete iRecEcomMonitor; +#else + iRecEcomMonitor = NULL; +#endif + iFs.Close(); + iAppCmdLine=NULL; + iWsSession.Close(); + delete iRuleBasedPlugIns; + for (TInt i=iNonNativeApplicationTypeArray.Count()-1; i>=0; --i) + { + delete iNonNativeApplicationTypeArray[i].iNativeExecutable; + } + iNonNativeApplicationTypeArray.Close(); + iCustomAppList.ResetAndDestroy(); + iCustomAppList.Close(); + delete iRecognizerUnloadTimer; + iNonNativeApplicationTypeRegistry.Close(); + } + +EXPORT_C void CApaAppListServer::HandleStartUninstallEvent() + { + if ( iAppFsMonitor ) + { + iAppFsMonitor->SetBlocked(ETrue); + } + AppList().StopScan(); + } +EXPORT_C void CApaAppListServer::HandleEndUninstallEventL() + { + if ( iAppFsMonitor ) + { + iAppFsMonitor->SetBlocked(EFalse); + } + AppList().RestartScanL(); + } + +CSession2* CApaAppListServer::NewSessionL(const TVersion& aVersion,const RMessage2&/* aMessage*/) const + +// Create a new server session. + { + // check we're the right version + TVersion v(KAppListServMajorVersionNumber,KAppListServMinorVersionNumber,KAppListServBuildVersionNumber); + if (!User::QueryVersionSupported(v,aVersion)) + User::Leave(KErrNotSupported); + // make new session + return CApaAppListServSession::NewL(const_cast(*this), const_cast(iFs)); + } + +// +// scanning code here +// + +EXPORT_C TCallBack CApaAppListServer::RescanCallBack() + { + return TCallBack(&AppFsNotifyWithForcedRegistrationsResetCallBack,this); + } + +TInt CApaAppListServer::AppFsNotifyWithForcedRegistrationsResetCallBack(TAny* aPtr) + { + ASSERT(aPtr); + reinterpret_cast(aPtr)->AppList().ResetForcedRegistrations(); + return AppFsNotifyCallBack(aPtr); + } + +TInt CApaAppListServer::AppFsNotifyCallBack(TAny* aObject) + { + ASSERT(aObject); + reinterpret_cast(aObject)->UpdateApps(); + return KErrNone; + } + +TInt CApaAppListServer::PlugInNotifyCallBack(TAny* aObject) + { + //update the pre-Platform-security style recognizers and rule-based plug-ins + ASSERT(aObject); + reinterpret_cast(aObject)->UpdatePlugIns(); + return KErrNone; + } + +TInt CApaAppListServer::TypeStoreNotifyCallback(TAny* aObject) + { + ASSERT(aObject); + reinterpret_cast(aObject)->UpdateTypeStore(); + return KErrNone; + } + +void CApaAppListServer::UpdateApps() +// update the list + { + // File system change, rescan + TRAP_IGNORE(iAppList->StartIdleUpdateL (this)); + } + +void CApaAppListServer::NotifyUpdate(TInt aReason) +// tell all sessions to update their clients + { + // Updates the applist with the icon caption details from the Central Repository. + TRAP_IGNORE(UpdateAppListByIconCaptionOverridesL()); + // The short caption value sets through the API has got the highest precedence over the + // values found in either central repository or resource file. + TRAP_IGNORE(UpdateAppListByShortCaptionL()); + + //Delete any data mappings in service registry related to uninstalled applications. + CArrayFixFlat* uninstalledApps=iAppList->UninstalledAppArray(); + TBool modificationStatus=EFalse; + TBool modified; + + if(uninstalledApps) + { + TInt count=uninstalledApps->Count(); + for(int index=0;indexDeleteApplicationDataMappings((*uninstalledApps)[index]); + + //Set modificationStatus if any data mapping is removed from the service registry + if(modified) + modificationStatus=ETrue; + } + + delete uninstalledApps; + + //If service registry is modified, store it to a file + if(modificationStatus) + TRAP_IGNORE(iTypeStoreManager->StoreL()); + } + + // iterate through sessions + iSessionIter.SetToFirst(); + CApaAppListServSession* ses=static_cast(&(*iSessionIter++)); + while (ses!=NULL) + { + ses->NotifyClients(aReason); + ses=static_cast(&(*iSessionIter++)); + } + } + +void CApaAppListServer::UpdatePlugIns() +// update the pre-Platform-security style, ecom style recognizers and rule-based plug-ins + { + TRAP_IGNORE(iScanningFileRecognizer->ScanForRecognizersL()); + //we want the recognizers to be loaded either if: + // 1) they are not loaded on demand + // 2) they are loaded on demand and actively used + // 3) they are loaded on demand but waiting for the timer to be unloaded + if(!iLoadRecognizersOnDemand || iRecognizerUsageCount > 0 || (iRecognizerUnloadTimer && iRecognizerUnloadTimer->IsActive())) + { + TRAP_IGNORE(iDataRecognizer->LoadRecognizersL()); + } + if (iRecognitionCache) + { // RecognitionCache is flushed if there are any changes in plugins, i.e.,if: + // 1. New ECom Plugin is installed. + // 2. Existing ECom Plugin is uninstalled. + iRecognitionCache->Flush(); + } + + TRAP_IGNORE(iRuleBasedPlugIns->ScanForRuleBasedPlugInsL()); + } + +void CApaAppListServer::UpdateTypeStore() +// Update the internal type store if things have changed + { + TRAP_IGNORE(DoUpdateTypeStoreL()); + } + +void CApaAppListServer::DoUpdateTypeStoreL() + { + TTime modified; + TInt err=iFs.Modified(iTypeStoreManager->IniFileName(),modified); + // check the time stamp to see if we are interested in an update + if (modified>iTypeStoreModified && err==KErrNone) + { + CTypeStoreManager* manager=CTypeStoreManager::NewL(iFs); + CleanupStack::PushL(manager); + manager->RestoreL(); + iTypeStoreModified=modified; + delete iTypeStoreManager; + iTypeStoreManager=manager; + CleanupStack::Pop(manager); + } + for (iSessionIter.SetToFirst(); ; iSessionIter++) //lint !e1757 prefix operator not defined for TDblQueIter + { + CSession2* const session=iSessionIter; + if (session==NULL) + { + break; + } + static_cast(session)->NotifyClientOfDataMappingChange(); + } + } + +void CApaAppListServer::HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes) +// +// Handle a signal from the backup server to indicate that a backup has started or finished. +// + { + switch(aBackupOperationAttributes.iOperation) + { + case MBackupOperationObserver::ENone: + case MBackupOperationObserver::EAbort: + break; + case MBackupOperationObserver::EStart: + if ( iAppFsMonitor ) + { + iAppFsMonitor->SetBlocked(ETrue); + } + break; + case MBackupOperationObserver::EEnd: + if ( iAppFsMonitor ) + { + iAppFsMonitor->SetBlocked(EFalse); + } + break; + default: + Panic(EEventFromBackupObserverError); + break; + } + } + +void CApaAppListServer::InitialListPopulationComplete() + { + if ( iAppFsMonitor ) + { + iAppFsMonitor->SetBlocked(EFalse); + } + + // notify clients (whoever is interested) that initial population of list is completed + iSessionIter.SetToFirst(); + CApaAppListServSession* ses=static_cast(&(*iSessionIter++)); + // iterate through sessions + while (ses!=NULL) + { + ses->NotifyClientForCompletionOfListPopulation(); + ses=static_cast(&(*iSessionIter++)); + } + } + +void CApaAppListServer::RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable) + { + for (TInt i=iNonNativeApplicationTypeArray.Count()-1; i>=0; --i) + { + if (iNonNativeApplicationTypeArray[i].iTypeUid.iUid==aApplicationType.iUid) + { + User::Leave(KErrAlreadyExists); + } + } + SNonNativeApplicationType nonNativeApplicationType; + nonNativeApplicationType.iTypeUid.iUid=aApplicationType.iUid; + nonNativeApplicationType.iNativeExecutable=aNativeExecutable.AllocLC(); + iNonNativeApplicationTypeArray.AppendL(nonNativeApplicationType); + CleanupStack::Pop(nonNativeApplicationType.iNativeExecutable); + CleanupStack::PushL(TCleanupItem(DeleteLastNonNativeApplicationType, this)); + ExternalizeNonNativeApplicationTypeArrayL(); + CleanupStack::Pop(this); // the TCleanupItem + } + +void CApaAppListServer::DeregisterNonNativeApplicationTypeL(TUid aApplicationType) + { + TInt i; + for (i=iNonNativeApplicationTypeArray.Count()-1; i>=0; --i) + { + if (iNonNativeApplicationTypeArray[i].iTypeUid.iUid==aApplicationType.iUid) + { + break; + } + } + if (i>=0) + { + ExternalizeNonNativeApplicationTypeArrayL(i); + delete iNonNativeApplicationTypeArray[i].iNativeExecutable; + iNonNativeApplicationTypeArray[i].iNativeExecutable = NULL; + iNonNativeApplicationTypeArray.Remove(i); + } + } + +void CApaAppListServer::InternalizeNonNativeApplicationTypeArrayL() + { + RFile file; + CleanupClosePushL(file); + const TInt error=file.Open(iFs, iNonNativeApplicationTypeRegistry, EFileShareReadersOnly|EFileStream|EFileRead); + if (error==KErrNone) // don't leave if the file can't be opened (because it doesn't exist, or because the directory we're looking for it in doesn't exist) + { + RFileReadStream sourceStream; + sourceStream.Attach(file); // file gets closed by this call, but that's okay, we don't need it any more (sourceStream has its own copy of this RFile object that it owns) + CleanupClosePushL(sourceStream); + TCardinality arrayCount; + arrayCount.InternalizeL(sourceStream); + for (TInt i=0; i(iFs); + fs.MkDirAll(iNonNativeApplicationTypeRegistry); // ignore any error + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.Replace(fs, iNonNativeApplicationTypeRegistry, EFileShareExclusive|EFileStream|EFileWrite)); + RFileWriteStream targetStream; + targetStream.Attach(file); // file gets closed by this call, but that's okay, we don't need it any more (targetStream has its own copy of this RFile object that it owns) + CleanupClosePushL(targetStream); + const TInt arrayCount(iNonNativeApplicationTypeArray.Count()); + TInt arrayCountToExternalize=arrayCount; + if (aIndexToIgnore>=0) + { + --arrayCountToExternalize; + } + TCardinality(arrayCountToExternalize).ExternalizeL(targetStream); + for (TInt i=0; i=0; --i) + { + const SNonNativeApplicationType& nonNativeApplicationType=iNonNativeApplicationTypeArray[i]; + if (nonNativeApplicationType.iTypeUid.iUid==aNonNativeApplicationType.iUid) + { + return *nonNativeApplicationType.iNativeExecutable; + } + } + User::Leave(KErrNotSupported); // not KErrNotFound + return KNullDesC(); + } + +void CApaAppListServer::DeleteLastNonNativeApplicationType(TAny* aThis) + { // static + CApaAppListServer& self=*static_cast(aThis); + const TInt arrayIndex=self.iNonNativeApplicationTypeArray.Count()-1; + delete self.iNonNativeApplicationTypeArray[arrayIndex].iNativeExecutable; + self.iNonNativeApplicationTypeArray[arrayIndex].iNativeExecutable = NULL; + self.iNonNativeApplicationTypeArray.Remove(arrayIndex); + } + +void CApaAppListServer::NotifyScanComplete() + { + // Updates the applist with the icon caption details from the Central Repository. + TRAP_IGNORE(UpdateAppListByIconCaptionOverridesL()); + // The short caption value sets through the API has got the highest precedence over the + // values found in either central repository or resource file. + TRAP_IGNORE(UpdateAppListByShortCaptionL()); + + // iterate through sessions + iSessionIter.SetToFirst(); + CApaAppListServSession* ses=static_cast(&(*iSessionIter++)); + while (ses!=NULL) + { + ses->NotifyScanComplete(); + ses=static_cast(&(*iSessionIter++)); + } + } + +void CApaAppListServer::AddCustomAppInfoInListL(CCustomAppInfoData* aCustomAppInfo) + { + TBool replaced=EFalse; + for (TInt i=iCustomAppList.Count()-1; i>=0; --i) + { + if ((aCustomAppInfo->Uid()==iCustomAppList[i]->Uid()) && (aCustomAppInfo->Language()==iCustomAppList[i]->Language())) + { + CCustomAppInfoData* oldAppInfo = iCustomAppList[i]; + iCustomAppList[i]=aCustomAppInfo; + delete oldAppInfo; + replaced=ETrue; + break; + } + } + //Add ELangNone items at the end and others at the beginning + if(!replaced) + { + if(aCustomAppInfo->Language()==ELangNone) + { + iCustomAppList.AppendL(aCustomAppInfo); + } + else + { + iCustomAppList.InsertL(aCustomAppInfo,0); + } + } + + } //lint !e818 Suppress pointer parameter could be declared as pointing to const - this method takes ownership + + +void CApaAppListServer::UpdateAppListByShortCaptionL() + { + CApaAppData* app=NULL; + //Items with ELangNone are always found at the end and other languages at the beginning + //While iterating from end to beginning, we overwrite short caption set by ELangNone if there is any provided for the application language + for (TInt i=iCustomAppList.Count()-1; i>=0; --i) + { + const CCustomAppInfoData* const customAppInfo=iCustomAppList[i]; + app=iAppList->AppDataByUid(customAppInfo->Uid()); + if ( app && ((app->ApplicationLanguage()==customAppInfo->Language()) || (customAppInfo->Language()==ELangNone))) + { + app->SetShortCaptionL(*customAppInfo->ShortCaption()); + } + } + } + +void CApaAppListServer::UpdateAppListByIconCaptionOverridesL() + { + // get the language downgrade path, so that most appropriate language can be used + RArray languageDowngradePath; + CleanupClosePushL(languageDowngradePath); + BaflUtils::GetDowngradePathL(iFs, User::Language(), languageDowngradePath); + for (CApaAppData* app = iAppList->FirstApp(); app; app = iAppList->NextApp(app)) + { + CApaIconCaptionOverridesForApp* appOverride = iIconCaptionOverrides->OverrideForApp(app->AppEntry().iUidType[2]); + if (appOverride) + { + TApaIconCaptionOverrideReader overrideReader = appOverride->Reader(languageDowngradePath); + const TDesC* shortCaption = overrideReader.ShortCaption(); + if (shortCaption) + app->SetShortCaptionL(*shortCaption); + const TDesC* caption = overrideReader.Caption(); + if (caption) + app->SetCaptionL(*caption); + const TDesC* iconFileName = overrideReader.IconFileName(); + if (overrideReader.NumIconsSet() && iconFileName) + app->SetIconsL(*iconFileName, overrideReader.NumIcons()); + } + } + CleanupStack::PopAndDestroy(&languageDowngradePath); + } + +CCustomAppInfoData* CCustomAppInfoData::NewL(TUid aAppUid, TLanguage aLanguage, const TDesC& aShortCaption) + { + CCustomAppInfoData* self=new(ELeave) CCustomAppInfoData(aAppUid, aLanguage); + CleanupStack::PushL(self); + self->ConstructL(aShortCaption); + CleanupStack::Pop(self); + return self; + } + +CCustomAppInfoData::~CCustomAppInfoData() + { + delete iShortCaption; + } + +CCustomAppInfoData::CCustomAppInfoData(TUid aAppUid, TLanguage aLanguage) + :iUid(aAppUid), + iLanguage(aLanguage) + { + } + +void CCustomAppInfoData::ConstructL(const TDesC& aShortCaption) + { + iShortCaption=aShortCaption.AllocL(); + } + +/* + * Data Recognizer calls + */ + +TBool CApaAppListServer::CachedRecognitionResult(const TParseBase& aParser, TDataRecognitionResult& aResult) const + { + if(iRecognitionCache && aParser.PathPresent() && aParser.NamePresent()) + { + return iRecognitionCache->Get(aParser.DriveAndPath(), aParser.NameAndExt(), aResult); + } + return EFalse; + } + +/** +N.B. The @c CRecognitionResult object is reference counted so it must be closed! +*/ +CRecognitionResult* CApaAppListServer::CachedRecognitionResult(const RFile& aFile, const TParseBase& aParser) const + { + if(iRecognitionCache && aParser.PathPresent() && aParser.NamePresent()) + { + return iRecognitionCache->Get(aFile, aParser.DriveAndPath(), aParser.NameAndExt()); + } + return NULL; + } + +void CApaAppListServer::CacheRecognitionResultL(const TParseBase& aParser, const TDataRecognitionResult& aResult) + { + if(iRecognitionCache && aParser.PathPresent() && aParser.NamePresent()) + { + iRecognitionCache->AddL(aParser.DriveAndPath(), aParser.NameAndExt(), aResult); + } + } + +void CApaAppListServer::CacheRecognitionResultL(const RFile& aFile, const TParseBase& aParser, const TDataRecognitionResult& aResult) + { + if(iRecognitionCache && aParser.PathPresent() && aParser.NamePresent()) + { + iRecognitionCache->AddL(aFile, aParser.DriveAndPath(), aParser.NameAndExt(), aResult); + } + } + +TDataRecognitionResult CApaAppListServer::RecognizeDataL(const TDesC& aName, const TDesC8& aBuffer) + { + TParsePtrC parser(iFs.IsValidName(aName) ? aName : KNullDesC); + TDataRecognitionResult result; + + // check cache + if(!CachedRecognitionResult(parser, result)) + { + // recognize + if(iLoadRecognizersOnDemand) + { + LoadRecognizersLC(); + } + result = iDataRecognizer->RecognizeL(aName, aBuffer); + if(iLoadRecognizersOnDemand) + { + CleanupStack::PopAndDestroy(); + } + + // add to cache + CacheRecognitionResultL(parser, result); + } + + return result; + } + +TDataRecognitionResult CApaAppListServer::RecognizeDataL(RFile& aFile, TInt aPreferredBufSize) + { + CRecognitionResult* result = RecognizeDataAsCRecognitionResultL(aFile, aPreferredBufSize); + TDataRecognitionResult ret; + result->Get(ret); + result->Close(); + return ret; + } + +/** +Same as @c RecognizeDataL(RFile&, TInt) but returns a @c CRecognitionResult +instead of a @c TDataRecognitionResult. + +N.B. The @c CRecognitionResult object is reference counted so it must be closed! +*/ +CRecognitionResult* CApaAppListServer::RecognizeDataAsCRecognitionResultL(RFile& aFile, TInt aPreferredBufSize) + { + CRecognitionResult* result = NULL; + + TFileName fileName; + User::LeaveIfError(aFile.FullName(fileName)); + TParsePtrC parser(fileName); //fileName is valid since it comes from RFile + + //check cache + result = CachedRecognitionResult(aFile,parser); + if(!result) + { + // recognize + if(iLoadRecognizersOnDemand) + { + LoadRecognizersLC(); + } + const TDataRecognitionResult recResult = iDataRecognizer->RecognizeL(aFile, aPreferredBufSize); + if(iLoadRecognizersOnDemand) + { + CleanupStack::PopAndDestroy(); + } + + //add to cache + CacheRecognitionResultL(aFile, parser, recResult); + + result = CRecognitionResult::NewL(parser.NameAndExt(), recResult); + } + + return result; + } + +TBool CApaAppListServer::RecognizeDataL(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType) + { + if(iLoadRecognizersOnDemand) + { + LoadRecognizersLC(); + } + const TBool ret = iDataRecognizer->RecognizeL(aName,aBuffer,aDataType); + if(iLoadRecognizersOnDemand) + { + CleanupStack::PopAndDestroy(); + } + return ret; + } + +TBool CApaAppListServer::RecognizeDataL(RFile& aFile, TInt aPreferredBufSize, const TDataType& aDataType) + { + if(iLoadRecognizersOnDemand) + { + LoadRecognizersLC(); + } + const TBool ret = iDataRecognizer->RecognizeL(aFile,aPreferredBufSize,aDataType); + if(iLoadRecognizersOnDemand) + { + CleanupStack::PopAndDestroy(); + } + return ret; + } + +TInt CApaAppListServer::DataRecognizerPreferredBufSizeL() + { + if(iLoadRecognizersOnDemand) + { + LoadRecognizersLC(); + } + const TInt ret = iDataRecognizer->PreferredBufSize(); + if(iLoadRecognizersOnDemand) + { + CleanupStack::PopAndDestroy(); + } + return ret; + } + +void CApaAppListServer::DataTypeL(CDataTypeArray& aArray) + { + if(iLoadRecognizersOnDemand) + { + LoadRecognizersLC(); + } + iDataRecognizer->DataTypeL(aArray); + if(iLoadRecognizersOnDemand) + { + CleanupStack::PopAndDestroy(); + } + } + +/* + * Recognizer loading/unloading code + */ + +void CApaAppListServer::LoadRecognizersLC() + { + ASSERT(iLoadRecognizersOnDemand); + + LoadRecognizersL(); + TCleanupItem cleanup(CApaAppListServer::RecognizerCleanup, this); + CleanupStack::PushL(cleanup); + } + +void CApaAppListServer::RecognizerCleanup(TAny* aSelf) + { + if (aSelf) + { + static_cast(aSelf)->UnloadRecognizers(); + } + } + +void CApaAppListServer::LoadRecognizersL() + { + ASSERT(iLoadRecognizersOnDemand); + + if(iRecognizerUnloadTimer->IsActive()) + { + __ASSERT_DEBUG(iRecognizerUsageCount==0,Panic(EReferenceCountingError1)); + iRecognizerUnloadTimer->Cancel(); + } + else if(iRecognizerUsageCount==0) + { + iDataRecognizer->LoadRecognizersL(); + } + + ++iRecognizerUsageCount; + } + +TInt CApaAppListServer::UnloadRecognizers() + { + ASSERT(iLoadRecognizersOnDemand); + + --iRecognizerUsageCount; + __ASSERT_DEBUG(iRecognizerUsageCount>=0,Panic(EReferenceCountingError2)); + if (iRecognizerUsageCount==0) + { + iRecognizerUnloadTimer->Start(KApaUnloadRecognizersTimeout,0,TCallBack(CApaAppListServer::DoUnloadRecognizersCallback,this)); + } + return KErrNone; + } + +TInt CApaAppListServer::DoUnloadRecognizersCallback(TAny* aSelf) + { + TInt ret=KErrNone; + if (aSelf) + { + ret = static_cast(aSelf)->DoUnloadRecognizers(); + } + return ret; + } + +TInt CApaAppListServer::DoUnloadRecognizers() + { + ASSERT(iLoadRecognizersOnDemand); + + // need to cancel the periodic timer since we only want a oneshot timer + iRecognizerUnloadTimer->Cancel(); + iDataRecognizer->UnloadRecognizers(); + return KErrNone; + } + +void CApaAppListServer::GetAppByDataType(const TDataType& aDataType, TUid& aUid) const + { + iTypeStoreManager->GetAppByDataType(aDataType, aUid); + } + +void CApaAppListServer::GetAppByDataType(const TDataType& aDataType, TUid aServiceUid, TUid& aUid) const + { + iTypeStoreManager->GetAppByDataType(aDataType, aServiceUid, aUid); + } + +TBool CApaAppListServer::InsertAndStoreIfHigherL(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid) + { + return iTypeStoreManager->InsertAndStoreIfHigherL(aDataType, aPriority, aUid); + } + +void CApaAppListServer::InsertAndStoreDataMappingL(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TUid aServiceUid) + { + iTypeStoreManager->InsertAndStoreDataMappingL(aDataType, aPriority, aUid, aServiceUid); + } + +void CApaAppListServer::DeleteAndStoreDataMappingL(const TDataType& aDataType, TUid aServiceUid) + { + iTypeStoreManager->DeleteAndStoreDataMappingL(aDataType, aServiceUid); + } + +CApaFileRecognizer* CApaAppListServer::FileRecognizer() + { + return static_cast(iScanningFileRecognizer); + } + +TBool CApaAppListServer::LoadMbmIconsOnDemand() const + { + return iLoadMbmIconsOnDemand; + } + +#ifdef _DEBUG + +/** +Flushes the recognition cache. + +Useful for debugging. +*/ +void CApaAppListServer::FlushRecognitionCache() + { + if(iRecognitionCache) + iRecognitionCache->Flush(); + } + +/** +Sets whether or not recognizers should be loaded when they are needed. + +Useful for debugging. +*/ +void CApaAppListServer::SetLoadRecognizersOnDemandL(TBool aLoadRecognizersOnDemand) + { + if(iLoadRecognizersOnDemand == aLoadRecognizersOnDemand) + return; + + CPeriodic* newUnloadTimer; + if(aLoadRecognizersOnDemand) + { + ASSERT(!iRecognizerUnloadTimer); + newUnloadTimer = CPeriodic::NewL(EPriorityNormal); + } + else + { + ASSERT(iRecognizerUnloadTimer); + newUnloadTimer = NULL; + } + CleanupStack::PushL(newUnloadTimer); + + CApaScanningDataRecognizer* newDataRecognizer = CApaScanningDataRecognizer::NewL(iFs,!aLoadRecognizersOnDemand); + delete iDataRecognizer; + iDataRecognizer = newDataRecognizer; + + delete iRecognizerUnloadTimer; + iRecognizerUnloadTimer = newUnloadTimer; + CleanupStack::Pop(newUnloadTimer); + + iRecognizerUsageCount = 0; + iLoadRecognizersOnDemand = aLoadRecognizersOnDemand; + } + +/** +If recognizers are set to be loaded on demand this method can be used to perform +the unloading synchronously, instead of waiting for the unloading timer to go off. + +Useful for debugging. +*/ +void CApaAppListServer::PerformOutstandingRecognizerUnloading() + { + if(iLoadRecognizersOnDemand && iRecognizerUnloadTimer->IsActive()) + { + __ASSERT_DEBUG(iRecognizerUsageCount==0,Panic(EReferenceCountingError3)); + DoUnloadRecognizers(); + } + } + +#endif //_DEBUG diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSES.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSES.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2291 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// AppArc server session +// +// + +#include +#include +#include +#include +#include "APSSES.H" +#ifdef _DEBUG +#include "APSSTD.H" +#endif //_DEBUG +#include "APSCLSV.H" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../apgrfx/apprivate.h" +#include "apgnotif.h" +#include "../apfile/aprfndr.h" +#include "ApLaunchChecker.h" +#include "apsnnapps.h" + +#include "apsecutils.h" + +const TInt KApaAppListServMaxBuffer=256; +#include "APSRECCACHE.h" +const TInt KApaAppInfoArrayGranularity=4; +const TInt KApaAppInfoDesMaxLength=sizeof(TApaAppInfo); + +#if defined(__PROFILE) +_LIT(KProfileAppForDocumentL, "AppForDocumentL - %d.%06d seconds"); +_LIT(KProfileAppForDocumentPassedByFileHandleL, "AppForDocumentPassedByFileHandleL - %d.%06d seconds"); +#endif +_LIT(KApaPanicCli,"APSERV-CLI"); +const TInt KFinishedScanning=-2; + + +class MArrayItemWriter + { +public: + virtual TInt ArrayItemCount() const=0; + virtual TInt ArrayItemSize() const=0; + virtual void WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const=0; + }; + +class TSizeArrayItemWriter : public MArrayItemWriter + { +public: + inline TSizeArrayItemWriter(const CArrayFix& aArray) : iArray(aArray) {} + + // from MArrayItemWriter + TInt ArrayItemCount() const; + TInt ArrayItemSize() const; + void WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const; +private: + const CArrayFix& iArray; + }; + +class TViewDataArrayItemWriter : public MArrayItemWriter + { +public: + inline TViewDataArrayItemWriter(const CArrayPtr& aArray) : iArray(aArray) {} + + // from MArrayItemWriter + TInt ArrayItemCount() const; + TInt ArrayItemSize() const; + void WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const; +private: + const CArrayPtr& iArray; + }; + +class TDesCArrayItemWriter : public MArrayItemWriter + { +public: + inline TDesCArrayItemWriter(const CDesCArray& aArray) : iArray(aArray) {} + + // from MArrayItemWriter + TInt ArrayItemCount() const; + TInt ArrayItemSize() const; + void WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const; +private: + const CDesCArray& iArray; + }; + + +class CApaAppListServSession::CApaAppInfo + { +public: + CApaAppInfo(); + ~CApaAppInfo(); + void SetUid(const TUid aUid); + void SetCaptionL(const TDesC& aCaption); + void SetShortCaptionL(const TDesC& aShortCaption); + void SetFullNameL(const TDesC& aFullName); + inline TPtrC Caption() const; + inline TPtrC ShortCaption() const; + inline TPtrC FullName() const; + inline TUid Uid() const; +private: + TUid iUid; + HBufC* iCaption; + HBufC* iShortCaption; + HBufC* iFullName; + }; + +inline TPtrC CApaAppListServSession::CApaAppInfo::Caption() const + { return *iCaption; } + +inline TPtrC CApaAppListServSession::CApaAppInfo::ShortCaption() const + { return *iShortCaption; } + +inline TPtrC CApaAppListServSession::CApaAppInfo::FullName() const + { return *iFullName; } + +inline TUid CApaAppListServSession::CApaAppInfo::Uid() const + { return iUid; } + +// CApaAppListServSession + +CApaAppListServSession* CApaAppListServSession::NewL(CApaAppListServer& aServer, RFs& aFs) + { + CApaAppListServSession* self=new(ELeave) CApaAppListServSession(aServer, aFs); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); // self + return self; + } + +CApaAppListServSession::CApaAppListServSession(CApaAppListServer& aServer, RFs& aFs) + : CSession2(), + iServ(aServer), + iFs(aFs), + iMaxBufSize(KApaAppListServMaxBuffer), + iApaAppInfoArray(KApaAppInfoArrayGranularity), + iOpaqueData_pendingDispatchToClient(NULL) + {} + +void CApaAppListServSession::ConstructL() + { + iFileRecognitionUtility = new (ELeave) CFileRecognitionUtility(iServ, iMaxBufSize, iFs); + iNonNativeApplicationsManager = CApsNonNativeApplicationsManager::NewL(iServ,iFs); + } + +CApaAppListServSession::~CApaAppListServSession() + { + delete iNonNativeApplicationsManager; + delete iBuffer; + iApaAppInfoArray.ResetAndDestroy(); + iApaAppInfoArray.Close(); + delete iFileRecognitionUtility; + delete iRecognitionResult; + delete iOpaqueData_pendingDispatchToClient; + } + +void CApaAppListServSession::ServiceL(const RMessage2& aMessage) + { + TBool completeMessage=ETrue; + switch (aMessage.Function()) + { + case ESetNotify: + SetNotify(aMessage); + completeMessage=EFalse; + break; + case ERegisterListPopulationCompleteObserver: + RegisterListPopulationCompleteObserver(aMessage); + completeMessage=EFalse; + break; + case ECancelListPopulationCompleteObserver: + CancelListPopulationCompleteObserver(); + break; + case EAppListServInitFullList: + User::Leave(KErrNotSupported); + case EAppListServInitEmbedList: + User::Leave(KErrNotSupported); + case EAppListServInitFilteredEmbedList: + InitListL(aMessage,EListFilteredEmbeddedApps); + break; + case EAppListServInitAttrFilteredList: + InitListL(aMessage,EListCapabilityAttrFilteredApps); + break; + case EAppListServInitServerAppList: + InitListL(aMessage,EListServerApps); + break; + case EAppListServGetNextApp: + GetNextAppL(aMessage); + break; + case EAppListServEmbedCount: + EmbedCount(aMessage); + break; + case EAppListServAppCount: + AppCount(aMessage); + break; + case EAppListServGetAppInfo: + GetAppInfoL(aMessage); + break; + case EAppListServGetAppCapability: + GetAppCapabilityL(aMessage); + break; + case EAppListServGetDefaultScreenNumber: + GetDefaultScreenNumberL(aMessage); + break; + case EAppListServStartAppWithoutReturningThreadId: + StartAppL(aMessage,EFalse); + break; + case EAppListServStartAppReturningThreadId: + StartAppL(aMessage,ETrue); + break; + case EAppListServRecognizeData: + RecognizeDataL(aMessage); + break; + case EAppListServRecognizeDataPassedByFileHandle: + RecognizeDataPassedByFileHandleL(aMessage); + break; + case EAppListServRecognizeSpecificData: + RecognizeSpecificDataL(aMessage); + break; + case EAppListServRecognizeSpecificDataPassedByFileHandle: + RecognizeSpecificDataPassedByFileHandleL(aMessage); + break; + case EAppListServAppForDataType: + AppForDataTypeL(aMessage); + break; + case EAppListServStartDocument: + StartDocumentL(aMessage,EStart); + break; + case EAppListServStartDocumentByDataType: + StartDocumentL(aMessage,EStartByDataType); + break; + case EAppListServStartDocumentByUid: + StartDocumentL(aMessage,EStartByUid); + break; + case EAppListServCreateDocumentByUid: + StartDocumentL(aMessage,ECreateByUid); + break; + case EAppListServGetExecutableNameGivenDocument: + GetExecutableNameGivenDocumentL(aMessage); + break; + case EAppListServGetExecutableNameGivenDocumentPassedByFileHandle: + GetExecutableNameGivenDocumentPassedByFileHandleL(aMessage); + break; + case EAppListServGetExecutableNameGivenDataType: + GetExecutableNameGivenDataTypeL(aMessage); + break; + case EAppListServGetExecutableNameGivenAppUid: + GetExecutableNameGivenAppUidL(aMessage); + break; + case EAppListServGetOpaqueData: + GetOpaqueDataL(aMessage); + break; + case EAppListServGetNativeExecutableNameIfNonNative: + GetNativeExecutableNameIfNonNativeL(aMessage); + break; + case EAppListServAppIconByUid: + IconForAppL(aMessage); + break; + case EAppListServAppForDocument: + AppForDocumentL(aMessage, NULL); + break; + case EAppListServAppForDocumentPassedByFileHandle: + AppForDocumentPassedByFileHandleL(aMessage, NULL); + break; + case EAppListServGetConfidence: + GetConfidenceL(aMessage); + break; + case EAppListServSetConfidence: + SetConfidence(aMessage); + break; + case EAppListServGetBufSize: + GetBufSize(aMessage); + break; + case EAppListServSetBufSize: + SetBufSize(aMessage); + break; + case EAppListServGetDataTypesPhase1: + GetDataTypesCountL(aMessage); + break; + case EAppListServGetDataTypesPhase2: + GetDataTypesL(aMessage); + break; + case ECancelNotify: + CancelNotify(); + break; + case EAppListServAppIconByUidAndSize: + IconForAppBySizeL(aMessage); + break; + case EAppListServAppIconFileHandle: + IconFileHandleForAppL(aMessage); + break; + case EAppListServGetAppIconSizes: + AppIconSizesL(aMessage); + break; + case EAppListServViewIconByUidAndSize: + IconForViewBySizeL(aMessage); + break; + case EAppListServGetAppViews: + AppViewsL(aMessage); + break; + case EAppListServGetFileOwnershipInfo: + AppFileOwnershipInfoL(aMessage); + break; + case EAppListServNumberOfOwnDefinedIcons: + NumberOfOwnDefinedIconsL(aMessage); + break; + case EAppListServApplicationLanguage: + ApplicationLanguageL(aMessage); + break; + case EAppListServAppInfoProvidedByRegistrationFile: // private OpCode for CEikApplication's use only + AppInfoProvidedByRegistrationFileL(aMessage); + break; + case EAppListServAppIconFileName: + IconFileNameL(aMessage); + break; + case EAppListServAppViewIconFileName: + ViewIconFileNameL(aMessage); + break; + case EAppListInsertDataMapping: + case EAppListInsertDataMappingIfHigher: + InsertDataMappingL(aMessage); + break; + case EAppListDeleteDataMapping: + DeleteDataMappingL(aMessage); + break; + case EAppListServGetAppByDataType: + GetAppByDataTypeL(aMessage); + break; + case EAppListServGetAppServices: + case EAppListServGetServiceImplementations: + case EAppListServGetServiceImplementationsDataType: + case EAppListServGetAppServiceUids: + case EAppListServGetAppServiceOpaqueData: + GetAppServicesL(aMessage); + break; + case EAppListServAppForDataTypeAndService: + AppForDataTypeAndServiceL(aMessage); + break; + case EAppListServAppForDocumentAndService: + { + const TUid serviceUid=TUid::Uid(aMessage.Int1()); + AppForDocumentL(aMessage, &serviceUid); + } + break; + case EAppListServAppForDocumentAndServicePassedByFileHandle: + { + const TUid serviceUid(TUid::Uid(aMessage.Int1())); + AppForDocumentPassedByFileHandleL(aMessage, &serviceUid); + } + break; + case EAppListServRegisterNonNativeApplicationType: + RegisterNonNativeApplicationTypeL(aMessage); + break; + case EAppListServDeregisterNonNativeApplicationType: + DeregisterNonNativeApplicationTypeL(aMessage); + break; + case EAppListServPrepareNonNativeApplicationsUpdates: + iNonNativeApplicationsManager->PrepareNonNativeApplicationsUpdatesL(); + break; + case EAppListServRegisterNonNativeApplication: + iNonNativeApplicationsManager->RegisterNonNativeApplicationL(aMessage); + break; + case EAppListServDeregisterNonNativeApplication: + iNonNativeApplicationsManager->DeregisterNonNativeApplicationL(aMessage); + break; + case EAppListServCommitNonNativeApplications: + iNonNativeApplicationsManager->CommitNonNativeApplicationsUpdatesL(aMessage); + completeMessage=EFalse; + break; + case EAppListServRollbackNonNativeApplications: + iNonNativeApplicationsManager->RollbackNonNativeApplicationsUpdates(); + break; + case EAppListServGetAppType: + GetAppTypeL(aMessage); + break; + case EAppListServForceRegistration: + ForceRegistrationL(aMessage); + completeMessage=EFalse; + break; + case EAppListServPreferredBufSize: + aMessage.Complete(PreferredBufSize()); + break; + case EAppListServRecognizeFiles: + RecognizeFilesL(aMessage); + break; + case EAppListServTransferRecognitionResult: + TransferRecognitionResultL(aMessage); + break; + case EAppListServRecognizeFilesAsync: + RecognizeFilesAsyncL(aMessage); + completeMessage=EFalse; + break; + case ECancelRecognizeFiles: + CancelRecognizeFiles(); + break; + case EAppListServRuleBasedLaunching: + RuleBasedLaunchingL(aMessage); + break; + case EMatchesSecurityPolicy: + MatchesSecurityPolicyL(aMessage); + break; + case EAppListServSetAppShortCaption: + SetAppShortCaptionL(aMessage); + break; + case ENotifyOnDataMappingChange: + NotifyOnDataMappingChange(aMessage); + completeMessage=EFalse; + break; + case ECancelNotifyOnDataMappingChange: + CancelNotifyOnDataMappingChange(); + break; + case EDebugHeapMark: + #ifdef _DEBUG + __UHEAP_MARK; + #endif + break; + case EDebugHeapMarkEnd: + #ifdef _DEBUG + __UHEAP_MARKENDC(aMessage.Int0()); + #endif + break; + case EDebugHeapFailNext: + #ifdef _DEBUG + __UHEAP_FAILNEXT(aMessage.Int0()); + #endif + break; + case EDebugClearAppInfoArray: + #ifdef _DEBUG + iApaAppInfoArray.ResetAndDestroy(); + iApaAppInfoArray.Compress(); + #endif + break; + case EDebugFlushRecognitionCache: + #ifdef _DEBUG + iServ.FlushRecognitionCache(); + #endif + break; + case EDebugSetLoadRecognizersOnDemand: + #ifdef _DEBUG + iServ.SetLoadRecognizersOnDemandL(aMessage.Int0()); + #endif + break; + case EDebugPerformOutstandingRecognizerUnloading: + #ifdef _DEBUG + iServ.PerformOutstandingRecognizerUnloading(); + REComSession::FinalClose(); + #endif + break; + case EDebugAddFailingNonNativeApplicationsUpdate: + #ifdef _DEBUG + iNonNativeApplicationsManager->ForceFailInNonNativeApplicationsUpdatesL(); + #endif + break; + case EDebugAddPanicingNonNativeApplicationsUpdate: + #ifdef _DEBUG + iNonNativeApplicationsManager->ForcePanicInNonNativeApplicationsUpdatesL(); + #endif + break; + case EDebugAddRollbackPanicingNonNativeApplicationsUpdate: + #ifdef _DEBUG + iNonNativeApplicationsManager->ForcePanicInNonNativeApplicationsRollbackL(); + #endif + break; + default: + aMessage.Panic(KApaPanicCli,EClientBadRequest); + break; + } + + if (completeMessage && !aMessage.IsNull()) + { + aMessage.Complete(KErrNone); + } + } +void CApaAppListServSession::NotifyOnDataMappingChange(const RMessage2& aMessage) + { + if (!iMessage_NotifyOnDataMappingChange.IsNull()) + { + aMessage.Panic(KApaPanicCli,ENotifyOnDataMappingChangeRequestOutstanding); + } + else + { + iMessage_NotifyOnDataMappingChange=aMessage; + } + } +void CApaAppListServSession::CancelNotifyOnDataMappingChange() + { + if (!iMessage_NotifyOnDataMappingChange.IsNull()) + { + iMessage_NotifyOnDataMappingChange.Complete(KErrCancel); + } + } //lint !e1762 Suppress member function could be made const + + +TInt CApaAppListServSession::PreferredBufSize() const + { + TInt preferredBufferSize = 0; + TRAPD(err, preferredBufferSize = iServ.DataRecognizerPreferredBufSizeL()); + return (err==KErrNone) ? Min(iMaxBufSize, preferredBufferSize) : iMaxBufSize; + } + +void CApaAppListServSession::RegisterNonNativeApplicationTypeL(const RMessage2& aMessage) + { + const TUid applicationType(TUid::Uid(aMessage.Int0())); + HBufC* const nativeExecutable=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(1))); + {TPtr nativeExecutable_asWritable(nativeExecutable->Des()); + aMessage.ReadL(1, nativeExecutable_asWritable);} + iServ.RegisterNonNativeApplicationTypeL(applicationType, *nativeExecutable); + CleanupStack::PopAndDestroy(nativeExecutable); + } + +void CApaAppListServSession::DeregisterNonNativeApplicationTypeL(const RMessage2& aMessage) + { + const TUid applicationType(TUid::Uid(aMessage.Int0())); + iServ.DeregisterNonNativeApplicationTypeL(applicationType); + } + +void CApaAppListServSession::GetAppTypeL(const RMessage2& aMessage) + { + TInt uid = aMessage.Int0(); + CApaAppData* appData = iServ.AppList().AppDataByUid(TUid::Uid(uid)); + if (!appData) + { + aMessage.Complete(KErrNotFound); + return; + } + TPckgBuf typeUid(appData->NonNativeApplicationType()); + aMessage.WriteL(1,typeUid); + aMessage.Complete(KErrNone); + } + +void CApaAppListServSession::ForceRegistrationL(const RMessage2& aMessage) + { + TInt bufferSize = aMessage.GetDesLength(0); + User::LeaveIfError(bufferSize); + HBufC8* const buffer=HBufC8::NewLC(bufferSize); + TPtr8 buffer_asWritable(buffer->Des()); + aMessage.ReadL(0,buffer_asWritable); + + RDesReadStream readStream(*buffer); + CleanupClosePushL(readStream); + const TUint count=readStream.ReadUint32L(); + for (TUint i = 0; i < count; ++i) + { + TUint length = readStream.ReadUint32L(); + HBufC* regFile = HBufC::NewLC(length); + TPtr ptr(regFile->Des()); + readStream.ReadL(ptr, length); + iServ.AppList().AddForcedRegistrationL(regFile); + CleanupStack::Pop(regFile); + } + CleanupStack::PopAndDestroy(&readStream); + + CleanupStack::PopAndDestroy(buffer); + + // Trigger a rescan, when rescan completes it will complete iNotifyOnScanCompleteMsg + iNotifyOnScanCompleteMsg=aMessage; + iServ.UpdateApps(); + } + +void CApaAppListServSession::AppForDocumentPassedByFileHandleL(const RMessage2& aMessage, const TUid* aServiceUid) + { +#if defined(__PROFILE) + TProfile profile; + RDebug::ProfileReset(5,1); + RDebug::ProfileStart(5); +#endif + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.AdoptFromClient(aMessage, 2, 3)); + SReturnData_AppForDocument returnData; + returnData.iDataType=iServ.RecognizeDataL(file, PreferredBufSize()).iDataType; + returnData.iUid=(returnData.iDataType!=TDataType())? AppForDataTypeL(returnData.iDataType, aServiceUid): TUid::Null(); + CleanupStack::PopAndDestroy(&file); + aMessage.WriteL(0,TPckgC(returnData)); +#if defined(__PROFILE) + RDebug::ProfileEnd(5); + RDebug::ProfileResult(&profile,5,1); + RDebug::Print(KProfileAppForDocumentPassedByFileHandleL,profile.iTime/1000000,profile.iTime%1000000); + RDebug::ProfileStart(5); +#endif + } + +void CApaAppListServSession::AppForDocumentL(const RMessage2& aMessage, const TUid* aServiceUid) + { +#if defined(__PROFILE) + TProfile profile; + RDebug::ProfileReset(5,1); + RDebug::ProfileStart(5); +#endif + HBufC* const fileName=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(2))); + {TPtr fileName_asWritable(fileName->Des()); + aMessage.ReadL(2,fileName_asWritable);} + HBufC8* const buffer=HBufC8::NewLC(User::LeaveIfError(aMessage.GetDesLength(3))); + {TPtr8 buffer_asWritable(buffer->Des()); + aMessage.ReadL(3,buffer_asWritable);} + SReturnData_AppForDocument returnData; + returnData.iDataType=iServ.RecognizeDataL(*fileName, *buffer).iDataType; + returnData.iUid=(returnData.iDataType!=TDataType())? AppForDataTypeL(returnData.iDataType, aServiceUid): TUid::Null(); +#if defined(__PROFILE) + RDebug::ProfileEnd(5); + RDebug::ProfileResult(&profile,5,1); + RDebug::Print(KProfileAppForDocumentL,profile.iTime/1000000,profile.iTime%1000000); + RDebug::ProfileStart(5); +#endif + CleanupStack::PopAndDestroy(2, fileName); + aMessage.WriteL(0,TPckgC(returnData)); + } + +void CApaAppListServSession::GetConfidenceL(const RMessage2& aMessage) +// void GetAcceptedConfidence(TInt& aConfidence); + { + aMessage.WriteL(0,TPckgBuf(iServ.DataRecognizer()->AcceptedConfidence())); + } + +void CApaAppListServSession::SetConfidence(const RMessage2& aMessage) +// SetAcceptedConfidence(TInt aConfidence); + { + __ASSERT_DEBUG(iServ.DataRecognizer(), Panic(EPanicNullPointer)); + iServ.DataRecognizer()->SetAcceptedConfidence(aMessage.Int0()); + } + +void CApaAppListServSession::GetBufSize(const RMessage2& aMessage) +// GetMaxDataBufSize(TInt& aBufSize); + { + aMessage.Complete(iMaxBufSize); + } + +void CApaAppListServSession::SetBufSize(const RMessage2& aMessage) +// SetMaxDataBufSize(TInt aBufSize); + { + iMaxBufSize=aMessage.Int0(); + } + +void CApaAppListServSession::GetDataTypesCountL(const RMessage2& aMessage) + { + delete iBuffer; + iBuffer=NULL; + CDataTypeArray* const dataTypes=new(ELeave) CDataTypeArray(5); + CleanupStack::PushL(dataTypes); + iServ.DataTypeL(*dataTypes); + TInt completionCode=0; // not KErrNone, as completion code of zero tells the client that zero data types were found + if (dataTypes->Count()>0) + { + CBufBase* const buffer=CBufFlat::NewL(sizeof(TDataType)); + CleanupStack::PushL(buffer); + RBufWriteStream writeStream(*buffer); + writeStream<<*dataTypes; + CleanupStack::Pop(buffer); + iBuffer=buffer; + completionCode=iBuffer->Ptr(0).Size(); // number of bytes in buffer (not number of data types) + } + CleanupStack::PopAndDestroy(dataTypes); + aMessage.Complete(completionCode); + } + +void CApaAppListServSession::GetDataTypesL(const RMessage2& aMessage) +// GetSupportedDataTypes(CDataTypeArray& aDataTypes); + { + if(iBuffer==NULL) + { + aMessage.Panic(KApaPanicCli,ENoSupportedDataTypes); + } + else + { + aMessage.WriteL(0,iBuffer->Ptr(0)); + delete iBuffer; + iBuffer=NULL; + } + } + +CApaAppData& CApaAppListServSession::FindAppInListL(TUid aUid) + { + TApaAppEntry dummy; + CApaAppData* app=NULL; + if (!FindAppInList(app, dummy, aUid)) + { + User::Leave(KErrNotFound); + } + return *app; + } + +void CApaAppListServSession::SendArrayL(const MArrayItemWriter& aArrayItemWriter,const RMessage2& aMessage) const + { + const TInt sizeOfBuffer=aMessage.Int1(); + const TInt arrayItemCount=aArrayItemWriter.ArrayItemCount(); + const TInt sizeRequired=sizeof(TInt)+(arrayItemCount*aArrayItemWriter.ArrayItemSize()); + __ASSERT_DEBUG(sizeRequired>0,User::Invariant()); + if (sizeRequired>sizeOfBuffer) + { + User::Leave(sizeRequired); // causes aMessage to complete with sizeRequired + } + CBufFlat* const buf=CBufFlat::NewL(sizeRequired); + CleanupStack::PushL(buf); + buf->ExpandL(0,sizeRequired); + RBufWriteStream writeStream; + writeStream.Open(*buf); + writeStream.WriteUint32L(arrayItemCount); + for (TInt i=0; iPtr(0)); + CleanupStack::PopAndDestroy(buf); + } + +void CApaAppListServSession::AppIconSizesL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + CApaAppData& app = FindAppInListL(uid); + if (app.NonMbmIconFile()) + { + User::Leave(KErrNotSupported); + } + + CArrayFixFlat* array = app.IconSizesL(); + CleanupStack::PushL(array); + TSizeArrayItemWriter arrayItemWriter(*array); + SendArrayL(arrayItemWriter, aMessage); + CleanupStack::PopAndDestroy(array); + } + +void CApaAppListServSession::AppViewsL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + CApaAppData& app = FindAppInListL(uid); + TViewDataArrayItemWriter arrayItemWriter(*app.Views()); + SendArrayL(arrayItemWriter,aMessage); + } + +void CApaAppListServSession::AppFileOwnershipInfoL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + CApaAppData& app = FindAppInListL(uid); + TDesCArrayItemWriter arrayItemWriter(*app.OwnedFiles()); + SendArrayL(arrayItemWriter,aMessage); + } + +void CApaAppListServSession::NumberOfOwnDefinedIconsL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + TApaAppEntry entry; + CApaAppData* app=NULL; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + if (app->NonMbmIconFile()) + { + User::Leave(KErrNotSupported); + } + TInt count, defaultIconsUsed; + app->GetIconInfo(count, defaultIconsUsed); + if (defaultIconsUsed) + { + count=0; + } + TPckgC pckg(count); + aMessage.Write(1,pckg); + } + +void CApaAppListServSession::ApplicationLanguageL(const RMessage2& aMessage) + { + const TUid appUid = TUid::Uid(aMessage.Int0()); + TApaAppEntry appEntry; + CApaAppData* appData = NULL; + if (!FindAppInList(appData, appEntry, appUid)) + { + User::Leave(KErrNotFound); + } + const TLanguage appLanguage = appData->ApplicationLanguage(); + TPckgC pckg(appLanguage); + aMessage.Write(1,pckg); + } + + +void CApaAppListServSession::IconForViewBySizeL(const RMessage2& aMessage) + // Passes back handles to the icon and mask bitmaps for bitmap sharing + { + TApaAppViewIconSizeData appViewIconSizeData; + {TPckg appViewIconSizeData_asDescriptor(appViewIconSizeData); + aMessage.ReadL(0,appViewIconSizeData_asDescriptor);} + TApaAppEntry entry; + CApaAppData* app=NULL; + if (!FindAppInList(app,entry,appViewIconSizeData.iAppUid)) + { + User::Leave(KErrNotFound); + } + ASSERT(app->Views()); + const CArrayPtr& viewDataArray=*app->Views(); + CApaMaskedBitmap* icon=NULL; + const TInt count=viewDataArray.Count(); + for (TInt ii=0; iiHandle(); + returnData.iIconMask=icon->Mask()->Handle(); + aMessage.WriteL(1,TPckgC(returnData)); + } + +void CApaAppListServSession::IconForAppBySizeL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + const TSize size(aMessage.Int1(),aMessage.Int2()); + TApaAppEntry entry; + CApaAppData* app=NULL; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + if (app->NonMbmIconFile()) + { + User::Leave(KErrNotSupported); + } + CApaMaskedBitmap* const icon=app->Icon(size); + if (icon==NULL) + { + User::Leave(KErrNotFound); + } + SReturnData_AppIconByUidAndSize returnData; + returnData.iIcon=icon->Handle(); + returnData.iIconMask=icon->Mask()->Handle(); + aMessage.WriteL(3,TPckgC(returnData)); + + } + +void CApaAppListServSession::IconFileHandleForAppL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + TApaAppEntry entry; + CApaAppData* app=NULL; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + TPtrC iconFileName = app->IconFileName(); + if (iconFileName.Length()==0) + { + User::Leave(KErrNotFound); + } + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + User::LeaveIfError(fs.ShareProtected()); + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.Open(fs, iconFileName, EFileShareReadersOnly)); + User::LeaveIfError(file.TransferToClient(aMessage, 1)); + CleanupStack::PopAndDestroy(2, &fs); //file and fs + } + +void CApaAppListServSession::IconForAppL(const RMessage2& aMessage) +// from GetAppIcon(TUid aAppUid, TInt aSideInPixels, CApaMaskedBitmap& aAppBitmap); +// BUT! It's interface is uid, side, icon handle, mask handle for bitmap sharing +// and avoiding IPC overhead + { + const TUid uid=TUid::Uid(aMessage.Int0()); + const TInt side=aMessage.Int1(); + TApaAppEntry entry; + CApaAppData* app=NULL; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + if (app->NonMbmIconFile()) + { + User::Leave(KErrNotSupported); + } + CApaMaskedBitmap* const icon=app->Icon(side); + if (icon==NULL) + { + User::Leave(KErrNotFound); + } + SReturnData_AppIconByUid returnData; + returnData.iIcon=icon->Handle(); + returnData.iIconMask=icon->Mask()->Handle(); + aMessage.WriteL(2,TPckgC(returnData)); + } + +void CApaAppListServSession::AppForDataTypeL(const RMessage2& aMessage) +// from AppForDataType(const TDataType& aDataType, TUid& aAppUid); + { + if (sizeof(TDataType) != aMessage.GetDesLengthL(0)) + { + //Leave with KErrArgument if client passes other than TDataType + User::Leave(KErrArgument); + } + TDataType dataType; + {TPckg dataType_asDescriptor(dataType); + aMessage.ReadL(0,dataType_asDescriptor);} + TPckgBuf uid_asDescriptor(AppForDataTypeL(dataType, NULL)); + aMessage.WriteL(1,uid_asDescriptor); + aMessage.Complete(KErrNone); + } + +void CApaAppListServSession::AppForDataTypeAndServiceL(const RMessage2& aMessage) + { + TDataType dataType; + {TPckg dataType_asDescriptor(dataType); + aMessage.ReadL(0,dataType_asDescriptor);} + const TUid serviceUid=TUid::Uid(aMessage.Int1()); + TPckgBuf uid(AppForDataTypeL(dataType, &serviceUid)); + aMessage.WriteL(2,uid); + aMessage.Complete(KErrNone); + } + +TUid CApaAppListServSession::AppForDataTypeL(const TDataType& aDataType, const TUid* aServiceUid) + { + // It is possible to register apps as datatype handlers with system priority, + // which means that they are not overridable by user mappings. + // So search the list of apps for a datahandler and get the associated + // priority + TUid uid; + TInt priority; + uid=AppList().PreferredDataHandlerL(aDataType, aServiceUid, priority); + if (priority == KDataTypePrioritySystem) + { + // We have found a handler with system priority + return uid; + } + + // No handler with system priority so see if there is a user mapping + TUid userUid = KNullUid; + if (aServiceUid) + { + iServ.GetAppByDataType(aDataType,*aServiceUid,userUid); + } + else + { + iServ.GetAppByDataType(aDataType,userUid); + } + TApaAppEntry entry; + CApaAppData* app=NULL; + if ((userUid.iUid!=0) && FindAppInList(app,entry,userUid)) + { + // The user mapping is valid + return userUid; + } + + // A user mapping was not found or is invalid so try to use + // the uid returned by PreferredDataHandlerL. + if (uid.iUid==0 && aDataType.IsNative()) + { + uid=aDataType.Uid(); + } + return uid; + } + +void CApaAppListServSession::InsertDataMappingL(const RMessage2& aMessage) + { + TPckgBuf dataType; + aMessage.ReadL(0, dataType); + TDataTypePriority priority = aMessage.Int1(); + const TUid appUid = { aMessage.Int2() }; + + if(priority>KDataTypeUnTrustedPriorityThreshold || priority == KDataTypePrioritySystem ) + { + CApaAppData* appData = AppList().AppDataByUid(appUid); + if( appData ) + { + TBool hasWriteDeviceDataCap( EFalse ); + TBool isSidTrusted( EFalse ); + + CApaSecurityUtils::CheckAppSecurity( appData->AppEntry().iFullName, + hasWriteDeviceDataCap, + isSidTrusted); + + if (priority == KDataTypePrioritySystem ) + { + // Check if the app has capability WriteDeviceData + if ( !hasWriteDeviceDataCap ) + { + priority = KDataTypePriorityNormal; + } + } + else + { + TPtrC registrationFilePath = appData->RegistrationFileName ( ); + TInt match = registrationFilePath.MatchF ( + KLitPathForUntrustedRegistrationResourceFiles ); + //Check if registration file is in path for untrusted apps + //and its SID is untrusted + if (match != KErrNotFound && !isSidTrusted ) + { + // "cap" the priority if UnTrusted apps claim for priority higher + // than UnTrusted apps Threshold priority + priority = KDataTypeUnTrustedPriorityThreshold; + } + } + } + else + { + //if the application is not present in the applist + //then the priority will be reduced to Threshold + priority = KDataTypeUnTrustedPriorityThreshold; + } + } + const TUid serviceUid = { aMessage.Int3() }; + if(aMessage.Function() == EAppListInsertDataMappingIfHigher) + { + const TBool response = iServ.InsertAndStoreIfHigherL(dataType(), priority, appUid); + aMessage.WriteL(3, TPckgC(response)); + + } + else + { + iServ.InsertAndStoreDataMappingL(dataType(), priority, appUid, serviceUid); + } + } + +void CApaAppListServSession::DeleteDataMappingL(const RMessage2& aMessage) + { + TPckgBuf dataType; + aMessage.ReadL(0, dataType); + const TUid serviceUid = { aMessage.Int1() }; + TUid uid; + iServ.GetAppByDataType(dataType(),serviceUid,uid); + if (uid != KNullUid) + { + // TypeStore doesn't support deletion of an inexistent mapping + iServ.DeleteAndStoreDataMappingL(dataType(), serviceUid); + aMessage.Complete(KErrNone); + } + else + { + aMessage.Complete(KErrNotFound); + } + } + +void CApaAppListServSession::GetAppByDataTypeL(const RMessage2& aMessage) const + { + TPckgBuf dataType; + aMessage.ReadL(0,dataType); + const TUid serviceUid = { aMessage.Int1() }; + TUid uid; + iServ.GetAppByDataType(dataType(),serviceUid,uid); + TPckgC uidpckg(uid); + aMessage.WriteL(2,uidpckg); + aMessage.Complete(KErrNone); + } + +void CApaAppListServSession::StartDocumentL(const RMessage2& aMessage,TAppListDocumentStart aStartType) +// from StartDocument(const TDesC& aFileName, TThreadId& aId, TLaunchType aLaunchType); +// from StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aId, TLaunchType aLaunchType); +// from StartDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aId, TLaunchType aLaunchType); +// from CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aId, TLaunchType aLaunchType); +// This method needs to open the file, mime type it then launch it. + { + HBufC* const fileName=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(1))); + {TPtr fileName_asWritable(fileName->Des()); + aMessage.ReadL(1,fileName_asWritable);} + + TUid uid; + if ((aStartType==EStartByUid) || (aStartType==ECreateByUid)) + { + uid.iUid=aMessage.Int2(); + } + else + { + TDataType* const dataType=new(ELeave) TDataType(); + CleanupStack::PushL(dataType); + if (aStartType==EStart) + { + HBufC8* const buffer=HBufC8::NewLC(User::LeaveIfError(aMessage.GetDesLength(2))); + {TPtr8 buffer_asWritable(buffer->Des()); + aMessage.ReadL(2,buffer_asWritable);} + *dataType=iServ.RecognizeDataL(*fileName, *buffer).iDataType; + CleanupStack::PopAndDestroy(buffer); + } + else + { + __ASSERT_DEBUG(aStartType==EStartByDataType,User::Invariant()); + TPckg dataType_asDescriptor(*dataType); + aMessage.ReadL(2,dataType_asDescriptor); + } + uid=AppForDataTypeL(*dataType, NULL); + CleanupStack::PopAndDestroy(dataType); + } + const TThreadId threadId=StartDocumentL(*fileName,uid,(aStartType==ECreateByUid)? EApaCommandCreate: EApaCommandOpen); + CleanupStack::PopAndDestroy(fileName); + aMessage.WriteL(0, TPckgC(threadId)); + } + +TThreadId CApaAppListServSession::StartDocumentL(const TDesC& aFileName, TUid aUid, TApaCommand aCommand) +// Launch the document of aFileName with the app with Uid aUid + { + CApaAppData* app=NULL; + CApaFileRecognizerType* type=NULL; + TApaAppEntry entry; + const TBool findApp=FindAppInList(app,entry,aUid); + if (findApp) + { + if (app->RegistrationFileUsed()) + { + TApaAppCapabilityBuf buf; + app->Capability(buf); + if (((buf().iEmbeddability == TApaAppCapability::EEmbeddableOnly) || (buf().iEmbeddability == TApaAppCapability::EEmbeddableUiNotStandAlone)) && !(buf().iAttributes & TApaAppCapability::EBuiltAsDll)) + { + User::Leave(KErrNotSupported); + } + } + } + + if (!findApp || aUid.iUid==0) + { + // if we can't bind the type from the Mime type stuff then use the old scheme + TRAP_IGNORE(type=FileRecognizer()->RecognizeFileL(aFileName)); + } + else + { + if (findApp) + { + TRAP_IGNORE(type=FileRecognizer()->RecognizeFileL(entry.iFullName)); + } + } + if (!type) + { + User::Leave(KErrNotFound); + } + if (aFileName.Length()==0) + { + return type->RunL(EApaCommandRun,NULL,NULL); + } + return type->RunL(aCommand,&aFileName,NULL); + } + +void CApaAppListServSession::GetExecutableNameGivenDocumentL(const RMessage2& aMessage) + { + HBufC* const name=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(2))); + {TPtr name_asWritable(name->Des()); + aMessage.ReadL(2, name_asWritable);} + HBufC8* const buffer=HBufC8::NewLC(User::LeaveIfError(aMessage.GetDesLength(3))); + {TPtr8 buffer_asWritable(buffer->Des()); + aMessage.ReadL(3, buffer_asWritable);} + const TDataType dataType(iServ.RecognizeDataL(*name, *buffer).iDataType); + CleanupStack::PopAndDestroy(2, name); + + const TUid appUid(AppForDataTypeL(dataType, NULL)); + GetExecutableNameL(aMessage, appUid); + } + +void CApaAppListServSession::GetExecutableNameGivenDocumentPassedByFileHandleL(const RMessage2& aMessage) + { + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.AdoptFromClient(aMessage, 2, 3)); + const TDataType dataType(iServ.RecognizeDataL(file, PreferredBufSize()).iDataType); + CleanupStack::PopAndDestroy(&file); + + const TUid appUid(AppForDataTypeL(dataType, NULL)); + GetExecutableNameL(aMessage, appUid); + } + +void CApaAppListServSession::GetExecutableNameGivenDataTypeL(const RMessage2& aMessage) + { + if (sizeof(TDataType) != aMessage.GetDesLengthL(2)) + { + //Leave with KErrArgument if client passes other than TDataType + User::Leave(KErrArgument); + } + TDataType dataType; + {TPckg dataType_asDescriptor(dataType); + aMessage.ReadL(2, dataType_asDescriptor);} + const TUid appUid(AppForDataTypeL(dataType, NULL)); + GetExecutableNameL(aMessage, appUid); + } + +void CApaAppListServSession::GetExecutableNameGivenAppUidL(const RMessage2& aMessage) + { + const TUid appUid(TUid::Uid(aMessage.Int2())); + GetExecutableNameL(aMessage, appUid); + } + +void CApaAppListServSession::GetExecutableNameL(const RMessage2& aMessage, TUid aAppUid) + { + CApaAppData* appData=NULL; + TApaAppEntry entry; + if (!FindAppInList(appData, entry, aAppUid)) + { + User::Leave(AppList().IsFirstScanComplete() ? + KErrNotFound : RApaLsSession::EAppListInvalid); + } + const TDesC& executableName(entry.iFullName); + if (executableName.Length() == 0) + { + User::Leave(KErrNotFound); + } + aMessage.WriteL(1, executableName); // the "logical" executable name - for non-native applications this is the name of the MIDlet, Python script, etc + WriteNativeExecutableIfNonNativeAndPrepareForClientRetrievalOfOpaqueDataL(aMessage, 0, *appData); + } + +void CApaAppListServSession::GetNativeExecutableNameIfNonNativeL(const RMessage2& aMessage) + { + RBuf logicalExecutableName; + logicalExecutableName.CreateL(User::LeaveIfError(aMessage.GetDesLength(1))); + CleanupClosePushL(logicalExecutableName); + aMessage.ReadL(1, logicalExecutableName); + CApaAppData* const appData=AppList().AppDataByFileName(logicalExecutableName); + if (appData!=NULL) + { + WriteNativeExecutableIfNonNativeAndPrepareForClientRetrievalOfOpaqueDataL(aMessage, 0, *appData); + } + CleanupStack::PopAndDestroy(&logicalExecutableName); + } + +void CApaAppListServSession::WriteNativeExecutableIfNonNativeAndPrepareForClientRetrievalOfOpaqueDataL(const RMessage2& aMessage, TInt aMessageSlotForNativeExecutable, const CApaAppData& aAppData) + { + HBufC8* opaqueData=NULL; + const TPtrC8 opaqueData_asTPtrC8(aAppData.OpaqueData()); + const TInt lengthOfOpaqueData(opaqueData_asTPtrC8.Length()); + if (lengthOfOpaqueData>0) + { + opaqueData=opaqueData_asTPtrC8.AllocLC(); + } + const TUid nonNativeApplicationType(aAppData.NonNativeApplicationType()); + if (nonNativeApplicationType!=TUid::Null()) + { + aMessage.WriteL(aMessageSlotForNativeExecutable, iServ.NativeExecutableL(nonNativeApplicationType)); + } + delete iOpaqueData_pendingDispatchToClient; // only done when the potentially leaving stuff has all succeeded + iOpaqueData_pendingDispatchToClient=opaqueData; // want to do this, even if opaqueData is NULL + if (opaqueData!=NULL) + { + CleanupStack::Pop(opaqueData); + aMessage.Complete(lengthOfOpaqueData); + } + } + +void CApaAppListServSession::GetOpaqueDataL(const RMessage2& aMessage) + { + if (iOpaqueData_pendingDispatchToClient==NULL) + { + User::Leave(KErrGeneral); // the protocol was broken: EAppListServGetOpaqueData can only be called immediately after one of the EAppListServGetExecutableNameGivenXxx or EAppListServGetNativeExecutableNameGivenXxx opcodes - see the client-side implementation of this protocol in RApaLsSession::GetOpaqueData (and the places that call it) + } + aMessage.WriteL(0, *iOpaqueData_pendingDispatchToClient); + delete iOpaqueData_pendingDispatchToClient; + iOpaqueData_pendingDispatchToClient=NULL; + } + +void CApaAppListServSession::GetAppInfoL(TUid aUid, TApaAppInfo& aInfo) + { + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,aUid)) + { + User::Leave(KErrNotFound); + } + aInfo.iUid = entry.iUidType[2]; + aInfo.iFullName = entry.iFullName; + aInfo.iCaption = app->Caption(); + aInfo.iShortCaption = app->ShortCaption(); + } + +void CApaAppListServSession::DoRecognizeUnpackLC(HBufC*& aName, HBufC8*& aBuffer, const RMessage2& aMessage) + { + __ASSERT_DEBUG(aName==NULL,User::Invariant()); + __ASSERT_DEBUG(aBuffer==NULL,User::Invariant()); + aName=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(1))); + TPtr name(aName->Des()); + aMessage.ReadL(1, name); + aBuffer=HBufC8::NewLC(User::LeaveIfError(aMessage.GetDesLength(2))); + TPtr8 buffer(aBuffer->Des()); + aMessage.ReadL(2, buffer); + } + +void CApaAppListServSession::RecognizeDataL(const RMessage2& aMessage) +// Recognize the data type of an object + { + HBufC* name=NULL; + HBufC8* buffer=NULL; + DoRecognizeUnpackLC(name,buffer,aMessage); + + const TDataRecognitionResult result = iServ.RecognizeDataL(*name, *buffer); + + CleanupStack::PopAndDestroy(2); // name & buffer + aMessage.WriteL(0,TPckgC(result)); + } + + +void CApaAppListServSession::RecognizeFilesL(const RMessage2& aMessage) + { + // if there is an outstanding async. request, we even don't allow + // a synchronous request at the same time (due to the two required + // server messages) + if (iAsyncRecognitionActive) + { + User::Leave(KErrInUse); + } + + _LIT8(KAllDataTypes,"*"); + + // retrieve pathname + HBufC* const path=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(0))); + TPtr pathPtr(path->Des()); + aMessage.ReadL(0,pathPtr); + + // retrieve data type filter + HBufC8* const dataType = HBufC8::NewLC(User::LeaveIfError(aMessage.GetDesLength(2))); + TPtr8 dataTypePtr(dataType->Des()); + aMessage.ReadL(2,dataTypePtr); + + delete iRecognitionResult; + iRecognitionResult = NULL; + + if(dataType->Compare(KAllDataTypes) == 0) + { + iRecognitionResult = new (ELeave) CDirectoryRecognitionResult(path, NULL); + CleanupStack::PopAndDestroy(dataType); + } + else + { + iRecognitionResult = new (ELeave) CDirectoryRecognitionResult(path,dataType); + CleanupStack::Pop(dataType); + } + + CleanupStack::Pop(path); // ownership transferred to CDirectoryRecognitionResult + ASSERT(iFileRecognitionUtility); + iFileRecognitionUtility->RecognizeSynchronouslyL(*iRecognitionResult); + aMessage.WriteL(1,TPckgBuf(iRecognitionResult->RequiredBufferSize())); + } + +void CApaAppListServSession::TransferRecognitionResultL(const RMessage2& aMessage) + { + if(iRecognitionResult == NULL) + User::Leave(KErrNotReady); + + iAsyncRecognitionActive = EFalse; + + // if data is too big for buffer, tell client + const TInt sizeOfBuffer=aMessage.Int2(); + if(sizeOfBuffer < iRecognitionResult->RequiredBufferSize()) + User::Leave(KErrTooBig); + + // buffer is big enough -> write result to buffer + CBufFlat* const buf=CBufFlat::NewL(iRecognitionResult->RequiredBufferSize()); + CleanupStack::PushL(buf); + buf->ExpandL(0,iRecognitionResult->RequiredBufferSize()); + + RBufWriteStream writeStream; + writeStream.Open(*buf); + iRecognitionResult->WriteToStreamL(writeStream); + aMessage.WriteL(1,buf->Ptr(0)); + + delete iRecognitionResult; + iRecognitionResult = NULL; + + CleanupStack::PopAndDestroy(buf); + } + +void CApaAppListServSession::RecognizeFilesAsyncL(const RMessage2& aMessage) + { + if (iAsyncRecognitionActive) + { + User::Leave(KErrInUse); + } + else + { + _LIT8(KAllDataTypes,"*"); + + HBufC* path=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(0))); + TPtr pathPtr(path->Des()); + aMessage.ReadL(0,pathPtr); + + // retrieve data type filter + HBufC8* dataType = 0; + dataType=HBufC8::NewLC(User::LeaveIfError(aMessage.GetDesLength(2))); + TPtr8 dataTypePtr(dataType->Des()); + aMessage.ReadL(2,dataTypePtr); + + delete iRecognitionResult; + iRecognitionResult = NULL; + + if(dataType->Compare(KAllDataTypes) == 0) + { + iRecognitionResult = new (ELeave) CDirectoryRecognitionResult(path,NULL); + CleanupStack::PopAndDestroy(dataType); + } + else + { + iRecognitionResult = new (ELeave) CDirectoryRecognitionResult(path,dataType); + CleanupStack::Pop(dataType); + } + + CleanupStack::Pop(path); // ownership transferred to CDirectoryRecognitionResult + ASSERT(iFileRecognitionUtility); + iFileRecognitionUtility->RecognizeAsynchronously(*iRecognitionResult,aMessage); + iAsyncRecognitionActive = ETrue; + } + } + +/** The function interrogates all available rule based plug-ins if apparc can launch application with +given full name. It loops through all plug-ins until gets value different from +CAppLaunchChecker::EAppLaunchIndifferent. +The application will be launched if the return code is not equal to +CAppLaunchChecker::EAppLaunchDecline +*/ +void CApaAppListServSession::RuleBasedLaunchingL(const RMessage2& aMessage) + { + CApaScanningRuleBasedPlugIns* theRuleBasedPlugIns = iServ.RuleBasedPlugIns(); + if(!theRuleBasedPlugIns) + { + //we proceed with launching even if rule based plug-ins framework was not initialized + aMessage.Complete(ETrue); + return; + } + + HBufC* theFullFileName=HBufC::NewLC(User::LeaveIfError(aMessage.GetDesLength(0))); + TPtr theFullFileNamePtr(theFullFileName->Des()); + aMessage.ReadL(0, theFullFileNamePtr); + TUid theUid = AppUidFromFullFileNameL(theFullFileNamePtr); + CleanupStack::PopAndDestroy(theFullFileName); + + CAppLaunchChecker::TAppLaunchCode theLaunchCode = CAppLaunchChecker::EAppLaunchIndifferent; + TInt theNumImp = theRuleBasedPlugIns->ImplementationCount(); + + TApaTaskList theTaskList(iServ.WsSession()); + for(TInt ii = 0; ii < theNumImp; ii++) + { + CAppLaunchChecker* theLauncherChecker = (*theRuleBasedPlugIns)[ii]; + TRAP_IGNORE((theLaunchCode = theLauncherChecker->OkayToLaunchL(theUid, theTaskList))); + if(theLaunchCode > CAppLaunchChecker::EAppLaunchIndifferent) + break; + } + //writing the result + TBool okayToLaunch = theLaunchCode != CAppLaunchChecker::EAppLaunchDecline; + aMessage.Complete(okayToLaunch); + } + +/** +@param aFullFileName This filename is parsed and the path is replaced with "\\sys\\bin\\". + And uses ".exe" if no other is provided in the filename passed. If drive name is + present in the filename then it scans through the \\sys\\bin of that particular drive, + otherwise it scans through the \\sys\\bin folders in all the avaliable drives. +@return Returns the Application Uid for the aFullFileName application. +*/ +TUid CApaAppListServSession::AppUidFromFullFileNameL(const TDesC& aFullFileName) const + { + _LIT(KSysBin, "\\sys\\bin\\"); + _LIT(KFileExtension, ".EXE"); + + RLoader loader; + User::LeaveIfError(loader.Connect()); + CleanupClosePushL(loader); + TPckgBuf dllInfo; + TInt error = KErrNotFound; + + TParse parse; + parse.Set(aFullFileName,NULL,NULL); + if (parse.DrivePresent()) + { + const TPtrC appDrive = parse.Drive(); + TBuffileName(appDrive); + fileName.Append(KSysBin); + User::LeaveIfError(parse.SetNoWild(fileName, &aFullFileName, &KFileExtension)); + error = loader.GetInfo(parse.FullName(), dllInfo); + } + else + { + // scan all drives + User::LeaveIfError(parse.SetNoWild(KSysBin, &aFullFileName, &KFileExtension)); + TFileName tempFileName(parse.FullName()); + TDriveList driveList; + User::LeaveIfError(iFs.DriveList(driveList)); + for (TInt driveNumber = EDriveY; driveNumber != KFinishedScanning; driveNumber = NextDriveToScan(driveNumber)) + { + if (driveList[driveNumber]!=0) + { + User::LeaveIfError(parse.SetNoWild(TDriveUnit(driveNumber).Name(), &tempFileName, NULL)); + error = loader.GetInfo(parse.FullName(), dllInfo); + if (error == KErrNone) + { + break; + } + } + } + } + CleanupStack::PopAndDestroy(&loader); + if (error == KErrNone) + { + return dllInfo().iUids[2]; + } + + //we can't use RFs::Entry if path refers to a system directory i.e. \\sys\\bin + User::LeaveIfError(parse.SetNoWild(aFullFileName, NULL, NULL)); + if(parse.Path().FindF(KSysBin) == 0) + { + User::Leave(KErrNotFound); + } + + //the following valid for non-native applications + TEntry entry; + error = iFs.Entry(aFullFileName, entry); + if (error != KErrNone) + { + // Since we cannot get the Uid of NonNative apps by passing filename to RFs::Entry + CApaAppData* appData = AppList().AppDataByFileName(aFullFileName); + if (appData) + { + TApaAppEntry appEntry = appData->AppEntry(); + return appEntry.iUidType[2]; + } + User::Leave(KErrNotFound); + } + + return entry.iType[2]; + } + +TInt CApaAppListServSession::NextDriveToScan(TInt aCurrentDrive) +// applies the scanning order y:->a: then z: + { + if (aCurrentDrive == EDriveZ) + { + return KFinishedScanning; + } + else if (aCurrentDrive == 0) + { + return EDriveZ; // finally scan the last one + } + else if (aCurrentDrive > 0 && aCurrentDrive < KMaxDrives) + { + return aCurrentDrive - 1; + } + else + { + return KErrGeneral; // never gets here, but it wont compile otherwise + } + } + +void CApaAppListServSession::CancelRecognizeFiles() + { + if (iAsyncRecognitionActive) + { + ASSERT(iFileRecognitionUtility); + iFileRecognitionUtility->CancelRecognitionRequest(); + iAsyncRecognitionActive = EFalse; + } + } + +void CApaAppListServSession::RecognizeDataPassedByFileHandleL(const RMessage2& aMessage) +// Recognize the data type of an object + { + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.AdoptFromClient(aMessage, 1, 2)); + const TDataRecognitionResult result(iServ.RecognizeDataL(file, PreferredBufSize())); + CleanupStack::PopAndDestroy(&file); + aMessage.WriteL(0, TPckgC(result)); + } + +void CApaAppListServSession::RecognizeSpecificDataL(const RMessage2& aMessage) +// Determine whether an object is of a specific data type + { + HBufC* name=NULL; + HBufC8* buffer=NULL; + DoRecognizeUnpackLC(name,buffer,aMessage); + TDataType dataType; + {TPckg dataType_asDescriptor(dataType); + aMessage.ReadL(0, dataType_asDescriptor);} + aMessage.Complete(iServ.RecognizeDataL(*name,*buffer,dataType)); + CleanupStack::PopAndDestroy(2); // name & buffer + } + +void CApaAppListServSession::RecognizeSpecificDataPassedByFileHandleL(const RMessage2& aMessage) + { + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.AdoptFromClient(aMessage, 1, 2)); + TDataType dataType; + {TPckg dataType_asDescriptor(dataType); + aMessage.ReadL(0,dataType_asDescriptor);} + aMessage.Complete(iServ.RecognizeDataL(file, PreferredBufSize(), dataType)); + CleanupStack::PopAndDestroy(&file); + } + +void CApaAppListServSession::InitListL(const RMessage2& aMessage, TAppListType aType) +// carries out initialisation prior to starting to pass a new list across + { + iAppListType = aType; + iAppListScreenMode = aMessage.Int0(); + if (aType == EListFilteredEmbeddedApps) + { + TApaEmbeddabilityFilter filter; + {TPckg filter_asDescriptor(filter); + aMessage.ReadL(1,filter_asDescriptor);} + iEmbeddabilityFilter = filter; + } + if (aType == EListCapabilityAttrFilteredApps) + { + iCapabilityAttrFilterMask = aMessage.Int1(); + iCapabilityAttrFilterValue = aMessage.Int2(); + } + if (aType == EListServerApps) + { + iServiceUid = TUid::Uid(aMessage.Int1()); + } + iApaAppInfoArray.ResetAndDestroy(); + iFlags|=EAppListPopulationPending; + } + +void CApaAppListServSession::EmbedCount(const RMessage2& aMessage) const +// writes back the number of embedded apps in the list + { + TInt count=0; + const CApaAppList& list=AppList(); + CApaAppData* app = list.FirstApp(); + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + while (app) + { + if (!AppIsControlPanelItem(*app) && AppMatchesEmbeddabilityFilter(*app, filter)) + { + count++; + } + app = list.NextApp(app); + } + aMessage.Complete(count); + } + +void CApaAppListServSession::AppCount(const RMessage2& aMessage) const +// writes back the number of apps in the list + { + TInt count=0; + const CApaAppList& list=AppList(); + CApaAppData* app = list.FirstApp(); + while (app) + { + if (!AppIsControlPanelItem(*app)) + { + count++; + } + app = list.NextApp(app); + } + aMessage.Complete(count); + } + +void CApaAppListServSession::GetNextAppL(const RMessage2& aMessage) + { + if (iFlags&EAppListPopulationPending) + { + const CApaAppList& list=AppList(); + if (!(list.IsFirstScanComplete())) + { + User::Leave(KErrCorrupt); + } + + iApaAppInfoArray.ResetAndDestroy(); + for (CApaAppData* appData = list.FirstApp(iAppListScreenMode); appData != NULL; appData = list.NextApp(appData, iAppListScreenMode)) + { + if (iAppListType==EListFilteredEmbeddedApps && (AppIsControlPanelItem(*appData) || !AppMatchesEmbeddabilityFilter(*appData, iEmbeddabilityFilter))) + { + continue; + } + if (iAppListType==EListCapabilityAttrFilteredApps && !AppMatchesCapabilityAttrFilter(*appData)) + { + continue; + } + if (iAppListType==EListServerApps && !appData->ImplementsService(iServiceUid)) + { + continue; + } + CApaAppInfo* apaAppInfo= new (ELeave)CApaAppInfo(); + CleanupStack::PushL(apaAppInfo); + apaAppInfo->SetCaptionL(appData->Caption()); + apaAppInfo->SetShortCaptionL(appData->ShortCaption()); + apaAppInfo->SetFullNameL(appData->AppEntry().iFullName); + apaAppInfo->SetUid(appData->AppEntry().iUidType[2]); + User::LeaveIfError(iApaAppInfoArray.Append(apaAppInfo)); + CleanupStack::Pop(apaAppInfo); + } + iFlags&=~EAppListPopulationPending; + } + + if (iApaAppInfoArray.Count()==0) + { + User::Leave(KErrNotFound); + } + TApaAppInfo* info=new(ELeave)TApaAppInfo; + CleanupStack::PushL(info); + CApaAppInfo* apaAppInfo = iApaAppInfoArray[0]; + info->iUid = apaAppInfo->Uid(); + info->iFullName = apaAppInfo->FullName(); + info->iCaption = apaAppInfo->Caption(); + // Get the length of the target descriptor + TInt targetLen=aMessage.GetDesMaxLength(1); + if (targetLen==KApaAppInfoDesMaxLength) + { + info->iShortCaption = apaAppInfo->ShortCaption(); + } + // + iApaAppInfoArray.Remove(0); + delete apaAppInfo; + TPckgC infoPk(*info); + if (targetLenAppEntry(); + } + + TBool appPendingOnLangChange = found && list.IsLanguageChangePending() && aApp->IsPending(); + + if ((!found || appPendingOnLangChange) && !list.IsIdleUpdateComplete()) + { + // 1. app wasn't found, but an app scan is currently in progress, + // so try to find and add the specific app we're looking for to the list + + // 2. On language change event, current app scan could not yet update the found app, + // so try to update the specific app we're looking for, in the list. + CApaAppData* app = NULL; + if(aAppUid!=KNullUid) + { + TRAPD(ret, app = FindSpecificAppL(aAppUid)); + if (ret == KErrNone && app) + { + // app has been found and added to the app list + aApp = app; + aEntry = aApp->AppEntry(); + found = ETrue; + } + } + } + return found; + } + +CApaAppData* CApaAppListServSession::FindSpecificAppL(TUid aAppUid) + { + //Scans the drives and folder lists for the specific app + CApaAppRegFinder* regFinder = CApaAppRegFinder::NewLC(iFs); + CApaAppData* app = iServ.AppList().FindAndAddSpecificAppL(regFinder, aAppUid); + CleanupStack::PopAndDestroy(regFinder); + return app; + } + +void CApaAppListServSession::GetAppInfoL(const RMessage2& aMessage) + { + // get UID of required app + const TUid uid=TUid::Uid(aMessage.Int0()); + TApaAppInfo* info=new(ELeave) TApaAppInfo; // on heap to avoid running out of stack + CleanupStack::PushL(info); + GetAppInfoL(uid, *info); + TPckgC infoPk(*info); + aMessage.WriteL(1,infoPk); + CleanupStack::PopAndDestroy(info); + } + +void CApaAppListServSession::GetAppCapabilityL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int1()); + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + TInt targetLen=aMessage.GetDesMaxLength(0); + HBufC8* buf=HBufC8::NewLC(User::LeaveIfError(targetLen)); + TPtr8 ptr=buf->Des(); + app->Capability(ptr); + ptr.SetLength(targetLen); + aMessage.WriteL(0,*buf); + CleanupStack::PopAndDestroy(buf); + } + +void CApaAppListServSession::GetDefaultScreenNumberL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + aMessage.Complete(app->DefaultScreenNumber()); + } + +void CApaAppListServSession::StartAppL(const RMessage2& aMessage, TBool aReturnThreadId) + { + CApaCommandLine* commandLine=CApaCommandLine::NewLC(); + commandLine->ConstructCmdLineFromMessageL(aMessage); + + CApaFileRecognizerType* type=NULL; + TRAP_IGNORE(type=FileRecognizer()->RecognizeFileL(commandLine->ExecutableName())); + if (type==NULL) + { + User::Leave(KErrNotFound); + } + CleanupStack::PushL(TCleanupItem(&NullifyAppCommandLinePointer,&iServ)); + iServ.SetAppCmdLine(commandLine); + TPtrC fileName=commandLine->DocumentName(); + TPtrC8 tailEnd=commandLine->TailEnd(); + const TThreadId threadId(type->RunL(commandLine->Command(),(fileName.Length()?&fileName:NULL),(tailEnd.Length()?&tailEnd:NULL))); // pass in NULL for components that are not present + CleanupStack::PopAndDestroy(&iServ); // calls iServ.SetAppCmdLine(NULL); + CleanupStack::PopAndDestroy(commandLine); + + if (aReturnThreadId) + { + aMessage.WriteL(CApaCommandLine::EIpcFirstFreeSlot,TPckgC(threadId)); + } + } + +void CApaAppListServSession::SetNotify(const RMessage2& aMessage) + { + if (!iNotifyMessage.IsNull()) + { + aMessage.Panic(KApaPanicCli,ENotifierAlreadyPresent); + } + else + { + const TBool completeImmediatelyIfNoScanImpendingOrInProgress=aMessage.Int0(); + if ((!completeImmediatelyIfNoScanImpendingOrInProgress) || + iServ.AppFsMonitor().AnyNotificationImpending() || + AppList().AppScanInProgress()) + { + iNotifyMessage=aMessage; + } + else + { + aMessage.Complete(KErrNone); + } + } + } + +void CApaAppListServSession::CancelNotify() + { + NotifyClients(KErrCancel); + } + +void CApaAppListServSession::NotifyClients(TInt aReason) + { + if (!iNotifyMessage.IsNull()) + { + iNotifyMessage.Complete(aReason); + } + //Notify client for scan complete. + NotifyScanComplete(); + } + +void CApaAppListServSession::AppInfoProvidedByRegistrationFileL(const RMessage2& aMessage) + { + // get UID of required app + const TUid uid=TUid::Uid(aMessage.Int0()); + + // locate app in list + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + + const TBool registrationFileUsed = app->RegistrationFileUsed(); + TPckgC pckg(registrationFileUsed); + aMessage.WriteL(1, pckg); + } + +void CApaAppListServSession::IconFileNameL(const RMessage2& aMessage) + { + // get UID of required app + const TUid uid=TUid::Uid(aMessage.Int0()); + + // locate app in list + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + else + { + TPtrC iconFileName(app->IconFileName()); + if (iconFileName.Length() == 0) + { + User::Leave(KErrNotFound); + } + else + { + TFileName fileName = iconFileName; + TPckgC pckg(fileName); + aMessage.WriteL(1, pckg); + } + } + } + +void CApaAppListServSession::ViewIconFileNameL(const RMessage2& aMessage) + { + // get UID of required app + const TUid uid=TUid::Uid(aMessage.Int0()); + // get UID of required view + const TUid viewUid=TUid::Uid(aMessage.Int1()); + + TPtrC viewIconFileName; + + // locate app in list + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + + if (!app->RegistrationFileUsed()) + { + User::Leave(KErrNotSupported); + } + else + { + const CArrayPtr& viewDataArray=*app->Views(); + const TInt count=viewDataArray.Count(); + for (TInt ii=0; ii pckg(fileName); + aMessage.WriteL(2, pckg); + } + } + } + +void CApaAppListServSession::GetAppServicesL(const RMessage2& aMessage) + { + const TInt initialBufSize = aMessage.Int2(); + if (initialBufSize) + { + delete iBuffer; + iBuffer = NULL; + iBuffer = GetServiceBufferL(aMessage); + if (iBuffer->Size() > initialBufSize) + { + // default buffer provided by client is too small, ask client to provide buffer of correct size + User::Leave(iBuffer->Ptr(0).Size()); + } + } + __ASSERT_ALWAYS(iBuffer, aMessage.Panic(KApaPanicCli,EClientBadRequest)); + aMessage.WriteL(3, iBuffer->Ptr(0)); + delete iBuffer; + iBuffer = NULL; + } + +CBufBase* CApaAppListServSession::GetServiceBufferL(const RMessage2& aMessage) const + { + CBufBase* buffer = NULL; + const TUid uid = TUid::Uid(aMessage.Int0()); + switch (aMessage.Function()) + { + case EAppListServGetAppServices: + buffer = AppList().ServiceArrayBufferL(uid); + break; + case EAppListServGetServiceImplementations: + buffer = AppList().ServiceImplArrayBufferL(uid); + break; + case EAppListServGetServiceImplementationsDataType: + { + TDataType dataType; + TPckg dataType_asDescriptor(dataType); + aMessage.ReadL(1,dataType_asDescriptor); + buffer = AppList().ServiceImplArrayBufferL(uid, dataType); + } + break; + case EAppListServGetAppServiceUids: + buffer = AppList().ServiceUidBufferL(uid); + break; + case EAppListServGetAppServiceOpaqueData: + buffer = AppList().ServiceOpaqueDataBufferL(uid, TUid::Uid(aMessage.Int1())); + break; + default: + aMessage.Panic(KApaPanicCli,EClientBadRequest); + User::Leave(KErrNotSupported); + break; + } + return buffer; + } + +void CApaAppListServSession::NullifyAppCommandLinePointer(TAny* aServer) + { + static_cast(aServer)->SetAppCmdLine(NULL); + } + +CApaAppListServSession::CApaAppInfo::CApaAppInfo() + :iUid(KNullUid), iCaption(NULL), iShortCaption(NULL), iFullName(NULL) + { + } + +CApaAppListServSession::CApaAppInfo::~CApaAppInfo() + { + delete iCaption; + delete iShortCaption; + delete iFullName; + } + +void CApaAppListServSession::CApaAppInfo::SetUid(const TUid aUid) + { + iUid=aUid; + } + +void CApaAppListServSession::CApaAppInfo::SetCaptionL(const TDesC& aCaption) + { + HBufC* caption = aCaption.AllocL(); + delete iCaption; + iCaption = caption; + } + +void CApaAppListServSession::CApaAppInfo::SetShortCaptionL(const TDesC& aShortCaption) + { + HBufC* shortCaption = aShortCaption.AllocL(); + delete iShortCaption; + iShortCaption = shortCaption; + } + +void CApaAppListServSession::CApaAppInfo::SetFullNameL(const TDesC& aFullName) + { + HBufC* fullName = aFullName.AllocL(); + delete iFullName; + iFullName = fullName; + } + +void CApaAppListServSession::RegisterListPopulationCompleteObserver(const RMessage2& aMessage) + { + if (!iCompletionOfListPopulationObserverMsg.IsNull()) + { + aMessage.Panic(KApaPanicCli,EObserverAlreadyPresent); + } + else + { + if(AppList().IsFirstScanComplete()) + { + aMessage.Complete(KErrNone); + } + else + { + iCompletionOfListPopulationObserverMsg=aMessage; + } + } + } + +void CApaAppListServSession::NotifyClientForCompletionOfListPopulation() + { + if (!iCompletionOfListPopulationObserverMsg.IsNull()) + { + iCompletionOfListPopulationObserverMsg.Complete(KErrNone); + } + } //lint !e1762 Suppress member function could be made const + + +void CApaAppListServSession::CancelListPopulationCompleteObserver() + { + if (!iCompletionOfListPopulationObserverMsg.IsNull()) + { + iCompletionOfListPopulationObserverMsg.Complete(KErrCancel); + } + } //lint !e1762 Suppress member function could be made const + +void CApaAppListServSession::NotifyClientOfDataMappingChange() + { + if (!iMessage_NotifyOnDataMappingChange.IsNull()) + { + iMessage_NotifyOnDataMappingChange.Complete(KErrNone); + } + } //lint !e1762 Suppress member function could be made const + +void CApaAppListServSession::MatchesSecurityPolicyL(const RMessage2& aMessage) + { + const TUid appUid=TUid::Uid(aMessage.Int0()); + TApaAppInfo* const appInfo=new(ELeave) TApaAppInfo; + CleanupStack::PushL(appInfo); + //Get the app info for the given App uid. + GetAppInfoL(appUid, *appInfo); + const TPtrC executableName(appInfo->iFullName); + //Create a process only if the executable name is of non zero length + if (executableName.Length() != 0) + { + RProcess process; + TInt result = process.Create(executableName, KNullDesC); + //Proceed with checking the security policy if the process is created normally + if (result == KErrNone) + { + TPckgBuf securityPolicy; + aMessage.ReadL(1,securityPolicy); + aMessage.Complete(securityPolicy().CheckPolicy(process)); + process.Close(); + } + else + { + aMessage.Complete(result); + } + } + else + { + aMessage.Complete(KErrNotFound); + } + CleanupStack::PopAndDestroy(appInfo); + } + +void CApaAppListServSession::SetAppShortCaptionL(const RMessage2& aMessage) + { + const TUid uid=TUid::Uid(aMessage.Int0()); + CApaAppData* app=NULL; + TApaAppEntry entry; + if (!FindAppInList(app,entry,uid)) + { + User::Leave(KErrNotFound); + } + + TInt length=aMessage.GetDesLength(1); + if(length < 0) + { + User::Leave(length); + } + + HBufC* const shortCaption=HBufC::NewLC(length); + TPtr captionPtr(shortCaption->Des()); + aMessage.ReadL(1, captionPtr); + + TLanguage appLanguage=TLanguage(aMessage.Int2()); + CCustomAppInfoData* customAppInfo=CCustomAppInfoData::NewL(uid, appLanguage, *shortCaption); + CleanupStack::PushL(customAppInfo); + iServ.AddCustomAppInfoInListL(customAppInfo); + CleanupStack::Pop(customAppInfo); + if(app->ApplicationLanguage() == appLanguage) + { + app->SetShortCaptionL(*shortCaption); + } + else if(appLanguage==ELangNone) + { + iServ.UpdateAppListByShortCaptionL(); + } + CleanupStack::PopAndDestroy(shortCaption); + } + +void CApaAppListServSession::NotifyScanComplete() + { + //See if the session is intrested in scan complete notification. + if (!iNotifyOnScanCompleteMsg.IsNull()) + { + iNotifyOnScanCompleteMsg.Complete(KErrNone); + } + iNonNativeApplicationsManager->NotifyScanComplete(); + } //lint !e1762 Suppress member function could be made const + +// TSizeArrayItemWriter + +TInt TSizeArrayItemWriter::ArrayItemCount() const + { + return iArray.Count(); + } + +TInt TSizeArrayItemWriter::ArrayItemSize() const + { + return sizeof(TSize); + } + +void TSizeArrayItemWriter::WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const + { + const TSize& size = iArray[aIndex]; + aWriteStream.WriteUint32L(size.iWidth); + aWriteStream.WriteUint32L(size.iHeight); + } + +// TViewDataArrayItemWriter + +TInt TViewDataArrayItemWriter::ArrayItemCount() const + { + return iArray.Count(); + } + +TInt TViewDataArrayItemWriter::ArrayItemSize() const + { + return sizeof(TApaAppViewInfo); + } + +void TViewDataArrayItemWriter::WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const + { + const CApaAppViewData& appViewData=*(iArray[aIndex]); + aWriteStream << TApaAppViewInfo(appViewData.Uid(),appViewData.Caption(),appViewData.ScreenMode()); + } + +// TDesCArrayItemWriter + +TInt TDesCArrayItemWriter::ArrayItemCount() const + { + return iArray.Count(); + } + +TInt TDesCArrayItemWriter::ArrayItemSize() const + { + return sizeof(TFileName); + } + +void TDesCArrayItemWriter::WriteArrayItemL(RWriteStream& aWriteStream,TInt aIndex) const + { + aWriteStream << iArray[aIndex]; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSES.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSES.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,227 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APSSES_H__) +#define __APSSES_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APSSERV_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__APSCLSV_H__) +#include "APSCLSV.H" +#endif + +#include "APGAPLST.H" +#include "APSRECUTIL.H" + +// classes defined +class CApaAppListServSession; +// +// classes referenced +class CApaAppList; +class CApaAppData; +class CApaFileRecognizer; +class CApaScanningDataRecognizer; +class TDataType; +class CTypeStoreManager; +class CApsNonNativeApplicationsManager; +// +class MArrayItemWriter; + +class CFileRecognitionUtility; + +class CApaAppListServSession : public CSession2 + { +public: + // construct/destruct + static CApaAppListServSession* NewL(CApaAppListServer& aServer, RFs& aFs); + ~CApaAppListServSession(); + //service request + virtual void ServiceL(const RMessage2 &aMessage); + void NotifyClients(TInt aReason); + void NotifyClientForCompletionOfListPopulation(); + void NotifyClientOfDataMappingChange(); + void NotifyScanComplete(); +private: + CApaAppListServSession(CApaAppListServer& aServer, RFs& aFs); + void ConstructL(); + void NotifyOnDataMappingChange(const RMessage2& aMessage); + void CancelNotifyOnDataMappingChange(); +private: + enum TAppListType { + ENoList, + EListFilteredEmbeddedApps, + EListCapabilityAttrFilteredApps, + EListServerApps + }; + enum TAppListDocumentStart { + EStart, + EStartByDataType, + EStartByUid, + ECreateByUid + }; +private: + class CApaAppInfo; +private: + void AppCount(const RMessage2& aMessage) const; + void EmbedCount(const RMessage2& aMessage) const; + void GetNextAppL(const RMessage2& aMessage); + void InitListL(const RMessage2& aMessage, TAppListType aType); + void GetAppInfoL(const RMessage2& aMessage); + void GetAppInfoL(TUid aUid, TApaAppInfo& aInfo); + void GetAppCapabilityL(const RMessage2& aMessage); + void GetDefaultScreenNumberL(const RMessage2& aMessage); + void StartAppL(const RMessage2& aMessage, TBool aReturnThreadId); + // + // Data recognition stuff + void RecognizeDataL(const RMessage2& aMessage); + void RecognizeDataPassedByFileHandleL(const RMessage2& aMessage); + void RecognizeSpecificDataL(const RMessage2& aMessage); + void RecognizeSpecificDataPassedByFileHandleL(const RMessage2& aMessage); + static void DoRecognizeUnpackLC(HBufC*& aName, HBufC8*& aBuffer, const RMessage2& aMessage); + // + void AppForDataTypeL(const RMessage2& aMessage); + void StartDocumentL(const RMessage2& aMessage,TAppListDocumentStart aStartType); + TThreadId StartDocumentL(const TDesC& aFileName, TUid aUid, TApaCommand aCommand); + void GetExecutableNameGivenDocumentL(const RMessage2& aMessage); + void GetExecutableNameGivenDocumentPassedByFileHandleL(const RMessage2& aMessage); + void GetExecutableNameGivenDataTypeL(const RMessage2& aMessage); + void GetExecutableNameGivenAppUidL(const RMessage2& aMessage); + void GetExecutableNameL(const RMessage2& aMessage, TUid aAppUid); + void GetNativeExecutableNameIfNonNativeL(const RMessage2& aMessage); + void WriteNativeExecutableIfNonNativeAndPrepareForClientRetrievalOfOpaqueDataL(const RMessage2& aMessage, TInt aMessageSlotForNativeExecutable, const CApaAppData& aAppData); + void GetOpaqueDataL(const RMessage2& aMessage); + TUid AppForDataTypeL(const TDataType& aDataType, const TUid* aServiceUid); + void AppForDocumentL(const RMessage2& aMessage, const TUid* aServiceUid); + // + void IconForAppL(const RMessage2& aMessage); + // + void IconForAppBySizeL(const RMessage2& aMessage); + void AppIconSizesL(const RMessage2& aMessage); + void IconFileHandleForAppL(const RMessage2& aMessage); + // + void AppViewsL(const RMessage2& aMessage); + void IconForViewBySizeL(const RMessage2& aMessage); + void AppFileOwnershipInfoL(const RMessage2& aMessage); + // + void NumberOfOwnDefinedIconsL(const RMessage2& aMessage); + // + void AppInfoProvidedByRegistrationFileL(const RMessage2& aMessage); + void IconFileNameL(const RMessage2& aMessage); + void ViewIconFileNameL(const RMessage2& aMessage); + // + void RecognizeFilesL(const RMessage2& aMessage); + void TransferRecognitionResultL(const RMessage2& aMessage); + void RecognizeFilesAsyncL(const RMessage2& aMessage); + void RuleBasedLaunchingL(const RMessage2& aMessage); + void CancelRecognizeFiles(); + // + void InsertDataMappingL(const RMessage2& aMessage); + void DeleteDataMappingL(const RMessage2& aMessage); + void GetAppByDataTypeL(const RMessage2& aMessage) const; + // + void GetAppServicesL(const RMessage2& aMessage); + CBufBase* GetServiceBufferL(const RMessage2& aMessage) const; + void AppForDataTypeAndServiceL(const RMessage2& aMessage); + void AppForDocumentPassedByFileHandleL(const RMessage2& aMessage, const TUid* aServiceUid); + + void RegisterNonNativeApplicationTypeL(const RMessage2& aMessage); + void DeregisterNonNativeApplicationTypeL(const RMessage2& aMessage); + + void GetAppTypeL(const RMessage2& aMessage); + void ForceRegistrationL(const RMessage2& aMessage); + inline const CApaAppList& AppList() const; + inline CApaFileRecognizer* FileRecognizer() const; + CApaAppData& FindAppInListL(TUid aUid); + TBool FindAppInList(CApaAppData*& aApp,TApaAppEntry& aEntry,TUid aAppUid); + TBool AppMatchesEmbeddabilityFilter(const CApaAppData& aAppData, const TApaEmbeddabilityFilter& aEmbeddabilityFilter) const; + TBool AppMatchesCapabilityAttrFilter(const CApaAppData& aAppData) const; + static TBool AppIsControlPanelItem(const CApaAppData& aAppData); + + void GetConfidenceL(const RMessage2& aMessage); + void SetConfidence(const RMessage2& aMessage); + void GetBufSize(const RMessage2& aMessage); + void SetBufSize(const RMessage2& aMessage); + void GetDataTypesCountL(const RMessage2& aMessage); + void GetDataTypesL(const RMessage2& aMessage); + void SetNotify(const RMessage2& aMessage); + void CancelNotify(); + // + void SendArrayL(const MArrayItemWriter& aArrayItemWriter,const RMessage2& aMessage) const; + // + void ApplicationLanguageL(const RMessage2& aMessage); + void RegisterListPopulationCompleteObserver(const RMessage2& aMessage); + void CancelListPopulationCompleteObserver(); + void MatchesSecurityPolicyL(const RMessage2& aMessage); + // + void SetAppShortCaptionL(const RMessage2& aMessage); + + static void NullifyAppCommandLinePointer(TAny* aServer); + TInt PreferredBufSize() const; + CApaAppData* FindSpecificAppL(TUid aAppUid); + TUid AppUidFromFullFileNameL(const TDesC& aFullFileName) const; + static TInt NextDriveToScan(TInt aCurrentDrive); + +private: + enum + { + ENotifyPresent=0x01, + EAppListPopulationPending=0x02 + }; + +private: + CApaAppListServer& iServ; + TInt iFlags; + RFs& iFs; + TInt iMaxBufSize; + CBufBase* iBuffer; + RMessage2 iNotifyMessage; + RMessage2 iNotifyOnScanCompleteMsg; + RPointerArray iApaAppInfoArray; //contains the most recent "snapshot" of the applist taken by GetNextAppL. + TAppListType iAppListType; + TInt iAppListScreenMode; + TApaEmbeddabilityFilter iEmbeddabilityFilter; + TUint iCapabilityAttrFilterMask; // contains bit flags from TCapabilityAttribute + TUint iCapabilityAttrFilterValue; // contains bit flags from TCapabilityAttribute + TUid iServiceUid; + RMessage2 iCompletionOfListPopulationObserverMsg; + CDirectoryRecognitionResult* iRecognitionResult; + CFileRecognitionUtility* iFileRecognitionUtility; + TBool iAsyncRecognitionActive; + HBufC8* iOpaqueData_pendingDispatchToClient; + RMessagePtr2 iMessage_NotifyOnDataMappingChange; + CApsNonNativeApplicationsManager* iNonNativeApplicationsManager; + }; + +// +// inlines +// + +inline const CApaAppList& CApaAppListServSession::AppList() const + { return ((CApaAppListServer*)Server())->AppList(); } + +inline CApaFileRecognizer* CApaAppListServSession::FileRecognizer() const + { return ((CApaAppListServer*)Server())->FileRecognizer(); } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSTART.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSTART.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,132 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The main startup of the AppArc server +// +// + +#include +#include + +#include "APASVST.H" +#include "APAFLREC.H" + +#include + +NONSHARABLE_CLASS(CSvActiveScheduler) : public CActiveScheduler + { +public: + static void NewLC(); + virtual void Error(TInt anError) const; + }; + +GLDEF_C void CSvActiveScheduler::NewLC() +// +// Create and install the active scheduler. +// + { + CSvActiveScheduler* pA=new(ELeave) CSvActiveScheduler; + CleanupStack::PushL(pA); + CActiveScheduler::Install(pA); + } + +GLDEF_C void CSvActiveScheduler::Error(TInt) const +// +// Called if any Run() method leaves. +// + { + } + +static void CleanupRFbsSession(TAny*) + { + RFbsSession::Disconnect(); + } + +static void RunServerL(MApaAppStarter* aAppStarter) +// +// Perform all server initialisation, in particular creation of the +// scheduler and server and then run the scheduler +// + { + MApaAppStarter* appStarter = aAppStarter; + // create and install the active scheduler we need + CSvActiveScheduler::NewLC(); + // create a RFbsSession + User::LeaveIfError(RFbsSession::Connect()); + CleanupStack::PushL(TCleanupItem(CleanupRFbsSession, NULL)); + // + // create the server (leave it on the cleanup stack) + CApaAppListServer* appListServer = CApaAppListServer::NewL(appStarter); + CleanupStack::PushL(appListServer); + // + // Initialisation complete, now signal the client +#ifdef APA_SERVER_IN_THREAD + RThread::Rendezvous(KErrNone); +#else + if(aAppStarter) + { + // Launching in a thread within an existing process. + RThread::Rendezvous(KErrNone); + } + else + { + RProcess::Rendezvous(KErrNone); + } +#endif + // + // Ready to run + CActiveScheduler::Start(); + // + // Cleanup the server, RFbsSession and scheduler + CleanupStack::PopAndDestroy(3); + } + +static TInt RunServer(MApaAppStarter* aAppStarter) +// +// Main entry-point for the server thread +// + { + __UHEAP_MARK; + TInt r; + // naming the server thread after the server helps to debug panics + r=RThread::RenameMe(NameApaServServerThread()); + // + if (r == KErrNone) + { + CTrapCleanup* cleanup=CTrapCleanup::New(); + r=KErrNoMemory; + if (cleanup) + { + TRAP(r,RunServerL(aAppStarter)); + REComSession::FinalClose(); + delete cleanup; + } + } + // + __UHEAP_MARKEND; + return r; + } + +/** +ApaServThreadStart + +@internalTechnology +*/ +EXPORT_C TInt ApaServThreadStart(TAny* aAppStarter) +// +// thread entry-point function. +// + { + MApaAppStarter* appStarter = reinterpret_cast(aAppStarter); + return RunServer(appStarter); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSTD.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSTD.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,25 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "APSSTD.H" + + +GLDEF_C void Panic(TApaPanic aPanic) +// Panic the server +// + { + _LIT(KApaServPan,"APASERV"); + User::Panic(KApaServPan,aPanic); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSTD.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/APSSTD.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,68 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__APSSTD_H__) +#define __APSSTD_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__APAFLREC_H__) +#include +#endif + + +enum TApaPanic + { + ESvrCreateServer, + ESvrStartServer, + EMainSchedulerError, + // + EDSvrNoApp, + EEventFromBackupObserverError, + EReferenceCountingError1, + EReferenceCountingError2, + EReferenceCountingError3, + EPanicNullPointer, + ENonNativeAppsUpdateLogOpenedTwice, + ENonNativeAppsTFileDetailsPathNotSet, + ENonNativeAppsTFileDetailsPathAlreadySet, + ENonNativeAppsTFileDetailsOpenInBadState, + ENonNativeAppsTFileDetailsOpenWithRealPathSet, + ENonNativeAppsTFileDetailsOpenWithTempPathSet, + ENonNativeAppsTFileDetailsRenameToRealInBadState, + ENonNativeAppsTFileDetailsRenameToRealWithoutTempPath, + ENonNativeAppsTFileDetailsRenameToRealWithoutRealPath, + ENonNativeAppsTFileDetailsRenameToTempInBadState, + ENonNativeAppsTFileDetailsRenameToTempWithoutRealPathSet, + ENonNativeAppsTFileDetailsRenameToTempWithTempPathSet, + ENonNativeAppsTFileDetailsCreateTempInBadState, + ENonNativeAppsTFileDetailsCreateTempWithTempPathSet, + ENonNativeAppsTFileDetailsDeleteInBadState, + ENonNativeAppsTFileDetailsDeleteTemporaryInBadState, + ENonNativeAppsTFileDetailsRestoreRealInBadState, + ENonNativeAppsFileDeleterOverflow, + ENonNativeAppsFileReplacerOverflow, + ENonNativeAppsNegativeStoredFilePosition, + ENonNativeAppsTestHandlingPanicDuringUpdate, + ENonNativeAppsTestHandlingPanicDuringRollback, + ENonNativeAppsNonNativeApplicationsUpdateInternalizeNewUpdateInBadState + }; + + +GLREF_C void Panic(TApaPanic aPanic); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsiconcaptionoverride.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsiconcaptionoverride.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,570 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @internalComponent +*/ + +#include "apsiconcaptionoverride.h" +#include +#include + +//constants defined +const TUid KUidIconCaptionRepository = { 0x1028583d }; // Central Repository UID +const TUint32 KAppBits = 0xFF000000; // App mask bits +const TUint32 KFieldBits = 0x00FF0000; // Field mask bits +const TUint32 KUidKey = 0x00FFFFFF; // UID mask bits + +// Field id values for short caption, caption, icon count, icon file name +// of an application. +enum TFieldId + { + EOverrideFieldShortCaption, + EOverrideFieldCaption, + EOverrideFieldNumIcons, + EOverrideFieldIconFileName + }; + +/** +Stores the Central Repository configuration details into a Hash table. +Two Hash tables defined to store integer and string type data separately. +*/ +NONSHARABLE_CLASS(CApaIconCaptionOverrideStore) : public CBase + { +public: + CApaIconCaptionOverrideStore(); + ~CApaIconCaptionOverrideStore(); + + const TDesC* String(TUint32 aKey) const; + void SetStringL(TUint32 aKey, const TDesC& aString); + const TInt* Int(TUint32 aKey) const; + void SetIntL(TUint32 aKey, TInt aInt); + +private: + typedef RHashMap RIntMap; + RIntMap iIntMap; + typedef RHashMap RStringMap; + RStringMap iStringMap; + }; + + + +// Constructor +CApaIconCaptionOverrideStore::CApaIconCaptionOverrideStore() + { + } + +// Destructor +CApaIconCaptionOverrideStore::~CApaIconCaptionOverrideStore() + { + RStringMap::TIter pString(iStringMap); + for (HBufC* const* str = pString.NextValue(); + str; + str = pString.NextValue()) + delete *str; + iStringMap.Close(); + iIntMap.Close(); + } + +/** +Looks up a specified key in the associative array and returns a pointer to the corresponding value. + +@param aKey The key object of type integer to look up. +@return A pointer to the corresponding string value. +*/ +const TDesC* CApaIconCaptionOverrideStore::String(TUint32 aKey) const + { + HBufC* const * pStr = iStringMap.Find(aKey); + if (pStr) + return *pStr; + else + return NULL; + } + +/** +Inserts the key-value pair into the array (string Hash table). + +@param aKey The key object of type integer to add to the array. +@param aString The value object of type string to associate with aKey. +*/ +void CApaIconCaptionOverrideStore::SetStringL(TUint32 aKey, const TDesC& aString) + { + HBufC* newStr = aString.AllocL(); + HBufC* const * pStr = iStringMap.Find(aKey); + CleanupStack::PushL(newStr); + if (pStr) + { + delete *pStr; + } + iStringMap.InsertL(aKey, newStr); + CleanupStack::Pop(newStr); + } + +/** +Looks up a specified key in the associative array and returns a pointer to the corresponding value. + +@param aKey The key object of type integer to look up +@return A pointer to the corresponding integer value. +*/ +const TInt* CApaIconCaptionOverrideStore::Int(TUint32 aKey) const + { + const TInt * pInt = iIntMap.Find(aKey); + return pInt; + } + +/** +Inserts the key-value pair into the array (integer Hash table) + +@param aKey The key object of type integer to add to the array. +@param aInt The value object of type integer to associate with aKey. +*/ +void CApaIconCaptionOverrideStore::SetIntL(TUint32 aKey, TInt aInt) + { + iIntMap.InsertL(aKey, aInt); + } + +/** +A utility class used to write information into a store (CApaIconCaptionOverrideStore). +*/ +NONSHARABLE_CLASS(TApaIconCaptionOverrideWriter) + { +public: + TApaIconCaptionOverrideWriter(CApaIconCaptionOverrideStore& aStore); + + void LoadFieldFromCenRepL(CRepository* aRepository, TUint32 aFullKey); + +private: + CApaIconCaptionOverrideStore& iStore; + }; + + +TApaIconCaptionOverrideWriter::TApaIconCaptionOverrideWriter(CApaIconCaptionOverrideStore& aStore) +: iStore(aStore) + { + } + +/** +Reads the Central Repository integer, string settings and inserts the key-value pair into Store. + +Each setting is enumerated by a 32-bit key. The top 8 bits of the key is for app identification, +the next 8 bits is for field (short caption (00), caption (01),total number of icons (02), +icon filename (03)) identification and next 16 bits for language identification. + +It is computed in the following way + + 00XXXXXX - App UID field + XX00XXXX - Short Caption field + XX01XXXX - Caption field + XX02XXXX - Icon count field + XX03XXXX - Icon Filename field + XXXX0000 - Language field + +First it performs a bitwise NOT operation on application mask key (KAppBits) and its value is bitwise +AND with the 32 bit key of the field. + +It performs a bitwise AND with the field mask key (KFieldBits) and does a bitwise right shift to 16 bits +to extract the field bit value from the 32 bit key. + +It reads each field's (short caption, caption, total number of icons, icon file name) value from the +Central Repository and inserts into a Store (Hash table). + +@param aRepository The object provides access to Central Repository +@param aFullKey The 32-bit field key +*/ +void TApaIconCaptionOverrideWriter::LoadFieldFromCenRepL(CRepository* aRepository, TUint32 aFullKey) + { + TUint32 key = aFullKey & ~KAppBits; + TUint32 fieldId = (key & KFieldBits) >> 16; + switch (fieldId) + { + case EOverrideFieldShortCaption: + { + TApaAppCaption shortCaption; + if (aRepository->Get(aFullKey, shortCaption) == KErrNone) + iStore.SetStringL(key, shortCaption); + break; + } + case EOverrideFieldCaption: + { + TApaAppCaption caption; + if (aRepository->Get(aFullKey, caption) == KErrNone) + iStore.SetStringL(key, caption); + break; + } + case EOverrideFieldNumIcons: + int numIcons; + if (aRepository->Get(aFullKey, numIcons) == KErrNone) + iStore.SetIntL(key, numIcons); + break; + case EOverrideFieldIconFileName: + { + TFileName fileName; + if (aRepository->Get(aFullKey, fileName) == KErrNone) + iStore.SetStringL(key, fileName); + break; + } + default: + break; + } + } + +// Constructor +TApaIconCaptionOverrideReader::TApaIconCaptionOverrideReader(const CApaIconCaptionOverrideStore& aStore, const RArray& aLanguageDowngradePath) +: iStore(aStore), iLanguageDowngradePath(aLanguageDowngradePath) + { + } + +/** +Gets the short caption value of the corresponding setting from store. +*/ +const TDesC* TApaIconCaptionOverrideReader::ShortCaption() const + { + return GetString(EOverrideFieldShortCaption); + } + +/** +Gets the caption value of the corresponding setting from store. +*/ +const TDesC* TApaIconCaptionOverrideReader::Caption() const + { + return GetString(EOverrideFieldCaption); + } + +/** +Checks whether the number of icons are set. +@return ETrue when the number of icons are set else returns EFalse. +*/ +TBool TApaIconCaptionOverrideReader::NumIconsSet() const + { + return GetInt(EOverrideFieldNumIcons) != NULL; + } + +/** +Gets the total number of icons of the corresponding setting from store. +*/ +TInt TApaIconCaptionOverrideReader::NumIcons() const + { + const TInt* pInt = GetInt(EOverrideFieldNumIcons); + if (pInt) + return *pInt; + else + return 0; + } + +/** +Gets the icon file name of the corresponding setting from store. +*/ +const TDesC* TApaIconCaptionOverrideReader::IconFileName() const + { + return GetString(EOverrideFieldIconFileName); + } + +/** +Reads store and retrieves the corresponding string value of the passed field Id. + +Gets the configuration information with reference to the language downgrade path, with +ELangNone as default language, in case there is no match is found. + +@param aFieldId Field Id values for short caption, caption, icon count, icon file name. +@return A pointer to the corresponding string value. +*/ +const TDesC* TApaIconCaptionOverrideReader::GetString(TUint32 aFieldId) const + { + TInt count = iLanguageDowngradePath.Count(); + for (TInt ii=0; iiConstructL(); + CleanupStack::Pop(); // self + return self; + } + +/** 2nd phase constructor that creates an object to store the Central Repository configuration +details (integer & string values) into separate Hash tables. +*/ +void CApaIconCaptionOverridesForApp::ConstructL() + { + iStore = new(ELeave) CApaIconCaptionOverrideStore; + } + +/** +Finds all the settings that exist and match the specification given by partial key (aAppKey) and +application mask key (KAppBits) from the Central Repository. + +All the 32-bit field keys have been retrieved from the Central Repository and stored into an array. +It performs a bitwise NOT operation on application mask key (KAppBits) and its value is bitwise AND +with each of the value retrieved from the array. If the new value does not match with the UID mask key, +it tries to read each field setting value and stores the information into a store (Hash tables). + +@param aRepository The object provides access to Central Repository. +@param aAppKey partial key. +*/ +void CApaIconCaptionOverridesForApp::LoadFromCenRepL(CRepository* aRepository, TUint32 aAppKey) + { + TApaIconCaptionOverrideWriter writer(*iStore); + RArray appKeys; + CleanupClosePushL(appKeys); + User::LeaveIfError(aRepository->FindL(aAppKey, KAppBits, appKeys)); + TInt count = appKeys.Count(); + for (TInt ii=0; ii& aLanguageDowngradePath) const + { + TApaIconCaptionOverrideReader reader(*iStore, aLanguageDowngradePath); + return reader; + } + +// Constructor +CApaIconCaptionOverrides::CApaIconCaptionOverrides() + { + } + +// Destructor +CApaIconCaptionOverrides::~CApaIconCaptionOverrides() + { + DeleteOverrides(); + } + +void CApaIconCaptionOverrides::LoadFromCenRepL() + { + CRepository* cenrep = CRepository::NewLC(KUidIconCaptionRepository); + LoadFromCenRepL(cenrep); + CleanupStack::PopAndDestroy(cenrep); + } + +/** +Finds all the settings that exist and match the specification given by partial and mask keys, from the +Central Repository. If the settings are found, it reads the values and stores icon, caption details +into the store. +*/ +void CApaIconCaptionOverrides::LoadFromCenRepL(CRepository* aRepository) + { + DeleteOverrides(); + + RArray appKeys; + CleanupClosePushL(appKeys); + aRepository->FindL(KUidKey, ~KAppBits, appKeys); // ignore return. if no overrides found, array will be empty + TInt count = appKeys.Count(); + for (TInt ii=0; iiGet(key, appUidVal)); + TUid appUid = { appUidVal }; + CApaIconCaptionOverridesForApp* app = CApaIconCaptionOverridesForApp::NewL(); + CleanupStack::PushL(app); + app->LoadFromCenRepL(aRepository, key); + SetOverrideForAppL(appUid, app); + CleanupStack::Pop(app); + } + CleanupStack::PopAndDestroy(&appKeys); + } + +/** +Searches Hash table that keeps a map of app UIDs to configuration information for supplied application +and returns a pointer to an object that keeps information of icon caption overrides for an application, if +any suitable entry is found; otherwise NULL. +*/ +CApaIconCaptionOverridesForApp* CApaIconCaptionOverrides::OverrideForApp(TUid aAppUid) const + { + CApaIconCaptionOverridesForApp* const * override = iMap.Find(aAppUid.iUid); + if (override) + return *override; + else + return NULL; + } + +/** +Inserts key-value pair into an array (Hash table), if found, updates it. +*/ +void CApaIconCaptionOverrides::SetOverrideForAppL(TUid aAppUid, CApaIconCaptionOverridesForApp* aOverrides) + { + //Searches the Hash table with the app UID, if it's found, it returns the corresponding entry; + CApaIconCaptionOverridesForApp* prev = OverrideForApp(aAppUid); + if (aOverrides) + { + iMap.InsertL(aAppUid.iUid, aOverrides); + } + else + { + iMap.Remove(aAppUid.iUid); + } + delete prev; // delete the found entry as InsertL() replaces it. + } + +/** +Removes all the mapping done with app UIDs in Hash table for the icon caption overrides. +*/ +void CApaIconCaptionOverrides::DeleteOverrides() + { + RAppOverrideMap::TIter pOverride(iMap); + for (CApaIconCaptionOverridesForApp* const* override = pOverride.NextValue(); + override; + override = pOverride.NextValue()) + delete *override; + iMap.Close(); + } + + +CApaIconCaptionCenrepObserver::CApaIconCaptionCenrepObserver(CApaIconCaptionOverrides& aOverrides) +: CActive(EPriorityStandard), iOverrides(aOverrides) + { + CActiveScheduler::Add(this); + } + +// Creates a Central Repository observer +CApaIconCaptionCenrepObserver* CApaIconCaptionCenrepObserver::NewL(CApaIconCaptionOverrides& aOverrides) + { + CApaIconCaptionCenrepObserver* self = new (ELeave) CApaIconCaptionCenrepObserver(aOverrides); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +// Destructor +CApaIconCaptionCenrepObserver::~CApaIconCaptionCenrepObserver() + { + Cancel(); + delete iRepository; + } + +/** 2nd phase constructor that creates a Central Repository object to access the repository with the +specified UID and starts notification. +*/ +void CApaIconCaptionCenrepObserver::ConstructL() + { + TRAP_IGNORE(iRepository = CRepository::NewL(KUidIconCaptionRepository)); + Start(); + } + +/** +Finds all the settings that exist and match the specification given by partial and mask keys, from the +Central Repository, if it exists. +*/ +void CApaIconCaptionCenrepObserver::LoadOverridesL() + { + if (iRepository) + iOverrides.LoadFromCenRepL(iRepository); + } + +/** +Requests a notification on any change in the Central Repository. Only one notification can be +received per call to NotifyRequest(). +*/ +void CApaIconCaptionCenrepObserver::Start() + { + if (iRepository) + { + iRepository->NotifyRequest(0, 0, iStatus); // notify on all key changes + SetActive(); + } + } + +/** +Handles an active object's request completion event. +*/ +void CApaIconCaptionCenrepObserver::RunL() + { + TInt err = iStatus.Int(); + Start(); + User::LeaveIfError(err); + LoadOverridesL(); + } + +/** +Cancels a notification previously requested from NotifyRequest +*/ +void CApaIconCaptionCenrepObserver::DoCancel() + { + iRepository->NotifyCancel(0, 0); + } + + +TInt CApaIconCaptionCenrepObserver::RunError(TInt /*aError*/) + { + //Return KErrNone if RunL leaves to avoid a E32User-CBase 47 panic. + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsiconcaptionoverride.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsiconcaptionoverride.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,128 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @internalComponent +*/ + + +#ifndef APSICONCAPTIONOVERRIDE_H +#define APSICONCAPTIONOVERRIDE_H + +#include +#include + +class CRepository; +class CApaIconCaptionOverrideStore; + + +/** + * Read icon and caption details for an app according to the + * language downgrade path, with ELangNone used as the default + * language if no better match found. + + @see CApaIconCaptionOverrideStore + */ +NONSHARABLE_CLASS(TApaIconCaptionOverrideReader) + { +public: + TApaIconCaptionOverrideReader(const CApaIconCaptionOverrideStore& aStore, const RArray& aLanguageDowngradePath); + + const TDesC* ShortCaption() const; + const TDesC* Caption() const; + TBool NumIconsSet() const; + TInt NumIcons() const; + const TDesC* IconFileName() const; + +private: + const TDesC* GetString(TUint32 aFieldId) const; + const TInt* GetInt(TUint32 aFieldId) const; + +private: + const CApaIconCaptionOverrideStore& iStore; + const RArray& iLanguageDowngradePath; + }; + +/** +* Stores the icon and caption overrides for an application. +*/ +NONSHARABLE_CLASS(CApaIconCaptionOverridesForApp) : public CBase + { +public: + static CApaIconCaptionOverridesForApp* NewL(); + ~CApaIconCaptionOverridesForApp(); + CApaIconCaptionOverridesForApp(); + void ConstructL(); + + void LoadFromCenRepL(CRepository* aRepository, TUint32 aAppKey); + + TApaIconCaptionOverrideReader Reader(const RArray& aLanguageDowngradePath) const; + +private: + CApaIconCaptionOverrideStore* iStore; + }; + + +/** + * Store all of the icon and caption override data indexed by app UID + */ +NONSHARABLE_CLASS(CApaIconCaptionOverrides) : public CBase + { +public: + CApaIconCaptionOverrides(); + ~CApaIconCaptionOverrides(); + + void LoadFromCenRepL(); + void LoadFromCenRepL(CRepository* aRepository); + + CApaIconCaptionOverridesForApp* OverrideForApp(TUid aAppUid) const; + void SetOverrideForAppL(TUid aAppUid, CApaIconCaptionOverridesForApp* aOverrides); // takes ownership + +private: + void DeleteOverrides(); + +private: + typedef RHashMap RAppOverrideMap; + RAppOverrideMap iMap; + }; + +/** +* Watches for changes in the Central Repositiory and update the overrides when they occur. +*/ +NONSHARABLE_CLASS(CApaIconCaptionCenrepObserver) : public CActive + { +public: + static CApaIconCaptionCenrepObserver* NewL(CApaIconCaptionOverrides& aOverrides); + CApaIconCaptionCenrepObserver(CApaIconCaptionOverrides& aOverrides); + ~CApaIconCaptionCenrepObserver(); + void ConstructL(); + void LoadOverridesL(); + +private: + void Start(); + + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + CApaIconCaptionOverrides& iOverrides; + CRepository* iRepository; // owned + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnapps.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnapps.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,733 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Non-Native application registration functionality for the AppArc server session +// +// + + +#include "apsnnapps.h" + +#include +#include +#include + +#include "APSCLSV.H" +#include "APSSERV.H" +#include "APSSTD.H" +#include "../apgrfx/apprivate.h" +#include "apsnnappupdates.h" + +/** +KNonNativeApplicationsUpdateLog +@internalComponent +*/ +_LIT(KNonNativeApplicationsUpdateLog, ":\\private\\10003a3f\\UpdatedAppsList.bin"); + +/************************************************************************************************************** + * CApsNonNativeApplicationsUpdateList + **************************************************************************************************************/ + +CApsNonNativeApplicationsUpdateList* CApsNonNativeApplicationsUpdateList::NewL(RFs& aFs) + { + CApsNonNativeApplicationsUpdateList* self = new(ELeave) CApsNonNativeApplicationsUpdateList(aFs); + return self; + } + +void CApsNonNativeApplicationsUpdateList::RecoverFromUpdateLogL(RFs& aFs, RFile& aFile) + { + CleanupClosePushL(aFile); + CApsNonNativeApplicationsUpdateList* self = new(ELeave) CApsNonNativeApplicationsUpdateList(aFs); + CleanupStack::PushL(self); + self->RecoverFromUpdateLogL(aFile); // consumes aFile + CleanupStack::PopAndDestroy(self); + CleanupStack::Pop(&aFile); + } + + +CApsNonNativeApplicationsUpdateList::CApsNonNativeApplicationsUpdateList(RFs& aFs) : + iFs(aFs) + { + } + +CApsNonNativeApplicationsUpdateList::~CApsNonNativeApplicationsUpdateList() + { + CApsNonNativeApplicationsUpdate* update = iUpdateListHead; + while(update != NULL) + { + CApsNonNativeApplicationsUpdate* next = update->Next(); + delete update; + update = next; + } + } + +void CApsNonNativeApplicationsUpdateList::RecoverFromUpdateLogL(RFile& aFile) + { + RFileReadStream readStream; + CleanupClosePushL(readStream); + RFile logFileDupe; + User::LeaveIfError(logFileDupe.Duplicate(aFile)); + readStream.Attach(logFileDupe); // Attach takes ownership of & Nulls the handle passed to it + TInt pos = 0; + InternalizeL(readStream,pos); + CleanupStack::PopAndDestroy(&readStream); + + /* Great, we've read in all our performed updates and deleted all the ones that were fully + rolled back. + The next step is to roll back the rest of the updates. We'll need to create an + update log as it was before the reboot, so that further rollbacks we successfully perform + can also be logged in it */ + + // pos should point to the end of the last compelte action recorded in the file + // remove any invalid or half-written actions by truncating to pos + User::LeaveIfError(aFile.SetSize(pos)); + RApsUpdateLog updateLog(iFs); + updateLog.Open(aFile,pos); // consumes aFile + CleanupClosePushL(updateLog); + + if(iEEndOfUpdateRequiredToFixLog) + { + updateLog.LogWriteStream().WriteInt8L(CApsNonNativeApplicationsUpdate::EEndOfUpdate); + updateLog.LogWriteStream().CommitL(); // puts us back to an alpha stopping point + } + + if(iLogReplayCurrentUpdate != NULL) + { + switch(iLogReplayCurrentUpdate->iState) + { + case CApsNonNativeApplicationsUpdate::ENew: + /* current update was never performed. Start rollback at the previous one, + which will be in EPerformed */ + iLogReplayCurrentUpdate = iLogReplayCurrentUpdate->Previous(); + ASSERT(iLogReplayCurrentUpdate == NULL || iLogReplayCurrentUpdate->iState == CApsNonNativeApplicationsUpdate::EPerformed); + break; + case CApsNonNativeApplicationsUpdate::EPerforming: + case CApsNonNativeApplicationsUpdate::EPerformed: + case CApsNonNativeApplicationsUpdate::ERollingBack: + break; + case CApsNonNativeApplicationsUpdate::ERolledBack: + User::Leave(KErrCorrupt); + break; + } + Rollback(iLogReplayCurrentUpdate, updateLog); + } + CleanupStack::PopAndDestroy(&updateLog); + } + +void CApsNonNativeApplicationsUpdateList::InternalizeL(RReadStream& aStream, TInt& aPosition) + { + TInt err = KErrNone; + while(err == KErrNone) + { + TRAP(err,InternalizeActionL(aStream,aPosition)); + if(err == KErrNone || err == KErrCorrupt || err == KErrEof) + { + // We anticipate that the last update we try to read may be incomplete or corrupt. + // if we get either of these, jsut stop reading in the list of updates. + } + else + { + // something really unexpected, e.g. KErrNoMemory + User::Leave(err); + } + } + CApsNonNativeApplicationsUpdate* update = iUpdateListHead; + while(update) + { + update->PostInternalizeL(); + update = update->Next(); + } + } + +void CApsNonNativeApplicationsUpdateList::InternalizeActionL(RReadStream& aStream, TInt& aPosition) + { + TInt pos = aPosition; + + CApsNonNativeApplicationsUpdate::TLogActionType action = + static_cast(aStream.ReadInt8L()); + CApsNonNativeApplicationsUpdate::TLogUpdateType type = + static_cast(aStream.ReadInt8L()); + TUid appUid; + appUid.iUid = aStream.ReadInt32L(); + pos += sizeof(TInt8) + sizeof(TInt8) + sizeof(TUint32); + + switch(action) + { + case CApsNonNativeApplicationsUpdate::ENewUpdate: + // for ENewUpdate, this is not a valid stopping point, + // so we don't want to change aPosition unless it completes successfully. + InternalizeNewUpdateL(aStream, pos, type, appUid); + aPosition = pos; + break; + case CApsNonNativeApplicationsUpdate::EPerformUpdate: + // for EPerformUpdate, this is a beta stopping point, and + // InternalizePerformUpdateL will only ever update aPosition to + // another stopping point, so we can give it the real aPosition. + // Since it's a beta stopping point, we need to set iEEndofUpdateRequiredToFixLog + iEEndOfUpdateRequiredToFixLog = ETrue; + aPosition = pos; + InternalizePerformUpdateL(aStream, aPosition, type, appUid); + iEEndOfUpdateRequiredToFixLog = EFalse; + break; + case CApsNonNativeApplicationsUpdate::ERollbackUpdate: + // this action has the same behaviour as EPerformUpdate + iEEndOfUpdateRequiredToFixLog = ETrue; + aPosition = pos; + InternalizeRollbackUpdateL(aStream, aPosition, type, appUid); + iEEndOfUpdateRequiredToFixLog = EFalse; + break; + default: + User::Leave(KErrCorrupt); + break; + } + } + +void CApsNonNativeApplicationsUpdateList::InternalizeNewUpdateL(RReadStream& aStream, TInt& aPosition, CApsNonNativeApplicationsUpdate::TLogUpdateType aType, TUid aUid) + { + // check that this is the first update or the previous update was performed completely + if(iLogReplayCurrentUpdate != NULL && (iLogReplayCurrentUpdate->iState != CApsNonNativeApplicationsUpdate::EPerformed || iLogReplayCurrentUpdate->Next() != NULL)) + { + User::Leave(KErrCorrupt); + } + + /* + create the update object, depending on type + */ + CApsNonNativeApplicationsUpdate* update = NULL; + switch(aType) + { + case CApsNonNativeApplicationsUpdate::ERegisterApplication: + update = CApsRegisterNonNativeApplication::NewL(iFs, aUid, TDriveName(), CApsNonNativeApplicationsUpdate::ENeedsInternalizing); + break; + case CApsNonNativeApplicationsUpdate::EDeregisterApplication: + update = CApsDeregisterNonNativeApplication::NewL(iFs, *CApaAppListServer::Self(), aUid, CApsNonNativeApplicationsUpdate::ENeedsInternalizing); + break; +#ifdef _DEBUG + case CApsNonNativeApplicationsUpdate::EFail: + update = new(ELeave) CApsAlwaysFailUpdate(iFs, CApsNonNativeApplicationsUpdate::ENeedsInternalizing); + break; + case CApsNonNativeApplicationsUpdate::EPanic: + update = new(ELeave) CApsAlwaysPanicUpdate(iFs, CApsNonNativeApplicationsUpdate::ENeedsInternalizing); + break; + case CApsNonNativeApplicationsUpdate::ERollbackPanic: + update = new(ELeave) CApsAlwaysPanicOnRollbackUpdate(iFs, CApsNonNativeApplicationsUpdate::ENeedsInternalizing); + break; +#endif + default: + User::Leave(KErrCorrupt); + break; + } + CleanupStack::PushL(update); + update->InternalizeNewUpdateL(aStream, aPosition); + CleanupStack::Pop(update); + /* alpha stopping point. + update->iState should be ENew now. + */ + Append(update); + iLogReplayCurrentUpdate = update; + } + +void CApsNonNativeApplicationsUpdateList::InternalizePerformUpdateL(RReadStream& aStream, TInt& aPosition, CApsNonNativeApplicationsUpdate::TLogUpdateType aType, TUid aUid) + { + if(iLogReplayCurrentUpdate == NULL || iLogReplayCurrentUpdate->iState != CApsNonNativeApplicationsUpdate::ENew) + { + User::Leave(KErrCorrupt); + } + if(iLogReplayCurrentUpdate->Uid() != aUid || iLogReplayCurrentUpdate->iType != aType) + { + User::Leave(KErrCorrupt); + } + /* + tell the update to read in its log + */ + iLogReplayCurrentUpdate->InternalizePerformUpdateL(aStream, aPosition); + // the function above will return iff EEndOfUpdate is reached + } + + +void CApsNonNativeApplicationsUpdateList::InternalizeRollbackUpdateL(RReadStream& aStream, TInt& aPosition, CApsNonNativeApplicationsUpdate::TLogUpdateType aType, TUid aUid) + { + if(iLogReplayCurrentUpdate == NULL) + { + User::Leave(KErrCorrupt); + } + if( iLogReplayCurrentUpdate->iState != CApsNonNativeApplicationsUpdate::EPerforming + && iLogReplayCurrentUpdate->iState != CApsNonNativeApplicationsUpdate::EPerformed + && iLogReplayCurrentUpdate->iState != CApsNonNativeApplicationsUpdate::ERollingBack) + { + User::Leave(KErrCorrupt); + } + if(iLogReplayCurrentUpdate->iType != aType || iLogReplayCurrentUpdate->Uid() != aUid) + { + User::Leave(KErrCorrupt); + } + + iLogReplayCurrentUpdate->InternalizeRollbackUpdateL(aStream, aPosition); + // the function above will return iff EEndOfUpdate is reached + + if(iLogReplayCurrentUpdate->iState == CApsNonNativeApplicationsUpdate::ERolledBack) + { + iLogReplayCurrentUpdate = iLogReplayCurrentUpdate->Previous(); + } + } + +void CApsNonNativeApplicationsUpdateList::Append(CApsNonNativeApplicationsUpdate* aUpdate) + { + if(iUpdateListHead == NULL) + { + iUpdateListHead = aUpdate; + return; + } + + CApsNonNativeApplicationsUpdate* update = iUpdateListHead; + while(update->iNext != NULL) + { + update = update->iNext; + } + update->iNext = aUpdate; + aUpdate->iPrevious = update; + } + +void CApsNonNativeApplicationsUpdateList::ExecuteL() + { + RApsUpdateLog updateLog(iFs); + updateLog.OpenL(); + CleanupClosePushL(updateLog); + CApsNonNativeApplicationsUpdate* update = iUpdateListHead; + while(update != NULL) + { + TRAPD(err,update->PerformUpdateL(updateLog)); + if(err == KErrNone) + { + update = update->Next(); + } + else + { + // call rollback on everything, including the one that failed + // since it may have to clean up half-finished stuff + Rollback(update, updateLog); + User::Leave(err); + } + } + CleanupStack::PopAndDestroy(&updateLog); + } + +void CApsNonNativeApplicationsUpdateList::Rollback(CApsNonNativeApplicationsUpdate* aStartPoint, RApsUpdateLog& aUpdateLog) + { + CApsNonNativeApplicationsUpdate* update = aStartPoint; + + while(update != NULL) + { + TRAP_IGNORE(update->RollbackUpdateL(aUpdateLog)); + update = update->Previous(); + } + } + +/** +@internalComponent +*/ +RApsUpdateLog::RApsUpdateLog(RFs& aFs) : + iFs(aFs) + { + TChar drive = RFs::GetSystemDriveChar(); + iLogFileName.Append(drive); + iLogFileName.Append(KNonNativeApplicationsUpdateLog); + } + +/** +RApsUpdateLog::OpenL + +Opens a write stream to a log file that keeps track of what updates have been performed. + +@internalComponent +*/ +void RApsUpdateLog::OpenL() + { + User::LeaveIfError(iLogWriteStream.Replace(iFs,iLogFileName,EFileShareExclusive|EFileStream|EFileWrite)); + } + +/** +RApsUpdateLog::Open + +Opens a write stream to a log file that keeps track of what updates have been performed. + +@internalComponent +*/ +void RApsUpdateLog::Open(RFile& aFile, TUint aSeekPos) + { + iLogWriteStream.Attach(aFile, aSeekPos); + } + +/** +RApsUpdateLog::Close + +Cleans up the list of new Registration files created during this set of updates +and deletes the log files created. + +@internalComponent +*/ +void RApsUpdateLog::Close() + { + _LIT(KLitPathForTemporaryFiles, "\\private\\10003a3f\\temp\\"); + const TInt count = iDrivesAffected.Count(); + CFileMan* fileman = NULL; + TRAPD(err, fileman = CFileMan::NewL(iFs)); + if (err == KErrNone) + { + for(TInt i = 0; i < count; ++i) + { + TFileName dir(*(iDrivesAffected[i])); + dir.Append(KLitPathForTemporaryNonNativeResourceAndIconFiles); + fileman->RmDir(dir); // recursive + iFs.RmDir(KLitPathForTemporaryFiles); // non-recursive + } + delete fileman; + } + + iFilesRegistered.ResetAndDestroy(); + iDrivesAffected.ResetAndDestroy(); + iLogWriteStream.Close(); + iFs.Delete(iLogFileName); + } + + +/** +CApsNonNativeApplicationsUpdateList::RApsUpdateLog holds a list of registration files that have +been written during this transaction. This list is used by the Deregistration +command as the forced-updates list. + +This stops them from being incorrectly hidden from the scan performed to find +the registration file to delete. + +@internalComponent +*/ +RPointerArray& RApsUpdateLog::NewRegistrationFiles() + { + return iFilesRegistered; + } + + +/** +CApsNonNativeApplicationsUpdateList::RApsUpdateLog holds a list of drives that have been used +in the transaction. This is then used to clean up the temporary file directories + +@internalComponent +*/ +RPointerArray& RApsUpdateLog::DrivesAffected() + { + return iDrivesAffected; + } + +/** +Returns the stream that updates should write their recovery log data to +@internalComponent +*/ +RWriteStream& RApsUpdateLog::LogWriteStream() + { + return iLogWriteStream; + } + +/************************************************************************************************************** + * CApsNonNativeApplicationsManager + **************************************************************************************************************/ + +void CApsNonNativeApplicationsManager::NotifyScanComplete() + { + //See if the session is intrested in scan complete notification. + if (!iNotifyOnScanCompleteMsg.IsNull()) + { + iNotifyOnScanCompleteMsg.Complete(KErrNone); + } + } //lint !e1762 Suppress member function could be made const + + +CApsNonNativeApplicationsManager* CApsNonNativeApplicationsManager::NewL(CApaAppListServer& aServ, RFs& aFs) + { + CApsNonNativeApplicationsManager* self = new(ELeave)CApsNonNativeApplicationsManager(aServ, aFs); + return self; + } + +CApsNonNativeApplicationsManager::~CApsNonNativeApplicationsManager() + { + delete iUpdateList; + } + +CApsNonNativeApplicationsManager::CApsNonNativeApplicationsManager(CApaAppListServer& aServ, RFs& aFs) : + iServ(aServ), + iFs(aFs) + { + } + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void CApsNonNativeApplicationsManager::PrepareNonNativeApplicationsUpdatesL() + { + if (iServ.AppList().AppScanInProgress()) + { + iServ.AppList().StopScan(ETrue); //Stop updating applist now, we anyways have to update it when we are commiting these changes + } + if (iNonNativeApplicationsUpdateAppsLock) + { + User::Leave(KErrInUse); + } + + ASSERT(iUpdateList == NULL); + + iUpdateList = CApsNonNativeApplicationsUpdateList::NewL(iFs); + iNonNativeApplicationsUpdateAppsLock = ETrue; + } + + +void CApsNonNativeApplicationsManager::CheckForUpdateAppsLockL() + { + if (!iNonNativeApplicationsUpdateAppsLock) + { + // PrepareNonNativeApplicationsUpdatesL hasn't been called successfully + User::Leave(KErrNotReady); + } + } + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + void CApsNonNativeApplicationsManager::RegisterNonNativeApplicationL(const RMessage2& aMessage) + { + CheckForUpdateAppsLockL(); + CleanupStack::PushL(TCleanupItem(&StaticAbortNonNativeApplicationsUpdates,this)); + DoRegisterNonNativeApplicationL(aMessage); + CleanupStack::Pop(this); + } + + +void CApsNonNativeApplicationsManager::DoRegisterNonNativeApplicationL(const RMessage2& aMessage) + { + // an RBuf for creating the file names in. + // create it here so it's below ipcParameter0 on the cleanup stack + RBuf target; + CleanupClosePushL(target); + + // read in the resource file from aMessage + RBuf8 ipcParameter0(HBufC8::NewL(aMessage.GetDesLengthL(0))); + CleanupClosePushL(ipcParameter0); + aMessage.ReadL(0, ipcParameter0); + if (ipcParameter0.Length()<=sizeof(SNonNativeApplicationInfo)+sizeof(TCheckedUid)) + { + User::Leave(KErrArgument); + } + + // get drivename + const SNonNativeApplicationInfo nonNativeApplicationInfo = *reinterpret_cast(ipcParameter0.Ptr()); + TDriveName driveName = TDriveUnit(nonNativeApplicationInfo.iDrive).Name(); + + // get uid + const TUid applicationUid(TCheckedUid(ipcParameter0.Mid(sizeof(SNonNativeApplicationInfo), sizeof(TCheckedUid))).UidType()[2]); + if (applicationUid==TUid::Null()) + { + User::Leave(KErrArgument); + } + + // construct resource file name + target.CreateL(driveName, KMaxFileName); + target.Append(KLitPathForNonNativeResourceAndIconFiles); + const TInt startOfFileName=target.Length(); // take note of this so we can chop off the file name later + target.AppendFormat(KLitFormatForRegistrationResourceFile, applicationUid.iUid); + + // prepare registrationResourceFileDataPrefix + const TUidType uidPrefix(TUid::Uid(KUidPrefixedNonNativeRegistrationResourceFile), nonNativeApplicationInfo.iApplicationType, applicationUid); + const TBufC8 registrationResourceFileDataPrefix(TCheckedUid(uidPrefix).Des()); + + // create the object that will actually perform the update + CApsRegisterNonNativeApplication* updateObject = CApsRegisterNonNativeApplication::NewL(iFs, applicationUid, driveName); + CleanupStack::PushL(updateObject); + + // write resource file to temp location + updateObject->SetResourceFileTargetLocation(target); + updateObject->WriteResourceFileL(ipcParameter0.Mid(sizeof(SNonNativeApplicationInfo)), ®istrationResourceFileDataPrefix); + + if (aMessage.Int1()!=0) // if there is a localisable resource-file + { + RBuf8 ipcParameter1(HBufC8::NewL(User::LeaveIfError(aMessage.GetDesLength(1)))); + CleanupClosePushL(ipcParameter1); + aMessage.ReadL(1, ipcParameter1); + + // construct localisable resoure file name + target.SetLength(startOfFileName); + target.AppendFormat(KLitFormatForLocalisableResourceFile, applicationUid.iUid); + + updateObject->SetLocalisableResourceFileTargetLocation(target); + // write localisable resource file to temp location + updateObject->WriteLocalisableResourceFileL(ipcParameter1, NULL); + CleanupStack::PopAndDestroy(&ipcParameter1); + + if (aMessage.Int2()!=0) // if there is an icon-file + { + RFile iconFile; + CleanupClosePushL(iconFile); + User::LeaveIfError(iconFile.AdoptFromClient(aMessage, 2, 3)); + RBuf iconFileName; + CleanupClosePushL(iconFileName); + iconFileName.CreateL(KMaxFileName); + User::LeaveIfError(iconFile.Name(iconFileName)); + + if (startOfFileName+iconFileName.Length()>KMaxFileName) + { + User::Leave(KErrArgument); + } + target.SetLength(startOfFileName); + target.Append(iconFileName); + updateObject->SetIconFileTargetLocation(target); + updateObject->CopyIconFileL(iconFile); + + CleanupStack::PopAndDestroy(2, &iconFile); // iconFileName, iconFile + } + } + + CleanupStack::Pop(updateObject); + iUpdateList->Append(updateObject); + + CleanupStack::PopAndDestroy(2, &target); // ipcParameter0, target + } + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void CApsNonNativeApplicationsManager::DeregisterNonNativeApplicationL(const RMessage2& aMessage) + { + CheckForUpdateAppsLockL(); + CleanupStack::PushL(TCleanupItem(&StaticAbortNonNativeApplicationsUpdates,this)); + const TUid applicationUid(TUid::Uid(aMessage.Int0())); + iUpdateList->Append(CApsDeregisterNonNativeApplication::NewL(iFs, iServ, applicationUid)); + CleanupStack::Pop(this); + } + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef _DEBUG +void CApsNonNativeApplicationsManager::ForceFailInNonNativeApplicationsUpdatesL() + { + CheckForUpdateAppsLockL(); + CleanupStack::PushL(TCleanupItem(&StaticAbortNonNativeApplicationsUpdates,this)); + iUpdateList->Append(new(ELeave) CApsAlwaysFailUpdate(iFs)); + CleanupStack::Pop(this); + } + +void CApsNonNativeApplicationsManager::ForcePanicInNonNativeApplicationsUpdatesL() + { + CheckForUpdateAppsLockL(); + CleanupStack::PushL(TCleanupItem(&StaticAbortNonNativeApplicationsUpdates,this)); + iUpdateList->Append(new(ELeave) CApsAlwaysPanicUpdate(iFs)); + CleanupStack::Pop(this); + } + +void CApsNonNativeApplicationsManager::ForcePanicInNonNativeApplicationsRollbackL() + { + CheckForUpdateAppsLockL(); + CleanupStack::PushL(TCleanupItem(&StaticAbortNonNativeApplicationsUpdates,this)); + iUpdateList->Append(new(ELeave) CApsAlwaysPanicOnRollbackUpdate(iFs)); + CleanupStack::Pop(this); + } + +#endif // _DEBUG + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void CApsNonNativeApplicationsManager::CommitNonNativeApplicationsUpdatesL(const RMessage2& aMessage) + { + CheckForUpdateAppsLockL(); + + TRAPD(err,iUpdateList->ExecuteL()); + + // Failure or success, we can't be hanging on to the lock after this function completes + delete iUpdateList; + iUpdateList = NULL; + iNonNativeApplicationsUpdateAppsLock = EFalse; + + if (KErrNone != err) + { + if(iServ.AppList().AppListUpdatePending()) + { + // Trigger a rescan + iServ.UpdateApps(); + } + User::Leave(err); // bail out at this point if things didn't go to plan + } + + if(aMessage.Int0()==(TInt) ETrue) + //The request is completed without waiting till completion application list preparation. + aMessage.Complete(KErrNone); + else + //The request is not completed till completion application list preparation. + iNotifyOnScanCompleteMsg=aMessage; + + // Trigger a rescan + iServ.UpdateApps(); + } + +/** +This function has the word "Rollback" in it because it used to actually roll back the +updates that had been preformed but whose effects were hidden from the public APIs until commit. + +The real updates no longer happen until commit-time, so there's no real rolling back to be done here. +The real rolling back is done automatically by iUpdateList, during the commit call, if neccessary. +*/ +void CApsNonNativeApplicationsManager::RollbackNonNativeApplicationsUpdates() + { + AbortNonNativeApplicationsUpdates(); + } + +void CApsNonNativeApplicationsManager::AbortNonNativeApplicationsUpdates() + { + if (!iNonNativeApplicationsUpdateAppsLock) + { + // It is always ok to call this function but if we haven't called PrepareNonNativeApplicationsUpdatesL() + // there isn't anything to do + return; + } + if(iServ.AppList().AppListUpdatePending()) + { + // Trigger a rescan + iServ.UpdateApps(); + } + delete iUpdateList; + iUpdateList = NULL; + iNonNativeApplicationsUpdateAppsLock = EFalse; + } + +void CApsNonNativeApplicationsManager::StaticAbortNonNativeApplicationsUpdates(TAny* aSelf) + { + static_cast(aSelf)->AbortNonNativeApplicationsUpdates(); + } + +void CApsNonNativeApplicationsManager::RecoverFromUpdateLogL(RFs& aFs) + { + TChar drive = RFs::GetSystemDriveChar(); + TFileName logPath; + logPath.Append(drive); + logPath.Append(KNonNativeApplicationsUpdateLog); + RFile logFile; + TInt err = logFile.Open(aFs,logPath,EFileShareExclusive|EFileStream|EFileWrite); + if(err == KErrNotFound || err == KErrPathNotFound) + { + // no log file, nothing to do. + return; + } + User::LeaveIfError(err); + // this function takes over ownership of logFile + TRAP(err,CApsNonNativeApplicationsUpdateList::RecoverFromUpdateLogL(aFs, logFile)); + if(err != KErrNone) + { + // there's nothing we can do, just delete it and move on + aFs.Delete(logPath); + } + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnapps.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnapps.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,218 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef APSNNAPPS_H +#define APSNNAPPS_H + +#include +#include +#include + +#include "apsnnappupdates.h" + +// classes referenced +class CApaAppListServer; +class CApsNonNativeApplicationsUpdateList; + +_LIT(KLitPathForTemporaryNonNativeResourceAndIconFiles, "\\private\\10003a3f\\temp\\NonNativeUpdates\\"); + +/** +@internalComponent +*/ +NONSHARABLE_CLASS(CApsNonNativeApplicationsManager) : public CBase + { +public: + static CApsNonNativeApplicationsManager* NewL(CApaAppListServer& aServ, RFs& aFs); + ~CApsNonNativeApplicationsManager(); + +private: + CApsNonNativeApplicationsManager(CApaAppListServer& aServ, RFs& aFs); + +public: + void NotifyScanComplete(); + void PrepareNonNativeApplicationsUpdatesL(); + void RegisterNonNativeApplicationL(const RMessage2& aMessage); + void DeregisterNonNativeApplicationL(const RMessage2& aMessage); +#ifdef _DEBUG + void ForceFailInNonNativeApplicationsUpdatesL(); + void ForcePanicInNonNativeApplicationsUpdatesL(); + void ForcePanicInNonNativeApplicationsRollbackL(); +#endif + void CommitNonNativeApplicationsUpdatesL(const RMessage2& aMessage); + void RollbackNonNativeApplicationsUpdates(); + static void RecoverFromUpdateLogL(RFs& aFs); + +private: + void DoRegisterNonNativeApplicationL(const RMessage2& aMessage); + void AbortNonNativeApplicationsUpdates(); + static void StaticAbortNonNativeApplicationsUpdates(TAny* aSelf); + void CheckForUpdateAppsLockL(); + +private: + CApaAppListServer& iServ; + RFs& iFs; + RMessage2 iNotifyOnScanCompleteMsg; + TBool iNonNativeApplicationsUpdateAppsLock; + CApsNonNativeApplicationsUpdateList* iUpdateList; + }; + +class RApsUpdateLog; + +/** +This class holds a list of updates to the non-native apps registry that should +be performed as one transaction, along with code to execute / rollback the updates. + + + +Update list structure: + +These are the possible valid types of list: +(* means "can occur 0 or more times", ? means "can occur 0 or 1 times") + +EPerformed*, EPerforming?, ENew* +EPerformed*, ERollingBack?, ERolledBack*, ENew* + +The list can be destructed in any of these states: + +EPerformed*, ERolledBack*, ENew* + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsNonNativeApplicationsUpdateList) : public CBase + { +public: + static CApsNonNativeApplicationsUpdateList* NewL(RFs& aFs); + static void RecoverFromUpdateLogL(RFs& aFs, RFile& aFile); + ~CApsNonNativeApplicationsUpdateList(); + +private: + CApsNonNativeApplicationsUpdateList(RFs& aFs); + void RecoverFromUpdateLogL(RFile& aFile); + +public: + void Append(CApsNonNativeApplicationsUpdate* aUpdate); + void ExecuteL(); + +private: + void Rollback(CApsNonNativeApplicationsUpdate* aStartPoint, RApsUpdateLog& aUpdateLog); + void SetLogWriteStream(RWriteStream* aStream); + void InternalizeL(RReadStream& aStream, TInt& aPosition); + void InternalizeActionL(RReadStream& aStream, int& aPosition); + void InternalizeNewUpdateL(RReadStream& aStream, TInt& aPosition, CApsNonNativeApplicationsUpdate::TLogUpdateType aType, TUid aUid); + void InternalizePerformUpdateL(RReadStream& aStream, TInt& aPosition, CApsNonNativeApplicationsUpdate::TLogUpdateType aType, TUid aUid); + void InternalizeRollbackUpdateL(RReadStream& aStream, TInt& aPosition, CApsNonNativeApplicationsUpdate::TLogUpdateType aType, TUid aUid); + +private: + RFs& iFs; + CApsNonNativeApplicationsUpdate* iUpdateListHead; + CApsNonNativeApplicationsUpdate* iLogReplayCurrentUpdate; + TBool iEEndOfUpdateRequiredToFixLog; // for recovering from the log. This is ETrue if we've reached a beta stopping point. + }; + + +/* +This class opens & owns the recovery log file + +Recovery log structure: + +As updates are performed, they are written to a log. The log's format on disk is documented here. + +When we read the log in, there are certain points that are considered to be "valid stopping points" +These points are at the end of every useful section of data. When we keep track of the stream-position +during internalization, we make sure that the position we record is always at one of these points, never +between them. +This means that we can then truncate the log to the last of these points and then append new operations to the +log. +There are two types of stopping points, i've called them alpha and beta. At an alpha stopping point we +can start appending new operations to the log immediately. At a beta stopping point, we must append a +EEndOfUpdate marker first. + + +These points are denoted in the structure below with "--- stopping point ---" + +LogStructure = +{ + (NewUpdateSection, + PerformUpdateSection)* + RollbackUpdateSection* +} + +NewUpdateSection = +{ + Int8 ENewUpdate + Int8 TLogUpdateType + Int32 TUid + ... dependent on update type ... + --- alpha stopping point --- +} + +PerformUpdateSection = +{ + Int8 EPerformUpdate + Int8 TLogUpdateType + Int32 TUid + --- beta stopping point --- + (UpdateContinuationSection | UpdateStateChangeSection)* + Int8 EEndOfUpdate + --- alpha stopping point --- +} + +RollbackUpdateSection = +{ + Int8 ERollbackUpdate + Int8 TLogUpdateType + Int32 TUid + --- beta stopping point --- + (UpdateContinuationSection | UpdateStateChangeSection)* + Int8 EEndOfUpdate + --- alpha stopping point --- +} + +UpdateContinuationSection = +{ + Int8 EUpdateContinuation + ... dependent on update type ... + --- beta stopping point --- +} + +UpdateStateChangeSection = +{ + Int8 EChangeOfUpdateState + Int8 TState + --- beta stopping point --- +} + +@internalComponent +*/ +NONSHARABLE_CLASS(RApsUpdateLog) + { +public: + RApsUpdateLog(RFs& aFs); + void OpenL(); + void Open(RFile& aFile, TUint aSeekPos); + void Close(); + RPointerArray& NewRegistrationFiles(); + RPointerArray& DrivesAffected(); + RWriteStream& LogWriteStream(); +private: + RFs& iFs; + // RPointerArray neccessary for use with CApaAppRegFinder + RPointerArray iFilesRegistered; + RPointerArray iDrivesAffected; + RFileWriteStream iLogWriteStream; + TFileName iLogFileName; + }; + +#endif // APSNNAPPS_H diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnappupdates.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnappupdates.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1276 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Non-Native application registration functionality for the AppArc server session +// +// + + +#include "apsnnappupdates.h" + +#include +#include +#include + +#include "APAID.H" +#include "APGAPLST.H" +#include "APSSERV.H" +#include "APSSTD.H" +#include "../apfile/aprfndr.h" +#include "../apgrfx/apprivate.h" +#include "apsnnapps.h" + + +/************************************************************************************************************** + * TFilePositionReset + **************************************************************************************************************/ + +/** +This class is used to ensure that a RFile's read/write position is reset to its original value +if a leave occurs. + +@internalComponent +*/ +NONSHARABLE_CLASS(TFilePositionReset) + { +public: + TFilePositionReset(RFile& aFile) : + iFile(aFile), + iOriginalFilePosition(-1) + { + } + + void RewindToStartLC() + { + TInt originalFilePosition=0; + User::LeaveIfError(iFile.Seek(ESeekCurrent, originalFilePosition)); // retrieves the current file-position + TInt newFilePosition=0; + User::LeaveIfError(iFile.Seek(ESeekStart, newFilePosition)); // RFile::Seek(ESeekStart,..) will not modify the TInt, but needs a reference. + iOriginalFilePosition=originalFilePosition; + CleanupStack::PushL(TCleanupItem(&StaticReset, this)); + } + + TInt Reset() + { + __ASSERT_DEBUG(iOriginalFilePosition>=0, Panic(ENonNativeAppsNegativeStoredFilePosition)); + const TInt error = iFile.Seek(ESeekStart, iOriginalFilePosition); + iOriginalFilePosition=-1; + return error; + } + +private: + static void StaticReset(TAny* aThis) + { + // ignore the error code from this, we can't do anything about it + static_cast(aThis)->Reset(); + } + +private: + RFile& iFile; + TInt iOriginalFilePosition; + }; + + +/************************************************************************************************************** + * TFileDetails + **************************************************************************************************************/ + +TFileDetails::TFileDetails() : + iState(EStateNull) + { + } + +/* +Returns the real path, (aka the target location) of this file +*/ +const TDesC& TFileDetails::Path() + { + __ASSERT_DEBUG(iPath != KNullDesC, Panic(ENonNativeAppsTFileDetailsPathNotSet)); + return iPath; + } + + +/* +Sets the real path, (aka the target location) of this file +*/ +void TFileDetails::SetPath(const TDesC& aPath) + { + __ASSERT_DEBUG(iPath == KNullDesC, Panic(ENonNativeAppsTFileDetailsPathAlreadySet)); + iPath = aPath; + } + + +/* +Determines whether this TFileDetails has a real path set. +If thie object doesn't have a real path set, it is assumed to not be in use +*/ +TBool TFileDetails::Exists() const + { + return (iPath != KNullDesC); + } + + +/* +Releases whatever file handle is currently held, whether it is on the real file, +temporary file, or none at all +*/ +void TFileDetails::CloseHandle() + { + iHandle.Close(); + } + + +/* +Opens a handle on a real file +*/ +void TFileDetails::OpenL(RFs& aFs, const TFileName& aFileName) + { + __ASSERT_DEBUG(iState == EStateNull, Panic(ENonNativeAppsTFileDetailsOpenInBadState)); + __ASSERT_DEBUG(iPath == KNullDesC, Panic(ENonNativeAppsTFileDetailsOpenWithRealPathSet)); + __ASSERT_DEBUG(iTempPath == KNullDesC, Panic(ENonNativeAppsTFileDetailsOpenWithTempPathSet)); + + User::LeaveIfError(iHandle.Open(aFs, aFileName, EFileShareExclusive|EFileStream|EFileWrite)); + iPath = aFileName; + iState = EStateReal; + } + +/* +Creates a new, temporary file to write new data into +Used in the preparation of a register-application update to create new resource +and icon files before they are moved into their target locations. +*/ +void TFileDetails::CreateTemporaryL(RFs& aFs, const TFileName& aDir) + { + __ASSERT_DEBUG(iState == EStateNull, Panic(ENonNativeAppsTFileDetailsCreateTempInBadState)); + __ASSERT_DEBUG(iTempPath == KNullDesC, Panic(ENonNativeAppsTFileDetailsCreateTempWithTempPathSet)); + RFile file; + CleanupClosePushL(file); + // TODO: remove this hack if/when RFile::Temp is fixed by base + TInt tempErr = KErrAlreadyExists; + /* RFile::Temp is a bit dodgy, at least on Winscw with the proxy FS */ + for(TInt tries = 0; tempErr == KErrAlreadyExists && tries < 50; ++tries) + { + tempErr = file.Temp(aFs, aDir, iTempPath, EFileShareExclusive|EFileStream|EFileWrite); + } + User::LeaveIfError(tempErr); + CleanupStack::Pop(&file); + iHandle = file; + iState = EStateTemporary; + } + +/* +Makes aFile a duplicates of the file handle owned by this class. +Used to write to a file created by CreateTemporaryL() +*/ +void TFileDetails::GetDuplicateHandleL(RFile& aFile) + { + User::LeaveIfError(aFile.Duplicate(iHandle)); + } + + +/* +RenameToRealL + +Used to perform a register-appliction update +This uses the same code as the non-leaving +RenameToReal(). +*/ +void TFileDetails::RenameToRealL(RFs& aFs) + { + User::LeaveIfError(RenameToReal(aFs)); + } + +/* +RenameToReal + +Used by RenameToRealL() and RestoreReal() +@see RenameToRealL +@see RestoreReal +*/ +TInt TFileDetails::RenameToReal(RFs& aFs) + { + __ASSERT_DEBUG(iState == EStateTemporary, Panic(ENonNativeAppsTFileDetailsRenameToRealInBadState)); + __ASSERT_DEBUG(iTempPath != KNullDesC, Panic(ENonNativeAppsTFileDetailsRenameToRealWithoutTempPath)); + __ASSERT_DEBUG(iPath != KNullDesC, Panic(ENonNativeAppsTFileDetailsRenameToRealWithoutRealPath)); + TParse parse; + parse.SetNoWild(iPath,NULL,NULL); + if(!BaflUtils::FolderExists(aFs,parse.DriveAndPath())) + { + TInt err = aFs.MkDirAll(parse.DriveAndPath()); + if(err != KErrNone) + { + return err; + } + } + //Check if file already exists, if it exists delete it because we might be trying to register an upgrade + if(BaflUtils::FileExists(aFs, iPath)) + { + TInt err = BaflUtils::DeleteFile(aFs, iPath); + if(KErrNone != err) + { + return err; + } + } + TInt err = iHandle.Rename(iPath); + if(err != KErrNone) + { + return err; + } + iTempPath.Zero(); + iState = EStateReal; + return KErrNone; + } + +/* +RenameToTemporaryL + +Used to perform a deregister-application update +*/ +void TFileDetails::RenameToTemporaryL(RFs& aFs, const TFileName& aDir) + { + __ASSERT_DEBUG(iState == EStateReal, Panic(ENonNativeAppsTFileDetailsRenameToTempInBadState)); + __ASSERT_DEBUG(iPath != KNullDesC, Panic(ENonNativeAppsTFileDetailsRenameToTempWithoutRealPathSet)); + __ASSERT_DEBUG(iTempPath == KNullDesC, Panic(ENonNativeAppsTFileDetailsRenameToTempWithTempPathSet)); + /* create a temp file and delete it to get an unused filename */ + RFile file; + CleanupClosePushL(file); + // TODO: remove this hack if/when RFile::Temp is fixed by base + TInt tempErr = KErrAlreadyExists; + /* RFile::Temp is a bit dodgy, at least on Winscw with the proxy FS */ + for(TInt tries = 0; tempErr == KErrAlreadyExists && tries < 50; ++tries) + { + tempErr = file.Temp(aFs, aDir, iTempPath, EFileShareExclusive|EFileStream|EFileWrite); + } + User::LeaveIfError(tempErr); + CleanupStack::PopAndDestroy(&file); // close the file handle + const TInt err = aFs.Delete(iTempPath); + if(err != KErrNone && err != KErrNotFound) + { + User::Leave(err); + } + + User::LeaveIfError(iHandle.Rename(iTempPath)); + iState = EStateTemporary; + } + + +/* +Delete + +Whatever the state, real or temporary, delete it. +Used in the rollback phase of a register-application update. + +This function releases the handle (if any) and sets the state back to EStateNull +*/ +TInt TFileDetails::Delete(RFs& aFs) + { + __ASSERT_DEBUG(iState == EStateNull || iState == EStateReal || iState == EStateTemporary, + Panic(ENonNativeAppsTFileDetailsDeleteInBadState)); + if(iState == EStateNull) + { + return KErrNone; + } + + iHandle.Close(); + TInt err; + if(iState == EStateReal) + { + err = aFs.Delete(iPath); + } + else if(iState == EStateTemporary) + { + err = aFs.Delete(iTempPath); + } + else + { + err = KErrGeneral; + ASSERT(EFalse); + } + iPath.Zero(); + iTempPath.Zero(); + iState = EStateNull; + return err; + } + + +/* +DeleteTemporary + +Check that the state is EStateTemporary, and delete it. +This function is used by the destructor of a deregister-application update + +This function releases the handle (if any) and sets the state back to EStateNull +*/ +TInt TFileDetails::DeleteTemporary(RFs& aFs) + { + __ASSERT_DEBUG(iState == EStateNull || iState == EStateTemporary, + Panic(ENonNativeAppsTFileDetailsDeleteTemporaryInBadState)); + if(iState == EStateNull || iState == EStateTemporary) + { + return Delete(aFs); + } + return KErrGeneral; + } + + +/* +RestoreReal + +Whatever the state, real or temporary, try to move it back to the real location. +Used in the rollback phase of a deregister-application update. + +This function releases the handle (if any) and sets the state back to EStateNull +*/ +TInt TFileDetails::RestoreReal(RFs& aFs) + { + __ASSERT_DEBUG(iState == EStateNull || iState == EStateReal || iState == EStateTemporary, + Panic(ENonNativeAppsTFileDetailsRestoreRealInBadState)); + if(iState == EStateNull) + { + return KErrNone; + } + + TInt err = KErrNone; + if(iState == EStateReal) + { + iHandle.Close(); + } + else if(iState == EStateTemporary) + { + err = RenameToReal(aFs); + iHandle.Close(); + } + else + { + ASSERT(EFalse); + } + iPath.Zero(); + iTempPath.Zero(); + iState = EStateNull; + return err; + } + + +void TFileDetails::ExternalizeL(RWriteStream& aStream) + { + aStream.WriteUint8L(iState); + aStream.WriteUint32L(iPath.Length()); + aStream.WriteL(iPath); + aStream.WriteUint32L(iTempPath.Length()); + aStream.WriteL(iTempPath); + } + +void TFileDetails::ExternalizeContinuationL(RWriteStream& aStream, TInt aTag) + { + aStream.WriteInt8L(CApsNonNativeApplicationsUpdate::EContinuationOfUpdate); + aStream.WriteInt8L(aTag); + ExternalizeL(aStream); + aStream.CommitL(); // beta stopping point + } + +TInt TFileDetails::ExternalizeContinuation(RWriteStream& aStream, TInt aTag) + { + TRAPD(err,ExternalizeContinuationL(aStream,aTag)); + return err; + } + +void TFileDetails::InternalizeL(RReadStream& aStream, TInt& aPosition) + { + TState state = static_cast(aStream.ReadUint8L()); + TUint pathLen = aStream.ReadUint32L(); + if(pathLen > KMaxFileName) + { + User::Leave(KErrCorrupt); + } + TFileName path; + aStream.ReadL(path, pathLen); + TUint tempPathLen = aStream.ReadUint32L(); + if(tempPathLen > KMaxFileName) + { + User::Leave(KErrCorrupt); + } + TFileName tempPath; + aStream.ReadL(tempPath, tempPathLen); + + /* all dangerous operations are now out of the way */ + iState = state; + iPath = path; + iTempPath = tempPath; + // state, length, path, length, temppath + aPosition += sizeof(TUint8) + sizeof(TUint32) + (pathLen * sizeof(TText)) + sizeof(TUint32) + (tempPathLen * sizeof(TText)); + } + +/* +Works out what file we had a handle on when the log was written, and try to regain it. +*/ +void TFileDetails::PostInternalizeL(RFs& aFs) + { + TInt err; + switch(iState) + { + case EStateNull: + if(iTempPath != KNullDesC) + { + User::Leave(KErrCorrupt); + } + break; + case EStateTemporary: + if(iTempPath == KNullDesC) + { + User::Leave(KErrCorrupt); + } + err = iHandle.Open(aFs, iTempPath, EFileShareExclusive|EFileStream|EFileWrite); + if(err == KErrNotFound || err == KErrPathNotFound) + { + iTempPath.Zero(); + iPath.Zero(); + iState = EStateNull; + } + else + { + User::LeaveIfError(err); + } + break; + case EStateReal: + if(iPath == KNullDesC) + { + User::Leave(KErrCorrupt); + } + err = iHandle.Open(aFs, iPath, EFileShareExclusive|EFileStream|EFileWrite); + if(err == KErrNotFound || err == KErrPathNotFound) + { + iTempPath.Zero(); + iPath.Zero(); + iState = EStateNull; + } + else + { + User::LeaveIfError(err); + } + break; + default: + User::Leave(KErrCorrupt); + break; + } + } + +/************************************************************************************************************** + * CApsNonNativeApplicationsUpdate + **************************************************************************************************************/ + +CApsNonNativeApplicationsUpdate::CApsNonNativeApplicationsUpdate(RFs& aFs, TUid aUid, TState aState, TLogUpdateType aType) : + iState(aState), + iFs(aFs), + iType(aType), + iUid(aUid) + { + } + +CApsNonNativeApplicationsUpdate::~CApsNonNativeApplicationsUpdate() + { + } + +CApsNonNativeApplicationsUpdate* CApsNonNativeApplicationsUpdate::Previous() const + { + return iPrevious; + } + +CApsNonNativeApplicationsUpdate* CApsNonNativeApplicationsUpdate::Next() const + { + return iNext; + } + +TUid CApsNonNativeApplicationsUpdate::Uid() + { + return iUid; + } + +void CApsNonNativeApplicationsUpdate::PerformUpdateL(RApsUpdateLog& aUpdateLog) + { + ASSERT(iState == ENew); + RWriteStream& stream = aUpdateLog.LogWriteStream(); + + /* NewUpdateSection */ + stream.WriteInt8L(ENewUpdate); + stream.WriteInt8L(iType); + stream.WriteInt32L(iUid.iUid); + ExternalizeL(stream); + stream.CommitL(); // alpha stopping point + + /* PerformUpdateSection */ + stream.WriteInt8L(EPerformUpdate); + stream.WriteInt8L(iType); + stream.WriteInt32L(iUid.iUid); // beta stopping points + StateChangeL(EPerforming, stream); // ... + DoPerformUpdateL(aUpdateLog); // ... + StateChangeL(EPerformed, stream); // ... + stream.WriteInt8L(EEndOfUpdate); + stream.CommitL(); // alpha stopping point + } + +void CApsNonNativeApplicationsUpdate::RollbackUpdateL(RApsUpdateLog& aUpdateLog) + { + ASSERT(iState == EPerforming || iState == EPerformed || iState == ERollingBack); + RWriteStream& stream = aUpdateLog.LogWriteStream(); + stream.WriteInt8L(ERollbackUpdate); + stream.WriteInt8L(iType); + stream.WriteInt32L(iUid.iUid); + stream.CommitL(); // beta stopping point + // even if we're already in ERollingBack because we crashed and are reattempting it, + // it's harmless to write a duplicate statechange to the log + StateChangeL(ERollingBack, stream); // beta stopping points + DoRollbackUpdate(aUpdateLog); // ... + StateChangeL(ERolledBack, stream); // ... + stream.WriteInt8L(EEndOfUpdate); + stream.CommitL(); // alpha stopping point + } + +TFileName CApsNonNativeApplicationsUpdate::TemporaryFilePathL(TDriveName& aDrive) + { + TFileName dir(aDrive); + + // this is safe since KMaxFileName >= (KMaxDriveName + length(KLitPathForTemporaryNonNativeResourceAndIconFiles)) + dir.Append(KLitPathForTemporaryNonNativeResourceAndIconFiles); + + if(!BaflUtils::FolderExists(iFs,dir)) + { + User::LeaveIfError(iFs.MkDirAll(dir)); + } + return dir; + } + +void CApsNonNativeApplicationsUpdate::StateChangeL(TState aState, RWriteStream& aStream) + { + iState = aState; + aStream.WriteInt8L(EChangeOfUpdateState); + aStream.WriteInt8L(iState); + aStream.CommitL(); // beta stopping point + } + +void CApsNonNativeApplicationsUpdate::InternalizeStateChangeL(RReadStream& aStream, TInt& aPosition) + { + TState state = static_cast(aStream.ReadInt8L()); + ++aPosition; + iState = state; + } + +void CApsNonNativeApplicationsUpdate::InternalizeNewUpdateL(RReadStream& aStream, TInt& aPosition) + { + __ASSERT_DEBUG(iState == ENeedsInternalizing, Panic(ENonNativeAppsNonNativeApplicationsUpdateInternalizeNewUpdateInBadState)); + /* + internalize all member variables to how they were before any updates were performed. + */ + InternalizeL(aStream, aPosition); + + iState = ENew; /* the update is now OK to add to the list */ + } + +void CApsNonNativeApplicationsUpdate::InternalizePerformUpdateL(RReadStream& aStream, TInt& aPosition) + { + /* + internalize any state changes and update-specific continuations, until EEndOfUpdate + */ + SharedInternalizeLoopL(aStream, aPosition); + } + +void CApsNonNativeApplicationsUpdate::InternalizeRollbackUpdateL(RReadStream& aStream, TInt& aPosition) + { + /* + internalize any state changes and update-specific continuations, until EEndOfUpdate + */ + SharedInternalizeLoopL(aStream, aPosition); + } + +void CApsNonNativeApplicationsUpdate::SharedInternalizeLoopL(RReadStream& aStream, TInt& aPosition) + { + while (ETrue) + { + TInt pos = aPosition; + TLogActionType action = static_cast(aStream.ReadInt8L()); + pos += sizeof(TInt8); + /* we are at a beta stopping point at the start of each loop iteration, + so don't update aPosition until we have reached the end of the loop. + give the funcitons a copy to stop them updating aPosition direclty and + then leaving */ + switch(action) + { + case EChangeOfUpdateState: + InternalizeStateChangeL(aStream, pos); + break; + case EContinuationOfUpdate: + InternalizeUpdateContinuationL(aStream, pos); + break; + case EEndOfUpdate: + aPosition = pos; + return; + default: + User::Leave(KErrCorrupt); + break; + } + aPosition = pos; + } + } + +/* + Default implemenation of a virtual function. does nothing. + + In this method, subclasses should write out all important, subclass-specific data. + It will be called before DoPerformUpdateL. + */ +void CApsNonNativeApplicationsUpdate::ExternalizeL(RWriteStream& /*aStream*/) + { + } + +/* + Default implemenation of a virtual function. does nothing. + + In this method, subclasses read in any subclass-specific data that was written out + by ExternalizeL(). + */ +void CApsNonNativeApplicationsUpdate::InternalizeL(RReadStream& /*aStream*/, TInt& /*aPosition*/) + { + } + +/* + Default implemenation of a virtual function. does nothing. + + In this method, subclasses should handle any EContinuationOfUpdate messages that + they might have written to the log during DoPerformUpdateL or DoRollbackUpdate + */ +void CApsNonNativeApplicationsUpdate::InternalizeUpdateContinuationL(RReadStream& /*aStream*/, TInt& /*aPosition*/) + { + } + +/* + Default implemenation of a virtual function. does nothing. + + In this method, subclasses should do any internal initialization that is dependent on + data that may be changed by InternalizeUpdateContinuationL(). + + InternalizeUpdateContinuationL() may be called many times over and its implementation + may change the same member variable many times. + This function will only be called once, and it will be called after the entire log has + been read and InternalizeUpdateContinuationL() has been called for the last time. + */ +void CApsNonNativeApplicationsUpdate::PostInternalizeL() + { + } + +/************************************************************************************************************** + * CApsRegisterNonNativeApplication + **************************************************************************************************************/ + +CApsRegisterNonNativeApplication* CApsRegisterNonNativeApplication::NewL(RFs& aFs, TUid aUid, const TDriveName& aDrive, TState aState) + { + return new(ELeave) CApsRegisterNonNativeApplication(aFs, aUid, aDrive, aState); + } + +CApsRegisterNonNativeApplication::CApsRegisterNonNativeApplication(RFs& aFs, TUid aUid, const TDriveName& aDrive, TState aState) : + CApsNonNativeApplicationsUpdate(aFs, aUid, aState, ERegisterApplication), + iDrive(aDrive) + { + } + +void CApsRegisterNonNativeApplication::SetResourceFileTargetLocation(const TDesC& aLocation) + { + iResourceFile.SetPath(aLocation); + } + +void CApsRegisterNonNativeApplication::SetLocalisableResourceFileTargetLocation(const TDesC& aLocation) + { + iLocalisableResourceFile.SetPath(aLocation); + } + +void CApsRegisterNonNativeApplication::SetIconFileTargetLocation(const TDesC& aLocation) + { + iIconFile.SetPath(aLocation); + } + +void CApsRegisterNonNativeApplication::WriteResourceFileL(const TDesC8& aData, const TDesC8* aDataPrefix) + { + WriteResourceFileL(iResourceFile, aData, aDataPrefix); + } + +void CApsRegisterNonNativeApplication::WriteLocalisableResourceFileL(const TDesC8& aData, const TDesC8* aDataPrefix) + { + WriteResourceFileL(iLocalisableResourceFile, aData, aDataPrefix); + } + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** +Create a new file in a designated temporary-files directory +*/ +void CApsRegisterNonNativeApplication::NewTemporaryFileL(TFileDetails& aFile) + { + TFileName path(TemporaryFilePathL(iDrive)); + aFile.CreateTemporaryL(iFs,path); + } + +/** +Writes a resource file to a new temporary file + */ +void CApsRegisterNonNativeApplication::WriteResourceFileL(TFileDetails& aFile, const TDesC8& aData, const TDesC8* aDataPrefix) + { + // create temp file, put stuff on the cleanup stack + NewTemporaryFileL(aFile); + RFileWriteStream targetStream; + CleanupClosePushL(targetStream); + + // the stream takes ownership of the file handle and closes it, so make a copy + RFile targetFile; + aFile.GetDuplicateHandleL(targetFile); + targetStream.Attach(targetFile); // will take ownership of the handle and set targetFile to a Null handle + + if (aDataPrefix!=NULL) + { + targetStream.WriteL(*aDataPrefix); + } + targetStream.WriteL(aData); + targetStream.CommitL(); + + CleanupStack::PopAndDestroy(&targetStream); + } + +/** +This function will copy the file provided to a new temporary file. +Upon success or failure, the read/write position of aSourceFile should remain unchanged. + */ +void CApsRegisterNonNativeApplication::CopyIconFileL(RFile& aSourceFile) + { + NewTemporaryFileL(iIconFile); + + // RFile*Stream::Attach will take ownership of the handle we give it, but we want to hold + // on to the handles we have. To achieve this, we give Attach a copy of the file handle, + // for both streams. + RFileWriteStream targetStream; + CleanupClosePushL(targetStream); + RFile targetFile; + iIconFile.GetDuplicateHandleL(targetFile); + targetStream.Attach(targetFile); + + // rewind to start, but restore original position if a leave occurs + TFilePositionReset filePositionReset(aSourceFile); + filePositionReset.RewindToStartLC(); + + RFileReadStream sourceStream; + CleanupClosePushL(sourceStream); + RFile sourceFile; + User::LeaveIfError(sourceFile.Duplicate(aSourceFile)); + sourceStream.Attach(sourceFile); + + targetStream.WriteL(sourceStream); + targetStream.CommitL(); + CleanupStack::PopAndDestroy(&sourceStream); + + // perform these seperately so we can leave if Reset fails + CleanupStack::Pop(&filePositionReset); + User::LeaveIfError(filePositionReset.Reset()); + + CleanupStack::PopAndDestroy(&targetStream); + } + +void CApsRegisterNonNativeApplication::DoPerformUpdateL(RApsUpdateLog& aUpdateLog) + { + HBufC* hDrive = iDrive.AllocL(); + TInt err = aUpdateLog.DrivesAffected().InsertInOrder(hDrive, TLinearOrder(CApaAppList::CompareStrings)); + if(err != KErrNone) + { + delete hDrive; + } + + if ((err != KErrNone) && + (err != KErrAlreadyExists)) // We silently ignore attempts to insert duplicates + { + User::Leave(err); + } + + RWriteStream& stream = aUpdateLog.LogWriteStream(); + + iResourceFile.RenameToRealL(iFs); + + /* make a note of what's changed */ + iResourceFile.ExternalizeContinuationL(stream, EResourceFileUpdate); + + if(iLocalisableResourceFile.Exists()) + { + iLocalisableResourceFile.RenameToRealL(iFs); + iResourceFile.ExternalizeContinuationL(stream, ELocalisableResourceFileUpdate); + } + + if(iIconFile.Exists()) + { + iIconFile.RenameToRealL(iFs); + iResourceFile.ExternalizeContinuationL(stream, EIconFileUpdate); + } + + HBufC* hPath = iResourceFile.Path().AllocL(); + err = aUpdateLog.NewRegistrationFiles().InsertInOrder(hPath, TLinearOrder(CApaAppList::CompareStrings)); + if(err != KErrNone) + { + delete hPath; + } + + if ((err != KErrNone) && + (err != KErrAlreadyExists)) // We silently ignore attempts to insert duplicates + { + User::Leave(err); + } + } + +void CApsRegisterNonNativeApplication::DoRollbackUpdate(RApsUpdateLog& aUpdateLog) + { + RWriteStream& stream = aUpdateLog.LogWriteStream(); + + /* TFileDetails::Delete() is safe to call whatever state the object is in. + + if it was never opened, it'll do nothing, otherwise it'll delete whichever + file (real/temp) it has a handle on. + + ignore the return codes since we can't do anything about it if they fail */ + iResourceFile.Delete(iFs); + iResourceFile.ExternalizeContinuation(stream, EResourceFileUpdate); + + iLocalisableResourceFile.Delete(iFs); + iResourceFile.ExternalizeContinuation(stream, ELocalisableResourceFileUpdate); + + iIconFile.Delete(iFs); + iResourceFile.ExternalizeContinuation(stream, EIconFileUpdate); + } + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +void CApsRegisterNonNativeApplication::ExternalizeL(RWriteStream& aStream) + { + /* write our initial state to the log stream */ + aStream.WriteUint32L(iDrive.Length()); + aStream.WriteL(iDrive); + iResourceFile.ExternalizeL(aStream); + iLocalisableResourceFile.ExternalizeL(aStream); + iIconFile.ExternalizeL(aStream); + } + +void CApsRegisterNonNativeApplication::InternalizeL(RReadStream& aStream, TInt& aPosition) + { + // we can update aPosition whenever we like in this function since we're protected + // from it being left at a bad value by the copy taken by CApsNonNativeApplicationsUpdateList::InternalizeActionL + TUint driveLen = aStream.ReadUint32L(); + aPosition += sizeof(TUint32); + if(driveLen > KMaxDriveName) + { + User::Leave(KErrCorrupt); + } + iDrive.Zero(); + aStream.ReadL(iDrive, driveLen); + aPosition += driveLen * sizeof(TText); + + iResourceFile.InternalizeL(aStream, aPosition); + iLocalisableResourceFile.InternalizeL(aStream, aPosition); + iIconFile.InternalizeL(aStream, aPosition); + } + +void CApsRegisterNonNativeApplication::InternalizeUpdateContinuationL(RReadStream& aStream, TInt& aPosition) + { + // we can update aPosition whenever we like in this function since we're protected + // from it being left at a bad value by the copy taken by CApsNonNativeApplicationsUpdate::SharedInternalizeLoopL + + TLogContinuationType type = static_cast(aStream.ReadInt8L()); + aPosition += sizeof(TInt8); + + switch(type) + { + case EResourceFileUpdate: + iResourceFile.InternalizeL(aStream, aPosition); + break; + case ELocalisableResourceFileUpdate: + iLocalisableResourceFile.InternalizeL(aStream, aPosition); + break; + case EIconFileUpdate: + iIconFile.InternalizeL(aStream, aPosition); + break; + default: + User::Leave(KErrCorrupt); + break; + } + } + +void CApsRegisterNonNativeApplication::PostInternalizeL() + { + iResourceFile.PostInternalizeL(iFs); + iLocalisableResourceFile.PostInternalizeL(iFs); + iIconFile.PostInternalizeL(iFs); + } + +CApsRegisterNonNativeApplication::~CApsRegisterNonNativeApplication() + { + /* + if we performed the update successfully, just close the handles and leave + the reg files in place. + + in all other cases, just delete everything that still exists + */ + if(iState == EPerformed) + { + iResourceFile.CloseHandle(); + iLocalisableResourceFile.CloseHandle(); + iIconFile.CloseHandle(); + } + else + { + iResourceFile.Delete(iFs); + iLocalisableResourceFile.Delete(iFs); + iIconFile.Delete(iFs); + } + } + + +/************************************************************************************************************** + * CApsDeregisterNonNativeApplication + **************************************************************************************************************/ + +CApsDeregisterNonNativeApplication* CApsDeregisterNonNativeApplication::NewL(RFs& aFs, CApaAppListServer& aServ, TUid aUid, TState aState) + { + return new(ELeave)CApsDeregisterNonNativeApplication(aFs, aServ, aUid, aState); + } + +CApsDeregisterNonNativeApplication::CApsDeregisterNonNativeApplication(RFs& aFs, CApaAppListServer& aServ, TUid aUid, TState aState) : + CApsNonNativeApplicationsUpdate(aFs, aUid, aState, EDeregisterApplication), + iServ(aServ) + { + } + +////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +CApaAppData* CApsDeregisterNonNativeApplication::FindAppDataLC(RApsUpdateLog& aUpdateLog) + { + /* search back through the list for a an update concerning the same Uid */ + CApsNonNativeApplicationsUpdate* prev = Previous(); + while(prev != NULL) + { + if(prev->Uid() == Uid()) + break; + prev = prev->Previous(); + } + + /* if none found, use apparc's app list as a shortcut */ + CApaAppData* appData = NULL; + if(prev == NULL) + { + appData = iServ.AppList().AppDataByUid(Uid()); + + if(appData != NULL) + { + // create a new AppData so we can put it on the cleanup stack. + // if the NewL fails for whatever reson, fall back to the search code below + + // this is a bit tricky because we need to create the appdata from a + // TApaAppEntry for the reg file, but using appData->AppEntry() will give us + // one for the dll. + TApaAppEntry entry; + entry.iFullName = appData->RegistrationFileName(); + TEntry fsEntry; + + User::LeaveIfError(iFs.Entry(entry.iFullName,fsEntry)); + entry.iUidType = fsEntry.iType; + + appData = NULL; + #ifdef SYMBIAN_APPARC_APPINFO_CACHE + TRAP_IGNORE(appData = CApaAppData::NewL(entry,iFs)); + #else + { + // find the default icons (.mbm file) for applications, wrt current locale + TFileName* tempFileName = NULL; + tempFileName->Append(KDefaultAppIconMbm); + BaflUtils::NearestLanguageFile(iFs, *tempFileName); + HBufC* defaultAppIcon = tempFileName->AllocL(); + TRAP_IGNORE(appData = CApaAppData::NewL(entry,iFs,*defaultAppIcon)); + } + #endif //SYMBIAN_APPARC_APPINFO_CACHE + if(appData != NULL) + { + CleanupStack::PushL(appData); + return appData; + } + } + } + + /* + * If the appData wasn't found or we can't trust the app list because of previous updates, + * attempt to find and load the appData manually + */ + CApaAppRegFinder* regFinder = CApaAppRegFinder::NewLC(iFs); + TBool found = EFalse; + TApaAppEntry appEntry; + + regFinder->FindAllAppsL(); + RPointerArray& forcedRegs = aUpdateLog.NewRegistrationFiles(); + + while(regFinder->NextL(appEntry,forcedRegs)) + { + if (appEntry.iUidType[2] == Uid()) + { + found = ETrue; + break; + } + } + CleanupStack::PopAndDestroy(regFinder); + + if(found) + { + #ifdef SYMBIAN_APPARC_APPINFO_CACHE + appData = CApaAppData::NewL(appEntry, iFs); + #else + { + // find the default icons (.mbm file) for applications, wrt current locale + TFileName* tempFileName = NULL; + tempFileName->Append(KDefaultAppIconMbm); + BaflUtils::NearestLanguageFile(iFs, *tempFileName); + HBufC* defaultAppIcon = tempFileName->AllocL(); + appData = CApaAppData::NewL(appEntry, iFs,*defaultAppIcon); + } + #endif //SYMBIAN_APPARC_APPINFO_CACHE + CleanupStack::PushL(appData); + return appData; + } + + CleanupStack::PushL(static_cast(NULL)); + return NULL; + } + +void CApsDeregisterNonNativeApplication::RenameToTemporaryL(TFileDetails& aFile, RApsUpdateLog& aUpdateLog) + { + /* get the drive */ + TParse parse; + parse.SetNoWild(aFile.Path(), NULL, NULL); + if(!parse.DrivePresent()) + { + // should really never happen + User::Leave(KErrPathNotFound); + } + TDriveName drive(parse.Drive()); + + HBufC* hDrive = drive.AllocL(); + TInt err = aUpdateLog.DrivesAffected().InsertInOrder(hDrive, TLinearOrder(CApaAppList::CompareStrings)); + if(err != KErrNone) + { + delete hDrive; + } + + TFileName path(TemporaryFilePathL(drive)); + + aFile.RenameToTemporaryL(iFs,path); + } + +void CApsDeregisterNonNativeApplication::DoPerformUpdateL(RApsUpdateLog& aUpdateLog) + { + CApaAppData* appData = FindAppDataLC(aUpdateLog); + if(appData == NULL) + { + /* + * App not found. + * Behavioural backwards compatibility says we shouldn't raise an error here, + * instead just let it go and carry on. + */ + CleanupStack::Pop(appData); + return; + } + + /* + for each of the 3 files, open a handle on the real file if it exists + the first one (iResourceFile) is mandatory + */ + TRAPD(err,iResourceFile.OpenL(iFs, appData->RegistrationFileName())); + if(err != KErrNone && err != KErrNotFound) + { + User::Leave(err); + } + + if(appData->LocalisableResourceFileName() != KNullDesC) + { + TRAP(err,iLocalisableResourceFile.OpenL(iFs, appData->LocalisableResourceFileName())); + if(err != KErrNone && err != KErrNotFound) + { + User::Leave(err); + } + } + + if(appData->IconFileName() != KNullDesC) + { + TRAP(err,iIconFile.OpenL(iFs, appData->IconFileName())); + if(err != KErrNone && err != KErrNotFound) + { + User::Leave(err); + } + } + + CleanupStack::PopAndDestroy(appData); + + /* + perform the actual updates + */ + RWriteStream& stream = aUpdateLog.LogWriteStream(); + + if(iIconFile.Exists()) + { + RenameToTemporaryL(iIconFile, aUpdateLog); + iIconFile.ExternalizeContinuationL(stream, EIconFileUpdate); + } + + if(iLocalisableResourceFile.Exists()) + { + RenameToTemporaryL(iLocalisableResourceFile, aUpdateLog); + iLocalisableResourceFile.ExternalizeContinuationL(stream, ELocalisableResourceFileUpdate); + } + + RenameToTemporaryL(iResourceFile, aUpdateLog); + iResourceFile.ExternalizeContinuationL(stream, EResourceFileUpdate); + } + +void CApsDeregisterNonNativeApplication::DoRollbackUpdate(RApsUpdateLog& aUpdateLog) + { + RWriteStream& stream = aUpdateLog.LogWriteStream(); + + iResourceFile.RestoreReal(iFs); + iResourceFile.ExternalizeContinuation(stream, EResourceFileUpdate); + + iLocalisableResourceFile.RestoreReal(iFs); + iLocalisableResourceFile.ExternalizeContinuation(stream, ELocalisableResourceFileUpdate); + + iIconFile.RestoreReal(iFs); + iIconFile.ExternalizeContinuation(stream, EIconFileUpdate); + } + +void CApsDeregisterNonNativeApplication::ExternalizeL(RWriteStream& aStream) + { + iResourceFile.ExternalizeL(aStream); + iLocalisableResourceFile.ExternalizeL(aStream); + iIconFile.ExternalizeL(aStream); + } + +void CApsDeregisterNonNativeApplication::InternalizeL(RReadStream& aStream, TInt& aPosition) + { + // we can update aPosition whenever we like in this function since we're protected + // from it being left at a bad value by the copy taken by CApsNonNativeApplicationsUpdateList::InternalizeActionL + iResourceFile.InternalizeL(aStream, aPosition); + iLocalisableResourceFile.InternalizeL(aStream, aPosition); + iIconFile.InternalizeL(aStream, aPosition); + } + +void CApsDeregisterNonNativeApplication::InternalizeUpdateContinuationL(RReadStream& aStream, TInt& aPosition) + { + // we can update aPosition whenever we like in this function since we're protected + // from it being left at a bad value by the copy taken by CApsNonNativeApplicationsUpdate::SharedInternalizeLoopL + + TLogContinuationType type = static_cast(aStream.ReadInt8L()); + aPosition += sizeof(TInt8); + + switch(type) + { + case EResourceFileUpdate: + iResourceFile.InternalizeL(aStream, aPosition); + break; + case ELocalisableResourceFileUpdate: + iLocalisableResourceFile.InternalizeL(aStream, aPosition); + break; + case EIconFileUpdate: + iIconFile.InternalizeL(aStream, aPosition); + break; + default: + User::Leave(KErrCorrupt); + break; + } + } + +void CApsDeregisterNonNativeApplication::PostInternalizeL() + { + iResourceFile.PostInternalizeL(iFs); + iLocalisableResourceFile.PostInternalizeL(iFs); + iIconFile.PostInternalizeL(iFs); + } + +CApsDeregisterNonNativeApplication::~CApsDeregisterNonNativeApplication() + { + /* + if we performed the update successfully, we need to delete the temporary + + in all other cases, just delete everything that still exists + */ + if(iState == EPerformed) + { + // in this state we know that Perform has completed successfully. + iResourceFile.DeleteTemporary(iFs); + iLocalisableResourceFile.DeleteTemporary(iFs); + iIconFile.DeleteTemporary(iFs); + } + else + { + // Hopefully these are now (back) in their target locations. + // if they're not, there's nothing we can do now, so abandon them either way + iResourceFile.CloseHandle(); + iLocalisableResourceFile.CloseHandle(); + iIconFile.CloseHandle(); + } + } + +#ifdef _DEBUG +/************************************************************************************************************** + * CApsAlwaysFailUpdate + **************************************************************************************************************/ + +CApsAlwaysFailUpdate::CApsAlwaysFailUpdate(RFs& aFs, TState aState) : + CApsNonNativeApplicationsUpdate(aFs,TUid::Uid(0xDEADBEEF),aState,EFail) + { + } + +void CApsAlwaysFailUpdate::DoPerformUpdateL(RApsUpdateLog& /*aUpdateLog*/) + { + User::Leave(KErrGeneral); + } + +/************************************************************************************************************** + * CApsAlwaysPanicUpdate + **************************************************************************************************************/ + +CApsAlwaysPanicUpdate::CApsAlwaysPanicUpdate(RFs& aFs, TState aState) : + CApsNonNativeApplicationsUpdate(aFs,TUid::Uid(0xCAFEBABE),aState,EPanic) + { + } + +void CApsAlwaysPanicUpdate::DoPerformUpdateL(RApsUpdateLog& /*aUpdateLog*/) + { + TBool jit = User::JustInTime(); + User::SetJustInTime(EFalse); + Panic(ENonNativeAppsTestHandlingPanicDuringUpdate); + User::SetJustInTime(jit); + } + +/************************************************************************************************************** + * CApsAlwaysPanicOnRollbackUpdate + **************************************************************************************************************/ + +CApsAlwaysPanicOnRollbackUpdate::CApsAlwaysPanicOnRollbackUpdate(RFs& aFs, TState aState) : + CApsNonNativeApplicationsUpdate(aFs,TUid::Uid(0x1337D00D),aState,ERollbackPanic) + { + } + +void CApsAlwaysPanicOnRollbackUpdate::DoRollbackUpdate(RApsUpdateLog& /*aUpdateLog*/) + { + TBool jit = User::JustInTime(); + User::SetJustInTime(EFalse); + Panic(ENonNativeAppsTestHandlingPanicDuringRollback); + User::SetJustInTime(jit); + } + +#endif // _DEBUG diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnappupdates.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apserv/apsnnappupdates.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,346 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef APSNNAPPUPDATES_H +#define APSNNAPPUPDATES_H + +#include +#include + + + +// classes referenced +class CApaAppData; +class CApaAppListServer; +class RApsUpdateLog; +class RWriteStream; + +/** +This class keeps track of a resource file or icon file, +whether it is in its final location or a temporary directory. + +The NonNativeApps updates system makes heavy use of moving files +between temporary and final locations, in an attempt to provide +atomicity of update lists. + +@internalComponent +*/ +NONSHARABLE_CLASS(TFileDetails) + { +public: + TFileDetails(); + const TDesC& Path(); + void SetPath(const TDesC& aPath); + TBool Exists() const; + void CloseHandle(); + + void OpenL(RFs& aFs, const TFileName& aFileName); + void CreateTemporaryL(RFs& aFs, const TFileName& aDir); + void GetDuplicateHandleL(RFile& aFile); + + void RenameToRealL(RFs& aFs); + void RenameToTemporaryL(RFs& aFs, const TFileName& aDir); + TInt Delete(RFs& aFs); + TInt DeleteTemporary(RFs& aFs); + TInt RestoreReal(RFs& aFs); + + void ExternalizeL(RWriteStream& aStream); + void ExternalizeContinuationL(RWriteStream& aStream, TInt aTag); + TInt ExternalizeContinuation(RWriteStream& aStream, TInt aTag); + void InternalizeL(RReadStream& aStream, TInt& aPosition); + void PostInternalizeL(RFs& aFs); + +private: + TInt RenameToReal(RFs& aFs); + +private: + enum TState + { + EStateInvalid = 0, + EStateNull, + EStateTemporary, + EStateReal + }; + TState iState; + TFileName iPath; + TFileName iTempPath; + RFile iHandle; + }; + +/** +Abstract base class for objects that represent updates to the non-native applications +registry. Subclasses must implement the DoPerformUpdateL and DoRollbackUpdate methods. + +- DoPerformUpdateL will only ever be called once or not at all +- DoPerformUpdateL will be called first, if at all +- DoRollbackUpdate will not be called before DoPerformUpdateL +- DoRollbackUpdate will be called if DoPerformUpdateL fails on this update or any subsequent one +- DoRollbackUpdate will not be called twice +- The object may be deleted at any time. + +If the device is turned off / crashes partway through performing updates, +the following will be called upon reboot: + +- The subclass' NewL, with dummy values instead of class-specific data (if any) +- InternalizePerformLogL() will be called immediately afterwards +- InternalizeRollbackLogL() iff a rollback action for this update is in the log +- PostInternalizeL() will be called after the log has been read in entirely +- DoRollbackUpdaetL() may then be called if, after replaying the log, the class' state is + EPerforming, EPerformed or ERollingBack + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsNonNativeApplicationsUpdate) : public CBase + { +public: // Types + enum TState + { + ENew, + ENeedsInternalizing, + EPerforming, + EPerformed, + ERollingBack, + ERolledBack + }; + + enum TLogActionType + { + EInvalidAction = 0, + ENewUpdate, // Indicates the record of an update's initial state + EPerformUpdate, // Indicates the start of a Perform-update log + ERollbackUpdate, // Indicates the start of a Rollback-update log + EContinuationOfUpdate, // Specifies that the current update's log has not finished + EChangeOfUpdateState, // Similar to EContinuationOfUpdate, but used by this superclass + EEndOfUpdate // Specifies that the current update's log has finished + }; + + enum TLogUpdateType + { + EInvalidUpdate = 0, + ERegisterApplication, // Indicates the start of a RegisterApplication update + EDeregisterApplication, // Indicates the start of a DeregisterApplication update +#ifdef _DEBUG + EFail, // Indicates the start of a Forced-Fail update + EPanic, // Indicates the start of a Forced-Panic update + ERollbackPanic // Indicates the start of a Forced-Panic-On-Rollback update +#endif + }; + +public: + ~CApsNonNativeApplicationsUpdate(); + +protected: + CApsNonNativeApplicationsUpdate(RFs& aFs, TUid aUid, TState aState, TLogUpdateType aType); + +public: + CApsNonNativeApplicationsUpdate* Previous() const; + CApsNonNativeApplicationsUpdate* Next() const; + TUid Uid(); + void PerformUpdateL(RApsUpdateLog& aUpdateLog); + void RollbackUpdateL(RApsUpdateLog& aUpdateLog); + void InternalizeStateChangeL(RReadStream& aStream, TInt& aPosition); + + void InternalizeNewUpdateL(RReadStream& aStream, TInt& aPosition); + void InternalizePerformUpdateL(RReadStream& aStream, TInt& aPosition); + void InternalizeRollbackUpdateL(RReadStream& aStream, TInt& aPosition); + +protected: + TFileName TemporaryFilePathL(TDriveName& aDrive); + void StateChangeL(TState aState, RWriteStream& aStream); + +private: + void SharedInternalizeLoopL(RReadStream& aStream, TInt& aPosition); + + virtual void DoPerformUpdateL(RApsUpdateLog& aUpdateLog) = 0; + virtual void DoRollbackUpdate(RApsUpdateLog& aUpdateLog) = 0; + + virtual void ExternalizeL(RWriteStream& aStream); + virtual void InternalizeL(RReadStream& aStream, TInt& aPosition); + virtual void InternalizeUpdateContinuationL(RReadStream& aStream, TInt& aPosition); + virtual void PostInternalizeL(); + + +protected: + TState iState; + RFs& iFs; + +private: + friend class CApsNonNativeApplicationsUpdateList; // so it can link up iPrevious/iNext + const TLogUpdateType iType; + CApsNonNativeApplicationsUpdate* iPrevious; + CApsNonNativeApplicationsUpdate* iNext; + const TUid iUid; + }; + +/** +Implementation of CApsNonNativeApplicationsUpdate that performs the registration of a +non-native application. + +The Write/Copy methods of this class should be used to prepare the update, +they will write resource and icon files to a temporary directory. + +When this update is executed, the files will be moved to the locations set with the +Set*FileTargetLocation functions. + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsRegisterNonNativeApplication) : public CApsNonNativeApplicationsUpdate + { +public: + static CApsRegisterNonNativeApplication* NewL(RFs& aFs, TUid aUid, const TDriveName& aDrive, TState aState = ENew); + ~CApsRegisterNonNativeApplication(); + +private: + CApsRegisterNonNativeApplication(RFs& aFs, TUid aUid, const TDriveName& aDrive, TState aState); + +public: + void SetResourceFileTargetLocation(const TDesC& aLocation); + void WriteResourceFileL(const TDesC8& aData, const TDesC8* aDataPrefix); + + void SetLocalisableResourceFileTargetLocation(const TDesC& aLocation); + void WriteLocalisableResourceFileL( const TDesC8& aData, const TDesC8* aDataPrefix); + + void SetIconFileTargetLocation(const TDesC& aLocation); + void CopyIconFileL(RFile& aSourceFile); + +private: + void NewTemporaryFileL(TFileDetails& aFile); + void WriteResourceFileL(TFileDetails& aFile, const TDesC8& aData, const TDesC8* aDataPrefix); + + // from CApsNonNativeApplicationsUpdate + void DoPerformUpdateL(RApsUpdateLog& aUpdateLog); + void DoRollbackUpdate(RApsUpdateLog& aUpdateLog); + void ExternalizeL(RWriteStream& aStream); + void InternalizeL(RReadStream& aStream, TInt& aPosition); + void InternalizeUpdateContinuationL(RReadStream& aStream, TInt& aPosition); + void PostInternalizeL(); + + +private: + enum TLogContinuationType + { + EInvalidContinuation = 0, + EResourceFileUpdate, + ELocalisableResourceFileUpdate, + EIconFileUpdate + }; + TDriveName iDrive; + TFileDetails iResourceFile; + TFileDetails iLocalisableResourceFile; + TFileDetails iIconFile; + }; + +/** +Implementation of CApsNonNativeApplicationsUpdate that performs the deregistration of a +non-native application. + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsDeregisterNonNativeApplication) : public CApsNonNativeApplicationsUpdate + { +public: + static CApsDeregisterNonNativeApplication* NewL(RFs& aFs, CApaAppListServer& aServ, TUid aUid, TState aState = ENew); + ~CApsDeregisterNonNativeApplication(); + +private: + CApsDeregisterNonNativeApplication(RFs& aFs, CApaAppListServer& aServ, TUid aUid, TState aState); + +private: + void RenameToTemporaryL(TFileDetails& aFile, RApsUpdateLog& aUpdateLog); + CApaAppData* FindAppDataLC(RApsUpdateLog& aUpdateLog); + + // from CApsNonNativeApplicationsUpdate + void DoPerformUpdateL(RApsUpdateLog& aUpdateLog); + void DoRollbackUpdate(RApsUpdateLog& aUpdateLog); + void ExternalizeL(RWriteStream& aStream); + void InternalizeL(RReadStream& aStream, TInt& aPosition); + void InternalizeUpdateContinuationL(RReadStream& aStream, TInt& aPosition); + void PostInternalizeL(); + +private: + enum TLogContinuationType + { + EInvalidContinuation = 0, + EResourceFileUpdate, + ELocalisableResourceFileUpdate, + EIconFileUpdate + }; + CApaAppListServer& iServ; + TFileDetails iResourceFile; + TFileDetails iLocalisableResourceFile; + TFileDetails iIconFile; + }; + + +#ifdef _DEBUG +/** +CApsAlwaysFailUpdate + +A dummy CNonNativeApplicationsUpdate for testing purpouses. +Always fails with KErrGeneral when performed + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsAlwaysFailUpdate) : public CApsNonNativeApplicationsUpdate + { +public: + CApsAlwaysFailUpdate(RFs& aFs, TState aState = ENew); +private: + // from CApsNonNativeApplicationsUpdate + void DoPerformUpdateL(RApsUpdateLog& aUpdateLog); + void DoRollbackUpdate(RApsUpdateLog&) {} + }; + + +/** +CApsAlwaysPanicUpdate + +A dummy CNonNativeApplicationsUpdate for testing purpouses. +Always panics when performed + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsAlwaysPanicUpdate) : public CApsNonNativeApplicationsUpdate + { +public: + CApsAlwaysPanicUpdate(RFs& aFs, TState aState = ENew); +private: + // from CApsNonNativeApplicationsUpdate + void DoPerformUpdateL(RApsUpdateLog& aUpdateLog); + void DoRollbackUpdate(RApsUpdateLog&) {} + }; + + +/** +CApsAlwaysPanicOnRollbackUpdate + +A dummy CNonNativeApplicationsUpdate for testing purpouses. +Always panics upon rollback + +@internalComponent +*/ +NONSHARABLE_CLASS(CApsAlwaysPanicOnRollbackUpdate) : public CApsNonNativeApplicationsUpdate + { +public: + CApsAlwaysPanicOnRollbackUpdate(RFs& aFs, TState aState = ENew); +private: + // from CApsNonNativeApplicationsUpdate + void DoPerformUpdateL(RApsUpdateLog&) {} + void DoRollbackUpdate(RApsUpdateLog& aUpdateLog); + }; +#endif // _DEBUG + + +#endif // APSNNAPPUPDATES_H diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apsexe/APSEXE.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apsexe/APSEXE.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// APSEXE.MMP server launch code for AppArc server +// + +/** +@file + +@SYMPurpose apsexe.dll Apparc server stub +*/ +target apsexe.exe +targettype EXE +CAPABILITY ProtServ + +UID 0x1000008D 0x10003A3F +VENDORID 0x70000001 + +SOURCEPATH ../apsexe + +userinclude ../inc +systeminclude /epoc32/include + +source APSMAIN.CPP + +library euser.lib apserv.lib + + +// Apparc server need extra stack as it has a lot of +// filenames and parse objects on stack from time to time +epocstacksize 0x3000 diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apsexe/APSMAIN.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apsexe/APSMAIN.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,63 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The main startup of the AppArc server +// +// + +#include "APASVST.H" + + +#ifdef APA_SERVER_IN_THREAD +// The server binary is an "EPOCEXE" target type +// Thus the server parameter passing and startup code for WINS and EPOC are +// significantly different. +// +// In EKA1 WINS, the EPOCEXE target is a DLL with an entry point called WinsMain, +// taking no parameters and returning TInt. This is not really valid as a thread +// function which takes a TAny* parameter which we need. +// +// So the DLL entry-point WinsMain() is used to return a TInt representing the +// real thread function within the DLL. This is good as long as +// sizeof(TInt)>=sizeof(ApaServThreadStart). +// + +IMPORT_C TInt WinsMain(); +EXPORT_C TInt WinsMain() +// +// WINS DLL entry-point. Just return the real thread function +// cast to TInt +// + { + return reinterpret_cast(&ApaServThreadStart); + } + +GLDEF_C TInt E32Dll(TDllReason /*aReason*/) +// +// DLL entry point +// + { + return(KErrNone); + } + +#else + +TInt E32Main() +// +// EXE entry point +// + { + return ApaServThreadStart(NULL); + } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apstart/apstart.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apstart/apstart.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,200 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "apstart.h" +#include "apststd.h" + +const TInt KAppArcAppListInitialCompletionTimeout = 10000000; //10s + +CApaAppStart::CApaAppStart() + { + } + +CApaAppStart::~CApaAppStart() + { + iApaLsSession.Close(); + } + +/** +Used to create an instance of @c CApaAppStart class + +@return An instance of @c CApaAppStart +*/ +EXPORT_C CApaAppStart* CApaAppStart::NewL() + { + CApaAppStart* self = new(ELeave) CApaAppStart(); + return self; + } + +/** +Wait for apparc server to complete initial population of its app list. If list +population doesn't complete within @c KAppArcAppListInitialCompletionTimeout, +this function will leave with KErrTimedOut. + +@panic If Apsexe.exe isn't started. +@leave KErrTimedOut if apparc doesn't complete the initial list population within KAppArcAppListInitialCompletionTimeout. +@leave With system-wide error-codes for generic errors. +*/ +void CApaAppStart::WaitForApparcToInitialiseL() + { + // Make sure we have a usable session... + if (iApaLsSession.Handle()==KNullHandle) + { + const TInt err = iApaLsSession.Connect(); + if(err != KErrNone) + { + Panic(EApsexeNotRunning); + } + } + + //...and a timer + RTimer timer; + User::LeaveIfError(timer.CreateLocal()); + CleanupClosePushL(timer); + + // Request apparc to notify us when the initial list population is complete + TRequestStatus apparcStatus; + iApaLsSession.RegisterListPopulationCompleteObserver(apparcStatus); + + // Request a timeout. + TRequestStatus timerStatus; + timer.After(timerStatus, TTimeIntervalMicroSeconds32(KAppArcAppListInitialCompletionTimeout)); + + // As soon as either request completes, cancel the other + User::WaitForRequest(timerStatus, apparcStatus); + if (timerStatus == KRequestPending) + { + timer.Cancel(); + User::WaitForRequest(timerStatus); + } + else + { + // Timeout + User::LeaveIfError(iApaLsSession.CancelListPopulationCompleteObserver()); + User::WaitForRequest(apparcStatus); + User::Leave(KErrTimedOut); + } + + CleanupStack::PopAndDestroy(&timer); + } + +/** +Set up the CApaCommandLine object which will be used to start the app. +*/ +void CApaAppStart::SetupCommandLineL(CApaCommandLine& aCmdLine, + const TDesC& aFileName, + const TDesC8& aArgs, + TBool aViewLess, + TBool aStartInBackground) + { + + aCmdLine.SetExecutableNameL(aFileName); + aCmdLine.SetTailEndL(aArgs) ; + + // Define how the app will be launched + if (!aStartInBackground && !aViewLess) + { + aCmdLine.SetCommandL(EApaCommandRun); + } + else if (aStartInBackground && !aViewLess) + { + aCmdLine.SetCommandL(EApaCommandBackground); + } + else if (!aStartInBackground && aViewLess) + { + aCmdLine.SetCommandL(EApaCommandRunWithoutViews); + } + else + { + aCmdLine.SetCommandL(EApaCommandBackgroundAndWithoutViews); + } + } + +/** +Start an application as defined by the specified command line information. Feedback about +when the application is actually up and running is given via @c aRequestStatusForRendezvous. + +Rule-based launching and non-native applications are supported only after +@c WaitForApparcToInitialiseL has been called. +@see struct INIT_APPARC. + +@param aFileName The full filename of the application. +@param aArgs The arguments passed to the application. +@param aViewLess Indicates whether the application has a view. +@param aStartInBackground Indicates whether the application should start in background. +@param aThreadId The id of the main thread for the application. +@param aRequestStatusForRendezvous To be used for deferred return of the application startup status. + +@leave With a system-wide error-code e.g. if @c aFileName doesn't exists or if memory couldn't be allcoated. +*/ +void CApaAppStart::StartAppL(const TDesC& aFileName, + const TDesC& aArgs, + TBool aViewLess, + TBool aStartInBackground, + TThreadId& aThreadId, + TRequestStatus& aRequestStatusForRendezvous) + { + DoStartAppL(aFileName, aArgs, aViewLess, aStartInBackground, aThreadId, &aRequestStatusForRendezvous); + } + + +/** +Start an application as defined by the specified command line information. No feedback is provided +about when the application is actually up and running. + +Rule-based launching and non-native applications are supported only after +@c WaitForApparcToInitialiseL has been called. +@see struct INIT_APPARC. + +@param aFileName The full filename of the application. +@param aArgs The arguments passed to the application. +@param aViewLess Indicates whether the application has a view. +@param aStartInBackground Indicates whether the application should start in background. +@param aThreadId The id of the main thread for the application. + +@leave With a system-wide error-code e.g. if @c aFileName doesn't exists or if memory couldn't be allcoated. +*/ +void CApaAppStart::StartAppL(const TDesC& aFileName, + const TDesC& aArgs, + TBool aViewLess, + TBool aStartInBackground, + TThreadId& aThreadId) + { + DoStartAppL(aFileName, aArgs, aViewLess, aStartInBackground, aThreadId, NULL); + } + + +void CApaAppStart::DoStartAppL(const TDesC &aFileName, + const TDesC& aArgs, + TBool aViewLess, + TBool aStartInBackground, + TThreadId& aThreadId, + TRequestStatus* aRequestStatusForRendezvous) + { + // Create an 8-bit variant of aArgs + RBuf writableArgs; + writableArgs.CreateL(aArgs); + CleanupClosePushL(writableArgs); + TPtr8 args8 = writableArgs.Collapse(); + + CApaCommandLine* const cmdLine = CApaCommandLine::NewLC(); + SetupCommandLineL(*cmdLine, aFileName, args8, aViewLess, aStartInBackground) ; + + User::LeaveIfError(iApaLsSession.StartApp(*cmdLine, aThreadId, aRequestStatusForRendezvous)); + + CleanupStack::PopAndDestroy(cmdLine); + CleanupStack::PopAndDestroy(&writableArgs); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apstart/apstart.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apstart/apstart.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,51 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APSTART_H +#define __APSTART_H + +#include +#include + +/** +Start applications using RApaLsSession. + +@internalTechnology +@prototype +*/ +NONSHARABLE_CLASS(CApaAppStart) : public CApaStarter + { +public: + IMPORT_C static CApaAppStart* NewL(); + + //from CBase + ~CApaAppStart(); + + //from CApaStarter + void WaitForApparcToInitialiseL(); + void StartAppL(const TDesC& aFileName, const TDesC& aArgs, TBool aViewLess, TBool aStartInBackground, TThreadId& aThreadId); + void StartAppL(const TDesC& aFileName, const TDesC& aArgs, TBool aViewLess, TBool aStartInBackground, TThreadId& aThreadId, TRequestStatus& aRequestStatusForRendezvous); + +private: + CApaAppStart(); + void ConstructL(); + static void SetupCommandLineL(CApaCommandLine& aCmdLine, const TDesC& aFileName, const TDesC8& aArgs, TBool aViewLess, TBool aStartInBackground); + void DoStartAppL(const TDesC &aFileName, const TDesC &aArgs, TBool aViewLess, TBool aStartInBackground, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); + +private: + RApaLsSession iApaLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apstart/apstart.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apstart/apstart.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,30 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +TARGET apstart.dll +TARGETTYPE dll +TARGETPATH /sys/bin +UID 0x1000008D 0x200086A0 +CAPABILITY PowerMgmt ReadDeviceData WriteDeviceData ProtServ SwEvent // same as SysStart.exe +VENDORID 0x70000001 + +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include + +SOURCEPATH ../apstart +SOURCE apstart.cpp +SOURCE apststd.cpp + +LIBRARY euser.lib apparc.lib apgrfx.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apstart/apststd.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apstart/apststd.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "apststd.h" + +void Panic(TApaPanic aPanic) +// +// Panic the process with APSTART as the category. +// + { + _LIT(KApStartPanic,"APSTART"); + User::Panic(KApStartPanic, aPanic); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/apstart/apststd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/apstart/apststd.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APSTSTD +#define __APSTSTD + +enum TApaPanic + { + EApsexeNotRunning + }; + +extern void Panic(TApaPanic aPanic); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APFILE_9_REMOVE_UI_FRAMEWORKS_V1U.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APFILE_9_REMOVE_UI_FRAMEWORKS_V1U.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,72 @@ +EXPORTS + ??0CApaScanningFileRecognizer@@IAE@AAVRFs@@PAVMApaAppStarter@@@Z @ 1 NONAME + ??1CApaAppLocatorProxy@@UAE@XZ @ 2 NONAME ABSENT + ??1CApaScanningAppFinder@@UAE@XZ @ 3 NONAME ABSENT + ??1CApaScanningFileRecognizer@@UAE@XZ @ 4 NONAME + ?ConstructL@CApaScanningFileRecognizer@@IAEXXZ @ 5 NONAME + ?DefaultAppInfoFileName@CApaScanningAppFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 6 NONAME ABSENT + ?FindAllAppsL@CApaScanningAppFinder@@UAEXXZ @ 7 NONAME ABSENT + ?FindAppL@CApaScanningAppFinder@@UAE?AV?$TBuf@$0BAA@@@ABVTDesC16@@VTUid@@@Z @ 8 NONAME ABSENT + ?GetAppCapabilityByUid@CApaAppLocatorProxy@@UAEHAAVTDes8@@VTUid@@@Z @ 9 NONAME ABSENT + ?GetAppEntryByUid@CApaAppLocatorProxy@@UAEHAAVTApaAppEntry@@VTUid@@@Z @ 10 NONAME ABSENT + ?NewL@CApaAppLocatorProxy@@SAPAV1@AAVRFs@@@Z @ 11 NONAME ABSENT + ?NewL@CApaScanningAppFinder@@SAPAV1@ABVRFs@@@Z @ 12 NONAME ABSENT + ?NewL@CApaScanningFileRecognizer@@SAPAV1@AAVRFs@@PAVMApaAppStarter@@@Z @ 13 NONAME + ?NewLC@CApaScanningAppFinder@@SAPAV1@ABVRFs@@@Z @ 14 NONAME ABSENT + ?NextL@CApaScanningAppFinder@@UAEHAAVTApaAppEntry@@@Z @ 15 NONAME ABSENT + ?RecognizerCount@CApaScanningFileRecognizer@@QAEHXZ @ 16 NONAME + ?RecognizerListLC@CApaScanningFileRecognizer@@QBEPAV?$CArrayFixFlat@VTRecognizer@CApaScanningFileRecognizer@@@@XZ @ 17 NONAME + ?ScanForRecognizersL@CApaScanningFileRecognizer@@QAEXXZ @ 18 NONAME + ?SetRecognizersFromListL@CApaScanningFileRecognizer@@QAEXABV?$CArrayFixFlat@VTRecognizer@CApaScanningFileRecognizer@@@@@Z @ 19 NONAME ABSENT + ?TempPath@CApaScanningAppFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 20 NONAME ABSENT + ?TempPath@Apfile@@SA?AVTPtrC16@@XZ @ 21 NONAME ABSENT + ??ACApaScanningFileRecognizer@@QBEABVTRecognizer@0@H@Z @ 22 NONAME ; class CApaScanningFileRecognizer::TRecognizer const & CApaScanningFileRecognizer::operator[](int) const + ?SetRecognizerL@CApaScanningFileRecognizer@@QAEXABVTRecognizer@1@@Z @ 23 NONAME ABSENT + ?UpdateCounter@CApaScanningFileRecognizer@@QBEHXZ @ 24 NONAME + ??1CApaScanningControlFinder@@UAE@XZ @ 25 NONAME ABSENT + ?DefaultAppInfoFileName@CApaScanningControlFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 26 NONAME ABSENT + ?FindAllAppsL@CApaScanningControlFinder@@UAEXXZ @ 27 NONAME ABSENT + ?FindAppL@CApaScanningControlFinder@@UAE?AV?$TBuf@$0BAA@@@ABVTDesC16@@VTUid@@@Z @ 28 NONAME ABSENT + ?NewL@CApaScanningControlFinder@@SAPAV1@ABVRFs@@@Z @ 29 NONAME ABSENT + ?NewLC@CApaScanningControlFinder@@SAPAV1@ABVRFs@@@Z @ 30 NONAME ABSENT + ?NextL@CApaScanningControlFinder@@UAEHAAVTApaAppEntry@@@Z @ 31 NONAME ABSENT + ?TempPath@CApaScanningControlFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 32 NONAME ABSENT + ?SetEcomRecognizerL@CApaScanningFileRecognizer@@QAEXABVTRecognizer@1@@Z @ 33 NONAME + ?SetEcomRecognizersFromListL@CApaScanningFileRecognizer@@QAEXABV?$CArrayFixFlat@VTRecognizer@CApaScanningFileRecognizer@@@@@Z @ 34 NONAME + ?FindAllAppsL@CApaAppRegFinder@@QAEXXZ @ 35 NONAME ; void CApaAppRegFinder::FindAllAppsL(void) + ?FindAppL@CApaAppRegFinder@@QAE?AV?$TBuf@$0BAA@@@ABVTDesC16@@VTUid@@@Z @ 36 NONAME ABSENT ; class TBuf<256> CApaAppRegFinder::FindAppL(class TDesC16 const &, class TUid) + ?NewL@CApaAppRegFinder@@SAPAV1@ABVRFs@@@Z @ 37 NONAME ; class CApaAppRegFinder * CApaAppRegFinder::NewL(class RFs const &) + ?NewLC@CApaAppRegFinder@@SAPAV1@ABVRFs@@@Z @ 38 NONAME ; class CApaAppRegFinder * CApaAppRegFinder::NewLC(class RFs const &) + ?NextL@CApaAppRegFinder@@QAEHAAVTApaAppEntry@@ABV?$RPointerArray@VHBufC16@@@@@Z @ 39 NONAME ; int CApaAppRegFinder::NextL(class TApaAppEntry &, class RPointerArray const &) + ?TempPath@CApaAppRegFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 40 NONAME ABSENT ; class TBuf<256> CApaAppRegFinder::TempPath(void) const + ??1CAppLaunchChecker@@UAE@XZ @ 41 NONAME ; CAppLaunchChecker::~CAppLaunchChecker(void) + ??ACApaScanningRuleBasedPlugIns@@QBEPAVCAppLaunchChecker@@H@Z @ 42 NONAME ; class CAppLaunchChecker * CApaScanningRuleBasedPlugIns::operator[](int) const + ??1CApaScanningRuleBasedPlugIns@@UAE@XZ @ 43 NONAME ; CApaScanningRuleBasedPlugIns::~CApaScanningRuleBasedPlugIns(void) + ?NewL@CApaScanningRuleBasedPlugIns@@SAPAV1@XZ @ 44 NONAME ; class CApaScanningRuleBasedPlugIns * CApaScanningRuleBasedPlugIns::NewL(void) + ?ScanForRuleBasedPlugInsL@CApaScanningRuleBasedPlugIns@@QAEXXZ @ 45 NONAME ; void CApaScanningRuleBasedPlugIns::ScanForRuleBasedPlugInsL(void) + ?ImplementationCount@CApaScanningRuleBasedPlugIns@@QBEHXZ @ 46 NONAME ; int CApaScanningRuleBasedPlugIns::ImplementationCount(void) const + ?Reserved_1@CAppLaunchChecker@@EAEXXZ @ 47 NONAME ; void CAppLaunchChecker::Reserved_1(void) + ?Reserved_2@CAppLaunchChecker@@EAEXXZ @ 48 NONAME ; void CAppLaunchChecker::Reserved_2(void) + ?Reserved_3@CAppLaunchChecker@@EAEXXZ @ 49 NONAME ; void CAppLaunchChecker::Reserved_3(void) + ??1CAppSidChecker@@UAE@XZ @ 50 NONAME ; CAppSidChecker::~CAppSidChecker(void) + ?SetRescanCallBackL@CAppSidChecker@@UAEXABVTCallBack@@@Z @ 51 NONAME ; void CAppSidChecker::SetRescanCallBackL(class TCallBack const &) + ?reserved1@CAppSidChecker@@EAEXXZ @ 52 NONAME ; void CAppSidChecker::reserved1(void) + ?reserved2@CAppSidChecker@@EAEXXZ @ 53 NONAME ; void CAppSidChecker::reserved2(void) + ?reserved3@CAppSidChecker@@EAEXXZ @ 54 NONAME ; void CAppSidChecker::reserved3(void) + X @ 55 NONAME ABSENT ; dummy entry for DriveList function used for Argus and above releases + X @ 56 NONAME ABSENT ; dummy entry for FindAllRemovableMediaAppsL function used for Argus and above releases + ??1CApaAppUnInstallMonitor@@UAE@XZ @ 57 NONAME ; CApUnInstallMonitor::~CApUnInstallMonitor(void) + ?Start@CApaAppUnInstallMonitor@@QAEXXZ @ 58 NONAME ; void CApUnInstallMonitor::Start(void) + ?NewL@CApaAppUnInstallMonitor@@SAPAV1@PAVCApaAppListServer@@@Z @ 59 NONAME ; class CApUnInstallMonitor * CApUnInstallMonitor::NewL(class CApaAppListServer *) + ??1CApfMimeContentPolicy@@UAE@XZ @ 60 NONAME ; CApfMimeContentPolicy::~CApfMimeContentPolicy(void) + ?IsClosedExtension@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 61 NONAME ; int CApfMimeContentPolicy::IsClosedExtension(class TDesC16 const &) + ?IsClosedFileL@CApfMimeContentPolicy@@QAEHAAVRFile@@@Z @ 62 NONAME ; int CApfMimeContentPolicy::IsClosedFileL(class RFile &) + ?IsClosedFileL@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 63 NONAME ; int CApfMimeContentPolicy::IsClosedFileL(class TDesC16 const &) + ?IsClosedType@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 64 NONAME ; int CApfMimeContentPolicy::IsClosedType(class TDesC16 const &) + ?IsDRMEnvelopeL@CApfMimeContentPolicy@@QAEHAAVRFile@@@Z @ 65 NONAME ; int CApfMimeContentPolicy::IsDRMEnvelopeL(class RFile &) + ?IsDRMEnvelopeL@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 66 NONAME ; int CApfMimeContentPolicy::IsDRMEnvelopeL(class TDesC16 const &) + ?NewL@CApfMimeContentPolicy@@SAPAV1@AAVRFs@@@Z @ 67 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewL(class RFs &) + ?NewL@CApfMimeContentPolicy@@SAPAV1@XZ @ 68 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewL(void) + ?NewLC@CApfMimeContentPolicy@@SAPAV1@AAVRFs@@@Z @ 69 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewLC(class RFs &) + ?NewLC@CApfMimeContentPolicy@@SAPAV1@XZ @ 70 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewLC(void) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APFILE_UI_FRAMEWORKSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APFILE_UI_FRAMEWORKSU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,73 @@ +EXPORTS + ??0CApaScanningFileRecognizer@@IAE@AAVRFs@@PAVMApaAppStarter@@@Z @ 1 NONAME + ??1CApaAppLocatorProxy@@UAE@XZ @ 2 NONAME ABSENT + ??1CApaScanningAppFinder@@UAE@XZ @ 3 NONAME ABSENT + ??1CApaScanningFileRecognizer@@UAE@XZ @ 4 NONAME + ?ConstructL@CApaScanningFileRecognizer@@IAEXXZ @ 5 NONAME + ?DefaultAppInfoFileName@CApaScanningAppFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 6 NONAME ABSENT + ?FindAllAppsL@CApaScanningAppFinder@@UAEXXZ @ 7 NONAME ABSENT + ?FindAppL@CApaScanningAppFinder@@UAE?AV?$TBuf@$0BAA@@@ABVTDesC16@@VTUid@@@Z @ 8 NONAME ABSENT + ?GetAppCapabilityByUid@CApaAppLocatorProxy@@UAEHAAVTDes8@@VTUid@@@Z @ 9 NONAME ABSENT + ?GetAppEntryByUid@CApaAppLocatorProxy@@UAEHAAVTApaAppEntry@@VTUid@@@Z @ 10 NONAME ABSENT + ?NewL@CApaAppLocatorProxy@@SAPAV1@AAVRFs@@@Z @ 11 NONAME ABSENT + ?NewL@CApaScanningAppFinder@@SAPAV1@ABVRFs@@@Z @ 12 NONAME ABSENT + ?NewL@CApaScanningFileRecognizer@@SAPAV1@AAVRFs@@PAVMApaAppStarter@@@Z @ 13 NONAME + ?NewLC@CApaScanningAppFinder@@SAPAV1@ABVRFs@@@Z @ 14 NONAME ABSENT + ?NextL@CApaScanningAppFinder@@UAEHAAVTApaAppEntry@@@Z @ 15 NONAME ABSENT + ?RecognizerCount@CApaScanningFileRecognizer@@QAEHXZ @ 16 NONAME + ?RecognizerListLC@CApaScanningFileRecognizer@@QBEPAV?$CArrayFixFlat@VTRecognizer@CApaScanningFileRecognizer@@@@XZ @ 17 NONAME + ?ScanForRecognizersL@CApaScanningFileRecognizer@@QAEXXZ @ 18 NONAME + ?SetRecognizersFromListL@CApaScanningFileRecognizer@@QAEXABV?$CArrayFixFlat@VTRecognizer@CApaScanningFileRecognizer@@@@@Z @ 19 NONAME ABSENT + ?TempPath@CApaScanningAppFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 20 NONAME ABSENT + ?TempPath@Apfile@@SA?AVTPtrC16@@XZ @ 21 NONAME ABSENT + ??ACApaScanningFileRecognizer@@QBEABVTRecognizer@0@H@Z @ 22 NONAME ; class CApaScanningFileRecognizer::TRecognizer const & CApaScanningFileRecognizer::operator[](int) const + ?SetRecognizerL@CApaScanningFileRecognizer@@QAEXABVTRecognizer@1@@Z @ 23 NONAME ABSENT + ?UpdateCounter@CApaScanningFileRecognizer@@QBEHXZ @ 24 NONAME + ??1CApaScanningControlFinder@@UAE@XZ @ 25 NONAME ABSENT + ?DefaultAppInfoFileName@CApaScanningControlFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 26 NONAME ABSENT + ?FindAllAppsL@CApaScanningControlFinder@@UAEXXZ @ 27 NONAME ABSENT + ?FindAppL@CApaScanningControlFinder@@UAE?AV?$TBuf@$0BAA@@@ABVTDesC16@@VTUid@@@Z @ 28 NONAME ABSENT + ?NewL@CApaScanningControlFinder@@SAPAV1@ABVRFs@@@Z @ 29 NONAME ABSENT + ?NewLC@CApaScanningControlFinder@@SAPAV1@ABVRFs@@@Z @ 30 NONAME ABSENT + ?NextL@CApaScanningControlFinder@@UAEHAAVTApaAppEntry@@@Z @ 31 NONAME ABSENT + ?TempPath@CApaScanningControlFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 32 NONAME ABSENT + ?SetEcomRecognizerL@CApaScanningFileRecognizer@@QAEXABVTRecognizer@1@@Z @ 33 NONAME + ?SetEcomRecognizersFromListL@CApaScanningFileRecognizer@@QAEXABV?$CArrayFixFlat@VTRecognizer@CApaScanningFileRecognizer@@@@@Z @ 34 NONAME + ?FindAllAppsL@CApaAppRegFinder@@QAEXXZ @ 35 NONAME ; void CApaAppRegFinder::FindAllAppsL(void) + ?FindAppL@CApaAppRegFinder@@QAE?AV?$TBuf@$0BAA@@@ABVTDesC16@@VTUid@@@Z @ 36 NONAME ABSENT ; class TBuf<256> CApaAppRegFinder::FindAppL(class TDesC16 const &, class TUid) + ?NewL@CApaAppRegFinder@@SAPAV1@ABVRFs@@@Z @ 37 NONAME ; class CApaAppRegFinder * CApaAppRegFinder::NewL(class RFs const &) + ?NewLC@CApaAppRegFinder@@SAPAV1@ABVRFs@@@Z @ 38 NONAME ; class CApaAppRegFinder * CApaAppRegFinder::NewLC(class RFs const &) + ?NextL@CApaAppRegFinder@@QAEHAAVTApaAppEntry@@ABV?$RPointerArray@VHBufC16@@@@@Z @ 39 NONAME ; int CApaAppRegFinder::NextL(class TApaAppEntry &, class RPointerArray const &) + ?TempPath@CApaAppRegFinder@@UBE?AV?$TBuf@$0BAA@@@XZ @ 40 NONAME ABSENT ; class TBuf<256> CApaAppRegFinder::TempPath(void) const + ??1CAppLaunchChecker@@UAE@XZ @ 41 NONAME ; CAppLaunchChecker::~CAppLaunchChecker(void) + ??ACApaScanningRuleBasedPlugIns@@QBEPAVCAppLaunchChecker@@H@Z @ 42 NONAME ; class CAppLaunchChecker * CApaScanningRuleBasedPlugIns::operator[](int) const + ??1CApaScanningRuleBasedPlugIns@@UAE@XZ @ 43 NONAME ; CApaScanningRuleBasedPlugIns::~CApaScanningRuleBasedPlugIns(void) + ?NewL@CApaScanningRuleBasedPlugIns@@SAPAV1@XZ @ 44 NONAME ; class CApaScanningRuleBasedPlugIns * CApaScanningRuleBasedPlugIns::NewL(void) + ?ScanForRuleBasedPlugInsL@CApaScanningRuleBasedPlugIns@@QAEXXZ @ 45 NONAME ; void CApaScanningRuleBasedPlugIns::ScanForRuleBasedPlugInsL(void) + ?ImplementationCount@CApaScanningRuleBasedPlugIns@@QBEHXZ @ 46 NONAME ; int CApaScanningRuleBasedPlugIns::ImplementationCount(void) const + ?Reserved_1@CAppLaunchChecker@@EAEXXZ @ 47 NONAME ; void CAppLaunchChecker::Reserved_1(void) + ?Reserved_2@CAppLaunchChecker@@EAEXXZ @ 48 NONAME ; void CAppLaunchChecker::Reserved_2(void) + ?Reserved_3@CAppLaunchChecker@@EAEXXZ @ 49 NONAME ; void CAppLaunchChecker::Reserved_3(void) + ??1CAppSidChecker@@UAE@XZ @ 50 NONAME ; CAppSidChecker::~CAppSidChecker(void) + ?SetRescanCallBackL@CAppSidChecker@@UAEXABVTCallBack@@@Z @ 51 NONAME ; void CAppSidChecker::SetRescanCallBackL(class TCallBack const &) + ?reserved1@CAppSidChecker@@EAEXXZ @ 52 NONAME ; void CAppSidChecker::reserved1(void) + ?reserved2@CAppSidChecker@@EAEXXZ @ 53 NONAME ; void CAppSidChecker::reserved2(void) + ?reserved3@CAppSidChecker@@EAEXXZ @ 54 NONAME ; void CAppSidChecker::reserved3(void) + ?DriveList@CApaAppRegFinder@@QBEABV?$RArray@VTDriveUnitInfo@@@@XZ @ 55 NONAME ; class RArray const & CApaAppRegFinder::DriveList(void) const + ?FindAllRemovableMediaAppsL@CApaAppRegFinder@@QAEXXZ @ 56 NONAME ; void CApaAppRegFinder::FindAllRemovableMediaAppsL(void) + ??1CApaAppUnInstallMonitor@@UAE@XZ @ 57 NONAME ; CApaAppUnInstallMonitor::~CApaAppUnInstallMonitor(void) + ?NewL@CApaAppUnInstallMonitor@@SAPAV1@PAVCApaAppListServer@@@Z @ 58 NONAME ; class CApaAppUnInstallMonitor * CApaAppUnInstallMonitor::NewL(class CApaAppListServer *) + ?Start@CApaAppUnInstallMonitor@@QAEXXZ @ 59 NONAME ; void CApaAppUnInstallMonitor::Start(void) + ??1CApfMimeContentPolicy@@UAE@XZ @ 60 NONAME ; CApfMimeContentPolicy::~CApfMimeContentPolicy(void) + ?IsClosedExtension@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 61 NONAME ; int CApfMimeContentPolicy::IsClosedExtension(class TDesC16 const &) + ?IsClosedFileL@CApfMimeContentPolicy@@QAEHAAVRFile@@@Z @ 62 NONAME ; int CApfMimeContentPolicy::IsClosedFileL(class RFile &) + ?IsClosedFileL@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 63 NONAME ; int CApfMimeContentPolicy::IsClosedFileL(class TDesC16 const &) + ?IsClosedType@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 64 NONAME ; int CApfMimeContentPolicy::IsClosedType(class TDesC16 const &) + ?IsDRMEnvelopeL@CApfMimeContentPolicy@@QAEHAAVRFile@@@Z @ 65 NONAME ; int CApfMimeContentPolicy::IsDRMEnvelopeL(class RFile &) + ?IsDRMEnvelopeL@CApfMimeContentPolicy@@QAEHABVTDesC16@@@Z @ 66 NONAME ; int CApfMimeContentPolicy::IsDRMEnvelopeL(class TDesC16 const &) + ?NewL@CApfMimeContentPolicy@@SAPAV1@AAVRFs@@@Z @ 67 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewL(class RFs &) + ?NewL@CApfMimeContentPolicy@@SAPAV1@XZ @ 68 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewL(void) + ?NewLC@CApfMimeContentPolicy@@SAPAV1@AAVRFs@@@Z @ 69 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewLC(class RFs &) + ?NewLC@CApfMimeContentPolicy@@SAPAV1@XZ @ 70 NONAME ; class CApfMimeContentPolicy * CApfMimeContentPolicy::NewLC(void) + _E32Dll=__E32Dll ; Entry point for emulation + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1U.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1U.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,264 @@ +EXPORTS + ??0RApaLsSession@@QAE@XZ @ 1 NONAME ; public: __thiscall RApaLsSession::RApaLsSession(void) + ??0TApaPictureFactory@@QAE@PAVCApaProcess@@@Z @ 2 NONAME ; public: __thiscall TApaPictureFactory::TApaPictureFactory(class CApaProcess *) + ??0TApaTask@@QAE@AAVRWsSession@@@Z @ 3 NONAME ; public: __thiscall TApaTask::TApaTask(class RWsSession &) + ??0TApaTaskList@@QAE@AAVRWsSession@@@Z @ 4 NONAME ; public: __thiscall TApaTaskList::TApaTaskList(class RWsSession &) + ??1CApaAppInfoFileReader@@UAE@XZ @ 5 NONAME ABSENT ; public: virtual __thiscall CApaAppInfoFileReader::~CApaAppInfoFileReader(void) + ??1CApaAppInfoFileWriter@@UAE@XZ @ 6 NONAME ABSENT ; public: virtual __thiscall CApaAppInfoFileWriter::~CApaAppInfoFileWriter(void) + ??1CApaAppList@@UAE@XZ @ 7 NONAME ; public: virtual __thiscall CApaAppList::~CApaAppList(void) + ??1CApaDoor@@UAE@XZ @ 8 NONAME ; public: virtual __thiscall CApaDoor::~CApaDoor(void) + ??1CApaMaskedBitmap@@UAE@XZ @ 9 NONAME ; public: virtual __thiscall CApaMaskedBitmap::~CApaMaskedBitmap(void) + ??1CApaWindowGroupName@@UAE@XZ @ 10 NONAME ; public: virtual __thiscall CApaWindowGroupName::~CApaWindowGroupName(void) + ?AddCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@@Z @ 11 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddCaptionL(enum TLanguage,class TDesC16 const &) + ?AddIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@@Z @ 12 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddIconL(class CApaMaskedBitmap &) + ?AddIconL@CApaAppInfoFileWriter@@QAEXABVTDesC16@@@Z @ 13 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddIconL(class TDesC16 const &) + ?AppCount@RApaLsSession@@QBEHAAH@Z @ 14 NONAME ; public: int __thiscall RApaLsSession::AppCount(int &)const + ?AppDataByUid@CApaAppList@@QBEPAVCApaAppData@@VTUid@@@Z @ 15 NONAME ; public: class CApaAppData * __thiscall CApaAppList::AppDataByUid(class TUid)const + ?AppEntry@CApaAppData@@QBE?AVTApaAppEntry@@XZ @ 16 NONAME ; public: class TApaAppEntry __thiscall CApaAppData::AppEntry(void)const + ?AppUid@CApaWindowGroupName@@QBE?AVTUid@@XZ @ 17 NONAME ; public: class TUid __thiscall CApaWindowGroupName::AppUid(void)const + ?AppUidL@CApaDoor@@QBE?AVTUid@@XZ @ 18 NONAME ; public: class TUid __thiscall CApaDoor::AppUidL(void)const + ?BringToForeground@TApaTask@@QAEXXZ @ 19 NONAME ; public: void __thiscall TApaTask::BringToForeground(void) + ?Capability@CApaAppData@@QBEXAAVTDes8@@@Z @ 20 NONAME ; public: void __thiscall CApaAppData::Capability(class TDes8 &)const + ?Capability@CApaAppInfoFileReader@@QBEXAAVTDes8@@@Z @ 21 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::Capability(class TDes8 &)const + ?Caption@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 22 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::Caption(void)const + ?CaptionL@CApaAppInfoFileReader@@QAE?AV?$TBuf@$0BAA@@@W4TLanguage@@@Z @ 23 NONAME ABSENT ; public: class TBuf<256> __thiscall CApaAppInfoFileReader::CaptionL(enum TLanguage) + ?Connect@RApaLsSession@@QAEHXZ @ 24 NONAME ; public: int __thiscall RApaLsSession::Connect(void) + ?ConstructFromWgIdL@CApaWindowGroupName@@QAEXH@Z @ 25 NONAME ; public: void __thiscall CApaWindowGroupName::ConstructFromWgIdL(int) + ?Count@CApaAppList@@QBEHXZ @ 26 NONAME ; public: int __thiscall CApaAppList::Count(void)const + ?CreateMaskedBitmapL@CApaAppInfoFileReader@@QAEPAVCApaMaskedBitmap@@H@Z @ 27 NONAME ABSENT ; public: class CApaMaskedBitmap * __thiscall CApaAppInfoFileReader::CreateMaskedBitmapL(int) + ?CycleTasks@TApaTaskList@@QAEHVTUid@@W4TCycleDirection@1@@Z @ 28 NONAME ; public: int __thiscall TApaTaskList::CycleTasks(class TUid,enum TApaTaskList::TCycleDirection) + ?DocName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 29 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::DocName(void)const + ?DocNameIsAFile@CApaWindowGroupName@@QBEHXZ @ 30 NONAME ; public: int __thiscall CApaWindowGroupName::DocNameIsAFile(void)const + ?DocumentL@CApaDoor@@QAEPAVCApaDocument@@H@Z @ 31 NONAME ; public: class CApaDocument * __thiscall CApaDoor::DocumentL(int) + ?EmbeddableAppCount@RApaLsSession@@QBEHAAH@Z @ 32 NONAME ; public: int __thiscall RApaLsSession::EmbeddableAppCount(int &)const + ?EndTask@TApaTask@@QAEXXZ @ 33 NONAME ; public: void __thiscall TApaTask::EndTask(void) + ?Exists@TApaTask@@QBEHXZ @ 34 NONAME ; public: int __thiscall TApaTask::Exists(void)const + ?ExternalizeL@CApaMaskedBitmap@@QBEXAAVRWriteStream@@@Z @ 35 NONAME ; public: void __thiscall CApaMaskedBitmap::ExternalizeL(class RWriteStream &)const + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 36 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindApp(class TDesC16 const &) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@VTUid@@@Z @ 37 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindApp(class TUid) + ?FindByAppUid@CApaWindowGroupName@@SAXVTUid@@AAVRWsSession@@AAH@Z @ 38 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByAppUid(class TUid,class RWsSession &,int &) + ?FindByCaption@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 39 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByCaption(class TDesC16 const &,class RWsSession &,int &) + ?FindByDocName@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 40 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByDocName(class TDesC16 const &,class RWsSession &,int &) + ?FindByPos@TApaTaskList@@QAE?AVTApaTask@@H@Z @ 41 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindByPos(int) + ?FindDoc@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 42 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindDoc(class TDesC16 const &) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@XZ @ 43 NONAME ; public: class CApaAppData * __thiscall CApaAppList::FirstApp(void)const + ?GetAllApps@RApaLsSession@@QBEHXZ @ 44 NONAME ; public: int __thiscall RApaLsSession::GetAllApps(void)const + ?GetAppCapability@RApaLsSession@@QBEHAAVTDes8@@VTUid@@@Z @ 45 NONAME ; public: int __thiscall RApaLsSession::GetAppCapability(class TDes8 &,class TUid)const + ?GetAppInfo@RApaLsSession@@QBEHAAVTApaAppInfo@@VTUid@@@Z @ 46 NONAME ; public: int __thiscall RApaLsSession::GetAppInfo(class TApaAppInfo &,class TUid)const + ?GetEmbeddableApps@RApaLsSession@@QBEHXZ @ 47 NONAME ; public: int __thiscall RApaLsSession::GetEmbeddableApps(void)const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@@Z @ 48 NONAME ; public: int __thiscall RApaLsSession::GetNextApp(class TApaAppInfo &)const + ?InternalizeL@CApaMaskedBitmap@@QAEXAAVRReadStream@@@Z @ 49 NONAME ; public: void __thiscall CApaMaskedBitmap::InternalizeL(class RReadStream &) + ?IsBusy@CApaWindowGroupName@@QBEHXZ @ 50 NONAME ; public: int __thiscall CApaWindowGroupName::IsBusy(void)const + ?IsSystem@CApaWindowGroupName@@QBEHXZ @ 51 NONAME ; public: int __thiscall CApaWindowGroupName::IsSystem(void)const + ?KillTask@TApaTask@@QAEXXZ @ 52 NONAME ; public: void __thiscall TApaTask::KillTask(void) + ?Mask@CApaMaskedBitmap@@QBEPAVCFbsBitmap@@XZ @ 53 NONAME ; public: class CFbsBitmap * __thiscall CApaMaskedBitmap::Mask(void)const + ?New@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@PAVHBufC16@@@Z @ 54 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::New(class RWsSession const &,class HBufC16 *) + ?NewL@CApaAppInfoFileReader@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 55 NONAME ABSENT ; public: static class CApaAppInfoFileReader * __cdecl CApaAppInfoFileReader::NewL(class RFs &,class TDesC16 const &,class TUid) + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppFinder@@@Z @ 56 NONAME ; public: static class CApaAppList * __cdecl CApaAppList::NewL(class RFs &,class CApaAppFinder *) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 57 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewL(class RFs &,class CApaDocument &,class TSize const &) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@ABVCStreamStore@@VTStreamId@@AAVCApaProcess@@@Z @ 58 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewL(class RFs &,class CStreamStore const &,class TStreamId,class CApaProcess &) + ?NewL@CApaMaskedBitmap@@SAPAV1@PAV1@@Z @ 59 NONAME ; public: static class CApaMaskedBitmap * __cdecl CApaMaskedBitmap::NewL(class CApaMaskedBitmap *) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 60 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 61 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &,class TDesC16 const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 62 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &,int) + ?NewLC@CApaAppInfoFileReader@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 63 NONAME ABSENT ; public: static class CApaAppInfoFileReader * __cdecl CApaAppInfoFileReader::NewLC(class RFs &,class TDesC16 const &,class TUid) + ?NewLC@CApaAppInfoFileWriter@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 64 NONAME ABSENT ; public: static class CApaAppInfoFileWriter * __cdecl CApaAppInfoFileWriter::NewLC(class RFs &,class TDesC16 const &,class TUid) + ?NewLC@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 65 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewLC(class RFs &,class CApaDocument &,class TSize const &) + ?NewLC@CApaMaskedBitmap@@SAPAV1@XZ @ 66 NONAME ; public: static class CApaMaskedBitmap * __cdecl CApaMaskedBitmap::NewLC(void) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 67 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 68 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &,class TDesC16 const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 69 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &,int) + ?NewPictureL@TApaPictureFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 70 NONAME ; public: virtual void __thiscall TApaPictureFactory::NewPictureL(class TPictureHeader &,class CStreamStore const &)const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@@Z @ 71 NONAME ; public: class CApaAppData * __thiscall CApaAppList::NextApp(class CApaAppData const *)const + ?PurgeL@CApaAppList@@QAEXXZ @ 72 NONAME ; public: void __thiscall CApaAppList::PurgeL(void) + ?RespondsToShutdownEvent@CApaWindowGroupName@@QBEHXZ @ 73 NONAME ; public: int __thiscall CApaWindowGroupName::RespondsToShutdownEvent(void)const + ?RespondsToSwitchFilesEvent@CApaWindowGroupName@@QBEHXZ @ 74 NONAME ; public: int __thiscall CApaWindowGroupName::RespondsToSwitchFilesEvent(void)const + ?RestoreL@CApaDoor@@QAEXABVCStreamStore@@VTStreamId@@@Z @ 75 NONAME ; public: void __thiscall CApaDoor::RestoreL(class CStreamStore const &,class TStreamId) + ?SendKey@TApaTask@@QAEXABUTKeyEvent@@@Z @ 76 NONAME ; public: void __thiscall TApaTask::SendKey(struct TKeyEvent const &) + ?SendKey@TApaTask@@QAEXHH@Z @ 77 NONAME ; public: void __thiscall TApaTask::SendKey(int,int) + ?SendMessage@TApaTask@@QAEHVTUid@@ABVTDesC8@@@Z @ 78 NONAME ; public: int __thiscall TApaTask::SendMessage(class TUid,class TDesC8 const &) + ?SendSystemEvent@TApaTask@@QAEXW4TApaSystemEvent@@@Z @ 79 NONAME ; public: void __thiscall TApaTask::SendSystemEvent(enum TApaSystemEvent) + ?SendToBackground@TApaTask@@QAEXXZ @ 80 NONAME ; public: void __thiscall TApaTask::SendToBackground(void) + ?SetAppUid@CApaWindowGroupName@@QAEXVTUid@@@Z @ 81 NONAME ; public: void __thiscall CApaWindowGroupName::SetAppUid(class TUid) + ?SetBusy@CApaWindowGroupName@@QAEXH@Z @ 82 NONAME ; public: void __thiscall CApaWindowGroupName::SetBusy(int) + ?SetCapability@CApaAppInfoFileWriter@@QAEHABVTDesC8@@@Z @ 83 NONAME ABSENT ; public: int __thiscall CApaAppInfoFileWriter::SetCapability(class TDesC8 const &) + ?SetCaptionL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 84 NONAME ; public: void __thiscall CApaWindowGroupName::SetCaptionL(class TDesC16 const &) + ?SetDocNameIsAFile@CApaWindowGroupName@@QAEXH@Z @ 85 NONAME ; public: void __thiscall CApaWindowGroupName::SetDocNameIsAFile(int) + ?SetDocNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 86 NONAME ; public: void __thiscall CApaWindowGroupName::SetDocNameL(class TDesC16 const &) + ?SetFormatToGlassL@CApaDoor@@QAEXXZ @ 87 NONAME ; public: void __thiscall CApaDoor::SetFormatToGlassL(void) + ?SetFormatToIconL@CApaDoor@@QAEXXZ @ 88 NONAME ; public: void __thiscall CApaDoor::SetFormatToIconL(void) + ?SetFormatToTemporaryIconL@CApaDoor@@QAEXH@Z @ 89 NONAME ; public: void __thiscall CApaDoor::SetFormatToTemporaryIconL(int) + ?SetRespondsToShutdownEvent@CApaWindowGroupName@@QAEXH@Z @ 90 NONAME ; public: void __thiscall CApaWindowGroupName::SetRespondsToShutdownEvent(int) + ?SetRespondsToSwitchFilesEvent@CApaWindowGroupName@@QAEXH@Z @ 91 NONAME ; public: void __thiscall CApaWindowGroupName::SetRespondsToSwitchFilesEvent(int) + ?SetSystem@CApaWindowGroupName@@QAEXH@Z @ 92 NONAME ; public: void __thiscall CApaWindowGroupName::SetSystem(int) + ?SetWgId@TApaTask@@QAEXH@Z @ 93 NONAME ; public: void __thiscall TApaTask::SetWgId(int) + ?SetWindowGroupName@CApaWindowGroupName@@QAEXPAVHBufC16@@@Z @ 94 NONAME ; public: void __thiscall CApaWindowGroupName::SetWindowGroupName(class HBufC16 *) + ?SetWindowGroupName@CApaWindowGroupName@@QBEHAAVRWindowGroup@@@Z @ 95 NONAME ; public: int __thiscall CApaWindowGroupName::SetWindowGroupName(class RWindowGroup &)const + ?SetWindowGroupNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 96 NONAME ; public: void __thiscall CApaWindowGroupName::SetWindowGroupNameL(class TDesC16 const &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@@Z @ 97 NONAME ; public: int __thiscall RApaLsSession::StartApp(class CApaCommandLine const &) + ?StoreL@CApaAppInfoFileWriter@@QAEXXZ @ 98 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::StoreL(void) + ?StretchDrawL@CApaAppInfoFileReader@@SAXPAVCFbsBitmap@@0VTSize@@@Z @ 99 NONAME ABSENT ; public: static void __cdecl CApaAppInfoFileReader::StretchDrawL(class CFbsBitmap *,class CFbsBitmap *,class TSize) + ?SwitchCreateFile@TApaTask@@QAEHABVTDesC16@@@Z @ 100 NONAME ; public: int __thiscall TApaTask::SwitchCreateFile(class TDesC16 const &) + ?SwitchOpenFile@TApaTask@@QAEHABVTDesC16@@@Z @ 101 NONAME ; public: int __thiscall TApaTask::SwitchOpenFile(class TDesC16 const &) + ?ThreadId@TApaTask@@QBE?AVTThreadId@@XZ @ 102 NONAME ; public: class TThreadId __thiscall TApaTask::ThreadId(void)const + ?UpdateCounter@CApaAppList@@QBEHXZ @ 103 NONAME ; public: int __thiscall CApaAppList::UpdateCounter(void)const + ?UpdateL@CApaAppList@@QAEXXZ @ 104 NONAME ; public: void __thiscall CApaAppList::UpdateL(void) + ?Version@RApaLsSession@@QBE?AVTVersion@@XZ @ 105 NONAME ; public: class TVersion __thiscall RApaLsSession::Version(void)const + ?WgId@TApaTask@@QBEHXZ @ 106 NONAME ; public: int __thiscall TApaTask::WgId(void)const + ?WindowGroupName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 107 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::WindowGroupName(void)const + ??1CApaSystemControlList@@UAE@XZ @ 108 NONAME ; public: virtual __thiscall CApaSystemControlList::~CApaSystemControlList(void) + ?Caption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 109 NONAME ; public: class TPtrC16 __thiscall CApaSystemControl::Caption(void)const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@H@Z @ 110 NONAME ; public: class CApaSystemControl * __thiscall CApaSystemControlList::Control(int)const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@VTUid@@@Z @ 111 NONAME ; public: class CApaSystemControl * __thiscall CApaSystemControlList::Control(class TUid)const + ?Count@CApaSystemControlList@@QBEHXZ @ 112 NONAME ; public: int __thiscall CApaSystemControlList::Count(void)const + ?CreateL@CApaSystemControl@@QAEXXZ @ 113 NONAME ; public: void __thiscall CApaSystemControl::CreateL(void) + ?FileName@CApaSystemControl@@QBE?AV?$TBuf@$0BAA@@@XZ @ 114 NONAME ; public: class TBuf<256> __thiscall CApaSystemControl::FileName(void)const + ?Icon@CApaSystemControl@@QBEPAVCApaMaskedBitmap@@XZ @ 115 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaSystemControl::Icon(void)const + ?Index@CApaSystemControlList@@QBEHVTUid@@@Z @ 116 NONAME ; public: int __thiscall CApaSystemControlList::Index(class TUid)const + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@AAVCApaAppFinder@@ABVTDesC16@@@Z @ 117 NONAME ABSENT ; public: static class CApaSystemControlList * __cdecl CApaSystemControlList::NewL(class RFs &,class CApaAppFinder &,class TDesC16 const &) + ?Type@CApaSystemControl@@QBE?AVTUid@@XZ @ 118 NONAME ; public: class TUid __thiscall CApaSystemControl::Type(void)const + ?UpdateL@CApaSystemControlList@@QAEXXZ @ 119 NONAME ; public: void __thiscall CApaSystemControlList::UpdateL(void) + ?AddDataTypeL@CApaAppInfoFileWriter@@QAEXABVTDataTypeWithPriority@@@Z @ 120 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddDataTypeL(class TDataTypeWithPriority const &) + ?AppForDataType@RApaLsSession@@QBEHABVTDataType@@AAVTUid@@@Z @ 121 NONAME ; public: int __thiscall RApaLsSession::AppForDataType(class TDataType const &,class TUid &)const + ?AppForDocument@RApaLsSession@@QBEHABVTDesC16@@AAVTUid@@AAVTDataType@@@Z @ 122 NONAME ; public: int __thiscall RApaLsSession::AppForDocument(class TDesC16 const &,class TUid &,class TDataType &)const + ?CreateDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 123 NONAME ; public: int __thiscall RApaLsSession::CreateDocument(class TDesC16 const &,class TUid,class TThreadId &,enum RApaLsSession::TLaunchType) + ?DataType@CApaAppData@@QBEFABVTDataType@@@Z @ 124 NONAME ; public: short __thiscall CApaAppData::DataType(class TDataType const &)const + ?DataTypesSupportedL@CApaAppInfoFileReader@@QBEXAAV?$CArrayFix@VTDataTypeWithPriority@@@@@Z @ 125 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::DataTypesSupportedL(class CArrayFix &)const + ?GetAcceptedConfidence@RApaLsSession@@QBEHAAH@Z @ 126 NONAME ; public: int __thiscall RApaLsSession::GetAcceptedConfidence(int &)const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@HAAVCApaMaskedBitmap@@@Z @ 127 NONAME ; public: int __thiscall RApaLsSession::GetAppIcon(class TUid,int,class CApaMaskedBitmap &)const + ?GetMaxDataBufSize@RApaLsSession@@QBEHAAH@Z @ 128 NONAME ; public: int __thiscall RApaLsSession::GetMaxDataBufSize(int &)const + ?GetSupportedDataTypesL@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTDataType@@@@@Z @ 129 NONAME ; public: int __thiscall RApaLsSession::GetSupportedDataTypesL(class CArrayFixFlat &)const + ?IsProgram@RApaLsSession@@QBEHABVTDesC16@@AAH@Z @ 130 NONAME ; public: int __thiscall RApaLsSession::IsProgram(class TDesC16 const &,int &)const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@@Z @ 131 NONAME ; public: class TUid __thiscall CApaAppList::PreferredDataHandlerL(class TDataType const &)const + ?RecognizeData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVTDataRecognitionResult@@@Z @ 132 NONAME ; public: int __thiscall RApaLsSession::RecognizeData(class TDesC16 const &,class TDesC8 const &,class TDataRecognitionResult &)const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@ABVTDataType@@AAH@Z @ 133 NONAME ; public: int __thiscall RApaLsSession::RecognizeSpecificData(class TDesC16 const &,class TDesC8 const &,class TDataType const &,int &)const + ?SetAcceptedConfidence@RApaLsSession@@QAEHH@Z @ 134 NONAME ; public: int __thiscall RApaLsSession::SetAcceptedConfidence(int) + ?SetMaxDataBufSize@RApaLsSession@@QAEHH@Z @ 135 NONAME ; public: int __thiscall RApaLsSession::SetMaxDataBufSize(int) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@AAVTThreadId@@W4TLaunchType@1@@Z @ 136 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@ABVTDataType@@AAVTThreadId@@W4TLaunchType@1@@Z @ 137 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TDataType const &,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 138 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TUid,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartIdleUpdateL@CApaAppList@@QAEXXZ @ 139 NONAME ; public: void __thiscall CApaAppList::StartIdleUpdateL(void) + ??1CApaAppListNotifier@@UAE@XZ @ 140 NONAME ; public: virtual __thiscall CApaAppListNotifier::~CApaAppListNotifier(void) + ?NewL@CApaAppListNotifier@@SAPAV1@PAVMApaAppListServObserver@@W4TPriority@CActive@@@Z @ 141 NONAME ; public: static class CApaAppListNotifier * __cdecl CApaAppListNotifier::NewL(class MApaAppListServObserver *,enum CActive::TPriority) + ?StartIdleUpdateL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 142 NONAME ; public: void __thiscall CApaAppList::StartIdleUpdateL(class MApaAppListObserver *) + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@VTSize@@AAVCApaMaskedBitmap@@@Z @ 143 NONAME ; public: int __thiscall RApaLsSession::GetAppIcon(class TUid,class TSize,class CApaMaskedBitmap &)const + ?GetAppIconSizes@RApaLsSession@@QBEHVTUid@@AAV?$CArrayFixFlat@VTSize@@@@@Z @ 144 NONAME ; public: int __thiscall RApaLsSession::GetAppIconSizes(class TUid,class CArrayFixFlat &)const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@VTSize@@@Z @ 145 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppData::Icon(class TSize)const + ?IconSizesL@CApaAppData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 146 NONAME ; public: class CArrayFixFlat * __thiscall CApaAppData::IconSizesL(void)const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@H@Z @ 147 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppData::Icon(int)const + ?Hidden@CApaWindowGroupName@@QAEHXZ @ 148 NONAME ; public: int __thiscall CApaWindowGroupName::Hidden(void) + ?SetHidden@CApaWindowGroupName@@QAEXH@Z @ 149 NONAME ; public: void __thiscall CApaWindowGroupName::SetHidden(int) + ?AddViewCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@VTUid@@@Z @ 150 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewCaptionL(enum TLanguage,class TDesC16 const &,class TUid) + ?AddViewIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@VTUid@@@Z @ 151 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewIconL(class CApaMaskedBitmap &,class TUid) + ?AddViewL@CApaAppInfoFileWriter@@QAEXVTUid@@@Z @ 152 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewL(class TUid) + ?CaptionL@CApaAIFViewData@@QBE?AV?$TBuf@$0BAA@@@W4TLanguage@@@Z @ 153 NONAME ABSENT ; public: class TBuf<256> __thiscall CApaAIFViewData::CaptionL(enum TLanguage)const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0ABVTSize@@AAVCApaMaskedBitmap@@@Z @ 154 NONAME ; public: int __thiscall RApaLsSession::GetAppViewIcon(class TUid,class TUid,class TSize const &,class CApaMaskedBitmap &)const + ?GetAppViews@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTApaAppViewInfo@@@@VTUid@@@Z @ 155 NONAME ; public: int __thiscall RApaLsSession::GetAppViews(class CArrayFixFlat &,class TUid)const + ?GetViewsL@CApaAppInfoFileReader@@QBEXAAV?$CArrayPtr@VCApaAIFViewData@@@@@Z @ 156 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::GetViewsL(class CArrayPtr &)const + ?Icon@CApaAppViewData@@QBEPAVCApaMaskedBitmap@@ABVTSize@@@Z @ 157 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppViewData::Icon(class TSize const &)const + ?IconByIndexL@CApaAIFViewData@@QBEPAVCApaMaskedBitmap@@H@Z @ 158 NONAME ABSENT ; public: class CApaMaskedBitmap * __thiscall CApaAIFViewData::IconByIndexL(int)const + ?IconSizesL@CApaAppViewData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 159 NONAME ; public: class CArrayFixFlat * __thiscall CApaAppViewData::IconSizesL(void)const + ?NumberOfIcons@CApaAIFViewData@@QBEHXZ @ 160 NONAME ABSENT ; public: int __thiscall CApaAIFViewData::NumberOfIcons(void)const + ?StoreViewL@CApaAppInfoFileWriter@@QAEXVTUid@@@Z @ 161 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::StoreViewL(class TUid) + ?Uid@CApaAppViewData@@QBE?AVTUid@@XZ @ 162 NONAME ; public: class TUid __thiscall CApaAppViewData::Uid(void)const + ?ViewUid@CApaAIFViewData@@QBE?AVTUid@@XZ @ 163 NONAME ABSENT ; public: class TUid __thiscall CApaAIFViewData::ViewUid(void)const + ?Views@CApaAppData@@QBEPAV?$CArrayPtrFlat@VCApaAppViewData@@@@XZ @ 164 NONAME ; public: class CArrayPtrFlat * __thiscall CApaAppData::Views(void)const + ?AddOwnedFileL@CApaAppInfoFileWriter@@QAEXABVTDesC16@@@Z @ 165 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddOwnedFileL(class TDesC16 const &) + ?GetOwnedFilesL@CApaAppInfoFileReader@@QBEXAAVCDesC16Array@@@Z @ 166 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::GetOwnedFilesL(class CDesC16Array &)const + ?OwnedFiles@CApaAppData@@QBEPAVCDesC16Array@@XZ @ 167 NONAME ; public: class CDesC16Array * __thiscall CApaAppData::OwnedFiles(void)const + ?GetAppOwnedFiles@RApaLsSession@@QBEHAAVCDesC16Array@@VTUid@@@Z @ 168 NONAME ; public: int __thiscall RApaLsSession::GetAppOwnedFiles(class CDesC16Array &,class TUid)const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@@Z @ 169 NONAME ; public: int __thiscall RApaLsSession::StartApp(class CApaCommandLine const &,class TThreadId &) + ?GetAifFileName@AppInfoFileUtils@@SAXABVRFs@@AAVTDes16@@@Z @ 170 NONAME ABSENT ; public: static void __cdecl AppInfoFileUtils::GetAifFileName(class RFs const &,class TDes16 &) + ?AddViewL@CApaAppInfoFileWriter@@QAEXVTUid@@H@Z @ 171 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewL(class TUid,int) + ?CanUseScreenMode@CApaAppData@@QAEHH@Z @ 172 NONAME ; public: int __thiscall CApaAppData::CanUseScreenMode(int) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@H@Z @ 173 NONAME ; public: class CApaAppData * __thiscall CApaAppList::FirstApp(int)const + ?GetAllApps@RApaLsSession@@QBEHH@Z @ 174 NONAME ; public: int __thiscall RApaLsSession::GetAllApps(int)const + ?GetEmbeddableApps@RApaLsSession@@QBEHH@Z @ 175 NONAME ; public: int __thiscall RApaLsSession::GetEmbeddableApps(int)const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@H@Z @ 176 NONAME ; public: int __thiscall RApaLsSession::GetNextApp(class TApaAppInfo &,int)const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@H@Z @ 177 NONAME ; public: class CApaAppData * __thiscall CApaAppList::NextApp(class CApaAppData const *,int)const + ?ScreenMode@CApaAIFViewData@@QBEHXZ @ 178 NONAME ABSENT ; public: int __thiscall CApaAIFViewData::ScreenMode(void)const + ?ScreenMode@CApaAppViewData@@QBEHXZ @ 179 NONAME ; public: int __thiscall CApaAppViewData::ScreenMode(void)const + ?ShortCaption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 180 NONAME ; public: class TPtrC16 __thiscall CApaSystemControl::ShortCaption(void)const + ?IsIdleUpdateComplete@CApaAppList@@QBEHXZ @ 181 NONAME ; public: int __thiscall CApaAppList::IsIdleUpdateComplete(void)const + ?IsAppReady@CApaWindowGroupName@@QBEHXZ @ 182 NONAME ; public: int __thiscall CApaWindowGroupName::IsAppReady(void)const + ?SetAppReady@CApaWindowGroupName@@QAEXH@Z @ 183 NONAME ; public: void __thiscall CApaWindowGroupName::SetAppReady(int) + ?InitListL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 184 NONAME ; public: void __thiscall CApaAppList::InitListL(class MApaAppListObserver *) + ?NumberOfBitmaps@CApaAppInfoFileReader@@QBEHXZ @ 185 NONAME ABSENT ; public: int __thiscall CApaAppInfoFileReader::NumberOfBitmaps(void)const + ?IsFirstScanComplete@CApaAppList@@QBEHXZ @ 186 NONAME ; public: int __thiscall CApaAppList::IsFirstScanComplete(void)const + ?SetMaskBitmap@CApaMaskedBitmap@@QAEXPAVCFbsBitmap@@@Z @ 187 NONAME ; public: void __thiscall CApaMaskedBitmap::SetMaskBitmap(class CFbsBitmap *) + ?GetAppInfo_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@VTUid@@@Z @ 188 NONAME ABSENT ; int RApaLsSession::GetAppInfo_7_0(class TApaAppInfo_7_0 &, class TUid) const + ?GetNextApp_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@@Z @ 189 NONAME ABSENT ; int RApaLsSession::GetNextApp_7_0(class TApaAppInfo_7_0 &) const + ?GetNextApp_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@H@Z @ 190 NONAME ABSENT ; int RApaLsSession::GetNextApp_7_0(class TApaAppInfo_7_0 &, int) const + ?GetIconInfo@CApaAppData@@QAEXAAH0@Z @ 191 NONAME ; public: void __thiscall CApaAppData::GetIconInfo(int &,int &) + ?NumberOfOwnDefinedIcons@RApaLsSession@@QBEHVTUid@@AAH@Z @ 192 NONAME ; public: int __thiscall RApaLsSession::NumberOfOwnDefinedIcons(class TUid,int &)const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@@Z @ 193 NONAME ; public: int __thiscall RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &)const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@H@Z @ 194 NONAME ; public: int __thiscall RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &,int)const + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppFinder@@PAVCApaAppRegFinder@@@Z @ 195 NONAME ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppFinder *, class CApaAppRegFinder *) + ?DefaultScreenNumber@CApaAppData@@QBEIXZ @ 196 NONAME ; unsigned int CApaAppData::DefaultScreenNumber(void) const + ?GetFilteredApps@RApaLsSession@@QBEHII@Z @ 197 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHIIH@Z @ 198 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int, int) const + ?RegistrationFileUsed@CApaAppData@@QBEHXZ @ 199 NONAME ; int CApaAppData::RegistrationFileUsed(void) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAPAVHBufC16@@@Z @ 200 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class HBufC16 * &) const + ?IconFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 201 NONAME ; class TPtrC16 CApaAppData::IconFileName(void) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0AAPAVHBufC16@@@Z @ 202 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class HBufC16 * &) const + ?IconFileName@CApaAppViewData@@QBE?AVTPtrC16@@XZ @ 203 NONAME ; class TPtrC16 CApaAppViewData::IconFileName(void) const + ?NonMbmIconFile@CApaAppData@@QBEHXZ @ 204 NONAME ; int CApaAppData::NonMbmIconFile(void) const + ?NonMbmIconFile@CApaAppViewData@@QBEHXZ @ 205 NONAME ; int CApaAppViewData::NonMbmIconFile(void) const + ?StartupApaServer@@YAHAAVMApaAppStarter@@@Z @ 206 NONAME ; int StartupApaServer(class MApaAppStarter &) + ?StartupApaServerProcess@@YAHXZ @ 207 NONAME ; int StartupApaServerProcess(void) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@@Z @ 208 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@FVTUid@@@Z @ 209 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, short, class TUid) + ?InsertDataMappingIfHigher@RApaLsSession@@QAEHABVTDataType@@FVTUid@@AAH@Z @ 210 NONAME ; int RApaLsSession::InsertDataMappingIfHigher(class TDataType const &, short, class TUid, int &) + ?ApplicationLanguage@CApaAppData@@QBE?AW4TLanguage@@XZ @ 211 NONAME ; enum TLanguage CApaAppData::ApplicationLanguage(void) const + ?ApplicationLanguage@RApaLsSession@@QBEHVTUid@@AAW4TLanguage@@@Z @ 212 NONAME ; int RApaLsSession::ApplicationLanguage(class TUid, enum TLanguage &) const + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@@Z @ 213 NONAME ; class CApaSystemControlList * CApaSystemControlList::NewL(class RFs &) + ?AppForDataTypeAndService@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 214 NONAME ; int RApaLsSession::AppForDataTypeAndService(class TDataType const &, class TUid, class TUid &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHAAVRFile@@VTUid@@AAV3@AAVTDataType@@@Z @ 215 NONAME ; int RApaLsSession::AppForDocumentAndService(class RFile &, class TUid, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVTDesC16@@VTUid@@AAV3@AAVTDataType@@@Z @ 216 NONAME ; int RApaLsSession::AppForDocumentAndService(class TDesC16 const &, class TUid, class TUid &, class TDataType &) const + ?GetAppServiceOpaqueDataLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@0@Z @ 217 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServiceOpaqueDataLC(class TUid, class TUid) const + ?GetAppServicesL@RApaLsSession@@QBEXVTUid@@AAV?$CArrayFixFlat@VTUid@@@@@Z @ 218 NONAME ; void RApaLsSession::GetAppServicesL(class TUid, class CArrayFixFlat &) const + ?GetAppServicesLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 219 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServicesLC(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@@Z @ 220 NONAME ; int RApaLsSession::GetServerApps(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@H@Z @ 221 NONAME ; int RApaLsSession::GetServerApps(class TUid, int) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 222 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid) const + ?ImplementsService@CApaAppData@@QBEHVTUid@@@Z @ 223 NONAME ; int CApaAppData::ImplementsService(class TUid) const + ?OpaqueData@TApaAppServiceInfo@@QBEABVTDesC8@@XZ @ 224 NONAME ; class TDesC8 const & TApaAppServiceInfo::OpaqueData(void) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@PBV2@@Z @ 225 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &, class TUid const *) const + ?ServiceArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 226 NONAME ; class CBufFlat * CApaAppList::ServiceArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 227 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid) const + ?ServiceOpaqueDataBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@0@Z @ 228 NONAME ; class CBufFlat * CApaAppList::ServiceOpaqueDataBufferL(class TUid, class TUid) const + ?ServiceUidBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 229 NONAME ; class CBufFlat * CApaAppList::ServiceUidBufferL(class TUid) const + ?Uid@TApaAppServiceInfo@@QBE?AVTUid@@XZ @ 230 NONAME ; class TUid TApaAppServiceInfo::Uid(void) const + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 231 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TThreadId &, class TRequestStatus *) + ?CreateMaskedBitmapByIndexLC@CApaAppInfoFileReader@@QAEPAVCApaMaskedBitmap@@H@Z @ 232 NONAME ABSENT ; class CApaMaskedBitmap * CApaAppInfoFileReader::CreateMaskedBitmapByIndexLC(int) + ?CancelListPopulationCompleteObserver@RApaLsSession@@QBEHXZ @ 233 NONAME ; int RApaLsSession::CancelListPopulationCompleteObserver(void) const + ?RegisterListPopulationCompleteObserver@RApaLsSession@@QBEXAAVTRequestStatus@@@Z @ 234 NONAME ; void RApaLsSession::RegisterListPopulationCompleteObserver(class TRequestStatus &) const + ?NewInterimFormatFileWriterLC@ForJavaMIDletInstaller@@SAPAVCApaAppInfoFileWriter@@AAVRFs@@ABVTDesC16@@VTUid@@KH@Z @ 235 NONAME ABSENT ; class CApaAppInfoFileWriter * ForJavaMIDletInstaller::NewInterimFormatFileWriterLC(class RFs &, class TDesC16 const &, class TUid, unsigned long, int) + ?CheckInterimFormatFileNotCorruptL@ForJavaMIDletInstaller@@SAXAAVRFile@@@Z @ 236 NONAME ABSENT ; void ForJavaMIDletInstaller::CheckInterimFormatFileNotCorruptL(class RFile &) + ?RegisterJavaMIDletViaIterimFormat@RApaLsSession@@QAEHABVTDesC16@@AAVRFile@@@Z @ 237 NONAME ABSENT ; int RApaLsSession::RegisterJavaMIDletViaIterimFormat(class TDesC16 const &, class RFile &) + ?DeregisterJavaMIDlet@RApaLsSession@@QAEHABVTDesC16@@@Z @ 238 NONAME ABSENT ; int RApaLsSession::DeregisterJavaMIDlet(class TDesC16 const &) + ?AppForDocument@RApaLsSession@@QBEHAAVRFile@@AAVTUid@@AAVTDataType@@@Z @ 239 NONAME ; int RApaLsSession::AppForDocument(class RFile &, class TUid &, class TDataType &) const + ?ClearFsSession@RApaLsSession@@SAXXZ @ 240 NONAME ; void RApaLsSession::ClearFsSession(void) + ?FsSession@RApaLsSession@@SAPAVRFs@@XZ @ 241 NONAME ; class RFs * RApaLsSession::FsSession(void) + ?RecognizeData@RApaLsSession@@QBEHAAVRFile@@AAVTDataRecognitionResult@@@Z @ 242 NONAME ; int RApaLsSession::RecognizeData(class RFile &, class TDataRecognitionResult &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHAAVRFile@@ABVTDataType@@AAH@Z @ 243 NONAME ; int RApaLsSession::RecognizeSpecificData(class RFile &, class TDataType const &, int &) const + ?SetFsSessionL@RApaLsSession@@SAXAAVRFs@@@Z @ 244 NONAME ; void RApaLsSession::SetFsSessionL(class RFs &) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@ABVTDataType@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 245 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TDataType const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@VTUid@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 246 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TUid, class TThreadId &, class TRequestStatus *) + ?GetPreferredBufSize@RApaLsSession@@QBEHAAH@Z @ 247 NONAME ; public: int __thiscall RApaLsSession::GetPreferredBufSize(int &)const + ?GetJavaMIDletInfoL@ForJavaMIDletInstaller@@SAXAAVRFs@@ABVTDesC16@@AAK2@Z @ 248 NONAME ABSENT ; void ForJavaMIDletInstaller::GetJavaMIDletInfoL(class RFs &, class TDesC16 const &, unsigned long &, unsigned long &) + ?HandleAsRegistrationFile@ApaUtils@@SAHABVTUidType@@@Z @ 249 NONAME ; int ApaUtils::HandleAsRegistrationFile(class TUidType const &) + ?DataTypes@TApaAppServiceInfo@@QBEABV?$CArrayFixFlat@VTDataTypeWithPriority@@@@XZ @ 250 NONAME ; class CArrayFixFlat const & TApaAppServiceInfo::DataTypes(void) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@ABVTDataType@@@Z @ 251 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid, class TDataType const &) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@ABVTDataType@@@Z @ 252 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid, class TDataType const &) const + ?Close@RApaLsSession@@QAEXXZ @ 253 NONAME ; void RApaLsSession::Close(void) + ?RegisterNonNativeApplicationType@RApaLsSession@@QAEHVTUid@@ABVTDesC16@@@Z @ 254 NONAME ; int RApaLsSession::RegisterNonNativeApplicationType(class TUid, class TDesC16 const &) + ?DeregisterNonNativeApplicationType@RApaLsSession@@QAEHVTUid@@@Z @ 255 NONAME ; int RApaLsSession::DeregisterNonNativeApplicationType(class TUid) + ?RegisterNonNativeApplication@RApaLsSession@@QAEHVTUid@@AAVRFile@@PAV3@2@Z @ 256 NONAME ; int RApaLsSession::RegisterNonNativeApplication(class TUid, class RFile &, class RFile &, class RFile &) + ?DeregisterNonNativeApplication@RApaLsSession@@QAEHVTUid@@@Z @ 257 NONAME ; int RApaLsSession::DeregisterNonNativeApplication(class TUid) + ?AppDataByFileName@CApaAppList@@QBEPAVCApaAppData@@ABVTDesC16@@@Z @ 258 NONAME ; class CApaAppData* CApaAppList::AppDataByFileName(class TDesC16 const &) const + ?LocalisableResourceFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 259 NONAME ; class TPtrC16 CApaAppData::LocalisableResourceFileName(void) const + ?OpaqueData@CApaAppData@@QBE?AVTPtrC8@@XZ @ 260 NONAME ; class TPtrC8 CApaAppData::OpaqueData(void) const + ?RegistrationFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 261 NONAME ; class TPtrC16 CApaAppData::RegistrationFileName(void) const + ?SetAppShortCaption@RApaLsSession@@QAEHABVTDesC16@@W4TLanguage@@VTUid@@@Z @ 262 NONAME ; int RApaLsSession::SetAppShortCaption(class TDesC16 const &, enum TLanguage, class TUid) + ?CheckAppSecurity@CApaSecurityUtils@@SAHABVTPtrC16@@AAH1@Z @ 263 NONAME ; int CApaSecurityUtils::CheckAppSecurity(class TPtrC16 const &, int &, int &) diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1_EXCEPT_REMNANT_FOR_JAVA_MIDLET_INSTALLERU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1_EXCEPT_REMNANT_FOR_JAVA_MIDLET_INSTALLERU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,334 @@ +EXPORTS + ??0RApaLsSession@@QAE@XZ @ 1 NONAME ; public: __thiscall RApaLsSession::RApaLsSession(void) + ??0TApaPictureFactory@@QAE@PAVCApaProcess@@@Z @ 2 NONAME ; public: __thiscall TApaPictureFactory::TApaPictureFactory(class CApaProcess *) + ??0TApaTask@@QAE@AAVRWsSession@@@Z @ 3 NONAME ; public: __thiscall TApaTask::TApaTask(class RWsSession &) + ??0TApaTaskList@@QAE@AAVRWsSession@@@Z @ 4 NONAME ; public: __thiscall TApaTaskList::TApaTaskList(class RWsSession &) + ??1CApaAppInfoFileReader@@UAE@XZ @ 5 NONAME ABSENT ; public: virtual __thiscall CApaAppInfoFileReader::~CApaAppInfoFileReader(void) + ??1CApaAppInfoFileWriter@@UAE@XZ @ 6 NONAME ; public: virtual __thiscall CApaAppInfoFileWriter::~CApaAppInfoFileWriter(void) + ??1CApaAppList@@UAE@XZ @ 7 NONAME ; public: virtual __thiscall CApaAppList::~CApaAppList(void) + ??1CApaDoor@@UAE@XZ @ 8 NONAME ; public: virtual __thiscall CApaDoor::~CApaDoor(void) + ??1CApaMaskedBitmap@@UAE@XZ @ 9 NONAME ; public: virtual __thiscall CApaMaskedBitmap::~CApaMaskedBitmap(void) + ??1CApaWindowGroupName@@UAE@XZ @ 10 NONAME ; public: virtual __thiscall CApaWindowGroupName::~CApaWindowGroupName(void) + ?AddCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@@Z @ 11 NONAME ; public: void __thiscall CApaAppInfoFileWriter::AddCaptionL(enum TLanguage,class TDesC16 const &) + ?AddIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@@Z @ 12 NONAME ; public: void __thiscall CApaAppInfoFileWriter::AddIconL(class CApaMaskedBitmap &) + ?AddIconL@CApaAppInfoFileWriter@@QAEXABVTDesC16@@@Z @ 13 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddIconL(class TDesC16 const &) + ?AppCount@RApaLsSession@@QBEHAAH@Z @ 14 NONAME ; public: int __thiscall RApaLsSession::AppCount(int &)const + ?AppDataByUid@CApaAppList@@QBEPAVCApaAppData@@VTUid@@@Z @ 15 NONAME ; public: class CApaAppData * __thiscall CApaAppList::AppDataByUid(class TUid)const + ?AppEntry@CApaAppData@@QBE?AVTApaAppEntry@@XZ @ 16 NONAME ; public: class TApaAppEntry __thiscall CApaAppData::AppEntry(void)const + ?AppUid@CApaWindowGroupName@@QBE?AVTUid@@XZ @ 17 NONAME ; public: class TUid __thiscall CApaWindowGroupName::AppUid(void)const + ?AppUidL@CApaDoor@@QBE?AVTUid@@XZ @ 18 NONAME ; public: class TUid __thiscall CApaDoor::AppUidL(void)const + ?BringToForeground@TApaTask@@QAEXXZ @ 19 NONAME ; public: void __thiscall TApaTask::BringToForeground(void) + ?Capability@CApaAppData@@QBEXAAVTDes8@@@Z @ 20 NONAME ; public: void __thiscall CApaAppData::Capability(class TDes8 &)const + ?Capability@CApaAppInfoFileReader@@QBEXAAVTDes8@@@Z @ 21 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::Capability(class TDes8 &)const + ?Caption@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 22 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::Caption(void)const + ?CaptionL@CApaAppInfoFileReader@@QAE?AV?$TBuf@$0BAA@@@W4TLanguage@@@Z @ 23 NONAME ABSENT ; public: class TBuf<256> __thiscall CApaAppInfoFileReader::CaptionL(enum TLanguage) + ?Connect@RApaLsSession@@QAEHXZ @ 24 NONAME ; public: int __thiscall RApaLsSession::Connect(void) + ?ConstructFromWgIdL@CApaWindowGroupName@@QAEXH@Z @ 25 NONAME ; public: void __thiscall CApaWindowGroupName::ConstructFromWgIdL(int) + ?Count@CApaAppList@@QBEHXZ @ 26 NONAME ; public: int __thiscall CApaAppList::Count(void)const + ?CreateMaskedBitmapL@CApaAppInfoFileReader@@QAEPAVCApaMaskedBitmap@@H@Z @ 27 NONAME ABSENT ; public: class CApaMaskedBitmap * __thiscall CApaAppInfoFileReader::CreateMaskedBitmapL(int) + ?CycleTasks@TApaTaskList@@QAEHVTUid@@W4TCycleDirection@1@@Z @ 28 NONAME ; public: int __thiscall TApaTaskList::CycleTasks(class TUid,enum TApaTaskList::TCycleDirection) + ?DocName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 29 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::DocName(void)const + ?DocNameIsAFile@CApaWindowGroupName@@QBEHXZ @ 30 NONAME ; public: int __thiscall CApaWindowGroupName::DocNameIsAFile(void)const + ?DocumentL@CApaDoor@@QAEPAVCApaDocument@@H@Z @ 31 NONAME ; public: class CApaDocument * __thiscall CApaDoor::DocumentL(int) + ?EmbeddableAppCount@RApaLsSession@@QBEHAAH@Z @ 32 NONAME ; public: int __thiscall RApaLsSession::EmbeddableAppCount(int &)const + ?EndTask@TApaTask@@QAEXXZ @ 33 NONAME ; public: void __thiscall TApaTask::EndTask(void) + ?Exists@TApaTask@@QBEHXZ @ 34 NONAME ; public: int __thiscall TApaTask::Exists(void)const + ?ExternalizeL@CApaMaskedBitmap@@QBEXAAVRWriteStream@@@Z @ 35 NONAME ; public: void __thiscall CApaMaskedBitmap::ExternalizeL(class RWriteStream &)const + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 36 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindApp(class TDesC16 const &) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@VTUid@@@Z @ 37 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindApp(class TUid) + ?FindByAppUid@CApaWindowGroupName@@SAXVTUid@@AAVRWsSession@@AAH@Z @ 38 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByAppUid(class TUid,class RWsSession &,int &) + ?FindByCaption@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 39 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByCaption(class TDesC16 const &,class RWsSession &,int &) + ?FindByDocName@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 40 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByDocName(class TDesC16 const &,class RWsSession &,int &) + ?FindByPos@TApaTaskList@@QAE?AVTApaTask@@H@Z @ 41 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindByPos(int) + ?FindDoc@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 42 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindDoc(class TDesC16 const &) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@XZ @ 43 NONAME ; public: class CApaAppData * __thiscall CApaAppList::FirstApp(void)const + ?GetAllApps@RApaLsSession@@QBEHXZ @ 44 NONAME ; public: int __thiscall RApaLsSession::GetAllApps(void)const + ?GetAppCapability@RApaLsSession@@QBEHAAVTDes8@@VTUid@@@Z @ 45 NONAME ; public: int __thiscall RApaLsSession::GetAppCapability(class TDes8 &,class TUid)const + ?GetAppInfo@RApaLsSession@@QBEHAAVTApaAppInfo@@VTUid@@@Z @ 46 NONAME ; public: int __thiscall RApaLsSession::GetAppInfo(class TApaAppInfo &,class TUid)const + ?GetEmbeddableApps@RApaLsSession@@QBEHXZ @ 47 NONAME ; public: int __thiscall RApaLsSession::GetEmbeddableApps(void)const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@@Z @ 48 NONAME ; public: int __thiscall RApaLsSession::GetNextApp(class TApaAppInfo &)const + ?InternalizeL@CApaMaskedBitmap@@QAEXAAVRReadStream@@@Z @ 49 NONAME ; public: void __thiscall CApaMaskedBitmap::InternalizeL(class RReadStream &) + ?IsBusy@CApaWindowGroupName@@QBEHXZ @ 50 NONAME ; public: int __thiscall CApaWindowGroupName::IsBusy(void)const + ?IsSystem@CApaWindowGroupName@@QBEHXZ @ 51 NONAME ; public: int __thiscall CApaWindowGroupName::IsSystem(void)const + ?KillTask@TApaTask@@QAEXXZ @ 52 NONAME ; public: void __thiscall TApaTask::KillTask(void) + ?Mask@CApaMaskedBitmap@@QBEPAVCFbsBitmap@@XZ @ 53 NONAME ; public: class CFbsBitmap * __thiscall CApaMaskedBitmap::Mask(void)const + ?New@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@PAVHBufC16@@@Z @ 54 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::New(class RWsSession const &,class HBufC16 *) + ?NewL@CApaAppInfoFileReader@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 55 NONAME ABSENT ; public: static class CApaAppInfoFileReader * __cdecl CApaAppInfoFileReader::NewL(class RFs &,class TDesC16 const &,class TUid) + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppRegFinder@@HH@Z @ 56 NONAME ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppRegFinder *, int,int) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 57 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewL(class RFs &,class CApaDocument &,class TSize const &) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@ABVCStreamStore@@VTStreamId@@AAVCApaProcess@@@Z @ 58 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewL(class RFs &,class CStreamStore const &,class TStreamId,class CApaProcess &) + ?NewL@CApaMaskedBitmap@@SAPAV1@PBV1@@Z @ 59 NONAME ; class CApaMaskedBitmap * CApaMaskedBitmap::NewL(class CApaMaskedBitmap const *) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 60 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 61 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &,class TDesC16 const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 62 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &,int) + ?NewLC@CApaAppInfoFileReader@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 63 NONAME ABSENT ; public: static class CApaAppInfoFileReader * __cdecl CApaAppInfoFileReader::NewLC(class RFs &,class TDesC16 const &,class TUid) + ?NewLC@CApaAppInfoFileWriter@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 64 NONAME ABSENT ; public: static class CApaAppInfoFileWriter * __cdecl CApaAppInfoFileWriter::NewLC(class RFs &,class TDesC16 const &,class TUid) + ?NewLC@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 65 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewLC(class RFs &,class CApaDocument &,class TSize const &) + ?NewLC@CApaMaskedBitmap@@SAPAV1@XZ @ 66 NONAME ; public: static class CApaMaskedBitmap * __cdecl CApaMaskedBitmap::NewLC(void) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 67 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 68 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &,class TDesC16 const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 69 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &,int) + ?NewPictureL@TApaPictureFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 70 NONAME ; public: virtual void __thiscall TApaPictureFactory::NewPictureL(class TPictureHeader &,class CStreamStore const &)const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@@Z @ 71 NONAME ; public: class CApaAppData * __thiscall CApaAppList::NextApp(class CApaAppData const *)const + ?PurgeL@CApaAppList@@QAEXXZ @ 72 NONAME ; public: void __thiscall CApaAppList::PurgeL(void) + ?RespondsToShutdownEvent@CApaWindowGroupName@@QBEHXZ @ 73 NONAME ; public: int __thiscall CApaWindowGroupName::RespondsToShutdownEvent(void)const + ?RespondsToSwitchFilesEvent@CApaWindowGroupName@@QBEHXZ @ 74 NONAME ; public: int __thiscall CApaWindowGroupName::RespondsToSwitchFilesEvent(void)const + ?RestoreL@CApaDoor@@QAEXABVCStreamStore@@VTStreamId@@@Z @ 75 NONAME ; public: void __thiscall CApaDoor::RestoreL(class CStreamStore const &,class TStreamId) + ?SendKey@TApaTask@@QAEXABUTKeyEvent@@@Z @ 76 NONAME ; public: void __thiscall TApaTask::SendKey(struct TKeyEvent const &) + ?SendKey@TApaTask@@QAEXHH@Z @ 77 NONAME ; public: void __thiscall TApaTask::SendKey(int,int) + ?SendMessage@TApaTask@@QAEHVTUid@@ABVTDesC8@@@Z @ 78 NONAME ; public: int __thiscall TApaTask::SendMessage(class TUid,class TDesC8 const &) + ?SendSystemEvent@TApaTask@@QAEXW4TApaSystemEvent@@@Z @ 79 NONAME ; public: void __thiscall TApaTask::SendSystemEvent(enum TApaSystemEvent) + ?SendToBackground@TApaTask@@QAEXXZ @ 80 NONAME ; public: void __thiscall TApaTask::SendToBackground(void) + ?SetAppUid@CApaWindowGroupName@@QAEXVTUid@@@Z @ 81 NONAME ; public: void __thiscall CApaWindowGroupName::SetAppUid(class TUid) + ?SetBusy@CApaWindowGroupName@@QAEXH@Z @ 82 NONAME ; public: void __thiscall CApaWindowGroupName::SetBusy(int) + ?SetCapability@CApaAppInfoFileWriter@@QAEHABVTDesC8@@@Z @ 83 NONAME ; public: int __thiscall CApaAppInfoFileWriter::SetCapability(class TDesC8 const &) + ?SetCaptionL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 84 NONAME ; public: void __thiscall CApaWindowGroupName::SetCaptionL(class TDesC16 const &) + ?SetDocNameIsAFile@CApaWindowGroupName@@QAEXH@Z @ 85 NONAME ; public: void __thiscall CApaWindowGroupName::SetDocNameIsAFile(int) + ?SetDocNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 86 NONAME ; public: void __thiscall CApaWindowGroupName::SetDocNameL(class TDesC16 const &) + ?SetFormatToGlassL@CApaDoor@@QAEXXZ @ 87 NONAME ; public: void __thiscall CApaDoor::SetFormatToGlassL(void) + ?SetFormatToIconL@CApaDoor@@QAEXXZ @ 88 NONAME ; public: void __thiscall CApaDoor::SetFormatToIconL(void) + ?SetFormatToTemporaryIconL@CApaDoor@@QAEXH@Z @ 89 NONAME ; public: void __thiscall CApaDoor::SetFormatToTemporaryIconL(int) + ?SetRespondsToShutdownEvent@CApaWindowGroupName@@QAEXH@Z @ 90 NONAME ; public: void __thiscall CApaWindowGroupName::SetRespondsToShutdownEvent(int) + ?SetRespondsToSwitchFilesEvent@CApaWindowGroupName@@QAEXH@Z @ 91 NONAME ; public: void __thiscall CApaWindowGroupName::SetRespondsToSwitchFilesEvent(int) + ?SetSystem@CApaWindowGroupName@@QAEXH@Z @ 92 NONAME ; public: void __thiscall CApaWindowGroupName::SetSystem(int) + ?SetWgId@TApaTask@@QAEXH@Z @ 93 NONAME ; public: void __thiscall TApaTask::SetWgId(int) + ?SetWindowGroupName@CApaWindowGroupName@@QAEXPAVHBufC16@@@Z @ 94 NONAME ; public: void __thiscall CApaWindowGroupName::SetWindowGroupName(class HBufC16 *) + ?SetWindowGroupName@CApaWindowGroupName@@QBEHAAVRWindowGroup@@@Z @ 95 NONAME ; public: int __thiscall CApaWindowGroupName::SetWindowGroupName(class RWindowGroup &)const + ?SetWindowGroupNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 96 NONAME ; public: void __thiscall CApaWindowGroupName::SetWindowGroupNameL(class TDesC16 const &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@@Z @ 97 NONAME ; public: int __thiscall RApaLsSession::StartApp(class CApaCommandLine const &) + ?StoreL@CApaAppInfoFileWriter@@QAEXXZ @ 98 NONAME ; public: void __thiscall CApaAppInfoFileWriter::StoreL(void) + ?StretchDrawL@CApaAppInfoFileReader@@SAXPAVCFbsBitmap@@0VTSize@@@Z @ 99 NONAME ABSENT ; public: static void __cdecl CApaAppInfoFileReader::StretchDrawL(class CFbsBitmap *,class CFbsBitmap *,class TSize) + ?SwitchCreateFile@TApaTask@@QAEHABVTDesC16@@@Z @ 100 NONAME ; public: int __thiscall TApaTask::SwitchCreateFile(class TDesC16 const &) + ?SwitchOpenFile@TApaTask@@QAEHABVTDesC16@@@Z @ 101 NONAME ; public: int __thiscall TApaTask::SwitchOpenFile(class TDesC16 const &) + ?ThreadId@TApaTask@@QBE?AVTThreadId@@XZ @ 102 NONAME ; public: class TThreadId __thiscall TApaTask::ThreadId(void)const + ?UpdateCounter@CApaAppList@@QBEHXZ @ 103 NONAME ; public: int __thiscall CApaAppList::UpdateCounter(void)const + ?UpdateL@CApaAppList@@QAEXXZ @ 104 NONAME ABSENT ; public: void __thiscall CApaAppList::UpdateL(void) + ?Version@RApaLsSession@@QBE?AVTVersion@@XZ @ 105 NONAME ; public: class TVersion __thiscall RApaLsSession::Version(void)const + ?WgId@TApaTask@@QBEHXZ @ 106 NONAME ; public: int __thiscall TApaTask::WgId(void)const + ?WindowGroupName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 107 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::WindowGroupName(void)const + ??1CApaSystemControlList@@UAE@XZ @ 108 NONAME ; public: virtual __thiscall CApaSystemControlList::~CApaSystemControlList(void) + ?Caption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 109 NONAME ; public: class TPtrC16 __thiscall CApaSystemControl::Caption(void)const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@H@Z @ 110 NONAME ; public: class CApaSystemControl * __thiscall CApaSystemControlList::Control(int)const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@VTUid@@@Z @ 111 NONAME ; public: class CApaSystemControl * __thiscall CApaSystemControlList::Control(class TUid)const + ?Count@CApaSystemControlList@@QBEHXZ @ 112 NONAME ; public: int __thiscall CApaSystemControlList::Count(void)const + ?CreateL@CApaSystemControl@@QAEXXZ @ 113 NONAME ; public: void __thiscall CApaSystemControl::CreateL(void) + ?FileName@CApaSystemControl@@QBE?AV?$TBuf@$0BAA@@@XZ @ 114 NONAME ; public: class TBuf<256> __thiscall CApaSystemControl::FileName(void)const + ?Icon@CApaSystemControl@@QBEPAVCApaMaskedBitmap@@XZ @ 115 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaSystemControl::Icon(void)const + ?Index@CApaSystemControlList@@QBEHVTUid@@@Z @ 116 NONAME ; public: int __thiscall CApaSystemControlList::Index(class TUid)const + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@AAVCApaAppFinder@@ABVTDesC16@@@Z @ 117 NONAME ABSENT ; public: static class CApaSystemControlList * __cdecl CApaSystemControlList::NewL(class RFs &,class CApaAppFinder &,class TDesC16 const &) + ?Type@CApaSystemControl@@QBE?AVTUid@@XZ @ 118 NONAME ; public: class TUid __thiscall CApaSystemControl::Type(void)const + ?UpdateL@CApaSystemControlList@@QAEXXZ @ 119 NONAME ; public: void __thiscall CApaSystemControlList::UpdateL(void) + ?AddDataTypeL@CApaAppInfoFileWriter@@QAEXABVTDataTypeWithPriority@@@Z @ 120 NONAME ; public: void __thiscall CApaAppInfoFileWriter::AddDataTypeL(class TDataTypeWithPriority const &) + ?AppForDataType@RApaLsSession@@QBEHABVTDataType@@AAVTUid@@@Z @ 121 NONAME ; public: int __thiscall RApaLsSession::AppForDataType(class TDataType const &,class TUid &)const + ?AppForDocument@RApaLsSession@@QBEHABVTDesC16@@AAVTUid@@AAVTDataType@@@Z @ 122 NONAME ; public: int __thiscall RApaLsSession::AppForDocument(class TDesC16 const &,class TUid &,class TDataType &)const + ?CreateDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 123 NONAME ; public: int __thiscall RApaLsSession::CreateDocument(class TDesC16 const &,class TUid,class TThreadId &,enum RApaLsSession::TLaunchType) + ?DataType@CApaAppData@@QBEJABVTDataType@@@Z @ 124 NONAME ; long CApaAppData::DataType(class TDataType const &) const + ?DataTypesSupportedL@CApaAppInfoFileReader@@QBEXAAV?$CArrayFix@VTDataTypeWithPriority@@@@@Z @ 125 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::DataTypesSupportedL(class CArrayFix &)const + ?GetAcceptedConfidence@RApaLsSession@@QBEHAAH@Z @ 126 NONAME ; public: int __thiscall RApaLsSession::GetAcceptedConfidence(int &)const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@HAAVCApaMaskedBitmap@@@Z @ 127 NONAME ; public: int __thiscall RApaLsSession::GetAppIcon(class TUid,int,class CApaMaskedBitmap &)const + ?GetMaxDataBufSize@RApaLsSession@@QBEHAAH@Z @ 128 NONAME ; public: int __thiscall RApaLsSession::GetMaxDataBufSize(int &)const + ?GetSupportedDataTypesL@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTDataType@@@@@Z @ 129 NONAME ; public: int __thiscall RApaLsSession::GetSupportedDataTypesL(class CArrayFixFlat &)const + ?IsProgram@RApaLsSession@@QBEHABVTDesC16@@AAH@Z @ 130 NONAME ; public: int __thiscall RApaLsSession::IsProgram(class TDesC16 const &,int &)const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@@Z @ 131 NONAME ; public: class TUid __thiscall CApaAppList::PreferredDataHandlerL(class TDataType const &)const + ?RecognizeData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVTDataRecognitionResult@@@Z @ 132 NONAME ; public: int __thiscall RApaLsSession::RecognizeData(class TDesC16 const &,class TDesC8 const &,class TDataRecognitionResult &)const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@ABVTDataType@@AAH@Z @ 133 NONAME ; public: int __thiscall RApaLsSession::RecognizeSpecificData(class TDesC16 const &,class TDesC8 const &,class TDataType const &,int &)const + ?SetAcceptedConfidence@RApaLsSession@@QAEHH@Z @ 134 NONAME ; public: int __thiscall RApaLsSession::SetAcceptedConfidence(int) + ?SetMaxDataBufSize@RApaLsSession@@QAEHH@Z @ 135 NONAME ; public: int __thiscall RApaLsSession::SetMaxDataBufSize(int) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@AAVTThreadId@@W4TLaunchType@1@@Z @ 136 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@ABVTDataType@@AAVTThreadId@@W4TLaunchType@1@@Z @ 137 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TDataType const &,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 138 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TUid,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartIdleUpdateL@CApaAppList@@QAEXXZ @ 139 NONAME ; public: void __thiscall CApaAppList::StartIdleUpdateL(void) + ??1CApaAppListNotifier@@UAE@XZ @ 140 NONAME ; public: virtual __thiscall CApaAppListNotifier::~CApaAppListNotifier(void) + ?NewL@CApaAppListNotifier@@SAPAV1@PAVMApaAppListServObserver@@W4TPriority@CActive@@@Z @ 141 NONAME ; public: static class CApaAppListNotifier * __cdecl CApaAppListNotifier::NewL(class MApaAppListServObserver *,enum CActive::TPriority) + ?StartIdleUpdateL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 142 NONAME ; public: void __thiscall CApaAppList::StartIdleUpdateL(class MApaAppListObserver *) + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@VTSize@@AAVCApaMaskedBitmap@@@Z @ 143 NONAME ; public: int __thiscall RApaLsSession::GetAppIcon(class TUid,class TSize,class CApaMaskedBitmap &)const + ?GetAppIconSizes@RApaLsSession@@QBEHVTUid@@AAV?$CArrayFixFlat@VTSize@@@@@Z @ 144 NONAME ; public: int __thiscall RApaLsSession::GetAppIconSizes(class TUid,class CArrayFixFlat &)const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@VTSize@@@Z @ 145 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppData::Icon(class TSize)const + ?IconSizesL@CApaAppData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 146 NONAME ; public: class CArrayFixFlat * __thiscall CApaAppData::IconSizesL(void)const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@H@Z @ 147 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppData::Icon(int)const + ?Hidden@CApaWindowGroupName@@QBEHXZ @ 148 NONAME ; int CApaWindowGroupName::Hidden(void) const + ?SetHidden@CApaWindowGroupName@@QAEXH@Z @ 149 NONAME ; public: void __thiscall CApaWindowGroupName::SetHidden(int) + ?AddViewCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@VTUid@@@Z @ 150 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewCaptionL(enum TLanguage,class TDesC16 const &,class TUid) + ?AddViewIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@VTUid@@@Z @ 151 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewIconL(class CApaMaskedBitmap &,class TUid) + ?AddViewL@CApaAppInfoFileWriter@@QAEXVTUid@@@Z @ 152 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewL(class TUid) + ?CaptionL@CApaAIFViewData@@QBE?AV?$TBuf@$0BAA@@@W4TLanguage@@@Z @ 153 NONAME ABSENT ; public: class TBuf<256> __thiscall CApaAIFViewData::CaptionL(enum TLanguage)const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0ABVTSize@@AAVCApaMaskedBitmap@@@Z @ 154 NONAME ; public: int __thiscall RApaLsSession::GetAppViewIcon(class TUid,class TUid,class TSize const &,class CApaMaskedBitmap &)const + ?GetAppViews@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTApaAppViewInfo@@@@VTUid@@@Z @ 155 NONAME ; public: int __thiscall RApaLsSession::GetAppViews(class CArrayFixFlat &,class TUid)const + ?GetViewsL@CApaAppInfoFileReader@@QBEXAAV?$CArrayPtr@VCApaAIFViewData@@@@@Z @ 156 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::GetViewsL(class CArrayPtr &)const + ?Icon@CApaAppViewData@@QBEPAVCApaMaskedBitmap@@ABVTSize@@@Z @ 157 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppViewData::Icon(class TSize const &)const + ?IconByIndexL@CApaAIFViewData@@QBEPAVCApaMaskedBitmap@@H@Z @ 158 NONAME ABSENT ; public: class CApaMaskedBitmap * __thiscall CApaAIFViewData::IconByIndexL(int)const + ?IconSizesL@CApaAppViewData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 159 NONAME ; public: class CArrayFixFlat * __thiscall CApaAppViewData::IconSizesL(void)const + ?NumberOfIcons@CApaAIFViewData@@QBEHXZ @ 160 NONAME ABSENT ; public: int __thiscall CApaAIFViewData::NumberOfIcons(void)const + ?StoreViewL@CApaAppInfoFileWriter@@QAEXVTUid@@@Z @ 161 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::StoreViewL(class TUid) + ?Uid@CApaAppViewData@@QBE?AVTUid@@XZ @ 162 NONAME ; public: class TUid __thiscall CApaAppViewData::Uid(void)const + ?ViewUid@CApaAIFViewData@@QBE?AVTUid@@XZ @ 163 NONAME ABSENT ; public: class TUid __thiscall CApaAIFViewData::ViewUid(void)const + ?Views@CApaAppData@@QBEPAV?$CArrayPtrFlat@VCApaAppViewData@@@@XZ @ 164 NONAME ; public: class CArrayPtrFlat * __thiscall CApaAppData::Views(void)const + ?AddOwnedFileL@CApaAppInfoFileWriter@@QAEXABVTDesC16@@@Z @ 165 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddOwnedFileL(class TDesC16 const &) + ?GetOwnedFilesL@CApaAppInfoFileReader@@QBEXAAVCDesC16Array@@@Z @ 166 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::GetOwnedFilesL(class CDesC16Array &)const + ?OwnedFiles@CApaAppData@@QBEPAVCDesC16Array@@XZ @ 167 NONAME ; public: class CDesC16Array * __thiscall CApaAppData::OwnedFiles(void)const + ?GetAppOwnedFiles@RApaLsSession@@QBEHAAVCDesC16Array@@VTUid@@@Z @ 168 NONAME ; public: int __thiscall RApaLsSession::GetAppOwnedFiles(class CDesC16Array &,class TUid)const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@@Z @ 169 NONAME ; public: int __thiscall RApaLsSession::StartApp(class CApaCommandLine const &,class TThreadId &) + ?GetAifFileName@AppInfoFileUtils@@SAXABVRFs@@AAVTDes16@@@Z @ 170 NONAME ABSENT ; public: static void __cdecl AppInfoFileUtils::GetAifFileName(class RFs const &,class TDes16 &) + ?AddViewL@CApaAppInfoFileWriter@@QAEXVTUid@@H@Z @ 171 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewL(class TUid,int) + ?CanUseScreenMode@CApaAppData@@QAEHH@Z @ 172 NONAME ; public: int __thiscall CApaAppData::CanUseScreenMode(int) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@H@Z @ 173 NONAME ; public: class CApaAppData * __thiscall CApaAppList::FirstApp(int)const + ?GetAllApps@RApaLsSession@@QBEHH@Z @ 174 NONAME ; public: int __thiscall RApaLsSession::GetAllApps(int)const + ?GetEmbeddableApps@RApaLsSession@@QBEHH@Z @ 175 NONAME ; public: int __thiscall RApaLsSession::GetEmbeddableApps(int)const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@H@Z @ 176 NONAME ; public: int __thiscall RApaLsSession::GetNextApp(class TApaAppInfo &,int)const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@H@Z @ 177 NONAME ; public: class CApaAppData * __thiscall CApaAppList::NextApp(class CApaAppData const *,int)const + ?ScreenMode@CApaAIFViewData@@QBEHXZ @ 178 NONAME ABSENT ; public: int __thiscall CApaAIFViewData::ScreenMode(void)const + ?ScreenMode@CApaAppViewData@@QBEHXZ @ 179 NONAME ; public: int __thiscall CApaAppViewData::ScreenMode(void)const + ?ShortCaption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 180 NONAME ; public: class TPtrC16 __thiscall CApaSystemControl::ShortCaption(void)const + ?IsIdleUpdateComplete@CApaAppList@@QBEHXZ @ 181 NONAME ; public: int __thiscall CApaAppList::IsIdleUpdateComplete(void)const + ?IsAppReady@CApaWindowGroupName@@QBEHXZ @ 182 NONAME ; public: int __thiscall CApaWindowGroupName::IsAppReady(void)const + ?SetAppReady@CApaWindowGroupName@@QAEXH@Z @ 183 NONAME ; public: void __thiscall CApaWindowGroupName::SetAppReady(int) + ?InitListL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 184 NONAME ; public: void __thiscall CApaAppList::InitListL(class MApaAppListObserver *) + ?NumberOfBitmaps@CApaAppInfoFileReader@@QBEHXZ @ 185 NONAME ABSENT ; public: int __thiscall CApaAppInfoFileReader::NumberOfBitmaps(void)const + ?IsFirstScanComplete@CApaAppList@@QBEHXZ @ 186 NONAME ; public: int __thiscall CApaAppList::IsFirstScanComplete(void)const + ?SetMaskBitmap@CApaMaskedBitmap@@QAEXPAVCFbsBitmap@@@Z @ 187 NONAME ; public: void __thiscall CApaMaskedBitmap::SetMaskBitmap(class CFbsBitmap *) + ?GetAppInfo_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@VTUid@@@Z @ 188 NONAME ABSENT ; int RApaLsSession::GetAppInfo_7_0(class TApaAppInfo_7_0 &, class TUid) const + ?GetNextApp_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@@Z @ 189 NONAME ABSENT ; int RApaLsSession::GetNextApp_7_0(class TApaAppInfo_7_0 &) const + ?GetNextApp_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@H@Z @ 190 NONAME ABSENT ; int RApaLsSession::GetNextApp_7_0(class TApaAppInfo_7_0 &, int) const + ?GetIconInfo@CApaAppData@@QBEXAAH0@Z @ 191 NONAME ; void CApaAppData::GetIconInfo(int &, int &) const + ?NumberOfOwnDefinedIcons@RApaLsSession@@QBEHVTUid@@AAH@Z @ 192 NONAME ; public: int __thiscall RApaLsSession::NumberOfOwnDefinedIcons(class TUid,int &)const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@@Z @ 193 NONAME ; public: int __thiscall RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &)const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@H@Z @ 194 NONAME ; public: int __thiscall RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &,int)const + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppFinder@@PAVCApaAppRegFinder@@H@Z @ 195 NONAME ABSENT ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppFinder *, class CApaAppRegFinder *, int) + ?DefaultScreenNumber@CApaAppData@@QBEIXZ @ 196 NONAME ; unsigned int CApaAppData::DefaultScreenNumber(void) const + ?GetFilteredApps@RApaLsSession@@QBEHII@Z @ 197 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHIIH@Z @ 198 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int, int) const + ?RegistrationFileUsed@CApaAppData@@QBEHXZ @ 199 NONAME ; int CApaAppData::RegistrationFileUsed(void) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAPAVHBufC16@@@Z @ 200 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class HBufC16 * &) const + ?IconFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 201 NONAME ; class TPtrC16 CApaAppData::IconFileName(void) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0AAPAVHBufC16@@@Z @ 202 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class HBufC16 * &) const + ?IconFileName@CApaAppViewData@@QBE?AVTPtrC16@@XZ @ 203 NONAME ; class TPtrC16 CApaAppViewData::IconFileName(void) const + ?NonMbmIconFile@CApaAppData@@QBEHXZ @ 204 NONAME ; int CApaAppData::NonMbmIconFile(void) const + ?NonMbmIconFile@CApaAppViewData@@QBEHXZ @ 205 NONAME ; int CApaAppViewData::NonMbmIconFile(void) const + ?StartupApaServer@@YAHAAVMApaAppStarter@@@Z @ 206 NONAME ; int StartupApaServer(class MApaAppStarter &) + ?StartupApaServerProcess@@YAHXZ @ 207 NONAME ; int StartupApaServerProcess(void) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@@Z @ 208 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@@Z @ 209 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid) + ?InsertDataMappingIfHigher@RApaLsSession@@QAEHABVTDataType@@JVTUid@@AAH@Z @ 210 NONAME ; int RApaLsSession::InsertDataMappingIfHigher(class TDataType const &, long, class TUid, int &) + ?ApplicationLanguage@CApaAppData@@QBE?AW4TLanguage@@XZ @ 211 NONAME ; enum TLanguage CApaAppData::ApplicationLanguage(void) const + ?ApplicationLanguage@RApaLsSession@@QBEHVTUid@@AAW4TLanguage@@@Z @ 212 NONAME ; int RApaLsSession::ApplicationLanguage(class TUid, enum TLanguage &) const + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@@Z @ 213 NONAME ; class CApaSystemControlList * CApaSystemControlList::NewL(class RFs &) + ?AppForDataTypeAndService@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 214 NONAME ; int RApaLsSession::AppForDataTypeAndService(class TDataType const &, class TUid, class TUid &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVRFile@@VTUid@@AAV3@AAVTDataType@@@Z @ 215 NONAME ; int RApaLsSession::AppForDocumentAndService(class RFile const &, class TUid, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVTDesC16@@VTUid@@AAV3@AAVTDataType@@@Z @ 216 NONAME ; int RApaLsSession::AppForDocumentAndService(class TDesC16 const &, class TUid, class TUid &, class TDataType &) const + ?GetAppServiceOpaqueDataLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@0@Z @ 217 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServiceOpaqueDataLC(class TUid, class TUid) const + ?GetAppServicesL@RApaLsSession@@QBEXVTUid@@AAV?$CArrayFixFlat@VTUid@@@@@Z @ 218 NONAME ; void RApaLsSession::GetAppServicesL(class TUid, class CArrayFixFlat &) const + ?GetAppServicesLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 219 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServicesLC(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@@Z @ 220 NONAME ; int RApaLsSession::GetServerApps(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@H@Z @ 221 NONAME ; int RApaLsSession::GetServerApps(class TUid, int) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 222 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid) const + ?ImplementsService@CApaAppData@@QBEHVTUid@@@Z @ 223 NONAME ; int CApaAppData::ImplementsService(class TUid) const + ?OpaqueData@TApaAppServiceInfo@@QBEABVTDesC8@@XZ @ 224 NONAME ; class TDesC8 const & TApaAppServiceInfo::OpaqueData(void) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@PBV2@AAH@Z @ 225 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &, class TUid const *, int &) const + ?ServiceArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 226 NONAME ; class CBufFlat * CApaAppList::ServiceArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 227 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid) const + ?ServiceOpaqueDataBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@0@Z @ 228 NONAME ; class CBufFlat * CApaAppList::ServiceOpaqueDataBufferL(class TUid, class TUid) const + ?ServiceUidBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 229 NONAME ; class CBufFlat * CApaAppList::ServiceUidBufferL(class TUid) const + ?Uid@TApaAppServiceInfo@@QBE?AVTUid@@XZ @ 230 NONAME ; class TUid TApaAppServiceInfo::Uid(void) const + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 231 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TThreadId &, class TRequestStatus *) + ?CreateMaskedBitmapByIndexLC@CApaAppInfoFileReader@@QAEPAVCApaMaskedBitmap@@H@Z @ 232 NONAME ABSENT ; class CApaMaskedBitmap * CApaAppInfoFileReader::CreateMaskedBitmapByIndexLC(int) + ?CancelListPopulationCompleteObserver@RApaLsSession@@QBEHXZ @ 233 NONAME ; int RApaLsSession::CancelListPopulationCompleteObserver(void) const + ?RegisterListPopulationCompleteObserver@RApaLsSession@@QBEXAAVTRequestStatus@@@Z @ 234 NONAME ; void RApaLsSession::RegisterListPopulationCompleteObserver(class TRequestStatus &) const + ?NewInterimFormatFileWriterLC@ForJavaMIDletInstaller@@SAPAVCApaAppInfoFileWriter@@AAVRFs@@ABVTDesC16@@VTUid@@KH@Z @ 235 NONAME ; class CApaAppInfoFileWriter * ForJavaMIDletInstaller::NewInterimFormatFileWriterLC(class RFs &, class TDesC16 const &, class TUid, unsigned long, int) + ?CheckInterimFormatFileNotCorruptL@ForJavaMIDletInstaller@@SAXAAVRFile@@@Z @ 236 NONAME ; void ForJavaMIDletInstaller::CheckInterimFormatFileNotCorruptL(class RFile &) + ?RegisterJavaMIDletViaIterimFormat@RApaLsSession@@QAEHABVTDesC16@@AAVRFile@@@Z @ 237 NONAME ABSENT ; int RApaLsSession::RegisterJavaMIDletViaIterimFormat(class TDesC16 const &, class RFile &) + ?DeregisterJavaMIDlet@RApaLsSession@@QAEHABVTDesC16@@@Z @ 238 NONAME ABSENT ; int RApaLsSession::DeregisterJavaMIDlet(class TDesC16 const &) + ?AppForDocument@RApaLsSession@@QBEHABVRFile@@AAVTUid@@AAVTDataType@@@Z @ 239 NONAME ; int RApaLsSession::AppForDocument(class RFile const &, class TUid &, class TDataType &) const + ?ClearFsSession@RApaLsSession@@SAXXZ @ 240 NONAME ; void RApaLsSession::ClearFsSession(void) + ?FsSession@RApaLsSession@@SAPAVRFs@@XZ @ 241 NONAME ; class RFs * RApaLsSession::FsSession(void) + ?RecognizeData@RApaLsSession@@QBEHABVRFile@@AAVTDataRecognitionResult@@@Z @ 242 NONAME ; int RApaLsSession::RecognizeData(class RFile const &, class TDataRecognitionResult &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVRFile@@ABVTDataType@@AAH@Z @ 243 NONAME ; int RApaLsSession::RecognizeSpecificData(class RFile const &, class TDataType const &, int &) const + ?SetFsSessionL@RApaLsSession@@SAXAAVRFs@@@Z @ 244 NONAME ; void RApaLsSession::SetFsSessionL(class RFs &) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@ABVTDataType@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 245 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TDataType const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@VTUid@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 246 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TUid, class TThreadId &, class TRequestStatus *) + ?GetPreferredBufSize@RApaLsSession@@QBEHAAH@Z @ 247 NONAME ; public: int __thiscall RApaLsSession::GetPreferredBufSize(int &)const + ?GetJavaMIDletInfoL@ForJavaMIDletInstaller@@SAXAAVRFs@@ABVTDesC16@@AAK2@Z @ 248 NONAME ; void ForJavaMIDletInstaller::GetJavaMIDletInfoL(class RFs &, class TDesC16 const &, unsigned long &, unsigned long &) + ?HandleAsRegistrationFile@ApaUtils@@SAHABVTUidType@@@Z @ 249 NONAME ; int ApaUtils::HandleAsRegistrationFile(class TUidType const &) + ?DataTypes@TApaAppServiceInfo@@QBEABV?$CArrayFixFlat@VTDataTypeWithPriority@@@@XZ @ 250 NONAME ; class CArrayFixFlat const & TApaAppServiceInfo::DataTypes(void) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@ABVTDataType@@@Z @ 251 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid, class TDataType const &) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@ABVTDataType@@@Z @ 252 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid, class TDataType const &) const + ?Close@RApaLsSession@@QAEXXZ @ 253 NONAME ; void RApaLsSession::Close(void) + ??0MApaAppListServObserver@@IAE@XZ @ 254 NONAME ; MApaAppListServObserver::MApaAppListServObserver(void) + ??0TApaPictureFactory@@IAE@XZ @ 255 NONAME ; TApaPictureFactory::TApaPictureFactory(void) + ?MApaAppListServObserver_Reserved1@MApaAppListServObserver@@EAEXXZ @ 256 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved1(void) + ?MApaAppListServObserver_Reserved2@MApaAppListServObserver@@EAEXXZ @ 257 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved2(void) + ?RApaLsSession_Reserved1@RApaLsSession@@EAEXXZ @ 258 NONAME ; void RApaLsSession::RApaLsSession_Reserved1(void) + ?RApaLsSession_Reserved2@RApaLsSession@@EAEXXZ @ 259 NONAME ; void RApaLsSession::RApaLsSession_Reserved2(void) + ??0CDataRecognitionResultArray@@QAE@XZ @ 260 NONAME ; CDataRecognitionResultArray::CDataRecognitionResultArray(void) + ??1CDataRecognitionResultArray@@UAE@XZ @ 261 NONAME ; CDataRecognitionResultArray::~CDataRecognitionResultArray(void) + ?CancelRecognizeFiles@RApaLsSession@@QAEXXZ @ 262 NONAME ; void RApaLsSession::CancelRecognizeFiles(void) + ?Count@CDataRecognitionResultArray@@QBEIXZ @ 263 NONAME ; unsigned int CDataRecognitionResultArray::Count(void) const + ?GetDataRecognitionResultL@CDataRecognitionResultArray@@QBEXAAVTDataRecognitionResult@@I@Z @ 264 NONAME ; void CDataRecognitionResultArray::GetDataRecognitionResultL(class TDataRecognitionResult &, unsigned int) const + ?GetFileNameL@CDataRecognitionResultArray@@QBEXAAV?$TBuf@$0BAA@@@I@Z @ 265 NONAME ; void CDataRecognitionResultArray::GetFileNameL(class TBuf<256> &, unsigned int) const + ?Path@CDataRecognitionResultArray@@QBEABV?$TBuf@$0BAA@@@XZ @ 266 NONAME ; class TBuf<256> const & CDataRecognitionResultArray::Path(void) const + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@AAVCDataRecognitionResultArray@@@Z @ 267 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &) const + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@@Z @ 268 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &) const + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 269 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 270 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@1@Z @ 271 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid, class TUid) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@VTUid@@@Z @ 272 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &, class TUid) + ?GetAppByDataType@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 273 NONAME ; int RApaLsSession::GetAppByDataType(class TDataType const &, class TUid, class TUid &) const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 274 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &, class TRequestStatus *) + ?RegisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@ABVTDesC16@@@Z @ 275 NONAME ; void RApaLsSession::RegisterNonNativeApplicationTypeL(class TUid, class TDesC16 const &) + ?DeregisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@@Z @ 276 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationTypeL(class TUid) + ?RegisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@ABVTDriveUnit@@AAVCApaRegistrationResourceFileWriter@@PAVCApaLocalisableResourceFileWriter@@PBVRFile@@@Z @ 277 NONAME ; void RApaLsSession::RegisterNonNativeApplicationL(class TUid, class TDriveUnit const &, class CApaRegistrationResourceFileWriter &, class CApaLocalisableResourceFileWriter *, class RFile const *) + ?DeregisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@@Z @ 278 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationL(class TUid) + ?AppDataByFileName@CApaAppList@@QBEPAVCApaAppData@@ABVTDesC16@@@Z @ 279 NONAME ; class CApaAppData* CApaAppList::AppDataByFileName(class TDesC16 const &) const + ?LocalisableResourceFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 280 NONAME ; class TPtrC16 CApaAppData::LocalisableResourceFileName(void) const + ?OpaqueData@CApaAppData@@QBE?AVTPtrC8@@XZ @ 281 NONAME ; class TPtrC8 CApaAppData::OpaqueData(void) const + ?RegistrationFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 282 NONAME ; class TPtrC16 CApaAppData::RegistrationFileName(void) const + ?GetDefaultScreenNumber@RApaLsSession@@QBEHAAHVTUid@@@Z @ 283 NONAME ; int RApaLsSession::GetDefaultScreenNumber(int &, class TUid) const + ?FindAndAddSpecificAppL@CApaAppList@@QAEPAVCApaAppData@@PAVCApaAppRegFinder@@VTUid@@@Z @ 284 NONAME ; class CApaAppData * CApaAppList::FindAndAddSpecificAppL(class CApaAppRegFinder *, class TUid) + ?MatchesSecurityPolicy@RApaLsSession@@QBEHAAHVTUid@@ABVTSecurityPolicy@@@Z @ 285 NONAME ; int RApaLsSession::MatchesSecurityPolicy(int &, class TUid, class TSecurityPolicy const &) const + ?AddDataTypeL@CApaRegistrationResourceFileWriter@@QAEXHABVTDesC8@@@Z @ 286 NONAME ; void CApaRegistrationResourceFileWriter::AddDataTypeL(int, class TDesC8 const &) + ?AddFileOwnershipInfoL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 287 NONAME ; void CApaRegistrationResourceFileWriter::AddFileOwnershipInfoL(class TDesC16 const &) + ?NewL@CApaLocalisableResourceFileWriter@@SAPAV1@ABVTDesC16@@0H0@Z @ 288 NONAME ; class CApaLocalisableResourceFileWriter * CApaLocalisableResourceFileWriter::NewL(class TDesC16 const &, class TDesC16 const &, int, class TDesC16 const &) + ?NewL@CApaRegistrationResourceFileWriter@@SAPAV1@VTUid@@ABVTDesC16@@I@Z @ 289 NONAME ; class CApaRegistrationResourceFileWriter * CApaRegistrationResourceFileWriter::NewL(class TUid, class TDesC16 const &, unsigned int) + ?NonNativeApplicationType@CApaAppData@@QBE?AVTUid@@XZ @ 290 NONAME ; class TUid CApaAppData::NonNativeApplicationType(void) const + ?SetAppIsHiddenL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 291 NONAME ; void CApaRegistrationResourceFileWriter::SetAppIsHiddenL(int) + ?SetDefaultScreenNumberL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 292 NONAME ; void CApaRegistrationResourceFileWriter::SetDefaultScreenNumberL(int) + ?SetEmbeddabilityL@CApaRegistrationResourceFileWriter@@QAEXW4TEmbeddability@TApaAppCapability@@@Z @ 293 NONAME ; void CApaRegistrationResourceFileWriter::SetEmbeddabilityL(enum TApaAppCapability::TEmbeddability) + ?SetGroupNameL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 294 NONAME ; void CApaRegistrationResourceFileWriter::SetGroupNameL(class TDesC16 const &) + ?SetLaunchInBackgroundL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 295 NONAME ; void CApaRegistrationResourceFileWriter::SetLaunchInBackgroundL(int) + ?SetOpaqueDataL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC8@@@Z @ 296 NONAME ; void CApaRegistrationResourceFileWriter::SetOpaqueDataL(class TDesC8 const &) + ?SetSupportsNewFileL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 297 NONAME ; void CApaRegistrationResourceFileWriter::SetSupportsNewFileL(int) + ??1CApaLocalisableResourceFileWriter@@UAE@XZ @ 298 NONAME ; CApaLocalisableResourceFileWriter::~CApaLocalisableResourceFileWriter(void) + ??1CApaRegistrationResourceFileWriter@@UAE@XZ @ 299 NONAME ; CApaRegistrationResourceFileWriter::~CApaRegistrationResourceFileWriter(void) + ?AppScanInProgress@CApaAppList@@QBEHXZ @ 300 NONAME ; int CApaAppList::AppScanInProgress(void) const + ?CancelNotify@RApaLsSession@@QAEXXZ @ 301 NONAME ; void RApaLsSession::CancelNotify(void) + ?SetNotify@RApaLsSession@@QAEXHAAVTRequestStatus@@@Z @ 302 NONAME ; void RApaLsSession::SetNotify(int, class TRequestStatus &) + ?CancelNotifyOnDataMappingChange@RApaLsSession@@QAEXXZ @ 303 NONAME ; void RApaLsSession::CancelNotifyOnDataMappingChange(void) + ?NotifyOnDataMappingChange@RApaLsSession@@QAEXAAVTRequestStatus@@@Z @ 304 NONAME ; void RApaLsSession::NotifyOnDataMappingChange(class TRequestStatus &) + ?GetAppType@RApaLsSession@@QBEHAAVTUid@@V2@@Z @ 305 NONAME ; int RApaLsSession::GetAppType(class TUid &, class TUid) const + ?CommitNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 306 NONAME ; void RApaLsSession::CommitNonNativeApplicationsUpdatesL(void) + ?PrepareNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 307 NONAME ; void RApaLsSession::PrepareNonNativeApplicationsUpdatesL(void) + ?RollbackNonNativeApplicationsUpdates@RApaLsSession@@QAEHXZ @ 308 NONAME ; int RApaLsSession::RollbackNonNativeApplicationsUpdates(void) + ?SetUpdatedAppsList@CApaAppList@@QAEXPAVCUpdatedAppsList@@@Z @ 309 NONAME ABSENT ; void CApaAppList::SetUpdatedAppsList(class CUpdatedAppsList *) + ?UpdatedAppsList@CApaAppList@@QAEPAVCUpdatedAppsList@@XZ @ 310 NONAME ABSENT ; class CUpdatedAppsList * CApaAppList::UpdatedAppsList(void) + ??1CApaAppData@@UAE@XZ @ 311 NONAME ; CApaAppData::~CApaAppData(void) + ?NewL@CApaAppData@@SAPAV1@ABVTApaAppEntry@@AAVRFs@@ABVTDesC16@@@Z @ 312 NONAME ; class CApaAppData * CApaAppData::NewL(class TApaAppEntry const &, class RFs &, class TDesC16 const &) + ?Self@CApaAppList@@SAPAV1@XZ @ 313 NONAME ; class CApaAppList * CApaAppList::Self(void) + ?ShareProtectedFileServer@CApaAppList@@QAEAAVRFs@@XZ @ 314 NONAME ABSENT ; class RFs & CApaAppList::ShareProtectedFileServer(void) + X @ 315 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + X @ 316 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + X @ 317 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + X @ 318 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + ?SetAppShortCaption@RApaLsSession@@QAEHABVTDesC16@@W4TLanguage@@VTUid@@@Z @ 319 NONAME ; int RApaLsSession::SetAppShortCaption(class TDesC16 const &, enum TLanguage, class TUid) + ?SetShortCaptionL@CApaAppData@@QAEXABVTDesC16@@@Z @ 320 NONAME ; void CApaAppData::SetShortCaptionL(class TDesC16 const &) + ?ForceRegistration@RApaLsSession@@QAEHABV?$RPointerArray@VTDesC16@@@@@Z @ 321 NONAME ; int RApaLsSession::ForceRegistration(class RPointerArray const &) + ?AddForcedRegistrationL@CApaAppList@@QAEXPAVHBufC16@@@Z @ 322 NONAME ; void CApaAppList::AddForcedRegistrationL(class HBufC16 *) + ?CompareStrings@CApaAppList@@SAHABVHBufC16@@0@Z @ 323 NONAME ; int CApaAppList::CompareStrings(class HBufC16 const &, class HBufC16 const &) + ?ResetForcedRegistrations@CApaAppList@@QAEXXZ @ 324 NONAME ; void CApaAppList::ResetForcedRegistrations(void) + ?RestartScanL@CApaAppList@@QAEXXZ @ 325 NONAME ; void CApaAppList::RestartScanL(void) + ?StopScan@CApaAppList@@QAEXXZ @ 326 NONAME ; void CApaAppList::StopScan(void) + ?MinApplicationStackSize@@YAIXZ @ 327 NONAME ; unsigned int MinApplicationStackSize(void) + ?KMinApplicationStackSize@@3HB @ 328 NONAME ; int const KMinApplicationStackSize + ?CheckAppSecurity@CApaSecurityUtils@@SAHABVTPtrC16@@AAH1@Z @ 329 NONAME ; int CApaSecurityUtils::CheckAppSecurity(class TPtrC16 const &, int &, int &) + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAVRFile@@@Z @ 330 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class RFile &) const + ?IsLanguageChangePending@CApaAppList@@QBEHXZ @ 331 NONAME ; int CApaAppList::IsLanguageChangePending(void) const + ?IsPending@CApaAppData@@QBEHXZ @ 332 NONAME ; int CApaAppData::IsPending(void) const + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APGRFX_UI_FRAMEWORKSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APGRFX_UI_FRAMEWORKSU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,338 @@ +EXPORTS + ??0RApaLsSession@@QAE@XZ @ 1 NONAME ; public: __thiscall RApaLsSession::RApaLsSession(void) + ??0TApaPictureFactory@@QAE@PAVCApaProcess@@@Z @ 2 NONAME ; public: __thiscall TApaPictureFactory::TApaPictureFactory(class CApaProcess *) + ??0TApaTask@@QAE@AAVRWsSession@@@Z @ 3 NONAME ; public: __thiscall TApaTask::TApaTask(class RWsSession &) + ??0TApaTaskList@@QAE@AAVRWsSession@@@Z @ 4 NONAME ; public: __thiscall TApaTaskList::TApaTaskList(class RWsSession &) + ??1CApaAppInfoFileReader@@UAE@XZ @ 5 NONAME ABSENT ; public: virtual __thiscall CApaAppInfoFileReader::~CApaAppInfoFileReader(void) + ??1CApaAppInfoFileWriter@@UAE@XZ @ 6 NONAME ; public: virtual __thiscall CApaAppInfoFileWriter::~CApaAppInfoFileWriter(void) + ??1CApaAppList@@UAE@XZ @ 7 NONAME ; public: virtual __thiscall CApaAppList::~CApaAppList(void) + ??1CApaDoor@@UAE@XZ @ 8 NONAME ; public: virtual __thiscall CApaDoor::~CApaDoor(void) + ??1CApaMaskedBitmap@@UAE@XZ @ 9 NONAME ; public: virtual __thiscall CApaMaskedBitmap::~CApaMaskedBitmap(void) + ??1CApaWindowGroupName@@UAE@XZ @ 10 NONAME ; public: virtual __thiscall CApaWindowGroupName::~CApaWindowGroupName(void) + ?AddCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@@Z @ 11 NONAME ; public: void __thiscall CApaAppInfoFileWriter::AddCaptionL(enum TLanguage,class TDesC16 const &) + ?AddIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@@Z @ 12 NONAME ; public: void __thiscall CApaAppInfoFileWriter::AddIconL(class CApaMaskedBitmap &) + ?AddIconL@CApaAppInfoFileWriter@@QAEXABVTDesC16@@@Z @ 13 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddIconL(class TDesC16 const &) + ?AppCount@RApaLsSession@@QBEHAAH@Z @ 14 NONAME ; public: int __thiscall RApaLsSession::AppCount(int &)const + ?AppDataByUid@CApaAppList@@QBEPAVCApaAppData@@VTUid@@@Z @ 15 NONAME ; public: class CApaAppData * __thiscall CApaAppList::AppDataByUid(class TUid)const + ?AppEntry@CApaAppData@@QBE?AVTApaAppEntry@@XZ @ 16 NONAME ; public: class TApaAppEntry __thiscall CApaAppData::AppEntry(void)const + ?AppUid@CApaWindowGroupName@@QBE?AVTUid@@XZ @ 17 NONAME ; public: class TUid __thiscall CApaWindowGroupName::AppUid(void)const + ?AppUidL@CApaDoor@@QBE?AVTUid@@XZ @ 18 NONAME ; public: class TUid __thiscall CApaDoor::AppUidL(void)const + ?BringToForeground@TApaTask@@QAEXXZ @ 19 NONAME ; public: void __thiscall TApaTask::BringToForeground(void) + ?Capability@CApaAppData@@QBEXAAVTDes8@@@Z @ 20 NONAME ; public: void __thiscall CApaAppData::Capability(class TDes8 &)const + ?Capability@CApaAppInfoFileReader@@QBEXAAVTDes8@@@Z @ 21 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::Capability(class TDes8 &)const + ?Caption@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 22 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::Caption(void)const + ?CaptionL@CApaAppInfoFileReader@@QAE?AV?$TBuf@$0BAA@@@W4TLanguage@@@Z @ 23 NONAME ABSENT ; public: class TBuf<256> __thiscall CApaAppInfoFileReader::CaptionL(enum TLanguage) + ?Connect@RApaLsSession@@QAEHXZ @ 24 NONAME ; public: int __thiscall RApaLsSession::Connect(void) + ?ConstructFromWgIdL@CApaWindowGroupName@@QAEXH@Z @ 25 NONAME ; public: void __thiscall CApaWindowGroupName::ConstructFromWgIdL(int) + ?Count@CApaAppList@@QBEHXZ @ 26 NONAME ; public: int __thiscall CApaAppList::Count(void)const + ?CreateMaskedBitmapL@CApaAppInfoFileReader@@QAEPAVCApaMaskedBitmap@@H@Z @ 27 NONAME ABSENT ; public: class CApaMaskedBitmap * __thiscall CApaAppInfoFileReader::CreateMaskedBitmapL(int) + ?CycleTasks@TApaTaskList@@QAEHVTUid@@W4TCycleDirection@1@@Z @ 28 NONAME ; public: int __thiscall TApaTaskList::CycleTasks(class TUid,enum TApaTaskList::TCycleDirection) + ?DocName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 29 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::DocName(void)const + ?DocNameIsAFile@CApaWindowGroupName@@QBEHXZ @ 30 NONAME ; public: int __thiscall CApaWindowGroupName::DocNameIsAFile(void)const + ?DocumentL@CApaDoor@@QAEPAVCApaDocument@@H@Z @ 31 NONAME ; public: class CApaDocument * __thiscall CApaDoor::DocumentL(int) + ?EmbeddableAppCount@RApaLsSession@@QBEHAAH@Z @ 32 NONAME ; public: int __thiscall RApaLsSession::EmbeddableAppCount(int &)const + ?EndTask@TApaTask@@QAEXXZ @ 33 NONAME ; public: void __thiscall TApaTask::EndTask(void) + ?Exists@TApaTask@@QBEHXZ @ 34 NONAME ; public: int __thiscall TApaTask::Exists(void)const + ?ExternalizeL@CApaMaskedBitmap@@QBEXAAVRWriteStream@@@Z @ 35 NONAME ; public: void __thiscall CApaMaskedBitmap::ExternalizeL(class RWriteStream &)const + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 36 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindApp(class TDesC16 const &) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@VTUid@@@Z @ 37 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindApp(class TUid) + ?FindByAppUid@CApaWindowGroupName@@SAXVTUid@@AAVRWsSession@@AAH@Z @ 38 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByAppUid(class TUid,class RWsSession &,int &) + ?FindByCaption@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 39 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByCaption(class TDesC16 const &,class RWsSession &,int &) + ?FindByDocName@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 40 NONAME ; public: static void __cdecl CApaWindowGroupName::FindByDocName(class TDesC16 const &,class RWsSession &,int &) + ?FindByPos@TApaTaskList@@QAE?AVTApaTask@@H@Z @ 41 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindByPos(int) + ?FindDoc@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 42 NONAME ; public: class TApaTask __thiscall TApaTaskList::FindDoc(class TDesC16 const &) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@XZ @ 43 NONAME ; public: class CApaAppData * __thiscall CApaAppList::FirstApp(void)const + ?GetAllApps@RApaLsSession@@QBEHXZ @ 44 NONAME ; public: int __thiscall RApaLsSession::GetAllApps(void)const + ?GetAppCapability@RApaLsSession@@QBEHAAVTDes8@@VTUid@@@Z @ 45 NONAME ; public: int __thiscall RApaLsSession::GetAppCapability(class TDes8 &,class TUid)const + ?GetAppInfo@RApaLsSession@@QBEHAAVTApaAppInfo@@VTUid@@@Z @ 46 NONAME ; public: int __thiscall RApaLsSession::GetAppInfo(class TApaAppInfo &,class TUid)const + ?GetEmbeddableApps@RApaLsSession@@QBEHXZ @ 47 NONAME ; public: int __thiscall RApaLsSession::GetEmbeddableApps(void)const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@@Z @ 48 NONAME ; public: int __thiscall RApaLsSession::GetNextApp(class TApaAppInfo &)const + ?InternalizeL@CApaMaskedBitmap@@QAEXAAVRReadStream@@@Z @ 49 NONAME ; public: void __thiscall CApaMaskedBitmap::InternalizeL(class RReadStream &) + ?IsBusy@CApaWindowGroupName@@QBEHXZ @ 50 NONAME ; public: int __thiscall CApaWindowGroupName::IsBusy(void)const + ?IsSystem@CApaWindowGroupName@@QBEHXZ @ 51 NONAME ; public: int __thiscall CApaWindowGroupName::IsSystem(void)const + ?KillTask@TApaTask@@QAEXXZ @ 52 NONAME ; public: void __thiscall TApaTask::KillTask(void) + ?Mask@CApaMaskedBitmap@@QBEPAVCFbsBitmap@@XZ @ 53 NONAME ; public: class CFbsBitmap * __thiscall CApaMaskedBitmap::Mask(void)const + ?New@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@PAVHBufC16@@@Z @ 54 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::New(class RWsSession const &,class HBufC16 *) + ?NewL@CApaAppInfoFileReader@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 55 NONAME ABSENT ; public: static class CApaAppInfoFileReader * __cdecl CApaAppInfoFileReader::NewL(class RFs &,class TDesC16 const &,class TUid) + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppRegFinder@@HH@Z @ 56 NONAME ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppRegFinder *, int, int) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 57 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewL(class RFs &,class CApaDocument &,class TSize const &) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@ABVCStreamStore@@VTStreamId@@AAVCApaProcess@@@Z @ 58 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewL(class RFs &,class CStreamStore const &,class TStreamId,class CApaProcess &) + ?NewL@CApaMaskedBitmap@@SAPAV1@PBV1@@Z @ 59 NONAME ; class CApaMaskedBitmap * CApaMaskedBitmap::NewL(class CApaMaskedBitmap const *) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 60 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 61 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &,class TDesC16 const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 62 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewL(class RWsSession const &,int) + ?NewLC@CApaAppInfoFileReader@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 63 NONAME ABSENT ; public: static class CApaAppInfoFileReader * __cdecl CApaAppInfoFileReader::NewLC(class RFs &,class TDesC16 const &,class TUid) + ?NewLC@CApaAppInfoFileWriter@@SAPAV1@AAVRFs@@ABVTDesC16@@VTUid@@@Z @ 64 NONAME ABSENT ; public: static class CApaAppInfoFileWriter * __cdecl CApaAppInfoFileWriter::NewLC(class RFs &,class TDesC16 const &,class TUid) + ?NewLC@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 65 NONAME ; public: static class CApaDoor * __cdecl CApaDoor::NewLC(class RFs &,class CApaDocument &,class TSize const &) + ?NewLC@CApaMaskedBitmap@@SAPAV1@XZ @ 66 NONAME ; public: static class CApaMaskedBitmap * __cdecl CApaMaskedBitmap::NewLC(void) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 67 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 68 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &,class TDesC16 const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 69 NONAME ; public: static class CApaWindowGroupName * __cdecl CApaWindowGroupName::NewLC(class RWsSession const &,int) + ?NewPictureL@TApaPictureFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 70 NONAME ; public: virtual void __thiscall TApaPictureFactory::NewPictureL(class TPictureHeader &,class CStreamStore const &)const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@@Z @ 71 NONAME ; public: class CApaAppData * __thiscall CApaAppList::NextApp(class CApaAppData const *)const + ?PurgeL@CApaAppList@@QAEXXZ @ 72 NONAME ; public: void __thiscall CApaAppList::PurgeL(void) + ?RespondsToShutdownEvent@CApaWindowGroupName@@QBEHXZ @ 73 NONAME ; public: int __thiscall CApaWindowGroupName::RespondsToShutdownEvent(void)const + ?RespondsToSwitchFilesEvent@CApaWindowGroupName@@QBEHXZ @ 74 NONAME ; public: int __thiscall CApaWindowGroupName::RespondsToSwitchFilesEvent(void)const + ?RestoreL@CApaDoor@@QAEXABVCStreamStore@@VTStreamId@@@Z @ 75 NONAME ; public: void __thiscall CApaDoor::RestoreL(class CStreamStore const &,class TStreamId) + ?SendKey@TApaTask@@QAEXABUTKeyEvent@@@Z @ 76 NONAME ; public: void __thiscall TApaTask::SendKey(struct TKeyEvent const &) + ?SendKey@TApaTask@@QAEXHH@Z @ 77 NONAME ; public: void __thiscall TApaTask::SendKey(int,int) + ?SendMessage@TApaTask@@QAEHVTUid@@ABVTDesC8@@@Z @ 78 NONAME ; public: int __thiscall TApaTask::SendMessage(class TUid,class TDesC8 const &) + ?SendSystemEvent@TApaTask@@QAEXW4TApaSystemEvent@@@Z @ 79 NONAME ; public: void __thiscall TApaTask::SendSystemEvent(enum TApaSystemEvent) + ?SendToBackground@TApaTask@@QAEXXZ @ 80 NONAME ; public: void __thiscall TApaTask::SendToBackground(void) + ?SetAppUid@CApaWindowGroupName@@QAEXVTUid@@@Z @ 81 NONAME ; public: void __thiscall CApaWindowGroupName::SetAppUid(class TUid) + ?SetBusy@CApaWindowGroupName@@QAEXH@Z @ 82 NONAME ; public: void __thiscall CApaWindowGroupName::SetBusy(int) + ?SetCapability@CApaAppInfoFileWriter@@QAEHABVTDesC8@@@Z @ 83 NONAME ; public: int __thiscall CApaAppInfoFileWriter::SetCapability(class TDesC8 const &) + ?SetCaptionL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 84 NONAME ; public: void __thiscall CApaWindowGroupName::SetCaptionL(class TDesC16 const &) + ?SetDocNameIsAFile@CApaWindowGroupName@@QAEXH@Z @ 85 NONAME ; public: void __thiscall CApaWindowGroupName::SetDocNameIsAFile(int) + ?SetDocNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 86 NONAME ; public: void __thiscall CApaWindowGroupName::SetDocNameL(class TDesC16 const &) + ?SetFormatToGlassL@CApaDoor@@QAEXXZ @ 87 NONAME ; public: void __thiscall CApaDoor::SetFormatToGlassL(void) + ?SetFormatToIconL@CApaDoor@@QAEXXZ @ 88 NONAME ; public: void __thiscall CApaDoor::SetFormatToIconL(void) + ?SetFormatToTemporaryIconL@CApaDoor@@QAEXH@Z @ 89 NONAME ; public: void __thiscall CApaDoor::SetFormatToTemporaryIconL(int) + ?SetRespondsToShutdownEvent@CApaWindowGroupName@@QAEXH@Z @ 90 NONAME ; public: void __thiscall CApaWindowGroupName::SetRespondsToShutdownEvent(int) + ?SetRespondsToSwitchFilesEvent@CApaWindowGroupName@@QAEXH@Z @ 91 NONAME ; public: void __thiscall CApaWindowGroupName::SetRespondsToSwitchFilesEvent(int) + ?SetSystem@CApaWindowGroupName@@QAEXH@Z @ 92 NONAME ; public: void __thiscall CApaWindowGroupName::SetSystem(int) + ?SetWgId@TApaTask@@QAEXH@Z @ 93 NONAME ; public: void __thiscall TApaTask::SetWgId(int) + ?SetWindowGroupName@CApaWindowGroupName@@QAEXPAVHBufC16@@@Z @ 94 NONAME ; public: void __thiscall CApaWindowGroupName::SetWindowGroupName(class HBufC16 *) + ?SetWindowGroupName@CApaWindowGroupName@@QBEHAAVRWindowGroup@@@Z @ 95 NONAME ; public: int __thiscall CApaWindowGroupName::SetWindowGroupName(class RWindowGroup &)const + ?SetWindowGroupNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 96 NONAME ; public: void __thiscall CApaWindowGroupName::SetWindowGroupNameL(class TDesC16 const &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@@Z @ 97 NONAME ; public: int __thiscall RApaLsSession::StartApp(class CApaCommandLine const &) + ?StoreL@CApaAppInfoFileWriter@@QAEXXZ @ 98 NONAME ; public: void __thiscall CApaAppInfoFileWriter::StoreL(void) + ?StretchDrawL@CApaAppInfoFileReader@@SAXPAVCFbsBitmap@@0VTSize@@@Z @ 99 NONAME ABSENT ; public: static void __cdecl CApaAppInfoFileReader::StretchDrawL(class CFbsBitmap *,class CFbsBitmap *,class TSize) + ?SwitchCreateFile@TApaTask@@QAEHABVTDesC16@@@Z @ 100 NONAME ; public: int __thiscall TApaTask::SwitchCreateFile(class TDesC16 const &) + ?SwitchOpenFile@TApaTask@@QAEHABVTDesC16@@@Z @ 101 NONAME ; public: int __thiscall TApaTask::SwitchOpenFile(class TDesC16 const &) + ?ThreadId@TApaTask@@QBE?AVTThreadId@@XZ @ 102 NONAME ; public: class TThreadId __thiscall TApaTask::ThreadId(void)const + ?UpdateCounter@CApaAppList@@QBEHXZ @ 103 NONAME ABSENT ; public: int __thiscall CApaAppList::UpdateCounter(void)const + ?UpdateL@CApaAppList@@QAEXXZ @ 104 NONAME ABSENT ; public: void __thiscall CApaAppList::UpdateL(void) + ?Version@RApaLsSession@@QBE?AVTVersion@@XZ @ 105 NONAME ; public: class TVersion __thiscall RApaLsSession::Version(void)const + ?WgId@TApaTask@@QBEHXZ @ 106 NONAME ; public: int __thiscall TApaTask::WgId(void)const + ?WindowGroupName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 107 NONAME ; public: class TPtrC16 __thiscall CApaWindowGroupName::WindowGroupName(void)const + ??1CApaSystemControlList@@UAE@XZ @ 108 NONAME ; public: virtual __thiscall CApaSystemControlList::~CApaSystemControlList(void) + ?Caption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 109 NONAME ; public: class TPtrC16 __thiscall CApaSystemControl::Caption(void)const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@H@Z @ 110 NONAME ; public: class CApaSystemControl * __thiscall CApaSystemControlList::Control(int)const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@VTUid@@@Z @ 111 NONAME ; public: class CApaSystemControl * __thiscall CApaSystemControlList::Control(class TUid)const + ?Count@CApaSystemControlList@@QBEHXZ @ 112 NONAME ; public: int __thiscall CApaSystemControlList::Count(void)const + ?CreateL@CApaSystemControl@@QAEXXZ @ 113 NONAME ; public: void __thiscall CApaSystemControl::CreateL(void) + ?FileName@CApaSystemControl@@QBE?AV?$TBuf@$0BAA@@@XZ @ 114 NONAME ; public: class TBuf<256> __thiscall CApaSystemControl::FileName(void)const + ?Icon@CApaSystemControl@@QBEPAVCApaMaskedBitmap@@XZ @ 115 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaSystemControl::Icon(void)const + ?Index@CApaSystemControlList@@QBEHVTUid@@@Z @ 116 NONAME ; public: int __thiscall CApaSystemControlList::Index(class TUid)const + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@AAVCApaAppFinder@@ABVTDesC16@@@Z @ 117 NONAME ABSENT ; public: static class CApaSystemControlList * __cdecl CApaSystemControlList::NewL(class RFs &,class CApaAppFinder &,class TDesC16 const &) + ?Type@CApaSystemControl@@QBE?AVTUid@@XZ @ 118 NONAME ; public: class TUid __thiscall CApaSystemControl::Type(void)const + ?UpdateL@CApaSystemControlList@@QAEXXZ @ 119 NONAME ; public: void __thiscall CApaSystemControlList::UpdateL(void) + ?AddDataTypeL@CApaAppInfoFileWriter@@QAEXABVTDataTypeWithPriority@@@Z @ 120 NONAME ; public: void __thiscall CApaAppInfoFileWriter::AddDataTypeL(class TDataTypeWithPriority const &) + ?AppForDataType@RApaLsSession@@QBEHABVTDataType@@AAVTUid@@@Z @ 121 NONAME ; public: int __thiscall RApaLsSession::AppForDataType(class TDataType const &,class TUid &)const + ?AppForDocument@RApaLsSession@@QBEHABVTDesC16@@AAVTUid@@AAVTDataType@@@Z @ 122 NONAME ; public: int __thiscall RApaLsSession::AppForDocument(class TDesC16 const &,class TUid &,class TDataType &)const + ?CreateDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 123 NONAME ; public: int __thiscall RApaLsSession::CreateDocument(class TDesC16 const &,class TUid,class TThreadId &,enum RApaLsSession::TLaunchType) + ?DataType@CApaAppData@@QBEJABVTDataType@@@Z @ 124 NONAME ; long CApaAppData::DataType(class TDataType const &) const + ?DataTypesSupportedL@CApaAppInfoFileReader@@QBEXAAV?$CArrayFix@VTDataTypeWithPriority@@@@@Z @ 125 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::DataTypesSupportedL(class CArrayFix &)const + ?GetAcceptedConfidence@RApaLsSession@@QBEHAAH@Z @ 126 NONAME ; public: int __thiscall RApaLsSession::GetAcceptedConfidence(int &)const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@HAAVCApaMaskedBitmap@@@Z @ 127 NONAME ; public: int __thiscall RApaLsSession::GetAppIcon(class TUid,int,class CApaMaskedBitmap &)const + ?GetMaxDataBufSize@RApaLsSession@@QBEHAAH@Z @ 128 NONAME ; public: int __thiscall RApaLsSession::GetMaxDataBufSize(int &)const + ?GetSupportedDataTypesL@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTDataType@@@@@Z @ 129 NONAME ; public: int __thiscall RApaLsSession::GetSupportedDataTypesL(class CArrayFixFlat &)const + ?IsProgram@RApaLsSession@@QBEHABVTDesC16@@AAH@Z @ 130 NONAME ; public: int __thiscall RApaLsSession::IsProgram(class TDesC16 const &,int &)const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@@Z @ 131 NONAME ; public: class TUid __thiscall CApaAppList::PreferredDataHandlerL(class TDataType const &)const + ?RecognizeData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVTDataRecognitionResult@@@Z @ 132 NONAME ; public: int __thiscall RApaLsSession::RecognizeData(class TDesC16 const &,class TDesC8 const &,class TDataRecognitionResult &)const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@ABVTDataType@@AAH@Z @ 133 NONAME ; public: int __thiscall RApaLsSession::RecognizeSpecificData(class TDesC16 const &,class TDesC8 const &,class TDataType const &,int &)const + ?SetAcceptedConfidence@RApaLsSession@@QAEHH@Z @ 134 NONAME ; public: int __thiscall RApaLsSession::SetAcceptedConfidence(int) + ?SetMaxDataBufSize@RApaLsSession@@QAEHH@Z @ 135 NONAME ; public: int __thiscall RApaLsSession::SetMaxDataBufSize(int) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@AAVTThreadId@@W4TLaunchType@1@@Z @ 136 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@ABVTDataType@@AAVTThreadId@@W4TLaunchType@1@@Z @ 137 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TDataType const &,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 138 NONAME ; public: int __thiscall RApaLsSession::StartDocument(class TDesC16 const &,class TUid,class TThreadId &,enum RApaLsSession::TLaunchType) + ?StartIdleUpdateL@CApaAppList@@QAEXXZ @ 139 NONAME ; public: void __thiscall CApaAppList::StartIdleUpdateL(void) + ??1CApaAppListNotifier@@UAE@XZ @ 140 NONAME ; public: virtual __thiscall CApaAppListNotifier::~CApaAppListNotifier(void) + ?NewL@CApaAppListNotifier@@SAPAV1@PAVMApaAppListServObserver@@W4TPriority@CActive@@@Z @ 141 NONAME ; public: static class CApaAppListNotifier * __cdecl CApaAppListNotifier::NewL(class MApaAppListServObserver *,enum CActive::TPriority) + ?StartIdleUpdateL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 142 NONAME ; public: void __thiscall CApaAppList::StartIdleUpdateL(class MApaAppListObserver *) + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@VTSize@@AAVCApaMaskedBitmap@@@Z @ 143 NONAME ; public: int __thiscall RApaLsSession::GetAppIcon(class TUid,class TSize,class CApaMaskedBitmap &)const + ?GetAppIconSizes@RApaLsSession@@QBEHVTUid@@AAV?$CArrayFixFlat@VTSize@@@@@Z @ 144 NONAME ; public: int __thiscall RApaLsSession::GetAppIconSizes(class TUid,class CArrayFixFlat &)const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@VTSize@@@Z @ 145 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppData::Icon(class TSize)const + ?IconSizesL@CApaAppData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 146 NONAME ; public: class CArrayFixFlat * __thiscall CApaAppData::IconSizesL(void)const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@H@Z @ 147 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppData::Icon(int)const + ?Hidden@CApaWindowGroupName@@QBEHXZ @ 148 NONAME ; int CApaWindowGroupName::Hidden(void) const + ?SetHidden@CApaWindowGroupName@@QAEXH@Z @ 149 NONAME ; public: void __thiscall CApaWindowGroupName::SetHidden(int) + ?AddViewCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@VTUid@@@Z @ 150 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewCaptionL(enum TLanguage,class TDesC16 const &,class TUid) + ?AddViewIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@VTUid@@@Z @ 151 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewIconL(class CApaMaskedBitmap &,class TUid) + ?AddViewL@CApaAppInfoFileWriter@@QAEXVTUid@@@Z @ 152 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewL(class TUid) + ?CaptionL@CApaAIFViewData@@QBE?AV?$TBuf@$0BAA@@@W4TLanguage@@@Z @ 153 NONAME ABSENT ; public: class TBuf<256> __thiscall CApaAIFViewData::CaptionL(enum TLanguage)const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0ABVTSize@@AAVCApaMaskedBitmap@@@Z @ 154 NONAME ; public: int __thiscall RApaLsSession::GetAppViewIcon(class TUid,class TUid,class TSize const &,class CApaMaskedBitmap &)const + ?GetAppViews@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTApaAppViewInfo@@@@VTUid@@@Z @ 155 NONAME ; public: int __thiscall RApaLsSession::GetAppViews(class CArrayFixFlat &,class TUid)const + ?GetViewsL@CApaAppInfoFileReader@@QBEXAAV?$CArrayPtr@VCApaAIFViewData@@@@@Z @ 156 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::GetViewsL(class CArrayPtr &)const + ?Icon@CApaAppViewData@@QBEPAVCApaMaskedBitmap@@ABVTSize@@@Z @ 157 NONAME ; public: class CApaMaskedBitmap * __thiscall CApaAppViewData::Icon(class TSize const &)const + ?IconByIndexL@CApaAIFViewData@@QBEPAVCApaMaskedBitmap@@H@Z @ 158 NONAME ABSENT ; public: class CApaMaskedBitmap * __thiscall CApaAIFViewData::IconByIndexL(int)const + ?IconSizesL@CApaAppViewData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 159 NONAME ; public: class CArrayFixFlat * __thiscall CApaAppViewData::IconSizesL(void)const + ?NumberOfIcons@CApaAIFViewData@@QBEHXZ @ 160 NONAME ABSENT ; public: int __thiscall CApaAIFViewData::NumberOfIcons(void)const + ?StoreViewL@CApaAppInfoFileWriter@@QAEXVTUid@@@Z @ 161 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::StoreViewL(class TUid) + ?Uid@CApaAppViewData@@QBE?AVTUid@@XZ @ 162 NONAME ; public: class TUid __thiscall CApaAppViewData::Uid(void)const + ?ViewUid@CApaAIFViewData@@QBE?AVTUid@@XZ @ 163 NONAME ABSENT ; public: class TUid __thiscall CApaAIFViewData::ViewUid(void)const + ?Views@CApaAppData@@QBEPAV?$CArrayPtrFlat@VCApaAppViewData@@@@XZ @ 164 NONAME ; public: class CArrayPtrFlat * __thiscall CApaAppData::Views(void)const + ?AddOwnedFileL@CApaAppInfoFileWriter@@QAEXABVTDesC16@@@Z @ 165 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddOwnedFileL(class TDesC16 const &) + ?GetOwnedFilesL@CApaAppInfoFileReader@@QBEXAAVCDesC16Array@@@Z @ 166 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileReader::GetOwnedFilesL(class CDesC16Array &)const + ?OwnedFiles@CApaAppData@@QBEPAVCDesC16Array@@XZ @ 167 NONAME ; public: class CDesC16Array * __thiscall CApaAppData::OwnedFiles(void)const + ?GetAppOwnedFiles@RApaLsSession@@QBEHAAVCDesC16Array@@VTUid@@@Z @ 168 NONAME ; public: int __thiscall RApaLsSession::GetAppOwnedFiles(class CDesC16Array &,class TUid)const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@@Z @ 169 NONAME ; public: int __thiscall RApaLsSession::StartApp(class CApaCommandLine const &,class TThreadId &) + ?GetAifFileName@AppInfoFileUtils@@SAXABVRFs@@AAVTDes16@@@Z @ 170 NONAME ABSENT ; public: static void __cdecl AppInfoFileUtils::GetAifFileName(class RFs const &,class TDes16 &) + ?AddViewL@CApaAppInfoFileWriter@@QAEXVTUid@@H@Z @ 171 NONAME ABSENT ; public: void __thiscall CApaAppInfoFileWriter::AddViewL(class TUid,int) + ?CanUseScreenMode@CApaAppData@@QAEHH@Z @ 172 NONAME ; public: int __thiscall CApaAppData::CanUseScreenMode(int) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@H@Z @ 173 NONAME ; public: class CApaAppData * __thiscall CApaAppList::FirstApp(int)const + ?GetAllApps@RApaLsSession@@QBEHH@Z @ 174 NONAME ; public: int __thiscall RApaLsSession::GetAllApps(int)const + ?GetEmbeddableApps@RApaLsSession@@QBEHH@Z @ 175 NONAME ; public: int __thiscall RApaLsSession::GetEmbeddableApps(int)const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@H@Z @ 176 NONAME ; public: int __thiscall RApaLsSession::GetNextApp(class TApaAppInfo &,int)const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@H@Z @ 177 NONAME ; public: class CApaAppData * __thiscall CApaAppList::NextApp(class CApaAppData const *,int)const + ?ScreenMode@CApaAIFViewData@@QBEHXZ @ 178 NONAME ABSENT ; public: int __thiscall CApaAIFViewData::ScreenMode(void)const + ?ScreenMode@CApaAppViewData@@QBEHXZ @ 179 NONAME ; public: int __thiscall CApaAppViewData::ScreenMode(void)const + ?ShortCaption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 180 NONAME ; public: class TPtrC16 __thiscall CApaSystemControl::ShortCaption(void)const + ?IsIdleUpdateComplete@CApaAppList@@QBEHXZ @ 181 NONAME ; public: int __thiscall CApaAppList::IsIdleUpdateComplete(void)const + ?IsAppReady@CApaWindowGroupName@@QBEHXZ @ 182 NONAME ; public: int __thiscall CApaWindowGroupName::IsAppReady(void)const + ?SetAppReady@CApaWindowGroupName@@QAEXH@Z @ 183 NONAME ; public: void __thiscall CApaWindowGroupName::SetAppReady(int) + ?InitListL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 184 NONAME ; public: void __thiscall CApaAppList::InitListL(class MApaAppListObserver *) + ?NumberOfBitmaps@CApaAppInfoFileReader@@QBEHXZ @ 185 NONAME ABSENT ; public: int __thiscall CApaAppInfoFileReader::NumberOfBitmaps(void)const + ?IsFirstScanComplete@CApaAppList@@QBEHXZ @ 186 NONAME ; public: int __thiscall CApaAppList::IsFirstScanComplete(void)const + ?SetMaskBitmap@CApaMaskedBitmap@@QAEXPAVCFbsBitmap@@@Z @ 187 NONAME ; public: void __thiscall CApaMaskedBitmap::SetMaskBitmap(class CFbsBitmap *) + ?GetAppInfo_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@VTUid@@@Z @ 188 NONAME ABSENT ; int RApaLsSession::GetAppInfo_7_0(class TApaAppInfo_7_0 &, class TUid) const + ?GetNextApp_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@@Z @ 189 NONAME ABSENT ; int RApaLsSession::GetNextApp_7_0(class TApaAppInfo_7_0 &) const + ?GetNextApp_7_0@RApaLsSession@@ABEHAAVTApaAppInfo_7_0@@H@Z @ 190 NONAME ABSENT ; int RApaLsSession::GetNextApp_7_0(class TApaAppInfo_7_0 &, int) const + ?GetIconInfo@CApaAppData@@QBEXAAH0@Z @ 191 NONAME ; void CApaAppData::GetIconInfo(int &, int &) const + ?NumberOfOwnDefinedIcons@RApaLsSession@@QBEHVTUid@@AAH@Z @ 192 NONAME ; public: int __thiscall RApaLsSession::NumberOfOwnDefinedIcons(class TUid,int &)const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@@Z @ 193 NONAME ; public: int __thiscall RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &)const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@H@Z @ 194 NONAME ; public: int __thiscall RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &,int)const + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppFinder@@PAVCApaAppRegFinder@@H@Z @ 195 NONAME ABSENT ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppFinder *, class CApaAppRegFinder *, int) + ?DefaultScreenNumber@CApaAppData@@QBEIXZ @ 196 NONAME ; unsigned int CApaAppData::DefaultScreenNumber(void) const + ?GetFilteredApps@RApaLsSession@@QBEHII@Z @ 197 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHIIH@Z @ 198 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int, int) const + ?RegistrationFileUsed@CApaAppData@@QBEHXZ @ 199 NONAME ; int CApaAppData::RegistrationFileUsed(void) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAPAVHBufC16@@@Z @ 200 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class HBufC16 * &) const + ?IconFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 201 NONAME ; class TPtrC16 CApaAppData::IconFileName(void) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0AAPAVHBufC16@@@Z @ 202 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class HBufC16 * &) const + ?IconFileName@CApaAppViewData@@QBE?AVTPtrC16@@XZ @ 203 NONAME ; class TPtrC16 CApaAppViewData::IconFileName(void) const + ?NonMbmIconFile@CApaAppData@@QBEHXZ @ 204 NONAME ; int CApaAppData::NonMbmIconFile(void) const + ?NonMbmIconFile@CApaAppViewData@@QBEHXZ @ 205 NONAME ; int CApaAppViewData::NonMbmIconFile(void) const + ?StartupApaServer@@YAHAAVMApaAppStarter@@@Z @ 206 NONAME ; int StartupApaServer(class MApaAppStarter &) + ?StartupApaServerProcess@@YAHXZ @ 207 NONAME ; int StartupApaServerProcess(void) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@@Z @ 208 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@@Z @ 209 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid) + ?InsertDataMappingIfHigher@RApaLsSession@@QAEHABVTDataType@@JVTUid@@AAH@Z @ 210 NONAME ; int RApaLsSession::InsertDataMappingIfHigher(class TDataType const &, long, class TUid, int &) + ?ApplicationLanguage@CApaAppData@@QBE?AW4TLanguage@@XZ @ 211 NONAME ; enum TLanguage CApaAppData::ApplicationLanguage(void) const + ?ApplicationLanguage@RApaLsSession@@QBEHVTUid@@AAW4TLanguage@@@Z @ 212 NONAME ; int RApaLsSession::ApplicationLanguage(class TUid, enum TLanguage &) const + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@@Z @ 213 NONAME ; class CApaSystemControlList * CApaSystemControlList::NewL(class RFs &) + ?AppForDataTypeAndService@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 214 NONAME ; int RApaLsSession::AppForDataTypeAndService(class TDataType const &, class TUid, class TUid &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVRFile@@VTUid@@AAV3@AAVTDataType@@@Z @ 215 NONAME ; int RApaLsSession::AppForDocumentAndService(class RFile const &, class TUid, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVTDesC16@@VTUid@@AAV3@AAVTDataType@@@Z @ 216 NONAME ; int RApaLsSession::AppForDocumentAndService(class TDesC16 const &, class TUid, class TUid &, class TDataType &) const + ?GetAppServiceOpaqueDataLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@0@Z @ 217 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServiceOpaqueDataLC(class TUid, class TUid) const + ?GetAppServicesL@RApaLsSession@@QBEXVTUid@@AAV?$CArrayFixFlat@VTUid@@@@@Z @ 218 NONAME ; void RApaLsSession::GetAppServicesL(class TUid, class CArrayFixFlat &) const + ?GetAppServicesLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 219 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServicesLC(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@@Z @ 220 NONAME ; int RApaLsSession::GetServerApps(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@H@Z @ 221 NONAME ; int RApaLsSession::GetServerApps(class TUid, int) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 222 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid) const + ?ImplementsService@CApaAppData@@QBEHVTUid@@@Z @ 223 NONAME ; int CApaAppData::ImplementsService(class TUid) const + ?OpaqueData@TApaAppServiceInfo@@QBEABVTDesC8@@XZ @ 224 NONAME ; class TDesC8 const & TApaAppServiceInfo::OpaqueData(void) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@PBV2@AAH@Z @ 225 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &, class TUid const *, int &) const + ?ServiceArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 226 NONAME ; class CBufFlat * CApaAppList::ServiceArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 227 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid) const + ?ServiceOpaqueDataBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@0@Z @ 228 NONAME ; class CBufFlat * CApaAppList::ServiceOpaqueDataBufferL(class TUid, class TUid) const + ?ServiceUidBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 229 NONAME ; class CBufFlat * CApaAppList::ServiceUidBufferL(class TUid) const + ?Uid@TApaAppServiceInfo@@QBE?AVTUid@@XZ @ 230 NONAME ; class TUid TApaAppServiceInfo::Uid(void) const + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 231 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TThreadId &, class TRequestStatus *) + ?CreateMaskedBitmapByIndexLC@CApaAppInfoFileReader@@QAEPAVCApaMaskedBitmap@@H@Z @ 232 NONAME ABSENT ; class CApaMaskedBitmap * CApaAppInfoFileReader::CreateMaskedBitmapByIndexLC(int) + ?CancelListPopulationCompleteObserver@RApaLsSession@@QBEHXZ @ 233 NONAME ; int RApaLsSession::CancelListPopulationCompleteObserver(void) const + ?RegisterListPopulationCompleteObserver@RApaLsSession@@QBEXAAVTRequestStatus@@@Z @ 234 NONAME ; void RApaLsSession::RegisterListPopulationCompleteObserver(class TRequestStatus &) const + ?NewInterimFormatFileWriterLC@ForJavaMIDletInstaller@@SAPAVCApaAppInfoFileWriter@@AAVRFs@@ABVTDesC16@@VTUid@@KH@Z @ 235 NONAME ; class CApaAppInfoFileWriter * ForJavaMIDletInstaller::NewInterimFormatFileWriterLC(class RFs &, class TDesC16 const &, class TUid, unsigned long, int) + ?CheckInterimFormatFileNotCorruptL@ForJavaMIDletInstaller@@SAXAAVRFile@@@Z @ 236 NONAME ; void ForJavaMIDletInstaller::CheckInterimFormatFileNotCorruptL(class RFile &) + ?RegisterJavaMIDletViaIterimFormat@RApaLsSession@@QAEHABVTDesC16@@AAVRFile@@@Z @ 237 NONAME ABSENT ; int RApaLsSession::RegisterJavaMIDletViaIterimFormat(class TDesC16 const &, class RFile &) + ?DeregisterJavaMIDlet@RApaLsSession@@QAEHABVTDesC16@@@Z @ 238 NONAME ABSENT ; int RApaLsSession::DeregisterJavaMIDlet(class TDesC16 const &) + ?AppForDocument@RApaLsSession@@QBEHABVRFile@@AAVTUid@@AAVTDataType@@@Z @ 239 NONAME ; int RApaLsSession::AppForDocument(class RFile const &, class TUid &, class TDataType &) const + ?ClearFsSession@RApaLsSession@@SAXXZ @ 240 NONAME ; void RApaLsSession::ClearFsSession(void) + ?FsSession@RApaLsSession@@SAPAVRFs@@XZ @ 241 NONAME ; class RFs * RApaLsSession::FsSession(void) + ?RecognizeData@RApaLsSession@@QBEHABVRFile@@AAVTDataRecognitionResult@@@Z @ 242 NONAME ; int RApaLsSession::RecognizeData(class RFile const &, class TDataRecognitionResult &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVRFile@@ABVTDataType@@AAH@Z @ 243 NONAME ; int RApaLsSession::RecognizeSpecificData(class RFile const &, class TDataType const &, int &) const + ?SetFsSessionL@RApaLsSession@@SAXAAVRFs@@@Z @ 244 NONAME ; void RApaLsSession::SetFsSessionL(class RFs &) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@ABVTDataType@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 245 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TDataType const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@VTUid@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 246 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TUid, class TThreadId &, class TRequestStatus *) + ?GetPreferredBufSize@RApaLsSession@@QBEHAAH@Z @ 247 NONAME ; public: int __thiscall RApaLsSession::GetPreferredBufSize(int &)const + ?GetJavaMIDletInfoL@ForJavaMIDletInstaller@@SAXAAVRFs@@ABVTDesC16@@AAK2@Z @ 248 NONAME ; void ForJavaMIDletInstaller::GetJavaMIDletInfoL(class RFs &, class TDesC16 const &, unsigned long &, unsigned long &) + ?HandleAsRegistrationFile@ApaUtils@@SAHABVTUidType@@@Z @ 249 NONAME ; int ApaUtils::HandleAsRegistrationFile(class TUidType const &) + ?DataTypes@TApaAppServiceInfo@@QBEABV?$CArrayFixFlat@VTDataTypeWithPriority@@@@XZ @ 250 NONAME ; class CArrayFixFlat const & TApaAppServiceInfo::DataTypes(void) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@ABVTDataType@@@Z @ 251 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid, class TDataType const &) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@ABVTDataType@@@Z @ 252 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid, class TDataType const &) const + ?Close@RApaLsSession@@QAEXXZ @ 253 NONAME ; void RApaLsSession::Close(void) + ??0MApaAppListServObserver@@IAE@XZ @ 254 NONAME ; MApaAppListServObserver::MApaAppListServObserver(void) + ??0TApaPictureFactory@@IAE@XZ @ 255 NONAME ; TApaPictureFactory::TApaPictureFactory(void) + ?MApaAppListServObserver_Reserved1@MApaAppListServObserver@@EAEXXZ @ 256 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved1(void) + ?MApaAppListServObserver_Reserved2@MApaAppListServObserver@@EAEXXZ @ 257 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved2(void) + ?RApaLsSession_Reserved1@RApaLsSession@@EAEXXZ @ 258 NONAME ; void RApaLsSession::RApaLsSession_Reserved1(void) + ?RApaLsSession_Reserved2@RApaLsSession@@EAEXXZ @ 259 NONAME ; void RApaLsSession::RApaLsSession_Reserved2(void) + ??0CDataRecognitionResultArray@@QAE@XZ @ 260 NONAME ; CDataRecognitionResultArray::CDataRecognitionResultArray(void) + ??1CDataRecognitionResultArray@@UAE@XZ @ 261 NONAME ; CDataRecognitionResultArray::~CDataRecognitionResultArray(void) + ?CancelRecognizeFiles@RApaLsSession@@QAEXXZ @ 262 NONAME ; void RApaLsSession::CancelRecognizeFiles(void) + ?Count@CDataRecognitionResultArray@@QBEIXZ @ 263 NONAME ; unsigned int CDataRecognitionResultArray::Count(void) const + ?GetDataRecognitionResultL@CDataRecognitionResultArray@@QBEXAAVTDataRecognitionResult@@I@Z @ 264 NONAME ; void CDataRecognitionResultArray::GetDataRecognitionResultL(class TDataRecognitionResult &, unsigned int) const + ?GetFileNameL@CDataRecognitionResultArray@@QBEXAAV?$TBuf@$0BAA@@@I@Z @ 265 NONAME ; void CDataRecognitionResultArray::GetFileNameL(class TBuf<256> &, unsigned int) const + ?Path@CDataRecognitionResultArray@@QBEABV?$TBuf@$0BAA@@@XZ @ 266 NONAME ; class TBuf<256> const & CDataRecognitionResultArray::Path(void) const + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@AAVCDataRecognitionResultArray@@@Z @ 267 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &) const + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@@Z @ 268 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &) const + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 269 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 270 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@1@Z @ 271 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid, class TUid) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@VTUid@@@Z @ 272 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &, class TUid) + ?GetAppByDataType@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 273 NONAME ; int RApaLsSession::GetAppByDataType(class TDataType const &, class TUid, class TUid &) const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 274 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &, class TRequestStatus *) + ?RegisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@ABVTDesC16@@@Z @ 275 NONAME ; void RApaLsSession::RegisterNonNativeApplicationTypeL(class TUid, class TDesC16 const &) + ?DeregisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@@Z @ 276 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationTypeL(class TUid) + ?RegisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@ABVTDriveUnit@@AAVCApaRegistrationResourceFileWriter@@PAVCApaLocalisableResourceFileWriter@@PBVRFile@@@Z @ 277 NONAME ; void RApaLsSession::RegisterNonNativeApplicationL(class TUid, class TDriveUnit const &, class CApaRegistrationResourceFileWriter &, class CApaLocalisableResourceFileWriter *, class RFile const *) + ?DeregisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@@Z @ 278 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationL(class TUid) + ?AppDataByFileName@CApaAppList@@QBEPAVCApaAppData@@ABVTDesC16@@@Z @ 279 NONAME ; class CApaAppData* CApaAppList::AppDataByFileName(class TDesC16 const &) const + ?LocalisableResourceFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 280 NONAME ; class TPtrC16 CApaAppData::LocalisableResourceFileName(void) const + ?OpaqueData@CApaAppData@@QBE?AVTPtrC8@@XZ @ 281 NONAME ; class TPtrC8 CApaAppData::OpaqueData(void) const + ?RegistrationFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 282 NONAME ; class TPtrC16 CApaAppData::RegistrationFileName(void) const + ?GetDefaultScreenNumber@RApaLsSession@@QBEHAAHVTUid@@@Z @ 283 NONAME ; int RApaLsSession::GetDefaultScreenNumber(int &, class TUid) const + ?FindAndAddSpecificAppL@CApaAppList@@QAEPAVCApaAppData@@PAVCApaAppRegFinder@@VTUid@@@Z @ 284 NONAME ; class CApaAppData * CApaAppList::FindAndAddSpecificAppL(class CApaAppRegFinder *, class TUid) + ?MatchesSecurityPolicy@RApaLsSession@@QBEHAAHVTUid@@ABVTSecurityPolicy@@@Z @ 285 NONAME ; int RApaLsSession::MatchesSecurityPolicy(int &, class TUid, class TSecurityPolicy const &) const + ?AddDataTypeL@CApaRegistrationResourceFileWriter@@QAEXHABVTDesC8@@@Z @ 286 NONAME ; void CApaRegistrationResourceFileWriter::AddDataTypeL(int, class TDesC8 const &) + ?AddFileOwnershipInfoL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 287 NONAME ; void CApaRegistrationResourceFileWriter::AddFileOwnershipInfoL(class TDesC16 const &) + ?NewL@CApaLocalisableResourceFileWriter@@SAPAV1@ABVTDesC16@@0H0@Z @ 288 NONAME ; class CApaLocalisableResourceFileWriter * CApaLocalisableResourceFileWriter::NewL(class TDesC16 const &, class TDesC16 const &, int, class TDesC16 const &) + ?NewL@CApaRegistrationResourceFileWriter@@SAPAV1@VTUid@@ABVTDesC16@@I@Z @ 289 NONAME ; class CApaRegistrationResourceFileWriter * CApaRegistrationResourceFileWriter::NewL(class TUid, class TDesC16 const &, unsigned int) + ?NonNativeApplicationType@CApaAppData@@QBE?AVTUid@@XZ @ 290 NONAME ; class TUid CApaAppData::NonNativeApplicationType(void) const + ?SetAppIsHiddenL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 291 NONAME ; void CApaRegistrationResourceFileWriter::SetAppIsHiddenL(int) + ?SetDefaultScreenNumberL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 292 NONAME ; void CApaRegistrationResourceFileWriter::SetDefaultScreenNumberL(int) + ?SetEmbeddabilityL@CApaRegistrationResourceFileWriter@@QAEXW4TEmbeddability@TApaAppCapability@@@Z @ 293 NONAME ; void CApaRegistrationResourceFileWriter::SetEmbeddabilityL(enum TApaAppCapability::TEmbeddability) + ?SetGroupNameL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 294 NONAME ; void CApaRegistrationResourceFileWriter::SetGroupNameL(class TDesC16 const &) + ?SetLaunchInBackgroundL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 295 NONAME ; void CApaRegistrationResourceFileWriter::SetLaunchInBackgroundL(int) + ?SetOpaqueDataL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC8@@@Z @ 296 NONAME ; void CApaRegistrationResourceFileWriter::SetOpaqueDataL(class TDesC8 const &) + ?SetSupportsNewFileL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 297 NONAME ; void CApaRegistrationResourceFileWriter::SetSupportsNewFileL(int) + ??1CApaLocalisableResourceFileWriter@@UAE@XZ @ 298 NONAME ; CApaLocalisableResourceFileWriter::~CApaLocalisableResourceFileWriter(void) + ??1CApaRegistrationResourceFileWriter@@UAE@XZ @ 299 NONAME ; CApaRegistrationResourceFileWriter::~CApaRegistrationResourceFileWriter(void) + ?AppScanInProgress@CApaAppList@@QBEHXZ @ 300 NONAME ; int CApaAppList::AppScanInProgress(void) const + ?CancelNotify@RApaLsSession@@QAEXXZ @ 301 NONAME ; void RApaLsSession::CancelNotify(void) + ?SetNotify@RApaLsSession@@QAEXHAAVTRequestStatus@@@Z @ 302 NONAME ; void RApaLsSession::SetNotify(int, class TRequestStatus &) + ?CancelNotifyOnDataMappingChange@RApaLsSession@@QAEXXZ @ 303 NONAME ; void RApaLsSession::CancelNotifyOnDataMappingChange(void) + ?NotifyOnDataMappingChange@RApaLsSession@@QAEXAAVTRequestStatus@@@Z @ 304 NONAME ; void RApaLsSession::NotifyOnDataMappingChange(class TRequestStatus &) + ?GetAppType@RApaLsSession@@QBEHAAVTUid@@V2@@Z @ 305 NONAME ; int RApaLsSession::GetAppType(class TUid &, class TUid) const + ?CommitNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 306 NONAME ; void RApaLsSession::CommitNonNativeApplicationsUpdatesL(void) + ?PrepareNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 307 NONAME ; void RApaLsSession::PrepareNonNativeApplicationsUpdatesL(void) + ?RollbackNonNativeApplicationsUpdates@RApaLsSession@@QAEHXZ @ 308 NONAME ; int RApaLsSession::RollbackNonNativeApplicationsUpdates(void) + ?SetUpdatedAppsList@CApaAppList@@QAEXPAVCUpdatedAppsList@@@Z @ 309 NONAME ABSENT ; void CApaAppList::SetUpdatedAppsList(class CUpdatedAppsList *) + ?UpdatedAppsList@CApaAppList@@QAEPAVCUpdatedAppsList@@XZ @ 310 NONAME ABSENT ; class CUpdatedAppsList * CApaAppList::UpdatedAppsList(void) + ??1CApaAppData@@UAE@XZ @ 311 NONAME ; CApaAppData::~CApaAppData(void) + ?NewL@CApaAppData@@SAPAV1@ABVTApaAppEntry@@AAVRFs@@@Z @ 312 NONAME ; class CApaAppData * CApaAppData::NewL(class TApaAppEntry const &, class RFs &) + ?Self@CApaAppList@@SAPAV1@XZ @ 313 NONAME ; class CApaAppList * CApaAppList::Self(void) + ?ShareProtectedFileServer@CApaAppList@@QAEAAVRFs@@XZ @ 314 NONAME ABSENT ; class RFs & CApaAppList::ShareProtectedFileServer(void) + X @ 315 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + X @ 316 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + X @ 317 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + X @ 318 NONAME ABSENT ; Old @internalComponent function that never needed to be exported + ?SetAppShortCaption@RApaLsSession@@QAEHABVTDesC16@@W4TLanguage@@VTUid@@@Z @ 319 NONAME ; int RApaLsSession::SetAppShortCaption(class TDesC16 const &, enum TLanguage, class TUid) + ?SetShortCaptionL@CApaAppData@@QAEXABVTDesC16@@@Z @ 320 NONAME ; void CApaAppData::SetShortCaptionL(class TDesC16 const &) + ?ForceRegistration@RApaLsSession@@QAEHABV?$RPointerArray@VTDesC16@@@@@Z @ 321 NONAME ; int RApaLsSession::ForceRegistration(class RPointerArray const &) + ?AddForcedRegistrationL@CApaAppList@@QAEXPAVHBufC16@@@Z @ 322 NONAME ; void CApaAppList::AddForcedRegistrationL(class HBufC16 *) + ?CompareStrings@CApaAppList@@SAHABVHBufC16@@0@Z @ 323 NONAME ; int CApaAppList::CompareStrings(class HBufC16 const &, class HBufC16 const &) + ?ResetForcedRegistrations@CApaAppList@@QAEXXZ @ 324 NONAME ; void CApaAppList::ResetForcedRegistrations(void) + ?RestartScanL@CApaAppList@@QAEXXZ @ 325 NONAME ; void CApaAppList::RestartScanL(void) + ?StopScan@CApaAppList@@QAEXH@Z @ 326 NONAME ; void CApaAppList::StopScan(TBool) + ?MinApplicationStackSize@@YAIXZ @ 327 NONAME ; unsigned int MinApplicationStackSize(void) + ?KMinApplicationStackSize@@3HB @ 328 NONAME ; int const KMinApplicationStackSize + ?IsLanguageChangePending@CApaAppList@@QBEHXZ @ 329 NONAME ; int CApaAppList::IsLanguageChangePending(void) const + ?IsPending@CApaAppData@@QBEHXZ @ 330 NONAME ; int CApaAppData::IsPending(void) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAVRFile@@@Z @ 331 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class RFile &) const + ?CheckAppSecurity@CApaSecurityUtils@@SAHABVTPtrC16@@AAH1@Z @ 332 NONAME ; int CApaSecurityUtils::CheckAppSecurity(class TPtrC16 const &, int &, int &) + ?SetCaptionL@CApaAppData@@QAEXABVTDesC16@@@Z @ 333 NONAME ; void CApaAppData::SetCaptionL(class TDesC16 const &) + ?SetIconsL@CApaAppData@@QAEXABVTDesC16@@H@Z @ 334 NONAME ; void CApaAppData::SetIconsL(class TDesC16 const &, int) + ?ForceCommitNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 335 NONAME ; void RApaLsSession::ForceCommitNonNativeApplicationsUpdatesL(void) + ?AppListUpdatePending@CApaAppList@@QAEHXZ @ 336 NONAME ; int CApaAppList::AppListUpdatePending(void) + ?UninstalledAppArray@CApaAppList@@QAEPAV?$CArrayFixFlat@VTUid@@@@XZ @ 337 NONAME ; class CArrayFixFlat * CApaAppList::UninstalledAppArray(void) diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APP.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APP.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1 @@ +EXPORTS ?NewApplication@@YAPAVCApaApplication@@XZ @1 NONAME diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APPARCTESTSERVERu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APPARCTESTSERVERu.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,3 @@ +EXPORTS + ?NewServer@@YAHXZ @ 1 NONAME ; int __cdecl NewServer(void) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APPARCU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APPARCU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,181 @@ +EXPORTS + ??0CApaDocument@@IAE@AAVCApaApplication@@AAVCApaProcess@@@Z @ 1 NONAME ; protected: __thiscall CApaDocument::CApaDocument(class CApaApplication &,class CApaProcess &) + ??0CApaFileRecognizer@@IAE@AAVRFs@@@Z @ 2 NONAME ; protected: __thiscall CApaFileRecognizer::CApaFileRecognizer(class RFs &) + ??0CApaFileRecognizerType@@IAE@XZ @ 3 NONAME ; protected: __thiscall CApaFileRecognizerType::CApaFileRecognizerType(void) + ??0CApaProcess@@IAE@ABVRFs@@AAVCApaAppFinder@@@Z @ 4 NONAME ; protected: __thiscall CApaProcess::CApaProcess(class RFs const &,class CApaAppFinder &) + ??0TApaAppEntry@@QAE@ABVTUidType@@ABV?$TBuf@$0BAA@@@@Z @ 5 NONAME ; public: __thiscall TApaAppEntry::TApaAppEntry(class TUidType const &,class TBuf<256> const &) + ??0TApaAppEntry@@QAE@XZ @ 6 NONAME ; public: __thiscall TApaAppEntry::TApaAppEntry(void) + ??0TApaAppIdentifier@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@@Z @ 7 NONAME ; public: __thiscall TApaAppIdentifier::TApaAppIdentifier(class TUid,class TBuf<256> const &) + ??0TApaAppIdentifier@@QAE@XZ @ 8 NONAME ; public: __thiscall TApaAppIdentifier::TApaAppIdentifier(void) + ??0TApaAppInfo@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@1@Z @ 9 NONAME ; public: __thiscall TApaAppInfo::TApaAppInfo(class TUid,class TBuf<256> const &,class TBuf<256> const &) + ??0TApaAppInfo@@QAE@XZ @ 10 NONAME ; public: __thiscall TApaAppInfo::TApaAppInfo(void) + ??0TApaModelDoorFactory@@QAE@PBVMApaModelHeaderFactory@@@Z @ 11 NONAME ; public: __thiscall TApaModelDoorFactory::TApaModelDoorFactory(class MApaModelHeaderFactory const *) + ??0TCapability@CApaDocument@@QAE@XZ @ 12 NONAME ; public: __thiscall CApaDocument::TCapability::TCapability(void) + ??1CApaCommandLine@@UAE@XZ @ 13 NONAME ; public: virtual __thiscall CApaCommandLine::~CApaCommandLine(void) + ??1CApaDocument@@UAE@XZ @ 14 NONAME ; public: virtual __thiscall CApaDocument::~CApaDocument(void) + ??1CApaFileRecognizer@@UAE@XZ @ 15 NONAME ; public: virtual __thiscall CApaFileRecognizer::~CApaFileRecognizer(void) + ??1CApaFileRecognizerType@@MAE@XZ @ 16 NONAME ; protected: virtual __thiscall CApaFileRecognizerType::~CApaFileRecognizerType(void) + ??1CApaModelDoor@@UAE@XZ @ 17 NONAME ; public: virtual __thiscall CApaModelDoor::~CApaModelDoor(void) + ??1CApaProcess@@UAE@XZ @ 18 NONAME ; public: virtual __thiscall CApaProcess::~CApaProcess(void) + ?AddFileRecognizerType@CApaFileRecognizer@@IAEXPAVCApaFileRecognizerType@@@Z @ 19 NONAME ; protected: void __thiscall CApaFileRecognizer::AddFileRecognizerType(class CApaFileRecognizerType *) + ?AddNewDocumentL@CApaProcess@@QAEPAVCApaDocument@@ABVTDesC16@@VTUid@@@Z @ 20 NONAME ; public: class CApaDocument * __thiscall CApaProcess::AddNewDocumentL(class TDesC16 const &,class TUid) + ?AppFullName@CApaApplication@@UBE?AV?$TBuf@$0BAA@@@XZ @ 21 NONAME ; public: virtual class TBuf<256> __thiscall CApaApplication::AppFullName(void)const + ?AppLocator@CApaFileRecognizer@@QBEPAVCApaAppLocator@@XZ @ 22 NONAME ; public: class CApaAppLocator * __thiscall CApaFileRecognizer::AppLocator(void)const + ?AppRunL@CApaFileRecognizerType@@IBE?AVTThreadId@@ABVCApaCommandLine@@@Z @ 23 NONAME ; protected: class TThreadId __thiscall CApaFileRecognizerType::AppRunL(class CApaCommandLine const &)const + ?Capability@CApaDocument@@UBE?AVTCapability@1@XZ @ 24 NONAME ; public: virtual class CApaDocument::TCapability __thiscall CApaDocument::Capability(void)const + ?Capability@CApaFileRecognizerType@@QBEXAAVTDes8@@@Z @ 25 NONAME ; public: void __thiscall CApaFileRecognizerType::Capability(class TDes8 &)const + ?Command@CApaCommandLine@@QBE?AW4TApaCommand@@XZ @ 26 NONAME ; public: enum TApaCommand __thiscall CApaCommandLine::Command(void)const + ?ConstructL@CApaProcess@@IAEXXZ @ 27 NONAME ; protected: void __thiscall CApaProcess::ConstructL(void) + ?CopyCapability@TApaAppCapability@@SAXAAVTDes8@@ABVTDesC8@@@Z @ 28 NONAME ; public: static void __cdecl TApaAppCapability::CopyCapability(class TDes8 &,class TDesC8 const &) + ?DestroyDocument@CApaProcess@@QAEXPAVCApaDocument@@@Z @ 29 NONAME ; public: void __thiscall CApaProcess::DestroyDocument(class CApaDocument *) + ?DestroyRecognizerList@CApaFileRecognizer@@IAEXXZ @ 30 NONAME ; protected: void __thiscall CApaFileRecognizer::DestroyRecognizerList(void) + ?DllName@CApaApplication@@QBE?AV?$TBuf@$0BAA@@@XZ @ 31 NONAME ; public: class TBuf<256> __thiscall CApaApplication::DllName(void)const + ?DoCleanup@TApaDocCleanupItem@@CAXPAX@Z @ 32 NONAME ; private: static void __cdecl TApaDocCleanupItem::DoCleanup(void *) + ?DocumentName@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 33 NONAME ; public: class TPtrC16 __thiscall CApaCommandLine::DocumentName(void)const + ?Draw@CApaModelDoor@@UBEXAAVCGraphicsContext@@ABVTPoint@@ABVTRect@@PAVMGraphicsDeviceMap@@@Z @ 34 NONAME ; public: virtual void __thiscall CApaModelDoor::Draw(class CGraphicsContext &,class TPoint const &,class TRect const &,class MGraphicsDeviceMap *)const + ?ExternalizeBaseStreamL@CApaDoorBase@@IBEXAAVCStreamStore@@AAVCStreamDictionary@@@Z @ 35 NONAME ; protected: void __thiscall CApaDoorBase::ExternalizeBaseStreamL(class CStreamStore &,class CStreamDictionary &)const + ?ExternalizeL@CApaDocument@@UBEXAAVRWriteStream@@@Z @ 36 NONAME ; public: virtual void __thiscall CApaDocument::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@CApaModelDoor@@UBEXAAVRWriteStream@@@Z @ 37 NONAME ; public: virtual void __thiscall CApaModelDoor::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppCapability@@QBEXAAVRWriteStream@@@Z @ 38 NONAME ; public: void __thiscall TApaAppCapability::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppEntry@@QBEXAAVRWriteStream@@@Z @ 39 NONAME ; public: void __thiscall TApaAppEntry::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppIdentifier@@QBEXAAVRWriteStream@@@Z @ 40 NONAME ; public: void __thiscall TApaAppIdentifier::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppInfo@@QBEXAAVRWriteStream@@@Z @ 41 NONAME ; public: void __thiscall TApaAppInfo::ExternalizeL(class RWriteStream &)const + ?FullCommandLine@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 42 NONAME ; public: class TPtrC16 __thiscall CApaCommandLine::FullCommandLine(void)const + ?GenerateFileName@CApaApplication@@SAHAAVRFs@@AAV?$TBuf@$0BAA@@@@Z @ 43 NONAME ; public: static int __cdecl CApaApplication::GenerateFileName(class RFs &,class TBuf<256> &) + ?GetOriginalSizeInTwips@CApaModelDoor@@UBEXAAVTSize@@@Z @ 44 NONAME ; public: virtual void __thiscall CApaModelDoor::GetOriginalSizeInTwips(class TSize &)const + ?GlassPictureL@CApaDocument@@UAEPAVCPicture@@XZ @ 45 NONAME ; public: virtual class CPicture * __thiscall CApaDocument::GlassPictureL(void) + ?InternalizeBaseStreamL@CApaDoorBase@@IAE?AVTSize@@ABVCStreamStore@@ABVCStreamDictionary@@@Z @ 46 NONAME ; protected: class TSize __thiscall CApaDoorBase::InternalizeBaseStreamL(class CStreamStore const &,class CStreamDictionary const &) + ?InternalizeL@TApaAppCapability@@QAEXAAVRReadStream@@@Z @ 47 NONAME ; public: void __thiscall TApaAppCapability::InternalizeL(class RReadStream &) + ?InternalizeL@TApaAppEntry@@QAEXAAVRReadStream@@@Z @ 48 NONAME ; public: void __thiscall TApaAppEntry::InternalizeL(class RReadStream &) + ?InternalizeL@TApaAppIdentifier@@QAEXAAVRReadStream@@@Z @ 49 NONAME ; public: void __thiscall TApaAppIdentifier::InternalizeL(class RReadStream &) + ?InternalizeL@TApaAppInfo@@QAEXAAVRReadStream@@@Z @ 50 NONAME ; public: void __thiscall TApaAppInfo::InternalizeL(class RReadStream &) + ?LibraryName@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 51 NONAME ; public: class TPtrC16 __thiscall CApaCommandLine::LibraryName(void)const + ?MainDocFileName@CApaProcess@@QBE?AVTPtrC16@@XZ @ 52 NONAME ; public: class TPtrC16 __thiscall CApaProcess::MainDocFileName(void)const + ?New@CApaCommandLine@@SAPAV1@PAVHBufC16@@@Z @ 53 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::New(class HBufC16 *) + ?NewL@CApaCommandLine@@SAPAV1@ABVTDesC16@@@Z @ 54 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewL(class TDesC16 const &) + ?NewL@CApaCommandLine@@SAPAV1@XZ @ 55 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewL(void) + ?NewL@CApaModelDoor@@SAPAV1@ABVCStreamStore@@VTStreamId@@PBVMApaModelHeaderFactory@@@Z @ 56 NONAME ; public: static class CApaModelDoor * __cdecl CApaModelDoor::NewL(class CStreamStore const &,class TStreamId,class MApaModelHeaderFactory const *) + ?NewL@CApaModelDoor@@SAPAV1@PAVCApaModelHeader@@@Z @ 57 NONAME ; public: static class CApaModelDoor * __cdecl CApaModelDoor::NewL(class CApaModelHeader *) + ?NewL@CApaProcess@@SAPAV1@ABVRFs@@AAVCApaAppFinder@@@Z @ 58 NONAME ; public: static class CApaProcess * __cdecl CApaProcess::NewL(class RFs const &,class CApaAppFinder &) + ?NewLC@CApaCommandLine@@SAPAV1@ABVTDesC16@@@Z @ 59 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewLC(class TDesC16 const &) + ?NewLC@CApaCommandLine@@SAPAV1@XZ @ 60 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewLC(void) + ?NewLC@CApaModelDoor@@SAPAV1@PAVCApaModelHeader@@@Z @ 61 NONAME ; public: static class CApaModelDoor * __cdecl CApaModelDoor::NewLC(class CApaModelHeader *) + ?NewPictureL@TApaModelDoorFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 62 NONAME ; public: virtual void __thiscall TApaModelDoorFactory::NewPictureL(class TPictureHeader &,class CStreamStore const &)const + ?OpenAppInfoFileL@CApaApplication@@QBEPAVCApaAppInfoFileReader@@XZ @ 63 NONAME ; public: class CApaAppInfoFileReader * __thiscall CApaApplication::OpenAppInfoFileL(void)const + ?OpenIniFileL@CApaApplication@@QBEPAVCDictionaryStore@@AAVRFs@@@Z @ 64 NONAME ; public: class CDictionaryStore * __thiscall CApaApplication::OpenIniFileL(class RFs &)const + ?OpenNewDocumentL@CApaProcess@@QAEPAVCApaDocument@@AAPAVCFileStore@@AAPAVCStreamDictionary@@ABVTDesC16@@I@Z @ 65 NONAME ; public: class CApaDocument * __thiscall CApaProcess::OpenNewDocumentL(class CFileStore * &,class CStreamDictionary * &,class TDesC16 const &,unsigned int) + ?ReadAppIdentifierL@CApaProcess@@SA?AVTApaAppIdentifier@@ABVCStreamStore@@ABVCStreamDictionary@@@Z @ 66 NONAME ; public: static class TApaAppIdentifier __cdecl CApaProcess::ReadAppIdentifierL(class CStreamStore const &,class CStreamDictionary const &) + ?ReadRootStreamLC@CApaProcess@@SAPAVCStreamDictionary@@AAVRFs@@AAPAVCFileStore@@ABVTDesC16@@I@Z @ 67 NONAME ; public: static class CStreamDictionary * __cdecl CApaProcess::ReadRootStreamLC(class RFs &,class CFileStore * &,class TDesC16 const &,unsigned int) + ?RecognizeFileL@CApaFileRecognizer@@QAEPAVCApaFileRecognizerType@@ABVTDesC16@@PBVTUidType@@@Z @ 68 NONAME ; public: class CApaFileRecognizerType * __thiscall CApaFileRecognizer::RecognizeFileL(class TDesC16 const &,class TUidType const *) + ?NewAppServerL@CApaApplication@@UAEXAAPAVCApaAppServer@@@Z @ 69 NONAME ; void CApaApplication::NewAppServerL(class CApaAppServer * &) + ?OpenFileL@CApaDocument@@EAEXAAPAVCFileStore@@AAVRFile@@@Z @ 70 NONAME ; void CApaDocument::OpenFileL(class CFileStore * &, class RFile &) + ?Reserved_2@CApaDocument@@EAEXXZ @ 71 NONAME ; private: virtual void __thiscall CApaDocument::Reserved_2(void) + ?ResetL@CApaProcess@@QAEXXZ @ 72 NONAME ; public: void __thiscall CApaProcess::ResetL(void) + ?RestoreL@CApaModelDoor@@QAEXABVCStreamStore@@VTStreamId@@PBVMApaModelHeaderFactory@@@Z @ 73 NONAME ; public: void __thiscall CApaModelDoor::RestoreL(class CStreamStore const &,class TStreamId,class MApaModelHeaderFactory const *) + ?ScaleFactorHeight@CApaModelDoor@@UBEHXZ @ 74 NONAME ; public: virtual int __thiscall CApaModelDoor::ScaleFactorHeight(void)const + ?ScaleFactorWidth@CApaModelDoor@@UBEHXZ @ 75 NONAME ; public: virtual int __thiscall CApaModelDoor::ScaleFactorWidth(void)const + ?SetAppLocator@CApaFileRecognizer@@IAEXPAVCApaAppLocator@@@Z @ 76 NONAME ; protected: void __thiscall CApaFileRecognizer::SetAppLocator(class CApaAppLocator *) + ?SetCommandL@CApaCommandLine@@QAEXW4TApaCommand@@@Z @ 77 NONAME ; public: void __thiscall CApaCommandLine::SetCommandL(enum TApaCommand) + ?SetDocumentNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 78 NONAME ; public: void __thiscall CApaCommandLine::SetDocumentNameL(class TDesC16 const &) + ?SetFullCommandLine@CApaCommandLine@@QAEHPAVHBufC16@@@Z @ 79 NONAME ; public: int __thiscall CApaCommandLine::SetFullCommandLine(class HBufC16 *) + ?SetFullCommandLineL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 80 NONAME ; public: void __thiscall CApaCommandLine::SetFullCommandLineL(class TDesC16 const &) + ?SetLibraryNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 81 NONAME ; public: void __thiscall CApaCommandLine::SetLibraryNameL(class TDesC16 const &) + ?SetMainDocFileName@CApaProcess@@QAEXABVTDesC16@@@Z @ 82 NONAME ; public: void __thiscall CApaProcess::SetMainDocFileName(class TDesC16 const &) + ?SetMainDocument@CApaProcess@@QAEXPAVCApaDocument@@@Z @ 83 NONAME ; public: void __thiscall CApaProcess::SetMainDocument(class CApaDocument *) + ?SetReserveLengthL@CApaCommandLine@@QAEXH@Z @ 84 NONAME ; public: void __thiscall CApaCommandLine::SetReserveLengthL(int) + ?SetScaleFactor@CApaModelDoor@@UAEXHH@Z @ 85 NONAME ; public: virtual void __thiscall CApaModelDoor::SetScaleFactor(int,int) + ?SetTailEndL@CApaCommandLine@@QAEXABVTDesC8@@@Z @ 86 NONAME ; public: void __thiscall CApaCommandLine::SetTailEndL(class TDesC8 const &) + ?StoreL@CApaModelDoor@@UBE?AVTStreamId@@AAVCStreamStore@@@Z @ 87 NONAME ; public: virtual class TStreamId __thiscall CApaModelDoor::StoreL(class CStreamStore &)const + ?TailEnd@CApaCommandLine@@QBE?AVTPtrC8@@XZ @ 88 NONAME ; public: class TPtrC8 __thiscall CApaCommandLine::TailEnd(void)const + ?ValidatePasswordL@CApaDocument@@UBEXXZ @ 89 NONAME ; public: virtual void __thiscall CApaDocument::ValidatePasswordL(void)const + ?WriteAppIdentifierL@CApaProcess@@SAXAAVCStreamStore@@AAVCStreamDictionary@@ABVTApaAppIdentifier@@@Z @ 90 NONAME ; public: static void __cdecl CApaProcess::WriteAppIdentifierL(class CStreamStore &,class CStreamDictionary &,class TApaAppIdentifier const &) + ?WriteRootStreamL@CApaProcess@@SAXAAVCPersistentStore@@AAVCStreamDictionary@@ABVCApaApplication@@@Z @ 91 NONAME ; public: static void __cdecl CApaProcess::WriteRootStreamL(class CPersistentStore &,class CStreamDictionary &,class CApaApplication const &) + ?WriteRootStreamL@CApaProcess@@SAXAAVCPersistentStore@@AAVCStreamDictionary@@ABVTApaAppIdentifier@@@Z @ 92 NONAME ; public: static void __cdecl CApaProcess::WriteRootStreamL(class CPersistentStore &,class CStreamDictionary &,class TApaAppIdentifier const &) + ?DetachFromStoreL@CApaModelDoor@@UAEXW4TDetach@CPicture@@@Z @ 93 NONAME ; public: virtual void __thiscall CApaModelDoor::DetachFromStoreL(enum CPicture::TDetach) + ?Lock@CApaFileRecognizerType@@QAEXXZ @ 94 NONAME ; public: void __thiscall CApaFileRecognizerType::Lock(void) + ?RemoveFileRecognizerType@CApaFileRecognizer@@IAEHPBVCApaFileRecognizerType@@@Z @ 95 NONAME ; protected: int __thiscall CApaFileRecognizer::RemoveFileRecognizerType(class CApaFileRecognizerType const *) + ?Unlock@CApaFileRecognizerType@@QAEXXZ @ 96 NONAME ; public: void __thiscall CApaFileRecognizerType::Unlock(void) + ??0TApaLastUsedEntry@@QAE@V?$TBuf@$0BAA@@@VTUid@@@Z @ 97 NONAME ABSENT ; public: __thiscall TApaLastUsedEntry::TApaLastUsedEntry(class TBuf<256>,class TUid) + ??0TApaLastUsedEntry@@QAE@XZ @ 98 NONAME ABSENT ; public: __thiscall TApaLastUsedEntry::TApaLastUsedEntry(void) + ?AddLastUsedEntryL@CApaRecentFile@@SAXAAVRFs@@ABVTDesC16@@VTUid@@@Z @ 99 NONAME ABSENT ; public: static void __cdecl CApaRecentFile::AddLastUsedEntryL(class RFs &,class TDesC16 const &,class TUid) + ?ExternalizeL@TApaLastUsedEntry@@QBEXAAVRWriteStream@@@Z @ 100 NONAME ABSENT ; public: void __thiscall TApaLastUsedEntry::ExternalizeL(class RWriteStream &)const + ?GetRecentFileL@CApaRecentFile@@SA?AVTApaLastUsedEntry@@AAVRFs@@VTUid@@H@Z @ 101 NONAME ABSENT ; public: static class TApaLastUsedEntry __cdecl CApaRecentFile::GetRecentFileL(class RFs &,class TUid,int) + ?GetRecentFileListL@CApaRecentFile@@SAPAV?$CArrayFixFlat@VTApaLastUsedEntry@@@@AAVRFs@@VTUid@@@Z @ 102 NONAME ABSENT ; public: static class CArrayFixFlat * __cdecl CApaRecentFile::GetRecentFileListL(class RFs &,class TUid) + ?InternalizeL@TApaLastUsedEntry@@QAEXAAVRReadStream@@@Z @ 103 NONAME ABSENT ; public: void __thiscall TApaLastUsedEntry::InternalizeL(class RReadStream &) + ?Reserved_1@CApaFileRecognizerType@@EAEXXZ @ 104 NONAME ; private: virtual void __thiscall CApaFileRecognizerType::Reserved_1(void) + ?Reserved_1@CApaModelHeader@@EAEXXZ @ 105 NONAME ; private: virtual void __thiscall CApaModelHeader::Reserved_1(void) + ??0TApaAppViewInfo@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@H@Z @ 106 NONAME ; public: __thiscall TApaAppViewInfo::TApaAppViewInfo(class TUid,class TBuf<256> const &,int) + ??0TApaAppViewInfo@@QAE@XZ @ 107 NONAME ; public: __thiscall TApaAppViewInfo::TApaAppViewInfo(void) + ?ExternalizeL@TApaAppViewInfo@@QBEXAAVRWriteStream@@@Z @ 108 NONAME ; public: void __thiscall TApaAppViewInfo::ExternalizeL(class RWriteStream &)const + ?InternalizeL@TApaAppViewInfo@@QAEXAAVRReadStream@@@Z @ 109 NONAME ; public: void __thiscall TApaAppViewInfo::InternalizeL(class RReadStream &) + ??0TApaAppInfo@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@11@Z @ 110 NONAME ; public: __thiscall TApaAppInfo::TApaAppInfo(class TUid,class TBuf<256> const &,class TBuf<256> const &,class TBuf<256> const &) + ??0TApaAppInfo_7_0@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@1@Z @ 111 NONAME ABSENT; TApaAppInfo_7_0::TApaAppInfo_7_0(class TUid, class TBuf<256> const &, class TBuf<256> const &) + ??0TApaAppInfo_7_0@@QAE@XZ @ 112 NONAME ABSENT; TApaAppInfo_7_0::TApaAppInfo_7_0(void) + ?ExternalizeL@TApaAppInfo_7_0@@QBEXAAVRWriteStream@@@Z @ 113 NONAME ABSENT; void TApaAppInfo_7_0::ExternalizeL(class RWriteStream &) const + ?InternalizeL@TApaAppInfo_7_0@@QAEXAAVRReadStream@@@Z @ 114 NONAME ABSENT; void TApaAppInfo_7_0::InternalizeL(class RReadStream &) + ?Externalize7_0L@TApaAppCapability@@ABEXAAVRWriteStream@@@Z @ 115 NONAME ; void TApaAppCapability::Externalize7_0L(class RWriteStream &) const + ?Internalize7_0L@TApaAppCapability@@QAEXAAVRReadStream@@@Z @ 116 NONAME ; void TApaAppCapability::Internalize7_0L(class RReadStream &) + ??0TApaEmbeddabilityFilter@@QAE@XZ @ 117 NONAME ; public: __thiscall TApaEmbeddabilityFilter::TApaEmbeddabilityFilter(void) + ?AddEmbeddability@TApaEmbeddabilityFilter@@QAEXW4TEmbeddability@TApaAppCapability@@@Z @ 118 NONAME ; public: void __thiscall TApaEmbeddabilityFilter::AddEmbeddability(enum TApaAppCapability::TEmbeddability) + ?MatchesEmbeddability@TApaEmbeddabilityFilter@@QBEHW4TEmbeddability@TApaAppCapability@@@Z @ 119 NONAME ; public: int __thiscall TApaEmbeddabilityFilter::MatchesEmbeddability(enum TApaAppCapability::TEmbeddability)const + ?SetMainDocFileNameL@CApaProcess@@QAEXABVTDesC16@@@Z @ 120 NONAME ; public: void __thiscall CApaProcess::SetMainDocFileNameL(class TDesC16 const &) + ?CreateFileRecognizerL@CApaFileRecognizerType@@SAPAV1@VTUid@@@Z @ 121 NONAME ; public: static class CApaFileRecognizerType * __cdecl CApaFileRecognizerType::CreateFileRecognizerL(class TUid) + ??0TApaApplicationFactory@@QAE@ABVCImplementationInformation@@@Z @ 122 NONAME ; TApaApplicationFactory::TApaApplicationFactory(class CImplementationInformation const &) + ??0TApaApplicationFactory@@QAE@P6APAVCApaApplication@@XZ@Z @ 123 NONAME ; TApaApplicationFactory::TApaApplicationFactory(class CApaApplication * (*)(void)) + ??0TApaApplicationFactory@@QAE@VTUid@@@Z @ 124 NONAME ; TApaApplicationFactory::TApaApplicationFactory(class TUid) + ??1CApaApplication@@UAE@XZ @ 125 NONAME ; CApaApplication::~CApaApplication(void) + ?AddNewDocumentL@CApaProcess@@QAEPAVCApaDocument@@VTApaApplicationFactory@@@Z @ 126 NONAME ; class CApaDocument * CApaProcess::AddNewDocumentL(class TApaApplicationFactory) + ??0CApaAppServer@@IAE@XZ @ 127 NONAME ; CApaAppServer::CApaAppServer(void) + ??0CApaAppServiceBase@@QAE@XZ @ 128 NONAME ; CApaAppServiceBase::CApaAppServiceBase(void) + ??0RApaAppServiceBase@@IAE@XZ @ 129 NONAME ; RApaAppServiceBase::RApaAppServiceBase(void) + ??1CApaAppServer@@UAE@XZ @ 130 NONAME ; CApaAppServer::~CApaAppServer(void) + ??1CApaAppServiceBase@@UAE@XZ @ 131 NONAME ; CApaAppServiceBase::~CApaAppServiceBase(void) + ??1CApaServerAppExitMonitor@@UAE@XZ @ 132 NONAME ; CApaServerAppExitMonitor::~CApaServerAppExitMonitor(void) + ?CancelNotifyServerExit@RApaAppServiceBase@@QAEXXZ @ 133 NONAME ; void RApaAppServiceBase::CancelNotifyServerExit(void) + ?Close@RApaAppServiceBase@@QAEXXZ @ 134 NONAME ; void RApaAppServiceBase::Close(void) + ?ConnectExistingAppL@RApaAppServiceBase@@QAEXABV1@@Z @ 135 NONAME ; void RApaAppServiceBase::ConnectExistingAppL(class RApaAppServiceBase const &) + ?ConnectExistingByNameL@RApaAppServiceBase@@QAEXABVTDesC16@@@Z @ 136 NONAME ; void RApaAppServiceBase::ConnectExistingByNameL(class TDesC16 const &) + ?ConstructL@CApaAppServer@@UAEXABVTDesC16@@@Z @ 137 NONAME ; void CApaAppServer::ConstructL(class TDesC16 const &) + ?CreateL@CApaAppServiceBase@@MAEXXZ @ 138 NONAME ; void CApaAppServiceBase::CreateL(void) + ?CreateServiceL@CApaAppServer@@UBEPAVCApaAppServiceBase@@VTUid@@@Z @ 139 NONAME ; class CApaAppServiceBase * CApaAppServer::CreateServiceL(class TUid) const + ?CreateServiceSecurityCheckL@CApaAppServer@@UAE?AW4TCustomResult@CPolicyServer@@VTUid@@ABVRMessage2@@AAHAAVTSecurityInfo@@@Z @ 140 NONAME ; enum CPolicyServer::TCustomResult CApaAppServer::CreateServiceSecurityCheckL(class TUid, class RMessage2 const &, int &, class TSecurityInfo &) + ?CustomSecurityCheckL@CApaAppServer@@MAE?AW4TCustomResult@CPolicyServer@@ABVRMessage2@@AAHAAVTSecurityInfo@@@Z @ 141 NONAME ; enum CPolicyServer::TCustomResult CApaAppServer::CustomSecurityCheckL(class RMessage2 const &, int &, class TSecurityInfo &) + ?ExtensionInterface@CApaAppServer@@EAEXVTUid@@AAPAX@Z @ 142 NONAME ; void CApaAppServer::ExtensionInterface(class TUid, void * &) + ?ExtensionInterface@CApaAppServiceBase@@EAEXVTUid@@AAPAX@Z @ 143 NONAME ; void CApaAppServiceBase::ExtensionInterface(class TUid, void * &) + ?ExtensionInterface@RApaAppServiceBase@@EAEXVTUid@@AAPAX@Z @ 144 NONAME ; void RApaAppServiceBase::ExtensionInterface(class TUid, void * &) + ?NewL@CApaServerAppExitMonitor@@SAPAV1@AAVRApaAppServiceBase@@AAVMApaServerAppExitObserver@@H@Z @ 145 NONAME ; class CApaServerAppExitMonitor * CApaServerAppExitMonitor::NewL(class RApaAppServiceBase &, class MApaServerAppExitObserver &, int) + ?NewLC@CApaServerAppExitMonitor@@SAPAV1@AAVRApaAppServiceBase@@AAVMApaServerAppExitObserver@@H@Z @ 146 NONAME ; class CApaServerAppExitMonitor * CApaServerAppExitMonitor::NewLC(class RApaAppServiceBase &, class MApaServerAppExitObserver &, int) + ?NewSessionL@CApaAppServer@@EBEPAVCSession2@@ABVTVersion@@ABVRMessage2@@@Z @ 147 NONAME ; class CSession2 * CApaAppServer::NewSessionL(class TVersion const &, class RMessage2 const &) const + ?NotifyServerExit@CApaAppServer@@QAEXH@Z @ 148 NONAME ; void CApaAppServer::NotifyServerExit(int) + ?NotifyServerExit@RApaAppServiceBase@@QAEXAAVTRequestStatus@@@Z @ 149 NONAME ; void RApaAppServiceBase::NotifyServerExit(class TRequestStatus &) + ?SecurityCheckL@CApaAppServiceBase@@UAE?AW4TCustomResult@CPolicyServer@@ABVRMessage2@@AAHAAVTSecurityInfo@@@Z @ 150 NONAME ; enum CPolicyServer::TCustomResult CApaAppServiceBase::SecurityCheckL(class RMessage2 const &, int &, class TSecurityInfo &) + ?ServerName@RApaAppServiceBase@@QAE?AVTPtrC16@@XZ @ 151 NONAME ; class TPtrC16 RApaAppServiceBase::ServerName(void) + ?ServerRequired@CApaCommandLine@@QBEIXZ @ 152 NONAME ; unsigned int CApaCommandLine::ServerRequired(void) const + ?ServiceError@CApaAppServiceBase@@MAEXABVRMessage2@@H@Z @ 153 NONAME ; void CApaAppServiceBase::ServiceError(class RMessage2 const &, int) + ?ServiceL@CApaAppServiceBase@@MAEXABVRMessage2@@@Z @ 154 NONAME ; void CApaAppServiceBase::ServiceL(class RMessage2 const &) + ?SetServerNotRequiredL@CApaCommandLine@@QAEXXZ @ 155 NONAME ; void CApaCommandLine::SetServerNotRequiredL(void) + ?SetServerRequiredL@CApaCommandLine@@QAEXI@Z @ 156 NONAME ; void CApaCommandLine::SetServerRequiredL(unsigned int) + ?ExecutableName@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 157 NONAME ; class TPtrC16 CApaCommandLine::ExecutableName(void) const + ?ConstructCmdLineFromMessageL@CApaCommandLine@@QAEXABVRMessage2@@@Z @ 158 NONAME ; void CApaCommandLine::ConstructCmdLineFromMessageL(class RMessage2 const &) + Apparc_Dummy1 @ 159 NONAME + Apparc_Dummy2 @ 160 NONAME + ?GetIpcArgsLC@CApaCommandLine@@QBEXAAVTIpcArgs@@@Z @ 161 NONAME ; void CApaCommandLine::GetIpcArgsLC(class TIpcArgs &) const + Apparc_Dummy3 @ 162 NONAME + ?GetCommandLineFromProcessEnvironment@CApaCommandLine@@SAHAAPAV1@@Z @ 163 NONAME ; static int CApaCommandLine::GetCommandLineFromProcessEnvironment(class CApaCommandLine * &) + ??0CApaProcess@@IAE@ABVRFs@@@Z @ 164 NONAME ; CApaProcess::CApaProcess(class RFs const &) + ?SetExecutableNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 165 NONAME ; void CApaCommandLine::SetExecutableNameL(class TDesC16 const &) + ?SetProcessEnvironmentL@CApaCommandLine@@QBEXAAVRProcess@@@Z @ 166 NONAME ; void CApaCommandLine::SetProcessEnvironmentL(class RProcess &) const + ?NewL@CApaProcess@@SAPAV1@ABVRFs@@@Z @ 167 NONAME ; class CApaProcess * CApaProcess::NewL(class RFs const &) + ?EnvironmentSlotForPublicUse@CApaCommandLine@@SAHH@Z @ 168 NONAME ; int CApaCommandLine::EnvironmentSlotForPublicUse(int) + ?GetFileByHandleL@CApaCommandLine@@QBEXAAVRFile@@@Z @ 169 NONAME ; void CApaCommandLine::GetFileByHandleL(class RFile &) const + ?SetFileByHandleL@CApaCommandLine@@QAEXABVRFile@@@Z @ 170 NONAME ; void CApaCommandLine::SetFileByHandleL(class RFile const &) + ?DefaultScreen@CApaCommandLine@@QBEHXZ @ 171 NONAME ; int CApaCommandLine::DefaultScreen(void) const + ?SetDefaultScreenL@CApaCommandLine@@QAEXH@Z @ 172 NONAME ; void CApaCommandLine::SetDefaultScreenL(int) + ?ParentWindowGroupID@CApaCommandLine@@QBEHXZ @ 173 NONAME ; int CApaCommandLine::ParentWindowGroupID(void) const + ?SetParentWindowGroupID@CApaCommandLine@@QAEXH@Z @ 174 NONAME ; void CApaCommandLine::SetParentWindowGroupID(int) + ?DebugMemFail@CApaCommandLine@@QBEHXZ @ 175 NONAME ; int CApaCommandLine::DebugMemFail(void) const + ?SetAppStartupInstrumentationEventIdBaseL@CApaCommandLine@@QAEXH@Z @ 176 NONAME ; void CApaCommandLine::SetAppStartupInstrumentationEventIdBaseL(int) + ?SetDebugMemFailL@CApaCommandLine@@QAEXH@Z @ 177 NONAME ; void CApaCommandLine::SetDebugMemFailL(int) + ?ReadRootStreamLC@CApaProcess@@SAPAVCStreamDictionary@@AAPAVCFileStore@@ABVRFile@@@Z @ 178 NONAME ; class CStreamDictionary * CApaProcess::ReadRootStreamLC(class CFileStore * &, class RFile const &) + ?AppStartupInstrumentationEventIdBase@CApaCommandLine@@QBEHXZ @ 179 NONAME ; int CApaCommandLine::AppStartupInstrumentationEventIdBase(void) const + ?ConstructL@CApaProcess@@IAEXAAVTProcessId@@@Z @ 180 NONAME ; void CApaProcess::ConstructL(class TProcessId &) diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APPARC_9_REMOVE_UI_FRAMEWORKS_V1U.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APPARC_9_REMOVE_UI_FRAMEWORKS_V1U.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,239 @@ +EXPORTS + ??0CApaDocument@@IAE@AAVCApaApplication@@AAVCApaProcess@@@Z @ 1 NONAME ; protected: __thiscall CApaDocument::CApaDocument(class CApaApplication &,class CApaProcess &) + ??0CApaFileRecognizer@@IAE@AAVRFs@@@Z @ 2 NONAME ; protected: __thiscall CApaFileRecognizer::CApaFileRecognizer(class RFs &) + ??0CApaFileRecognizerType@@IAE@XZ @ 3 NONAME ; protected: __thiscall CApaFileRecognizerType::CApaFileRecognizerType(void) + ??0CApaProcess@@IAE@ABVRFs@@AAVCApaAppFinder@@@Z @ 4 NONAME ABSENT ; protected: __thiscall CApaProcess::CApaProcess(class RFs const &,class CApaAppFinder &) + ??0TApaAppEntry@@QAE@ABVTUidType@@ABV?$TBuf@$0BAA@@@@Z @ 5 NONAME ; public: __thiscall TApaAppEntry::TApaAppEntry(class TUidType const &,class TBuf<256> const &) + ??0TApaAppEntry@@QAE@XZ @ 6 NONAME ; public: __thiscall TApaAppEntry::TApaAppEntry(void) + ??0TApaAppIdentifier@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@@Z @ 7 NONAME ; public: __thiscall TApaAppIdentifier::TApaAppIdentifier(class TUid,class TBuf<256> const &) + ??0TApaAppIdentifier@@QAE@XZ @ 8 NONAME ; public: __thiscall TApaAppIdentifier::TApaAppIdentifier(void) + ??0TApaAppInfo@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@1@Z @ 9 NONAME ; public: __thiscall TApaAppInfo::TApaAppInfo(class TUid,class TBuf<256> const &,class TBuf<256> const &) + ??0TApaAppInfo@@QAE@XZ @ 10 NONAME ; public: __thiscall TApaAppInfo::TApaAppInfo(void) + ??0TApaModelDoorFactory@@QAE@PBVMApaModelHeaderFactory@@@Z @ 11 NONAME ; public: __thiscall TApaModelDoorFactory::TApaModelDoorFactory(class MApaModelHeaderFactory const *) + ??0TCapability@CApaDocument@@QAE@XZ @ 12 NONAME ; public: __thiscall CApaDocument::TCapability::TCapability(void) + ??1CApaCommandLine@@UAE@XZ @ 13 NONAME ; public: virtual __thiscall CApaCommandLine::~CApaCommandLine(void) + ??1CApaDocument@@UAE@XZ @ 14 NONAME ; public: virtual __thiscall CApaDocument::~CApaDocument(void) + ??1CApaFileRecognizer@@UAE@XZ @ 15 NONAME ; public: virtual __thiscall CApaFileRecognizer::~CApaFileRecognizer(void) + ??1CApaFileRecognizerType@@MAE@XZ @ 16 NONAME ; protected: virtual __thiscall CApaFileRecognizerType::~CApaFileRecognizerType(void) + ??1CApaModelDoor@@UAE@XZ @ 17 NONAME ; public: virtual __thiscall CApaModelDoor::~CApaModelDoor(void) + ??1CApaProcess@@UAE@XZ @ 18 NONAME ; public: virtual __thiscall CApaProcess::~CApaProcess(void) + ?AddFileRecognizerType@CApaFileRecognizer@@IAEXPAVCApaFileRecognizerType@@@Z @ 19 NONAME ; protected: void __thiscall CApaFileRecognizer::AddFileRecognizerType(class CApaFileRecognizerType *) + ?AddNewDocumentL@CApaProcess@@QAEPAVCApaDocument@@ABVTDesC16@@VTUid@@@Z @ 20 NONAME ABSENT ; public: class CApaDocument * __thiscall CApaProcess::AddNewDocumentL(class TDesC16 const &,class TUid) + ?AppFullName@CApaApplication@@UBE?AV?$TBuf@$0BAA@@@XZ @ 21 NONAME ; public: virtual class TBuf<256> __thiscall CApaApplication::AppFullName(void)const + ?AppLocator@CApaFileRecognizer@@QBEPAVCApaAppLocator@@XZ @ 22 NONAME ; public: class CApaAppLocator * __thiscall CApaFileRecognizer::AppLocator(void)const + ?AppRunL@CApaFileRecognizerType@@IBE?AVTThreadId@@ABVCApaCommandLine@@@Z @ 23 NONAME ; protected: class TThreadId __thiscall CApaFileRecognizerType::AppRunL(class CApaCommandLine const &)const + ?Capability@CApaDocument@@UBE?AVTCapability@1@XZ @ 24 NONAME ; public: virtual class CApaDocument::TCapability __thiscall CApaDocument::Capability(void)const + ?Capability@CApaFileRecognizerType@@QBEXAAVTDes8@@@Z @ 25 NONAME ; public: void __thiscall CApaFileRecognizerType::Capability(class TDes8 &)const + ?Command@CApaCommandLine@@QBE?AW4TApaCommand@@XZ @ 26 NONAME ; public: enum TApaCommand __thiscall CApaCommandLine::Command(void)const + ?ConstructL@CApaProcess@@IAEXXZ @ 27 NONAME ; protected: void __thiscall CApaProcess::ConstructL(void) + ?CopyCapability@TApaAppCapability@@SAXAAVTDes8@@ABVTDesC8@@@Z @ 28 NONAME ; public: static void __cdecl TApaAppCapability::CopyCapability(class TDes8 &,class TDesC8 const &) + ?DestroyDocument@CApaProcess@@QAEXPAVCApaDocument@@@Z @ 29 NONAME ; public: void __thiscall CApaProcess::DestroyDocument(class CApaDocument *) + ?DestroyRecognizerList@CApaFileRecognizer@@IAEXXZ @ 30 NONAME ; protected: void __thiscall CApaFileRecognizer::DestroyRecognizerList(void) + ?DllName@CApaApplication@@QBE?AV?$TBuf@$0BAA@@@XZ @ 31 NONAME ; public: class TBuf<256> __thiscall CApaApplication::DllName(void)const + ?DoCleanup@TApaDocCleanupItem@@CAXPAX@Z @ 32 NONAME ; private: static void __cdecl TApaDocCleanupItem::DoCleanup(void *) + ?DocumentName@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 33 NONAME ; public: class TPtrC16 __thiscall CApaCommandLine::DocumentName(void)const + ?Draw@CApaModelDoor@@UBEXAAVCGraphicsContext@@ABVTPoint@@ABVTRect@@PAVMGraphicsDeviceMap@@@Z @ 34 NONAME ; public: virtual void __thiscall CApaModelDoor::Draw(class CGraphicsContext &,class TPoint const &,class TRect const &,class MGraphicsDeviceMap *)const + ?ExternalizeBaseStreamL@CApaDoorBase@@IBEXAAVCStreamStore@@AAVCStreamDictionary@@@Z @ 35 NONAME ; protected: void __thiscall CApaDoorBase::ExternalizeBaseStreamL(class CStreamStore &,class CStreamDictionary &)const + ?ExternalizeL@CApaDocument@@UBEXAAVRWriteStream@@@Z @ 36 NONAME ; public: virtual void __thiscall CApaDocument::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@CApaModelDoor@@UBEXAAVRWriteStream@@@Z @ 37 NONAME ; public: virtual void __thiscall CApaModelDoor::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppCapability@@QBEXAAVRWriteStream@@@Z @ 38 NONAME ; public: void __thiscall TApaAppCapability::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppEntry@@QBEXAAVRWriteStream@@@Z @ 39 NONAME ; public: void __thiscall TApaAppEntry::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppIdentifier@@QBEXAAVRWriteStream@@@Z @ 40 NONAME ; public: void __thiscall TApaAppIdentifier::ExternalizeL(class RWriteStream &)const + ?ExternalizeL@TApaAppInfo@@QBEXAAVRWriteStream@@@Z @ 41 NONAME ; public: void __thiscall TApaAppInfo::ExternalizeL(class RWriteStream &)const + ?FullCommandLine@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 42 NONAME ABSENT ; public: class TPtrC16 __thiscall CApaCommandLine::FullCommandLine(void)const + ?GenerateFileName@CApaApplication@@SAHAAVRFs@@AAV?$TBuf@$0BAA@@@@Z @ 43 NONAME ; public: static int __cdecl CApaApplication::GenerateFileName(class RFs &,class TBuf<256> &) + ?GetOriginalSizeInTwips@CApaModelDoor@@UBEXAAVTSize@@@Z @ 44 NONAME ; public: virtual void __thiscall CApaModelDoor::GetOriginalSizeInTwips(class TSize &)const + ?GlassPictureL@CApaDocument@@UAEPAVCPicture@@XZ @ 45 NONAME ; public: virtual class CPicture * __thiscall CApaDocument::GlassPictureL(void) + ?InternalizeBaseStreamL@CApaDoorBase@@IAE?AVTSize@@ABVCStreamStore@@ABVCStreamDictionary@@@Z @ 46 NONAME ; protected: class TSize __thiscall CApaDoorBase::InternalizeBaseStreamL(class CStreamStore const &,class CStreamDictionary const &) + ?InternalizeL@TApaAppCapability@@QAEXAAVRReadStream@@@Z @ 47 NONAME ; public: void __thiscall TApaAppCapability::InternalizeL(class RReadStream &) + ?InternalizeL@TApaAppEntry@@QAEXAAVRReadStream@@@Z @ 48 NONAME ; public: void __thiscall TApaAppEntry::InternalizeL(class RReadStream &) + ?InternalizeL@TApaAppIdentifier@@QAEXAAVRReadStream@@@Z @ 49 NONAME ; public: void __thiscall TApaAppIdentifier::InternalizeL(class RReadStream &) + ?InternalizeL@TApaAppInfo@@QAEXAAVRReadStream@@@Z @ 50 NONAME ; public: void __thiscall TApaAppInfo::InternalizeL(class RReadStream &) + ?LibraryName@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 51 NONAME ABSENT ; public: class TPtrC16 __thiscall CApaCommandLine::LibraryName(void)const + ?MainDocFileName@CApaProcess@@QBE?AVTPtrC16@@XZ @ 52 NONAME ; public: class TPtrC16 __thiscall CApaProcess::MainDocFileName(void)const + ?New@CApaCommandLine@@SAPAV1@PAVHBufC16@@@Z @ 53 NONAME ABSENT ; public: static class CApaCommandLine * __cdecl CApaCommandLine::New(class HBufC16 *) + ?NewL@CApaCommandLine@@SAPAV1@ABVTDesC16@@@Z @ 54 NONAME ABSENT ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewL(class TDesC16 const &) + ?NewL@CApaCommandLine@@SAPAV1@XZ @ 55 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewL(void) + ?NewL@CApaModelDoor@@SAPAV1@ABVCStreamStore@@VTStreamId@@PBVMApaModelHeaderFactory@@@Z @ 56 NONAME ; public: static class CApaModelDoor * __cdecl CApaModelDoor::NewL(class CStreamStore const &,class TStreamId,class MApaModelHeaderFactory const *) + ?NewL@CApaModelDoor@@SAPAV1@PAVCApaModelHeader@@@Z @ 57 NONAME ; public: static class CApaModelDoor * __cdecl CApaModelDoor::NewL(class CApaModelHeader *) + ?NewL@CApaProcess@@SAPAV1@ABVRFs@@AAVCApaAppFinder@@@Z @ 58 NONAME ABSENT ; public: static class CApaProcess * __cdecl CApaProcess::NewL(class RFs const &,class CApaAppFinder &) + ?NewLC@CApaCommandLine@@SAPAV1@ABVTDesC16@@@Z @ 59 NONAME ABSENT ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewLC(class TDesC16 const &) + ?NewLC@CApaCommandLine@@SAPAV1@XZ @ 60 NONAME ; public: static class CApaCommandLine * __cdecl CApaCommandLine::NewLC(void) + ?NewLC@CApaModelDoor@@SAPAV1@PAVCApaModelHeader@@@Z @ 61 NONAME ; public: static class CApaModelDoor * __cdecl CApaModelDoor::NewLC(class CApaModelHeader *) + ?NewPictureL@TApaModelDoorFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 62 NONAME ; public: virtual void __thiscall TApaModelDoorFactory::NewPictureL(class TPictureHeader &,class CStreamStore const &)const + ?OpenAppInfoFileL@CApaApplication@@QBEPAVCApaAppInfoFileReader@@XZ @ 63 NONAME ABSENT ; public: class CApaAppInfoFileReader * __thiscall CApaApplication::OpenAppInfoFileL(void)const + ?OpenIniFileL@CApaApplication@@QBEPAVCDictionaryStore@@AAVRFs@@@Z @ 64 NONAME ; public: class CDictionaryStore * __thiscall CApaApplication::OpenIniFileL(class RFs &)const + ?OpenNewDocumentL@CApaProcess@@QAEPAVCApaDocument@@AAPAVCFileStore@@AAPAVCStreamDictionary@@ABVTDesC16@@I@Z @ 65 NONAME ; public: class CApaDocument * __thiscall CApaProcess::OpenNewDocumentL(class CFileStore * &,class CStreamDictionary * &,class TDesC16 const &,unsigned int) + ?ReadAppIdentifierL@CApaProcess@@SA?AVTApaAppIdentifier@@ABVCStreamStore@@ABVCStreamDictionary@@@Z @ 66 NONAME ; public: static class TApaAppIdentifier __cdecl CApaProcess::ReadAppIdentifierL(class CStreamStore const &,class CStreamDictionary const &) + ?ReadRootStreamLC@CApaProcess@@SAPAVCStreamDictionary@@AAVRFs@@AAPAVCFileStore@@ABVTDesC16@@I@Z @ 67 NONAME ; public: static class CStreamDictionary * __cdecl CApaProcess::ReadRootStreamLC(class RFs &,class CFileStore * &,class TDesC16 const &,unsigned int) + ?RecognizeFileL@CApaFileRecognizer@@QAEPAVCApaFileRecognizerType@@ABVTDesC16@@PBVTUidType@@@Z @ 68 NONAME ; public: class CApaFileRecognizerType * __thiscall CApaFileRecognizer::RecognizeFileL(class TDesC16 const &,class TUidType const *) + ?NewAppServerL@CApaApplication@@UAEXAAPAVCApaAppServer@@@Z @ 69 NONAME ; void CApaApplication::NewAppServerL(class CApaAppServer * &) + ?OpenFileL@CApaDocument@@EAEXAAPAVCFileStore@@AAVRFile@@@Z @ 70 NONAME ; void CApaDocument::OpenFileL(class CFileStore * &, class RFile &) + ?Reserved_2@CApaDocument@@EAEXXZ @ 71 NONAME ; private: virtual void __thiscall CApaDocument::Reserved_2(void) + ?ResetL@CApaProcess@@QAEXXZ @ 72 NONAME ; public: void __thiscall CApaProcess::ResetL(void) + ?RestoreL@CApaModelDoor@@QAEXABVCStreamStore@@VTStreamId@@PBVMApaModelHeaderFactory@@@Z @ 73 NONAME ; public: void __thiscall CApaModelDoor::RestoreL(class CStreamStore const &,class TStreamId,class MApaModelHeaderFactory const *) + ?ScaleFactorHeight@CApaModelDoor@@UBEHXZ @ 74 NONAME ; public: virtual int __thiscall CApaModelDoor::ScaleFactorHeight(void)const + ?ScaleFactorWidth@CApaModelDoor@@UBEHXZ @ 75 NONAME ; public: virtual int __thiscall CApaModelDoor::ScaleFactorWidth(void)const + ?SetAppLocator@CApaFileRecognizer@@IAEXPAVCApaAppLocator@@@Z @ 76 NONAME ; protected: void __thiscall CApaFileRecognizer::SetAppLocator(class CApaAppLocator *) + ?SetCommandL@CApaCommandLine@@QAEXW4TApaCommand@@@Z @ 77 NONAME ; public: void __thiscall CApaCommandLine::SetCommandL(enum TApaCommand) + ?SetDocumentNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 78 NONAME ; public: void __thiscall CApaCommandLine::SetDocumentNameL(class TDesC16 const &) + ?SetFullCommandLine@CApaCommandLine@@QAEHPAVHBufC16@@@Z @ 79 NONAME ABSENT ; public: int __thiscall CApaCommandLine::SetFullCommandLine(class HBufC16 *) + ?SetFullCommandLineL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 80 NONAME ABSENT ; public: void __thiscall CApaCommandLine::SetFullCommandLineL(class TDesC16 const &) + ?SetLibraryNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 81 NONAME ABSENT ; public: void __thiscall CApaCommandLine::SetLibraryNameL(class TDesC16 const &) + ?SetMainDocFileName@CApaProcess@@QAEXABVTDesC16@@@Z @ 82 NONAME ; public: void __thiscall CApaProcess::SetMainDocFileName(class TDesC16 const &) + ?SetMainDocument@CApaProcess@@QAEXPAVCApaDocument@@@Z @ 83 NONAME ; public: void __thiscall CApaProcess::SetMainDocument(class CApaDocument *) + ?SetReserveLengthL@CApaCommandLine@@QAEXH@Z @ 84 NONAME ABSENT ; public: void __thiscall CApaCommandLine::SetReserveLengthL(int) + ?SetScaleFactor@CApaModelDoor@@UAEXHH@Z @ 85 NONAME ; public: virtual void __thiscall CApaModelDoor::SetScaleFactor(int,int) + ?SetTailEndL@CApaCommandLine@@QAEXABVTDesC8@@@Z @ 86 NONAME ; public: void __thiscall CApaCommandLine::SetTailEndL(class TDesC8 const &) + ?StoreL@CApaModelDoor@@UBE?AVTStreamId@@AAVCStreamStore@@@Z @ 87 NONAME ; public: virtual class TStreamId __thiscall CApaModelDoor::StoreL(class CStreamStore &)const + ?TailEnd@CApaCommandLine@@QBE?AVTPtrC8@@XZ @ 88 NONAME ; public: class TPtrC8 __thiscall CApaCommandLine::TailEnd(void)const + ?ValidatePasswordL@CApaDocument@@UBEXXZ @ 89 NONAME ; public: virtual void __thiscall CApaDocument::ValidatePasswordL(void)const + ?WriteAppIdentifierL@CApaProcess@@SAXAAVCStreamStore@@AAVCStreamDictionary@@ABVTApaAppIdentifier@@@Z @ 90 NONAME ; public: static void __cdecl CApaProcess::WriteAppIdentifierL(class CStreamStore &,class CStreamDictionary &,class TApaAppIdentifier const &) + ?WriteRootStreamL@CApaProcess@@SAXAAVCPersistentStore@@AAVCStreamDictionary@@ABVCApaApplication@@@Z @ 91 NONAME ; public: static void __cdecl CApaProcess::WriteRootStreamL(class CPersistentStore &,class CStreamDictionary &,class CApaApplication const &) + ?WriteRootStreamL@CApaProcess@@SAXAAVCPersistentStore@@AAVCStreamDictionary@@ABVTApaAppIdentifier@@@Z @ 92 NONAME ; public: static void __cdecl CApaProcess::WriteRootStreamL(class CPersistentStore &,class CStreamDictionary &,class TApaAppIdentifier const &) + ?DetachFromStoreL@CApaModelDoor@@UAEXW4TDetach@CPicture@@@Z @ 93 NONAME ; public: virtual void __thiscall CApaModelDoor::DetachFromStoreL(enum CPicture::TDetach) + ?Lock@CApaFileRecognizerType@@QAEXXZ @ 94 NONAME ; public: void __thiscall CApaFileRecognizerType::Lock(void) + ?RemoveFileRecognizerType@CApaFileRecognizer@@IAEHPBVCApaFileRecognizerType@@@Z @ 95 NONAME ; protected: int __thiscall CApaFileRecognizer::RemoveFileRecognizerType(class CApaFileRecognizerType const *) + ?Unlock@CApaFileRecognizerType@@QAEXXZ @ 96 NONAME ; public: void __thiscall CApaFileRecognizerType::Unlock(void) + ??0TApaLastUsedEntry@@QAE@V?$TBuf@$0BAA@@@VTUid@@@Z @ 97 NONAME ABSENT ; public: __thiscall TApaLastUsedEntry::TApaLastUsedEntry(class TBuf<256>,class TUid) + ??0TApaLastUsedEntry@@QAE@XZ @ 98 NONAME ABSENT ; public: __thiscall TApaLastUsedEntry::TApaLastUsedEntry(void) + ?AddLastUsedEntryL@CApaRecentFile@@SAXAAVRFs@@ABVTDesC16@@VTUid@@@Z @ 99 NONAME ABSENT ; public: static void __cdecl CApaRecentFile::AddLastUsedEntryL(class RFs &,class TDesC16 const &,class TUid) + ?ExternalizeL@TApaLastUsedEntry@@QBEXAAVRWriteStream@@@Z @ 100 NONAME ABSENT ; public: void __thiscall TApaLastUsedEntry::ExternalizeL(class RWriteStream &)const + ?GetRecentFileL@CApaRecentFile@@SA?AVTApaLastUsedEntry@@AAVRFs@@VTUid@@H@Z @ 101 NONAME ABSENT ; public: static class TApaLastUsedEntry __cdecl CApaRecentFile::GetRecentFileL(class RFs &,class TUid,int) + ?GetRecentFileListL@CApaRecentFile@@SAPAV?$CArrayFixFlat@VTApaLastUsedEntry@@@@AAVRFs@@VTUid@@@Z @ 102 NONAME ABSENT ; public: static class CArrayFixFlat * __cdecl CApaRecentFile::GetRecentFileListL(class RFs &,class TUid) + ?InternalizeL@TApaLastUsedEntry@@QAEXAAVRReadStream@@@Z @ 103 NONAME ABSENT ; public: void __thiscall TApaLastUsedEntry::InternalizeL(class RReadStream &) + ?Reserved_1@CApaFileRecognizerType@@EAEXXZ @ 104 NONAME ; private: virtual void __thiscall CApaFileRecognizerType::Reserved_1(void) + ?Reserved_1@CApaModelHeader@@EAEXXZ @ 105 NONAME ; private: virtual void __thiscall CApaModelHeader::Reserved_1(void) + ??0TApaAppViewInfo@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@H@Z @ 106 NONAME ; public: __thiscall TApaAppViewInfo::TApaAppViewInfo(class TUid,class TBuf<256> const &,int) + ??0TApaAppViewInfo@@QAE@XZ @ 107 NONAME ; public: __thiscall TApaAppViewInfo::TApaAppViewInfo(void) + ?ExternalizeL@TApaAppViewInfo@@QBEXAAVRWriteStream@@@Z @ 108 NONAME ; public: void __thiscall TApaAppViewInfo::ExternalizeL(class RWriteStream &)const + ?InternalizeL@TApaAppViewInfo@@QAEXAAVRReadStream@@@Z @ 109 NONAME ; public: void __thiscall TApaAppViewInfo::InternalizeL(class RReadStream &) + ??0TApaAppInfo@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@11@Z @ 110 NONAME ; public: __thiscall TApaAppInfo::TApaAppInfo(class TUid,class TBuf<256> const &,class TBuf<256> const &,class TBuf<256> const &) + ??0TApaAppInfo_7_0@@QAE@VTUid@@ABV?$TBuf@$0BAA@@@1@Z @ 111 NONAME ABSENT ; TApaAppInfo_7_0::TApaAppInfo_7_0(class TUid, class TBuf<256> const &, class TBuf<256> const &) + ??0TApaAppInfo_7_0@@QAE@XZ @ 112 NONAME ABSENT ; TApaAppInfo_7_0::TApaAppInfo_7_0(void) + ?ExternalizeL@TApaAppInfo_7_0@@QBEXAAVRWriteStream@@@Z @ 113 NONAME ABSENT ; void TApaAppInfo_7_0::ExternalizeL(class RWriteStream &) const + ?InternalizeL@TApaAppInfo_7_0@@QAEXAAVRReadStream@@@Z @ 114 NONAME ABSENT ; void TApaAppInfo_7_0::InternalizeL(class RReadStream &) + ?Externalize7_0L@TApaAppCapability@@ABEXAAVRWriteStream@@@Z @ 115 NONAME ; void TApaAppCapability::Externalize7_0L(class RWriteStream &) const + ?Internalize7_0L@TApaAppCapability@@QAEXAAVRReadStream@@@Z @ 116 NONAME ; void TApaAppCapability::Internalize7_0L(class RReadStream &) + ??0TApaEmbeddabilityFilter@@QAE@XZ @ 117 NONAME ; public: __thiscall TApaEmbeddabilityFilter::TApaEmbeddabilityFilter(void) + ?AddEmbeddability@TApaEmbeddabilityFilter@@QAEXW4TEmbeddability@TApaAppCapability@@@Z @ 118 NONAME ; public: void __thiscall TApaEmbeddabilityFilter::AddEmbeddability(enum TApaAppCapability::TEmbeddability) + ?MatchesEmbeddability@TApaEmbeddabilityFilter@@QBEHW4TEmbeddability@TApaAppCapability@@@Z @ 119 NONAME ; public: int __thiscall TApaEmbeddabilityFilter::MatchesEmbeddability(enum TApaAppCapability::TEmbeddability)const + ?SetMainDocFileNameL@CApaProcess@@QAEXABVTDesC16@@@Z @ 120 NONAME ; public: void __thiscall CApaProcess::SetMainDocFileNameL(class TDesC16 const &) + ?CreateFileRecognizerL@CApaFileRecognizerType@@SAPAV1@VTUid@@@Z @ 121 NONAME ; public: static class CApaFileRecognizerType * __cdecl CApaFileRecognizerType::CreateFileRecognizerL(class TUid) + ??0TApaApplicationFactory@@QAE@ABVCImplementationInformation@@@Z @ 122 NONAME ; TApaApplicationFactory::TApaApplicationFactory(class CImplementationInformation const &) + ??0TApaApplicationFactory@@QAE@P6APAVCApaApplication@@XZ@Z @ 123 NONAME ; TApaApplicationFactory::TApaApplicationFactory(class CApaApplication * (*)(void)) + ??0TApaApplicationFactory@@QAE@VTUid@@@Z @ 124 NONAME ; TApaApplicationFactory::TApaApplicationFactory(class TUid) + ??1CApaApplication@@UAE@XZ @ 125 NONAME ; CApaApplication::~CApaApplication(void) + ?AddNewDocumentL@CApaProcess@@QAEPAVCApaDocument@@VTApaApplicationFactory@@@Z @ 126 NONAME ; class CApaDocument * CApaProcess::AddNewDocumentL(class TApaApplicationFactory) + ??0CApaAppServer@@IAE@XZ @ 127 NONAME ; CApaAppServer::CApaAppServer(void) + ??0CApaAppServiceBase@@QAE@XZ @ 128 NONAME ; CApaAppServiceBase::CApaAppServiceBase(void) + ??0RApaAppServiceBase@@IAE@XZ @ 129 NONAME ; RApaAppServiceBase::RApaAppServiceBase(void) + ??1CApaAppServer@@UAE@XZ @ 130 NONAME ; CApaAppServer::~CApaAppServer(void) + ??1CApaAppServiceBase@@UAE@XZ @ 131 NONAME ; CApaAppServiceBase::~CApaAppServiceBase(void) + ??1CApaServerAppExitMonitor@@UAE@XZ @ 132 NONAME ; CApaServerAppExitMonitor::~CApaServerAppExitMonitor(void) + ?CancelNotifyServerExit@RApaAppServiceBase@@QBEXXZ @ 133 NONAME ; void RApaAppServiceBase::CancelNotifyServerExit(void) const + ?Close@RApaAppServiceBase@@QAEXXZ @ 134 NONAME ; void RApaAppServiceBase::Close(void) + ?ConnectExistingAppL@RApaAppServiceBase@@QAEXABV1@@Z @ 135 NONAME ; void RApaAppServiceBase::ConnectExistingAppL(class RApaAppServiceBase const &) + ?ConnectExistingByNameL@RApaAppServiceBase@@QAEXABVTDesC16@@@Z @ 136 NONAME ; void RApaAppServiceBase::ConnectExistingByNameL(class TDesC16 const &) + ?ConstructL@CApaAppServer@@UAEXABVTDesC16@@@Z @ 137 NONAME ; void CApaAppServer::ConstructL(class TDesC16 const &) + ?CreateL@CApaAppServiceBase@@MAEXXZ @ 138 NONAME ; void CApaAppServiceBase::CreateL(void) + ?CreateServiceL@CApaAppServer@@UBEPAVCApaAppServiceBase@@VTUid@@@Z @ 139 NONAME ; class CApaAppServiceBase * CApaAppServer::CreateServiceL(class TUid) const + ?CreateServiceSecurityCheckL@CApaAppServer@@UAE?AW4TCustomResult@CPolicyServer@@VTUid@@ABVRMessage2@@AAHAAVTSecurityInfo@@@Z @ 140 NONAME ; enum CPolicyServer::TCustomResult CApaAppServer::CreateServiceSecurityCheckL(class TUid, class RMessage2 const &, int &, class TSecurityInfo &) + ?CustomSecurityCheckL@CApaAppServer@@MAE?AW4TCustomResult@CPolicyServer@@ABVRMessage2@@AAHAAVTSecurityInfo@@@Z @ 141 NONAME ; enum CPolicyServer::TCustomResult CApaAppServer::CustomSecurityCheckL(class RMessage2 const &, int &, class TSecurityInfo &) + ?ExtensionInterface@CApaAppServer@@EAEXVTUid@@AAPAX@Z @ 142 NONAME ; void CApaAppServer::ExtensionInterface(class TUid, void * &) + ?ExtensionInterface@CApaAppServiceBase@@EAEXVTUid@@AAPAX@Z @ 143 NONAME ; void CApaAppServiceBase::ExtensionInterface(class TUid, void * &) + ?ExtensionInterface@RApaAppServiceBase@@EAEXVTUid@@AAPAX@Z @ 144 NONAME ; void RApaAppServiceBase::ExtensionInterface(class TUid, void * &) + ?NewL@CApaServerAppExitMonitor@@SAPAV1@AAVRApaAppServiceBase@@AAVMApaServerAppExitObserver@@H@Z @ 145 NONAME ; class CApaServerAppExitMonitor * CApaServerAppExitMonitor::NewL(class RApaAppServiceBase &, class MApaServerAppExitObserver &, int) + ?NewLC@CApaServerAppExitMonitor@@SAPAV1@AAVRApaAppServiceBase@@AAVMApaServerAppExitObserver@@H@Z @ 146 NONAME ; class CApaServerAppExitMonitor * CApaServerAppExitMonitor::NewLC(class RApaAppServiceBase &, class MApaServerAppExitObserver &, int) + ?NewSessionL@CApaAppServer@@EBEPAVCSession2@@ABVTVersion@@ABVRMessage2@@@Z @ 147 NONAME ; class CSession2 * CApaAppServer::NewSessionL(class TVersion const &, class RMessage2 const &) const + ?NotifyServerExit@CApaAppServer@@QAEXH@Z @ 148 NONAME ; void CApaAppServer::NotifyServerExit(int) + ?NotifyServerExit@RApaAppServiceBase@@QBEXAAVTRequestStatus@@@Z @ 149 NONAME ; void RApaAppServiceBase::NotifyServerExit(class TRequestStatus &) const + ?SecurityCheckL@CApaAppServiceBase@@UAE?AW4TCustomResult@CPolicyServer@@ABVRMessage2@@AAHAAVTSecurityInfo@@@Z @ 150 NONAME ; enum CPolicyServer::TCustomResult CApaAppServiceBase::SecurityCheckL(class RMessage2 const &, int &, class TSecurityInfo &) + ?ServerName@RApaAppServiceBase@@QBE?AVTPtrC16@@XZ @ 151 NONAME ; class TPtrC16 RApaAppServiceBase::ServerName(void) const + ?ServerRequired@CApaCommandLine@@QBEIXZ @ 152 NONAME ; unsigned int CApaCommandLine::ServerRequired(void) const + ?ServiceError@CApaAppServiceBase@@MAEXABVRMessage2@@H@Z @ 153 NONAME ; void CApaAppServiceBase::ServiceError(class RMessage2 const &, int) + ?ServiceL@CApaAppServiceBase@@MAEXABVRMessage2@@@Z @ 154 NONAME ; void CApaAppServiceBase::ServiceL(class RMessage2 const &) + ?SetServerNotRequiredL@CApaCommandLine@@QAEXXZ @ 155 NONAME ; void CApaCommandLine::SetServerNotRequiredL(void) + ?SetServerRequiredL@CApaCommandLine@@QAEXI@Z @ 156 NONAME ; void CApaCommandLine::SetServerRequiredL(unsigned int) + ?ExecutableName@CApaCommandLine@@QBE?AVTPtrC16@@XZ @ 157 NONAME ; class TPtrC16 CApaCommandLine::ExecutableName(void) const + ?ConstructCmdLineFromMessageL@CApaCommandLine@@QAEXABVRMessage2@@@Z @ 158 NONAME ; void CApaCommandLine::ConstructCmdLineFromMessageL(class RMessage2 const &) + Apparc_Dummy1 @ 159 NONAME ABSENT + Apparc_Dummy2 @ 160 NONAME ABSENT + ?GetIpcArgsLC@CApaCommandLine@@QBEXAAVTIpcArgs@@@Z @ 161 NONAME ; void CApaCommandLine::GetIpcArgsLC(class TIpcArgs &) const + Apparc_Dummy3 @ 162 NONAME ABSENT + ?GetCommandLineFromProcessEnvironment@CApaCommandLine@@SAHAAPAV1@@Z @ 163 NONAME ; static int CApaCommandLine::GetCommandLineFromProcessEnvironment(class CApaCommandLine * &) + ??0CApaProcess@@IAE@ABVRFs@@@Z @ 164 NONAME ; CApaProcess::CApaProcess(class RFs const &) + ?SetExecutableNameL@CApaCommandLine@@QAEXABVTDesC16@@@Z @ 165 NONAME ; void CApaCommandLine::SetExecutableNameL(class TDesC16 const &) + ?SetProcessEnvironmentL@CApaCommandLine@@QBEXAAVRProcess@@@Z @ 166 NONAME ; void CApaCommandLine::SetProcessEnvironmentL(class RProcess &) const + ?NewL@CApaProcess@@SAPAV1@ABVRFs@@@Z @ 167 NONAME ; class CApaProcess * CApaProcess::NewL(class RFs const &) + ?EnvironmentSlotForPublicUse@CApaCommandLine@@SAHH@Z @ 168 NONAME ; int CApaCommandLine::EnvironmentSlotForPublicUse(int) + ?GetFileByHandleL@CApaCommandLine@@QBEXAAVRFile@@@Z @ 169 NONAME ; void CApaCommandLine::GetFileByHandleL(class RFile &) const + ?SetFileByHandleL@CApaCommandLine@@QAEXABVRFile@@@Z @ 170 NONAME ; void CApaCommandLine::SetFileByHandleL(class RFile const &) + ?DefaultScreen@CApaCommandLine@@QBEHXZ @ 171 NONAME ; int CApaCommandLine::DefaultScreen(void) const + ?SetDefaultScreenL@CApaCommandLine@@QAEXH@Z @ 172 NONAME ; void CApaCommandLine::SetDefaultScreenL(int) + ?ParentWindowGroupID@CApaCommandLine@@QBEHXZ @ 173 NONAME ; int CApaCommandLine::ParentWindowGroupID(void) const + ?SetParentWindowGroupID@CApaCommandLine@@QAEXH@Z @ 174 NONAME ; void CApaCommandLine::SetParentWindowGroupID(int) + ?DebugMemFail@CApaCommandLine@@QBEHXZ @ 175 NONAME ; int CApaCommandLine::DebugMemFail(void) const + ?SetAppStartupInstrumentationEventIdBaseL@CApaCommandLine@@QAEXH@Z @ 176 NONAME ; void CApaCommandLine::SetAppStartupInstrumentationEventIdBaseL(int) + ?SetDebugMemFailL@CApaCommandLine@@QAEXH@Z @ 177 NONAME ; void CApaCommandLine::SetDebugMemFailL(int) + ?ReadRootStreamLC@CApaProcess@@SAPAVCStreamDictionary@@AAPAVCFileStore@@ABVRFile@@@Z @ 178 NONAME ; class CStreamDictionary * CApaProcess::ReadRootStreamLC(class CFileStore * &, class RFile const &) + ?AppStartupInstrumentationEventIdBase@CApaCommandLine@@QBEHXZ @ 179 NONAME ; int CApaCommandLine::AppStartupInstrumentationEventIdBase(void) const + ??0CApaAppFinder@@IAE@XZ @ 180 NONAME ; CApaAppFinder::CApaAppFinder(void) + ??0CApaAppServiceInfoArray@@IAE@XZ @ 181 NONAME ; CApaAppServiceInfoArray::CApaAppServiceInfoArray(void) + ??0CApaApplication@@IAE@XZ @ 182 NONAME ; CApaApplication::CApaApplication(void) + ??0CApaDocument@@IAE@XZ @ 183 NONAME ; CApaDocument::CApaDocument(void) + ??0CApaDoorBase@@IAE@XZ @ 184 NONAME ; CApaDoorBase::CApaDoorBase(void) + ??0CApaModelHeader@@IAE@XZ @ 185 NONAME ; CApaModelHeader::CApaModelHeader(void) + ??0CApaProcess@@IAE@XZ @ 186 NONAME ; CApaProcess::CApaProcess(void) + ??0MApaAppStarter@@IAE@XZ @ 187 NONAME ; MApaAppStarter::MApaAppStarter(void) + ??0MApaEmbeddedDocObserver@@IAE@XZ @ 188 NONAME ; MApaEmbeddedDocObserver::MApaEmbeddedDocObserver(void) + ??0MApaModelHeaderFactory@@IAE@XZ @ 189 NONAME ; MApaModelHeaderFactory::MApaModelHeaderFactory(void) + ??0MApaServerAppExitObserver@@IAE@XZ @ 190 NONAME ; MApaServerAppExitObserver::MApaServerAppExitObserver(void) + ??0TApaApplicationFactory@@QAE@XZ @ 191 NONAME ; TApaApplicationFactory::TApaApplicationFactory(void) + ?CApaAppFinder_Reserved1@CApaAppFinder@@EAEXXZ @ 192 NONAME ; void CApaAppFinder::CApaAppFinder_Reserved1(void) + ?CApaAppFinder_Reserved2@CApaAppFinder@@EAEXXZ @ 193 NONAME ; void CApaAppFinder::CApaAppFinder_Reserved2(void) + ?CApaAppServer_Reserved1@CApaAppServer@@EAEXXZ @ 194 NONAME ; void CApaAppServer::CApaAppServer_Reserved1(void) + ?CApaAppServer_Reserved2@CApaAppServer@@EAEXXZ @ 195 NONAME ; void CApaAppServer::CApaAppServer_Reserved2(void) + ?CApaAppServiceBase_Reserved1@CApaAppServiceBase@@EAEXXZ @ 196 NONAME ; void CApaAppServiceBase::CApaAppServiceBase_Reserved1(void) + ?CApaAppServiceBase_Reserved2@CApaAppServiceBase@@EAEXXZ @ 197 NONAME ; void CApaAppServiceBase::CApaAppServiceBase_Reserved2(void) + ?CApaAppServiceInfoArray_Reserved1@CApaAppServiceInfoArray@@EAEXXZ @ 198 NONAME ; void CApaAppServiceInfoArray::CApaAppServiceInfoArray_Reserved1(void) + ?CApaAppServiceInfoArray_Reserved2@CApaAppServiceInfoArray@@EAEXXZ @ 199 NONAME ; void CApaAppServiceInfoArray::CApaAppServiceInfoArray_Reserved2(void) + ?CApaApplication_Reserved1@CApaApplication@@MAEXXZ @ 200 NONAME ; void CApaApplication::CApaApplication_Reserved1(void) + ?CApaApplication_Reserved2@CApaApplication@@MAEXXZ @ 201 NONAME ; void CApaApplication::CApaApplication_Reserved2(void) + ?CApaDoorBase_Reserved1@CApaDoorBase@@EAEXXZ @ 202 NONAME ; void CApaDoorBase::CApaDoorBase_Reserved1(void) + ?CApaDoorBase_Reserved2@CApaDoorBase@@EAEXXZ @ 203 NONAME ; void CApaDoorBase::CApaDoorBase_Reserved2(void) + ?CApaProcess_Reserved1@CApaProcess@@MAEXXZ @ 204 NONAME ; void CApaProcess::CApaProcess_Reserved1(void) + ?CApaProcess_Reserved2@CApaProcess@@MAEXXZ @ 205 NONAME ; void CApaProcess::CApaProcess_Reserved2(void) + ?Capability@CApaDoorBase@@UBE?AVTPictureCapability@@XZ @ 206 NONAME ; class TPictureCapability CApaDoorBase::Capability(void) const + ?CountResources@CApaAppServiceBase@@MAEHXZ @ 207 NONAME ; int CApaAppServiceBase::CountResources(void) + ?Disconnect@CApaAppServiceBase@@MAEXABVRMessage2@@@Z @ 208 NONAME ; void CApaAppServiceBase::Disconnect(class RMessage2 const &) + ?DoConnect@CApaAppServer@@MAEXABVRMessage2@@@Z @ 209 NONAME ; void CApaAppServer::DoConnect(class RMessage2 const &) + ?GetCropInTwips@CApaDoorBase@@UBEXAAVTMargins@@@Z @ 210 NONAME ; void CApaDoorBase::GetCropInTwips(class TMargins &) const + ?LineBreakPossible@CApaDoorBase@@UBEHIHH@Z @ 211 NONAME ; int CApaDoorBase::LineBreakPossible(unsigned int, int, int) const + ?MApaAppStarter_Reserved1@MApaAppStarter@@EAEXXZ @ 212 NONAME ; void MApaAppStarter::MApaAppStarter_Reserved1(void) + ?MApaAppStarter_Reserved2@MApaAppStarter@@EAEXXZ @ 213 NONAME ; void MApaAppStarter::MApaAppStarter_Reserved2(void) + ?MApaEmbeddedDocObserver_Reserved1@MApaEmbeddedDocObserver@@EAEXXZ @ 214 NONAME ; void MApaEmbeddedDocObserver::MApaEmbeddedDocObserver_Reserved1(void) + ?MApaEmbeddedDocObserver_Reserved2@MApaEmbeddedDocObserver@@EAEXXZ @ 215 NONAME ; void MApaEmbeddedDocObserver::MApaEmbeddedDocObserver_Reserved2(void) + ?MApaModelHeaderFactory_Reserved1@MApaModelHeaderFactory@@EAEXXZ @ 216 NONAME ; void MApaModelHeaderFactory::MApaModelHeaderFactory_Reserved1(void) + ?MApaModelHeaderFactory_Reserved2@MApaModelHeaderFactory@@EAEXXZ @ 217 NONAME ; void MApaModelHeaderFactory::MApaModelHeaderFactory_Reserved2(void) + ?MApaServerAppExitObserver_Reserved1@MApaServerAppExitObserver@@EAEXXZ @ 218 NONAME ; void MApaServerAppExitObserver::MApaServerAppExitObserver_Reserved1(void) + ?MApaServerAppExitObserver_Reserved2@MApaServerAppExitObserver@@EAEXXZ @ 219 NONAME ; void MApaServerAppExitObserver::MApaServerAppExitObserver_Reserved2(void) + ?NativePixelSize@CApaDoorBase@@UAEHAAVTSize@@@Z @ 220 NONAME ; int CApaDoorBase::NativePixelSize(class TSize &) + ?RApaAppServiceBase_Reserved1@RApaAppServiceBase@@EAEXXZ @ 221 NONAME ; void RApaAppServiceBase::RApaAppServiceBase_Reserved1(void) + ?RApaAppServiceBase_Reserved2@RApaAppServiceBase@@EAEXXZ @ 222 NONAME ; void RApaAppServiceBase::RApaAppServiceBase_Reserved2(void) + ?Reserved_2@CApaModelHeader@@EAEXXZ @ 223 NONAME ; void CApaModelHeader::Reserved_2(void) + ?ScaleFactorHeight@CApaDoorBase@@UBEHXZ @ 224 NONAME ; int CApaDoorBase::ScaleFactorHeight(void) const + ?ScaleFactorWidth@CApaDoorBase@@UBEHXZ @ 225 NONAME ; int CApaDoorBase::ScaleFactorWidth(void) const + ?SetCropInTwips@CApaDoorBase@@UAEXABVTMargins@@@Z @ 226 NONAME ; void CApaDoorBase::SetCropInTwips(class TMargins const &) + ?SetScaleFactor@CApaDoorBase@@UAEXHH@Z @ 227 NONAME ; void CApaDoorBase::SetScaleFactor(int, int) + ?StoreL@CApaDoorBase@@UBE?AVTStreamId@@AAVCStreamStore@@@Z @ 228 NONAME ; class TStreamId CApaDoorBase::StoreL(class CStreamStore &) const + ?OpaqueData@CApaCommandLine@@QBE?AVTPtrC8@@XZ @ 229 NONAME ; class TPtrC8 CApaCommandLine::OpaqueData(void) const + ?SetOpaqueDataL@CApaCommandLine@@QAEXABVTDesC8@@@Z @ 230 NONAME ; void CApaCommandLine::SetOpaqueDataL(class TDesC8 cosnt &) + ?IsDefaultScreenSet@CApaCommandLine@@QBEHXZ @ 231 NONAME ; int CApaCommandLine::IsDefaultScreenSet(void) const + ?ConstructL@CApaProcess@@IAEXVTProcessId@@@Z @ 232 NONAME ; void CApaProcess::ConstructL(class TProcessId) + ?ParentProcessId@CApaCommandLine@@QBE?AVTProcessId@@XZ @ 233 NONAME ; class TProcessId CApaCommandLine::ParentProcessId(void) const + ?SetParentProcessId@CApaCommandLine@@QAEXVTProcessId@@@Z @ 234 NONAME ; void CApaCommandLine::SetParentProcessId(class TProcessId) + ?ConnectExistingAppL@RApaAppServiceBase@@QAEXABV1@ABVTSecurityPolicy@@@Z @ 235 NONAME ; void RApaAppServiceBase::ConnectExistingAppL(class RApaAppServiceBase const &, class TSecurityPolicy const &) + ?ConnectExistingByNameL@RApaAppServiceBase@@QAEXABVTDesC16@@ABVTSecurityPolicy@@@Z @ 236 NONAME ; void RApaAppServiceBase::ConnectExistingByNameL(class TDesC16 const &, class TSecurityPolicy const &) + ?TransferExistingSessionL@RApaAppServiceBase@@QAEXAAV1@@Z @ 237 NONAME ; void RApaAppServiceBase::TransferExistingSessionL(class RApaAppServiceBase &) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APP_CTRL2U.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APP_CTRL2U.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,4 @@ +EXPORTS +; NEW: + ?WinsMain@@YAHPAVTDesC16@@@Z @ 1 NONAME ; int __cdecl WinsMain(class TDesC16 *) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APP_CTRLU.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APP_CTRLU.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,4 @@ +EXPORTS +; NEW: + ?WinsMain@@YAHPAVTDesC16@@@Z @ 1 NONAME ; int __cdecl WinsMain(class TDesC16 *) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/APSERVU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/APSERVU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,27 @@ +EXPORTS + ??1CApaAppListServer@@UAE@XZ @ 1 NONAME ; public: virtual __thiscall CApaAppListServer::~CApaAppListServer(void) + ?NewL@CApaAppListServer@@SAPAV1@PAVCApaAppList@@PAVCApaFileRecognizer@@@Z @ 2 NONAME ABSENT ; public: static class CApaAppListServer * __cdecl CApaAppListServer::NewL(class CApaAppList *,class CApaFileRecognizer *) + ??1CApaFsMonitor@@UAE@XZ @ 3 NONAME ; public: virtual __thiscall CApaFsMonitor::~CApaFsMonitor(void) + ?NameApaServServerThread@@YA?AVTPtrC16@@XZ @ 4 NONAME ; class TPtrC16 __cdecl NameApaServServerThread(void) + ?NameApaServStartSemaphore@@YA?AVTPtrC16@@XZ @ 5 NONAME ; class TPtrC16 __cdecl NameApaServStartSemaphore(void) + ?NewL@CApaAppListServer@@SAPAV1@PAVMApaAppStarter@@@Z @ 6 NONAME ; public: static class CApaAppListServer * __cdecl CApaAppListServer::NewL(class MApaAppStarter *) + ?NewL@CApaFsMonitor@@SAPAV1@AAVRFs@@ABVTDesC16@@VTCallBack@@@Z @ 7 NONAME ; public: static class CApaFsMonitor * __cdecl CApaFsMonitor::NewL(class RFs &,class TDesC16 const &,class TCallBack) + ?NotifyType@CApaFsMonitor@@QBE?AW4TNotifyType@@XZ @ 8 NONAME ; public: enum TNotifyType __thiscall CApaFsMonitor::NotifyType(void)const + ?SetBlocked@CApaFsMonitor@@QAEXH@Z @ 9 NONAME ; public: void __thiscall CApaFsMonitor::SetBlocked(int) + ?Start@CApaFsMonitor@@QAEXW4TNotifyType@@@Z @ 10 NONAME ; public: void __thiscall CApaFsMonitor::Start(enum TNotifyType) + ?Self@CApaAppListServer@@SAPAV1@XZ @ 11 NONAME ; class CApaAppListServer * CApaAppListServer::Self(void) + ?AddLocationL@CApaFsMonitor@@QAEXABVTDesC16@@@Z @ 12 NONAME ; void CApaFsMonitor::AddLocationL(class TDesC16 const &) + ?Cancel@CApaFsMonitor@@QAEXXZ @ 13 NONAME ; void CApaFsMonitor::Cancel(void) + ?ApaServThreadStart@@YAHPAX@Z @ 14 NONAME ; int ApaServThreadStart(void *) + ??1CUpdatedAppsList@@UAE@XZ @ 15 NONAME ABSENT ; CUpdatedAppsList::~CUpdatedAppsList(void) + ?CloseAndDeletePermanentStore@CUpdatedAppsList@@QAEXXZ @ 16 NONAME ABSENT ; void CUpdatedAppsList::CloseAndDeletePermanentStore(void) + ?IsInList@CUpdatedAppsList@@QBEHABVTDesC16@@@Z @ 17 NONAME ABSENT ; int CUpdatedAppsList::IsInList(class TDesC16 const &) const + ?RescanCallBack@CApaAppListServer@@QAE?AVTCallBack@@XZ @ 18 NONAME ; class TCallBack CApaAppListServer::RescanCallBack(void) + ?KApaLoadDataRecognizersOnDemand@@3HB @ 19 NONAME DATA 4 ; int const KApaLoadDataRecognizersOnDemand + ?KApaUnloadRecognizersTimeout@@3HB @ 20 NONAME DATA 4 ; int const KApaUnloadRecognizersTimeout + ?HandleEndUninstallEventL@CApaAppListServer@@QAEXXZ @ 21 NONAME ; void CApaAppListServer::HandleEndUninstallEventL(void) + ?HandleStartUninstallEvent@CApaAppListServer@@QAEXXZ @ 22 NONAME ; void CApaAppListServer::HandleStartUninstallEvent(void) + ?KApaDrivesToMonitor@@3HB @ 23 NONAME ; int const KApaDrivesToMonitor + ?KApaLoadMbmIconsOnDemand@@3HB @ 24 NONAME ; int const KApaLoadMbmIconsOnDemand + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/EXEDLLAPPU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/EXEDLLAPPU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1 @@ +EXPORTS ?WinsMain@@YAHPAVTDesC16@@@Z @ 1 NONAME ; int __cdecl WinsMain(class TDesC16 *) diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/ServiceRegistryU.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/ServiceRegistryU.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,7 @@ +EXPORTS + ??1CServiceRegistry@@UAE@XZ @ 1 NONAME ; CServiceRegistry::~CServiceRegistry(void) + ?GetDefault@CServiceRegistry@@QAEHVTUid@@ABVTDataType@@AAV2@@Z @ 2 NONAME ; int CServiceRegistry::GetDefault(class TUid, class TDataType const &, class TUid &) + ?NewL@CServiceRegistry@@SAPAV1@XZ @ 3 NONAME ; class CServiceRegistry * CServiceRegistry::NewL(void) + ?RemoveEntry@CServiceRegistry@@QAEHVTUid@@ABVTDataType@@@Z @ 4 NONAME ; int CServiceRegistry::RemoveEntry(class TUid, class TDataType const &) + ?SetDefault@CServiceRegistry@@QAEHVTUid@@ABVTDataType@@0@Z @ 5 NONAME ; int CServiceRegistry::SetDefault(class TUid, class TDataType const &, class TUid) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/TDONOTHINGFILERECOGNIZERU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/TDONOTHINGFILERECOGNIZERU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,3 @@ +EXPORTS + ?CreateRecognizer@@YAPAVCApaFileRecognizerType@@XZ @ 1 NONAME ; class CApaFileRecognizerType * CreateRecognizer(void) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/TICONFORLEAKSV2u.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/TICONFORLEAKSV2u.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,294 @@ +EXPORTS + ??0CDataRecognitionResultArray@@QAE@XZ @ 1 NONAME ; CDataRecognitionResultArray::CDataRecognitionResultArray(void) + ??0MApaAppListServObserver@@IAE@XZ @ 2 NONAME ; MApaAppListServObserver::MApaAppListServObserver(void) + ??0RApaLsSession@@QAE@XZ @ 3 NONAME ; RApaLsSession::RApaLsSession(void) + ??0TApaPictureFactory@@IAE@XZ @ 4 NONAME ; TApaPictureFactory::TApaPictureFactory(void) + ??0TApaPictureFactory@@QAE@PAVCApaProcess@@@Z @ 5 NONAME ; TApaPictureFactory::TApaPictureFactory(class CApaProcess *) + ??0TApaTask@@QAE@AAVRWsSession@@@Z @ 6 NONAME ; TApaTask::TApaTask(class RWsSession &) + ??0TApaTaskList@@QAE@AAVRWsSession@@@Z @ 7 NONAME ; TApaTaskList::TApaTaskList(class RWsSession &) + ??1CApaAppData@@UAE@XZ @ 8 NONAME ; CApaAppData::~CApaAppData(void) + ??1CApaAppInfoFileWriter@@UAE@XZ @ 9 NONAME ; CApaAppInfoFileWriter::~CApaAppInfoFileWriter(void) + ??1CApaAppList@@UAE@XZ @ 10 NONAME ; CApaAppList::~CApaAppList(void) + ??1CApaAppListNotifier@@UAE@XZ @ 11 NONAME ; CApaAppListNotifier::~CApaAppListNotifier(void) + ??1CApaDoor@@UAE@XZ @ 12 NONAME ; CApaDoor::~CApaDoor(void) + ??1CApaLocalisableResourceFileWriter@@UAE@XZ @ 13 NONAME ; CApaLocalisableResourceFileWriter::~CApaLocalisableResourceFileWriter(void) + ??1CApaMaskedBitmap@@UAE@XZ @ 14 NONAME ; CApaMaskedBitmap::~CApaMaskedBitmap(void) + ??1CApaRegistrationResourceFileWriter@@UAE@XZ @ 15 NONAME ; CApaRegistrationResourceFileWriter::~CApaRegistrationResourceFileWriter(void) + ??1CApaSystemControlList@@UAE@XZ @ 16 NONAME ; CApaSystemControlList::~CApaSystemControlList(void) + ??1CApaWindowGroupName@@UAE@XZ @ 17 NONAME ; CApaWindowGroupName::~CApaWindowGroupName(void) + ??1CDataRecognitionResultArray@@UAE@XZ @ 18 NONAME ; CDataRecognitionResultArray::~CDataRecognitionResultArray(void) + ?AddCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@@Z @ 19 NONAME ; void CApaAppInfoFileWriter::AddCaptionL(enum TLanguage, class TDesC16 const &) + ?AddDataTypeL@CApaAppInfoFileWriter@@QAEXABVTDataTypeWithPriority@@@Z @ 20 NONAME ; void CApaAppInfoFileWriter::AddDataTypeL(class TDataTypeWithPriority const &) + ?AddDataTypeL@CApaRegistrationResourceFileWriter@@QAEXHABVTDesC8@@@Z @ 21 NONAME ; void CApaRegistrationResourceFileWriter::AddDataTypeL(int, class TDesC8 const &) + ?AddFileOwnershipInfoL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 22 NONAME ; void CApaRegistrationResourceFileWriter::AddFileOwnershipInfoL(class TDesC16 const &) + ?AddForcedRegistrationL@CApaAppList@@QAEXPAVHBufC16@@@Z @ 23 NONAME ; void CApaAppList::AddForcedRegistrationL(class HBufC16 *) + ?AddIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@@Z @ 24 NONAME ; void CApaAppInfoFileWriter::AddIconL(class CApaMaskedBitmap &) + ?AppCount@RApaLsSession@@QBEHAAH@Z @ 25 NONAME ; int RApaLsSession::AppCount(int &) const + ?AppDataByFileName@CApaAppList@@QBEPAVCApaAppData@@ABVTDesC16@@@Z @ 26 NONAME ; class CApaAppData * CApaAppList::AppDataByFileName(class TDesC16 const &) const + ?AppDataByUid@CApaAppList@@QBEPAVCApaAppData@@VTUid@@@Z @ 27 NONAME ; class CApaAppData * CApaAppList::AppDataByUid(class TUid) const + ?AppEntry@CApaAppData@@QBE?AVTApaAppEntry@@XZ @ 28 NONAME ; class TApaAppEntry CApaAppData::AppEntry(void) const + ?AppForDataType@RApaLsSession@@QBEHABVTDataType@@AAVTUid@@@Z @ 29 NONAME ; int RApaLsSession::AppForDataType(class TDataType const &, class TUid &) const + ?AppForDataTypeAndService@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 30 NONAME ; int RApaLsSession::AppForDataTypeAndService(class TDataType const &, class TUid, class TUid &) const + ?AppForDocument@RApaLsSession@@QBEHABVRFile@@AAVTUid@@AAVTDataType@@@Z @ 31 NONAME ; int RApaLsSession::AppForDocument(class RFile const &, class TUid &, class TDataType &) const + ?AppForDocument@RApaLsSession@@QBEHABVTDesC16@@AAVTUid@@AAVTDataType@@@Z @ 32 NONAME ; int RApaLsSession::AppForDocument(class TDesC16 const &, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVRFile@@VTUid@@AAV3@AAVTDataType@@@Z @ 33 NONAME ; int RApaLsSession::AppForDocumentAndService(class RFile const &, class TUid, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVTDesC16@@VTUid@@AAV3@AAVTDataType@@@Z @ 34 NONAME ; int RApaLsSession::AppForDocumentAndService(class TDesC16 const &, class TUid, class TUid &, class TDataType &) const + ?AppScanInProgress@CApaAppList@@QBEHXZ @ 35 NONAME ; int CApaAppList::AppScanInProgress(void) const + ?AppUid@CApaWindowGroupName@@QBE?AVTUid@@XZ @ 36 NONAME ; class TUid CApaWindowGroupName::AppUid(void) const + ?AppUidL@CApaDoor@@QBE?AVTUid@@XZ @ 37 NONAME ; class TUid CApaDoor::AppUidL(void) const + ?ApplicationLanguage@CApaAppData@@QBE?AW4TLanguage@@XZ @ 38 NONAME ; enum TLanguage CApaAppData::ApplicationLanguage(void) const + ?ApplicationLanguage@RApaLsSession@@QBEHVTUid@@AAW4TLanguage@@@Z @ 39 NONAME ; int RApaLsSession::ApplicationLanguage(class TUid, enum TLanguage &) const + ?BringToForeground@TApaTask@@QAEXXZ @ 40 NONAME ; void TApaTask::BringToForeground(void) + ?CanUseScreenMode@CApaAppData@@QAEHH@Z @ 41 NONAME ; int CApaAppData::CanUseScreenMode(int) + ?CancelListPopulationCompleteObserver@RApaLsSession@@QBEHXZ @ 42 NONAME ; int RApaLsSession::CancelListPopulationCompleteObserver(void) const + ?CancelNotify@RApaLsSession@@QAEXXZ @ 43 NONAME ; void RApaLsSession::CancelNotify(void) + ?CancelNotifyOnDataMappingChange@RApaLsSession@@QAEXXZ @ 44 NONAME ; void RApaLsSession::CancelNotifyOnDataMappingChange(void) + ?CancelRecognizeFiles@RApaLsSession@@QAEXXZ @ 45 NONAME ; void RApaLsSession::CancelRecognizeFiles(void) + ?Capability@CApaAppData@@QBEXAAVTDes8@@@Z @ 46 NONAME ; void CApaAppData::Capability(class TDes8 &) const + ?Caption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 47 NONAME ; class TPtrC16 CApaSystemControl::Caption(void) const + ?Caption@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 48 NONAME ; class TPtrC16 CApaWindowGroupName::Caption(void) const + ?CheckAppSecurity@CApaSecurityUtils@@SAHABVTPtrC16@@AAH1@Z @ 49 NONAME ; int CApaSecurityUtils::CheckAppSecurity(class TPtrC16 const &, int &, int &) + ?CheckInterimFormatFileNotCorruptL@ForJavaMIDletInstaller@@SAXAAVRFile@@@Z @ 50 NONAME ; void ForJavaMIDletInstaller::CheckInterimFormatFileNotCorruptL(class RFile &) + ?ClearFsSession@RApaLsSession@@SAXXZ @ 51 NONAME ; void RApaLsSession::ClearFsSession(void) + ?Close@RApaLsSession@@QAEXXZ @ 52 NONAME ; void RApaLsSession::Close(void) + ?CommitNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 53 NONAME ; void RApaLsSession::CommitNonNativeApplicationsUpdatesL(void) + ?CompareStrings@CApaAppList@@SAHABVHBufC16@@0@Z @ 54 NONAME ; int CApaAppList::CompareStrings(class HBufC16 const &, class HBufC16 const &) + ?Connect@RApaLsSession@@QAEHXZ @ 55 NONAME ; int RApaLsSession::Connect(void) + ?ConstructFromWgIdL@CApaWindowGroupName@@QAEXH@Z @ 56 NONAME ; void CApaWindowGroupName::ConstructFromWgIdL(int) + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@H@Z @ 57 NONAME ; class CApaSystemControl * CApaSystemControlList::Control(int) const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@VTUid@@@Z @ 58 NONAME ; class CApaSystemControl * CApaSystemControlList::Control(class TUid) const + ?Count@CApaAppList@@QBEHXZ @ 59 NONAME ; int CApaAppList::Count(void) const + ?Count@CApaSystemControlList@@QBEHXZ @ 60 NONAME ; int CApaSystemControlList::Count(void) const + ?Count@CDataRecognitionResultArray@@QBEIXZ @ 61 NONAME ; unsigned int CDataRecognitionResultArray::Count(void) const + ?CreateDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 62 NONAME ; int RApaLsSession::CreateDocument(class TDesC16 const &, class TUid, class TThreadId &, enum RApaLsSession::TLaunchType) + ?CreateL@CApaSystemControl@@QAEXXZ @ 63 NONAME ; void CApaSystemControl::CreateL(void) + ?CycleTasks@TApaTaskList@@QAEHVTUid@@W4TCycleDirection@1@@Z @ 64 NONAME ; int TApaTaskList::CycleTasks(class TUid, enum TApaTaskList::TCycleDirection) + ?DataType@CApaAppData@@QBEJABVTDataType@@@Z @ 65 NONAME ; long CApaAppData::DataType(class TDataType const &) const + ?DataTypes@TApaAppServiceInfo@@QBEABV?$CArrayFixFlat@VTDataTypeWithPriority@@@@XZ @ 66 NONAME ; class CArrayFixFlat const & TApaAppServiceInfo::DataTypes(void) const + ?DefaultScreenNumber@CApaAppData@@QBEIXZ @ 67 NONAME ; unsigned int CApaAppData::DefaultScreenNumber(void) const + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@@Z @ 68 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@VTUid@@@Z @ 69 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &, class TUid) + ?DeregisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@@Z @ 70 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationL(class TUid) + ?DeregisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@@Z @ 71 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationTypeL(class TUid) + ?DocName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 72 NONAME ; class TPtrC16 CApaWindowGroupName::DocName(void) const + ?DocNameIsAFile@CApaWindowGroupName@@QBEHXZ @ 73 NONAME ; int CApaWindowGroupName::DocNameIsAFile(void) const + ?DocumentL@CApaDoor@@QAEPAVCApaDocument@@H@Z @ 74 NONAME ; class CApaDocument * CApaDoor::DocumentL(int) + ?EmbeddableAppCount@RApaLsSession@@QBEHAAH@Z @ 75 NONAME ; int RApaLsSession::EmbeddableAppCount(int &) const + ?EndTask@TApaTask@@QAEXXZ @ 76 NONAME ; void TApaTask::EndTask(void) + ?Exists@TApaTask@@QBEHXZ @ 77 NONAME ; int TApaTask::Exists(void) const + ?ExternalizeL@CApaMaskedBitmap@@QBEXAAVRWriteStream@@@Z @ 78 NONAME ; void CApaMaskedBitmap::ExternalizeL(class RWriteStream &) const + ?FileName@CApaSystemControl@@QBE?AV?$TBuf@$0BAA@@@XZ @ 79 NONAME ; class TBuf<256> CApaSystemControl::FileName(void) const + ?FindAndAddSpecificAppL@CApaAppList@@QAEPAVCApaAppData@@PAVCApaAppRegFinder@@VTUid@@@Z @ 80 NONAME ; class CApaAppData * CApaAppList::FindAndAddSpecificAppL(class CApaAppRegFinder *, class TUid) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 81 NONAME ; class TApaTask TApaTaskList::FindApp(class TDesC16 const &) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@VTUid@@@Z @ 82 NONAME ; class TApaTask TApaTaskList::FindApp(class TUid) + ?FindByAppUid@CApaWindowGroupName@@SAXVTUid@@AAVRWsSession@@AAH@Z @ 83 NONAME ; void CApaWindowGroupName::FindByAppUid(class TUid, class RWsSession &, int &) + ?FindByCaption@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 84 NONAME ; void CApaWindowGroupName::FindByCaption(class TDesC16 const &, class RWsSession &, int &) + ?FindByDocName@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 85 NONAME ; void CApaWindowGroupName::FindByDocName(class TDesC16 const &, class RWsSession &, int &) + ?FindByPos@TApaTaskList@@QAE?AVTApaTask@@H@Z @ 86 NONAME ; class TApaTask TApaTaskList::FindByPos(int) + ?FindDoc@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 87 NONAME ; class TApaTask TApaTaskList::FindDoc(class TDesC16 const &) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@H@Z @ 88 NONAME ; class CApaAppData * CApaAppList::FirstApp(int) const + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@XZ @ 89 NONAME ; class CApaAppData * CApaAppList::FirstApp(void) const + ?ForceRegistration@RApaLsSession@@QAEHABV?$RPointerArray@VTDesC16@@@@@Z @ 90 NONAME ; int RApaLsSession::ForceRegistration(class RPointerArray const &) + ?FsSession@RApaLsSession@@SAPAVRFs@@XZ @ 91 NONAME ; class RFs * RApaLsSession::FsSession(void) + ?GetAcceptedConfidence@RApaLsSession@@QBEHAAH@Z @ 92 NONAME ; int RApaLsSession::GetAcceptedConfidence(int &) const + ?GetAllApps@RApaLsSession@@QBEHH@Z @ 93 NONAME ; int RApaLsSession::GetAllApps(int) const + ?GetAllApps@RApaLsSession@@QBEHXZ @ 94 NONAME ; int RApaLsSession::GetAllApps(void) const + ?GetAppByDataType@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 95 NONAME ; int RApaLsSession::GetAppByDataType(class TDataType const &, class TUid, class TUid &) const + ?GetAppCapability@RApaLsSession@@QBEHAAVTDes8@@VTUid@@@Z @ 96 NONAME ; int RApaLsSession::GetAppCapability(class TDes8 &, class TUid) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAPAVHBufC16@@@Z @ 97 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class HBufC16 * &) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAVRFile@@@Z @ 98 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class RFile &) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@HAAVCApaMaskedBitmap@@@Z @ 99 NONAME ; int RApaLsSession::GetAppIcon(class TUid, int, class CApaMaskedBitmap &) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@VTSize@@AAVCApaMaskedBitmap@@@Z @ 100 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class TSize, class CApaMaskedBitmap &) const + ?GetAppIconSizes@RApaLsSession@@QBEHVTUid@@AAV?$CArrayFixFlat@VTSize@@@@@Z @ 101 NONAME ; int RApaLsSession::GetAppIconSizes(class TUid, class CArrayFixFlat &) const + ?GetAppInfo@RApaLsSession@@QBEHAAVTApaAppInfo@@VTUid@@@Z @ 102 NONAME ; int RApaLsSession::GetAppInfo(class TApaAppInfo &, class TUid) const + ?GetAppOwnedFiles@RApaLsSession@@QBEHAAVCDesC16Array@@VTUid@@@Z @ 103 NONAME ; int RApaLsSession::GetAppOwnedFiles(class CDesC16Array &, class TUid) const + ?GetAppServiceOpaqueDataLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@0@Z @ 104 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServiceOpaqueDataLC(class TUid, class TUid) const + ?GetAppServicesL@RApaLsSession@@QBEXVTUid@@AAV?$CArrayFixFlat@VTUid@@@@@Z @ 105 NONAME ; void RApaLsSession::GetAppServicesL(class TUid, class CArrayFixFlat &) const + ?GetAppServicesLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 106 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServicesLC(class TUid) const + ?GetAppType@RApaLsSession@@QBEHAAVTUid@@V2@@Z @ 107 NONAME ; int RApaLsSession::GetAppType(class TUid &, class TUid) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0AAPAVHBufC16@@@Z @ 108 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class HBufC16 * &) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0ABVTSize@@AAVCApaMaskedBitmap@@@Z @ 109 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class TSize const &, class CApaMaskedBitmap &) const + ?GetAppViews@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTApaAppViewInfo@@@@VTUid@@@Z @ 110 NONAME ; int RApaLsSession::GetAppViews(class CArrayFixFlat &, class TUid) const + ?GetDataRecognitionResultL@CDataRecognitionResultArray@@QBEXAAVTDataRecognitionResult@@I@Z @ 111 NONAME ; void CDataRecognitionResultArray::GetDataRecognitionResultL(class TDataRecognitionResult &, unsigned int) const + ?GetDefaultScreenNumber@RApaLsSession@@QBEHAAHVTUid@@@Z @ 112 NONAME ; int RApaLsSession::GetDefaultScreenNumber(int &, class TUid) const + ?GetEmbeddableApps@RApaLsSession@@QBEHH@Z @ 113 NONAME ; int RApaLsSession::GetEmbeddableApps(int) const + ?GetEmbeddableApps@RApaLsSession@@QBEHXZ @ 114 NONAME ; int RApaLsSession::GetEmbeddableApps(void) const + ?GetFileNameL@CDataRecognitionResultArray@@QBEXAAV?$TBuf@$0BAA@@@I@Z @ 115 NONAME ; void CDataRecognitionResultArray::GetFileNameL(class TBuf<256> &, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@@Z @ 116 NONAME ; int RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &) const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@H@Z @ 117 NONAME ; int RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &, int) const + ?GetFilteredApps@RApaLsSession@@QBEHII@Z @ 118 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHIIH@Z @ 119 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int, int) const + ?GetIconInfo@CApaAppData@@QBEXAAH0@Z @ 120 NONAME ; void CApaAppData::GetIconInfo(int &, int &) const + ?GetJavaMIDletInfoL@ForJavaMIDletInstaller@@SAXAAVRFs@@ABVTDesC16@@AAK2@Z @ 121 NONAME ; void ForJavaMIDletInstaller::GetJavaMIDletInfoL(class RFs &, class TDesC16 const &, unsigned long &, unsigned long &) + ?GetMaxDataBufSize@RApaLsSession@@QBEHAAH@Z @ 122 NONAME ; int RApaLsSession::GetMaxDataBufSize(int &) const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@@Z @ 123 NONAME ; int RApaLsSession::GetNextApp(class TApaAppInfo &) const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@H@Z @ 124 NONAME ; int RApaLsSession::GetNextApp(class TApaAppInfo &, int) const + ?GetPreferredBufSize@RApaLsSession@@QBEHAAH@Z @ 125 NONAME ; int RApaLsSession::GetPreferredBufSize(int &) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@@Z @ 126 NONAME ; int RApaLsSession::GetServerApps(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@H@Z @ 127 NONAME ; int RApaLsSession::GetServerApps(class TUid, int) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 128 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@ABVTDataType@@@Z @ 129 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid, class TDataType const &) const + ?GetSupportedDataTypesL@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTDataType@@@@@Z @ 130 NONAME ; int RApaLsSession::GetSupportedDataTypesL(class CArrayFixFlat &) const + ?HandleAsRegistrationFile@ApaUtils@@SAHABVTUidType@@@Z @ 131 NONAME ; int ApaUtils::HandleAsRegistrationFile(class TUidType const &) + ?Hidden@CApaWindowGroupName@@QBEHXZ @ 132 NONAME ; int CApaWindowGroupName::Hidden(void) const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@H@Z @ 133 NONAME ; class CApaMaskedBitmap * CApaAppData::Icon(int) const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@VTSize@@@Z @ 134 NONAME ; class CApaMaskedBitmap * CApaAppData::Icon(class TSize) const + ?Icon@CApaAppViewData@@QBEPAVCApaMaskedBitmap@@ABVTSize@@@Z @ 135 NONAME ; class CApaMaskedBitmap * CApaAppViewData::Icon(class TSize const &) const + ?Icon@CApaSystemControl@@QBEPAVCApaMaskedBitmap@@XZ @ 136 NONAME ; class CApaMaskedBitmap * CApaSystemControl::Icon(void) const + ?IconFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 137 NONAME ; class TPtrC16 CApaAppData::IconFileName(void) const + ?IconFileName@CApaAppViewData@@QBE?AVTPtrC16@@XZ @ 138 NONAME ; class TPtrC16 CApaAppViewData::IconFileName(void) const + ?IconSizesL@CApaAppData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 139 NONAME ; class CArrayFixFlat * CApaAppData::IconSizesL(void) const + ?IconSizesL@CApaAppViewData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 140 NONAME ; class CArrayFixFlat * CApaAppViewData::IconSizesL(void) const + ?ImplementsService@CApaAppData@@QBEHVTUid@@@Z @ 141 NONAME ; int CApaAppData::ImplementsService(class TUid) const + ?Index@CApaSystemControlList@@QBEHVTUid@@@Z @ 142 NONAME ; int CApaSystemControlList::Index(class TUid) const + ?InitListL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 143 NONAME ; void CApaAppList::InitListL(class MApaAppListObserver *) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@1@Z @ 144 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid, class TUid) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@@Z @ 145 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid) + ?InsertDataMappingIfHigher@RApaLsSession@@QAEHABVTDataType@@JVTUid@@AAH@Z @ 146 NONAME ; int RApaLsSession::InsertDataMappingIfHigher(class TDataType const &, long, class TUid, int &) + ?InternalizeL@CApaMaskedBitmap@@QAEXAAVRReadStream@@@Z @ 147 NONAME ; void CApaMaskedBitmap::InternalizeL(class RReadStream &) + ?IsAppReady@CApaWindowGroupName@@QBEHXZ @ 148 NONAME ; int CApaWindowGroupName::IsAppReady(void) const + ?IsBusy@CApaWindowGroupName@@QBEHXZ @ 149 NONAME ; int CApaWindowGroupName::IsBusy(void) const + ?IsFirstScanComplete@CApaAppList@@QBEHXZ @ 150 NONAME ; int CApaAppList::IsFirstScanComplete(void) const + ?IsIdleUpdateComplete@CApaAppList@@QBEHXZ @ 151 NONAME ; int CApaAppList::IsIdleUpdateComplete(void) const + ?IsLanguageChangePending@CApaAppList@@QBEHXZ @ 152 NONAME ; int CApaAppList::IsLanguageChangePending(void) const + ?IsPending@CApaAppData@@QBEHXZ @ 153 NONAME ; int CApaAppData::IsPending(void) const + ?IsProgram@RApaLsSession@@QBEHABVTDesC16@@AAH@Z @ 154 NONAME ; int RApaLsSession::IsProgram(class TDesC16 const &, int &) const + ?IsSystem@CApaWindowGroupName@@QBEHXZ @ 155 NONAME ; int CApaWindowGroupName::IsSystem(void) const + ?KillTask@TApaTask@@QAEXXZ @ 156 NONAME ; void TApaTask::KillTask(void) + ?LocalisableResourceFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 157 NONAME ; class TPtrC16 CApaAppData::LocalisableResourceFileName(void) const + ?MApaAppListServObserver_Reserved1@MApaAppListServObserver@@EAEXXZ @ 158 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved1(void) + ?MApaAppListServObserver_Reserved2@MApaAppListServObserver@@EAEXXZ @ 159 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved2(void) + ?Mask@CApaMaskedBitmap@@QBEPAVCFbsBitmap@@XZ @ 160 NONAME ; class CFbsBitmap * CApaMaskedBitmap::Mask(void) const + ?MatchesSecurityPolicy@RApaLsSession@@QBEHAAHVTUid@@ABVTSecurityPolicy@@@Z @ 161 NONAME ; int RApaLsSession::MatchesSecurityPolicy(int &, class TUid, class TSecurityPolicy const &) const + ?MinApplicationStackSize@@YAIXZ @ 162 NONAME ; unsigned int MinApplicationStackSize(void) + ?New@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@PAVHBufC16@@@Z @ 163 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::New(class RWsSession const &, class HBufC16 *) + ?NewInterimFormatFileWriterLC@ForJavaMIDletInstaller@@SAPAVCApaAppInfoFileWriter@@AAVRFs@@ABVTDesC16@@VTUid@@KH@Z @ 164 NONAME ; class CApaAppInfoFileWriter * ForJavaMIDletInstaller::NewInterimFormatFileWriterLC(class RFs &, class TDesC16 const &, class TUid, unsigned long, int) + ?NewL@CApaAppData@@SAPAV1@ABVTApaAppEntry@@AAVRFs@@ABVTDesC16@@@Z @ 165 NONAME ; class CApaAppData * CApaAppData::NewL(class TApaAppEntry const &, class RFs &, class TDesC16 const &) + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppRegFinder@@HH@Z @ 166 NONAME ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppRegFinder *, int, int) + ?NewL@CApaAppListNotifier@@SAPAV1@PAVMApaAppListServObserver@@W4TPriority@CActive@@@Z @ 167 NONAME ; class CApaAppListNotifier * CApaAppListNotifier::NewL(class MApaAppListServObserver *, enum CActive::TPriority) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 168 NONAME ; class CApaDoor * CApaDoor::NewL(class RFs &, class CApaDocument &, class TSize const &) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@ABVCStreamStore@@VTStreamId@@AAVCApaProcess@@@Z @ 169 NONAME ; class CApaDoor * CApaDoor::NewL(class RFs &, class CStreamStore const &, class TStreamId, class CApaProcess &) + ?NewL@CApaLocalisableResourceFileWriter@@SAPAV1@ABVTDesC16@@0H0@Z @ 170 NONAME ; class CApaLocalisableResourceFileWriter * CApaLocalisableResourceFileWriter::NewL(class TDesC16 const &, class TDesC16 const &, int, class TDesC16 const &) + ?NewL@CApaMaskedBitmap@@SAPAV1@PBV1@@Z @ 171 NONAME ; class CApaMaskedBitmap * CApaMaskedBitmap::NewL(class CApaMaskedBitmap const *) + ?NewL@CApaRegistrationResourceFileWriter@@SAPAV1@VTUid@@ABVTDesC16@@I@Z @ 172 NONAME ; class CApaRegistrationResourceFileWriter * CApaRegistrationResourceFileWriter::NewL(class TUid, class TDesC16 const &, unsigned int) + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@@Z @ 173 NONAME ; class CApaSystemControlList * CApaSystemControlList::NewL(class RFs &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 174 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewL(class RWsSession const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 175 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewL(class RWsSession const &, class TDesC16 const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 176 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewL(class RWsSession const &, int) + ?NewLC@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 177 NONAME ; class CApaDoor * CApaDoor::NewLC(class RFs &, class CApaDocument &, class TSize const &) + ?NewLC@CApaMaskedBitmap@@SAPAV1@XZ @ 178 NONAME ; class CApaMaskedBitmap * CApaMaskedBitmap::NewLC(void) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 179 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewLC(class RWsSession const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 180 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewLC(class RWsSession const &, class TDesC16 const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 181 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewLC(class RWsSession const &, int) + ?NewPictureL@TApaPictureFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 182 NONAME ; void TApaPictureFactory::NewPictureL(class TPictureHeader &, class CStreamStore const &) const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@@Z @ 183 NONAME ; class CApaAppData * CApaAppList::NextApp(class CApaAppData const *) const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@H@Z @ 184 NONAME ; class CApaAppData * CApaAppList::NextApp(class CApaAppData const *, int) const + ?NonMbmIconFile@CApaAppData@@QBEHXZ @ 185 NONAME ; int CApaAppData::NonMbmIconFile(void) const + ?NonMbmIconFile@CApaAppViewData@@QBEHXZ @ 186 NONAME ; int CApaAppViewData::NonMbmIconFile(void) const + ?NonNativeApplicationType@CApaAppData@@QBE?AVTUid@@XZ @ 187 NONAME ; class TUid CApaAppData::NonNativeApplicationType(void) const + ?NotifyOnDataMappingChange@RApaLsSession@@QAEXAAVTRequestStatus@@@Z @ 188 NONAME ; void RApaLsSession::NotifyOnDataMappingChange(class TRequestStatus &) + ?NumberOfOwnDefinedIcons@RApaLsSession@@QBEHVTUid@@AAH@Z @ 189 NONAME ; int RApaLsSession::NumberOfOwnDefinedIcons(class TUid, int &) const + ?OpaqueData@CApaAppData@@QBE?AVTPtrC8@@XZ @ 190 NONAME ; class TPtrC8 CApaAppData::OpaqueData(void) const + ?OpaqueData@TApaAppServiceInfo@@QBEABVTDesC8@@XZ @ 191 NONAME ; class TDesC8 const & TApaAppServiceInfo::OpaqueData(void) const + ?OwnedFiles@CApaAppData@@QBEPAVCDesC16Array@@XZ @ 192 NONAME ; class CDesC16Array * CApaAppData::OwnedFiles(void) const + ?Path@CDataRecognitionResultArray@@QBEABV?$TBuf@$0BAA@@@XZ @ 193 NONAME ; class TBuf<256> const & CDataRecognitionResultArray::Path(void) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@@Z @ 194 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@PBV2@AAH@Z @ 195 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &, class TUid const *, int &) const + ?PrepareNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 196 NONAME ; void RApaLsSession::PrepareNonNativeApplicationsUpdatesL(void) + ?PurgeL@CApaAppList@@QAEXXZ @ 197 NONAME ; void CApaAppList::PurgeL(void) + ?RApaLsSession_Reserved1@RApaLsSession@@EAEXXZ @ 198 NONAME ; void RApaLsSession::RApaLsSession_Reserved1(void) + ?RApaLsSession_Reserved2@RApaLsSession@@EAEXXZ @ 199 NONAME ; void RApaLsSession::RApaLsSession_Reserved2(void) + ?RecognizeData@RApaLsSession@@QBEHABVRFile@@AAVTDataRecognitionResult@@@Z @ 200 NONAME ; int RApaLsSession::RecognizeData(class RFile const &, class TDataRecognitionResult &) const + ?RecognizeData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVTDataRecognitionResult@@@Z @ 201 NONAME ; int RApaLsSession::RecognizeData(class TDesC16 const &, class TDesC8 const &, class TDataRecognitionResult &) const + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 202 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 203 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@AAVCDataRecognitionResultArray@@@Z @ 204 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &) const + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@@Z @ 205 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVRFile@@ABVTDataType@@AAH@Z @ 206 NONAME ; int RApaLsSession::RecognizeSpecificData(class RFile const &, class TDataType const &, int &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@ABVTDataType@@AAH@Z @ 207 NONAME ; int RApaLsSession::RecognizeSpecificData(class TDesC16 const &, class TDesC8 const &, class TDataType const &, int &) const + ?RegisterListPopulationCompleteObserver@RApaLsSession@@QBEXAAVTRequestStatus@@@Z @ 208 NONAME ; void RApaLsSession::RegisterListPopulationCompleteObserver(class TRequestStatus &) const + ?RegisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@ABVTDriveUnit@@AAVCApaRegistrationResourceFileWriter@@PAVCApaLocalisableResourceFileWriter@@PBVRFile@@@Z @ 209 NONAME ; void RApaLsSession::RegisterNonNativeApplicationL(class TUid, class TDriveUnit const &, class CApaRegistrationResourceFileWriter &, class CApaLocalisableResourceFileWriter *, class RFile const *) + ?RegisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@ABVTDesC16@@@Z @ 210 NONAME ; void RApaLsSession::RegisterNonNativeApplicationTypeL(class TUid, class TDesC16 const &) + ?RegistrationFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 211 NONAME ; class TPtrC16 CApaAppData::RegistrationFileName(void) const + ?RegistrationFileUsed@CApaAppData@@QBEHXZ @ 212 NONAME ; int CApaAppData::RegistrationFileUsed(void) const + ?ResetForcedRegistrations@CApaAppList@@QAEXXZ @ 213 NONAME ; void CApaAppList::ResetForcedRegistrations(void) + ?RespondsToShutdownEvent@CApaWindowGroupName@@QBEHXZ @ 214 NONAME ; int CApaWindowGroupName::RespondsToShutdownEvent(void) const + ?RespondsToSwitchFilesEvent@CApaWindowGroupName@@QBEHXZ @ 215 NONAME ; int CApaWindowGroupName::RespondsToSwitchFilesEvent(void) const + ?RestartScanL@CApaAppList@@QAEXXZ @ 216 NONAME ; void CApaAppList::RestartScanL(void) + ?RestoreL@CApaDoor@@QAEXABVCStreamStore@@VTStreamId@@@Z @ 217 NONAME ; void CApaDoor::RestoreL(class CStreamStore const &, class TStreamId) + ?RollbackNonNativeApplicationsUpdates@RApaLsSession@@QAEHXZ @ 218 NONAME ; int RApaLsSession::RollbackNonNativeApplicationsUpdates(void) + ?ScreenMode@CApaAppViewData@@QBEHXZ @ 219 NONAME ; int CApaAppViewData::ScreenMode(void) const + ?Self@CApaAppList@@SAPAV1@XZ @ 220 NONAME ; class CApaAppList * CApaAppList::Self(void) + ?SendKey@TApaTask@@QAEXABUTKeyEvent@@@Z @ 221 NONAME ; void TApaTask::SendKey(struct TKeyEvent const &) + ?SendKey@TApaTask@@QAEXHH@Z @ 222 NONAME ; void TApaTask::SendKey(int, int) + ?SendMessage@TApaTask@@QAEHVTUid@@ABVTDesC8@@@Z @ 223 NONAME ; int TApaTask::SendMessage(class TUid, class TDesC8 const &) + ?SendSystemEvent@TApaTask@@QAEXW4TApaSystemEvent@@@Z @ 224 NONAME ; void TApaTask::SendSystemEvent(enum TApaSystemEvent) + ?SendToBackground@TApaTask@@QAEXXZ @ 225 NONAME ; void TApaTask::SendToBackground(void) + ?ServiceArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 226 NONAME ; class CBufFlat * CApaAppList::ServiceArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 227 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@ABVTDataType@@@Z @ 228 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid, class TDataType const &) const + ?ServiceOpaqueDataBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@0@Z @ 229 NONAME ; class CBufFlat * CApaAppList::ServiceOpaqueDataBufferL(class TUid, class TUid) const + ?ServiceUidBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 230 NONAME ; class CBufFlat * CApaAppList::ServiceUidBufferL(class TUid) const + ?SetAcceptedConfidence@RApaLsSession@@QAEHH@Z @ 231 NONAME ; int RApaLsSession::SetAcceptedConfidence(int) + ?SetAppIsHiddenL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 232 NONAME ; void CApaRegistrationResourceFileWriter::SetAppIsHiddenL(int) + ?SetAppReady@CApaWindowGroupName@@QAEXH@Z @ 233 NONAME ; void CApaWindowGroupName::SetAppReady(int) + ?SetAppShortCaption@RApaLsSession@@QAEHABVTDesC16@@W4TLanguage@@VTUid@@@Z @ 234 NONAME ; int RApaLsSession::SetAppShortCaption(class TDesC16 const &, enum TLanguage, class TUid) + ?SetAppUid@CApaWindowGroupName@@QAEXVTUid@@@Z @ 235 NONAME ; void CApaWindowGroupName::SetAppUid(class TUid) + ?SetBusy@CApaWindowGroupName@@QAEXH@Z @ 236 NONAME ; void CApaWindowGroupName::SetBusy(int) + ?SetCapability@CApaAppInfoFileWriter@@QAEHABVTDesC8@@@Z @ 237 NONAME ; int CApaAppInfoFileWriter::SetCapability(class TDesC8 const &) + ?SetCaptionL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 238 NONAME ; void CApaWindowGroupName::SetCaptionL(class TDesC16 const &) + ?SetDefaultScreenNumberL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 239 NONAME ; void CApaRegistrationResourceFileWriter::SetDefaultScreenNumberL(int) + ?SetDocNameIsAFile@CApaWindowGroupName@@QAEXH@Z @ 240 NONAME ; void CApaWindowGroupName::SetDocNameIsAFile(int) + ?SetDocNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 241 NONAME ; void CApaWindowGroupName::SetDocNameL(class TDesC16 const &) + ?SetEmbeddabilityL@CApaRegistrationResourceFileWriter@@QAEXW4TEmbeddability@TApaAppCapability@@@Z @ 242 NONAME ; void CApaRegistrationResourceFileWriter::SetEmbeddabilityL(enum TApaAppCapability::TEmbeddability) + ?SetFormatToGlassL@CApaDoor@@QAEXXZ @ 243 NONAME ; void CApaDoor::SetFormatToGlassL(void) + ?SetFormatToIconL@CApaDoor@@QAEXXZ @ 244 NONAME ; void CApaDoor::SetFormatToIconL(void) + ?SetFormatToTemporaryIconL@CApaDoor@@QAEXH@Z @ 245 NONAME ; void CApaDoor::SetFormatToTemporaryIconL(int) + ?SetFsSessionL@RApaLsSession@@SAXAAVRFs@@@Z @ 246 NONAME ; void RApaLsSession::SetFsSessionL(class RFs &) + ?SetGroupNameL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 247 NONAME ; void CApaRegistrationResourceFileWriter::SetGroupNameL(class TDesC16 const &) + ?SetHidden@CApaWindowGroupName@@QAEXH@Z @ 248 NONAME ; void CApaWindowGroupName::SetHidden(int) + ?SetLaunchInBackgroundL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 249 NONAME ; void CApaRegistrationResourceFileWriter::SetLaunchInBackgroundL(int) + ?SetMaskBitmap@CApaMaskedBitmap@@QAEXPAVCFbsBitmap@@@Z @ 250 NONAME ; void CApaMaskedBitmap::SetMaskBitmap(class CFbsBitmap *) + ?SetMaxDataBufSize@RApaLsSession@@QAEHH@Z @ 251 NONAME ; int RApaLsSession::SetMaxDataBufSize(int) + ?SetNotify@RApaLsSession@@QAEXHAAVTRequestStatus@@@Z @ 252 NONAME ; void RApaLsSession::SetNotify(int, class TRequestStatus &) + ?SetOpaqueDataL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC8@@@Z @ 253 NONAME ; void CApaRegistrationResourceFileWriter::SetOpaqueDataL(class TDesC8 const &) + ?SetRespondsToShutdownEvent@CApaWindowGroupName@@QAEXH@Z @ 254 NONAME ; void CApaWindowGroupName::SetRespondsToShutdownEvent(int) + ?SetRespondsToSwitchFilesEvent@CApaWindowGroupName@@QAEXH@Z @ 255 NONAME ; void CApaWindowGroupName::SetRespondsToSwitchFilesEvent(int) + ?SetShortCaptionL@CApaAppData@@QAEXABVTDesC16@@@Z @ 256 NONAME ; void CApaAppData::SetShortCaptionL(class TDesC16 const &) + ?SetSupportsNewFileL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 257 NONAME ; void CApaRegistrationResourceFileWriter::SetSupportsNewFileL(int) + ?SetSystem@CApaWindowGroupName@@QAEXH@Z @ 258 NONAME ; void CApaWindowGroupName::SetSystem(int) + ?SetWgId@TApaTask@@QAEXH@Z @ 259 NONAME ; void TApaTask::SetWgId(int) + ?SetWindowGroupName@CApaWindowGroupName@@QAEXPAVHBufC16@@@Z @ 260 NONAME ; void CApaWindowGroupName::SetWindowGroupName(class HBufC16 *) + ?SetWindowGroupName@CApaWindowGroupName@@QBEHAAVRWindowGroup@@@Z @ 261 NONAME ; int CApaWindowGroupName::SetWindowGroupName(class RWindowGroup &) const + ?SetWindowGroupNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 262 NONAME ; void CApaWindowGroupName::SetWindowGroupNameL(class TDesC16 const &) + ?ShortCaption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 263 NONAME ; class TPtrC16 CApaSystemControl::ShortCaption(void) const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@@Z @ 264 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@@Z @ 265 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 266 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 267 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@ABVTDataType@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 268 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TDataType const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@VTUid@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 269 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TUid, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@AAVTThreadId@@W4TLaunchType@1@@Z @ 270 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TThreadId &, enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@ABVTDataType@@AAVTThreadId@@W4TLaunchType@1@@Z @ 271 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TDataType const &, class TThreadId &, enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 272 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TUid, class TThreadId &, enum RApaLsSession::TLaunchType) + ?StartIdleUpdateL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 273 NONAME ; void CApaAppList::StartIdleUpdateL(class MApaAppListObserver *) + ?StartIdleUpdateL@CApaAppList@@QAEXXZ @ 274 NONAME ; void CApaAppList::StartIdleUpdateL(void) + ?StartupApaServer@@YAHAAVMApaAppStarter@@@Z @ 275 NONAME ; int StartupApaServer(class MApaAppStarter &) + ?StartupApaServerProcess@@YAHXZ @ 276 NONAME ; int StartupApaServerProcess(void) + ?StopScan@CApaAppList@@QAEXXZ @ 277 NONAME ; void CApaAppList::StopScan(void) + ?StoreL@CApaAppInfoFileWriter@@QAEXXZ @ 278 NONAME ; void CApaAppInfoFileWriter::StoreL(void) + ?SwitchCreateFile@TApaTask@@QAEHABVTDesC16@@@Z @ 279 NONAME ; int TApaTask::SwitchCreateFile(class TDesC16 const &) + ?SwitchOpenFile@TApaTask@@QAEHABVTDesC16@@@Z @ 280 NONAME ; int TApaTask::SwitchOpenFile(class TDesC16 const &) + ?TestIconLoaderAndIconArrayL@TIconLoaderAndIconArrayForLeaks@@SAXXZ @ 281 NONAME ; void TIconLoaderAndIconArrayForLeaks::TestIconLoaderAndIconArrayL(void) + ?ThreadId@TApaTask@@QBE?AVTThreadId@@XZ @ 282 NONAME ; class TThreadId TApaTask::ThreadId(void) const + ?Type@CApaSystemControl@@QBE?AVTUid@@XZ @ 283 NONAME ; class TUid CApaSystemControl::Type(void) const + ?Uid@CApaAppViewData@@QBE?AVTUid@@XZ @ 284 NONAME ; class TUid CApaAppViewData::Uid(void) const + ?Uid@TApaAppServiceInfo@@QBE?AVTUid@@XZ @ 285 NONAME ; class TUid TApaAppServiceInfo::Uid(void) const + ?UpdateCounter@CApaAppList@@QBEHXZ @ 286 NONAME ; int CApaAppList::UpdateCounter(void) const + ?UpdateL@CApaSystemControlList@@QAEXXZ @ 287 NONAME ; void CApaSystemControlList::UpdateL(void) + ?Version@RApaLsSession@@QBE?AVTVersion@@XZ @ 288 NONAME ; class TVersion RApaLsSession::Version(void) const + ?Views@CApaAppData@@QBEPAV?$CArrayPtrFlat@VCApaAppViewData@@@@XZ @ 289 NONAME ; class CArrayPtrFlat * CApaAppData::Views(void) const + ?WgId@TApaTask@@QBEHXZ @ 290 NONAME ; int TApaTask::WgId(void) const + ?WindowGroupName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 291 NONAME ; class TPtrC16 CApaWindowGroupName::WindowGroupName(void) const + ?KMinApplicationStackSize@@3HB @ 292 NONAME ; int const KMinApplicationStackSize + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/TICONFORLEAKSu.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/TICONFORLEAKSu.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,300 @@ +EXPORTS + ??0CDataRecognitionResultArray@@QAE@XZ @ 1 NONAME ; CDataRecognitionResultArray::CDataRecognitionResultArray(void) + ??0MApaAppListServObserver@@IAE@XZ @ 2 NONAME ; MApaAppListServObserver::MApaAppListServObserver(void) + ??0RApaLsSession@@QAE@XZ @ 3 NONAME ; RApaLsSession::RApaLsSession(void) + ??0TApaPictureFactory@@IAE@XZ @ 4 NONAME ; TApaPictureFactory::TApaPictureFactory(void) + ??0TApaPictureFactory@@QAE@PAVCApaProcess@@@Z @ 5 NONAME ; TApaPictureFactory::TApaPictureFactory(class CApaProcess *) + ??0TApaTask@@QAE@AAVRWsSession@@@Z @ 6 NONAME ; TApaTask::TApaTask(class RWsSession &) + ??0TApaTaskList@@QAE@AAVRWsSession@@@Z @ 7 NONAME ; TApaTaskList::TApaTaskList(class RWsSession &) + ??1CApaAppData@@UAE@XZ @ 8 NONAME ; CApaAppData::~CApaAppData(void) + ??1CApaAppInfoFileWriter@@UAE@XZ @ 9 NONAME ; CApaAppInfoFileWriter::~CApaAppInfoFileWriter(void) + ??1CApaAppList@@UAE@XZ @ 10 NONAME ; CApaAppList::~CApaAppList(void) + ??1CApaAppListNotifier@@UAE@XZ @ 11 NONAME ; CApaAppListNotifier::~CApaAppListNotifier(void) + ??1CApaDoor@@UAE@XZ @ 12 NONAME ; CApaDoor::~CApaDoor(void) + ??1CApaLocalisableResourceFileWriter@@UAE@XZ @ 13 NONAME ; CApaLocalisableResourceFileWriter::~CApaLocalisableResourceFileWriter(void) + ??1CApaMaskedBitmap@@UAE@XZ @ 14 NONAME ; CApaMaskedBitmap::~CApaMaskedBitmap(void) + ??1CApaRegistrationResourceFileWriter@@UAE@XZ @ 15 NONAME ; CApaRegistrationResourceFileWriter::~CApaRegistrationResourceFileWriter(void) + ??1CApaSystemControlList@@UAE@XZ @ 16 NONAME ; CApaSystemControlList::~CApaSystemControlList(void) + ??1CApaWindowGroupName@@UAE@XZ @ 17 NONAME ; CApaWindowGroupName::~CApaWindowGroupName(void) + ??1CDataRecognitionResultArray@@UAE@XZ @ 18 NONAME ; CDataRecognitionResultArray::~CDataRecognitionResultArray(void) + ?AddCaptionL@CApaAppInfoFileWriter@@QAEXW4TLanguage@@ABVTDesC16@@@Z @ 19 NONAME ; void CApaAppInfoFileWriter::AddCaptionL(enum TLanguage, class TDesC16 const &) + ?AddDataTypeL@CApaAppInfoFileWriter@@QAEXABVTDataTypeWithPriority@@@Z @ 20 NONAME ; void CApaAppInfoFileWriter::AddDataTypeL(class TDataTypeWithPriority const &) + ?AddDataTypeL@CApaRegistrationResourceFileWriter@@QAEXHABVTDesC8@@@Z @ 21 NONAME ; void CApaRegistrationResourceFileWriter::AddDataTypeL(int, class TDesC8 const &) + ?AddFileOwnershipInfoL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 22 NONAME ; void CApaRegistrationResourceFileWriter::AddFileOwnershipInfoL(class TDesC16 const &) + ?AddForcedRegistrationL@CApaAppList@@QAEXPAVHBufC16@@@Z @ 23 NONAME ; void CApaAppList::AddForcedRegistrationL(class HBufC16 *) + ?AddIconL@CApaAppInfoFileWriter@@QAEXAAVCApaMaskedBitmap@@@Z @ 24 NONAME ; void CApaAppInfoFileWriter::AddIconL(class CApaMaskedBitmap &) + ?AppCount@RApaLsSession@@QBEHAAH@Z @ 25 NONAME ; int RApaLsSession::AppCount(int &) const + ?AppDataByFileName@CApaAppList@@QBEPAVCApaAppData@@ABVTDesC16@@@Z @ 26 NONAME ; class CApaAppData * CApaAppList::AppDataByFileName(class TDesC16 const &) const + ?AppDataByUid@CApaAppList@@QBEPAVCApaAppData@@VTUid@@@Z @ 27 NONAME ; class CApaAppData * CApaAppList::AppDataByUid(class TUid) const + ?AppEntry@CApaAppData@@QBE?AVTApaAppEntry@@XZ @ 28 NONAME ; class TApaAppEntry CApaAppData::AppEntry(void) const + ?AppForDataType@RApaLsSession@@QBEHABVTDataType@@AAVTUid@@@Z @ 29 NONAME ; int RApaLsSession::AppForDataType(class TDataType const &, class TUid &) const + ?AppForDataTypeAndService@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 30 NONAME ; int RApaLsSession::AppForDataTypeAndService(class TDataType const &, class TUid, class TUid &) const + ?AppForDocument@RApaLsSession@@QBEHABVRFile@@AAVTUid@@AAVTDataType@@@Z @ 31 NONAME ; int RApaLsSession::AppForDocument(class RFile const &, class TUid &, class TDataType &) const + ?AppForDocument@RApaLsSession@@QBEHABVTDesC16@@AAVTUid@@AAVTDataType@@@Z @ 32 NONAME ; int RApaLsSession::AppForDocument(class TDesC16 const &, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVRFile@@VTUid@@AAV3@AAVTDataType@@@Z @ 33 NONAME ; int RApaLsSession::AppForDocumentAndService(class RFile const &, class TUid, class TUid &, class TDataType &) const + ?AppForDocumentAndService@RApaLsSession@@QBEHABVTDesC16@@VTUid@@AAV3@AAVTDataType@@@Z @ 34 NONAME ; int RApaLsSession::AppForDocumentAndService(class TDesC16 const &, class TUid, class TUid &, class TDataType &) const + ?AppScanInProgress@CApaAppList@@QBEHXZ @ 35 NONAME ; int CApaAppList::AppScanInProgress(void) const + ?AppUid@CApaWindowGroupName@@QBE?AVTUid@@XZ @ 36 NONAME ; class TUid CApaWindowGroupName::AppUid(void) const + ?AppUidL@CApaDoor@@QBE?AVTUid@@XZ @ 37 NONAME ; class TUid CApaDoor::AppUidL(void) const + ?ApplicationLanguage@CApaAppData@@QBE?AW4TLanguage@@XZ @ 38 NONAME ; enum TLanguage CApaAppData::ApplicationLanguage(void) const + ?ApplicationLanguage@RApaLsSession@@QBEHVTUid@@AAW4TLanguage@@@Z @ 39 NONAME ; int RApaLsSession::ApplicationLanguage(class TUid, enum TLanguage &) const + ?BringToForeground@TApaTask@@QAEXXZ @ 40 NONAME ; void TApaTask::BringToForeground(void) + ?CanUseScreenMode@CApaAppData@@QAEHH@Z @ 41 NONAME ; int CApaAppData::CanUseScreenMode(int) + ?CancelListPopulationCompleteObserver@RApaLsSession@@QBEHXZ @ 42 NONAME ; int RApaLsSession::CancelListPopulationCompleteObserver(void) const + ?CancelNotify@RApaLsSession@@QAEXXZ @ 43 NONAME ; void RApaLsSession::CancelNotify(void) + ?CancelNotifyOnDataMappingChange@RApaLsSession@@QAEXXZ @ 44 NONAME ; void RApaLsSession::CancelNotifyOnDataMappingChange(void) + ?CancelRecognizeFiles@RApaLsSession@@QAEXXZ @ 45 NONAME ; void RApaLsSession::CancelRecognizeFiles(void) + ?Capability@CApaAppData@@QBEXAAVTDes8@@@Z @ 46 NONAME ; void CApaAppData::Capability(class TDes8 &) const + ?Caption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 47 NONAME ; class TPtrC16 CApaSystemControl::Caption(void) const + ?Caption@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 48 NONAME ; class TPtrC16 CApaWindowGroupName::Caption(void) const + ?CheckInterimFormatFileNotCorruptL@ForJavaMIDletInstaller@@SAXAAVRFile@@@Z @ 49 NONAME ; void ForJavaMIDletInstaller::CheckInterimFormatFileNotCorruptL(class RFile &) + ?ClearFsSession@RApaLsSession@@SAXXZ @ 50 NONAME ; void RApaLsSession::ClearFsSession(void) + ?Close@RApaLsSession@@QAEXXZ @ 51 NONAME ; void RApaLsSession::Close(void) + ?CommitNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 52 NONAME ; void RApaLsSession::CommitNonNativeApplicationsUpdatesL(void) + ?CompareStrings@CApaAppList@@SAHABVHBufC16@@0@Z @ 53 NONAME ; int CApaAppList::CompareStrings(class HBufC16 const &, class HBufC16 const &) + ?Connect@RApaLsSession@@QAEHXZ @ 54 NONAME ; int RApaLsSession::Connect(void) + ?ConstructFromWgIdL@CApaWindowGroupName@@QAEXH@Z @ 55 NONAME ; void CApaWindowGroupName::ConstructFromWgIdL(int) + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@H@Z @ 56 NONAME ; class CApaSystemControl * CApaSystemControlList::Control(int) const + ?Control@CApaSystemControlList@@QBEPAVCApaSystemControl@@VTUid@@@Z @ 57 NONAME ; class CApaSystemControl * CApaSystemControlList::Control(class TUid) const + ?Count@CApaAppList@@QBEHXZ @ 58 NONAME ; int CApaAppList::Count(void) const + ?Count@CApaSystemControlList@@QBEHXZ @ 59 NONAME ; int CApaSystemControlList::Count(void) const + ?Count@CDataRecognitionResultArray@@QBEIXZ @ 60 NONAME ; unsigned int CDataRecognitionResultArray::Count(void) const + ?CreateDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 61 NONAME ; int RApaLsSession::CreateDocument(class TDesC16 const &, class TUid, class TThreadId &, enum RApaLsSession::TLaunchType) + ?CreateL@CApaSystemControl@@QAEXXZ @ 62 NONAME ; void CApaSystemControl::CreateL(void) + ?CycleTasks@TApaTaskList@@QAEHVTUid@@W4TCycleDirection@1@@Z @ 63 NONAME ; int TApaTaskList::CycleTasks(class TUid, enum TApaTaskList::TCycleDirection) + ?DataType@CApaAppData@@QBEJABVTDataType@@@Z @ 64 NONAME ; long CApaAppData::DataType(class TDataType const &) const + ?DataTypes@TApaAppServiceInfo@@QBEABV?$CArrayFixFlat@VTDataTypeWithPriority@@@@XZ @ 65 NONAME ; class CArrayFixFlat const & TApaAppServiceInfo::DataTypes(void) const + ?DefaultScreenNumber@CApaAppData@@QBEIXZ @ 66 NONAME ; unsigned int CApaAppData::DefaultScreenNumber(void) const + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@@Z @ 67 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &) + ?DeleteDataMapping@RApaLsSession@@QAEHABVTDataType@@VTUid@@@Z @ 68 NONAME ; int RApaLsSession::DeleteDataMapping(class TDataType const &, class TUid) + ?DeregisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@@Z @ 69 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationL(class TUid) + ?DeregisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@@Z @ 70 NONAME ; void RApaLsSession::DeregisterNonNativeApplicationTypeL(class TUid) + ?DocName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 71 NONAME ; class TPtrC16 CApaWindowGroupName::DocName(void) const + ?DocNameIsAFile@CApaWindowGroupName@@QBEHXZ @ 72 NONAME ; int CApaWindowGroupName::DocNameIsAFile(void) const + ?DocumentL@CApaDoor@@QAEPAVCApaDocument@@H@Z @ 73 NONAME ; class CApaDocument * CApaDoor::DocumentL(int) + ?EmbeddableAppCount@RApaLsSession@@QBEHAAH@Z @ 74 NONAME ; int RApaLsSession::EmbeddableAppCount(int &) const + ?EndTask@TApaTask@@QAEXXZ @ 75 NONAME ; void TApaTask::EndTask(void) + ?Exists@TApaTask@@QBEHXZ @ 76 NONAME ; int TApaTask::Exists(void) const + ?ExternalizeL@CApaMaskedBitmap@@QBEXAAVRWriteStream@@@Z @ 77 NONAME ; void CApaMaskedBitmap::ExternalizeL(class RWriteStream &) const + ?FileName@CApaSystemControl@@QBE?AV?$TBuf@$0BAA@@@XZ @ 78 NONAME ; class TBuf<256> CApaSystemControl::FileName(void) const + ?FindAndAddSpecificAppL@CApaAppList@@QAEPAVCApaAppData@@PAVCApaAppRegFinder@@VTUid@@@Z @ 79 NONAME ; class CApaAppData * CApaAppList::FindAndAddSpecificAppL(class CApaAppRegFinder *, class TUid) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 80 NONAME ; class TApaTask TApaTaskList::FindApp(class TDesC16 const &) + ?FindApp@TApaTaskList@@QAE?AVTApaTask@@VTUid@@@Z @ 81 NONAME ; class TApaTask TApaTaskList::FindApp(class TUid) + ?FindByAppUid@CApaWindowGroupName@@SAXVTUid@@AAVRWsSession@@AAH@Z @ 82 NONAME ; void CApaWindowGroupName::FindByAppUid(class TUid, class RWsSession &, int &) + ?FindByCaption@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 83 NONAME ; void CApaWindowGroupName::FindByCaption(class TDesC16 const &, class RWsSession &, int &) + ?FindByDocName@CApaWindowGroupName@@SAXABVTDesC16@@AAVRWsSession@@AAH@Z @ 84 NONAME ; void CApaWindowGroupName::FindByDocName(class TDesC16 const &, class RWsSession &, int &) + ?FindByPos@TApaTaskList@@QAE?AVTApaTask@@H@Z @ 85 NONAME ; class TApaTask TApaTaskList::FindByPos(int) + ?FindDoc@TApaTaskList@@QAE?AVTApaTask@@ABVTDesC16@@@Z @ 86 NONAME ; class TApaTask TApaTaskList::FindDoc(class TDesC16 const &) + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@H@Z @ 87 NONAME ; class CApaAppData * CApaAppList::FirstApp(int) const + ?FirstApp@CApaAppList@@QBEPAVCApaAppData@@XZ @ 88 NONAME ; class CApaAppData * CApaAppList::FirstApp(void) const + ?ForceRegistration@RApaLsSession@@QAEHABV?$RPointerArray@VTDesC16@@@@@Z @ 89 NONAME ; int RApaLsSession::ForceRegistration(class RPointerArray const &) + ?FsSession@RApaLsSession@@SAPAVRFs@@XZ @ 90 NONAME ; class RFs * RApaLsSession::FsSession(void) + ?GetAcceptedConfidence@RApaLsSession@@QBEHAAH@Z @ 91 NONAME ; int RApaLsSession::GetAcceptedConfidence(int &) const + ?GetAllApps@RApaLsSession@@QBEHH@Z @ 92 NONAME ; int RApaLsSession::GetAllApps(int) const + ?GetAllApps@RApaLsSession@@QBEHXZ @ 93 NONAME ; int RApaLsSession::GetAllApps(void) const + ?GetAppByDataType@RApaLsSession@@QBEHABVTDataType@@VTUid@@AAV3@@Z @ 94 NONAME ; int RApaLsSession::GetAppByDataType(class TDataType const &, class TUid, class TUid &) const + ?GetAppCapability@RApaLsSession@@QBEHAAVTDes8@@VTUid@@@Z @ 95 NONAME ; int RApaLsSession::GetAppCapability(class TDes8 &, class TUid) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAPAVHBufC16@@@Z @ 96 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class HBufC16 * &) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@AAVRFile@@@Z @ 97 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class RFile &) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@HAAVCApaMaskedBitmap@@@Z @ 98 NONAME ; int RApaLsSession::GetAppIcon(class TUid, int, class CApaMaskedBitmap &) const + ?GetAppIcon@RApaLsSession@@QBEHVTUid@@VTSize@@AAVCApaMaskedBitmap@@@Z @ 99 NONAME ; int RApaLsSession::GetAppIcon(class TUid, class TSize, class CApaMaskedBitmap &) const + ?GetAppIconSizes@RApaLsSession@@QBEHVTUid@@AAV?$CArrayFixFlat@VTSize@@@@@Z @ 100 NONAME ; int RApaLsSession::GetAppIconSizes(class TUid, class CArrayFixFlat &) const + ?GetAppInfo@RApaLsSession@@QBEHAAVTApaAppInfo@@VTUid@@@Z @ 101 NONAME ; int RApaLsSession::GetAppInfo(class TApaAppInfo &, class TUid) const + ?GetAppOwnedFiles@RApaLsSession@@QBEHAAVCDesC16Array@@VTUid@@@Z @ 102 NONAME ; int RApaLsSession::GetAppOwnedFiles(class CDesC16Array &, class TUid) const + ?GetAppServiceOpaqueDataLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@0@Z @ 103 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServiceOpaqueDataLC(class TUid, class TUid) const + ?GetAppServicesL@RApaLsSession@@QBEXVTUid@@AAV?$CArrayFixFlat@VTUid@@@@@Z @ 104 NONAME ; void RApaLsSession::GetAppServicesL(class TUid, class CArrayFixFlat &) const + ?GetAppServicesLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 105 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetAppServicesLC(class TUid) const + ?GetAppType@RApaLsSession@@QBEHAAVTUid@@V2@@Z @ 106 NONAME ; int RApaLsSession::GetAppType(class TUid &, class TUid) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0AAPAVHBufC16@@@Z @ 107 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class HBufC16 * &) const + ?GetAppViewIcon@RApaLsSession@@QBEHVTUid@@0ABVTSize@@AAVCApaMaskedBitmap@@@Z @ 108 NONAME ; int RApaLsSession::GetAppViewIcon(class TUid, class TUid, class TSize const &, class CApaMaskedBitmap &) const + ?GetAppViews@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTApaAppViewInfo@@@@VTUid@@@Z @ 109 NONAME ; int RApaLsSession::GetAppViews(class CArrayFixFlat &, class TUid) const + ?GetDataRecognitionResultL@CDataRecognitionResultArray@@QBEXAAVTDataRecognitionResult@@I@Z @ 110 NONAME ; void CDataRecognitionResultArray::GetDataRecognitionResultL(class TDataRecognitionResult &, unsigned int) const + ?GetDefaultScreenNumber@RApaLsSession@@QBEHAAHVTUid@@@Z @ 111 NONAME ; int RApaLsSession::GetDefaultScreenNumber(int &, class TUid) const + ?GetEmbeddableApps@RApaLsSession@@QBEHH@Z @ 112 NONAME ; int RApaLsSession::GetEmbeddableApps(int) const + ?GetEmbeddableApps@RApaLsSession@@QBEHXZ @ 113 NONAME ; int RApaLsSession::GetEmbeddableApps(void) const + ?GetFileNameL@CDataRecognitionResultArray@@QBEXAAV?$TBuf@$0BAA@@@I@Z @ 114 NONAME ; void CDataRecognitionResultArray::GetFileNameL(class TBuf<256> &, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@@Z @ 115 NONAME ; int RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &) const + ?GetFilteredApps@RApaLsSession@@QBEHABVTApaEmbeddabilityFilter@@H@Z @ 116 NONAME ; int RApaLsSession::GetFilteredApps(class TApaEmbeddabilityFilter const &, int) const + ?GetFilteredApps@RApaLsSession@@QBEHII@Z @ 117 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int) const + ?GetFilteredApps@RApaLsSession@@QBEHIIH@Z @ 118 NONAME ; int RApaLsSession::GetFilteredApps(unsigned int, unsigned int, int) const + ?GetIconInfo@CApaAppData@@QBEXAAH0@Z @ 119 NONAME ; void CApaAppData::GetIconInfo(int &, int &) const + ?GetJavaMIDletInfoL@ForJavaMIDletInstaller@@SAXAAVRFs@@ABVTDesC16@@AAK2@Z @ 120 NONAME ; void ForJavaMIDletInstaller::GetJavaMIDletInfoL(class RFs &, class TDesC16 const &, unsigned long &, unsigned long &) + ?GetMaxDataBufSize@RApaLsSession@@QBEHAAH@Z @ 121 NONAME ; int RApaLsSession::GetMaxDataBufSize(int &) const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@@Z @ 122 NONAME ; int RApaLsSession::GetNextApp(class TApaAppInfo &) const + ?GetNextApp@RApaLsSession@@QBEHAAVTApaAppInfo@@H@Z @ 123 NONAME ; int RApaLsSession::GetNextApp(class TApaAppInfo &, int) const + ?GetPreferredBufSize@RApaLsSession@@QBEHAAH@Z @ 124 NONAME ; int RApaLsSession::GetPreferredBufSize(int &) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@@Z @ 125 NONAME ; int RApaLsSession::GetServerApps(class TUid) const + ?GetServerApps@RApaLsSession@@QBEHVTUid@@H@Z @ 126 NONAME ; int RApaLsSession::GetServerApps(class TUid, int) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@@Z @ 127 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid) const + ?GetServiceImplementationsLC@RApaLsSession@@QBEPAVCApaAppServiceInfoArray@@VTUid@@ABVTDataType@@@Z @ 128 NONAME ; class CApaAppServiceInfoArray * RApaLsSession::GetServiceImplementationsLC(class TUid, class TDataType const &) const + ?GetSupportedDataTypesL@RApaLsSession@@QBEHAAV?$CArrayFixFlat@VTDataType@@@@@Z @ 129 NONAME ; int RApaLsSession::GetSupportedDataTypesL(class CArrayFixFlat &) const + ?HandleAsRegistrationFile@ApaUtils@@SAHABVTUidType@@@Z @ 130 NONAME ; int ApaUtils::HandleAsRegistrationFile(class TUidType const &) + ?Hidden@CApaWindowGroupName@@QBEHXZ @ 131 NONAME ; int CApaWindowGroupName::Hidden(void) const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@H@Z @ 132 NONAME ; class CApaMaskedBitmap * CApaAppData::Icon(int) const + ?Icon@CApaAppData@@QBEPAVCApaMaskedBitmap@@VTSize@@@Z @ 133 NONAME ; class CApaMaskedBitmap * CApaAppData::Icon(class TSize) const + ?Icon@CApaAppViewData@@QBEPAVCApaMaskedBitmap@@ABVTSize@@@Z @ 134 NONAME ; class CApaMaskedBitmap * CApaAppViewData::Icon(class TSize const &) const + ?Icon@CApaSystemControl@@QBEPAVCApaMaskedBitmap@@XZ @ 135 NONAME ; class CApaMaskedBitmap * CApaSystemControl::Icon(void) const + ?IconFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 136 NONAME ; class TPtrC16 CApaAppData::IconFileName(void) const + ?IconFileName@CApaAppViewData@@QBE?AVTPtrC16@@XZ @ 137 NONAME ; class TPtrC16 CApaAppViewData::IconFileName(void) const + ?IconSizesL@CApaAppData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 138 NONAME ; class CArrayFixFlat * CApaAppData::IconSizesL(void) const + ?IconSizesL@CApaAppViewData@@QBEPAV?$CArrayFixFlat@VTSize@@@@XZ @ 139 NONAME ; class CArrayFixFlat * CApaAppViewData::IconSizesL(void) const + ?ImplementsService@CApaAppData@@QBEHVTUid@@@Z @ 140 NONAME ; int CApaAppData::ImplementsService(class TUid) const + ?Index@CApaSystemControlList@@QBEHVTUid@@@Z @ 141 NONAME ; int CApaSystemControlList::Index(class TUid) const + ?InitListL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 142 NONAME ; void CApaAppList::InitListL(class MApaAppListObserver *) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@1@Z @ 143 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid, class TUid) + ?InsertDataMapping@RApaLsSession@@QAEHABVTDataType@@JVTUid@@@Z @ 144 NONAME ; int RApaLsSession::InsertDataMapping(class TDataType const &, long, class TUid) + ?InsertDataMappingIfHigher@RApaLsSession@@QAEHABVTDataType@@JVTUid@@AAH@Z @ 145 NONAME ; int RApaLsSession::InsertDataMappingIfHigher(class TDataType const &, long, class TUid, int &) + ?InternalizeL@CApaMaskedBitmap@@QAEXAAVRReadStream@@@Z @ 146 NONAME ; void CApaMaskedBitmap::InternalizeL(class RReadStream &) + ?IsAppReady@CApaWindowGroupName@@QBEHXZ @ 147 NONAME ; int CApaWindowGroupName::IsAppReady(void) const + ?IsBusy@CApaWindowGroupName@@QBEHXZ @ 148 NONAME ; int CApaWindowGroupName::IsBusy(void) const + ?IsFirstScanComplete@CApaAppList@@QBEHXZ @ 149 NONAME ; int CApaAppList::IsFirstScanComplete(void) const + ?IsIdleUpdateComplete@CApaAppList@@QBEHXZ @ 150 NONAME ; int CApaAppList::IsIdleUpdateComplete(void) const + ?IsLanguageChangePending@CApaAppList@@QBEHXZ @ 151 NONAME ; int CApaAppList::IsLanguageChangePending(void) const + ?IsPending@CApaAppData@@QBEHXZ @ 152 NONAME ; int CApaAppData::IsPending(void) const + ?IsProgram@RApaLsSession@@QBEHABVTDesC16@@AAH@Z @ 153 NONAME ; int RApaLsSession::IsProgram(class TDesC16 const &, int &) const + ?IsSystem@CApaWindowGroupName@@QBEHXZ @ 154 NONAME ; int CApaWindowGroupName::IsSystem(void) const + ?KillTask@TApaTask@@QAEXXZ @ 155 NONAME ; void TApaTask::KillTask(void) + ?LocalisableResourceFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 156 NONAME ; class TPtrC16 CApaAppData::LocalisableResourceFileName(void) const + ?MApaAppListServObserver_Reserved1@MApaAppListServObserver@@EAEXXZ @ 157 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved1(void) + ?MApaAppListServObserver_Reserved2@MApaAppListServObserver@@EAEXXZ @ 158 NONAME ; void MApaAppListServObserver::MApaAppListServObserver_Reserved2(void) + ?Mask@CApaMaskedBitmap@@QBEPAVCFbsBitmap@@XZ @ 159 NONAME ; class CFbsBitmap * CApaMaskedBitmap::Mask(void) const + ?MatchesSecurityPolicy@RApaLsSession@@QBEHAAHVTUid@@ABVTSecurityPolicy@@@Z @ 160 NONAME ; int RApaLsSession::MatchesSecurityPolicy(int &, class TUid, class TSecurityPolicy const &) const + ?MinApplicationStackSize@@YAIXZ @ 161 NONAME ; unsigned int MinApplicationStackSize(void) + ?New@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@PAVHBufC16@@@Z @ 162 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::New(class RWsSession const &, class HBufC16 *) + ?NewInterimFormatFileWriterLC@ForJavaMIDletInstaller@@SAPAVCApaAppInfoFileWriter@@AAVRFs@@ABVTDesC16@@VTUid@@KH@Z @ 163 NONAME ; class CApaAppInfoFileWriter * ForJavaMIDletInstaller::NewInterimFormatFileWriterLC(class RFs &, class TDesC16 const &, class TUid, unsigned long, int) + ?NewL@CApaAppData@@SAPAV1@ABVTApaAppEntry@@AAVRFs@@@Z @ 164 NONAME ; class CApaAppData * CApaAppData::NewL(class TApaAppEntry const &, class RFs &) + ?NewL@CApaAppList@@SAPAV1@AAVRFs@@PAVCApaAppRegFinder@@HH@Z @ 165 NONAME ; class CApaAppList * CApaAppList::NewL(class RFs &, class CApaAppRegFinder *, int, int) + ?NewL@CApaAppListNotifier@@SAPAV1@PAVMApaAppListServObserver@@W4TPriority@CActive@@@Z @ 166 NONAME ; class CApaAppListNotifier * CApaAppListNotifier::NewL(class MApaAppListServObserver *, enum CActive::TPriority) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 167 NONAME ; class CApaDoor * CApaDoor::NewL(class RFs &, class CApaDocument &, class TSize const &) + ?NewL@CApaDoor@@SAPAV1@AAVRFs@@ABVCStreamStore@@VTStreamId@@AAVCApaProcess@@@Z @ 168 NONAME ; class CApaDoor * CApaDoor::NewL(class RFs &, class CStreamStore const &, class TStreamId, class CApaProcess &) + ?NewL@CApaLocalisableResourceFileWriter@@SAPAV1@ABVTDesC16@@0H0@Z @ 169 NONAME ; class CApaLocalisableResourceFileWriter * CApaLocalisableResourceFileWriter::NewL(class TDesC16 const &, class TDesC16 const &, int, class TDesC16 const &) + ?NewL@CApaMaskedBitmap@@SAPAV1@PBV1@@Z @ 170 NONAME ; class CApaMaskedBitmap * CApaMaskedBitmap::NewL(class CApaMaskedBitmap const *) + ?NewL@CApaRegistrationResourceFileWriter@@SAPAV1@VTUid@@ABVTDesC16@@I@Z @ 171 NONAME ; class CApaRegistrationResourceFileWriter * CApaRegistrationResourceFileWriter::NewL(class TUid, class TDesC16 const &, unsigned int) + ?NewL@CApaSystemControlList@@SAPAV1@AAVRFs@@@Z @ 172 NONAME ; class CApaSystemControlList * CApaSystemControlList::NewL(class RFs &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 173 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewL(class RWsSession const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 174 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewL(class RWsSession const &, class TDesC16 const &) + ?NewL@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 175 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewL(class RWsSession const &, int) + ?NewLC@CApaDoor@@SAPAV1@AAVRFs@@AAVCApaDocument@@ABVTSize@@@Z @ 176 NONAME ; class CApaDoor * CApaDoor::NewLC(class RFs &, class CApaDocument &, class TSize const &) + ?NewLC@CApaMaskedBitmap@@SAPAV1@XZ @ 177 NONAME ; class CApaMaskedBitmap * CApaMaskedBitmap::NewLC(void) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@@Z @ 178 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewLC(class RWsSession const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@ABVTDesC16@@@Z @ 179 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewLC(class RWsSession const &, class TDesC16 const &) + ?NewLC@CApaWindowGroupName@@SAPAV1@ABVRWsSession@@H@Z @ 180 NONAME ; class CApaWindowGroupName * CApaWindowGroupName::NewLC(class RWsSession const &, int) + ?NewPictureL@TApaPictureFactory@@UBEXAAVTPictureHeader@@ABVCStreamStore@@@Z @ 181 NONAME ; void TApaPictureFactory::NewPictureL(class TPictureHeader &, class CStreamStore const &) const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@@Z @ 182 NONAME ; class CApaAppData * CApaAppList::NextApp(class CApaAppData const *) const + ?NextApp@CApaAppList@@QBEPAVCApaAppData@@PBV2@H@Z @ 183 NONAME ; class CApaAppData * CApaAppList::NextApp(class CApaAppData const *, int) const + ?NonMbmIconFile@CApaAppData@@QBEHXZ @ 184 NONAME ; int CApaAppData::NonMbmIconFile(void) const + ?NonMbmIconFile@CApaAppViewData@@QBEHXZ @ 185 NONAME ; int CApaAppViewData::NonMbmIconFile(void) const + ?NonNativeApplicationType@CApaAppData@@QBE?AVTUid@@XZ @ 186 NONAME ; class TUid CApaAppData::NonNativeApplicationType(void) const + ?NotifyOnDataMappingChange@RApaLsSession@@QAEXAAVTRequestStatus@@@Z @ 187 NONAME ; void RApaLsSession::NotifyOnDataMappingChange(class TRequestStatus &) + ?NumberOfOwnDefinedIcons@RApaLsSession@@QBEHVTUid@@AAH@Z @ 188 NONAME ; int RApaLsSession::NumberOfOwnDefinedIcons(class TUid, int &) const + ?OpaqueData@CApaAppData@@QBE?AVTPtrC8@@XZ @ 189 NONAME ; class TPtrC8 CApaAppData::OpaqueData(void) const + ?OpaqueData@TApaAppServiceInfo@@QBEABVTDesC8@@XZ @ 190 NONAME ; class TDesC8 const & TApaAppServiceInfo::OpaqueData(void) const + ?OwnedFiles@CApaAppData@@QBEPAVCDesC16Array@@XZ @ 191 NONAME ; class CDesC16Array * CApaAppData::OwnedFiles(void) const + ?Path@CDataRecognitionResultArray@@QBEABV?$TBuf@$0BAA@@@XZ @ 192 NONAME ; class TBuf<256> const & CDataRecognitionResultArray::Path(void) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@@Z @ 193 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &) const + ?PreferredDataHandlerL@CApaAppList@@QBE?AVTUid@@ABVTDataType@@PBV2@AAH@Z @ 194 NONAME ; class TUid CApaAppList::PreferredDataHandlerL(class TDataType const &, class TUid const *, int &) const + ?PrepareNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 195 NONAME ; void RApaLsSession::PrepareNonNativeApplicationsUpdatesL(void) + ?PurgeL@CApaAppList@@QAEXXZ @ 196 NONAME ; void CApaAppList::PurgeL(void) + ?RApaLsSession_Reserved1@RApaLsSession@@EAEXXZ @ 197 NONAME ; void RApaLsSession::RApaLsSession_Reserved1(void) + ?RApaLsSession_Reserved2@RApaLsSession@@EAEXXZ @ 198 NONAME ; void RApaLsSession::RApaLsSession_Reserved2(void) + ?RecognizeData@RApaLsSession@@QBEHABVRFile@@AAVTDataRecognitionResult@@@Z @ 199 NONAME ; int RApaLsSession::RecognizeData(class RFile const &, class TDataRecognitionResult &) const + ?RecognizeData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVTDataRecognitionResult@@@Z @ 200 NONAME ; int RApaLsSession::RecognizeData(class TDesC16 const &, class TDesC8 const &, class TDataRecognitionResult &) const + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 201 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?RecognizeFilesL@RApaLsSession@@QAEXABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@AAVTRequestStatus@@@Z @ 202 NONAME ; void RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &, class TRequestStatus &) + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@AAVCDataRecognitionResultArray@@@Z @ 203 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class CDataRecognitionResultArray &) const + ?RecognizeFilesL@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@AAVCDataRecognitionResultArray@@@Z @ 204 NONAME ; int RApaLsSession::RecognizeFilesL(class TDesC16 const &, class TDesC8 const &, class CDataRecognitionResultArray &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVRFile@@ABVTDataType@@AAH@Z @ 205 NONAME ; int RApaLsSession::RecognizeSpecificData(class RFile const &, class TDataType const &, int &) const + ?RecognizeSpecificData@RApaLsSession@@QBEHABVTDesC16@@ABVTDesC8@@ABVTDataType@@AAH@Z @ 206 NONAME ; int RApaLsSession::RecognizeSpecificData(class TDesC16 const &, class TDesC8 const &, class TDataType const &, int &) const + ?RegisterListPopulationCompleteObserver@RApaLsSession@@QBEXAAVTRequestStatus@@@Z @ 207 NONAME ; void RApaLsSession::RegisterListPopulationCompleteObserver(class TRequestStatus &) const + ?RegisterNonNativeApplicationL@RApaLsSession@@QAEXVTUid@@ABVTDriveUnit@@AAVCApaRegistrationResourceFileWriter@@PAVCApaLocalisableResourceFileWriter@@PBVRFile@@@Z @ 208 NONAME ; void RApaLsSession::RegisterNonNativeApplicationL(class TUid, class TDriveUnit const &, class CApaRegistrationResourceFileWriter &, class CApaLocalisableResourceFileWriter *, class RFile const *) + ?RegisterNonNativeApplicationTypeL@RApaLsSession@@QAEXVTUid@@ABVTDesC16@@@Z @ 209 NONAME ; void RApaLsSession::RegisterNonNativeApplicationTypeL(class TUid, class TDesC16 const &) + ?RegistrationFileName@CApaAppData@@QBE?AVTPtrC16@@XZ @ 210 NONAME ; class TPtrC16 CApaAppData::RegistrationFileName(void) const + ?RegistrationFileUsed@CApaAppData@@QBEHXZ @ 211 NONAME ; int CApaAppData::RegistrationFileUsed(void) const + ?ResetForcedRegistrations@CApaAppList@@QAEXXZ @ 212 NONAME ; void CApaAppList::ResetForcedRegistrations(void) + ?RespondsToShutdownEvent@CApaWindowGroupName@@QBEHXZ @ 213 NONAME ; int CApaWindowGroupName::RespondsToShutdownEvent(void) const + ?RespondsToSwitchFilesEvent@CApaWindowGroupName@@QBEHXZ @ 214 NONAME ; int CApaWindowGroupName::RespondsToSwitchFilesEvent(void) const + ?RestartScanL@CApaAppList@@QAEXXZ @ 215 NONAME ; void CApaAppList::RestartScanL(void) + ?RestoreL@CApaDoor@@QAEXABVCStreamStore@@VTStreamId@@@Z @ 216 NONAME ; void CApaDoor::RestoreL(class CStreamStore const &, class TStreamId) + ?RollbackNonNativeApplicationsUpdates@RApaLsSession@@QAEHXZ @ 217 NONAME ; int RApaLsSession::RollbackNonNativeApplicationsUpdates(void) + ?ScreenMode@CApaAppViewData@@QBEHXZ @ 218 NONAME ; int CApaAppViewData::ScreenMode(void) const + ?Self@CApaAppList@@SAPAV1@XZ @ 219 NONAME ; class CApaAppList * CApaAppList::Self(void) + ?SendKey@TApaTask@@QAEXABUTKeyEvent@@@Z @ 220 NONAME ; void TApaTask::SendKey(struct TKeyEvent const &) + ?SendKey@TApaTask@@QAEXHH@Z @ 221 NONAME ; void TApaTask::SendKey(int, int) + ?SendMessage@TApaTask@@QAEHVTUid@@ABVTDesC8@@@Z @ 222 NONAME ; int TApaTask::SendMessage(class TUid, class TDesC8 const &) + ?SendSystemEvent@TApaTask@@QAEXW4TApaSystemEvent@@@Z @ 223 NONAME ; void TApaTask::SendSystemEvent(enum TApaSystemEvent) + ?SendToBackground@TApaTask@@QAEXXZ @ 224 NONAME ; void TApaTask::SendToBackground(void) + ?ServiceArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 225 NONAME ; class CBufFlat * CApaAppList::ServiceArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 226 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid) const + ?ServiceImplArrayBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@ABVTDataType@@@Z @ 227 NONAME ; class CBufFlat * CApaAppList::ServiceImplArrayBufferL(class TUid, class TDataType const &) const + ?ServiceOpaqueDataBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@0@Z @ 228 NONAME ; class CBufFlat * CApaAppList::ServiceOpaqueDataBufferL(class TUid, class TUid) const + ?ServiceUidBufferL@CApaAppList@@QBEPAVCBufFlat@@VTUid@@@Z @ 229 NONAME ; class CBufFlat * CApaAppList::ServiceUidBufferL(class TUid) const + ?SetAcceptedConfidence@RApaLsSession@@QAEHH@Z @ 230 NONAME ; int RApaLsSession::SetAcceptedConfidence(int) + ?SetAppIsHiddenL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 231 NONAME ; void CApaRegistrationResourceFileWriter::SetAppIsHiddenL(int) + ?SetAppReady@CApaWindowGroupName@@QAEXH@Z @ 232 NONAME ; void CApaWindowGroupName::SetAppReady(int) + ?SetAppShortCaption@RApaLsSession@@QAEHABVTDesC16@@W4TLanguage@@VTUid@@@Z @ 233 NONAME ; int RApaLsSession::SetAppShortCaption(class TDesC16 const &, enum TLanguage, class TUid) + ?SetAppUid@CApaWindowGroupName@@QAEXVTUid@@@Z @ 234 NONAME ; void CApaWindowGroupName::SetAppUid(class TUid) + ?SetBusy@CApaWindowGroupName@@QAEXH@Z @ 235 NONAME ; void CApaWindowGroupName::SetBusy(int) + ?SetCapability@CApaAppInfoFileWriter@@QAEHABVTDesC8@@@Z @ 236 NONAME ; int CApaAppInfoFileWriter::SetCapability(class TDesC8 const &) + ?SetCaptionL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 237 NONAME ; void CApaWindowGroupName::SetCaptionL(class TDesC16 const &) + ?SetDefaultScreenNumberL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 238 NONAME ; void CApaRegistrationResourceFileWriter::SetDefaultScreenNumberL(int) + ?SetDocNameIsAFile@CApaWindowGroupName@@QAEXH@Z @ 239 NONAME ; void CApaWindowGroupName::SetDocNameIsAFile(int) + ?SetDocNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 240 NONAME ; void CApaWindowGroupName::SetDocNameL(class TDesC16 const &) + ?SetEmbeddabilityL@CApaRegistrationResourceFileWriter@@QAEXW4TEmbeddability@TApaAppCapability@@@Z @ 241 NONAME ; void CApaRegistrationResourceFileWriter::SetEmbeddabilityL(enum TApaAppCapability::TEmbeddability) + ?SetFormatToGlassL@CApaDoor@@QAEXXZ @ 242 NONAME ; void CApaDoor::SetFormatToGlassL(void) + ?SetFormatToIconL@CApaDoor@@QAEXXZ @ 243 NONAME ; void CApaDoor::SetFormatToIconL(void) + ?SetFormatToTemporaryIconL@CApaDoor@@QAEXH@Z @ 244 NONAME ; void CApaDoor::SetFormatToTemporaryIconL(int) + ?SetFsSessionL@RApaLsSession@@SAXAAVRFs@@@Z @ 245 NONAME ; void RApaLsSession::SetFsSessionL(class RFs &) + ?SetGroupNameL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC16@@@Z @ 246 NONAME ; void CApaRegistrationResourceFileWriter::SetGroupNameL(class TDesC16 const &) + ?SetHidden@CApaWindowGroupName@@QAEXH@Z @ 247 NONAME ; void CApaWindowGroupName::SetHidden(int) + ?SetLaunchInBackgroundL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 248 NONAME ; void CApaRegistrationResourceFileWriter::SetLaunchInBackgroundL(int) + ?SetMaskBitmap@CApaMaskedBitmap@@QAEXPAVCFbsBitmap@@@Z @ 249 NONAME ; void CApaMaskedBitmap::SetMaskBitmap(class CFbsBitmap *) + ?SetMaxDataBufSize@RApaLsSession@@QAEHH@Z @ 250 NONAME ; int RApaLsSession::SetMaxDataBufSize(int) + ?SetNotify@RApaLsSession@@QAEXHAAVTRequestStatus@@@Z @ 251 NONAME ; void RApaLsSession::SetNotify(int, class TRequestStatus &) + ?SetOpaqueDataL@CApaRegistrationResourceFileWriter@@QAEXABVTDesC8@@@Z @ 252 NONAME ; void CApaRegistrationResourceFileWriter::SetOpaqueDataL(class TDesC8 const &) + ?SetRespondsToShutdownEvent@CApaWindowGroupName@@QAEXH@Z @ 253 NONAME ; void CApaWindowGroupName::SetRespondsToShutdownEvent(int) + ?SetRespondsToSwitchFilesEvent@CApaWindowGroupName@@QAEXH@Z @ 254 NONAME ; void CApaWindowGroupName::SetRespondsToSwitchFilesEvent(int) + ?SetShortCaptionL@CApaAppData@@QAEXABVTDesC16@@@Z @ 255 NONAME ; void CApaAppData::SetShortCaptionL(class TDesC16 const &) + ?SetSupportsNewFileL@CApaRegistrationResourceFileWriter@@QAEXH@Z @ 256 NONAME ; void CApaRegistrationResourceFileWriter::SetSupportsNewFileL(int) + ?SetSystem@CApaWindowGroupName@@QAEXH@Z @ 257 NONAME ; void CApaWindowGroupName::SetSystem(int) + ?SetUpdatedAppsList@CApaAppList@@QAEXPAVCUpdatedAppsList@@@Z @ 258 NONAME ABSENT ; void CApaAppList::SetUpdatedAppsList(class CUpdatedAppsList *) + ?SetWgId@TApaTask@@QAEXH@Z @ 259 NONAME ; void TApaTask::SetWgId(int) + ?SetWindowGroupName@CApaWindowGroupName@@QAEXPAVHBufC16@@@Z @ 260 NONAME ; void CApaWindowGroupName::SetWindowGroupName(class HBufC16 *) + ?SetWindowGroupName@CApaWindowGroupName@@QBEHAAVRWindowGroup@@@Z @ 261 NONAME ; int CApaWindowGroupName::SetWindowGroupName(class RWindowGroup &) const + ?SetWindowGroupNameL@CApaWindowGroupName@@QAEXABVTDesC16@@@Z @ 262 NONAME ; void CApaWindowGroupName::SetWindowGroupNameL(class TDesC16 const &) + ?ShortCaption@CApaSystemControl@@QBE?AVTPtrC16@@XZ @ 263 NONAME ; class TPtrC16 CApaSystemControl::ShortCaption(void) const + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@@Z @ 264 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@@Z @ 265 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &) + ?StartApp@RApaLsSession@@QAEHABVCApaCommandLine@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 266 NONAME ; int RApaLsSession::StartApp(class CApaCommandLine const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 267 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@ABVTDataType@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 268 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TDataType const &, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHAAVRFile@@VTUid@@AAVTThreadId@@PAVTRequestStatus@@@Z @ 269 NONAME ; int RApaLsSession::StartDocument(class RFile &, class TUid, class TThreadId &, class TRequestStatus *) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@AAVTThreadId@@W4TLaunchType@1@@Z @ 270 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TThreadId &, enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@ABVTDataType@@AAVTThreadId@@W4TLaunchType@1@@Z @ 271 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TDataType const &, class TThreadId &, enum RApaLsSession::TLaunchType) + ?StartDocument@RApaLsSession@@QAEHABVTDesC16@@VTUid@@AAVTThreadId@@W4TLaunchType@1@@Z @ 272 NONAME ; int RApaLsSession::StartDocument(class TDesC16 const &, class TUid, class TThreadId &, enum RApaLsSession::TLaunchType) + ?StartIdleUpdateL@CApaAppList@@QAEXPAVMApaAppListObserver@@@Z @ 273 NONAME ; void CApaAppList::StartIdleUpdateL(class MApaAppListObserver *) + ?StartIdleUpdateL@CApaAppList@@QAEXXZ @ 274 NONAME ; void CApaAppList::StartIdleUpdateL(void) + ?StartupApaServer@@YAHAAVMApaAppStarter@@@Z @ 275 NONAME ; int StartupApaServer(class MApaAppStarter &) + ?StartupApaServerProcess@@YAHXZ @ 276 NONAME ; int StartupApaServerProcess(void) + ?StopScan@CApaAppList@@QAEXH@Z @ 277 NONAME ; void CApaAppList::StopScan(TBool) + ?StoreL@CApaAppInfoFileWriter@@QAEXXZ @ 278 NONAME ; void CApaAppInfoFileWriter::StoreL(void) + ?SwitchCreateFile@TApaTask@@QAEHABVTDesC16@@@Z @ 279 NONAME ; int TApaTask::SwitchCreateFile(class TDesC16 const &) + ?SwitchOpenFile@TApaTask@@QAEHABVTDesC16@@@Z @ 280 NONAME ; int TApaTask::SwitchOpenFile(class TDesC16 const &) + ?TestIconLoaderAndIconArrayL@TIconLoaderAndIconArrayForLeaks@@SAXXZ @ 281 NONAME ; void TIconLoaderAndIconArrayForLeaks::TestIconLoaderAndIconArrayL(void) + ?ThreadId@TApaTask@@QBE?AVTThreadId@@XZ @ 282 NONAME ; class TThreadId TApaTask::ThreadId(void) const + ?Type@CApaSystemControl@@QBE?AVTUid@@XZ @ 283 NONAME ; class TUid CApaSystemControl::Type(void) const + ?Uid@CApaAppViewData@@QBE?AVTUid@@XZ @ 284 NONAME ; class TUid CApaAppViewData::Uid(void) const + ?Uid@TApaAppServiceInfo@@QBE?AVTUid@@XZ @ 285 NONAME ; class TUid TApaAppServiceInfo::Uid(void) const + ?UpdateL@CApaSystemControlList@@QAEXXZ @ 286 NONAME ; void CApaSystemControlList::UpdateL(void) + ?UpdatedAppsList@CApaAppList@@QAEPAVCUpdatedAppsList@@XZ @ 287 NONAME ABSENT ; class CUpdatedAppsList * CApaAppList::UpdatedAppsList(void) + ?Version@RApaLsSession@@QBE?AVTVersion@@XZ @ 288 NONAME ; class TVersion RApaLsSession::Version(void) const + ?Views@CApaAppData@@QBEPAV?$CArrayPtrFlat@VCApaAppViewData@@@@XZ @ 289 NONAME ; class CArrayPtrFlat * CApaAppData::Views(void) const + ?WgId@TApaTask@@QBEHXZ @ 290 NONAME ; int TApaTask::WgId(void) const + ?WindowGroupName@CApaWindowGroupName@@QBE?AVTPtrC16@@XZ @ 291 NONAME ; class TPtrC16 CApaWindowGroupName::WindowGroupName(void) const + ?KMinApplicationStackSize@@3HB @ 292 NONAME ; int const KMinApplicationStackSize + ?CheckAppSecurity@CApaSecurityUtils@@SAHABVTPtrC16@@AAH1@Z @ 293 NONAME ; int CApaSecurityUtils::CheckAppSecurity(class TPtrC16 const &, int &, int &) + ?SetCaptionL@CApaAppData@@QAEXABVTDesC16@@@Z @ 294 NONAME ; void CApaAppData::SetCaptionL(class TDesC16 const &) + ?SetIconsL@CApaAppData@@QAEXABVTDesC16@@H@Z @ 295 NONAME ; void CApaAppData::SetIconsL(class TDesC16 const &, int) + ?TestIconCaptionOverridesL@TIconLoaderAndIconArrayForLeaks@@SAXXZ @ 296 NONAME ; void TIconLoaderAndIconArrayForLeaks::TestIconCaptionOverridesL(void) + ?ForceCommitNonNativeApplicationsUpdatesL@RApaLsSession@@QAEXXZ @ 297 NONAME ; void RApaLsSession::ForceCommitNonNativeApplicationsUpdatesL(void) + ?AppListUpdatePending@CApaAppList@@QAEHXZ @ 298 NONAME ; int CApaAppList::AppListUpdatePending(void) + ?UninstalledAppArray@CApaAppList@@QAEPAV?$CArrayFixFlat@VTUid@@@@XZ @ 299 NONAME ; class CArrayFixFlat * CApaAppList::UninstalledAppArray(void) diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/bwins/apstartu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/bwins/apstartu.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,3 @@ +EXPORTS + ?NewL@CApaAppStart@@SAPAV1@XZ @ 1 NONAME ; class CApaAppStart * CApaAppStart::NewL(void) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APFILE_9_REMOVE_UI_FRAMEWORKS_V1U.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APFILE_9_REMOVE_UI_FRAMEWORKS_V1U.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,101 @@ +EXPORTS + _ZN19CApaAppLocatorProxy16GetAppEntryByUidER12TApaAppEntry4TUid @ 1 NONAME ABSENT + _ZN19CApaAppLocatorProxy21GetAppCapabilityByUidER5TDes84TUid @ 2 NONAME ABSENT + _ZN19CApaAppLocatorProxy4NewLER3RFs @ 3 NONAME ABSENT + _ZN19CApaAppLocatorProxyD0Ev @ 4 NONAME ABSENT + _ZN19CApaAppLocatorProxyD1Ev @ 5 NONAME ABSENT + _ZN19CApaAppLocatorProxyD2Ev @ 6 NONAME ABSENT + _ZN21CApaScanningAppFinder12FindAllAppsLEv @ 7 NONAME ABSENT + _ZN21CApaScanningAppFinder4NewLERK3RFs @ 8 NONAME ABSENT + _ZN21CApaScanningAppFinder5NewLCERK3RFs @ 9 NONAME ABSENT + _ZN21CApaScanningAppFinder5NextLER12TApaAppEntry @ 10 NONAME ABSENT + _ZN21CApaScanningAppFinder8FindAppLERK7TDesC164TUid @ 11 NONAME ABSENT + _ZN21CApaScanningAppFinderD0Ev @ 12 NONAME ABSENT + _ZN21CApaScanningAppFinderD1Ev @ 13 NONAME ABSENT + _ZN21CApaScanningAppFinderD2Ev @ 14 NONAME ABSENT + _ZN25CApaScanningControlFinder12FindAllAppsLEv @ 15 NONAME ABSENT + _ZN25CApaScanningControlFinder4NewLERK3RFs @ 16 NONAME ABSENT + _ZN25CApaScanningControlFinder5NewLCERK3RFs @ 17 NONAME ABSENT + _ZN25CApaScanningControlFinder5NextLER12TApaAppEntry @ 18 NONAME ABSENT + _ZN25CApaScanningControlFinder8FindAppLERK7TDesC164TUid @ 19 NONAME ABSENT + _ZN25CApaScanningControlFinderD0Ev @ 20 NONAME ABSENT + _ZN25CApaScanningControlFinderD1Ev @ 21 NONAME ABSENT + _ZN25CApaScanningControlFinderD2Ev @ 22 NONAME ABSENT + _ZN26CApaScanningFileRecognizer10ConstructLEv @ 23 NONAME + _ZN26CApaScanningFileRecognizer14SetRecognizerLERKNS_11TRecognizerE @ 24 NONAME ABSENT + _ZN26CApaScanningFileRecognizer15RecognizerCountEv @ 25 NONAME + _ZN26CApaScanningFileRecognizer19ScanForRecognizersLEv @ 26 NONAME + _ZN26CApaScanningFileRecognizer23SetRecognizersFromListLERK13CArrayFixFlatINS_11TRecognizerEE @ 27 NONAME ABSENT + _ZN26CApaScanningFileRecognizer4NewLER3RFsP14MApaAppStarter @ 28 NONAME + _ZN26CApaScanningFileRecognizerC1ER3RFsP14MApaAppStarter @ 29 NONAME + _ZN26CApaScanningFileRecognizerC2ER3RFsP14MApaAppStarter @ 30 NONAME + _ZN26CApaScanningFileRecognizerD0Ev @ 31 NONAME + _ZN26CApaScanningFileRecognizerD1Ev @ 32 NONAME + _ZN26CApaScanningFileRecognizerD2Ev @ 33 NONAME + _ZN6Apfile8TempPathEv @ 34 NONAME ABSENT + _ZNK21CApaScanningAppFinder22DefaultAppInfoFileNameEv @ 35 NONAME ABSENT + _ZNK21CApaScanningAppFinder8TempPathEv @ 36 NONAME ABSENT + _ZNK25CApaScanningControlFinder22DefaultAppInfoFileNameEv @ 37 NONAME ABSENT + _ZNK25CApaScanningControlFinder8TempPathEv @ 38 NONAME ABSENT + _ZNK26CApaScanningFileRecognizer13UpdateCounterEv @ 39 NONAME + _ZNK26CApaScanningFileRecognizer16RecognizerListLCEv @ 40 NONAME + _ZNK26CApaScanningFileRecognizerixEi @ 41 NONAME + _ZTI26CApaScanningFileRecognizer @ 42 NONAME ; ## + _ZTV26CApaScanningFileRecognizer @ 43 NONAME ; ## + _ZN26CApaScanningFileRecognizer18SetEcomRecognizerLERKNS_11TRecognizerE @ 44 NONAME + _ZN26CApaScanningFileRecognizer27SetEcomRecognizersFromListLERK13CArrayFixFlatINS_11TRecognizerEE @ 45 NONAME + _ZTI17CApaRecognizerDll @ 46 NONAME ; ## + _ZTI19CApaAppLocatorProxy @ 47 NONAME ABSENT ; ## + _ZTI21CApaScanningAppFinder @ 48 NONAME ABSENT ; ## + _ZTI25CApaScanningControlFinder @ 49 NONAME ABSENT ; ## + _ZTIN26CApaScanningFileRecognizer27CApaBackupOperationObserverE @ 50 NONAME ; ## + _ZTV17CApaRecognizerDll @ 51 NONAME ; ## + _ZTV19CApaAppLocatorProxy @ 52 NONAME ABSENT ; ## + _ZTV21CApaScanningAppFinder @ 53 NONAME ABSENT ; ## + _ZTV25CApaScanningControlFinder @ 54 NONAME ABSENT ; ## + _ZTVN26CApaScanningFileRecognizer27CApaBackupOperationObserverE @ 55 NONAME ; ## + _ZN16CApaAppRegFinder12FindAllAppsLEv @ 56 NONAME + _ZN16CApaAppRegFinder4NewLERK3RFs @ 57 NONAME + _ZN16CApaAppRegFinder5NewLCERK3RFs @ 58 NONAME + _ZN16CApaAppRegFinder5NextLER12TApaAppEntry @ 59 NONAME ABSENT + _ZN16CApaAppRegFinder5NextLER12TApaAppEntryRK13RPointerArrayI7HBufC16E @ 60 NONAME + _ZNK16CApaAppRegFinder8TempPathEv @ 61 NONAME ABSENT + _ZTI16CApaAppRegFinder @ 62 NONAME ; ## + _ZTV16CApaAppRegFinder @ 63 NONAME ; ## + _ZN17CAppLaunchChecker10Reserved_1Ev @ 64 NONAME + _ZN17CAppLaunchChecker10Reserved_2Ev @ 65 NONAME + _ZN17CAppLaunchChecker10Reserved_3Ev @ 66 NONAME + _ZN17CAppLaunchCheckerD0Ev @ 67 NONAME + _ZN17CAppLaunchCheckerD1Ev @ 68 NONAME + _ZN17CAppLaunchCheckerD2Ev @ 69 NONAME + _ZN28CApaScanningRuleBasedPlugIns4NewLEv @ 70 NONAME + _ZNK28CApaScanningRuleBasedPlugInsixEi @ 71 NONAME + _ZTI16CApaRuleBasedDll @ 72 NONAME ; ## + _ZTI17CAppLaunchChecker @ 73 NONAME ; ## + _ZTV16CApaRuleBasedDll @ 74 NONAME ; ## + _ZTV17CAppLaunchChecker @ 75 NONAME ; ## + _ZN28CApaScanningRuleBasedPlugInsD0Ev @ 76 NONAME + _ZN28CApaScanningRuleBasedPlugInsD1Ev @ 77 NONAME + _ZN28CApaScanningRuleBasedPlugInsD2Ev @ 78 NONAME + _ZTI28CApaScanningRuleBasedPlugIns @ 79 NONAME ; ## + _ZTV28CApaScanningRuleBasedPlugIns @ 80 NONAME ; ## + _ZN28CApaScanningRuleBasedPlugIns24ScanForRuleBasedPlugInsLEv @ 81 NONAME + _ZNK28CApaScanningRuleBasedPlugIns19ImplementationCountEv @ 82 NONAME + _ZN14CAppSidChecker18SetRescanCallBackLERK9TCallBack @ 83 NONAME + _ZN14CAppSidChecker9reserved1Ev @ 84 NONAME + _ZN14CAppSidChecker9reserved2Ev @ 85 NONAME + _ZN14CAppSidChecker9reserved3Ev @ 86 NONAME + _ZN14CAppSidCheckerD0Ev @ 87 NONAME + _ZN14CAppSidCheckerD1Ev @ 88 NONAME + _ZN14CAppSidCheckerD2Ev @ 89 NONAME + _ZTI14CAppSidChecker @ 90 NONAME ; ## + _ZTV14CAppSidChecker @ 91 NONAME ; ## + X @ 92 NONAME ABSENT + X @ 93 NONAME ABSENT + _ZN23CApaAppUnInstallMonitor4NewLEP17CApaAppListServer @ 94 NONAME + _ZN23CApaAppUnInstallMonitor5StartEv @ 95 NONAME + _ZN23CApaAppUnInstallMonitorD0Ev @ 96 NONAME + _ZN23CApaAppUnInstallMonitorD1Ev @ 97 NONAME + _ZN23CApaAppUnInstallMonitorD2Ev @ 98 NONAME + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APFILE_UI_FRAMEWORKSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APFILE_UI_FRAMEWORKSU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,115 @@ +EXPORTS + _ZN19CApaAppLocatorProxy16GetAppEntryByUidER12TApaAppEntry4TUid @ 1 NONAME ABSENT + _ZN19CApaAppLocatorProxy21GetAppCapabilityByUidER5TDes84TUid @ 2 NONAME ABSENT + _ZN19CApaAppLocatorProxy4NewLER3RFs @ 3 NONAME ABSENT + _ZN19CApaAppLocatorProxyD0Ev @ 4 NONAME ABSENT + _ZN19CApaAppLocatorProxyD1Ev @ 5 NONAME ABSENT + _ZN19CApaAppLocatorProxyD2Ev @ 6 NONAME ABSENT + _ZN21CApaScanningAppFinder12FindAllAppsLEv @ 7 NONAME ABSENT + _ZN21CApaScanningAppFinder4NewLERK3RFs @ 8 NONAME ABSENT + _ZN21CApaScanningAppFinder5NewLCERK3RFs @ 9 NONAME ABSENT + _ZN21CApaScanningAppFinder5NextLER12TApaAppEntry @ 10 NONAME ABSENT + _ZN21CApaScanningAppFinder8FindAppLERK7TDesC164TUid @ 11 NONAME ABSENT + _ZN21CApaScanningAppFinderD0Ev @ 12 NONAME ABSENT + _ZN21CApaScanningAppFinderD1Ev @ 13 NONAME ABSENT + _ZN21CApaScanningAppFinderD2Ev @ 14 NONAME ABSENT + _ZN25CApaScanningControlFinder12FindAllAppsLEv @ 15 NONAME ABSENT + _ZN25CApaScanningControlFinder4NewLERK3RFs @ 16 NONAME ABSENT + _ZN25CApaScanningControlFinder5NewLCERK3RFs @ 17 NONAME ABSENT + _ZN25CApaScanningControlFinder5NextLER12TApaAppEntry @ 18 NONAME ABSENT + _ZN25CApaScanningControlFinder8FindAppLERK7TDesC164TUid @ 19 NONAME ABSENT + _ZN25CApaScanningControlFinderD0Ev @ 20 NONAME ABSENT + _ZN25CApaScanningControlFinderD1Ev @ 21 NONAME ABSENT + _ZN25CApaScanningControlFinderD2Ev @ 22 NONAME ABSENT + _ZN26CApaScanningFileRecognizer10ConstructLEv @ 23 NONAME + _ZN26CApaScanningFileRecognizer14SetRecognizerLERKNS_11TRecognizerE @ 24 NONAME ABSENT + _ZN26CApaScanningFileRecognizer15RecognizerCountEv @ 25 NONAME + _ZN26CApaScanningFileRecognizer19ScanForRecognizersLEv @ 26 NONAME + _ZN26CApaScanningFileRecognizer23SetRecognizersFromListLERK13CArrayFixFlatINS_11TRecognizerEE @ 27 NONAME ABSENT + _ZN26CApaScanningFileRecognizer4NewLER3RFsP14MApaAppStarter @ 28 NONAME + _ZN26CApaScanningFileRecognizerC1ER3RFsP14MApaAppStarter @ 29 NONAME + _ZN26CApaScanningFileRecognizerC2ER3RFsP14MApaAppStarter @ 30 NONAME + _ZN26CApaScanningFileRecognizerD0Ev @ 31 NONAME + _ZN26CApaScanningFileRecognizerD1Ev @ 32 NONAME + _ZN26CApaScanningFileRecognizerD2Ev @ 33 NONAME + _ZN6Apfile8TempPathEv @ 34 NONAME ABSENT + _ZNK21CApaScanningAppFinder22DefaultAppInfoFileNameEv @ 35 NONAME ABSENT + _ZNK21CApaScanningAppFinder8TempPathEv @ 36 NONAME ABSENT + _ZNK25CApaScanningControlFinder22DefaultAppInfoFileNameEv @ 37 NONAME ABSENT + _ZNK25CApaScanningControlFinder8TempPathEv @ 38 NONAME ABSENT + _ZNK26CApaScanningFileRecognizer13UpdateCounterEv @ 39 NONAME + _ZNK26CApaScanningFileRecognizer16RecognizerListLCEv @ 40 NONAME + _ZNK26CApaScanningFileRecognizerixEi @ 41 NONAME + _ZTI26CApaScanningFileRecognizer @ 42 NONAME ; ## + _ZTV26CApaScanningFileRecognizer @ 43 NONAME ; ## + _ZN26CApaScanningFileRecognizer18SetEcomRecognizerLERKNS_11TRecognizerE @ 44 NONAME + _ZN26CApaScanningFileRecognizer27SetEcomRecognizersFromListLERK13CArrayFixFlatINS_11TRecognizerEE @ 45 NONAME + _ZTI17CApaRecognizerDll @ 46 NONAME ; ## + _ZTI19CApaAppLocatorProxy @ 47 NONAME ABSENT ; ## + _ZTI21CApaScanningAppFinder @ 48 NONAME ABSENT ; ## + _ZTI25CApaScanningControlFinder @ 49 NONAME ABSENT ; ## + _ZTIN26CApaScanningFileRecognizer27CApaBackupOperationObserverE @ 50 NONAME ; ## + _ZTV17CApaRecognizerDll @ 51 NONAME ; ## + _ZTV19CApaAppLocatorProxy @ 52 NONAME ABSENT ; ## + _ZTV21CApaScanningAppFinder @ 53 NONAME ABSENT ; ## + _ZTV25CApaScanningControlFinder @ 54 NONAME ABSENT ; ## + _ZTVN26CApaScanningFileRecognizer27CApaBackupOperationObserverE @ 55 NONAME ; ## + _ZN16CApaAppRegFinder12FindAllAppsLEv @ 56 NONAME + _ZN16CApaAppRegFinder4NewLERK3RFs @ 57 NONAME + _ZN16CApaAppRegFinder5NewLCERK3RFs @ 58 NONAME + _ZN16CApaAppRegFinder5NextLER12TApaAppEntry @ 59 NONAME ABSENT + _ZN16CApaAppRegFinder5NextLER12TApaAppEntryRK13RPointerArrayI7HBufC16E @ 60 NONAME + _ZNK16CApaAppRegFinder8TempPathEv @ 61 NONAME ABSENT + _ZTI16CApaAppRegFinder @ 62 NONAME ; ## + _ZTV16CApaAppRegFinder @ 63 NONAME ; ## + _ZN17CAppLaunchChecker10Reserved_1Ev @ 64 NONAME + _ZN17CAppLaunchChecker10Reserved_2Ev @ 65 NONAME + _ZN17CAppLaunchChecker10Reserved_3Ev @ 66 NONAME + _ZN17CAppLaunchCheckerD0Ev @ 67 NONAME + _ZN17CAppLaunchCheckerD1Ev @ 68 NONAME + _ZN17CAppLaunchCheckerD2Ev @ 69 NONAME + _ZN28CApaScanningRuleBasedPlugIns4NewLEv @ 70 NONAME + _ZNK28CApaScanningRuleBasedPlugInsixEi @ 71 NONAME + _ZTI16CApaRuleBasedDll @ 72 NONAME ; ## + _ZTI17CAppLaunchChecker @ 73 NONAME ; ## + _ZTV16CApaRuleBasedDll @ 74 NONAME ; ## + _ZTV17CAppLaunchChecker @ 75 NONAME ; ## + _ZN28CApaScanningRuleBasedPlugInsD0Ev @ 76 NONAME + _ZN28CApaScanningRuleBasedPlugInsD1Ev @ 77 NONAME + _ZN28CApaScanningRuleBasedPlugInsD2Ev @ 78 NONAME + _ZTI28CApaScanningRuleBasedPlugIns @ 79 NONAME ; ## + _ZTV28CApaScanningRuleBasedPlugIns @ 80 NONAME ; ## + _ZN28CApaScanningRuleBasedPlugIns24ScanForRuleBasedPlugInsLEv @ 81 NONAME + _ZNK28CApaScanningRuleBasedPlugIns19ImplementationCountEv @ 82 NONAME + _ZN14CAppSidChecker18SetRescanCallBackLERK9TCallBack @ 83 NONAME + _ZN14CAppSidChecker9reserved1Ev @ 84 NONAME + _ZN14CAppSidChecker9reserved2Ev @ 85 NONAME + _ZN14CAppSidChecker9reserved3Ev @ 86 NONAME + _ZN14CAppSidCheckerD0Ev @ 87 NONAME + _ZN14CAppSidCheckerD1Ev @ 88 NONAME + _ZN14CAppSidCheckerD2Ev @ 89 NONAME + _ZTI14CAppSidChecker @ 90 NONAME ; ## + _ZTV14CAppSidChecker @ 91 NONAME ; ## + _ZNK16CApaAppRegFinder9DriveListEv @ 92 NONAME + _ZN16CApaAppRegFinder26FindAllRemovableMediaAppsLEv @ 93 NONAME + _ZN23CApaAppUnInstallMonitor4NewLEP17CApaAppListServer @ 94 NONAME + _ZN23CApaAppUnInstallMonitor5StartEv @ 95 NONAME + _ZN23CApaAppUnInstallMonitorD0Ev @ 96 NONAME + _ZN23CApaAppUnInstallMonitorD1Ev @ 97 NONAME + _ZN23CApaAppUnInstallMonitorD2Ev @ 98 NONAME + _ZN21CApfMimeContentPolicy12IsClosedTypeERK7TDesC16 @ 99 NONAME + _ZN21CApfMimeContentPolicy13IsClosedFileLER5RFile @ 100 NONAME + _ZN21CApfMimeContentPolicy13IsClosedFileLERK7TDesC16 @ 101 NONAME + _ZN21CApfMimeContentPolicy14IsDRMEnvelopeLER5RFile @ 102 NONAME + _ZN21CApfMimeContentPolicy14IsDRMEnvelopeLERK7TDesC16 @ 103 NONAME + _ZN21CApfMimeContentPolicy17IsClosedExtensionERK7TDesC16 @ 104 NONAME + _ZN21CApfMimeContentPolicy4NewLER3RFs @ 105 NONAME + _ZN21CApfMimeContentPolicy4NewLEv @ 106 NONAME + _ZN21CApfMimeContentPolicy5NewLCER3RFs @ 107 NONAME + _ZN21CApfMimeContentPolicy5NewLCEv @ 108 NONAME + _ZN21CApfMimeContentPolicyD0Ev @ 109 NONAME + _ZN21CApfMimeContentPolicyD1Ev @ 110 NONAME + _ZN21CApfMimeContentPolicyD2Ev @ 111 NONAME + _ZTI21CApfMimeContentPolicy @ 112 NONAME + _ZTV21CApfMimeContentPolicy @ 113 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1U.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1U.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,338 @@ +EXPORTS + _ZN11CApaAppData11GetIconInfoERiS0_ @ 1 NONAME + _ZN11CApaAppData16CanUseScreenModeEi @ 2 NONAME + _ZN11CApaAppList16StartIdleUpdateLEP19MApaAppListObserver @ 3 NONAME + _ZN11CApaAppList16StartIdleUpdateLEv @ 4 NONAME + _ZN11CApaAppList4NewLER3RFsP13CApaAppFinder @ 5 NONAME + _ZN11CApaAppList6PurgeLEv @ 6 NONAME + _ZN11CApaAppList7UpdateLEv @ 7 NONAME + _ZN11CApaAppList9InitListLEP19MApaAppListObserver @ 8 NONAME + _ZN11CApaAppListD0Ev @ 9 NONAME + _ZN11CApaAppListD1Ev @ 10 NONAME + _ZN11CApaAppListD2Ev @ 11 NONAME + _ZN12TApaTaskList10CycleTasksE4TUidNS_15TCycleDirectionE @ 12 NONAME + _ZN12TApaTaskList7FindAppE4TUid @ 13 NONAME + _ZN12TApaTaskList7FindAppERK7TDesC16 @ 14 NONAME + _ZN12TApaTaskList7FindDocERK7TDesC16 @ 15 NONAME + _ZN12TApaTaskList9FindByPosEi @ 16 NONAME + _ZN12TApaTaskListC1ER10RWsSession @ 17 NONAME + _ZN12TApaTaskListC2ER10RWsSession @ 18 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 19 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16R9TThreadIdNS_11TLaunchTypeE @ 20 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16RK9TDataTypeR9TThreadIdNS_11TLaunchTypeE @ 21 NONAME + _ZN13RApaLsSession14CreateDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 22 NONAME + _ZN13RApaLsSession17SetMaxDataBufSizeEi @ 23 NONAME + _ZN13RApaLsSession21SetAcceptedConfidenceEi @ 24 NONAME + _ZN13RApaLsSession7ConnectEv @ 25 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLine @ 26 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadId @ 27 NONAME + _ZN13RApaLsSessionC1Ev @ 28 NONAME + _ZN13RApaLsSessionC2Ev @ 29 NONAME + _ZN16AppInfoFileUtils14GetAifFileNameERK3RFsR6TDes16 @ 30 NONAME ABSENT + _ZN16CApaMaskedBitmap12InternalizeLER11RReadStream @ 31 NONAME + _ZN16CApaMaskedBitmap13SetMaskBitmapEP10CFbsBitmap @ 32 NONAME + _ZN16CApaMaskedBitmap4NewLEPS_ @ 33 NONAME + _ZN16CApaMaskedBitmap5NewLCEv @ 34 NONAME + _ZN16CApaMaskedBitmapD0Ev @ 35 NONAME + _ZN16CApaMaskedBitmapD1Ev @ 36 NONAME + _ZN16CApaMaskedBitmapD2Ev @ 37 NONAME + _ZN17CApaSystemControl7CreateLEv @ 38 NONAME + _ZN18TApaPictureFactoryC1EP11CApaProcess @ 39 NONAME + _ZN18TApaPictureFactoryC2EP11CApaProcess @ 40 NONAME + _ZN19CApaAppListNotifier4NewLEP23MApaAppListServObserverN7CActive9TPriorityE @ 41 NONAME + _ZN19CApaAppListNotifierD0Ev @ 42 NONAME + _ZN19CApaAppListNotifierD1Ev @ 43 NONAME + _ZN19CApaAppListNotifierD2Ev @ 44 NONAME + _ZN19CApaWindowGroupName11SetAppReadyEi @ 45 NONAME + _ZN19CApaWindowGroupName11SetCaptionLERK7TDesC16 @ 46 NONAME + _ZN19CApaWindowGroupName11SetDocNameLERK7TDesC16 @ 47 NONAME + _ZN19CApaWindowGroupName12FindByAppUidE4TUidR10RWsSessionRi @ 48 NONAME + _ZN19CApaWindowGroupName13FindByCaptionERK7TDesC16R10RWsSessionRi @ 49 NONAME + _ZN19CApaWindowGroupName13FindByDocNameERK7TDesC16R10RWsSessionRi @ 50 NONAME + _ZN19CApaWindowGroupName17SetDocNameIsAFileEi @ 51 NONAME + _ZN19CApaWindowGroupName18ConstructFromWgIdLEi @ 52 NONAME + _ZN19CApaWindowGroupName18SetWindowGroupNameEP7HBufC16 @ 53 NONAME + _ZN19CApaWindowGroupName19SetWindowGroupNameLERK7TDesC16 @ 54 NONAME + _ZN19CApaWindowGroupName26SetRespondsToShutdownEventEi @ 55 NONAME + _ZN19CApaWindowGroupName29SetRespondsToSwitchFilesEventEi @ 56 NONAME + _ZN19CApaWindowGroupName3NewERK10RWsSessionP7HBufC16 @ 57 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSession @ 58 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessionRK7TDesC16 @ 59 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessioni @ 60 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSession @ 61 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessionRK7TDesC16 @ 62 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessioni @ 63 NONAME + _ZN19CApaWindowGroupName6HiddenEv @ 64 NONAME + _ZN19CApaWindowGroupName7SetBusyEi @ 65 NONAME + _ZN19CApaWindowGroupName9SetAppUidE4TUid @ 66 NONAME + _ZN19CApaWindowGroupName9SetHiddenEi @ 67 NONAME + _ZN19CApaWindowGroupName9SetSystemEi @ 68 NONAME + _ZN19CApaWindowGroupNameD0Ev @ 69 NONAME + _ZN19CApaWindowGroupNameD1Ev @ 70 NONAME + _ZN19CApaWindowGroupNameD2Ev @ 71 NONAME + _ZN21CApaAppInfoFileReader12StretchDrawLEP10CFbsBitmapS1_5TSize @ 72 NONAME ABSENT + _ZN21CApaAppInfoFileReader19CreateMaskedBitmapLEi @ 73 NONAME ABSENT + _ZN21CApaAppInfoFileReader4NewLER3RFsRK7TDesC164TUid @ 74 NONAME ABSENT + _ZN21CApaAppInfoFileReader5NewLCER3RFsRK7TDesC164TUid @ 75 NONAME ABSENT + _ZN21CApaAppInfoFileReader8CaptionLE9TLanguage @ 76 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD0Ev @ 77 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD1Ev @ 78 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD2Ev @ 79 NONAME ABSENT + _ZN21CApaAppInfoFileWriter10StoreViewLE4TUid @ 80 NONAME ABSENT + _ZN21CApaAppInfoFileWriter11AddCaptionLE9TLanguageRK7TDesC16 @ 81 NONAME ABSENT + _ZN21CApaAppInfoFileWriter12AddDataTypeLERK21TDataTypeWithPriority @ 82 NONAME ABSENT + _ZN21CApaAppInfoFileWriter12AddViewIconLER16CApaMaskedBitmap4TUid @ 83 NONAME ABSENT + _ZN21CApaAppInfoFileWriter13AddOwnedFileLERK7TDesC16 @ 84 NONAME ABSENT + _ZN21CApaAppInfoFileWriter13SetCapabilityERK6TDesC8 @ 85 NONAME ABSENT + _ZN21CApaAppInfoFileWriter15AddViewCaptionLE9TLanguageRK7TDesC164TUid @ 86 NONAME ABSENT + _ZN21CApaAppInfoFileWriter5NewLCER3RFsRK7TDesC164TUid @ 87 NONAME ABSENT + _ZN21CApaAppInfoFileWriter6StoreLEv @ 88 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddIconLER16CApaMaskedBitmap @ 89 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddIconLERK7TDesC16 @ 90 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddViewLE4TUid @ 91 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddViewLE4TUidi @ 92 NONAME ABSENT + _ZN21CApaAppInfoFileWriterD0Ev @ 93 NONAME ABSENT + _ZN21CApaAppInfoFileWriterD1Ev @ 94 NONAME ABSENT + _ZN21CApaAppInfoFileWriterD2Ev @ 95 NONAME ABSENT + _ZN21CApaSystemControlList4NewLER3RFsR13CApaAppFinderRK7TDesC16 @ 96 NONAME ABSENT + _ZN21CApaSystemControlList7UpdateLEv @ 97 NONAME + _ZN21CApaSystemControlListD0Ev @ 98 NONAME + _ZN21CApaSystemControlListD1Ev @ 99 NONAME + _ZN21CApaSystemControlListD2Ev @ 100 NONAME + _ZN8CApaDoor16SetFormatToIconLEv @ 101 NONAME + _ZN8CApaDoor17SetFormatToGlassLEv @ 102 NONAME + _ZN8CApaDoor25SetFormatToTemporaryIconLEi @ 103 NONAME + _ZN8CApaDoor4NewLER3RFsR12CApaDocumentRK5TSize @ 104 NONAME + _ZN8CApaDoor4NewLER3RFsRK12CStreamStore9TStreamIdR11CApaProcess @ 105 NONAME + _ZN8CApaDoor5NewLCER3RFsR12CApaDocumentRK5TSize @ 106 NONAME + _ZN8CApaDoor8RestoreLERK12CStreamStore9TStreamId @ 107 NONAME + _ZN8CApaDoor9DocumentLEi @ 108 NONAME + _ZN8CApaDoorD0Ev @ 109 NONAME + _ZN8CApaDoorD1Ev @ 110 NONAME + _ZN8CApaDoorD2Ev @ 111 NONAME + _ZN8TApaTask11SendMessageE4TUidRK6TDesC8 @ 112 NONAME + _ZN8TApaTask14SwitchOpenFileERK7TDesC16 @ 113 NONAME + _ZN8TApaTask15SendSystemEventE15TApaSystemEvent @ 114 NONAME + _ZN8TApaTask16SendToBackgroundEv @ 115 NONAME + _ZN8TApaTask16SwitchCreateFileERK7TDesC16 @ 116 NONAME + _ZN8TApaTask17BringToForegroundEv @ 117 NONAME + _ZN8TApaTask7EndTaskEv @ 118 NONAME + _ZN8TApaTask7SendKeyERK9TKeyEvent @ 119 NONAME + _ZN8TApaTask7SendKeyEii @ 120 NONAME + _ZN8TApaTask7SetWgIdEi @ 121 NONAME + _ZN8TApaTask8KillTaskEv @ 122 NONAME + _ZN8TApaTaskC1ER10RWsSession @ 123 NONAME + _ZN8TApaTaskC2ER10RWsSession @ 124 NONAME + _ZNK11CApaAppData10CapabilityER5TDes8 @ 125 NONAME + _ZNK11CApaAppData10IconSizesLEv @ 126 NONAME + _ZNK11CApaAppData10OwnedFilesEv @ 127 NONAME + _ZNK11CApaAppData4IconE5TSize @ 128 NONAME + _ZNK11CApaAppData4IconEi @ 129 NONAME + _ZNK11CApaAppData5ViewsEv @ 130 NONAME + _ZNK11CApaAppData8AppEntryEv @ 131 NONAME + _ZNK11CApaAppData8DataTypeERK9TDataType @ 132 NONAME + _ZNK11CApaAppList12AppDataByUidE4TUid @ 133 NONAME + _ZNK11CApaAppList13UpdateCounterEv @ 134 NONAME + _ZNK11CApaAppList19IsFirstScanCompleteEv @ 135 NONAME + _ZNK11CApaAppList20IsIdleUpdateCompleteEv @ 136 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataType @ 137 NONAME + _ZNK11CApaAppList5CountEv @ 138 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppData @ 139 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppDatai @ 140 NONAME + _ZNK11CApaAppList8FirstAppEi @ 141 NONAME + _ZNK11CApaAppList8FirstAppEv @ 142 NONAME + _ZNK13RApaLsSession10GetAllAppsEi @ 143 NONAME + _ZNK13RApaLsSession10GetAllAppsEv @ 144 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUid5TSizeR16CApaMaskedBitmap @ 145 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidiR16CApaMaskedBitmap @ 146 NONAME + _ZNK13RApaLsSession10GetAppInfoER11TApaAppInfo4TUid @ 147 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfo @ 148 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfoi @ 149 NONAME + _ZNK13RApaLsSession11GetAppViewsER13CArrayFixFlatI15TApaAppViewInfoE4TUid @ 150 NONAME + _ZNK13RApaLsSession13RecognizeDataERK7TDesC16RK6TDesC8R22TDataRecognitionResult @ 151 NONAME + _ZNK13RApaLsSession14AppForDataTypeERK9TDataTypeR4TUid @ 152 NONAME + _ZNK13RApaLsSession14AppForDocumentERK7TDesC16R4TUidR9TDataType @ 153 NONAME + _ZNK13RApaLsSession14GetAppInfo_7_0ER15TApaAppInfo_7_04TUid @ 154 NONAME ABSENT + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RK5TSizeR16CApaMaskedBitmap @ 155 NONAME + _ZNK13RApaLsSession14GetNextApp_7_0ER15TApaAppInfo_7_0 @ 156 NONAME ABSENT + _ZNK13RApaLsSession14GetNextApp_7_0ER15TApaAppInfo_7_0i @ 157 NONAME ABSENT + _ZNK13RApaLsSession15GetAppIconSizesE4TUidR13CArrayFixFlatI5TSizeE @ 158 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilter @ 159 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilteri @ 160 NONAME + _ZNK13RApaLsSession16GetAppCapabilityER5TDes84TUid @ 161 NONAME + _ZNK13RApaLsSession16GetAppOwnedFilesER12CDesC16Array4TUid @ 162 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEi @ 163 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEv @ 164 NONAME + _ZNK13RApaLsSession17GetMaxDataBufSizeERi @ 165 NONAME + _ZNK13RApaLsSession18EmbeddableAppCountERi @ 166 NONAME + _ZNK13RApaLsSession21GetAcceptedConfidenceERi @ 167 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK7TDesC16RK6TDesC8RK9TDataTypeRi @ 168 NONAME + _ZNK13RApaLsSession22GetSupportedDataTypesLER13CArrayFixFlatI9TDataTypeE @ 169 NONAME + _ZNK13RApaLsSession23NumberOfOwnDefinedIconsE4TUidRi @ 170 NONAME + _ZNK13RApaLsSession7VersionEv @ 171 NONAME + _ZNK13RApaLsSession8AppCountERi @ 172 NONAME + _ZNK13RApaLsSession9IsProgramERK7TDesC16Ri @ 173 NONAME + _ZNK15CApaAIFViewData10ScreenModeEv @ 174 NONAME ABSENT + _ZNK15CApaAIFViewData12IconByIndexLEi @ 175 NONAME ABSENT + _ZNK15CApaAIFViewData13NumberOfIconsEv @ 176 NONAME ABSENT + _ZNK15CApaAIFViewData7ViewUidEv @ 177 NONAME ABSENT + _ZNK15CApaAIFViewData8CaptionLE9TLanguage @ 178 NONAME ABSENT + _ZNK15CApaAppViewData10IconSizesLEv @ 179 NONAME + _ZNK15CApaAppViewData10ScreenModeEv @ 180 NONAME + _ZNK15CApaAppViewData3UidEv @ 181 NONAME + _ZNK15CApaAppViewData4IconERK5TSize @ 182 NONAME + _ZNK16CApaMaskedBitmap12ExternalizeLER12RWriteStream @ 183 NONAME + _ZNK16CApaMaskedBitmap4MaskEv @ 184 NONAME + _ZNK17CApaSystemControl12ShortCaptionEv @ 185 NONAME + _ZNK17CApaSystemControl4IconEv @ 186 NONAME + _ZNK17CApaSystemControl4TypeEv @ 187 NONAME + _ZNK17CApaSystemControl7CaptionEv @ 188 NONAME + _ZNK17CApaSystemControl8FileNameEv @ 189 NONAME + _ZNK18TApaPictureFactory11NewPictureLER14TPictureHeaderRK12CStreamStore @ 190 NONAME + _ZNK19CApaWindowGroupName10IsAppReadyEv @ 191 NONAME + _ZNK19CApaWindowGroupName14DocNameIsAFileEv @ 192 NONAME + _ZNK19CApaWindowGroupName15WindowGroupNameEv @ 193 NONAME + _ZNK19CApaWindowGroupName18SetWindowGroupNameER12RWindowGroup @ 194 NONAME + _ZNK19CApaWindowGroupName23RespondsToShutdownEventEv @ 195 NONAME + _ZNK19CApaWindowGroupName26RespondsToSwitchFilesEventEv @ 196 NONAME + _ZNK19CApaWindowGroupName6AppUidEv @ 197 NONAME + _ZNK19CApaWindowGroupName6IsBusyEv @ 198 NONAME + _ZNK19CApaWindowGroupName7CaptionEv @ 199 NONAME + _ZNK19CApaWindowGroupName7DocNameEv @ 200 NONAME + _ZNK19CApaWindowGroupName8IsSystemEv @ 201 NONAME + _ZNK21CApaAppInfoFileReader10CapabilityER5TDes8 @ 202 NONAME ABSENT + _ZNK21CApaAppInfoFileReader14GetOwnedFilesLER12CDesC16Array @ 203 NONAME ABSENT + _ZNK21CApaAppInfoFileReader15NumberOfBitmapsEv @ 204 NONAME ABSENT + _ZNK21CApaAppInfoFileReader19DataTypesSupportedLER9CArrayFixI21TDataTypeWithPriorityE @ 205 NONAME ABSENT + _ZNK21CApaAppInfoFileReader9GetViewsLER9CArrayPtrI15CApaAIFViewDataE @ 206 NONAME ABSENT + _ZNK21CApaSystemControlList5CountEv @ 207 NONAME + _ZNK21CApaSystemControlList5IndexE4TUid @ 208 NONAME + _ZNK21CApaSystemControlList7ControlE4TUid @ 209 NONAME + _ZNK21CApaSystemControlList7ControlEi @ 210 NONAME + _ZNK8CApaDoor7AppUidLEv @ 211 NONAME + _ZNK8TApaTask4WgIdEv @ 212 NONAME + _ZNK8TApaTask6ExistsEv @ 213 NONAME + _ZNK8TApaTask8ThreadIdEv @ 214 NONAME + _ZTI18TApaPictureFactory @ 215 NONAME ; ## + _ZTV18TApaPictureFactory @ 216 NONAME ; ## + _ZTI11CApaAppData @ 217 NONAME ; ## + _ZTI11CApaAppList @ 218 NONAME ; ## + _ZTI12CApaAppEntry @ 219 NONAME ; ## + _ZTI14CApaAIFCaption @ 220 NONAME ABSENT ; ## + _ZTI15CApaAIFViewData @ 221 NONAME ABSENT ; ## + _ZTI15CApaAppInfoFile @ 222 NONAME ABSENT ; ## + _ZTI15CApaAppViewData @ 223 NONAME ; ## + _ZTI15CApaIconPicture @ 224 NONAME ; ## + _ZTI16CApaMaskedBitmap @ 225 NONAME ; ## + _ZTI16TDesCArrayFiller @ 226 NONAME ; ## + _ZTI16TSizeArrayFiller @ 227 NONAME ; ## + _ZTI17CApaSystemControl @ 228 NONAME ; ## + _ZTI19CApaAppListNotifier @ 229 NONAME ; ## + _ZTI19CApaWindowGroupName @ 230 NONAME ; ## + _ZTI20TViewDataArrayFiller @ 231 NONAME ; ## + _ZTI21CApaAppInfoFileReader @ 232 NONAME ABSENT ; ## + _ZTI21CApaAppInfoFileWriter @ 233 NONAME ABSENT ; ## + _ZTI21CApaSystemControlList @ 234 NONAME ; ## + _ZTI7HBufBuf @ 235 NONAME ; ## + _ZTI8CApaDoor @ 236 NONAME ; ## + _ZTV11CApaAppData @ 237 NONAME ; ## + _ZTV11CApaAppList @ 238 NONAME ; ## + _ZTV12CApaAppEntry @ 239 NONAME ; ## + _ZTV14CApaAIFCaption @ 240 NONAME ABSENT ; ## + _ZTV15CApaAIFViewData @ 241 NONAME ABSENT ; ## + _ZTV15CApaAppInfoFile @ 242 NONAME ABSENT ; ## + _ZTV15CApaAppViewData @ 243 NONAME ; ## + _ZTV15CApaIconPicture @ 244 NONAME ; ## + _ZTV16CApaMaskedBitmap @ 245 NONAME ; ## + _ZTV16TDesCArrayFiller @ 246 NONAME ; ## + _ZTV16TSizeArrayFiller @ 247 NONAME ; ## + _ZTV17CApaSystemControl @ 248 NONAME ; ## + _ZTV19CApaAppListNotifier @ 249 NONAME ; ## + _ZTV19CApaWindowGroupName @ 250 NONAME ; ## + _ZTV20TViewDataArrayFiller @ 251 NONAME ; ## + _ZTV21CApaAppInfoFileReader @ 252 NONAME ABSENT ; ## + _ZTV21CApaAppInfoFileWriter @ 253 NONAME ABSENT ; ## + _ZTV21CApaSystemControlList @ 254 NONAME ; ## + _ZTV7HBufBuf @ 255 NONAME ; ## + _ZTV8CApaDoor @ 256 NONAME ; ## + _ZN11CApaAppList4NewLER3RFsP13CApaAppFinderP16CApaAppRegFinder @ 257 NONAME + _ZNK11CApaAppData12IconFileNameEv @ 258 NONAME + _ZNK11CApaAppData14NonMbmIconFileEv @ 259 NONAME + _ZNK11CApaAppData19DefaultScreenNumberEv @ 260 NONAME + _ZNK11CApaAppData20RegistrationFileUsedEv @ 261 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidRP7HBufC16 @ 262 NONAME + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RP7HBufC16 @ 263 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjj @ 264 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjji @ 265 NONAME + _ZNK15CApaAppViewData12IconFileNameEv @ 266 NONAME + _ZNK15CApaAppViewData14NonMbmIconFileEv @ 267 NONAME + _ZTI17CApaAppInfoReader @ 268 NONAME ; ## + _ZTI19CApaAppInfoReaderV1 @ 269 NONAME ABSENT ; ## + _ZTI19CApaAppInfoReaderV2 @ 270 NONAME ; ## + _ZTV17CApaAppInfoReader @ 271 NONAME ; ## + _ZTV19CApaAppInfoReaderV1 @ 272 NONAME ABSENT ; ## + _ZTV19CApaAppInfoReaderV2 @ 273 NONAME ; ## + _Z16StartupApaServerR14MApaAppStarter @ 274 NONAME + _Z23StartupApaServerProcessv @ 275 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType @ 276 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypes4TUid @ 277 NONAME + _ZN13RApaLsSession25InsertDataMappingIfHigherERK9TDataTypes4TUidRi @ 278 NONAME + _ZNK11CApaAppData19ApplicationLanguageEv @ 279 NONAME + _ZNK13RApaLsSession19ApplicationLanguageE4TUidR9TLanguage @ 280 NONAME + _ZN21CApaSystemControlList4NewLER3RFs @ 281 NONAME + _ZNK11CApaAppData17ImplementsServiceE4TUid @ 282 NONAME + _ZNK11CApaAppList17ServiceUidBufferLE4TUid @ 283 NONAME + _ZNK11CApaAppList19ServiceArrayBufferLE4TUid @ 284 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataTypePK4TUid @ 285 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUid @ 286 NONAME + _ZNK11CApaAppList24ServiceOpaqueDataBufferLE4TUidS0_ @ 287 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUid @ 288 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUidi @ 289 NONAME + _ZNK13RApaLsSession15GetAppServicesLE4TUidR13CArrayFixFlatIS0_E @ 290 NONAME + _ZNK13RApaLsSession16GetAppServicesLCE4TUid @ 291 NONAME + _ZNK13RApaLsSession24AppForDataTypeAndServiceERK9TDataType4TUidRS3_ @ 292 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceER5RFile4TUidRS2_R9TDataType @ 293 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK7TDesC164TUidRS3_R9TDataType @ 294 NONAME + _ZNK13RApaLsSession25GetAppServiceOpaqueDataLCE4TUidS0_ @ 295 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUid @ 296 NONAME + _ZNK18TApaAppServiceInfo10OpaqueDataEv @ 297 NONAME + _ZNK18TApaAppServiceInfo3UidEv @ 298 NONAME + _ZTI30CApaAppServiceInfoArrayWrapper @ 299 NONAME ; ## + _ZTV30CApaAppServiceInfoArrayWrapper @ 300 NONAME ; ## + _ZN13RApaLsSession13StartDocumentER5RFileR9TThreadIdP14TRequestStatus @ 301 NONAME + _ZN21CApaAppInfoFileReader27CreateMaskedBitmapByIndexLCEi @ 302 NONAME ABSENT + _ZNK13RApaLsSession36CancelListPopulationCompleteObserverEv @ 303 NONAME + _ZNK13RApaLsSession38RegisterListPopulationCompleteObserverER14TRequestStatus @ 304 NONAME + _ZN8ApaUtils24HandleAsRegistrationFileERK8TUidType @ 305 NONAME + _ZN13RApaLsSession33RegisterJavaMIDletViaIterimFormatERK7TDesC16R5RFile @ 306 NONAME ABSENT + _ZN22ForJavaMIDletInstaller33CheckInterimFormatFileNotCorruptLER5RFile @ 307 NONAME ABSENT + _ZN13RApaLsSession20DeregisterJavaMIDletERK7TDesC16 @ 308 NONAME ABSENT + _ZN13RApaLsSession13SetFsSessionLER3RFs @ 309 NONAME + _ZN13RApaLsSession13StartDocumentER5RFile4TUidR9TThreadIdP14TRequestStatus @ 310 NONAME + _ZN13RApaLsSession13StartDocumentER5RFileRK9TDataTypeR9TThreadIdP14TRequestStatus @ 311 NONAME + _ZN13RApaLsSession14ClearFsSessionEv @ 312 NONAME + _ZN13RApaLsSession9FsSessionEv @ 313 NONAME + _ZNK13RApaLsSession13RecognizeDataER5RFileR22TDataRecognitionResult @ 314 NONAME + _ZNK13RApaLsSession14AppForDocumentER5RFileR4TUidR9TDataType @ 315 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataER5RFileRK9TDataTypeRi @ 316 NONAME + _ZNK13RApaLsSession19GetPreferredBufSizeERi @ 317 NONAME + _ZN22ForJavaMIDletInstaller18GetJavaMIDletInfoLER3RFsRK7TDesC16RmS5_ @ 318 NONAME ABSENT + _ZN22ForJavaMIDletInstaller28NewInterimFormatFileWriterLCER3RFsRK7TDesC164TUidmi @ 319 NONAME ABSENT + _ZNK18TApaAppServiceInfo9DataTypesEv @ 320 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUidRK9TDataType @ 321 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUidRK9TDataType @ 322 NONAME + _ZN13RApaLsSession5CloseEv @ 323 NONAME + _ZTI22CApaLsSessionExtension @ 324 NONAME ; ## + _ZTV22CApaLsSessionExtension @ 325 NONAME ; ## + _ZN13RApaLsSession28RegisterNonNativeApplicationE4TUidR5RFilePS1_S3_ @ 326 NONAME + _ZN13RApaLsSession30DeregisterNonNativeApplicationE4TUid @ 327 NONAME + _ZN13RApaLsSession32RegisterNonNativeApplicationTypeE4TUidRK7TDesC16 @ 328 NONAME + _ZN13RApaLsSession34DeregisterNonNativeApplicationTypeE4TUid @ 329 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadIdP14TRequestStatus @ 330 NONAME + _ZNK11CApaAppData10OpaqueDataEv @ 331 NONAME + _ZNK11CApaAppData20RegistrationFileNameEv @ 332 NONAME + _ZNK11CApaAppData27LocalisableResourceFileNameEv @ 333 NONAME + _ZNK11CApaAppList17AppDataByFileNameERK7TDesC16 @ 334 NONAME + _ZN13RApaLsSession18SetAppShortCaptionERK7TDesC169TLanguage4TUid @ 335 NONAME + _ZN17CApaSecurityUtils16CheckAppSecurityERK7TPtrC16RiS3_ @ 336 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1_EXCEPT_REMNANT_FOR_JAVA_MIDLET_INSTALLERU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APGRFX_9_REMOVE_UI_FRAMEWORKS_V1_EXCEPT_REMNANT_FOR_JAVA_MIDLET_INSTALLERU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,429 @@ +EXPORTS + _ZNK11CApaAppData11GetIconInfoERiS0_ @ 1 NONAME + _ZN11CApaAppData16CanUseScreenModeEi @ 2 NONAME + _ZN11CApaAppList16StartIdleUpdateLEP19MApaAppListObserver @ 3 NONAME + _ZN11CApaAppList16StartIdleUpdateLEv @ 4 NONAME + _ZN11CApaAppList4NewLER3RFsP16CApaAppRegFinderi @ 5 NONAME + _ZN11CApaAppList6PurgeLEv @ 6 NONAME + _ZN11CApaAppList7UpdateLEv @ 7 NONAME ABSENT + _ZN11CApaAppList9InitListLEP19MApaAppListObserver @ 8 NONAME + _ZN11CApaAppListD0Ev @ 9 NONAME + _ZN11CApaAppListD1Ev @ 10 NONAME + _ZN11CApaAppListD2Ev @ 11 NONAME + _ZN12TApaTaskList10CycleTasksE4TUidNS_15TCycleDirectionE @ 12 NONAME + _ZN12TApaTaskList7FindAppE4TUid @ 13 NONAME + _ZN12TApaTaskList7FindAppERK7TDesC16 @ 14 NONAME + _ZN12TApaTaskList7FindDocERK7TDesC16 @ 15 NONAME + _ZN12TApaTaskList9FindByPosEi @ 16 NONAME + _ZN12TApaTaskListC1ER10RWsSession @ 17 NONAME + _ZN12TApaTaskListC2ER10RWsSession @ 18 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 19 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16R9TThreadIdNS_11TLaunchTypeE @ 20 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16RK9TDataTypeR9TThreadIdNS_11TLaunchTypeE @ 21 NONAME + _ZN13RApaLsSession14CreateDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 22 NONAME + _ZN13RApaLsSession17SetMaxDataBufSizeEi @ 23 NONAME + _ZN13RApaLsSession21SetAcceptedConfidenceEi @ 24 NONAME + _ZN13RApaLsSession7ConnectEv @ 25 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLine @ 26 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadId @ 27 NONAME + _ZN13RApaLsSessionC1Ev @ 28 NONAME + _ZN13RApaLsSessionC2Ev @ 29 NONAME + _ZN16AppInfoFileUtils14GetAifFileNameERK3RFsR6TDes16 @ 30 NONAME ABSENT + _ZN16CApaMaskedBitmap12InternalizeLER11RReadStream @ 31 NONAME + _ZN16CApaMaskedBitmap13SetMaskBitmapEP10CFbsBitmap @ 32 NONAME + _ZN16CApaMaskedBitmap4NewLEPKS_ @ 33 NONAME + _ZN16CApaMaskedBitmap5NewLCEv @ 34 NONAME + _ZN16CApaMaskedBitmapD0Ev @ 35 NONAME + _ZN16CApaMaskedBitmapD1Ev @ 36 NONAME + _ZN16CApaMaskedBitmapD2Ev @ 37 NONAME + _ZN17CApaSystemControl7CreateLEv @ 38 NONAME + _ZN18TApaPictureFactoryC1EP11CApaProcess @ 39 NONAME + _ZN18TApaPictureFactoryC2EP11CApaProcess @ 40 NONAME + _ZN19CApaAppListNotifier4NewLEP23MApaAppListServObserverN7CActive9TPriorityE @ 41 NONAME + _ZN19CApaAppListNotifierD0Ev @ 42 NONAME + _ZN19CApaAppListNotifierD1Ev @ 43 NONAME + _ZN19CApaAppListNotifierD2Ev @ 44 NONAME + _ZN19CApaWindowGroupName11SetAppReadyEi @ 45 NONAME + _ZN19CApaWindowGroupName11SetCaptionLERK7TDesC16 @ 46 NONAME + _ZN19CApaWindowGroupName11SetDocNameLERK7TDesC16 @ 47 NONAME + _ZN19CApaWindowGroupName12FindByAppUidE4TUidR10RWsSessionRi @ 48 NONAME + _ZN19CApaWindowGroupName13FindByCaptionERK7TDesC16R10RWsSessionRi @ 49 NONAME + _ZN19CApaWindowGroupName13FindByDocNameERK7TDesC16R10RWsSessionRi @ 50 NONAME + _ZN19CApaWindowGroupName17SetDocNameIsAFileEi @ 51 NONAME + _ZN19CApaWindowGroupName18ConstructFromWgIdLEi @ 52 NONAME + _ZN19CApaWindowGroupName18SetWindowGroupNameEP7HBufC16 @ 53 NONAME + _ZN19CApaWindowGroupName19SetWindowGroupNameLERK7TDesC16 @ 54 NONAME + _ZN19CApaWindowGroupName26SetRespondsToShutdownEventEi @ 55 NONAME + _ZN19CApaWindowGroupName29SetRespondsToSwitchFilesEventEi @ 56 NONAME + _ZN19CApaWindowGroupName3NewERK10RWsSessionP7HBufC16 @ 57 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSession @ 58 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessionRK7TDesC16 @ 59 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessioni @ 60 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSession @ 61 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessionRK7TDesC16 @ 62 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessioni @ 63 NONAME + _ZNK19CApaWindowGroupName6HiddenEv @ 64 NONAME + _ZN19CApaWindowGroupName7SetBusyEi @ 65 NONAME + _ZN19CApaWindowGroupName9SetAppUidE4TUid @ 66 NONAME + _ZN19CApaWindowGroupName9SetHiddenEi @ 67 NONAME + _ZN19CApaWindowGroupName9SetSystemEi @ 68 NONAME + _ZN19CApaWindowGroupNameD0Ev @ 69 NONAME + _ZN19CApaWindowGroupNameD1Ev @ 70 NONAME + _ZN19CApaWindowGroupNameD2Ev @ 71 NONAME + _ZN21CApaAppInfoFileReader12StretchDrawLEP10CFbsBitmapS1_5TSize @ 72 NONAME ABSENT + _ZN21CApaAppInfoFileReader19CreateMaskedBitmapLEi @ 73 NONAME ABSENT + _ZN21CApaAppInfoFileReader4NewLER3RFsRK7TDesC164TUid @ 74 NONAME ABSENT + _ZN21CApaAppInfoFileReader5NewLCER3RFsRK7TDesC164TUid @ 75 NONAME ABSENT + _ZN21CApaAppInfoFileReader8CaptionLE9TLanguage @ 76 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD0Ev @ 77 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD1Ev @ 78 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD2Ev @ 79 NONAME ABSENT + _ZN21CApaAppInfoFileWriter10StoreViewLE4TUid @ 80 NONAME ABSENT + _ZN21CApaAppInfoFileWriter11AddCaptionLE9TLanguageRK7TDesC16 @ 81 NONAME + _ZN21CApaAppInfoFileWriter12AddDataTypeLERK21TDataTypeWithPriority @ 82 NONAME + _ZN21CApaAppInfoFileWriter12AddViewIconLER16CApaMaskedBitmap4TUid @ 83 NONAME ABSENT + _ZN21CApaAppInfoFileWriter13AddOwnedFileLERK7TDesC16 @ 84 NONAME ABSENT + _ZN21CApaAppInfoFileWriter13SetCapabilityERK6TDesC8 @ 85 NONAME + _ZN21CApaAppInfoFileWriter15AddViewCaptionLE9TLanguageRK7TDesC164TUid @ 86 NONAME ABSENT + _ZN21CApaAppInfoFileWriter5NewLCER3RFsRK7TDesC164TUid @ 87 NONAME ABSENT + _ZN21CApaAppInfoFileWriter6StoreLEv @ 88 NONAME + _ZN21CApaAppInfoFileWriter8AddIconLER16CApaMaskedBitmap @ 89 NONAME + _ZN21CApaAppInfoFileWriter8AddIconLERK7TDesC16 @ 90 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddViewLE4TUid @ 91 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddViewLE4TUidi @ 92 NONAME ABSENT + _ZN21CApaAppInfoFileWriterD0Ev @ 93 NONAME + _ZN21CApaAppInfoFileWriterD1Ev @ 94 NONAME + _ZN21CApaAppInfoFileWriterD2Ev @ 95 NONAME + _ZN21CApaSystemControlList4NewLER3RFsR13CApaAppFinderRK7TDesC16 @ 96 NONAME ABSENT + _ZN21CApaSystemControlList7UpdateLEv @ 97 NONAME + _ZN21CApaSystemControlListD0Ev @ 98 NONAME + _ZN21CApaSystemControlListD1Ev @ 99 NONAME + _ZN21CApaSystemControlListD2Ev @ 100 NONAME + _ZN8CApaDoor16SetFormatToIconLEv @ 101 NONAME + _ZN8CApaDoor17SetFormatToGlassLEv @ 102 NONAME + _ZN8CApaDoor25SetFormatToTemporaryIconLEi @ 103 NONAME + _ZN8CApaDoor4NewLER3RFsR12CApaDocumentRK5TSize @ 104 NONAME + _ZN8CApaDoor4NewLER3RFsRK12CStreamStore9TStreamIdR11CApaProcess @ 105 NONAME + _ZN8CApaDoor5NewLCER3RFsR12CApaDocumentRK5TSize @ 106 NONAME + _ZN8CApaDoor8RestoreLERK12CStreamStore9TStreamId @ 107 NONAME + _ZN8CApaDoor9DocumentLEi @ 108 NONAME + _ZN8CApaDoorD0Ev @ 109 NONAME + _ZN8CApaDoorD1Ev @ 110 NONAME + _ZN8CApaDoorD2Ev @ 111 NONAME + _ZN8TApaTask11SendMessageE4TUidRK6TDesC8 @ 112 NONAME + _ZN8TApaTask14SwitchOpenFileERK7TDesC16 @ 113 NONAME + _ZN8TApaTask15SendSystemEventE15TApaSystemEvent @ 114 NONAME + _ZN8TApaTask16SendToBackgroundEv @ 115 NONAME + _ZN8TApaTask16SwitchCreateFileERK7TDesC16 @ 116 NONAME + _ZN8TApaTask17BringToForegroundEv @ 117 NONAME + _ZN8TApaTask7EndTaskEv @ 118 NONAME + _ZN8TApaTask7SendKeyERK9TKeyEvent @ 119 NONAME + _ZN8TApaTask7SendKeyEii @ 120 NONAME + _ZN8TApaTask7SetWgIdEi @ 121 NONAME + _ZN8TApaTask8KillTaskEv @ 122 NONAME + _ZN8TApaTaskC1ER10RWsSession @ 123 NONAME + _ZN8TApaTaskC2ER10RWsSession @ 124 NONAME + _ZNK11CApaAppData10CapabilityER5TDes8 @ 125 NONAME + _ZNK11CApaAppData10IconSizesLEv @ 126 NONAME + _ZNK11CApaAppData10OwnedFilesEv @ 127 NONAME + _ZNK11CApaAppData4IconE5TSize @ 128 NONAME + _ZNK11CApaAppData4IconEi @ 129 NONAME + _ZNK11CApaAppData5ViewsEv @ 130 NONAME + _ZNK11CApaAppData8AppEntryEv @ 131 NONAME + _ZNK11CApaAppData8DataTypeERK9TDataType @ 132 NONAME + _ZNK11CApaAppList12AppDataByUidE4TUid @ 133 NONAME + _ZNK11CApaAppList13UpdateCounterEv @ 134 NONAME + _ZNK11CApaAppList19IsFirstScanCompleteEv @ 135 NONAME + _ZNK11CApaAppList20IsIdleUpdateCompleteEv @ 136 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataType @ 137 NONAME + _ZNK11CApaAppList5CountEv @ 138 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppData @ 139 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppDatai @ 140 NONAME + _ZNK11CApaAppList8FirstAppEi @ 141 NONAME + _ZNK11CApaAppList8FirstAppEv @ 142 NONAME + _ZNK13RApaLsSession10GetAllAppsEi @ 143 NONAME + _ZNK13RApaLsSession10GetAllAppsEv @ 144 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUid5TSizeR16CApaMaskedBitmap @ 145 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidiR16CApaMaskedBitmap @ 146 NONAME + _ZNK13RApaLsSession10GetAppInfoER11TApaAppInfo4TUid @ 147 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfo @ 148 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfoi @ 149 NONAME + _ZNK13RApaLsSession11GetAppViewsER13CArrayFixFlatI15TApaAppViewInfoE4TUid @ 150 NONAME + _ZNK13RApaLsSession13RecognizeDataERK7TDesC16RK6TDesC8R22TDataRecognitionResult @ 151 NONAME + _ZNK13RApaLsSession14AppForDataTypeERK9TDataTypeR4TUid @ 152 NONAME + _ZNK13RApaLsSession14AppForDocumentERK7TDesC16R4TUidR9TDataType @ 153 NONAME + _ZNK13RApaLsSession14GetAppInfo_7_0ER15TApaAppInfo_7_04TUid @ 154 NONAME ABSENT + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RK5TSizeR16CApaMaskedBitmap @ 155 NONAME + _ZNK13RApaLsSession14GetNextApp_7_0ER15TApaAppInfo_7_0 @ 156 NONAME ABSENT + _ZNK13RApaLsSession14GetNextApp_7_0ER15TApaAppInfo_7_0i @ 157 NONAME ABSENT + _ZNK13RApaLsSession15GetAppIconSizesE4TUidR13CArrayFixFlatI5TSizeE @ 158 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilter @ 159 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilteri @ 160 NONAME + _ZNK13RApaLsSession16GetAppCapabilityER5TDes84TUid @ 161 NONAME + _ZNK13RApaLsSession16GetAppOwnedFilesER12CDesC16Array4TUid @ 162 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEi @ 163 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEv @ 164 NONAME + _ZNK13RApaLsSession17GetMaxDataBufSizeERi @ 165 NONAME + _ZNK13RApaLsSession18EmbeddableAppCountERi @ 166 NONAME + _ZNK13RApaLsSession21GetAcceptedConfidenceERi @ 167 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK7TDesC16RK6TDesC8RK9TDataTypeRi @ 168 NONAME + _ZNK13RApaLsSession22GetSupportedDataTypesLER13CArrayFixFlatI9TDataTypeE @ 169 NONAME + _ZNK13RApaLsSession23NumberOfOwnDefinedIconsE4TUidRi @ 170 NONAME + _ZNK13RApaLsSession7VersionEv @ 171 NONAME + _ZNK13RApaLsSession8AppCountERi @ 172 NONAME + _ZNK13RApaLsSession9IsProgramERK7TDesC16Ri @ 173 NONAME + _ZNK15CApaAIFViewData10ScreenModeEv @ 174 NONAME ABSENT + _ZNK15CApaAIFViewData12IconByIndexLEi @ 175 NONAME ABSENT + _ZNK15CApaAIFViewData13NumberOfIconsEv @ 176 NONAME ABSENT + _ZNK15CApaAIFViewData7ViewUidEv @ 177 NONAME ABSENT + _ZNK15CApaAIFViewData8CaptionLE9TLanguage @ 178 NONAME ABSENT + _ZNK15CApaAppViewData10IconSizesLEv @ 179 NONAME + _ZNK15CApaAppViewData10ScreenModeEv @ 180 NONAME + _ZNK15CApaAppViewData3UidEv @ 181 NONAME + _ZNK15CApaAppViewData4IconERK5TSize @ 182 NONAME + _ZNK16CApaMaskedBitmap12ExternalizeLER12RWriteStream @ 183 NONAME + _ZNK16CApaMaskedBitmap4MaskEv @ 184 NONAME + _ZNK17CApaSystemControl12ShortCaptionEv @ 185 NONAME + _ZNK17CApaSystemControl4IconEv @ 186 NONAME + _ZNK17CApaSystemControl4TypeEv @ 187 NONAME + _ZNK17CApaSystemControl7CaptionEv @ 188 NONAME + _ZNK17CApaSystemControl8FileNameEv @ 189 NONAME + _ZNK18TApaPictureFactory11NewPictureLER14TPictureHeaderRK12CStreamStore @ 190 NONAME + _ZNK19CApaWindowGroupName10IsAppReadyEv @ 191 NONAME + _ZNK19CApaWindowGroupName14DocNameIsAFileEv @ 192 NONAME + _ZNK19CApaWindowGroupName15WindowGroupNameEv @ 193 NONAME + _ZNK19CApaWindowGroupName18SetWindowGroupNameER12RWindowGroup @ 194 NONAME + _ZNK19CApaWindowGroupName23RespondsToShutdownEventEv @ 195 NONAME + _ZNK19CApaWindowGroupName26RespondsToSwitchFilesEventEv @ 196 NONAME + _ZNK19CApaWindowGroupName6AppUidEv @ 197 NONAME + _ZNK19CApaWindowGroupName6IsBusyEv @ 198 NONAME + _ZNK19CApaWindowGroupName7CaptionEv @ 199 NONAME + _ZNK19CApaWindowGroupName7DocNameEv @ 200 NONAME + _ZNK19CApaWindowGroupName8IsSystemEv @ 201 NONAME + _ZNK21CApaAppInfoFileReader10CapabilityER5TDes8 @ 202 NONAME ABSENT + _ZNK21CApaAppInfoFileReader14GetOwnedFilesLER12CDesC16Array @ 203 NONAME ABSENT + _ZNK21CApaAppInfoFileReader15NumberOfBitmapsEv @ 204 NONAME ABSENT + _ZNK21CApaAppInfoFileReader19DataTypesSupportedLER9CArrayFixI21TDataTypeWithPriorityE @ 205 NONAME ABSENT + _ZNK21CApaAppInfoFileReader9GetViewsLER9CArrayPtrI15CApaAIFViewDataE @ 206 NONAME ABSENT + _ZNK21CApaSystemControlList5CountEv @ 207 NONAME + _ZNK21CApaSystemControlList5IndexE4TUid @ 208 NONAME + _ZNK21CApaSystemControlList7ControlE4TUid @ 209 NONAME + _ZNK21CApaSystemControlList7ControlEi @ 210 NONAME + _ZNK8CApaDoor7AppUidLEv @ 211 NONAME + _ZNK8TApaTask4WgIdEv @ 212 NONAME + _ZNK8TApaTask6ExistsEv @ 213 NONAME + _ZNK8TApaTask8ThreadIdEv @ 214 NONAME + _ZTI18TApaPictureFactory @ 215 NONAME ; ## + _ZTV18TApaPictureFactory @ 216 NONAME ; ## + _ZTI11CApaAppData @ 217 NONAME ; ## + _ZTI11CApaAppList @ 218 NONAME ; ## + _ZTI12CApaAppEntry @ 219 NONAME ; ## + _ZTI14CApaAIFCaption @ 220 NONAME ABSENT ; ## + _ZTI15CApaAIFViewData @ 221 NONAME ABSENT ; ## + _ZTI15CApaAppInfoFile @ 222 NONAME ABSENT ; ## + _ZTI15CApaAppViewData @ 223 NONAME ; ## + _ZTI15CApaIconPicture @ 224 NONAME ; ## + _ZTI16CApaMaskedBitmap @ 225 NONAME ; ## + _ZTI16TDesCArrayFiller @ 226 NONAME ; ## + _ZTI16TSizeArrayFiller @ 227 NONAME ; ## + _ZTI17CApaSystemControl @ 228 NONAME ; ## + _ZTI19CApaAppListNotifier @ 229 NONAME ; ## + _ZTI19CApaWindowGroupName @ 230 NONAME ; ## + _ZTI20TViewDataArrayFiller @ 231 NONAME ; ## + _ZTI21CApaAppInfoFileReader @ 232 NONAME ABSENT ; ## + _ZTI21CApaAppInfoFileWriter @ 233 NONAME ; ## + _ZTI21CApaSystemControlList @ 234 NONAME ; ## + _ZTI7HBufBuf @ 235 NONAME ; ## + _ZTI8CApaDoor @ 236 NONAME ; ## + _ZTV11CApaAppData @ 237 NONAME ; ## + _ZTV11CApaAppList @ 238 NONAME ; ## + _ZTV12CApaAppEntry @ 239 NONAME ; ## + _ZTV14CApaAIFCaption @ 240 NONAME ABSENT ; ## + _ZTV15CApaAIFViewData @ 241 NONAME ABSENT ; ## + _ZTV15CApaAppInfoFile @ 242 NONAME ABSENT ; ## + _ZTV15CApaAppViewData @ 243 NONAME ; ## + _ZTV15CApaIconPicture @ 244 NONAME ; ## + _ZTV16CApaMaskedBitmap @ 245 NONAME ; ## + _ZTV16TDesCArrayFiller @ 246 NONAME ; ## + _ZTV16TSizeArrayFiller @ 247 NONAME ; ## + _ZTV17CApaSystemControl @ 248 NONAME ; ## + _ZTV19CApaAppListNotifier @ 249 NONAME ; ## + _ZTV19CApaWindowGroupName @ 250 NONAME ; ## + _ZTV20TViewDataArrayFiller @ 251 NONAME ; ## + _ZTV21CApaAppInfoFileReader @ 252 NONAME ABSENT ; ## + _ZTV21CApaAppInfoFileWriter @ 253 NONAME ; ## + _ZTV21CApaSystemControlList @ 254 NONAME ; ## + _ZTV7HBufBuf @ 255 NONAME ; ## + _ZTV8CApaDoor @ 256 NONAME ; ## + _ZN11CApaAppList4NewLER3RFsP13CApaAppFinderP16CApaAppRegFinderi @ 257 NONAME ABSENT + _ZNK11CApaAppData12IconFileNameEv @ 258 NONAME + _ZNK11CApaAppData14NonMbmIconFileEv @ 259 NONAME + _ZNK11CApaAppData19DefaultScreenNumberEv @ 260 NONAME + _ZNK11CApaAppData20RegistrationFileUsedEv @ 261 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidRP7HBufC16 @ 262 NONAME + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RP7HBufC16 @ 263 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjj @ 264 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjji @ 265 NONAME + _ZNK15CApaAppViewData12IconFileNameEv @ 266 NONAME + _ZNK15CApaAppViewData14NonMbmIconFileEv @ 267 NONAME + _ZTI17CApaAppInfoReader @ 268 NONAME ; ## + _ZTI19CApaAppInfoReaderV1 @ 269 NONAME ABSENT ; ## + _ZTI19CApaAppInfoReaderV2 @ 270 NONAME ; ## + _ZTV17CApaAppInfoReader @ 271 NONAME ; ## + _ZTV19CApaAppInfoReaderV1 @ 272 NONAME ABSENT ; ## + _ZTV19CApaAppInfoReaderV2 @ 273 NONAME ; ## + _Z16StartupApaServerR14MApaAppStarter @ 274 NONAME + _Z23StartupApaServerProcessv @ 275 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType @ 276 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypel4TUid @ 277 NONAME + _ZN13RApaLsSession25InsertDataMappingIfHigherERK9TDataTypel4TUidRi @ 278 NONAME + _ZNK11CApaAppData19ApplicationLanguageEv @ 279 NONAME + _ZNK13RApaLsSession19ApplicationLanguageE4TUidR9TLanguage @ 280 NONAME + _ZN21CApaSystemControlList4NewLER3RFs @ 281 NONAME + _ZNK11CApaAppData17ImplementsServiceE4TUid @ 282 NONAME + _ZNK11CApaAppList17ServiceUidBufferLE4TUid @ 283 NONAME + _ZNK11CApaAppList19ServiceArrayBufferLE4TUid @ 284 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataTypePK4TUidRi @ 285 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUid @ 286 NONAME + _ZNK11CApaAppList24ServiceOpaqueDataBufferLE4TUidS0_ @ 287 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUid @ 288 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUidi @ 289 NONAME + _ZNK13RApaLsSession15GetAppServicesLE4TUidR13CArrayFixFlatIS0_E @ 290 NONAME + _ZNK13RApaLsSession16GetAppServicesLCE4TUid @ 291 NONAME + _ZNK13RApaLsSession24AppForDataTypeAndServiceERK9TDataType4TUidRS3_ @ 292 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK5RFile4TUidRS3_R9TDataType @ 293 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK7TDesC164TUidRS3_R9TDataType @ 294 NONAME + _ZNK13RApaLsSession25GetAppServiceOpaqueDataLCE4TUidS0_ @ 295 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUid @ 296 NONAME + _ZNK18TApaAppServiceInfo10OpaqueDataEv @ 297 NONAME + _ZNK18TApaAppServiceInfo3UidEv @ 298 NONAME + _ZTI30CApaAppServiceInfoArrayWrapper @ 299 NONAME ; ## + _ZTV30CApaAppServiceInfoArrayWrapper @ 300 NONAME ; ## + _ZN13RApaLsSession13StartDocumentER5RFileR9TThreadIdP14TRequestStatus @ 301 NONAME + _ZN21CApaAppInfoFileReader27CreateMaskedBitmapByIndexLCEi @ 302 NONAME ABSENT + _ZNK13RApaLsSession36CancelListPopulationCompleteObserverEv @ 303 NONAME + _ZNK13RApaLsSession38RegisterListPopulationCompleteObserverER14TRequestStatus @ 304 NONAME + _ZN8ApaUtils24HandleAsRegistrationFileERK8TUidType @ 305 NONAME + _ZN13RApaLsSession33RegisterJavaMIDletViaIterimFormatERK7TDesC16R5RFile @ 306 NONAME ABSENT + _ZN22ForJavaMIDletInstaller33CheckInterimFormatFileNotCorruptLER5RFile @ 307 NONAME + _ZN13RApaLsSession20DeregisterJavaMIDletERK7TDesC16 @ 308 NONAME ABSENT + _ZN13RApaLsSession13SetFsSessionLER3RFs @ 309 NONAME + _ZN13RApaLsSession13StartDocumentER5RFile4TUidR9TThreadIdP14TRequestStatus @ 310 NONAME + _ZN13RApaLsSession13StartDocumentER5RFileRK9TDataTypeR9TThreadIdP14TRequestStatus @ 311 NONAME + _ZN13RApaLsSession14ClearFsSessionEv @ 312 NONAME + _ZN13RApaLsSession9FsSessionEv @ 313 NONAME + _ZNK13RApaLsSession13RecognizeDataERK5RFileR22TDataRecognitionResult @ 314 NONAME + _ZNK13RApaLsSession14AppForDocumentERK5RFileR4TUidR9TDataType @ 315 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK5RFileRK9TDataTypeRi @ 316 NONAME + _ZNK13RApaLsSession19GetPreferredBufSizeERi @ 317 NONAME + _ZN22ForJavaMIDletInstaller18GetJavaMIDletInfoLER3RFsRK7TDesC16RmS5_ @ 318 NONAME + _ZN22ForJavaMIDletInstaller28NewInterimFormatFileWriterLCER3RFsRK7TDesC164TUidmi @ 319 NONAME + _ZNK18TApaAppServiceInfo9DataTypesEv @ 320 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUidRK9TDataType @ 321 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUidRK9TDataType @ 322 NONAME + _ZN13RApaLsSession5CloseEv @ 323 NONAME + _ZTI22CApaLsSessionExtension @ 324 NONAME ; ## + _ZTV22CApaLsSessionExtension @ 325 NONAME ; ## + _ZN13RApaLsSession23RApaLsSession_Reserved1Ev @ 326 NONAME + _ZN13RApaLsSession23RApaLsSession_Reserved2Ev @ 327 NONAME + _ZN18TApaPictureFactoryC1Ev @ 328 NONAME + _ZN18TApaPictureFactoryC2Ev @ 329 NONAME + _ZN23MApaAppListServObserver33MApaAppListServObserver_Reserved1Ev @ 330 NONAME + _ZN23MApaAppListServObserver33MApaAppListServObserver_Reserved2Ev @ 331 NONAME + _ZN23MApaAppListServObserverC2Ev @ 332 NONAME + _ZTI13RApaLsSession @ 333 NONAME ; ## + _ZTI23MApaAppListServObserver @ 334 NONAME ; ## + _ZTV13RApaLsSession @ 335 NONAME ; ## + _ZTV23MApaAppListServObserver @ 336 NONAME ; ## + _ZNK13RApaLsSession15RecognizeFilesLERK7TDesC16R27CDataRecognitionResultArray @ 337 NONAME + _ZN13RApaLsSession15RecognizeFilesLERK7TDesC16R27CDataRecognitionResultArrayR14TRequestStatus @ 338 NONAME + _ZNK13RApaLsSession15RecognizeFilesLERK7TDesC16RK6TDesC8R27CDataRecognitionResultArray @ 339 NONAME + _ZN13RApaLsSession15RecognizeFilesLERK7TDesC16RK6TDesC8R27CDataRecognitionResultArrayR14TRequestStatus @ 340 NONAME + _ZN13RApaLsSession20CancelRecognizeFilesEv @ 341 NONAME + _ZN27CDataRecognitionResultArrayC1Ev @ 342 NONAME + _ZN27CDataRecognitionResultArrayC2Ev @ 343 NONAME + _ZN27CDataRecognitionResultArrayD0Ev @ 344 NONAME + _ZN27CDataRecognitionResultArrayD1Ev @ 345 NONAME + _ZN27CDataRecognitionResultArrayD2Ev @ 346 NONAME + _ZNK27CDataRecognitionResultArray12GetFileNameLER4TBufILi256EEj @ 347 NONAME + _ZNK27CDataRecognitionResultArray25GetDataRecognitionResultLER22TDataRecognitionResultj @ 348 NONAME + _ZNK27CDataRecognitionResultArray4PathEv @ 349 NONAME + _ZNK27CDataRecognitionResultArray5CountEv @ 350 NONAME + _ZTI21CAsyncFileRecognition @ 351 NONAME ; ## + _ZTI27CDataRecognitionResultArray @ 352 NONAME ; ## + _ZTI32CDataRecognitionResultArrayEntry @ 353 NONAME ; ## + _ZTV21CAsyncFileRecognition @ 354 NONAME ; ## + _ZTV27CDataRecognitionResultArray @ 355 NONAME ; ## + _ZTV32CDataRecognitionResultArrayEntry @ 356 NONAME ; ## + _ZNK13RApaLsSession16GetAppByDataTypeERK9TDataType4TUidRS3_ @ 357 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType4TUid @ 358 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypel4TUidS3_ @ 359 NONAME + _ZN13RApaLsSession29RegisterNonNativeApplicationLE4TUidRK10TDriveUnitR34CApaRegistrationResourceFileWriterP33CApaLocalisableResourceFileWriterPK5RFile @ 360 NONAME + _ZN13RApaLsSession31DeregisterNonNativeApplicationLE4TUid @ 361 NONAME + _ZN13RApaLsSession33RegisterNonNativeApplicationTypeLE4TUidRK7TDesC16 @ 362 NONAME + _ZN13RApaLsSession35DeregisterNonNativeApplicationTypeLE4TUid @ 363 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadIdP14TRequestStatus @ 364 NONAME + _ZNK11CApaAppData10OpaqueDataEv @ 365 NONAME + _ZNK11CApaAppData20RegistrationFileNameEv @ 366 NONAME + _ZNK11CApaAppData27LocalisableResourceFileNameEv @ 367 NONAME + _ZNK11CApaAppList17AppDataByFileNameERK7TDesC16 @ 368 NONAME + _ZNK13RApaLsSession22GetDefaultScreenNumberERi4TUid @ 369 NONAME + _ZN11CApaAppList22FindAndAddSpecificAppLEP16CApaAppRegFinder4TUid @ 370 NONAME + _ZNK13RApaLsSession21MatchesSecurityPolicyERi4TUidRK15TSecurityPolicy @ 371 NONAME + _ZN33CApaLocalisableResourceFileWriterD1Ev @ 372 NONAME + _ZN33CApaLocalisableResourceFileWriterD2Ev @ 373 NONAME + _ZN34CApaRegistrationResourceFileWriter12AddDataTypeLEiRK6TDesC8 @ 374 NONAME + _ZN34CApaRegistrationResourceFileWriter13SetGroupNameLERK7TDesC16 @ 375 NONAME + _ZN34CApaRegistrationResourceFileWriter14SetOpaqueDataLERK6TDesC8 @ 376 NONAME + _ZN34CApaRegistrationResourceFileWriter15SetAppIsHiddenLEi @ 377 NONAME + _ZN34CApaRegistrationResourceFileWriter17SetEmbeddabilityLEN17TApaAppCapability14TEmbeddabilityE @ 378 NONAME + _ZN34CApaRegistrationResourceFileWriter19SetSupportsNewFileLEi @ 379 NONAME + _ZN34CApaRegistrationResourceFileWriter21AddFileOwnershipInfoLERK7TDesC16 @ 380 NONAME + _ZN34CApaRegistrationResourceFileWriter22SetLaunchInBackgroundLEi @ 381 NONAME + _ZN34CApaRegistrationResourceFileWriter23SetDefaultScreenNumberLEi @ 382 NONAME + _ZN34CApaRegistrationResourceFileWriter4NewLE4TUidRK7TDesC16j @ 383 NONAME + _ZN34CApaRegistrationResourceFileWriterD0Ev @ 384 NONAME + _ZN34CApaRegistrationResourceFileWriterD1Ev @ 385 NONAME + _ZN34CApaRegistrationResourceFileWriterD2Ev @ 386 NONAME + _ZNK11CApaAppData24NonNativeApplicationTypeEv @ 387 NONAME + _ZTI33CApaLocalisableResourceFileWriter @ 388 NONAME ; ## + _ZTI34CApaRegistrationResourceFileWriter @ 389 NONAME ; ## + _ZTIN26CApaResourceFileWriterBase11RBufferSinkE @ 390 NONAME ; ## + _ZTV33CApaLocalisableResourceFileWriter @ 391 NONAME ; ## + _ZTV34CApaRegistrationResourceFileWriter @ 392 NONAME ; ## + _ZTVN26CApaResourceFileWriterBase11RBufferSinkE @ 393 NONAME ; ## + _ZN33CApaLocalisableResourceFileWriter4NewLERK7TDesC16S2_iS2_ @ 394 NONAME + _ZN33CApaLocalisableResourceFileWriterD0Ev @ 395 NONAME + _ZN13RApaLsSession12CancelNotifyEv @ 396 NONAME + _ZN13RApaLsSession9SetNotifyEiR14TRequestStatus @ 397 NONAME + _ZNK11CApaAppList17AppScanInProgressEv @ 398 NONAME + _ZN13RApaLsSession25NotifyOnDataMappingChangeER14TRequestStatus @ 399 NONAME + _ZN13RApaLsSession31CancelNotifyOnDataMappingChangeEv @ 400 NONAME + _ZNK13RApaLsSession10GetAppTypeER4TUidS0_ @ 401 NONAME + _ZN13RApaLsSession35CommitNonNativeApplicationsUpdatesLEv @ 402 NONAME + _ZN13RApaLsSession36PrepareNonNativeApplicationsUpdatesLEv @ 403 NONAME + _ZN13RApaLsSession36RollbackNonNativeApplicationsUpdatesEv @ 404 NONAME + _ZN11CApaAppList15UpdatedAppsListEv @ 405 NONAME ABSENT + _ZN11CApaAppList18SetUpdatedAppsListEP16CUpdatedAppsList @ 406 NONAME ABSENT + _ZN11CApaAppData4NewLERK12TApaAppEntryR3RFsRK7TDesC16 @ 407 NONAME + _ZN11CApaAppDataD0Ev @ 408 NONAME + _ZN11CApaAppDataD1Ev @ 409 NONAME + _ZN11CApaAppDataD2Ev @ 410 NONAME + _ZN11CApaAppList24ShareProtectedFileServerEv @ 411 NONAME ABSENT + _ZN11CApaAppList4SelfEv @ 412 NONAME + X @ 413 NONAME ABSENT + X @ 414 NONAME ABSENT + X @ 415 NONAME ABSENT + X @ 416 NONAME ABSENT + _ZN13RApaLsSession18SetAppShortCaptionERK7TDesC169TLanguage4TUid @ 417 NONAME + _ZN11CApaAppData16SetShortCaptionLERK7TDesC16 @ 418 NONAME + _ZN11CApaAppList14CompareStringsERK7HBufC16S2_ @ 419 NONAME + _ZN11CApaAppList22AddForcedRegistrationLEP7HBufC16 @ 420 NONAME + _ZN13RApaLsSession17ForceRegistrationERK13RPointerArrayI7TDesC16E @ 421 NONAME + _ZN11CApaAppList24ResetForcedRegistrationsEv @ 422 NONAME + _ZN11CApaAppList12RestartScanLEv @ 423 NONAME + _ZN11CApaAppList8StopScanEv @ 424 NONAME + KMinApplicationStackSize @ 425 NONAME DATA 4 + _Z23MinApplicationStackSizev @ 426 NONAME + _ZN17CApaSecurityUtils16CheckAppSecurityERK7TPtrC16RiS3_ @ 427 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APGRFX_UI_FRAMEWORKSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APGRFX_UI_FRAMEWORKSU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,437 @@ +EXPORTS + _ZNK11CApaAppData11GetIconInfoERiS0_ @ 1 NONAME + _ZN11CApaAppData16CanUseScreenModeEi @ 2 NONAME + _ZN11CApaAppList16StartIdleUpdateLEP19MApaAppListObserver @ 3 NONAME + _ZN11CApaAppList16StartIdleUpdateLEv @ 4 NONAME + _ZN11CApaAppList4NewLER3RFsP16CApaAppRegFinderii @ 5 NONAME + _ZN11CApaAppList6PurgeLEv @ 6 NONAME + _ZN11CApaAppList7UpdateLEv @ 7 NONAME ABSENT + _ZN11CApaAppList9InitListLEP19MApaAppListObserver @ 8 NONAME + _ZN11CApaAppListD0Ev @ 9 NONAME + _ZN11CApaAppListD1Ev @ 10 NONAME + _ZN11CApaAppListD2Ev @ 11 NONAME + _ZN12TApaTaskList10CycleTasksE4TUidNS_15TCycleDirectionE @ 12 NONAME + _ZN12TApaTaskList7FindAppE4TUid @ 13 NONAME + _ZN12TApaTaskList7FindAppERK7TDesC16 @ 14 NONAME + _ZN12TApaTaskList7FindDocERK7TDesC16 @ 15 NONAME + _ZN12TApaTaskList9FindByPosEi @ 16 NONAME + _ZN12TApaTaskListC1ER10RWsSession @ 17 NONAME + _ZN12TApaTaskListC2ER10RWsSession @ 18 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 19 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16R9TThreadIdNS_11TLaunchTypeE @ 20 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16RK9TDataTypeR9TThreadIdNS_11TLaunchTypeE @ 21 NONAME + _ZN13RApaLsSession14CreateDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 22 NONAME + _ZN13RApaLsSession17SetMaxDataBufSizeEi @ 23 NONAME + _ZN13RApaLsSession21SetAcceptedConfidenceEi @ 24 NONAME + _ZN13RApaLsSession7ConnectEv @ 25 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLine @ 26 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadId @ 27 NONAME + _ZN13RApaLsSessionC1Ev @ 28 NONAME + _ZN13RApaLsSessionC2Ev @ 29 NONAME + _ZN16AppInfoFileUtils14GetAifFileNameERK3RFsR6TDes16 @ 30 NONAME ABSENT + _ZN16CApaMaskedBitmap12InternalizeLER11RReadStream @ 31 NONAME + _ZN16CApaMaskedBitmap13SetMaskBitmapEP10CFbsBitmap @ 32 NONAME + _ZN16CApaMaskedBitmap4NewLEPKS_ @ 33 NONAME + _ZN16CApaMaskedBitmap5NewLCEv @ 34 NONAME + _ZN16CApaMaskedBitmapD0Ev @ 35 NONAME + _ZN16CApaMaskedBitmapD1Ev @ 36 NONAME + _ZN16CApaMaskedBitmapD2Ev @ 37 NONAME + _ZN17CApaSystemControl7CreateLEv @ 38 NONAME + _ZN18TApaPictureFactoryC1EP11CApaProcess @ 39 NONAME + _ZN18TApaPictureFactoryC2EP11CApaProcess @ 40 NONAME + _ZN19CApaAppListNotifier4NewLEP23MApaAppListServObserverN7CActive9TPriorityE @ 41 NONAME + _ZN19CApaAppListNotifierD0Ev @ 42 NONAME + _ZN19CApaAppListNotifierD1Ev @ 43 NONAME + _ZN19CApaAppListNotifierD2Ev @ 44 NONAME + _ZN19CApaWindowGroupName11SetAppReadyEi @ 45 NONAME + _ZN19CApaWindowGroupName11SetCaptionLERK7TDesC16 @ 46 NONAME + _ZN19CApaWindowGroupName11SetDocNameLERK7TDesC16 @ 47 NONAME + _ZN19CApaWindowGroupName12FindByAppUidE4TUidR10RWsSessionRi @ 48 NONAME + _ZN19CApaWindowGroupName13FindByCaptionERK7TDesC16R10RWsSessionRi @ 49 NONAME + _ZN19CApaWindowGroupName13FindByDocNameERK7TDesC16R10RWsSessionRi @ 50 NONAME + _ZN19CApaWindowGroupName17SetDocNameIsAFileEi @ 51 NONAME + _ZN19CApaWindowGroupName18ConstructFromWgIdLEi @ 52 NONAME + _ZN19CApaWindowGroupName18SetWindowGroupNameEP7HBufC16 @ 53 NONAME + _ZN19CApaWindowGroupName19SetWindowGroupNameLERK7TDesC16 @ 54 NONAME + _ZN19CApaWindowGroupName26SetRespondsToShutdownEventEi @ 55 NONAME + _ZN19CApaWindowGroupName29SetRespondsToSwitchFilesEventEi @ 56 NONAME + _ZN19CApaWindowGroupName3NewERK10RWsSessionP7HBufC16 @ 57 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSession @ 58 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessionRK7TDesC16 @ 59 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessioni @ 60 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSession @ 61 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessionRK7TDesC16 @ 62 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessioni @ 63 NONAME + _ZNK19CApaWindowGroupName6HiddenEv @ 64 NONAME + _ZN19CApaWindowGroupName7SetBusyEi @ 65 NONAME + _ZN19CApaWindowGroupName9SetAppUidE4TUid @ 66 NONAME + _ZN19CApaWindowGroupName9SetHiddenEi @ 67 NONAME + _ZN19CApaWindowGroupName9SetSystemEi @ 68 NONAME + _ZN19CApaWindowGroupNameD0Ev @ 69 NONAME + _ZN19CApaWindowGroupNameD1Ev @ 70 NONAME + _ZN19CApaWindowGroupNameD2Ev @ 71 NONAME + _ZN21CApaAppInfoFileReader12StretchDrawLEP10CFbsBitmapS1_5TSize @ 72 NONAME ABSENT + _ZN21CApaAppInfoFileReader19CreateMaskedBitmapLEi @ 73 NONAME ABSENT + _ZN21CApaAppInfoFileReader4NewLER3RFsRK7TDesC164TUid @ 74 NONAME ABSENT + _ZN21CApaAppInfoFileReader5NewLCER3RFsRK7TDesC164TUid @ 75 NONAME ABSENT + _ZN21CApaAppInfoFileReader8CaptionLE9TLanguage @ 76 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD0Ev @ 77 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD1Ev @ 78 NONAME ABSENT + _ZN21CApaAppInfoFileReaderD2Ev @ 79 NONAME ABSENT + _ZN21CApaAppInfoFileWriter10StoreViewLE4TUid @ 80 NONAME ABSENT + _ZN21CApaAppInfoFileWriter11AddCaptionLE9TLanguageRK7TDesC16 @ 81 NONAME + _ZN21CApaAppInfoFileWriter12AddDataTypeLERK21TDataTypeWithPriority @ 82 NONAME + _ZN21CApaAppInfoFileWriter12AddViewIconLER16CApaMaskedBitmap4TUid @ 83 NONAME ABSENT + _ZN21CApaAppInfoFileWriter13AddOwnedFileLERK7TDesC16 @ 84 NONAME ABSENT + _ZN21CApaAppInfoFileWriter13SetCapabilityERK6TDesC8 @ 85 NONAME + _ZN21CApaAppInfoFileWriter15AddViewCaptionLE9TLanguageRK7TDesC164TUid @ 86 NONAME ABSENT + _ZN21CApaAppInfoFileWriter5NewLCER3RFsRK7TDesC164TUid @ 87 NONAME ABSENT + _ZN21CApaAppInfoFileWriter6StoreLEv @ 88 NONAME + _ZN21CApaAppInfoFileWriter8AddIconLER16CApaMaskedBitmap @ 89 NONAME + _ZN21CApaAppInfoFileWriter8AddIconLERK7TDesC16 @ 90 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddViewLE4TUid @ 91 NONAME ABSENT + _ZN21CApaAppInfoFileWriter8AddViewLE4TUidi @ 92 NONAME ABSENT + _ZN21CApaAppInfoFileWriterD0Ev @ 93 NONAME + _ZN21CApaAppInfoFileWriterD1Ev @ 94 NONAME + _ZN21CApaAppInfoFileWriterD2Ev @ 95 NONAME + _ZN21CApaSystemControlList4NewLER3RFsR13CApaAppFinderRK7TDesC16 @ 96 NONAME ABSENT + _ZN21CApaSystemControlList7UpdateLEv @ 97 NONAME + _ZN21CApaSystemControlListD0Ev @ 98 NONAME + _ZN21CApaSystemControlListD1Ev @ 99 NONAME + _ZN21CApaSystemControlListD2Ev @ 100 NONAME + _ZN8CApaDoor16SetFormatToIconLEv @ 101 NONAME + _ZN8CApaDoor17SetFormatToGlassLEv @ 102 NONAME + _ZN8CApaDoor25SetFormatToTemporaryIconLEi @ 103 NONAME + _ZN8CApaDoor4NewLER3RFsR12CApaDocumentRK5TSize @ 104 NONAME + _ZN8CApaDoor4NewLER3RFsRK12CStreamStore9TStreamIdR11CApaProcess @ 105 NONAME + _ZN8CApaDoor5NewLCER3RFsR12CApaDocumentRK5TSize @ 106 NONAME + _ZN8CApaDoor8RestoreLERK12CStreamStore9TStreamId @ 107 NONAME + _ZN8CApaDoor9DocumentLEi @ 108 NONAME + _ZN8CApaDoorD0Ev @ 109 NONAME + _ZN8CApaDoorD1Ev @ 110 NONAME + _ZN8CApaDoorD2Ev @ 111 NONAME + _ZN8TApaTask11SendMessageE4TUidRK6TDesC8 @ 112 NONAME + _ZN8TApaTask14SwitchOpenFileERK7TDesC16 @ 113 NONAME + _ZN8TApaTask15SendSystemEventE15TApaSystemEvent @ 114 NONAME + _ZN8TApaTask16SendToBackgroundEv @ 115 NONAME + _ZN8TApaTask16SwitchCreateFileERK7TDesC16 @ 116 NONAME + _ZN8TApaTask17BringToForegroundEv @ 117 NONAME + _ZN8TApaTask7EndTaskEv @ 118 NONAME + _ZN8TApaTask7SendKeyERK9TKeyEvent @ 119 NONAME + _ZN8TApaTask7SendKeyEii @ 120 NONAME + _ZN8TApaTask7SetWgIdEi @ 121 NONAME + _ZN8TApaTask8KillTaskEv @ 122 NONAME + _ZN8TApaTaskC1ER10RWsSession @ 123 NONAME + _ZN8TApaTaskC2ER10RWsSession @ 124 NONAME + _ZNK11CApaAppData10CapabilityER5TDes8 @ 125 NONAME + _ZNK11CApaAppData10IconSizesLEv @ 126 NONAME + _ZNK11CApaAppData10OwnedFilesEv @ 127 NONAME + _ZNK11CApaAppData4IconE5TSize @ 128 NONAME + _ZNK11CApaAppData4IconEi @ 129 NONAME + _ZNK11CApaAppData5ViewsEv @ 130 NONAME + _ZNK11CApaAppData8AppEntryEv @ 131 NONAME + _ZNK11CApaAppData8DataTypeERK9TDataType @ 132 NONAME + _ZNK11CApaAppList12AppDataByUidE4TUid @ 133 NONAME + _ZNK11CApaAppList13UpdateCounterEv @ 134 NONAME ABSENT + _ZNK11CApaAppList19IsFirstScanCompleteEv @ 135 NONAME + _ZNK11CApaAppList20IsIdleUpdateCompleteEv @ 136 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataType @ 137 NONAME + _ZNK11CApaAppList5CountEv @ 138 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppData @ 139 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppDatai @ 140 NONAME + _ZNK11CApaAppList8FirstAppEi @ 141 NONAME + _ZNK11CApaAppList8FirstAppEv @ 142 NONAME + _ZNK13RApaLsSession10GetAllAppsEi @ 143 NONAME + _ZNK13RApaLsSession10GetAllAppsEv @ 144 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUid5TSizeR16CApaMaskedBitmap @ 145 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidiR16CApaMaskedBitmap @ 146 NONAME + _ZNK13RApaLsSession10GetAppInfoER11TApaAppInfo4TUid @ 147 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfo @ 148 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfoi @ 149 NONAME + _ZNK13RApaLsSession11GetAppViewsER13CArrayFixFlatI15TApaAppViewInfoE4TUid @ 150 NONAME + _ZNK13RApaLsSession13RecognizeDataERK7TDesC16RK6TDesC8R22TDataRecognitionResult @ 151 NONAME + _ZNK13RApaLsSession14AppForDataTypeERK9TDataTypeR4TUid @ 152 NONAME + _ZNK13RApaLsSession14AppForDocumentERK7TDesC16R4TUidR9TDataType @ 153 NONAME + _ZNK13RApaLsSession14GetAppInfo_7_0ER15TApaAppInfo_7_04TUid @ 154 NONAME ABSENT + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RK5TSizeR16CApaMaskedBitmap @ 155 NONAME + _ZNK13RApaLsSession14GetNextApp_7_0ER15TApaAppInfo_7_0 @ 156 NONAME ABSENT + _ZNK13RApaLsSession14GetNextApp_7_0ER15TApaAppInfo_7_0i @ 157 NONAME ABSENT + _ZNK13RApaLsSession15GetAppIconSizesE4TUidR13CArrayFixFlatI5TSizeE @ 158 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilter @ 159 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilteri @ 160 NONAME + _ZNK13RApaLsSession16GetAppCapabilityER5TDes84TUid @ 161 NONAME + _ZNK13RApaLsSession16GetAppOwnedFilesER12CDesC16Array4TUid @ 162 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEi @ 163 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEv @ 164 NONAME + _ZNK13RApaLsSession17GetMaxDataBufSizeERi @ 165 NONAME + _ZNK13RApaLsSession18EmbeddableAppCountERi @ 166 NONAME + _ZNK13RApaLsSession21GetAcceptedConfidenceERi @ 167 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK7TDesC16RK6TDesC8RK9TDataTypeRi @ 168 NONAME + _ZNK13RApaLsSession22GetSupportedDataTypesLER13CArrayFixFlatI9TDataTypeE @ 169 NONAME + _ZNK13RApaLsSession23NumberOfOwnDefinedIconsE4TUidRi @ 170 NONAME + _ZNK13RApaLsSession7VersionEv @ 171 NONAME + _ZNK13RApaLsSession8AppCountERi @ 172 NONAME + _ZNK13RApaLsSession9IsProgramERK7TDesC16Ri @ 173 NONAME + _ZNK15CApaAIFViewData10ScreenModeEv @ 174 NONAME ABSENT + _ZNK15CApaAIFViewData12IconByIndexLEi @ 175 NONAME ABSENT + _ZNK15CApaAIFViewData13NumberOfIconsEv @ 176 NONAME ABSENT + _ZNK15CApaAIFViewData7ViewUidEv @ 177 NONAME ABSENT + _ZNK15CApaAIFViewData8CaptionLE9TLanguage @ 178 NONAME ABSENT + _ZNK15CApaAppViewData10IconSizesLEv @ 179 NONAME + _ZNK15CApaAppViewData10ScreenModeEv @ 180 NONAME + _ZNK15CApaAppViewData3UidEv @ 181 NONAME + _ZNK15CApaAppViewData4IconERK5TSize @ 182 NONAME + _ZNK16CApaMaskedBitmap12ExternalizeLER12RWriteStream @ 183 NONAME + _ZNK16CApaMaskedBitmap4MaskEv @ 184 NONAME + _ZNK17CApaSystemControl12ShortCaptionEv @ 185 NONAME + _ZNK17CApaSystemControl4IconEv @ 186 NONAME + _ZNK17CApaSystemControl4TypeEv @ 187 NONAME + _ZNK17CApaSystemControl7CaptionEv @ 188 NONAME + _ZNK17CApaSystemControl8FileNameEv @ 189 NONAME + _ZNK18TApaPictureFactory11NewPictureLER14TPictureHeaderRK12CStreamStore @ 190 NONAME + _ZNK19CApaWindowGroupName10IsAppReadyEv @ 191 NONAME + _ZNK19CApaWindowGroupName14DocNameIsAFileEv @ 192 NONAME + _ZNK19CApaWindowGroupName15WindowGroupNameEv @ 193 NONAME + _ZNK19CApaWindowGroupName18SetWindowGroupNameER12RWindowGroup @ 194 NONAME + _ZNK19CApaWindowGroupName23RespondsToShutdownEventEv @ 195 NONAME + _ZNK19CApaWindowGroupName26RespondsToSwitchFilesEventEv @ 196 NONAME + _ZNK19CApaWindowGroupName6AppUidEv @ 197 NONAME + _ZNK19CApaWindowGroupName6IsBusyEv @ 198 NONAME + _ZNK19CApaWindowGroupName7CaptionEv @ 199 NONAME + _ZNK19CApaWindowGroupName7DocNameEv @ 200 NONAME + _ZNK19CApaWindowGroupName8IsSystemEv @ 201 NONAME + _ZNK21CApaAppInfoFileReader10CapabilityER5TDes8 @ 202 NONAME ABSENT + _ZNK21CApaAppInfoFileReader14GetOwnedFilesLER12CDesC16Array @ 203 NONAME ABSENT + _ZNK21CApaAppInfoFileReader15NumberOfBitmapsEv @ 204 NONAME ABSENT + _ZNK21CApaAppInfoFileReader19DataTypesSupportedLER9CArrayFixI21TDataTypeWithPriorityE @ 205 NONAME ABSENT + _ZNK21CApaAppInfoFileReader9GetViewsLER9CArrayPtrI15CApaAIFViewDataE @ 206 NONAME ABSENT + _ZNK21CApaSystemControlList5CountEv @ 207 NONAME + _ZNK21CApaSystemControlList5IndexE4TUid @ 208 NONAME + _ZNK21CApaSystemControlList7ControlE4TUid @ 209 NONAME + _ZNK21CApaSystemControlList7ControlEi @ 210 NONAME + _ZNK8CApaDoor7AppUidLEv @ 211 NONAME + _ZNK8TApaTask4WgIdEv @ 212 NONAME + _ZNK8TApaTask6ExistsEv @ 213 NONAME + _ZNK8TApaTask8ThreadIdEv @ 214 NONAME + _ZTI18TApaPictureFactory @ 215 NONAME ; ## + _ZTV18TApaPictureFactory @ 216 NONAME ; ## + _ZTI11CApaAppData @ 217 NONAME ; ## + _ZTI11CApaAppList @ 218 NONAME ; ## + _ZTI12CApaAppEntry @ 219 NONAME ; ## + _ZTI14CApaAIFCaption @ 220 NONAME ABSENT ; ## + _ZTI15CApaAIFViewData @ 221 NONAME ABSENT ; ## + _ZTI15CApaAppInfoFile @ 222 NONAME ABSENT ; ## + _ZTI15CApaAppViewData @ 223 NONAME ; ## + _ZTI15CApaIconPicture @ 224 NONAME ; ## + _ZTI16CApaMaskedBitmap @ 225 NONAME ; ## + _ZTI16TDesCArrayFiller @ 226 NONAME ; ## + _ZTI16TSizeArrayFiller @ 227 NONAME ; ## + _ZTI17CApaSystemControl @ 228 NONAME ; ## + _ZTI19CApaAppListNotifier @ 229 NONAME ; ## + _ZTI19CApaWindowGroupName @ 230 NONAME ; ## + _ZTI20TViewDataArrayFiller @ 231 NONAME ; ## + _ZTI21CApaAppInfoFileReader @ 232 NONAME ABSENT ; ## + _ZTI21CApaAppInfoFileWriter @ 233 NONAME ; ## + _ZTI21CApaSystemControlList @ 234 NONAME ; ## + _ZTI7HBufBuf @ 235 NONAME ; ## + _ZTI8CApaDoor @ 236 NONAME ; ## + _ZTV11CApaAppData @ 237 NONAME ; ## + _ZTV11CApaAppList @ 238 NONAME ; ## + _ZTV12CApaAppEntry @ 239 NONAME ; ## + _ZTV14CApaAIFCaption @ 240 NONAME ABSENT ; ## + _ZTV15CApaAIFViewData @ 241 NONAME ABSENT ; ## + _ZTV15CApaAppInfoFile @ 242 NONAME ABSENT ; ## + _ZTV15CApaAppViewData @ 243 NONAME ; ## + _ZTV15CApaIconPicture @ 244 NONAME ; ## + _ZTV16CApaMaskedBitmap @ 245 NONAME ; ## + _ZTV16TDesCArrayFiller @ 246 NONAME ; ## + _ZTV16TSizeArrayFiller @ 247 NONAME ; ## + _ZTV17CApaSystemControl @ 248 NONAME ; ## + _ZTV19CApaAppListNotifier @ 249 NONAME ; ## + _ZTV19CApaWindowGroupName @ 250 NONAME ; ## + _ZTV20TViewDataArrayFiller @ 251 NONAME ; ## + _ZTV21CApaAppInfoFileReader @ 252 NONAME ABSENT ; ## + _ZTV21CApaAppInfoFileWriter @ 253 NONAME ; ## + _ZTV21CApaSystemControlList @ 254 NONAME ; ## + _ZTV7HBufBuf @ 255 NONAME ; ## + _ZTV8CApaDoor @ 256 NONAME ; ## + _ZN11CApaAppList4NewLER3RFsP13CApaAppFinderP16CApaAppRegFinderi @ 257 NONAME ABSENT + _ZNK11CApaAppData12IconFileNameEv @ 258 NONAME + _ZNK11CApaAppData14NonMbmIconFileEv @ 259 NONAME + _ZNK11CApaAppData19DefaultScreenNumberEv @ 260 NONAME + _ZNK11CApaAppData20RegistrationFileUsedEv @ 261 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidRP7HBufC16 @ 262 NONAME + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RP7HBufC16 @ 263 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjj @ 264 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjji @ 265 NONAME + _ZNK15CApaAppViewData12IconFileNameEv @ 266 NONAME + _ZNK15CApaAppViewData14NonMbmIconFileEv @ 267 NONAME + _ZTI17CApaAppInfoReader @ 268 NONAME ; ## + _ZTI19CApaAppInfoReaderV1 @ 269 NONAME ABSENT ; ## + _ZTI19CApaAppInfoReaderV2 @ 270 NONAME ; ## + _ZTV17CApaAppInfoReader @ 271 NONAME ; ## + _ZTV19CApaAppInfoReaderV1 @ 272 NONAME ABSENT ; ## + _ZTV19CApaAppInfoReaderV2 @ 273 NONAME ; ## + _Z16StartupApaServerR14MApaAppStarter @ 274 NONAME + _Z23StartupApaServerProcessv @ 275 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType @ 276 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypel4TUid @ 277 NONAME + _ZN13RApaLsSession25InsertDataMappingIfHigherERK9TDataTypel4TUidRi @ 278 NONAME + _ZNK11CApaAppData19ApplicationLanguageEv @ 279 NONAME + _ZNK13RApaLsSession19ApplicationLanguageE4TUidR9TLanguage @ 280 NONAME + _ZN21CApaSystemControlList4NewLER3RFs @ 281 NONAME + _ZNK11CApaAppData17ImplementsServiceE4TUid @ 282 NONAME + _ZNK11CApaAppList17ServiceUidBufferLE4TUid @ 283 NONAME + _ZNK11CApaAppList19ServiceArrayBufferLE4TUid @ 284 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataTypePK4TUidRi @ 285 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUid @ 286 NONAME + _ZNK11CApaAppList24ServiceOpaqueDataBufferLE4TUidS0_ @ 287 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUid @ 288 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUidi @ 289 NONAME + _ZNK13RApaLsSession15GetAppServicesLE4TUidR13CArrayFixFlatIS0_E @ 290 NONAME + _ZNK13RApaLsSession16GetAppServicesLCE4TUid @ 291 NONAME + _ZNK13RApaLsSession24AppForDataTypeAndServiceERK9TDataType4TUidRS3_ @ 292 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK5RFile4TUidRS3_R9TDataType @ 293 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK7TDesC164TUidRS3_R9TDataType @ 294 NONAME + _ZNK13RApaLsSession25GetAppServiceOpaqueDataLCE4TUidS0_ @ 295 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUid @ 296 NONAME + _ZNK18TApaAppServiceInfo10OpaqueDataEv @ 297 NONAME + _ZNK18TApaAppServiceInfo3UidEv @ 298 NONAME + _ZTI30CApaAppServiceInfoArrayWrapper @ 299 NONAME ; ## + _ZTV30CApaAppServiceInfoArrayWrapper @ 300 NONAME ; ## + _ZN13RApaLsSession13StartDocumentER5RFileR9TThreadIdP14TRequestStatus @ 301 NONAME + _ZN21CApaAppInfoFileReader27CreateMaskedBitmapByIndexLCEi @ 302 NONAME ABSENT + _ZNK13RApaLsSession36CancelListPopulationCompleteObserverEv @ 303 NONAME + _ZNK13RApaLsSession38RegisterListPopulationCompleteObserverER14TRequestStatus @ 304 NONAME + _ZN8ApaUtils24HandleAsRegistrationFileERK8TUidType @ 305 NONAME + _ZN13RApaLsSession33RegisterJavaMIDletViaIterimFormatERK7TDesC16R5RFile @ 306 NONAME ABSENT + _ZN22ForJavaMIDletInstaller33CheckInterimFormatFileNotCorruptLER5RFile @ 307 NONAME + _ZN13RApaLsSession20DeregisterJavaMIDletERK7TDesC16 @ 308 NONAME ABSENT + _ZN13RApaLsSession13SetFsSessionLER3RFs @ 309 NONAME + _ZN13RApaLsSession13StartDocumentER5RFile4TUidR9TThreadIdP14TRequestStatus @ 310 NONAME + _ZN13RApaLsSession13StartDocumentER5RFileRK9TDataTypeR9TThreadIdP14TRequestStatus @ 311 NONAME + _ZN13RApaLsSession14ClearFsSessionEv @ 312 NONAME + _ZN13RApaLsSession9FsSessionEv @ 313 NONAME + _ZNK13RApaLsSession13RecognizeDataERK5RFileR22TDataRecognitionResult @ 314 NONAME + _ZNK13RApaLsSession14AppForDocumentERK5RFileR4TUidR9TDataType @ 315 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK5RFileRK9TDataTypeRi @ 316 NONAME + _ZNK13RApaLsSession19GetPreferredBufSizeERi @ 317 NONAME + _ZN22ForJavaMIDletInstaller18GetJavaMIDletInfoLER3RFsRK7TDesC16RmS5_ @ 318 NONAME + _ZN22ForJavaMIDletInstaller28NewInterimFormatFileWriterLCER3RFsRK7TDesC164TUidmi @ 319 NONAME + _ZNK18TApaAppServiceInfo9DataTypesEv @ 320 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUidRK9TDataType @ 321 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUidRK9TDataType @ 322 NONAME + _ZN13RApaLsSession5CloseEv @ 323 NONAME + _ZTI22CApaLsSessionExtension @ 324 NONAME ; ## + _ZTV22CApaLsSessionExtension @ 325 NONAME ; ## + _ZN13RApaLsSession23RApaLsSession_Reserved1Ev @ 326 NONAME + _ZN13RApaLsSession23RApaLsSession_Reserved2Ev @ 327 NONAME + _ZN18TApaPictureFactoryC1Ev @ 328 NONAME + _ZN18TApaPictureFactoryC2Ev @ 329 NONAME + _ZN23MApaAppListServObserver33MApaAppListServObserver_Reserved1Ev @ 330 NONAME + _ZN23MApaAppListServObserver33MApaAppListServObserver_Reserved2Ev @ 331 NONAME + _ZN23MApaAppListServObserverC2Ev @ 332 NONAME + _ZTI13RApaLsSession @ 333 NONAME ; ## + _ZTI23MApaAppListServObserver @ 334 NONAME ; ## + _ZTV13RApaLsSession @ 335 NONAME ; ## + _ZTV23MApaAppListServObserver @ 336 NONAME ; ## + _ZNK13RApaLsSession15RecognizeFilesLERK7TDesC16R27CDataRecognitionResultArray @ 337 NONAME + _ZN13RApaLsSession15RecognizeFilesLERK7TDesC16R27CDataRecognitionResultArrayR14TRequestStatus @ 338 NONAME + _ZNK13RApaLsSession15RecognizeFilesLERK7TDesC16RK6TDesC8R27CDataRecognitionResultArray @ 339 NONAME + _ZN13RApaLsSession15RecognizeFilesLERK7TDesC16RK6TDesC8R27CDataRecognitionResultArrayR14TRequestStatus @ 340 NONAME + _ZN13RApaLsSession20CancelRecognizeFilesEv @ 341 NONAME + _ZN27CDataRecognitionResultArrayC1Ev @ 342 NONAME + _ZN27CDataRecognitionResultArrayC2Ev @ 343 NONAME + _ZN27CDataRecognitionResultArrayD0Ev @ 344 NONAME + _ZN27CDataRecognitionResultArrayD1Ev @ 345 NONAME + _ZN27CDataRecognitionResultArrayD2Ev @ 346 NONAME + _ZNK27CDataRecognitionResultArray12GetFileNameLER4TBufILi256EEj @ 347 NONAME + _ZNK27CDataRecognitionResultArray25GetDataRecognitionResultLER22TDataRecognitionResultj @ 348 NONAME + _ZNK27CDataRecognitionResultArray4PathEv @ 349 NONAME + _ZNK27CDataRecognitionResultArray5CountEv @ 350 NONAME + _ZTI21CAsyncFileRecognition @ 351 NONAME ; ## + _ZTI27CDataRecognitionResultArray @ 352 NONAME ; ## + _ZTI32CDataRecognitionResultArrayEntry @ 353 NONAME ; ## + _ZTV21CAsyncFileRecognition @ 354 NONAME ; ## + _ZTV27CDataRecognitionResultArray @ 355 NONAME ; ## + _ZTV32CDataRecognitionResultArrayEntry @ 356 NONAME ; ## + _ZNK13RApaLsSession16GetAppByDataTypeERK9TDataType4TUidRS3_ @ 357 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType4TUid @ 358 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypel4TUidS3_ @ 359 NONAME + _ZN13RApaLsSession29RegisterNonNativeApplicationLE4TUidRK10TDriveUnitR34CApaRegistrationResourceFileWriterP33CApaLocalisableResourceFileWriterPK5RFile @ 360 NONAME + _ZN13RApaLsSession31DeregisterNonNativeApplicationLE4TUid @ 361 NONAME + _ZN13RApaLsSession33RegisterNonNativeApplicationTypeLE4TUidRK7TDesC16 @ 362 NONAME + _ZN13RApaLsSession35DeregisterNonNativeApplicationTypeLE4TUid @ 363 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadIdP14TRequestStatus @ 364 NONAME + _ZNK11CApaAppData10OpaqueDataEv @ 365 NONAME + _ZNK11CApaAppData20RegistrationFileNameEv @ 366 NONAME + _ZNK11CApaAppData27LocalisableResourceFileNameEv @ 367 NONAME + _ZNK11CApaAppList17AppDataByFileNameERK7TDesC16 @ 368 NONAME + _ZNK13RApaLsSession22GetDefaultScreenNumberERi4TUid @ 369 NONAME + _ZN11CApaAppList22FindAndAddSpecificAppLEP16CApaAppRegFinder4TUid @ 370 NONAME + _ZNK13RApaLsSession21MatchesSecurityPolicyERi4TUidRK15TSecurityPolicy @ 371 NONAME + _ZN33CApaLocalisableResourceFileWriterD1Ev @ 372 NONAME + _ZN33CApaLocalisableResourceFileWriterD2Ev @ 373 NONAME + _ZN34CApaRegistrationResourceFileWriter12AddDataTypeLEiRK6TDesC8 @ 374 NONAME + _ZN34CApaRegistrationResourceFileWriter13SetGroupNameLERK7TDesC16 @ 375 NONAME + _ZN34CApaRegistrationResourceFileWriter14SetOpaqueDataLERK6TDesC8 @ 376 NONAME + _ZN34CApaRegistrationResourceFileWriter15SetAppIsHiddenLEi @ 377 NONAME + _ZN34CApaRegistrationResourceFileWriter17SetEmbeddabilityLEN17TApaAppCapability14TEmbeddabilityE @ 378 NONAME + _ZN34CApaRegistrationResourceFileWriter19SetSupportsNewFileLEi @ 379 NONAME + _ZN34CApaRegistrationResourceFileWriter21AddFileOwnershipInfoLERK7TDesC16 @ 380 NONAME + _ZN34CApaRegistrationResourceFileWriter22SetLaunchInBackgroundLEi @ 381 NONAME + _ZN34CApaRegistrationResourceFileWriter23SetDefaultScreenNumberLEi @ 382 NONAME + _ZN34CApaRegistrationResourceFileWriter4NewLE4TUidRK7TDesC16j @ 383 NONAME + _ZN34CApaRegistrationResourceFileWriterD0Ev @ 384 NONAME + _ZN34CApaRegistrationResourceFileWriterD1Ev @ 385 NONAME + _ZN34CApaRegistrationResourceFileWriterD2Ev @ 386 NONAME + _ZNK11CApaAppData24NonNativeApplicationTypeEv @ 387 NONAME + _ZTI33CApaLocalisableResourceFileWriter @ 388 NONAME ; ## + _ZTI34CApaRegistrationResourceFileWriter @ 389 NONAME ; ## + _ZTIN26CApaResourceFileWriterBase11RBufferSinkE @ 390 NONAME ; ## + _ZTV33CApaLocalisableResourceFileWriter @ 391 NONAME ; ## + _ZTV34CApaRegistrationResourceFileWriter @ 392 NONAME ; ## + _ZTVN26CApaResourceFileWriterBase11RBufferSinkE @ 393 NONAME ; ## + _ZN33CApaLocalisableResourceFileWriter4NewLERK7TDesC16S2_iS2_ @ 394 NONAME + _ZN33CApaLocalisableResourceFileWriterD0Ev @ 395 NONAME + _ZN13RApaLsSession12CancelNotifyEv @ 396 NONAME + _ZN13RApaLsSession9SetNotifyEiR14TRequestStatus @ 397 NONAME + _ZNK11CApaAppList17AppScanInProgressEv @ 398 NONAME + _ZN13RApaLsSession25NotifyOnDataMappingChangeER14TRequestStatus @ 399 NONAME + _ZN13RApaLsSession31CancelNotifyOnDataMappingChangeEv @ 400 NONAME + _ZNK13RApaLsSession10GetAppTypeER4TUidS0_ @ 401 NONAME + _ZN13RApaLsSession35CommitNonNativeApplicationsUpdatesLEv @ 402 NONAME + _ZN13RApaLsSession36PrepareNonNativeApplicationsUpdatesLEv @ 403 NONAME + _ZN13RApaLsSession36RollbackNonNativeApplicationsUpdatesEv @ 404 NONAME + _ZN11CApaAppList15UpdatedAppsListEv @ 405 NONAME ABSENT + _ZN11CApaAppList18SetUpdatedAppsListEP16CUpdatedAppsList @ 406 NONAME ABSENT + _ZN11CApaAppData4NewLERK12TApaAppEntryR3RFs @ 407 NONAME + _ZN11CApaAppDataD0Ev @ 408 NONAME + _ZN11CApaAppDataD1Ev @ 409 NONAME + _ZN11CApaAppDataD2Ev @ 410 NONAME + _ZN11CApaAppList24ShareProtectedFileServerEv @ 411 NONAME ABSENT + _ZN11CApaAppList4SelfEv @ 412 NONAME + X @ 413 NONAME ABSENT + X @ 414 NONAME ABSENT + X @ 415 NONAME ABSENT + X @ 416 NONAME ABSENT + _ZN13RApaLsSession18SetAppShortCaptionERK7TDesC169TLanguage4TUid @ 417 NONAME + _ZN11CApaAppData16SetShortCaptionLERK7TDesC16 @ 418 NONAME + _ZN11CApaAppList14CompareStringsERK7HBufC16S2_ @ 419 NONAME + _ZN11CApaAppList22AddForcedRegistrationLEP7HBufC16 @ 420 NONAME + _ZN13RApaLsSession17ForceRegistrationERK13RPointerArrayI7TDesC16E @ 421 NONAME + _ZN11CApaAppList24ResetForcedRegistrationsEv @ 422 NONAME + _ZN11CApaAppList12RestartScanLEv @ 423 NONAME + _ZN11CApaAppList8StopScanEi @ 424 NONAME + KMinApplicationStackSize @ 425 NONAME DATA 4 + _Z23MinApplicationStackSizev @ 426 NONAME + _ZNK11CApaAppData9IsPendingEv @ 427 NONAME + _ZNK11CApaAppList23IsLanguageChangePendingEv @ 428 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidR5RFile @ 429 NONAME + _ZN17CApaSecurityUtils16CheckAppSecurityERK7TPtrC16RiS3_ @ 430 NONAME + _ZN11CApaAppData11SetCaptionLERK7TDesC16 @ 431 NONAME + _ZN11CApaAppData9SetIconsLERK7TDesC16i @ 432 NONAME + _ZN13RApaLsSession40ForceCommitNonNativeApplicationsUpdatesLEv @ 433 NONAME + _ZN11CApaAppList20AppListUpdatePendingEv @ 434 NONAME + _ZN11CApaAppList19UninstalledAppArrayEv @ 435 NONAME + \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APPARCTESTSERVERU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APPARCTESTSERVERU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2 @@ +EXPORTS + NewServer__Fv @ 1 NONAME R3UNUSED ; NewServer(void) \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APPARCU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APPARCU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,259 @@ +EXPORTS + _ZN11CApaProcess10ConstructLEv @ 1 NONAME + _ZN11CApaProcess15AddNewDocumentLERK7TDesC164TUid @ 2 NONAME + _ZN11CApaProcess15DestroyDocumentEP12CApaDocument @ 3 NONAME + _ZN11CApaProcess15SetMainDocumentEP12CApaDocument @ 4 NONAME + _ZN11CApaProcess16OpenNewDocumentLERP10CFileStoreRP17CStreamDictionaryRK7TDesC16j @ 5 NONAME + _ZN11CApaProcess16ReadRootStreamLCER3RFsRP10CFileStoreRK7TDesC16j @ 6 NONAME + _ZN11CApaProcess16WriteRootStreamLER16CPersistentStoreR17CStreamDictionaryRK15CApaApplication @ 7 NONAME + _ZN11CApaProcess16WriteRootStreamLER16CPersistentStoreR17CStreamDictionaryRK17TApaAppIdentifier @ 8 NONAME + _ZN11CApaProcess18ReadAppIdentifierLERK12CStreamStoreRK17CStreamDictionary @ 9 NONAME + _ZN11CApaProcess18SetMainDocFileNameERK7TDesC16 @ 10 NONAME + _ZN11CApaProcess19WriteAppIdentifierLER12CStreamStoreR17CStreamDictionaryRK17TApaAppIdentifier @ 11 NONAME + _ZN11CApaProcess4NewLERK3RFsR13CApaAppFinder @ 12 NONAME + _ZN11CApaProcess6ResetLEv @ 13 NONAME + _ZN11CApaProcessC1ERK3RFsR13CApaAppFinder @ 14 NONAME + _ZN11CApaProcessC2ERK3RFsR13CApaAppFinder @ 15 NONAME + _ZN11CApaProcessD0Ev @ 16 NONAME + _ZN11CApaProcessD1Ev @ 17 NONAME + _ZN11CApaProcessD2Ev @ 18 NONAME + _ZN11TApaAppInfo12InternalizeLER11RReadStream @ 19 NONAME + _ZN11TApaAppInfoC1E4TUidRK4TBufILi256EES4_ @ 20 NONAME + _ZN11TApaAppInfoC1E4TUidRK4TBufILi256EES4_S4_ @ 21 NONAME + _ZN11TApaAppInfoC1Ev @ 22 NONAME + _ZN11TApaAppInfoC2E4TUidRK4TBufILi256EES4_ @ 23 NONAME + _ZN11TApaAppInfoC2E4TUidRK4TBufILi256EES4_S4_ @ 24 NONAME + _ZN11TApaAppInfoC2Ev @ 25 NONAME + _ZN12CApaDocument9OpenFileLERP10CFileStoreR5RFile @ 26 NONAME + _ZN12CApaDocument10Reserved_2Ev @ 27 NONAME + _ZN12CApaDocument11TCapabilityC1Ev @ 28 NONAME + _ZN12CApaDocument11TCapabilityC2Ev @ 29 NONAME + _ZN12CApaDocument13GlassPictureLEv @ 30 NONAME + _ZN11CApaProcess19SetMainDocFileNameLERK7TDesC16 @ 31 NONAME + _ZN12CApaDocumentC2ER15CApaApplicationR11CApaProcess @ 32 NONAME + _ZN12CApaDocumentD0Ev @ 33 NONAME + _ZN12CApaDocumentD1Ev @ 34 NONAME + _ZN12CApaDocumentD2Ev @ 35 NONAME + _ZN12CApaDoorBase22InternalizeBaseStreamLERK12CStreamStoreRK17CStreamDictionary @ 36 NONAME + _ZN12TApaAppEntry12InternalizeLER11RReadStream @ 37 NONAME + _ZN12TApaAppEntryC1ERK8TUidTypeRK4TBufILi256EE @ 38 NONAME + _ZN12TApaAppEntryC1Ev @ 39 NONAME + _ZN12TApaAppEntryC2ERK8TUidTypeRK4TBufILi256EE @ 40 NONAME + _ZN12TApaAppEntryC2Ev @ 41 NONAME + _ZN13CApaModelDoor14SetScaleFactorEii @ 42 NONAME + _ZN13CApaModelDoor16DetachFromStoreLEN8CPicture7TDetachE @ 43 NONAME + _ZN13CApaModelDoor4NewLEP15CApaModelHeader @ 44 NONAME + _ZN13CApaModelDoor4NewLERK12CStreamStore9TStreamIdPK22MApaModelHeaderFactory @ 45 NONAME + _ZN13CApaModelDoor5NewLCEP15CApaModelHeader @ 46 NONAME + _ZN13CApaModelDoor8RestoreLERK12CStreamStore9TStreamIdPK22MApaModelHeaderFactory @ 47 NONAME + _ZN13CApaModelDoorD0Ev @ 48 NONAME + _ZN13CApaModelDoorD1Ev @ 49 NONAME + _ZN13CApaModelDoorD2Ev @ 50 NONAME + _ZN14CApaRecentFile14GetRecentFileLER3RFs4TUidi @ 51 NONAME ABSENT + _ZN14CApaRecentFile17AddLastUsedEntryLER3RFsRK7TDesC164TUid @ 52 NONAME ABSENT + _ZN14CApaRecentFile18GetRecentFileListLER3RFs4TUid @ 53 NONAME ABSENT + _ZN15CApaApplication13NewAppServerLERP13CApaAppServer @ 54 NONAME + _ZN15CApaApplication16GenerateFileNameER3RFsR4TBufILi256EE @ 55 NONAME + _ZN15CApaCommandLine11SetCommandLE11TApaCommand @ 56 NONAME + _ZN15CApaCommandLine11SetTailEndLERK6TDesC8 @ 57 NONAME + _ZN15CApaCommandLine15SetLibraryNameLERK7TDesC16 @ 58 NONAME + _ZN15CApaCommandLine16SetDocumentNameLERK7TDesC16 @ 59 NONAME + _ZN15CApaCommandLine17SetReserveLengthLEi @ 60 NONAME + _ZN15CApaCommandLine18SetFullCommandLineEP7HBufC16 @ 61 NONAME + _ZN15CApaCommandLine19SetFullCommandLineLERK7TDesC16 @ 62 NONAME + _ZN15CApaCommandLine3NewEP7HBufC16 @ 63 NONAME + _ZN15CApaCommandLine4NewLERK7TDesC16 @ 64 NONAME + _ZN15CApaCommandLine4NewLEv @ 65 NONAME + _ZN15CApaCommandLine5NewLCERK7TDesC16 @ 66 NONAME + _ZN15CApaCommandLine5NewLCEv @ 67 NONAME + _ZN15CApaCommandLineD0Ev @ 68 NONAME + _ZN15CApaCommandLineD1Ev @ 69 NONAME + _ZN15CApaCommandLineD2Ev @ 70 NONAME + _ZN15CApaModelHeader10Reserved_1Ev @ 71 NONAME + _ZN15TApaAppInfo_7_012InternalizeLER11RReadStream @ 72 NONAME ABSENT + _ZN15TApaAppInfo_7_0C1E4TUidRK4TBufILi256EES4_ @ 73 NONAME ABSENT + _ZN15TApaAppInfo_7_0C1Ev @ 74 NONAME ABSENT + _ZN15TApaAppInfo_7_0C2E4TUidRK4TBufILi256EES4_ @ 75 NONAME ABSENT + _ZN15TApaAppInfo_7_0C2Ev @ 76 NONAME ABSENT + _ZN15TApaAppViewInfo12InternalizeLER11RReadStream @ 77 NONAME + _ZN15TApaAppViewInfoC1E4TUidRK4TBufILi256EEi @ 78 NONAME + _ZN15TApaAppViewInfoC1Ev @ 79 NONAME + _ZN15TApaAppViewInfoC2E4TUidRK4TBufILi256EEi @ 80 NONAME + _ZN15TApaAppViewInfoC2Ev @ 81 NONAME + _ZN17TApaAppCapability12InternalizeLER11RReadStream @ 82 NONAME + _ZN17TApaAppCapability14CopyCapabilityER5TDes8RK6TDesC8 @ 83 NONAME + _ZN17TApaAppCapability15Internalize7_0LER11RReadStream @ 84 NONAME + _ZN17TApaAppIdentifier12InternalizeLER11RReadStream @ 85 NONAME + _ZN17TApaAppIdentifierC1E4TUidRK4TBufILi256EE @ 86 NONAME + _ZN17TApaAppIdentifierC1Ev @ 87 NONAME + _ZN17TApaAppIdentifierC2E4TUidRK4TBufILi256EE @ 88 NONAME + _ZN17TApaAppIdentifierC2Ev @ 89 NONAME + _ZN17TApaLastUsedEntry12InternalizeLER11RReadStream @ 90 NONAME ABSENT + _ZN17TApaLastUsedEntryC1E4TBufILi256EE4TUid @ 91 NONAME ABSENT + _ZN17TApaLastUsedEntryC1Ev @ 92 NONAME ABSENT + _ZN17TApaLastUsedEntryC2E4TBufILi256EE4TUid @ 93 NONAME ABSENT + _ZN17TApaLastUsedEntryC2Ev @ 94 NONAME ABSENT + _ZN18CApaFileRecognizer13SetAppLocatorEP14CApaAppLocator @ 95 NONAME + _ZN18CApaFileRecognizer14RecognizeFileLERK7TDesC16PK8TUidType @ 96 NONAME + _ZN18CApaFileRecognizer21AddFileRecognizerTypeEP22CApaFileRecognizerType @ 97 NONAME + _ZN18CApaFileRecognizer21DestroyRecognizerListEv @ 98 NONAME + _ZN18CApaFileRecognizer24RemoveFileRecognizerTypeEPK22CApaFileRecognizerType @ 99 NONAME + _ZN18CApaFileRecognizerC1ER3RFs @ 100 NONAME + _ZN18CApaFileRecognizerC2ER3RFs @ 101 NONAME + _ZN18CApaFileRecognizerD0Ev @ 102 NONAME + _ZN18CApaFileRecognizerD1Ev @ 103 NONAME + _ZN18CApaFileRecognizerD2Ev @ 104 NONAME + _ZN18TApaDocCleanupItem9DoCleanupEPv @ 105 NONAME + _ZN20TApaModelDoorFactoryC1EPK22MApaModelHeaderFactory @ 106 NONAME + _ZN20TApaModelDoorFactoryC2EPK22MApaModelHeaderFactory @ 107 NONAME + _ZN22CApaFileRecognizerType10Reserved_1Ev @ 108 NONAME + _ZN22CApaFileRecognizerType4LockEv @ 109 NONAME + _ZN22CApaFileRecognizerType6UnlockEv @ 110 NONAME + _ZTV22CApaFileRecognizerType @ 111 NONAME ; ## + _ZN22CApaFileRecognizerTypeC2Ev @ 112 NONAME + _ZN22CApaFileRecognizerTypeD0Ev @ 113 NONAME + _ZN22CApaFileRecognizerTypeD1Ev @ 114 NONAME + _ZN22CApaFileRecognizerTypeD2Ev @ 115 NONAME + _ZN23TApaEmbeddabilityFilter16AddEmbeddabilityEN17TApaAppCapability14TEmbeddabilityE @ 116 NONAME + _ZN23TApaEmbeddabilityFilterC1Ev @ 117 NONAME + _ZN23TApaEmbeddabilityFilterC2Ev @ 118 NONAME + _ZNK11CApaProcess15MainDocFileNameEv @ 119 NONAME + _ZNK11TApaAppInfo12ExternalizeLER12RWriteStream @ 120 NONAME + _ZNK12CApaDocument10CapabilityEv @ 121 NONAME + _ZNK12CApaDocument12ExternalizeLER12RWriteStream @ 122 NONAME + _ZNK12CApaDocument17ValidatePasswordLEv @ 123 NONAME + _ZNK12CApaDoorBase22ExternalizeBaseStreamLER12CStreamStoreR17CStreamDictionary @ 124 NONAME + _ZNK12TApaAppEntry12ExternalizeLER12RWriteStream @ 125 NONAME + _ZNK13CApaModelDoor12ExternalizeLER12RWriteStream @ 126 NONAME + _ZNK13CApaModelDoor16ScaleFactorWidthEv @ 127 NONAME + _ZNK13CApaModelDoor17ScaleFactorHeightEv @ 128 NONAME + _ZNK13CApaModelDoor22GetOriginalSizeInTwipsER5TSize @ 129 NONAME + _ZNK13CApaModelDoor4DrawER16CGraphicsContextRK6TPointRK5TRectP18MGraphicsDeviceMap @ 130 NONAME + _ZNK13CApaModelDoor6StoreLER12CStreamStore @ 131 NONAME + _ZNK15CApaApplication11AppFullNameEv @ 132 NONAME + _ZNK15CApaApplication12OpenIniFileLER3RFs @ 133 NONAME + _ZNK15CApaApplication16OpenAppInfoFileLEv @ 134 NONAME + _ZNK15CApaApplication7DllNameEv @ 135 NONAME + _ZNK15CApaCommandLine11LibraryNameEv @ 136 NONAME + _ZNK15CApaCommandLine12DocumentNameEv @ 137 NONAME + _ZNK15CApaCommandLine15FullCommandLineEv @ 138 NONAME + _ZNK15CApaCommandLine7CommandEv @ 139 NONAME + _ZNK15CApaCommandLine7TailEndEv @ 140 NONAME + _ZNK15TApaAppInfo_7_012ExternalizeLER12RWriteStream @ 141 NONAME ABSENT + _ZNK15TApaAppViewInfo12ExternalizeLER12RWriteStream @ 142 NONAME + _ZNK17TApaAppCapability12ExternalizeLER12RWriteStream @ 143 NONAME + _ZNK17TApaAppCapability15Externalize7_0LER12RWriteStream @ 144 NONAME + _ZNK17TApaAppIdentifier12ExternalizeLER12RWriteStream @ 145 NONAME + _ZNK17TApaLastUsedEntry12ExternalizeLER12RWriteStream @ 146 NONAME ABSENT + _ZNK18CApaFileRecognizer10AppLocatorEv @ 147 NONAME + _ZNK20TApaModelDoorFactory11NewPictureLER14TPictureHeaderRK12CStreamStore @ 148 NONAME + _ZNK22CApaFileRecognizerType10CapabilityER5TDes8 @ 149 NONAME + _ZNK22CApaFileRecognizerType7AppRunLERK15CApaCommandLine @ 150 NONAME + _ZNK23TApaEmbeddabilityFilter20MatchesEmbeddabilityEN17TApaAppCapability14TEmbeddabilityE @ 151 NONAME + _ZTI11CApaProcess @ 152 NONAME ; ## + _ZTI12CApaDocument @ 153 NONAME ; ## + _ZTI15CApaApplication @ 154 NONAME ; ## + _ZTI15CApaModelHeader @ 155 NONAME ; ## + _ZTI18CApaFileRecognizer @ 156 NONAME ; ## + _ZTI20TApaModelDoorFactory @ 157 NONAME ; ## + _ZTI22CApaFileRecognizerType @ 158 NONAME ; ## + _ZTV11CApaProcess @ 159 NONAME ; ## + _ZTV12CApaDocument @ 160 NONAME ; ## + _ZTV15CApaApplication @ 161 NONAME ; ## + _ZTV15CApaModelHeader @ 162 NONAME ; ## + _ZTV18CApaFileRecognizer @ 163 NONAME ; ## + _ZTV20TApaModelDoorFactory @ 164 NONAME ; ## + _ZN22CApaFileRecognizerType21CreateFileRecognizerLE4TUid @ 165 NONAME + _ZN11CApaProcess15AddNewDocumentLE22TApaApplicationFactory @ 166 NONAME + _ZN15CApaApplicationD0Ev @ 167 NONAME + _ZN15CApaApplicationD1Ev @ 168 NONAME + _ZN15CApaApplicationD2Ev @ 169 NONAME + _ZN22TApaApplicationFactoryC1E4TUid @ 170 NONAME + _ZN22TApaApplicationFactoryC1EPFP15CApaApplicationvE @ 171 NONAME + _ZN22TApaApplicationFactoryC1ERK26CImplementationInformation @ 172 NONAME + _ZN22TApaApplicationFactoryC2E4TUid @ 173 NONAME + _ZN22TApaApplicationFactoryC2EPFP15CApaApplicationvE @ 174 NONAME + _ZN22TApaApplicationFactoryC2ERK26CImplementationInformation @ 175 NONAME + _ZTI13CApaAppHolder @ 176 NONAME ; ## + _ZTI13CApaModelDoor @ 177 NONAME ; ## + _ZTI15CApaCommandLine @ 178 NONAME ; ## + _ZTI24CFileRecognizerExtension @ 179 NONAME ; ## + _ZTI7CApaDll @ 180 NONAME ; ## + _ZTI7CApaExe @ 181 NONAME ; ## + _ZTI7HBufBuf @ 182 NONAME ; ## + _ZTV13CApaAppHolder @ 183 NONAME ; ## + _ZTV13CApaModelDoor @ 184 NONAME ; ## + _ZTV15CApaCommandLine @ 185 NONAME ; ## + _ZTV24CFileRecognizerExtension @ 186 NONAME ; ## + _ZTV7CApaDll @ 187 NONAME ; ## + _ZTV7CApaExe @ 188 NONAME ; ## + _ZTV7HBufBuf @ 189 NONAME ; ## + _ZN13CApaAppServer10ConstructLERK7TDesC16 @ 190 NONAME + _ZN13CApaAppServer16NotifyServerExitEi @ 191 NONAME + _ZN13CApaAppServer20CustomSecurityCheckLERK9RMessage2RiR13TSecurityInfo @ 192 NONAME + _ZN13CApaAppServer27CreateServiceSecurityCheckLE4TUidRK9RMessage2RiR13TSecurityInfo @ 193 NONAME + _ZN13CApaAppServerC1Ev @ 194 NONAME + _ZN13CApaAppServerC2Ev @ 195 NONAME + _ZN13CApaAppServerD0Ev @ 196 NONAME + _ZN13CApaAppServerD1Ev @ 197 NONAME + _ZN13CApaAppServerD2Ev @ 198 NONAME + _ZN15CApaCommandLine18SetServerRequiredLEj @ 199 NONAME + _ZN15CApaCommandLine21SetServerNotRequiredLEv @ 200 NONAME + _ZN18CApaAppServiceBase12ServiceErrorERK9RMessage2i @ 201 NONAME + _ZN18CApaAppServiceBase14SecurityCheckLERK9RMessage2RiR13TSecurityInfo @ 202 NONAME + _ZN18CApaAppServiceBase7CreateLEv @ 203 NONAME + _ZN18CApaAppServiceBase8ServiceLERK9RMessage2 @ 204 NONAME + _ZN18CApaAppServiceBaseC1Ev @ 205 NONAME + _ZN18CApaAppServiceBaseC2Ev @ 206 NONAME + _ZN18CApaAppServiceBaseD0Ev @ 207 NONAME + _ZN18CApaAppServiceBaseD1Ev @ 208 NONAME + _ZN18CApaAppServiceBaseD2Ev @ 209 NONAME + _ZN18RApaAppServiceBase10ServerNameEv @ 210 NONAME + _ZN18RApaAppServiceBase16NotifyServerExitER14TRequestStatus @ 211 NONAME + _ZN18RApaAppServiceBase19ConnectExistingAppLERKS_ @ 212 NONAME + _ZN18RApaAppServiceBase22CancelNotifyServerExitEv @ 213 NONAME + _ZN18RApaAppServiceBase22ConnectExistingByNameLERK7TDesC16 @ 214 NONAME + _ZN18RApaAppServiceBase5CloseEv @ 215 NONAME + _ZN18RApaAppServiceBaseC2Ev @ 216 NONAME + _ZN24CApaServerAppExitMonitor4NewLER18RApaAppServiceBaseR25MApaServerAppExitObserveri @ 217 NONAME + _ZN24CApaServerAppExitMonitor5NewLCER18RApaAppServiceBaseR25MApaServerAppExitObserveri @ 218 NONAME + _ZN24CApaServerAppExitMonitorD0Ev @ 219 NONAME + _ZN24CApaServerAppExitMonitorD1Ev @ 220 NONAME + _ZN24CApaServerAppExitMonitorD2Ev @ 221 NONAME + _ZNK13CApaAppServer11NewSessionLERK8TVersionRK9RMessage2 @ 222 NONAME + _ZNK13CApaAppServer14CreateServiceLE4TUid @ 223 NONAME + _ZNK15CApaCommandLine14ServerRequiredEv @ 224 NONAME + _ZTI13CApaAppServer @ 225 NONAME ; ## + _ZTI18CApaAppServiceBase @ 226 NONAME ; ## + _ZTI24CApaServerAppExitMonitor @ 227 NONAME ; ## + _ZTV13CApaAppServer @ 228 NONAME ; ## + _ZTV18CApaAppServiceBase @ 229 NONAME ; ## + _ZTV24CApaServerAppExitMonitor @ 230 NONAME ; ## + _ZN13CApaAppServer18ExtensionInterfaceE4TUidRPv @ 231 NONAME + _ZN18CApaAppServiceBase18ExtensionInterfaceE4TUidRPv @ 232 NONAME + _ZN18RApaAppServiceBase18ExtensionInterfaceE4TUidRPv @ 233 NONAME + _ZTI18RApaAppServiceBase @ 234 NONAME ; ## + _ZTV18RApaAppServiceBase @ 235 NONAME ; ## + _ZN15CApaCommandLine27EnvironmentSlotForPublicUseEi @ 236 NONAME + _ZN15CApaCommandLine16SetFileByHandleLERK5RFile @ 237 NONAME + _ZNK15CApaCommandLine16GetFileByHandleLER5RFile @ 238 NONAME + _ZN15CApaCommandLine18SetExecutableNameLERK7TDesC16 @ 239 NONAME + _ZN11CApaProcessC1ERK3RFs @ 240 NONAME + _ZN11CApaProcessC2ERK3RFs @ 241 NONAME + _ZN15CApaCommandLine28ConstructCmdLineFromMessageLERK9RMessage2 @ 242 NONAME + _ZN15CApaCommandLine36GetCommandLineFromProcessEnvironmentERPS_ @ 243 NONAME + _ZNK15CApaCommandLine12GetIpcArgsLCER8TIpcArgs @ 244 NONAME + Apparc_Dummy1 @ 245 NONAME + _ZNK15CApaCommandLine14ExecutableNameEv @ 246 NONAME + Apparc_Dummy2 @ 247 NONAME + _ZNK15CApaCommandLine22SetProcessEnvironmentLER8RProcess @ 248 NONAME + _ZN11CApaProcess4NewLERK3RFs @ 249 NONAME + _ZN15CApaCommandLine17SetDefaultScreenLEi @ 250 NONAME + _ZNK15CApaCommandLine13DefaultScreenEv @ 251 NONAME + _ZN15CApaCommandLine22SetParentWindowGroupIDEi @ 252 NONAME + _ZNK15CApaCommandLine19ParentWindowGroupIDEv @ 253 NONAME + _ZNK15CApaCommandLine12DebugMemFailEv @ 254 NONAME + _ZN15CApaCommandLine40SetAppStartupInstrumentationEventIdBaseLEi @ 255 NONAME + _ZNK15CApaCommandLine36AppStartupInstrumentationEventIdBaseEv @ 256 NONAME + _ZN11CApaProcess16ReadRootStreamLCERP10CFileStoreRK5RFile @ 257 NONAME + _ZN15CApaCommandLine16SetDebugMemFailLEi @ 258 NONAME diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APPARC_9_REMOVE_UI_FRAMEWORKS_V1U.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APPARC_9_REMOVE_UI_FRAMEWORKS_V1U.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,336 @@ +EXPORTS + _ZN11CApaProcess10ConstructLEv @ 1 NONAME + _ZN11CApaProcess15AddNewDocumentLERK7TDesC164TUid @ 2 NONAME ABSENT + _ZN11CApaProcess15DestroyDocumentEP12CApaDocument @ 3 NONAME + _ZN11CApaProcess15SetMainDocumentEP12CApaDocument @ 4 NONAME + _ZN11CApaProcess16OpenNewDocumentLERP10CFileStoreRP17CStreamDictionaryRK7TDesC16j @ 5 NONAME + _ZN11CApaProcess16ReadRootStreamLCER3RFsRP10CFileStoreRK7TDesC16j @ 6 NONAME + _ZN11CApaProcess16WriteRootStreamLER16CPersistentStoreR17CStreamDictionaryRK15CApaApplication @ 7 NONAME + _ZN11CApaProcess16WriteRootStreamLER16CPersistentStoreR17CStreamDictionaryRK17TApaAppIdentifier @ 8 NONAME + _ZN11CApaProcess18ReadAppIdentifierLERK12CStreamStoreRK17CStreamDictionary @ 9 NONAME + _ZN11CApaProcess18SetMainDocFileNameERK7TDesC16 @ 10 NONAME + _ZN11CApaProcess19WriteAppIdentifierLER12CStreamStoreR17CStreamDictionaryRK17TApaAppIdentifier @ 11 NONAME + _ZN11CApaProcess4NewLERK3RFsR13CApaAppFinder @ 12 NONAME ABSENT + _ZN11CApaProcess6ResetLEv @ 13 NONAME + _ZN11CApaProcessC1ERK3RFsR13CApaAppFinder @ 14 NONAME ABSENT + _ZN11CApaProcessC2ERK3RFsR13CApaAppFinder @ 15 NONAME ABSENT + _ZN11CApaProcessD0Ev @ 16 NONAME + _ZN11CApaProcessD1Ev @ 17 NONAME + _ZN11CApaProcessD2Ev @ 18 NONAME + _ZN11TApaAppInfo12InternalizeLER11RReadStream @ 19 NONAME + _ZN11TApaAppInfoC1E4TUidRK4TBufILi256EES4_ @ 20 NONAME + _ZN11TApaAppInfoC1E4TUidRK4TBufILi256EES4_S4_ @ 21 NONAME + _ZN11TApaAppInfoC1Ev @ 22 NONAME + _ZN11TApaAppInfoC2E4TUidRK4TBufILi256EES4_ @ 23 NONAME + _ZN11TApaAppInfoC2E4TUidRK4TBufILi256EES4_S4_ @ 24 NONAME + _ZN11TApaAppInfoC2Ev @ 25 NONAME + _ZN12CApaDocument9OpenFileLERP10CFileStoreR5RFile @ 26 NONAME + _ZN12CApaDocument10Reserved_2Ev @ 27 NONAME + _ZN12CApaDocument11TCapabilityC1Ev @ 28 NONAME + _ZN12CApaDocument11TCapabilityC2Ev @ 29 NONAME + _ZN12CApaDocument13GlassPictureLEv @ 30 NONAME + _ZN11CApaProcess19SetMainDocFileNameLERK7TDesC16 @ 31 NONAME + _ZN12CApaDocumentC2ER15CApaApplicationR11CApaProcess @ 32 NONAME + _ZN12CApaDocumentD0Ev @ 33 NONAME + _ZN12CApaDocumentD1Ev @ 34 NONAME + _ZN12CApaDocumentD2Ev @ 35 NONAME + _ZN12CApaDoorBase22InternalizeBaseStreamLERK12CStreamStoreRK17CStreamDictionary @ 36 NONAME + _ZN12TApaAppEntry12InternalizeLER11RReadStream @ 37 NONAME + _ZN12TApaAppEntryC1ERK8TUidTypeRK4TBufILi256EE @ 38 NONAME + _ZN12TApaAppEntryC1Ev @ 39 NONAME + _ZN12TApaAppEntryC2ERK8TUidTypeRK4TBufILi256EE @ 40 NONAME + _ZN12TApaAppEntryC2Ev @ 41 NONAME + _ZN13CApaModelDoor14SetScaleFactorEii @ 42 NONAME + _ZN13CApaModelDoor16DetachFromStoreLEN8CPicture7TDetachE @ 43 NONAME + _ZN13CApaModelDoor4NewLEP15CApaModelHeader @ 44 NONAME + _ZN13CApaModelDoor4NewLERK12CStreamStore9TStreamIdPK22MApaModelHeaderFactory @ 45 NONAME + _ZN13CApaModelDoor5NewLCEP15CApaModelHeader @ 46 NONAME + _ZN13CApaModelDoor8RestoreLERK12CStreamStore9TStreamIdPK22MApaModelHeaderFactory @ 47 NONAME + _ZN13CApaModelDoorD0Ev @ 48 NONAME + _ZN13CApaModelDoorD1Ev @ 49 NONAME + _ZN13CApaModelDoorD2Ev @ 50 NONAME + _ZN14CApaRecentFile14GetRecentFileLER3RFs4TUidi @ 51 NONAME ABSENT + _ZN14CApaRecentFile17AddLastUsedEntryLER3RFsRK7TDesC164TUid @ 52 NONAME ABSENT + _ZN14CApaRecentFile18GetRecentFileListLER3RFs4TUid @ 53 NONAME ABSENT + _ZN15CApaApplication13NewAppServerLERP13CApaAppServer @ 54 NONAME + _ZN15CApaApplication16GenerateFileNameER3RFsR4TBufILi256EE @ 55 NONAME + _ZN15CApaCommandLine11SetCommandLE11TApaCommand @ 56 NONAME + _ZN15CApaCommandLine11SetTailEndLERK6TDesC8 @ 57 NONAME + _ZN15CApaCommandLine15SetLibraryNameLERK7TDesC16 @ 58 NONAME ABSENT + _ZN15CApaCommandLine16SetDocumentNameLERK7TDesC16 @ 59 NONAME + _ZN15CApaCommandLine17SetReserveLengthLEi @ 60 NONAME ABSENT + _ZN15CApaCommandLine18SetFullCommandLineEP7HBufC16 @ 61 NONAME ABSENT + _ZN15CApaCommandLine19SetFullCommandLineLERK7TDesC16 @ 62 NONAME ABSENT + _ZN15CApaCommandLine3NewEP7HBufC16 @ 63 NONAME ABSENT + _ZN15CApaCommandLine4NewLERK7TDesC16 @ 64 NONAME ABSENT + _ZN15CApaCommandLine4NewLEv @ 65 NONAME + _ZN15CApaCommandLine5NewLCERK7TDesC16 @ 66 NONAME ABSENT + _ZN15CApaCommandLine5NewLCEv @ 67 NONAME + _ZN15CApaCommandLineD0Ev @ 68 NONAME + _ZN15CApaCommandLineD1Ev @ 69 NONAME + _ZN15CApaCommandLineD2Ev @ 70 NONAME + _ZN15CApaModelHeader10Reserved_1Ev @ 71 NONAME + _ZN15TApaAppInfo_7_012InternalizeLER11RReadStream @ 72 NONAME ABSENT + _ZN15TApaAppInfo_7_0C1E4TUidRK4TBufILi256EES4_ @ 73 NONAME ABSENT + _ZN15TApaAppInfo_7_0C1Ev @ 74 NONAME ABSENT + _ZN15TApaAppInfo_7_0C2E4TUidRK4TBufILi256EES4_ @ 75 NONAME ABSENT + _ZN15TApaAppInfo_7_0C2Ev @ 76 NONAME ABSENT + _ZN15TApaAppViewInfo12InternalizeLER11RReadStream @ 77 NONAME + _ZN15TApaAppViewInfoC1E4TUidRK4TBufILi256EEi @ 78 NONAME + _ZN15TApaAppViewInfoC1Ev @ 79 NONAME + _ZN15TApaAppViewInfoC2E4TUidRK4TBufILi256EEi @ 80 NONAME + _ZN15TApaAppViewInfoC2Ev @ 81 NONAME + _ZN17TApaAppCapability12InternalizeLER11RReadStream @ 82 NONAME + _ZN17TApaAppCapability14CopyCapabilityER5TDes8RK6TDesC8 @ 83 NONAME + _ZN17TApaAppCapability15Internalize7_0LER11RReadStream @ 84 NONAME + _ZN17TApaAppIdentifier12InternalizeLER11RReadStream @ 85 NONAME + _ZN17TApaAppIdentifierC1E4TUidRK4TBufILi256EE @ 86 NONAME + _ZN17TApaAppIdentifierC1Ev @ 87 NONAME + _ZN17TApaAppIdentifierC2E4TUidRK4TBufILi256EE @ 88 NONAME + _ZN17TApaAppIdentifierC2Ev @ 89 NONAME + _ZN17TApaLastUsedEntry12InternalizeLER11RReadStream @ 90 NONAME ABSENT + _ZN17TApaLastUsedEntryC1E4TBufILi256EE4TUid @ 91 NONAME ABSENT + _ZN17TApaLastUsedEntryC1Ev @ 92 NONAME ABSENT + _ZN17TApaLastUsedEntryC2E4TBufILi256EE4TUid @ 93 NONAME ABSENT + _ZN17TApaLastUsedEntryC2Ev @ 94 NONAME ABSENT + _ZN18CApaFileRecognizer13SetAppLocatorEP14CApaAppLocator @ 95 NONAME + _ZN18CApaFileRecognizer14RecognizeFileLERK7TDesC16PK8TUidType @ 96 NONAME + _ZN18CApaFileRecognizer21AddFileRecognizerTypeEP22CApaFileRecognizerType @ 97 NONAME + _ZN18CApaFileRecognizer21DestroyRecognizerListEv @ 98 NONAME + _ZN18CApaFileRecognizer24RemoveFileRecognizerTypeEPK22CApaFileRecognizerType @ 99 NONAME + _ZN18CApaFileRecognizerC1ER3RFs @ 100 NONAME + _ZN18CApaFileRecognizerC2ER3RFs @ 101 NONAME + _ZN18CApaFileRecognizerD0Ev @ 102 NONAME + _ZN18CApaFileRecognizerD1Ev @ 103 NONAME + _ZN18CApaFileRecognizerD2Ev @ 104 NONAME + _ZN18TApaDocCleanupItem9DoCleanupEPv @ 105 NONAME + _ZN20TApaModelDoorFactoryC1EPK22MApaModelHeaderFactory @ 106 NONAME + _ZN20TApaModelDoorFactoryC2EPK22MApaModelHeaderFactory @ 107 NONAME + _ZN22CApaFileRecognizerType10Reserved_1Ev @ 108 NONAME + _ZN22CApaFileRecognizerType4LockEv @ 109 NONAME + _ZN22CApaFileRecognizerType6UnlockEv @ 110 NONAME + _ZTV22CApaFileRecognizerType @ 111 NONAME ; ## + _ZN22CApaFileRecognizerTypeC2Ev @ 112 NONAME + _ZN22CApaFileRecognizerTypeD0Ev @ 113 NONAME + _ZN22CApaFileRecognizerTypeD1Ev @ 114 NONAME + _ZN22CApaFileRecognizerTypeD2Ev @ 115 NONAME + _ZN23TApaEmbeddabilityFilter16AddEmbeddabilityEN17TApaAppCapability14TEmbeddabilityE @ 116 NONAME + _ZN23TApaEmbeddabilityFilterC1Ev @ 117 NONAME + _ZN23TApaEmbeddabilityFilterC2Ev @ 118 NONAME + _ZNK11CApaProcess15MainDocFileNameEv @ 119 NONAME + _ZNK11TApaAppInfo12ExternalizeLER12RWriteStream @ 120 NONAME + _ZNK12CApaDocument10CapabilityEv @ 121 NONAME + _ZNK12CApaDocument12ExternalizeLER12RWriteStream @ 122 NONAME + _ZNK12CApaDocument17ValidatePasswordLEv @ 123 NONAME + _ZNK12CApaDoorBase22ExternalizeBaseStreamLER12CStreamStoreR17CStreamDictionary @ 124 NONAME + _ZNK12TApaAppEntry12ExternalizeLER12RWriteStream @ 125 NONAME + _ZNK13CApaModelDoor12ExternalizeLER12RWriteStream @ 126 NONAME + _ZNK13CApaModelDoor16ScaleFactorWidthEv @ 127 NONAME + _ZNK13CApaModelDoor17ScaleFactorHeightEv @ 128 NONAME + _ZNK13CApaModelDoor22GetOriginalSizeInTwipsER5TSize @ 129 NONAME + _ZNK13CApaModelDoor4DrawER16CGraphicsContextRK6TPointRK5TRectP18MGraphicsDeviceMap @ 130 NONAME + _ZNK13CApaModelDoor6StoreLER12CStreamStore @ 131 NONAME + _ZNK15CApaApplication11AppFullNameEv @ 132 NONAME + _ZNK15CApaApplication12OpenIniFileLER3RFs @ 133 NONAME + _ZNK15CApaApplication16OpenAppInfoFileLEv @ 134 NONAME ABSENT + _ZNK15CApaApplication7DllNameEv @ 135 NONAME + _ZNK15CApaCommandLine11LibraryNameEv @ 136 NONAME ABSENT + _ZNK15CApaCommandLine12DocumentNameEv @ 137 NONAME + _ZNK15CApaCommandLine15FullCommandLineEv @ 138 NONAME ABSENT + _ZNK15CApaCommandLine7CommandEv @ 139 NONAME + _ZNK15CApaCommandLine7TailEndEv @ 140 NONAME + _ZNK15TApaAppInfo_7_012ExternalizeLER12RWriteStream @ 141 NONAME ABSENT + _ZNK15TApaAppViewInfo12ExternalizeLER12RWriteStream @ 142 NONAME + _ZNK17TApaAppCapability12ExternalizeLER12RWriteStream @ 143 NONAME + _ZNK17TApaAppCapability15Externalize7_0LER12RWriteStream @ 144 NONAME + _ZNK17TApaAppIdentifier12ExternalizeLER12RWriteStream @ 145 NONAME + _ZNK17TApaLastUsedEntry12ExternalizeLER12RWriteStream @ 146 NONAME ABSENT + _ZNK18CApaFileRecognizer10AppLocatorEv @ 147 NONAME + _ZNK20TApaModelDoorFactory11NewPictureLER14TPictureHeaderRK12CStreamStore @ 148 NONAME + _ZNK22CApaFileRecognizerType10CapabilityER5TDes8 @ 149 NONAME + _ZNK22CApaFileRecognizerType7AppRunLERK15CApaCommandLine @ 150 NONAME + _ZNK23TApaEmbeddabilityFilter20MatchesEmbeddabilityEN17TApaAppCapability14TEmbeddabilityE @ 151 NONAME + _ZTI11CApaProcess @ 152 NONAME ; ## + _ZTI12CApaDocument @ 153 NONAME ; ## + _ZTI15CApaApplication @ 154 NONAME ; ## + _ZTI15CApaModelHeader @ 155 NONAME ; ## + _ZTI18CApaFileRecognizer @ 156 NONAME ; ## + _ZTI20TApaModelDoorFactory @ 157 NONAME ; ## + _ZTI22CApaFileRecognizerType @ 158 NONAME ; ## + _ZTV11CApaProcess @ 159 NONAME ; ## + _ZTV12CApaDocument @ 160 NONAME ; ## + _ZTV15CApaApplication @ 161 NONAME ; ## + _ZTV15CApaModelHeader @ 162 NONAME ; ## + _ZTV18CApaFileRecognizer @ 163 NONAME ; ## + _ZTV20TApaModelDoorFactory @ 164 NONAME ; ## + _ZN22CApaFileRecognizerType21CreateFileRecognizerLE4TUid @ 165 NONAME + _ZN11CApaProcess15AddNewDocumentLE22TApaApplicationFactory @ 166 NONAME + _ZN15CApaApplicationD0Ev @ 167 NONAME + _ZN15CApaApplicationD1Ev @ 168 NONAME + _ZN15CApaApplicationD2Ev @ 169 NONAME + _ZN22TApaApplicationFactoryC1E4TUid @ 170 NONAME + _ZN22TApaApplicationFactoryC1EPFP15CApaApplicationvE @ 171 NONAME + _ZN22TApaApplicationFactoryC1ERK26CImplementationInformation @ 172 NONAME + _ZN22TApaApplicationFactoryC2E4TUid @ 173 NONAME + _ZN22TApaApplicationFactoryC2EPFP15CApaApplicationvE @ 174 NONAME + _ZN22TApaApplicationFactoryC2ERK26CImplementationInformation @ 175 NONAME + _ZTI13CApaAppHolder @ 176 NONAME ABSENT ; ## + _ZTI13CApaModelDoor @ 177 NONAME ; ## + _ZTI15CApaCommandLine @ 178 NONAME ; ## + _ZTI24CFileRecognizerExtension @ 179 NONAME ; ## + _ZTI7CApaDll @ 180 NONAME ABSENT ; ## + _ZTI7CApaExe @ 181 NONAME ABSENT ; ## + _ZTI7HBufBuf @ 182 NONAME ; ## + _ZTV13CApaAppHolder @ 183 NONAME ABSENT ; ## + _ZTV13CApaModelDoor @ 184 NONAME ; ## + _ZTV15CApaCommandLine @ 185 NONAME ; ## + _ZTV24CFileRecognizerExtension @ 186 NONAME ; ## + _ZTV7CApaDll @ 187 NONAME ABSENT ; ## + _ZTV7CApaExe @ 188 NONAME ABSENT ; ## + _ZTV7HBufBuf @ 189 NONAME ; ## + _ZN13CApaAppServer10ConstructLERK7TDesC16 @ 190 NONAME + _ZN13CApaAppServer16NotifyServerExitEi @ 191 NONAME + _ZN13CApaAppServer20CustomSecurityCheckLERK9RMessage2RiR13TSecurityInfo @ 192 NONAME + _ZN13CApaAppServer27CreateServiceSecurityCheckLE4TUidRK9RMessage2RiR13TSecurityInfo @ 193 NONAME + _ZN13CApaAppServerC1Ev @ 194 NONAME + _ZN13CApaAppServerC2Ev @ 195 NONAME + _ZN13CApaAppServerD0Ev @ 196 NONAME + _ZN13CApaAppServerD1Ev @ 197 NONAME + _ZN13CApaAppServerD2Ev @ 198 NONAME + _ZN15CApaCommandLine18SetServerRequiredLEj @ 199 NONAME + _ZN15CApaCommandLine21SetServerNotRequiredLEv @ 200 NONAME + _ZN18CApaAppServiceBase12ServiceErrorERK9RMessage2i @ 201 NONAME + _ZN18CApaAppServiceBase14SecurityCheckLERK9RMessage2RiR13TSecurityInfo @ 202 NONAME + _ZN18CApaAppServiceBase7CreateLEv @ 203 NONAME + _ZN18CApaAppServiceBase8ServiceLERK9RMessage2 @ 204 NONAME + _ZN18CApaAppServiceBaseC1Ev @ 205 NONAME + _ZN18CApaAppServiceBaseC2Ev @ 206 NONAME + _ZN18CApaAppServiceBaseD0Ev @ 207 NONAME + _ZN18CApaAppServiceBaseD1Ev @ 208 NONAME + _ZN18CApaAppServiceBaseD2Ev @ 209 NONAME + _ZNK18RApaAppServiceBase10ServerNameEv @ 210 NONAME + _ZNK18RApaAppServiceBase16NotifyServerExitER14TRequestStatus @ 211 NONAME + _ZN18RApaAppServiceBase19ConnectExistingAppLERKS_ @ 212 NONAME + _ZNK18RApaAppServiceBase22CancelNotifyServerExitEv @ 213 NONAME + _ZN18RApaAppServiceBase22ConnectExistingByNameLERK7TDesC16 @ 214 NONAME + _ZN18RApaAppServiceBase5CloseEv @ 215 NONAME + _ZN18RApaAppServiceBaseC2Ev @ 216 NONAME + _ZN24CApaServerAppExitMonitor4NewLER18RApaAppServiceBaseR25MApaServerAppExitObserveri @ 217 NONAME + _ZN24CApaServerAppExitMonitor5NewLCER18RApaAppServiceBaseR25MApaServerAppExitObserveri @ 218 NONAME + _ZN24CApaServerAppExitMonitorD0Ev @ 219 NONAME + _ZN24CApaServerAppExitMonitorD1Ev @ 220 NONAME + _ZN24CApaServerAppExitMonitorD2Ev @ 221 NONAME + _ZNK13CApaAppServer11NewSessionLERK8TVersionRK9RMessage2 @ 222 NONAME + _ZNK13CApaAppServer14CreateServiceLE4TUid @ 223 NONAME + _ZNK15CApaCommandLine14ServerRequiredEv @ 224 NONAME + _ZTI13CApaAppServer @ 225 NONAME ; ## + _ZTI18CApaAppServiceBase @ 226 NONAME ; ## + _ZTI24CApaServerAppExitMonitor @ 227 NONAME ; ## + _ZTV13CApaAppServer @ 228 NONAME ; ## + _ZTV18CApaAppServiceBase @ 229 NONAME ; ## + _ZTV24CApaServerAppExitMonitor @ 230 NONAME ; ## + _ZN13CApaAppServer18ExtensionInterfaceE4TUidRPv @ 231 NONAME + _ZN18CApaAppServiceBase18ExtensionInterfaceE4TUidRPv @ 232 NONAME + _ZN18RApaAppServiceBase18ExtensionInterfaceE4TUidRPv @ 233 NONAME + _ZTI18RApaAppServiceBase @ 234 NONAME ; ## + _ZTV18RApaAppServiceBase @ 235 NONAME ; ## + _ZN15CApaCommandLine27EnvironmentSlotForPublicUseEi @ 236 NONAME + _ZN15CApaCommandLine16SetFileByHandleLERK5RFile @ 237 NONAME + _ZNK15CApaCommandLine16GetFileByHandleLER5RFile @ 238 NONAME + _ZN15CApaCommandLine18SetExecutableNameLERK7TDesC16 @ 239 NONAME + _ZN11CApaProcessC1ERK3RFs @ 240 NONAME + _ZN11CApaProcessC2ERK3RFs @ 241 NONAME + _ZN15CApaCommandLine28ConstructCmdLineFromMessageLERK9RMessage2 @ 242 NONAME + _ZN15CApaCommandLine36GetCommandLineFromProcessEnvironmentERPS_ @ 243 NONAME + _ZNK15CApaCommandLine12GetIpcArgsLCER8TIpcArgs @ 244 NONAME + Apparc_Dummy1 @ 245 NONAME ABSENT + _ZNK15CApaCommandLine14ExecutableNameEv @ 246 NONAME + Apparc_Dummy2 @ 247 NONAME ABSENT + _ZNK15CApaCommandLine22SetProcessEnvironmentLER8RProcess @ 248 NONAME + _ZN11CApaProcess4NewLERK3RFs @ 249 NONAME + _ZN15CApaCommandLine17SetDefaultScreenLEi @ 250 NONAME + _ZNK15CApaCommandLine13DefaultScreenEv @ 251 NONAME + _ZN15CApaCommandLine22SetParentWindowGroupIDEi @ 252 NONAME + _ZNK15CApaCommandLine19ParentWindowGroupIDEv @ 253 NONAME + _ZNK15CApaCommandLine12DebugMemFailEv @ 254 NONAME + _ZN15CApaCommandLine40SetAppStartupInstrumentationEventIdBaseLEi @ 255 NONAME + _ZNK15CApaCommandLine36AppStartupInstrumentationEventIdBaseEv @ 256 NONAME + _ZN11CApaProcess16ReadRootStreamLCERP10CFileStoreRK5RFile @ 257 NONAME + _ZN15CApaCommandLine16SetDebugMemFailLEi @ 258 NONAME + _ZN11CApaProcess21CApaProcess_Reserved1Ev @ 259 NONAME + _ZN11CApaProcess21CApaProcess_Reserved2Ev @ 260 NONAME + _ZN11CApaProcessC1Ev @ 261 NONAME + _ZN11CApaProcessC2Ev @ 262 NONAME + _ZN12CApaDocumentC2Ev @ 263 NONAME + _ZN12CApaDoorBase14SetCropInTwipsERK8TMargins @ 264 NONAME + _ZN12CApaDoorBase14SetScaleFactorEii @ 265 NONAME + _ZN12CApaDoorBase15NativePixelSizeER5TSize @ 266 NONAME + _ZN12CApaDoorBase22CApaDoorBase_Reserved1Ev @ 267 NONAME + _ZN12CApaDoorBase22CApaDoorBase_Reserved2Ev @ 268 NONAME + _ZN12CApaDoorBaseC2Ev @ 269 NONAME + _ZN13CApaAppFinder23CApaAppFinder_Reserved1Ev @ 270 NONAME + _ZN13CApaAppFinder23CApaAppFinder_Reserved2Ev @ 271 NONAME + _ZN13CApaAppFinderC2Ev @ 272 NONAME + _ZN13CApaAppServer23CApaAppServer_Reserved1Ev @ 273 NONAME + _ZN13CApaAppServer23CApaAppServer_Reserved2Ev @ 274 NONAME + _ZN13CApaAppServer9DoConnectERK9RMessage2 @ 275 NONAME + _ZN14MApaAppStarter24MApaAppStarter_Reserved1Ev @ 276 NONAME + _ZN14MApaAppStarter24MApaAppStarter_Reserved2Ev @ 277 NONAME + _ZN14MApaAppStarterC2Ev @ 278 NONAME + _ZN15CApaApplication25CApaApplication_Reserved1Ev @ 279 NONAME + _ZN15CApaApplication25CApaApplication_Reserved2Ev @ 280 NONAME + _ZN15CApaApplicationC2Ev @ 281 NONAME + _ZN15CApaModelHeader10Reserved_2Ev @ 282 NONAME + _ZN15CApaModelHeaderC2Ev @ 283 NONAME + _ZN18CApaAppServiceBase10DisconnectERK9RMessage2 @ 284 NONAME + _ZN18CApaAppServiceBase14CountResourcesEv @ 285 NONAME + _ZN18CApaAppServiceBase28CApaAppServiceBase_Reserved1Ev @ 286 NONAME + _ZN18CApaAppServiceBase28CApaAppServiceBase_Reserved2Ev @ 287 NONAME + _ZN18RApaAppServiceBase28RApaAppServiceBase_Reserved1Ev @ 288 NONAME + _ZN18RApaAppServiceBase28RApaAppServiceBase_Reserved2Ev @ 289 NONAME + _ZN22MApaModelHeaderFactory32MApaModelHeaderFactory_Reserved1Ev @ 290 NONAME + _ZN22MApaModelHeaderFactory32MApaModelHeaderFactory_Reserved2Ev @ 291 NONAME + _ZN22MApaModelHeaderFactoryC2Ev @ 292 NONAME + _ZN22TApaApplicationFactoryC1Ev @ 293 NONAME + _ZN22TApaApplicationFactoryC2Ev @ 294 NONAME + _ZN23CApaAppServiceInfoArray33CApaAppServiceInfoArray_Reserved1Ev @ 295 NONAME + _ZN23CApaAppServiceInfoArray33CApaAppServiceInfoArray_Reserved2Ev @ 296 NONAME + _ZN23CApaAppServiceInfoArrayC2Ev @ 297 NONAME + _ZN23MApaEmbeddedDocObserver33MApaEmbeddedDocObserver_Reserved1Ev @ 298 NONAME + _ZN23MApaEmbeddedDocObserver33MApaEmbeddedDocObserver_Reserved2Ev @ 299 NONAME + _ZN23MApaEmbeddedDocObserverC2Ev @ 300 NONAME + _ZN25MApaServerAppExitObserver35MApaServerAppExitObserver_Reserved1Ev @ 301 NONAME + _ZN25MApaServerAppExitObserver35MApaServerAppExitObserver_Reserved2Ev @ 302 NONAME + _ZN25MApaServerAppExitObserverC2Ev @ 303 NONAME + _ZNK12CApaDoorBase10CapabilityEv @ 304 NONAME + _ZNK12CApaDoorBase14GetCropInTwipsER8TMargins @ 305 NONAME + _ZNK12CApaDoorBase16ScaleFactorWidthEv @ 306 NONAME + _ZNK12CApaDoorBase17LineBreakPossibleEjii @ 307 NONAME + _ZNK12CApaDoorBase17ScaleFactorHeightEv @ 308 NONAME + _ZNK12CApaDoorBase6StoreLER12CStreamStore @ 309 NONAME + _ZTI12CApaDoorBase @ 310 NONAME ; ## + _ZTI13CApaAppFinder @ 311 NONAME ; ## + _ZTI14MApaAppStarter @ 312 NONAME ; ## + _ZTI22MApaModelHeaderFactory @ 313 NONAME ; ## + _ZTI23CApaAppServiceInfoArray @ 314 NONAME ; ## + _ZTI23MApaEmbeddedDocObserver @ 315 NONAME ; ## + _ZTI25MApaServerAppExitObserver @ 316 NONAME ; ## + _ZTV12CApaDoorBase @ 317 NONAME ; ## + _ZTV13CApaAppFinder @ 318 NONAME ; ## + _ZTV14MApaAppStarter @ 319 NONAME ; ## + _ZTV22MApaModelHeaderFactory @ 320 NONAME ; ## + _ZTV23CApaAppServiceInfoArray @ 321 NONAME ; ## + _ZTV23MApaEmbeddedDocObserver @ 322 NONAME ; ## + _ZTV25MApaServerAppExitObserver @ 323 NONAME ; ## + _ZN15CApaCommandLine14SetOpaqueDataLERK6TDesC8 @ 324 NONAME + _ZNK15CApaCommandLine10OpaqueDataEv @ 325 NONAME + _ZNK15CApaCommandLine18IsDefaultScreenSetEv @ 326 NONAME + _ZN11CApaProcess10ConstructLE10TProcessId @ 327 NONAME + _ZN15CApaCommandLine18SetParentProcessIdE10TProcessId @ 328 NONAME + _ZNK15CApaCommandLine15ParentProcessIdEv @ 329 NONAME + _ZTI24CApaParentProcessMonitor @ 330 NONAME ; ## + _ZTV24CApaParentProcessMonitor @ 331 NONAME ; ## + _ZN18RApaAppServiceBase19ConnectExistingAppLERKS_RK15TSecurityPolicy @ 332 NONAME + _ZN18RApaAppServiceBase22ConnectExistingByNameLERK7TDesC16RK15TSecurityPolicy @ 333 NONAME + _ZN18RApaAppServiceBase24TransferExistingSessionLERS_ @ 334 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APSERVU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APSERVU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,69 @@ +EXPORTS + _Z23NameApaServServerThreadv @ 1 NONAME + _Z25NameApaServStartSemaphorev @ 2 NONAME + _ZN13CApaFsMonitor10SetBlockedEi @ 3 NONAME + _ZN13CApaFsMonitor4NewLER3RFsRK7TDesC169TCallBack @ 4 NONAME + _ZN13CApaFsMonitor5StartE11TNotifyType @ 5 NONAME + _ZN13CApaFsMonitorD0Ev @ 6 NONAME + _ZN13CApaFsMonitorD1Ev @ 7 NONAME + _ZN13CApaFsMonitorD2Ev @ 8 NONAME + _ZN17CApaAppListServer4NewLEP11CApaAppListP18CApaFileRecognizer @ 9 NONAME ABSENT + _ZN17CApaAppListServer4NewLEP14MApaAppStarter @ 10 NONAME + _ZN17CApaAppListServerD0Ev @ 11 NONAME + _ZN17CApaAppListServerD1Ev @ 12 NONAME + _ZN17CApaAppListServerD2Ev @ 13 NONAME + _ZNK13CApaFsMonitor10NotifyTypeEv @ 14 NONAME + _ZTI13CApaFsMonitor @ 15 NONAME ; ## + _ZTI15CApaEComMonitor @ 16 NONAME ; ## + _ZTI17CApaAppListServer @ 17 NONAME ; ## + _ZTI20TDesCArrayItemWriter @ 18 NONAME ; ## + _ZTI20TSizeArrayItemWriter @ 19 NONAME ; ## + _ZTI22CApaAppListServSession @ 20 NONAME ; ## + _ZTI24TViewDataArrayItemWriter @ 21 NONAME ; ## + _ZTV13CApaFsMonitor @ 22 NONAME ; ## + _ZTV15CApaEComMonitor @ 23 NONAME ; ## + _ZTV17CApaAppListServer @ 24 NONAME ; ## + _ZTV20TDesCArrayItemWriter @ 25 NONAME ; ## + _ZTV20TSizeArrayItemWriter @ 26 NONAME ; ## + _ZTV22CApaAppListServSession @ 27 NONAME ; ## + _ZTV24TViewDataArrayItemWriter @ 28 NONAME ; ## + _ZN13CApaFsMonitor12AddLocationLERK7TDesC16 @ 29 NONAME + _ZTIN13CApaFsMonitor14CApaFsNotifierE @ 30 NONAME ; ## + _ZTVN13CApaFsMonitor14CApaFsNotifierE @ 31 NONAME ; ## + _ZN17CApaAppListServer4SelfEv @ 32 NONAME + _ZN13CApaFsMonitor6CancelEv @ 33 NONAME + _Z18ApaServThreadStartPv @ 34 NONAME + _ZTI18CRecognitionResult @ 35 NONAME ; ## + _ZTI20CApsRecognitionCache @ 36 NONAME ; ## + _ZTI20CCacheDirectoryEntry @ 37 NONAME ; ## + _ZTI23CFileRecognitionUtility @ 38 NONAME ; ## + _ZTI25CRecognitionResultHashMap @ 39 NONAME ; ## + _ZTI27CDirectoryRecognitionResult @ 40 NONAME ; ## + _ZTI30CRecognitionResultHashMapEntry @ 41 NONAME ; ## + _ZTV18CRecognitionResult @ 42 NONAME ; ## + _ZTV20CApsRecognitionCache @ 43 NONAME ; ## + _ZTV20CCacheDirectoryEntry @ 44 NONAME ; ## + _ZTV23CFileRecognitionUtility @ 45 NONAME ; ## + _ZTV25CRecognitionResultHashMap @ 46 NONAME ; ## + _ZTV27CDirectoryRecognitionResult @ 47 NONAME ; ## + _ZTV30CRecognitionResultHashMapEntry @ 48 NONAME ; ## + _ZN16CUpdatedAppsList28CloseAndDeletePermanentStoreEv @ 49 NONAME ABSENT + _ZN16CUpdatedAppsListD0Ev @ 50 NONAME ABSENT + _ZN16CUpdatedAppsListD1Ev @ 51 NONAME ABSENT + _ZN16CUpdatedAppsListD2Ev @ 52 NONAME ABSENT + _ZTI16CUpdatedAppsList @ 53 NONAME ABSENT ; ## + _ZTV16CUpdatedAppsList @ 54 NONAME ABSENT ; ## + _ZNK16CUpdatedAppsList8IsInListERK7TDesC16 @ 55 NONAME ABSENT + _ZTIN16CUpdatedAppsList15CUpdatedAppInfoE @ 56 NONAME ABSENT ; ## + _ZTVN16CUpdatedAppsList15CUpdatedAppInfoE @ 57 NONAME ABSENT ; ## + _ZN17CApaAppListServer14RescanCallBackEv @ 58 NONAME + _ZTI18CCustomAppInfoData @ 59 NONAME ; ## + _ZTV18CCustomAppInfoData @ 60 NONAME ; ## + KApaLoadDataRecognizersOnDemand @ 61 NONAME DATA 4 + KApaUnloadRecognizersTimeout @ 62 NONAME DATA 4 + _ZN17CApaAppListServer24HandleEndUninstallEventLEv @ 63 NONAME + _ZN17CApaAppListServer25HandleStartUninstallEventEv @ 64 NONAME + KApaDrivesToMonitor @ 65 NONAME DATA 4 + KApaLoadMbmIconsOnDemand @ 66 NONAME DATA 4 + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/APSEXEU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/APSEXEU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,5 @@ +EXPORTS + _Z16StartupApaServerR14MApaAppStarter @ 1 NONAME + _ZTI18CSvActiveScheduler @ 2 NONAME ; ## + _ZTV18CSvActiveScheduler @ 3 NONAME ; ## + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/ServiceRegistryU.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/ServiceRegistryU.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,11 @@ +EXPORTS + _ZN16CServiceRegistry10SetDefaultE4TUidRK9TDataTypeS0_ @ 1 NONAME + _ZN16CServiceRegistry10GetDefaultE4TUidRK9TDataTypeRS0_ @ 2 NONAME + _ZN16CServiceRegistry11RemoveEntryE4TUidRK9TDataType @ 3 NONAME + _ZN16CServiceRegistry4NewLEv @ 4 NONAME + _ZN16CServiceRegistryD0Ev @ 5 NONAME + _ZN16CServiceRegistryD1Ev @ 6 NONAME + _ZN16CServiceRegistryD2Ev @ 7 NONAME + _ZTI16CServiceRegistry @ 8 NONAME ; ## + _ZTV16CServiceRegistry @ 9 NONAME ; ## + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/TDONOTHINGFILERECOGNIZERU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/TDONOTHINGFILERECOGNIZERU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,5 @@ +EXPORTS + _Z16CreateRecognizerv @ 1 NONAME + _ZTI17CDoNothingFileRec @ 2 NONAME ; ## + _ZTV17CDoNothingFileRec @ 3 NONAME ; ## + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/TICONFORLEAKSu.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/TICONFORLEAKSu.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,395 @@ +EXPORTS + KMinApplicationStackSize @ 1 NONAME DATA 4 + _Z16StartupApaServerR14MApaAppStarter @ 2 NONAME + _Z23MinApplicationStackSizev @ 3 NONAME + _Z23StartupApaServerProcessv @ 4 NONAME + _ZN11CApaAppData16CanUseScreenModeEi @ 5 NONAME + _ZN11CApaAppData16SetShortCaptionLERK7TDesC16 @ 6 NONAME + _ZN11CApaAppData4NewLERK12TApaAppEntryR3RFs @ 7 NONAME + _ZN11CApaAppDataD0Ev @ 8 NONAME + _ZN11CApaAppDataD1Ev @ 9 NONAME + _ZN11CApaAppDataD2Ev @ 10 NONAME + _ZN11CApaAppList12RestartScanLEv @ 11 NONAME + _ZN11CApaAppList14CompareStringsERK7HBufC16S2_ @ 12 NONAME + _ZN11CApaAppList15UpdatedAppsListEv @ 13 NONAME ABSENT + _ZN11CApaAppList16StartIdleUpdateLEP19MApaAppListObserver @ 14 NONAME + _ZN11CApaAppList16StartIdleUpdateLEv @ 15 NONAME + _ZN11CApaAppList18SetUpdatedAppsListEP16CUpdatedAppsList @ 16 NONAME ABSENT + _ZN11CApaAppList22AddForcedRegistrationLEP7HBufC16 @ 17 NONAME + _ZN11CApaAppList22FindAndAddSpecificAppLEP16CApaAppRegFinder4TUid @ 18 NONAME + _ZN11CApaAppList24ResetForcedRegistrationsEv @ 19 NONAME + _ZN11CApaAppList4NewLER3RFsP16CApaAppRegFinderii @ 20 NONAME + _ZN11CApaAppList4SelfEv @ 21 NONAME + _ZN11CApaAppList6PurgeLEv @ 22 NONAME + _ZN11CApaAppList8StopScanEi @ 23 NONAME + _ZN11CApaAppList9InitListLEP19MApaAppListObserver @ 24 NONAME + _ZN11CApaAppListD0Ev @ 25 NONAME + _ZN11CApaAppListD1Ev @ 26 NONAME + _ZN11CApaAppListD2Ev @ 27 NONAME + _ZN12TApaTaskList10CycleTasksE4TUidNS_15TCycleDirectionE @ 28 NONAME + _ZN12TApaTaskList7FindAppE4TUid @ 29 NONAME + _ZN12TApaTaskList7FindAppERK7TDesC16 @ 30 NONAME + _ZN12TApaTaskList7FindDocERK7TDesC16 @ 31 NONAME + _ZN12TApaTaskList9FindByPosEi @ 32 NONAME + _ZN12TApaTaskListC1ER10RWsSession @ 33 NONAME + _ZN12TApaTaskListC2ER10RWsSession @ 34 NONAME + _ZN13RApaLsSession12CancelNotifyEv @ 35 NONAME + _ZN13RApaLsSession13SetFsSessionLER3RFs @ 36 NONAME + _ZN13RApaLsSession13StartDocumentER5RFile4TUidR9TThreadIdP14TRequestStatus @ 37 NONAME + _ZN13RApaLsSession13StartDocumentER5RFileR9TThreadIdP14TRequestStatus @ 38 NONAME + _ZN13RApaLsSession13StartDocumentER5RFileRK9TDataTypeR9TThreadIdP14TRequestStatus @ 39 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 40 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16R9TThreadIdNS_11TLaunchTypeE @ 41 NONAME + _ZN13RApaLsSession13StartDocumentERK7TDesC16RK9TDataTypeR9TThreadIdNS_11TLaunchTypeE @ 42 NONAME + _ZN13RApaLsSession14ClearFsSessionEv @ 43 NONAME + _ZN13RApaLsSession14CreateDocumentERK7TDesC164TUidR9TThreadIdNS_11TLaunchTypeE @ 44 NONAME + _ZN13RApaLsSession15RecognizeFilesLERK7TDesC16R27CDataRecognitionResultArrayR14TRequestStatus @ 45 NONAME + _ZN13RApaLsSession15RecognizeFilesLERK7TDesC16RK6TDesC8R27CDataRecognitionResultArrayR14TRequestStatus @ 46 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType @ 47 NONAME + _ZN13RApaLsSession17DeleteDataMappingERK9TDataType4TUid @ 48 NONAME + _ZN13RApaLsSession17ForceRegistrationERK13RPointerArrayI7TDesC16E @ 49 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypel4TUid @ 50 NONAME + _ZN13RApaLsSession17InsertDataMappingERK9TDataTypel4TUidS3_ @ 51 NONAME + _ZN13RApaLsSession17SetMaxDataBufSizeEi @ 52 NONAME + _ZN13RApaLsSession18SetAppShortCaptionERK7TDesC169TLanguage4TUid @ 53 NONAME + _ZN13RApaLsSession20CancelRecognizeFilesEv @ 54 NONAME + _ZN13RApaLsSession21SetAcceptedConfidenceEi @ 55 NONAME + _ZN13RApaLsSession23RApaLsSession_Reserved1Ev @ 56 NONAME + _ZN13RApaLsSession23RApaLsSession_Reserved2Ev @ 57 NONAME + _ZN13RApaLsSession25InsertDataMappingIfHigherERK9TDataTypel4TUidRi @ 58 NONAME + _ZN13RApaLsSession25NotifyOnDataMappingChangeER14TRequestStatus @ 59 NONAME + _ZN13RApaLsSession29RegisterNonNativeApplicationLE4TUidRK10TDriveUnitR34CApaRegistrationResourceFileWriterP33CApaLocalisableResourceFileWriterPK5RFile @ 60 NONAME + _ZN13RApaLsSession31CancelNotifyOnDataMappingChangeEv @ 61 NONAME + _ZN13RApaLsSession31DeregisterNonNativeApplicationLE4TUid @ 62 NONAME + _ZN13RApaLsSession33RegisterNonNativeApplicationTypeLE4TUidRK7TDesC16 @ 63 NONAME + _ZN13RApaLsSession35CommitNonNativeApplicationsUpdatesLEv @ 64 NONAME + _ZN13RApaLsSession35DeregisterNonNativeApplicationTypeLE4TUid @ 65 NONAME + _ZN13RApaLsSession36PrepareNonNativeApplicationsUpdatesLEv @ 66 NONAME + _ZN13RApaLsSession36RollbackNonNativeApplicationsUpdatesEv @ 67 NONAME + _ZN13RApaLsSession5CloseEv @ 68 NONAME + _ZN13RApaLsSession7ConnectEv @ 69 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLine @ 70 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadId @ 71 NONAME + _ZN13RApaLsSession8StartAppERK15CApaCommandLineR9TThreadIdP14TRequestStatus @ 72 NONAME + _ZN13RApaLsSession9FsSessionEv @ 73 NONAME + _ZN13RApaLsSession9SetNotifyEiR14TRequestStatus @ 74 NONAME + _ZN13RApaLsSessionC1Ev @ 75 NONAME + _ZN13RApaLsSessionC2Ev @ 76 NONAME + _ZN16CApaMaskedBitmap12InternalizeLER11RReadStream @ 77 NONAME + _ZN16CApaMaskedBitmap13SetMaskBitmapEP10CFbsBitmap @ 78 NONAME + _ZN16CApaMaskedBitmap4NewLEPKS_ @ 79 NONAME + _ZN16CApaMaskedBitmap5NewLCEv @ 80 NONAME + _ZN16CApaMaskedBitmapD0Ev @ 81 NONAME + _ZN16CApaMaskedBitmapD1Ev @ 82 NONAME + _ZN16CApaMaskedBitmapD2Ev @ 83 NONAME + _ZN17CApaSystemControl7CreateLEv @ 84 NONAME + _ZN18TApaPictureFactoryC1EP11CApaProcess @ 85 NONAME + _ZN18TApaPictureFactoryC1Ev @ 86 NONAME + _ZN18TApaPictureFactoryC2EP11CApaProcess @ 87 NONAME + _ZN18TApaPictureFactoryC2Ev @ 88 NONAME + _ZN19CApaAppListNotifier4NewLEP23MApaAppListServObserverN7CActive9TPriorityE @ 89 NONAME + _ZN19CApaAppListNotifierD0Ev @ 90 NONAME + _ZN19CApaAppListNotifierD1Ev @ 91 NONAME + _ZN19CApaAppListNotifierD2Ev @ 92 NONAME + _ZN19CApaWindowGroupName11SetAppReadyEi @ 93 NONAME + _ZN19CApaWindowGroupName11SetCaptionLERK7TDesC16 @ 94 NONAME + _ZN19CApaWindowGroupName11SetDocNameLERK7TDesC16 @ 95 NONAME + _ZN19CApaWindowGroupName12FindByAppUidE4TUidR10RWsSessionRi @ 96 NONAME + _ZN19CApaWindowGroupName13FindByCaptionERK7TDesC16R10RWsSessionRi @ 97 NONAME + _ZN19CApaWindowGroupName13FindByDocNameERK7TDesC16R10RWsSessionRi @ 98 NONAME + _ZN19CApaWindowGroupName17SetDocNameIsAFileEi @ 99 NONAME + _ZN19CApaWindowGroupName18ConstructFromWgIdLEi @ 100 NONAME + _ZN19CApaWindowGroupName18SetWindowGroupNameEP7HBufC16 @ 101 NONAME + _ZN19CApaWindowGroupName19SetWindowGroupNameLERK7TDesC16 @ 102 NONAME + _ZN19CApaWindowGroupName26SetRespondsToShutdownEventEi @ 103 NONAME + _ZN19CApaWindowGroupName29SetRespondsToSwitchFilesEventEi @ 104 NONAME + _ZN19CApaWindowGroupName3NewERK10RWsSessionP7HBufC16 @ 105 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSession @ 106 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessionRK7TDesC16 @ 107 NONAME + _ZN19CApaWindowGroupName4NewLERK10RWsSessioni @ 108 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSession @ 109 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessionRK7TDesC16 @ 110 NONAME + _ZN19CApaWindowGroupName5NewLCERK10RWsSessioni @ 111 NONAME + _ZN19CApaWindowGroupName7SetBusyEi @ 112 NONAME + _ZN19CApaWindowGroupName9SetAppUidE4TUid @ 113 NONAME + _ZN19CApaWindowGroupName9SetHiddenEi @ 114 NONAME + _ZN19CApaWindowGroupName9SetSystemEi @ 115 NONAME + _ZN19CApaWindowGroupNameD0Ev @ 116 NONAME + _ZN19CApaWindowGroupNameD1Ev @ 117 NONAME + _ZN19CApaWindowGroupNameD2Ev @ 118 NONAME + _ZN21CApaAppInfoFileWriter11AddCaptionLE9TLanguageRK7TDesC16 @ 119 NONAME + _ZN21CApaAppInfoFileWriter12AddDataTypeLERK21TDataTypeWithPriority @ 120 NONAME + _ZN21CApaAppInfoFileWriter13SetCapabilityERK6TDesC8 @ 121 NONAME + _ZN21CApaAppInfoFileWriter6StoreLEv @ 122 NONAME + _ZN21CApaAppInfoFileWriter8AddIconLER16CApaMaskedBitmap @ 123 NONAME + _ZN21CApaAppInfoFileWriterD0Ev @ 124 NONAME + _ZN21CApaAppInfoFileWriterD1Ev @ 125 NONAME + _ZN21CApaAppInfoFileWriterD2Ev @ 126 NONAME + _ZN21CApaSystemControlList4NewLER3RFs @ 127 NONAME + _ZN21CApaSystemControlList7UpdateLEv @ 128 NONAME + _ZN21CApaSystemControlListD0Ev @ 129 NONAME + _ZN21CApaSystemControlListD1Ev @ 130 NONAME + _ZN21CApaSystemControlListD2Ev @ 131 NONAME + _ZN22ForJavaMIDletInstaller18GetJavaMIDletInfoLER3RFsRK7TDesC16RmS5_ @ 132 NONAME + _ZN22ForJavaMIDletInstaller28NewInterimFormatFileWriterLCER3RFsRK7TDesC164TUidmi @ 133 NONAME + _ZN22ForJavaMIDletInstaller33CheckInterimFormatFileNotCorruptLER5RFile @ 134 NONAME + _ZN23MApaAppListServObserver33MApaAppListServObserver_Reserved1Ev @ 135 NONAME + _ZN23MApaAppListServObserver33MApaAppListServObserver_Reserved2Ev @ 136 NONAME + _ZN23MApaAppListServObserverC2Ev @ 137 NONAME + _ZN27CDataRecognitionResultArrayC1Ev @ 138 NONAME + _ZN27CDataRecognitionResultArrayC2Ev @ 139 NONAME + _ZN27CDataRecognitionResultArrayD0Ev @ 140 NONAME + _ZN27CDataRecognitionResultArrayD1Ev @ 141 NONAME + _ZN27CDataRecognitionResultArrayD2Ev @ 142 NONAME + _ZN31TIconLoaderAndIconArrayForLeaks27TestIconLoaderAndIconArrayLEv @ 143 NONAME + _ZN33CApaLocalisableResourceFileWriter4NewLERK7TDesC16S2_iS2_ @ 144 NONAME + _ZN33CApaLocalisableResourceFileWriterD0Ev @ 145 NONAME + _ZN33CApaLocalisableResourceFileWriterD1Ev @ 146 NONAME + _ZN33CApaLocalisableResourceFileWriterD2Ev @ 147 NONAME + _ZN34CApaRegistrationResourceFileWriter12AddDataTypeLEiRK6TDesC8 @ 148 NONAME + _ZN34CApaRegistrationResourceFileWriter13SetGroupNameLERK7TDesC16 @ 149 NONAME + _ZN34CApaRegistrationResourceFileWriter14SetOpaqueDataLERK6TDesC8 @ 150 NONAME + _ZN34CApaRegistrationResourceFileWriter15SetAppIsHiddenLEi @ 151 NONAME + _ZN34CApaRegistrationResourceFileWriter17SetEmbeddabilityLEN17TApaAppCapability14TEmbeddabilityE @ 152 NONAME + _ZN34CApaRegistrationResourceFileWriter19SetSupportsNewFileLEi @ 153 NONAME + _ZN34CApaRegistrationResourceFileWriter21AddFileOwnershipInfoLERK7TDesC16 @ 154 NONAME + _ZN34CApaRegistrationResourceFileWriter22SetLaunchInBackgroundLEi @ 155 NONAME + _ZN34CApaRegistrationResourceFileWriter23SetDefaultScreenNumberLEi @ 156 NONAME + _ZN34CApaRegistrationResourceFileWriter4NewLE4TUidRK7TDesC16j @ 157 NONAME + _ZN34CApaRegistrationResourceFileWriterD0Ev @ 158 NONAME + _ZN34CApaRegistrationResourceFileWriterD1Ev @ 159 NONAME + _ZN34CApaRegistrationResourceFileWriterD2Ev @ 160 NONAME + _ZN8ApaUtils24HandleAsRegistrationFileERK8TUidType @ 161 NONAME + _ZN8CApaDoor16SetFormatToIconLEv @ 162 NONAME + _ZN8CApaDoor17SetFormatToGlassLEv @ 163 NONAME + _ZN8CApaDoor25SetFormatToTemporaryIconLEi @ 164 NONAME + _ZN8CApaDoor4NewLER3RFsR12CApaDocumentRK5TSize @ 165 NONAME + _ZN8CApaDoor4NewLER3RFsRK12CStreamStore9TStreamIdR11CApaProcess @ 166 NONAME + _ZN8CApaDoor5NewLCER3RFsR12CApaDocumentRK5TSize @ 167 NONAME + _ZN8CApaDoor8RestoreLERK12CStreamStore9TStreamId @ 168 NONAME + _ZN8CApaDoor9DocumentLEi @ 169 NONAME + _ZN8CApaDoorD0Ev @ 170 NONAME + _ZN8CApaDoorD1Ev @ 171 NONAME + _ZN8CApaDoorD2Ev @ 172 NONAME + _ZN8TApaTask11SendMessageE4TUidRK6TDesC8 @ 173 NONAME + _ZN8TApaTask14SwitchOpenFileERK7TDesC16 @ 174 NONAME + _ZN8TApaTask15SendSystemEventE15TApaSystemEvent @ 175 NONAME + _ZN8TApaTask16SendToBackgroundEv @ 176 NONAME + _ZN8TApaTask16SwitchCreateFileERK7TDesC16 @ 177 NONAME + _ZN8TApaTask17BringToForegroundEv @ 178 NONAME + _ZN8TApaTask7EndTaskEv @ 179 NONAME + _ZN8TApaTask7SendKeyERK9TKeyEvent @ 180 NONAME + _ZN8TApaTask7SendKeyEii @ 181 NONAME + _ZN8TApaTask7SetWgIdEi @ 182 NONAME + _ZN8TApaTask8KillTaskEv @ 183 NONAME + _ZN8TApaTaskC1ER10RWsSession @ 184 NONAME + _ZN8TApaTaskC2ER10RWsSession @ 185 NONAME + _ZNK11CApaAppData10CapabilityER5TDes8 @ 186 NONAME + _ZNK11CApaAppData10IconSizesLEv @ 187 NONAME + _ZNK11CApaAppData10OpaqueDataEv @ 188 NONAME + _ZNK11CApaAppData10OwnedFilesEv @ 189 NONAME + _ZNK11CApaAppData11GetIconInfoERiS0_ @ 190 NONAME + _ZNK11CApaAppData12IconFileNameEv @ 191 NONAME + _ZNK11CApaAppData14NonMbmIconFileEv @ 192 NONAME + _ZNK11CApaAppData17ImplementsServiceE4TUid @ 193 NONAME + _ZNK11CApaAppData19ApplicationLanguageEv @ 194 NONAME + _ZNK11CApaAppData19DefaultScreenNumberEv @ 195 NONAME + _ZNK11CApaAppData20RegistrationFileNameEv @ 196 NONAME + _ZNK11CApaAppData20RegistrationFileUsedEv @ 197 NONAME + _ZNK11CApaAppData24NonNativeApplicationTypeEv @ 198 NONAME + _ZNK11CApaAppData27LocalisableResourceFileNameEv @ 199 NONAME + _ZNK11CApaAppData4IconE5TSize @ 200 NONAME + _ZNK11CApaAppData4IconEi @ 201 NONAME + _ZNK11CApaAppData5ViewsEv @ 202 NONAME + _ZNK11CApaAppData8AppEntryEv @ 203 NONAME + _ZNK11CApaAppData8DataTypeERK9TDataType @ 204 NONAME + _ZNK11CApaAppData9IsPendingEv @ 205 NONAME + _ZNK11CApaAppList12AppDataByUidE4TUid @ 206 NONAME + _ZNK11CApaAppList17AppDataByFileNameERK7TDesC16 @ 207 NONAME + _ZNK11CApaAppList17AppScanInProgressEv @ 208 NONAME + _ZNK11CApaAppList17ServiceUidBufferLE4TUid @ 209 NONAME + _ZNK11CApaAppList19IsFirstScanCompleteEv @ 210 NONAME + _ZNK11CApaAppList19ServiceArrayBufferLE4TUid @ 211 NONAME + _ZNK11CApaAppList20IsIdleUpdateCompleteEv @ 212 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataType @ 213 NONAME + _ZNK11CApaAppList21PreferredDataHandlerLERK9TDataTypePK4TUidRi @ 214 NONAME + _ZNK11CApaAppList23IsLanguageChangePendingEv @ 215 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUid @ 216 NONAME + _ZNK11CApaAppList23ServiceImplArrayBufferLE4TUidRK9TDataType @ 217 NONAME + _ZNK11CApaAppList24ServiceOpaqueDataBufferLE4TUidS0_ @ 218 NONAME + _ZNK11CApaAppList5CountEv @ 219 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppData @ 220 NONAME + _ZNK11CApaAppList7NextAppEPK11CApaAppDatai @ 221 NONAME + _ZNK11CApaAppList8FirstAppEi @ 222 NONAME + _ZNK11CApaAppList8FirstAppEv @ 223 NONAME + _ZNK13RApaLsSession10GetAllAppsEi @ 224 NONAME + _ZNK13RApaLsSession10GetAllAppsEv @ 225 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUid5TSizeR16CApaMaskedBitmap @ 226 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidR5RFile @ 227 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidRP7HBufC16 @ 228 NONAME + _ZNK13RApaLsSession10GetAppIconE4TUidiR16CApaMaskedBitmap @ 229 NONAME + _ZNK13RApaLsSession10GetAppInfoER11TApaAppInfo4TUid @ 230 NONAME + _ZNK13RApaLsSession10GetAppTypeER4TUidS0_ @ 231 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfo @ 232 NONAME + _ZNK13RApaLsSession10GetNextAppER11TApaAppInfoi @ 233 NONAME + _ZNK13RApaLsSession11GetAppViewsER13CArrayFixFlatI15TApaAppViewInfoE4TUid @ 234 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUid @ 235 NONAME + _ZNK13RApaLsSession13GetServerAppsE4TUidi @ 236 NONAME + _ZNK13RApaLsSession13RecognizeDataERK5RFileR22TDataRecognitionResult @ 237 NONAME + _ZNK13RApaLsSession13RecognizeDataERK7TDesC16RK6TDesC8R22TDataRecognitionResult @ 238 NONAME + _ZNK13RApaLsSession14AppForDataTypeERK9TDataTypeR4TUid @ 239 NONAME + _ZNK13RApaLsSession14AppForDocumentERK5RFileR4TUidR9TDataType @ 240 NONAME + _ZNK13RApaLsSession14AppForDocumentERK7TDesC16R4TUidR9TDataType @ 241 NONAME + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RK5TSizeR16CApaMaskedBitmap @ 242 NONAME + _ZNK13RApaLsSession14GetAppViewIconE4TUidS0_RP7HBufC16 @ 243 NONAME + _ZNK13RApaLsSession15GetAppIconSizesE4TUidR13CArrayFixFlatI5TSizeE @ 244 NONAME + _ZNK13RApaLsSession15GetAppServicesLE4TUidR13CArrayFixFlatIS0_E @ 245 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilter @ 246 NONAME + _ZNK13RApaLsSession15GetFilteredAppsERK23TApaEmbeddabilityFilteri @ 247 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjj @ 248 NONAME + _ZNK13RApaLsSession15GetFilteredAppsEjji @ 249 NONAME + _ZNK13RApaLsSession15RecognizeFilesLERK7TDesC16R27CDataRecognitionResultArray @ 250 NONAME + _ZNK13RApaLsSession15RecognizeFilesLERK7TDesC16RK6TDesC8R27CDataRecognitionResultArray @ 251 NONAME + _ZNK13RApaLsSession16GetAppByDataTypeERK9TDataType4TUidRS3_ @ 252 NONAME + _ZNK13RApaLsSession16GetAppCapabilityER5TDes84TUid @ 253 NONAME + _ZNK13RApaLsSession16GetAppOwnedFilesER12CDesC16Array4TUid @ 254 NONAME + _ZNK13RApaLsSession16GetAppServicesLCE4TUid @ 255 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEi @ 256 NONAME + _ZNK13RApaLsSession17GetEmbeddableAppsEv @ 257 NONAME + _ZNK13RApaLsSession17GetMaxDataBufSizeERi @ 258 NONAME + _ZNK13RApaLsSession18EmbeddableAppCountERi @ 259 NONAME + _ZNK13RApaLsSession19ApplicationLanguageE4TUidR9TLanguage @ 260 NONAME + _ZNK13RApaLsSession19GetPreferredBufSizeERi @ 261 NONAME + _ZNK13RApaLsSession21GetAcceptedConfidenceERi @ 262 NONAME + _ZNK13RApaLsSession21MatchesSecurityPolicyERi4TUidRK15TSecurityPolicy @ 263 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK5RFileRK9TDataTypeRi @ 264 NONAME + _ZNK13RApaLsSession21RecognizeSpecificDataERK7TDesC16RK6TDesC8RK9TDataTypeRi @ 265 NONAME + _ZNK13RApaLsSession22GetDefaultScreenNumberERi4TUid @ 266 NONAME + _ZNK13RApaLsSession22GetSupportedDataTypesLER13CArrayFixFlatI9TDataTypeE @ 267 NONAME + _ZNK13RApaLsSession23NumberOfOwnDefinedIconsE4TUidRi @ 268 NONAME + _ZNK13RApaLsSession24AppForDataTypeAndServiceERK9TDataType4TUidRS3_ @ 269 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK5RFile4TUidRS3_R9TDataType @ 270 NONAME + _ZNK13RApaLsSession24AppForDocumentAndServiceERK7TDesC164TUidRS3_R9TDataType @ 271 NONAME + _ZNK13RApaLsSession25GetAppServiceOpaqueDataLCE4TUidS0_ @ 272 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUid @ 273 NONAME + _ZNK13RApaLsSession27GetServiceImplementationsLCE4TUidRK9TDataType @ 274 NONAME + _ZNK13RApaLsSession36CancelListPopulationCompleteObserverEv @ 275 NONAME + _ZNK13RApaLsSession38RegisterListPopulationCompleteObserverER14TRequestStatus @ 276 NONAME + _ZNK13RApaLsSession7VersionEv @ 277 NONAME + _ZNK13RApaLsSession8AppCountERi @ 278 NONAME + _ZNK13RApaLsSession9IsProgramERK7TDesC16Ri @ 279 NONAME + _ZNK15CApaAppViewData10IconSizesLEv @ 280 NONAME + _ZNK15CApaAppViewData10ScreenModeEv @ 281 NONAME + _ZNK15CApaAppViewData12IconFileNameEv @ 282 NONAME + _ZNK15CApaAppViewData14NonMbmIconFileEv @ 283 NONAME + _ZNK15CApaAppViewData3UidEv @ 284 NONAME + _ZNK15CApaAppViewData4IconERK5TSize @ 285 NONAME + _ZNK16CApaMaskedBitmap12ExternalizeLER12RWriteStream @ 286 NONAME + _ZNK16CApaMaskedBitmap4MaskEv @ 287 NONAME + _ZNK17CApaSystemControl12ShortCaptionEv @ 288 NONAME + _ZNK17CApaSystemControl4IconEv @ 289 NONAME + _ZNK17CApaSystemControl4TypeEv @ 290 NONAME + _ZNK17CApaSystemControl7CaptionEv @ 291 NONAME + _ZNK17CApaSystemControl8FileNameEv @ 292 NONAME + _ZNK18TApaAppServiceInfo10OpaqueDataEv @ 293 NONAME + _ZNK18TApaAppServiceInfo3UidEv @ 294 NONAME + _ZNK18TApaAppServiceInfo9DataTypesEv @ 295 NONAME + _ZNK18TApaPictureFactory11NewPictureLER14TPictureHeaderRK12CStreamStore @ 296 NONAME + _ZNK19CApaWindowGroupName10IsAppReadyEv @ 297 NONAME + _ZNK19CApaWindowGroupName14DocNameIsAFileEv @ 298 NONAME + _ZNK19CApaWindowGroupName15WindowGroupNameEv @ 299 NONAME + _ZNK19CApaWindowGroupName18SetWindowGroupNameER12RWindowGroup @ 300 NONAME + _ZNK19CApaWindowGroupName23RespondsToShutdownEventEv @ 301 NONAME + _ZNK19CApaWindowGroupName26RespondsToSwitchFilesEventEv @ 302 NONAME + _ZNK19CApaWindowGroupName6AppUidEv @ 303 NONAME + _ZNK19CApaWindowGroupName6HiddenEv @ 304 NONAME + _ZNK19CApaWindowGroupName6IsBusyEv @ 305 NONAME + _ZNK19CApaWindowGroupName7CaptionEv @ 306 NONAME + _ZNK19CApaWindowGroupName7DocNameEv @ 307 NONAME + _ZNK19CApaWindowGroupName8IsSystemEv @ 308 NONAME + _ZNK21CApaSystemControlList5CountEv @ 309 NONAME + _ZNK21CApaSystemControlList5IndexE4TUid @ 310 NONAME + _ZNK21CApaSystemControlList7ControlE4TUid @ 311 NONAME + _ZNK21CApaSystemControlList7ControlEi @ 312 NONAME + _ZNK27CDataRecognitionResultArray12GetFileNameLER4TBufILi256EEj @ 313 NONAME + _ZNK27CDataRecognitionResultArray25GetDataRecognitionResultLER22TDataRecognitionResultj @ 314 NONAME + _ZNK27CDataRecognitionResultArray4PathEv @ 315 NONAME + _ZNK27CDataRecognitionResultArray5CountEv @ 316 NONAME + _ZNK8CApaDoor7AppUidLEv @ 317 NONAME + _ZNK8TApaTask4WgIdEv @ 318 NONAME + _ZNK8TApaTask6ExistsEv @ 319 NONAME + _ZNK8TApaTask8ThreadIdEv @ 320 NONAME + _ZN17CApaSecurityUtils16CheckAppSecurityERK7TPtrC16RiS3_ @ 321 NONAME + _ZN11CApaAppData11SetCaptionLERK7TDesC16 @ 322 NONAME + _ZN11CApaAppData9SetIconsLERK7TDesC16i @ 323 NONAME + _ZTI11CApaAppData @ 324 NONAME + _ZTI11CApaAppList @ 325 NONAME + _ZTI12CApaAppEntry @ 326 NONAME + _ZTI13RApaLsSession @ 327 NONAME + _ZTI14CApaAIFCaption @ 328 NONAME + _ZTI15CApaAIFViewData @ 329 NONAME + _ZTI15CApaAppInfoFile @ 330 NONAME + _ZTI15CApaAppViewData @ 331 NONAME + _ZTI15CApaIconPicture @ 332 NONAME + _ZTI16CApaMaskedBitmap @ 333 NONAME + _ZTI16TDesCArrayFiller @ 334 NONAME + _ZTI16TSizeArrayFiller @ 335 NONAME + _ZTI17CApaAppInfoReader @ 336 NONAME + _ZTI17CApaSystemControl @ 337 NONAME + _ZTI18TApaPictureFactory @ 338 NONAME + _ZTI19CApaAppInfoReaderV2 @ 339 NONAME + _ZTI19CApaAppListNotifier @ 340 NONAME + _ZTI19CApaWindowGroupName @ 341 NONAME + _ZTI20TViewDataArrayFiller @ 342 NONAME + _ZTI21CApaAppInfoFileReader @ 343 NONAME + _ZTI21CApaAppInfoFileWriter @ 344 NONAME + _ZTI21CApaSystemControlList @ 345 NONAME + _ZTI21CAsyncFileRecognition @ 346 NONAME + _ZTI22CApaLsSessionExtension @ 347 NONAME + _ZTI23MApaAppListServObserver @ 348 NONAME + _ZTI27CDataRecognitionResultArray @ 349 NONAME + _ZTI30CApaAppServiceInfoArrayWrapper @ 350 NONAME + _ZTI32CDataRecognitionResultArrayEntry @ 351 NONAME + _ZTI33CApaLocalisableResourceFileWriter @ 352 NONAME + _ZTI34CApaRegistrationResourceFileWriter @ 353 NONAME + _ZTI7HBufBuf @ 354 NONAME + _ZTI8CApaDoor @ 355 NONAME + _ZTIN26CApaResourceFileWriterBase11RBufferSinkE @ 356 NONAME + _ZTV11CApaAppData @ 357 NONAME + _ZTV11CApaAppList @ 358 NONAME + _ZTV12CApaAppEntry @ 359 NONAME + _ZTV13RApaLsSession @ 360 NONAME + _ZTV14CApaAIFCaption @ 361 NONAME + _ZTV15CApaAIFViewData @ 362 NONAME + _ZTV15CApaAppInfoFile @ 363 NONAME + _ZTV15CApaAppViewData @ 364 NONAME + _ZTV15CApaIconPicture @ 365 NONAME + _ZTV16CApaMaskedBitmap @ 366 NONAME + _ZTV16TDesCArrayFiller @ 367 NONAME + _ZTV16TSizeArrayFiller @ 368 NONAME + _ZTV17CApaAppInfoReader @ 369 NONAME + _ZTV17CApaSystemControl @ 370 NONAME + _ZTV18TApaPictureFactory @ 371 NONAME + _ZTV19CApaAppInfoReaderV2 @ 372 NONAME + _ZTV19CApaAppListNotifier @ 373 NONAME + _ZTV19CApaWindowGroupName @ 374 NONAME + _ZTV20TViewDataArrayFiller @ 375 NONAME + _ZTV21CApaAppInfoFileReader @ 376 NONAME + _ZTV21CApaAppInfoFileWriter @ 377 NONAME + _ZTV21CApaSystemControlList @ 378 NONAME + _ZTV21CAsyncFileRecognition @ 379 NONAME + _ZTV22CApaLsSessionExtension @ 380 NONAME + _ZTV23MApaAppListServObserver @ 381 NONAME + _ZTV27CDataRecognitionResultArray @ 382 NONAME + _ZTV30CApaAppServiceInfoArrayWrapper @ 383 NONAME + _ZTV32CDataRecognitionResultArrayEntry @ 384 NONAME + _ZTV33CApaLocalisableResourceFileWriter @ 385 NONAME + _ZTV34CApaRegistrationResourceFileWriter @ 386 NONAME + _ZTV7HBufBuf @ 387 NONAME + _ZTV8CApaDoor @ 388 NONAME + _ZTVN26CApaResourceFileWriterBase11RBufferSinkE @ 389 NONAME + _ZN31TIconLoaderAndIconArrayForLeaks25TestIconCaptionOverridesLEv @ 390 NONAME + _ZN13RApaLsSession40ForceCommitNonNativeApplicationsUpdatesLEv @ 391 NONAME + _ZN11CApaAppList20AppListUpdatePendingEv @ 392 NONAME + _ZN11CApaAppList19UninstalledAppArrayEv @ 393 NONAME + \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/eabi/apstartu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/eabi/apstartu.def Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,3 @@ +EXPORTS + _ZN12CApaAppStart4NewLEv @ 1 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/group/BLD.INF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/group/BLD.INF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,108 @@ +// Copyright (c) 1999-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Application architecture +// +// + + + +/** + @file + @test +*/ + + +PRJ_PLATFORMS +WINC DEFAULT + +PRJ_EXPORTS +// test code only + +PRJ_MMPFILES +// test code only + +PRJ_TESTMMPFILES +// specify the .mmp files required for building any test programs here +// +// you can specify "manual" to denote that a test should be listed in a generated +// batch file for running a group of tests which require user input during testing. +// you can specify "support" to denote that a file is a test support file and shouldn't +// be listed in a batch file for running a group of tests +// By default, each test will be listed in a batch file for running a group of tests +// which can be left to run without requiring watching over by the person running the tests, +// i.e. tests where no user input is required. The default will apply if neither "manual" +// or "support" is specified. +../tef/apparctestserver.MMP +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +//../tef/TAppInstall/TestAppInstall.mmp +#endif// SYMBIAN_APPARC_APPINFO_CACHE +//../tef/TDoNothingFileRecognizer_v2.mmp +../tef/TSTAPP_embedded.MMP support +../tef/TSTAPP_standalone.MMP support +//../tef/m_ctrl_v2.mmp support +//../tef/SimpleApparcTestApp.mmp support +//../tef/TEXE_V2.MMP support +//../tef/TAppNotEmbeddable_v2.mmp support +//../tef/TAppEmbeddable_embedded.mmp support +//../tef/TAppEmbeddable_standalone.mmp support +//../tef/TAppEmbeddableOnly_v2.mmp support +//../tef/TAppEmbeddableUiOrStandAlone_embedded.mmp support +//../tef/TAppEmbeddableUiOrStandalone_standalone.mmp support +//../tef/TAppEmbeddableUiNotStandAlone_v2.mmp support +//../tef/TStartDocApp_v2.mmp support +//../tef/t_winchainChild.mmp support +//../tef/t_winchainLaunch.mmp support +//../tef/TLongUrlRecognizer_v2.mmp support +//../tef/TRApaLsSessionStartAppTestRecognizer_v2.mmp support +//../tef/TRApaLsSessionStartAppTestApp_v2.mmp support +//../tef/tRuleBasedApps/tRuleBasedApp1.mmp support +//../tef/tRuleBasedApps/tRuleBasedApp2.mmp support +//../tef/tRuleBasedApps/tRuleBasedApp3.mmp support +//../tef/tRuleBasedApps/tRuleBasedApp4.mmp support +//../tef/TCmdLineExe.mmp support +//../tef/TApparcTestApp.mmp support +//../tef/TTestEcomFileRec.mmp support +//../tef/TAppLaunchChecker.mmp support +//../tef/TAppLaunchChecker2.mmp support +//../tef/TNonNativeAppLaunchChecker.mmp support +//../tef/app_CTRL.MMP +//../tef/app_CTRL2.MMP +//../tef/T_EnvSlots/T_EnvSlots.MMP +//../tef/TESTREC/TESTREC.MMP +//../tef/ParentProcess.mmp +//../tef/ChildI.mmp +//../tef/ChildII.mmp +//../tef/ChildIII.mmp +//../tef/tssaac/tssaac.mmp +//../tef/tssaac/tssaac_tapp.mmp +//../tef/T_DataPrioritySystem1/T_DataPrioritySystem1.MMP +//../tef/T_DataPrioritySystem2/T_DataPrioritySystem2.MMP +//../tef/TBufferOnlyRec/TBufferOnlyRec.mmp +//../tef/TNonNative/TNonNativeRec.mmp +//../tef/TNonNative/TNNApp1.mmp +//../tef/TNonNative/TNNApp2.mmp +//../tef/TSidChecker/TestSidChecker.mmp +//../tef/TMimeRec/recmime.MMP +//../tef/TEndTaskTestApp/EndTaskTestApp.mmp +//../tef/tlargestack/tlargestackapp.mmp +//../tef/UnProctectedUidApp.mmp support +../tef/TIconLoaderAndIconArrayForLeaks.mmp +//../tef/tupgradeiconapp/tupgradeiconapp.mmp +//../tef/tnotifydrivesapp/tnotifydrivesapp.mmp +//../tef/ticoncaptionoverride.mmp +//../tef/trecupgrade/recupgrade.mmp + +PRJ_TESTEXPORTS +../tef/scripts/smoketest_language.script z:/smoketest/smoketest_language.script +../tef/scripts/setup_smoketest_language.script z:/smoketest/setup_smoketest_language.script diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/group/ExeMove.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/group/ExeMove.mk Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,216 @@ +# +# 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 "Symbian Foundation License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +EXESOURCEDIR = %EPOCROOT%epoc32\release\winscw\udeb +EXEDESTDIR = %EPOCROOT%epoc32\release\$(PLATFORM)\udeb\z\HelloV2_C +EXEDESTDIR_CONTENTS = $(EXEDESTDIR)\*.* +EMPTYDIR = %EPOCROOT%epoc32\release\$(PLATFORM)\udeb\z\System\data\Testpath\Empty + +EXENAME = HelloV2_C.exe +REGNAME = HelloV2_C_reg.rsc +RSRCNAME = HelloV2_C.rsc + +EXENAME_Z = HelloV2.exe + +SADEXENAME = HelloV2NoIke.exe +SADREGNAME = HelloV2NoIke_reg.rsc + +MBMNAME = HelloV2_C_icon.mbm +MBMNAME_DEFAULT_ROOT = default_app_icon.mbm +MBMNAME_C_APP_ROOT = HelloV2_C_icon.mbm +MBMNAME_Z_APP_ROOT = HelloV2_icon.mbm +MBMNAME_Z_APP_NOIKE_ROOT = HelloV2NoIkeIcon.mbm + +RSRCAPPSPATH = %EPOCROOT%epoc32\winscw\c\Resource\Apps +RSRCPATH = %EPOCROOT%epoc32\winscw\c\Resource +REGPATH = %EPOCROOT%epoc32\winscw\c\private\10003a3f\Apps + +ALTICONSDIR = %EPOCROOT%epoc32\winscw\c\AltIcons +ALTICONSCONTENTS = $(ALTICONSDIR)\*.* +ALTICONSDIR_Z = %EPOCROOT%epoc32\winscw\c\AltIcons\Z +ALTICONSCONTENTS_Z = $(ALTICONSDIR)\Z\*.* + +ALTICONS_REPOSITORY = %EPOCROOT%epoc32\release\$(PLATFORM)\udeb\z\IconStore +ALTICONS_REPOSITORY_CONTENTS = $(ALTICONS_REPOSITORY)\*.* +ALTICONS_MBMNAME_C_APP = HelloV2_C_icon.mbm +ALTICONS_SOURCE_MBMNAME_C_APP = ..\tsrc\HelloV2_C\AltIcon\$(ALTICONS_MBMNAME_C_APP) +ALTICONS_MBMNAME_Z_APP = HelloV2_icon.mbm +ALTICONS_SOURCE_MBMNAME_Z_APP = ..\tsrc\HelloV2\AltIcon\$(ALTICONS_MBMNAME_Z_APP) +ALTICONS_SOURCE_MBMNAME_Z_APP_NOIKE = ..\tsrc\HelloV2NoIke\HelloV2NoIkeIcon.mbm +ALTICONS_MBMNAME_Z_APP_NOIKE = HelloV2NoIkeIcon.mbm +ALTICONS_MBMNAME_DEFAULT_ICON = default_app_icon.mbm +ALTICONS_SOURCE_MBMNAME_DEFAULT_ICON = ..\tsrc\HelloV2NoIke\default_app_icon.mbm + +SYSDIR = %EPOCROOT%epoc32\winscw\c\sys +BINDIR = $(SYSDIR)\bin +SYSDIR_Z = %EPOCROOT%epoc32\release\winscw\udeb\z\sys +BINDIR_Z = $(SYSDIR_Z)\bin + +ROMBUILD_TEMP = %EPOCROOT%epoc32\release\IconsTemp +ROMBUILD_TEMP_CONTENTS = %EPOCROOT%epoc32\release\IconsTemp\*.* + +CROOTDIR = %EPOCROOT%epoc32\winscw\c + +MAKMAKE FREEZE LIB CLEANLIB RESOURCE RELEASABLES BLD SAVESPACE: + +!IF ("$(PLATFORM)" == "WINSCW") + +FINAL : +# Make the C-based-app file repository on Z + echo Creating $(EXEDESTDIR) for $(PLATFORM) + -mkdir $(EXEDESTDIR) 2>NUL + echo . + +# Move the C-based exe from the release directory to the app-file repository on Z + echo Moving $(EXENAME) for $(PLATFORM) to $(EXEDESTDIR) + -move $(EXESOURCEDIR)\$(EXENAME) $(EXEDESTDIR)\$(EXENAME) + echo . + +# Make the folder on C for resource files + echo Creating $(RSRCAPPSPATH) + -mkdir $(RSRCPATH) + -mkdir $(RSRCAPPSPATH) + echo . + +# Make the folder on C for registration files + echo Creating $(REGPATH) + -mkdir $(REGPATH) + echo . + +# Move the Z-based exe from the release directory to the sys\bin on Z + echo Moving $(EXENAME_Z) for $(PLATFORM) to $(BINDIR_Z)\$(EXENAME_Z) + -move $(EXESOURCEDIR)\$(EXENAME_Z) $(BINDIR_Z)\$(EXENAME_Z) + echo . + + echo Copying the Alt-Icons to repository on Z + -mkdir $(ALTICONS_REPOSITORY) + -copy $(ALTICONS_SOURCE_MBMNAME_C_APP) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_C_APP) + -copy $(ALTICONS_SOURCE_MBMNAME_Z_APP) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_Z_APP) + -copy $(ALTICONS_SOURCE_MBMNAME_Z_APP_NOIKE) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_Z_APP_NOIKE) + -copy $(ALTICONS_SOURCE_MBMNAME_DEFAULT_ICON) $(ALTICONS_REPOSITORY)\$(ALTICONS_MBMNAME_DEFAULT_ICON) + +# Create 'Empty' folder for T_Serv2 tests + echo Creating $(EMPTYDIR) for $(PLATFORM) + -mkdir $(EMPTYDIR) 2>NUL + echo . + + +CLEAN : +# Removing files from drive Z, the C-app-file repository + echo Deleting $(EXEDESTDIR_CONTENTS) for $(PLATFORM) + -del /q $(EXEDESTDIR_CONTENTS) 2>NUL + echo . + +# Remove the drive Z, C-app-file repository + echo Removing $(EXEDESTDIR) if empty for $(PLATFORM) + -rmdir $(EXEDESTDIR) 2>NUL + echo . + +# Remove the Z-based exe from the bin directory + echo Deleting $(BINDIR_Z)\$(EXENAME_Z) for $(PLATFORM) + -del $(BINDIR_Z)\$(EXENAME_Z) 2>NUL + echo . + +# Remove the C-based exe from the bin directory + echo Deleting $(BINDIR)\$(EXENAME) for $(PLATFORM) + -del $(BINDIR)\$(EXENAME) 2>NUL + echo . + + echo Removing $(BINDIR) if empty for $(PLATFORM) + -rmdir $(BINDIR) 2>NUL + echo . + + echo Removing $(SYSDIR) if empty for $(PLATFORM) + -rmdir $(SYSDIR) 2>NUL + echo . + +# Remove the alt-icon files for Z-based apps + echo Deleting $(ALTICONSCONTENTS_Z) for $(PLATFORM) + -del /q $(ALTICONSCONTENTS_Z) + echo . + + echo Removing $(ALTICONSDIR_Z) directory for $(PLATFORM) + -rmdir $(ALTICONSDIR_Z) + echo . + +# Remove the alt-icon files for C-based apps + echo Deleting $(ALTICONSCONTENTS) for $(PLATFORM) + -del /q $(ALTICONSCONTENTS) + echo . + + echo Removing $(ALTICONSDIR) directory for $(PLATFORM) + -rmdir $(ALTICONSDIR) + echo . + + echo Removing the alt-icons repository + -del /q $(ALTICONS_REPOSITORY_CONTENTS) + -rmdir $(ALTICONS_REPOSITORY) + echo . + +# Uninstall the C-based app + echo Deleting registration file $(REGPATH)\$(REGNAME) for $(PLATFORM) + -del $(REGPATH)\$(REGNAME) + echo . + + echo Removing $(REGPATH) if empty for $(PLATFORM) + -rmdir $(REGPATH) + echo . + + echo Removing $(RSRCAPPSPATH)\$(RSRCNAME) for $(PLATFORM) + -del $(RSRCAPPSPATH)\$(RSRCNAME) + echo . + + echo Deleting $(RSRCAPPSPATH)\$(MBMNAME) for $(PLATFORM) + -del $(RSRCAPPSPATH)\$(MBMNAME) + echo . + + echo Removing $(RSRCAPPSPATH) if empty for $(PLATFORM) + -rmdir $(RSRCAPPSPATH) + echo . + + echo Removing $(RSRCPATH) if empty for $(PLATFORM) + -rmdir $(RSRCPATH) + echo . + + echo Deleting MBM files in the root of emulated drive-C + echo . + echo $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT) + -del $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT) + echo $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT) + -del $(CROOTDIR)\$(MBMNAME_C_APP_ROOT) + echo $(CROOTDIR)\$(MBMNAME_DEFAULT_ROOT) + -del $(CROOTDIR)\$(MBMNAME_Z_APP_ROOT) + echo $(CROOTDIR)\$(MBMNAME_Z_APP_NOIKE_ROOT) + -del $(CROOTDIR)\$(MBMNAME_Z_APP_NOIKE_ROOT) + echo . + +# Remove the "Empty" dir from the drive Z + echo Removing $(EMPTYDIR) if empty for $(PLATFORM) + -rmdir $(EMPTYDIR) 2>NUL + echo . +!ELSE +FINAL : + echo Copying AltIcons to temp directory + -mkdir $(ROMBUILD_TEMP) 2>NUL + -copy $(ALTICONS_SOURCE_MBMNAME_C_APP) $(ROMBUILD_TEMP) + -copy $(ALTICONS_SOURCE_MBMNAME_Z_APP) $(ROMBUILD_TEMP) + -copy $(ALTICONS_SOURCE_MBMNAME_Z_APP_NOIKE) $(ROMBUILD_TEMP) + -copy $(ALTICONS_SOURCE_MBMNAME_DEFAULT_ICON) $(ROMBUILD_TEMP) +CLEAN : + -del /q $(ROMBUILD_TEMP_CONTENTS) 2>NUL + -rmdir $(ROMBUILD_TEMP) 2>NUL + +!ENDIF \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/group/RELEASE.TXT --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/group/RELEASE.TXT Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2677 @@ +AppArc 1.2.118 +-------------- +Released by MattM + +Upgraded to new E32TOOLS and E32TOOLP + +Updated bld.inf file to add support to support testcode, and corrected +controlpanel .def file exports. + +This release is not BC or SC due to: + +the fix for EDNATHE-488DCR (increase in the size of a class, as a fix for +potential recurring panics) + +EDNATHE-464JPQ has breaks SC and BC + +Fixed: +ER5 deferred defects +EDN761578 Recent Files list has gone +EDNBWHE-45UCS4 Need to reset shell after changing "text/html" mapping +EDNATHE-462DBT Control panel DLLs are not unloaded +EDNATHE-488DCR Recogniser names restricted to 12 characters +EDNATHE-464JPQ CApaAppInfoFile classes create temporary RFs connections +EDN779965 Dangerous code in CApaFsMonitor::Start() + + + +AppArc 1.2.117 +-------------- +Released by SimonC on 09 July 1999 + +Binary and source compatible with 116 + +Fixed EDNDMAY-49CDSX "Need to remove call to deprecated function" +Various changes to MNT to remove all references to narrow releasables. + +No test code run due to the lack of changes + +Apparc 1.2.116 +-------------- +Re-released for automated build process + +AppArc 1.2.114 +-------------- +Built by SimonC on 10 Feb 1999 + +Fixed EDN557946 "CApaFsMonitor uses the wrong form of RFs::NotifyChangeCancel" + +AppArc 1.2.113 +-------------- +Built by MattM on 29 Jan 1999 + +Fixed +Not found error after installing application + +AppArc 1.2.112 +-------------- +Built by MattM on 19 Jan 1999 + +Fixed +EDN062791 Default app can be wrong +EDN923095 RDL recognisers didn't work immediately after installation +EDN173648 Problem with RApaLsSession::AppForDataType + +AppArc 1.2.111 +-------------- +Built by MattM on 13 Jan 1999 + +Fixed +EDN537499 Panic attempting to view directory with unknown App file +EDN116503 CApaProcess::SetMainDocFileName does not allow clearing of the file name + +AppArc 1.2.110 +-------------- +Built by MattM on + +Changed priority of AppArc server to EPriorityAbsoluteForeground +Changed scanning active object from CIdle to CPeriodic, with a small pause +between each scanning unit (to allow lower priority threads a lookin) + +Fixed +EDN736553 Machine completely* locks up +EDN851148 Panic on Startup which locks the machine + +AppArc 1.2.109 +-------------- +Built by MattM on 5 December 1998 + +Changed priority of AppArc server to nearer priority of EIKSRV. + +Fixed +EDN833327 MRU list doesn't work if the C:\system\data directory doesn't exist. +EDN060924 Deleting mru.dat stops the mru-list coming up +EDN349934 Recent files does not work if there's no c:\System\Data\ directory +EDN572427 "mru.dat" should be "Mru.dat" +EDN951003 Recently used files list is case-sensitive +EDN969635 DataType may not be reported correctly + +AppArc 1.2.108 +-------------- +Built by MattM on 26 November 1998 + +SW1-427 IsProgram() return value can be incorrect +SW1-400 AppArc doesn't handle even-numbered tailend lengths correctly. +SW1-413 Shell is too slow +SW1-455 Apparc is too hard to fetch + +AppArc 1.2.107 +-------------- +Built by MattM on 12 November 1998 + +Added Base addresses for all new DLL's + +EPOC Software Problems +SW1-329 AppArc doesn't set TailEnd length. +SW1-330 RECAPP doesn't recognize narrow build documents on wide build machines +SW1-195 APSEXE.DLL WINS base address clashes with that of EIKSRV.DLL +SW1-306 Missing #defines +SW1-287 #defines should be replaced by literal descriptors + +AppArc 1.2.106 +-------------- +Built by MattM on 30 October 1998 + +Deb/rel and unicode Uid release. + +UID fest from AppArc is here: + +Control panel items: +uid 0x10000297 +unicodeuid 0x10003A34 + +Applications +uid 0x1000006c +unicodeuid 0x100039CE + +Application data files +uid 0x1000006d +unicodeuid 0x10003A12 + +Recognizers +uid 0x1000013E +unicodeuid 0x10003A37 + +AIF files +uid 0x1000006a +unicodeuid 0x10003A38 + +AppArc 1.2.105 +-------------- +Built by MattM on 28 October 1998 + +Moved ApMime to EMIME project. + +AppArc 1.2.104 +-------------- +Built by MattM on 19 October 1998 + +Breaks BC for UNICODE build users of CApaCommandLine::TailEnd. Previously this +had a TDes16 interface, now it has a TDes8 interface in both builds. This +reflects the intended usage, the passing of binary data to applications. + +The client interface to RApaLsSession now attempts reconnection if the server +terminates during an open session. + +AppArc server now uses the new fileserver notification to minimise +rescanning of drives, and the new fileserver read functions to read +the first few bytes from a file when identifying it's type. + +AppArc 1.2.103 +-------------- +Built by MattM on 24 September 1998 + +This is a BETA release + +This build breaks BC for the new exports in build 100+ + +Optimisations made to TDataType to enable Shell to perform cached lookup +on UID'd types without resorting to server calls. + +AppArc 1.2.102 +-------------- +Built by MattM on 21 August 1998 + +ONLY FOR USE BY APPS EG (and friends) + +This build breaks BC with the new exports added for build 101. + +Source compatability is maintained. + +Completed implementation of new server interface as per document +R:\apparc\dspec\Server API.rtf, please refer to that document for documentation. + +This build of AppArc is intended for use by development Shells 060+ + +AppArc 1.2.101 +-------------- +Built by MattM on 28 July 1998 + +Release valids on a clean drive + +This build is of BETA status, pending a design review of the AppArc server and Shell. + +The export in RApaLsSession UpdateDataRecognizerList() is likely to be removed in the +future. + +1) Added Data type support to AIF files +The following exports are new for R5: + +class CApaAppInfoFileReader + void DataTypesSupportedL(CArrayFix& aTypeList) const; + +class CApaAppInfoFileWriter : public CApaAppInfoFile void AddDataTypeL(const +TDataTypeWithPriority& aTypePriority); + +Supported data types are stored in Application AIF files (which are fully data +compatible with R1 AIF files) along with a concept of "Priority" this is used +for resolving the current preferred handler of a data type, in the absence of +any user preferences. + +Data type priorities are defined in APMSTD.H and are: + +KDataTypePriorityUserSpecified +KDataTypePriorityHigh +KDataTypePriorityNormal +KDataTypePriorityLow +KDataTypePriorityLastResort + +Note, it's not legal for applications to specify KDataTypePriorityUserSpecified +in their AIF file, as this can't be overridden, and contrary to all the +available evidence, the user DOES know best. + +Extended test code to cope with new stuff + +2) Added Data Type to application map to APMIME + +The following (interesting) exports have been added compared to the APMIME +release in 100: (this isn't an all inclusive list, it's just the ones that are +of interest to AppArc clients) + +class CTypeStoreManager + static CTypeStoreManager* NewL(RFs& aFs); + // Persistence + void StoreL(); + void RestoreL(); + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + // Enquiry + void GetAppByDataType(const TDataType& aDataType, TUid& aUid) const; + void GetDataTypesByAppL(TUid aUid, CArrayFix* aTypeArray) const; + const CArrayFixFlat& MappingArray() const; + // Management + void InsertDataMappingL(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + TBool InsertIfHigherL(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + void DeleteDataMapping(const TDataType& aDataType); + +These can be used to query and amend the list of application/data type associations. + +3) Added TDataTypeWithPriority and priority utilities. + +For use in 1) and 2) + +4) Fixed T_SERV debug panics + +5) Added MIME type recognition to the AppArc Server, the following exports are +new: +class RApaLsSession + TInt UpdateDataRecognizerList(); + TInt RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType); + TInt RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult); + +The Shell is responsible for ensuring the AppArc server is kept up to date with +respect of the recognizer list - clients shouldn't need to call +UpdateRecognizerList(), which due to the scanning efforts involved has a heavy +overhead. + +RecognizeData and RecognizeSpecificData will provide mime type information to +the client, based on the information supplied - the client must open the file if +this is appropriate. + +6) Added application launching to the AppArc server. + +This marks a change in the architecure of document launching. It is strongly +recommended that launchers of applications use these new server calls to broker +all their application launching. + +There is also a slight change in the way recognizers use UID's, from now the +following is true: + +The 2nd Uid if a TUidType indicates the protocol used to launch the application. +This protocol must be uniquely implemented by a recognizer in a .RDL file, +derived from CApaRecognizerType, currently supported protocols are: +The EIKON App protocol (KUidApp) +The OPL protocol (KUidOplApp) released by the OPL runtime + +It's anticipated that Java will release an additional recognizer for Java +applications (KUidJavaApp) + +The 2nd Uid contained within an EPOC store file is used for type identification, +and is mapped on to a "TDataType" that can also handle internet standard MIME +types. + +Thus a CApaRecognizerType file can now expect to be called with a document file +name, but a TUidType that is different to the TUidType within that file (this is +to support the launching of, say, Agenda files by an OPL or Java based Agenda +file viewer) + +If no mime type mapping is available the CApaRecognizerType list will be called +as for ER1 releases, this is to fully support compatibility with ER1 style 3rd +party recognizers. + +The following exports are of interest: +class RApaLsSession + TInt AppForDataType(const TDataType& aDataType, TUid& aAppUid); +This returns the binding of application to DataType in aAppUid, if there is no +binding then the current "default" handler is returned. If there is no handler +a NULL uid is returned. + + TInt StartDocument(const TDesC& aFileName, TThreadId& aId); +This starts the document file of aFileName and returns the TThreadId of the +process. The effect is the same as performing a RecognizeData on the file, +followed by a call to the next documented method. + + TInt StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aId); +This launches an application with a known data type, this is useful to clients +that already have data type information and wish to take advantage of this, and +avoid the overhead of performing a recognition on the file. This uses the +current "preferred" handler of the data type, this may be specified by the user. +If another application is desired this must be chosen explictily using the +following method. If no binding can be found for the data type the old style +recognition by the .RDL recognizers will be performed, if this doesn't get a +match KErrNotSupported will be returned. + + TInt StartDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aId); +This launches the filename with the supplied application. + +7) Added Application icons to AppArc server, the relevant export here is: +class RApaLsSession + TInt GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap); +Size is a number between 0 and 2 inclusive, representing the smallest to largest +icons for the application. The actual size of these icons is dependent on the +implementation, no scaling is performed. Fully featured EPOC apps can be expected +to supply 24,32 and 48 pixel icons on 1/2 VGA. + +8) Added test code, and less interesting utility functions for all the above. + +9) Added batch files for running test code - runtest.bat on MARM and runtestw [var] +under WINS, these live in \apparc\tdata\ + +10) Moved down to E32TOOLS 088 due to a defect in DEFMAKE + +All WINS variants pass tests +All MARM varinats pass tests, with the exception of + +T_PRO and T_OOM which fail on MARM unicode + +These failures do not constitute a regression from AppArc 100 + +AppArc 1.2.100 +============== +Built by MattM on 3/7/98 + +Jumped from 086 to 100 release to allow space for platform 4 revisions + +Changed interface in APMIME to "Data" in place of "Mime" allowing for greater +flexibility in use of "mime" types. Retained name for DLL to ensure binary +compatibility. + +Fixed defect in APMFNDR as for APFFNDR - wins REL and UREL mime recognizer +loading did not work + +Updated ROM build files + +AppArc 1.1.86 +============= +Built by MattM on 29/6/98 + +Release valids on a clean drive. + +Removed incorrect mime getrel methods +Fixed rom building scripts + +Fixes: +SW1-544 WINS rel & urel recognisers don't work + +All 4 WINS and 4 MARM variants released and tested. + +The following tests pass on all variants: + +T_CMDLN, T_FILE, T_MDR, T_WGNAM, ICONTOOL + +The following tests have the documented failure conditions: + +T_MRU fails test 07 line 248 on all MARM variants (passes on WINS) +T_OOM fails KERN-EXEC 3 on MARM Unicode variants (passes WINS and MARM narrow) +T_SERV fails on all debug variants WINS and MARM (passes on release variants) +T_PRO fails KERN-EXEC 3 on MARM Unicode variants (passes WINS and MARM narrow) + +None of these failures is a regression from AppArc 1.1.85 + +AppArc 1.1.85 +============= + +Identical to 084 without MIME releases + +AppArc 1.1.84 +============= +Built on 22/5/98 by MattM + +Changes following code review + +AppArc 1.1.83 +============= +Built on 18/5/98 by MattM + +Added MIME type recognition + +Fixed AppArc DLL loading to allow unloading of AppArc DLLs due to deletion or +updating, however due to EPOC32 defect SW1-46 this remains broken, however as of +this release it's possible to unload recognizer DLL's by removing the DLL, then +waiting sufficient time for the Shell recognizer scanner to update it's list, +then 1 second later the AppArc server list will be updated. +[an easy way is to Open/close a CF card door, this forces a full rescan] + +Fixed some VC5 warnings + +Fixed +SW1-957 Missing leave in AppArc + +Apparc 1.0.82 +============= + +Added extra support for Recent Files list for OPL apps. + + +Apparc 1.0.80 +============= +20/02/98 by Natascha + +Uses: apparc.dll: E32[120] ; F32[090] ; Store[043] ; GDI[057] + + apgrfx.dll: Fntstore[046] ; Fbserv[075] ; Bitgdi[062] ; Wserv[094] + + Mimestor[002] + +Tools: E32Tools[082] ; E32Utils[014] ; GCCTOOLS[113]; GDITOOLS[039] +EIKTOOLS[123] + +1) Rebuilt using correct Unicode components. + +Apparc 1.0.79 +============= +19/02/98 by Natascha + +Uses: apparc.dll: E32[119] ; F32[089] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[075] ; Bitgdi[058] ; Wserv[090] + +Tools: E32Tools[082] ; E32Utils[014] ; GCCTOOLS[113]; GDITOOLS[039] +EIKTOOLS[123] + +Made the following changes as a result of code review (by CharlesW). + +1) Changed CApaFileRecognizer::DoRecognizeAllApps() to +DoRecognizeAllAppsL() since it is a leaving function. + +2) Use the more efficient InsertL() function to copy one array to +another rather than AppendL() in a for loop. + +3) In CApaFileRecognizer::InsertAppIntoListL() the priority is now +based primarily on the mime type priority, not an average of the app +and mime type priorities. + +4) Put the mimestor manager on the Cleanup stack in +CApaDataTypeRecognizer functions. + +5) Made the CApaFileRecognizerData class definition and member data +private to CApaFileRecognizer. + + +Apparc 1.0.78 +============= +02/02/98 by Natascha + +Uses: apparc.dll: E32[119] ; F32[089] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[075] ; Bitgdi[058] ; Wserv[090] + +Tools: E32Tools[082] ; E32Utils[014] ; GCCTOOLS[113]; GDITOOLS[039] +EIKTOOLS[123] + +Includes UNICODE release of all components. + +1) Changed over to new build system splitting mnt.cmd into ebld.bat +and mnt.cmd and using makmake etc... + +2) Bug fix SW1-516: to speed up drawing of control panel moved the DLL loading into +CApaSystemControl::CreateL() from CApaSystemControl::ConstructL() +which was being called to build up the list of available controls. +Added member data iUidType and iFullPath. This also means that OOM +is less likely when bringing up the control panel. + +3) Bug fix SW1-451: in CApaScanningAppFinder::FindAllAppsL() set +iDriveList=NULL after deleting it (spotted by MartinB). + +4) Bug fix SW1-566: in CApaScanningAppFinder destructor now delete +iFileList. + +5) Bug fix SW1-620: in CApaScanningControlFinder::NextL() iFileIndex +was only being reset to 0 if there was a drive in between which +failed GetFileListL(); if 2 consecutive drives both had controls it +was hit and miss whether all those on the second drive would be +correctly picked up since it only started scanning the file list at +the iFileIndex value at which the drive before had finished. Fix is +to set iFileIndex=0 at the same time as deleting iFileList. + +6) Extension to recognizer scheme: added class CApaUidlessRecognizerType +which is there to recognize files that the uid-based recognizers +fail to recognize. This means that CApaFileRecognizer class now has +a new private member *iData (before only 1 pointer so store all the +new data in the one pointer to keep things BC) - iData contains +iFileRecognizerList and iUidlessFileRecognizerList, and a list of +mime types and supporting apps. + +CApaFileRecognizer::RecognizeFileL() now works by calling the +uid-based recognizers as usual, if none of them recognize the file +call all uidless recognizers, which can each add +MIME types to the list, then picks the highest priority MIME type and +finds the best app capable of handling that MIME type, if no apps are +found to support the best MIME type keep going through the list until +the best app is found, then call the uid based recognizer passing in the +uid of the app. + +Various other functions for clients to call through +CApaFileRecognizer class: + +RecognizeAllMimeTypesL() - for file +RecognizeAllAppsL() - for file +RecognizeBestAppL() - for file +RecognizeAllAppsByMimeType() - for MIME type. + +Test code added to T_FILE to test some of the uidless recognizer +functionality. + +7) Recognizer loading code changed to support the new uidless +recognizers - in CApaScanningFileRecognizer class. + +8) A new uidless recognizer CApaDataTypeRecognizer which gets MIME +types from the mimestor manager and apps from the mimestor manager +and aif files. + +9) UNICODE releases for all components. + +10) CApaAppInfoFileReader and CApaAppInfoFileWriter classes changed to support +the ability to specify supported MIME types in AIF files. + + +AppArc 1.0.077 +============== + +22/07/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 076, but extends API (see 3) + +1) MNT no longer fetches non-existant WSERV MARMUD releasables (spotted by Natascha). + +2) MNT getdef extended to get WINS control.def's + +3) Two inline methods added to CApaDoorBase to get and set the already present protected member data iSource. +This is not a 1.01 change, more a platform improvement for the initial benefit of Nautilus. + +public: + inline TUid Source()const; + inline void SetSource(TUid aSource); +protected: + TUid iSource; // foreign representation of a translated door (eg MS Word doc) + +4) Testcode T_MDR extended to test the above. + + + +AppArc 1.0.076 +============== + +16/07/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 075 + +) Fixes CSW3-1386: Overriding of ROM apps doesnt work - the in ROM versions are still loaded instead of those in RAM. The fix ensures that the correct dll is loaded, but does not cache the new AIF data. + +) Fixes SW1-122: OPL programs don't run when copied from one disk to another. This was another manifestation of the above bug, and the fix carries the same proviso (though in this case it's meaningless as the data is the same - it was just copied between discs). + +) The above fixes left a couple of slight problems, and these have been noted in a new bug report SW1-134. + + + +AppArc 1.0.075 +============== + +10/07/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 074 + +) Fixes SW3-1520 (showstopper): Apparc sometimes paniced if a document file was corrupt. Now it always leaves KErrCorrupt + +) Fixes CSW3-1680: Some code was taking the address of temporary TPtrC's returned from CApaCommandLine members. This was causing CApaLsSession::StartApp() to fail strangely in some circumstances, eg when trying to open the help database from EasyFax. + +) Fixes SW1-63: Synchronising agenda entries that countain embedded objects could lose the embedded objects entirely if the entry had been edited in eg Schedule+. Not any more though... + +) MNT VALID extended as per orders. + + + +AppArc 1.0.074 +============== + +4/06/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 073 + +) Fixes SW3-1277: AIF's of plug=in controls were not being loaded, leaving all controls with default captions and icons. A showstopper for Babel. + +) MNT getrel tweaked. + + + +AppArc 1.0.073 +============== + +2/06/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 072 + +) Fixes SW3-1041: MNT now unsets all environmental variables it uses + +) Fixes SW3-1048: CApaAppList::UpdateL() does not increment iUpdateCounter. At last the extras bar updates properly. + + + + + + +AppArc 1.0.072 +============== + +27/05/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 071 + +) Fixed SW3-950: CApaApplication:GenerateFileName() will PANIC with (100) by increasing a temp descriptors length by 4 bytes + +) Fixed SW3-1002: App list not always marked changed when it should be. Now it is. + + + +AppArc 1.0.071 +============== + +27/05/97 by IanH + +Uses: apparc.dll: E32[107] ; F32[074] ; Store[043] ; GDI[053] + + apgrfx.dll: Fntstore[043] ; Fbserv[066] ; Bitgdi[058] ; Wserv[085] + +Tools: E32Tools[067] ; E32Utils[018] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 070 + +) Upgraded to C-001 level dependancies. + +) Eradicated all "taking address of temporary" warnings caused by passing &_L("") descriptors into TParse::Set() by creating temporary variables of type TPtrC. + +) Checked that all major mnt commands work properly. + +) App list server version number incremented (I forgot to do this in the last release) + +) Fixed SW3-125: Changes to AIF files weren't being picked up by the cached app list. +The list now caches the time stamp of each app's AIF - if this changes between scans then the data is re-read. +If the AIF disappears, the icons & caption are reset to the defaults. + +) Fixed SW-5483: Password protected documents not handled gracefully under WINC. +Model doors tried to restore encrypted documents without decrypting them first, leading to death. +Now encrypted docs are not restored, instead their container stores are just kept kicking about, ready to be written out again. +This will allow Nautilus' Agenda synchronizer to deal with passworded memos tidily. + + + + +AppArc 1.0.070 +============== + +23/05/97 by IanH + +Uses: apparc.dll: E32[105] ; F32[072] ; Store[042] ; GDI[051] + + apgrfx.dll: Fntstore[042] ; Fbserv[063] ; Bitgdi[056] ; Wserv[083] + +Tools: E32Tools[066] ; E32Utils[014] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 069 + +) Fixed a bug in the recognizer list where in copying recognizers from one list to another the wrong extension was being appended to recognizer dll names and so they were failing to load. +Involved adding one line of code that parsed in the absent .RDL extension. (spotted by Bill) + + + +AppArc 1.0.069 +============== + +21/05/97 by IanH + +Uses: apparc.dll: E32[105] ; F32[072] ; Store[042] ; GDI[051] + + apgrfx.dll: Fntstore[042] ; Fbserv[063] ; Bitgdi[056] ; Wserv[083] + +Tools: E32Tools[066] ; E32Utils[014] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 068 + +) The data cached by the recognizer list to avoid calls to RLibrary wasn't actually being taken advantage of, meaning that the Shell couldn't atke advantage of these methods. +The cached data is now used whereever possible (spotted by Bill). +Changes made to CApaScanningFileRecognizer::operator[] and CApaScanningFileRecognizer::RecognizerListLC() + + + + + + + +AppArc 1.0.068 +============== + +21/05/97 by IanH + +Uses: apparc.dll: E32[105] ; F32[072] ; Store[042] ; GDI[051] + + apgrfx.dll: Fntstore[042] ; Fbserv[063] ; Bitgdi[056] ; Wserv[083] + +Tools: E32Tools[066] ; E32Utils[014] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 - 067 + +) SW3-305 fixed: CApaAppList::Update() and Purge() fixed so that overriding of built-in apps works properly. + +) Loading/unloading/overriding of file recognizer dlls fixed. This has necessitated a couple of API changes: + +Two new exported methods on CApaFileRecognizerType - Lock() and Unlock(). +When CApaFileRecognizer::RecognizeFileL() is called and a particular type recognizer returned, this object should be Lock()'ed immediately, and should only be Unlock()'ed when you've finished using it. +This will ensure the dll is not unloaded while you are using it. This change in usage will only affect the Shell. + +The protected method IMPORT_C TInt CApaFileRecognizer::RemoveFileRecognizerType(const CApaFileRecognizerType* aFileRecognizerType) added to allow recognizers to be removed from the list before their dll's are unloaded. + + + + + + + +AppArc 1.0.067 +============== + +19/05/97 by IanH + +Uses: apparc.dll: E32[105] ; F32[072] ; Store[042] ; GDI[051] + + apgrfx.dll: Fntstore[042] ; Fbserv[063] ; Bitgdi[056] ; Wserv[083] + +Tools: E32Tools[066] ; E32Utils[014] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 and 066 + +From Neil: + +) Fixed SW3-347: EXEs don't die properly when killed by the shell - all memory is now freed. + +) Fixed SW3-362: TApaTask::EndTask(TTimeIntervalMicroSeconds32 aDelay, TRequestStatus& aStatus) is flawed. +It loses its two parameters, and no longer waits to see if an app responds to the shutdown message, offering to kill it if it does not. +This behaviour was flawed because so apps where taking longer than the time limit to save their doc's before exiting, and so where being mistakenly identified as hung and were being shot. +Changes made to the .def and .frx files to remove the parameters - only Eikon need rebuild. + +From Ian: + +) Optimisations of CApaDoor::SetFormatToIcon() code have brought a 100% speed increase for both creating and restoring doors. +The changes included using the app list server to avoid scanning the filesystem when possible, and cutting down my use of AIF files (they are now loaded once instead of twice). + +) Fixed SW3-373: CreateControl should be CreateControlL(). control def & frz files altered accordingly. + +) Fixed SW3-424: AppListServer version numbers incorrect. + +) CApaScanningFileRecognizer now caches recognizers uid, drive and name so that this information can be returned to callers in other threads (the alternative, using RLibrary, will not work in this case). +This fix facilitates the Shell's use of this class. + +) "Profile" testcode added that profiles various aspects of apparc. + + + + + + + +AppArc 1.0.066 +============== + +15/05/97 by IanH + +Uses: apparc.dll: E32[105] ; F32[072] ; Store[042] ; GDI[051] + + apgrfx.dll: Fntstore[042] ; Fbserv[063] ; Bitgdi[056] ; Wserv[083] + +Tools: E32Tools[066] ; E32Utils[014] ; GCCTOOLS[113] + +General: + +Binary compatible with 065 + +From Neil: + +) Fix for SW-5164 - Bombs leaping to the foreground when tasking between apps. +BC change involving moving the new window to the front before sending the old window to the back when switching tasks. + +From Ian: + +) Introduction of 3 new classes, and accompanying testcode :-) +The technology for making the shell's control panel dynamically extensible is now in place. +Extensions come in the form of plug-in dll's who's API must conform to control.def/frx (released in ctwns*.* and ctmarm*.*). +This means a method of the form: + + EXPORT_C void CreateControl(const TDesC& aPath) + {} + +This first export must be a method that creates the control and runs it asynchronously. +The path passed in is the full path of the control's dll - this could be useful for loading resources etc. +There is no base class for these controls - implementors may write them as they wish. + +The plug-in control dll's must reside in \system\controls\ on any local drive. +They should have a ".ctl" extension and a UID2 of KUidSystemControlDll (defined in apgctl.h). +Their UID3 should uniquely identify that particular control. +The system for loading these dll's means that dll's in ROM can be overridden by dll's in RAM and on local media - this means that the standard controls in the shell may be replaced by whizzier versions in the future. + +Each control dll may have an accompanying AIF file. +If present, this file should contain the controls icon (1 icon 48x48 pixels), and it's caption in multiple languages. The other sections of AIF files are ignored for the purposes of controls. +If a control doesn't have an accompanying AIF file, its caption defaults to the dll name and a default icon is used (this icon need not be the same as that for unrecognised files). + +AppArc provides classes to automate loading and caching these plug-in controls: +CApaSystemControl (apgctl.h) is a wrapper for a plug-in extension to the shell's control panel. It represents a loaded control dll, and also caches the dll's icon and caption. +CApaSystemControlList (apgctl.h) holds a linked list of CApaSystemControl's. It also manages rescanning of the filesystem to locate new controls. +CApaScanningControlFinder (apfctlf.h) carries out the actual scanning, and it is here that the directory structure for control dll's is mandated + +One minimal sample control has been supplied in testcode: m_ctrl.mak + + + + +AppArc 1.0.065 +============== + +14/05/97 by IanH + +Uses: + + apparc.dll: E32[105] ; F32[072] ; Store[042] ; GDI[051] + + apgrfx.dll: Fntstore[042] ; Fbserv[063] ; Bitgdi[056] ; Wserv[083] + +Tools: E32Tools[066] ; E32Utils[014] ; GCCTOOLS[113] + +General: + +***** Do not touch this apparc until there's a new WPENG to go with it!!!!!!!! ***** + +Not quite binary compatible with 058 - 061 and 064, but almost nobody will notice (see 5) + +1) Moved up to C0 level dependancies. + +2) App's aifdata no longer released - this is now released with AifTool but in time will migrate to the apps themselves. + +3) Fixed SW3-71 - IMPORT_C static TInt NewThread() removed from apsserv.h as the method didn't actually exist. + +4) Fixed SW-5359 - Drives are now scanned in the order y:->a: then z:, ensuring that removable/substed drives are scanned before the RAM drive, and that ROM is scanned last. +Remote drives are not scanned. +This means that files in RAM or ROM can be overridden by plugging in a CF card - a good last ditch escape route. + +5) Fixed SW-5220 - CApaModelDoor needed a DetachFromStore(), otherwise an embedded store was being left open when its host was destroyed, causing panics in Nautilus. +CApaModelDoor now overrides virtual CPicture::DetachFromStore(), but this shouldn't affect anyone because CApaModelDoor has a NewL() and it's c'tor is private and not exported. +This fix involved adding one new export to apparc.dll - done in a BC fashion. +It also meant adding one new virtual function to CApaModelHeader: + + virtual void DetachFromStoreL(CPicture::TDetach /*aDegree*/)=0; + +This means that anyone who used this class must recompile against this new apparc - a grep of r: suggests that this will only be WPENG and Nautilus. + +grep -dli-w CApaModelHeader r:\*.cpv r:\*.inv r:\*.h_v + +File R:\APPARC\APPARC\APAMDR.CPV: +File R:\APPARC\TSRC\T_MDR.CPV: +File R:\NAOLEIFS\AGNSYSRC\E32MODEL.CPV: +File R:\NAOLEIFS\AGNSYSRC\E32RICHT.CPV: +File R:\NAOLEIFS\WRDSRC\EWORD.CPV: +File R:\NAUTILUS\SCWORD\EWORD.CPV: +File R:\WORD\WPENG\WNGDOOR.CPV: +File R:\APPARC\INC\APAMDR.H_V: +File R:\NAOLEIFS\AGNSYSRC\E32MODEL.H_V: +File R:\NAOLEIFS\WRDSRC\MODELDH.H_V: +File R:\NAOLEIFS\WRDSRC\MODELHD.H_V: +File R:\WORD\INC\WNGDOOR.H_V: + +Implementors of this class (ie WPENG) should provide this new method with a body that, if necessary, passes the call on to the model that they contain. This will ensure that all users of the store have a chance to tidily get rid of any dependance on the store before it disappears. +In the case of WPENG this will mean either adding a DetachFromStoreL() method to CWordModel that propagates the call to its text component, or making this call directly on the text from the header. +Nautilus, the only other team affected, will need to do no more than rebuild against the new apparc and WPENG. + +6) .map files for all arm dll's are now pvcsed along with the dll's themselves + + + + + + + +AppArc.064 +========== + +07/05/97 by IanH + +Uses: + + apparc.dll: E32[099+] ; F32[069+] ; Store[042+] ; GDI[048+] + + apgrfx.dll: Fntstore[038+] ; Fbserv[057+] ; Bitgdi[055+] ; Wserv[080+] + +Tools: E32Tools[063] ; E32Utils[012] ; GDITOOLS[034] ; GCCTOOLS[113] + +General: + +) Binary compatible with 058 - 062. + +) replaces bad 063 + + +AppArc.063 +========== + +07/05/97 by IanH + +Uses: + + apparc.dll: E32[099+] ; F32[069+] ; Store[042+] ; GDI[048+] + + apgrfx.dll: Fntstore[038+] ; Fbserv[057+] ; Bitgdi[055+] ; Wserv[080+] + +Tools: E32Tools[063] ; E32Utils[012] ; GDITOOLS[034] ; GCCTOOLS[113] + +General: + +) Binary compatible with 058 - 062. + +) Fixed SW-5063 - apps being orphaned if their doc's failed to construct. + +) Following three public methods added to CApaScanningFileRecognizer: + + IMPORT_C void SetRecognizerL(const TRecognizer& aRecognizer); + IMPORT_C TRecognizer operator[](TInt aIndex)const; + IMPORT_C TInt UpdateCounter()const; + +These additions have been approved by the BC police and have been implemented in a BC fashion. +They are required by the Shell so that it can keep it's two recognizers in sync with one another without undue work and allocing. + +SetRecognizerL() will return silently if a recognizer of that UID is already present in the list, but will leave if it doesn't exist on disc or has incorrect UID's etc. + +) T_File testcode expanded to test the above + + + +AppArc.062 +========== + +02/05/97 by IanH + +Uses: + + apparc.dll: E32[099+] ; F32[069+] ; Store[042+] ; GDI[048+] + + apgrfx.dll: Fntstore[038+] ; Fbserv[057+] ; Bitgdi[055+] ; Wserv[080+] + +Tools: E32Tools[063] ; E32Utils[012] ; GDITOOLS[034] ; GCCTOOLS[113] + +General: + +) Binary compatible with 058 - 061. + +) Fix to CApaDoor::NewL() that was not always deleting the doc it took ownership of in OOM conditions. + +) Texted's .AIF updated such that it's caption is now "Program" + +) The spec of CApaAppFinder::FindAppL(const TDesC& aFileName,TUid aFileUid)=0 has changed (SDK team take note!): + +- if a valid full path has been passed in as aFileName, that is returned. + +Otherwise, + +- if aFileUid is not KNullUid all drives are scanned for a file matching aFileUid and aFileName's extension (.APP is used if no extension is specified) ie. if aFileUid is supplied aFileName is ignored except for the extension +- if aFileUid is KNullUid a file matching aFileName is searched for + +This means that an app can have it's dll and directory renamed (eg system\apps\word\word.app -> system\apps\oldword\oldWord.app) and word documents will still be associated with it because association is now by UID in the first instance. + +) Testcode updated. + + + + + +AppArc.059 +========== + +29/04/97 by IanH + +Uses: + + apparc.dll: E32[099+] ; F32[069+] ; Store[042+] ; GDI[048+] + + apgrfx.dll: Fntstore[038+] ; Fbserv[057+] ; Bitgdi[055+] ; Wserv[080+] + +Tools: E32Tools[063] ; E32Utils[012] ; GDITOOLS[034] ; GCCTOOLS[113] + +General: + +) Binary compatible with 058. Source compatible unless you used KApfTempPath in apfdef.h + +) KApfTempPath now hidden in a static method Apfile::TempPath(), added in a BC manner. + +) Bug in TApaAppCapability::InternalizeL() that was causing the iIsHidden flag to always be set to false fixed (spotted by Bill). + +) 2nd UID of KSharedLibraryUid [0x1000008d] added to apparc.dll, apgrfx.dll, apfile.dll and apserv.dll (SW-3947) + +) CApaAppListServer::NewL() no longer panics if you try to create a second instance - it now leaves KErrAlreadyExists (SW-4338) + +) CApaScanningAppFinder::FindAppL() does not now confuse files and directories, and only recognizes apps with \system\apps\ in their path (SW-4325) + +) Server-side support for RApaLsSession::GetAppCapability() and StartApp() added - they no longer return KErrNotSupported. + +) Apparc no longer releases the default AIF file (appdata.zip) - this will now be released by Eikon. + + + + + + + +AppArc.058 +========== + +22/04/97 by IanH + +Uses: + + apparc.dll: E32[098] ; F32[069] ; Store[042] ; GDI[049] + + apgrfx.dll: Fntstore[038] ; Fbserv[055] ; Bitgdi[054] ; Wserv[079] + +Tools: E32Tools[063] ; E32Utils[011] ; GDITOOLS[032] ; GCCTOOLS[113] + +General: + +1) Not binary compatible with previous releases. This release freezes the API. + +) Takes new components as above + +) TBool TApaAppCapability::iAppIsHidden added to AIF files. The extensability system for capabilities means that old AIF files are still valid - they will just default to a false value for this new flag. +If this flag is set true then the app should not be shown in the Shell (eg in the extra's bar). (requested by Kevin Dempsey) + +) CApaDocument::ValidatePasswordL()const added. Apps that support passwording should override the default implementation and check the password, leaving KErrLocked if the password is set but not successfully entered. (suggested by DW) + +) CApaDoor::DocumentL(TBool aCheckPassword=EFalse) gains the aCheckPassword parameter. +If aCheckPassword is set to ETrue and the document is in memory, any password will be checked before a handle to the doc is returned. +If the document has to be restored the password will always be checked, irrespective of this parameter's value. + +) TRunContext removed from CApaApplication, along with virtual method DocumentRunContext(). +It has been replaced by a pv method Capability() that should return a cached version of the information held in the AIF file (an implementation of this method will be provided at the Eikon level). + +== sell App::Capability() and PreDocConstruct() to Eikon + +) CApaDoor's c'tor now checks that the document passed in supports embedding, leaving KErrNotSupported if it does not. + +) When CApaDoor restores a glass door but SetFormatToGlassL() fails, the door now sets itself iconic unless the error returned was KErrNoMemory, which is propagated. + +) TFileName iFullFileName removed - RLibrary::FileName() is now used instead. + +) RApaLsSession::GetAppCapability() added - stubbed for now. + +) CApaMaskedBitmap c'tor provided and made private to sabotage derivation. + +) CApaWindowGroupName member data made private. + +) CApaFileRecognizerType::RunL() now returns the TThreadId of the main thread started so that observers can log onto clients threads etc. (requested by HowardP) + +) Taken over releasing the app's .AIF files from Bill - Apparc now pvcs's the necessary bitmaps etc. + +) enum CApaFileRecognizerType::TFileType renamed TRecognizedType. Some values have been renamed: +EApp -> EProgram +ENotDocOrApp -> EOtherFile + +Type() method added to CApaFileRecognizerType that returns the TRecognizedType of the current file. + +) TUid CApaFileRecognizerType::FileType() renamed TypeUid() + +) TApaAppCapability::CopyCapability() made void. +CApaFileRecognizerType::Capability() made void. +CApaAppData::Capability() made void. +CApaAppInfoFileReader::Capability() made void. + +) CApaAppListServer no longer takes ownership of the app list and recognizer passed into its c'tor + +) UpdateList() withdrawn from the Xxx API to avoid nasty re-entrance problems in the app list. + +) The max filename length for recognizer dll's is now limited to 12 characters (not including path or extension). +This is defined as KApaMaxRecognizerNameLength in apaflrec.h + +) CRecognizerArray* RecognizerListLC()const and SetRecognizersFromList(const CRecognizerArray& aList) added to CApaScanningFileRecognizer so that multiple recognizers can be kept up-to-date without them all needing to rescan. + +) The exe recognizer now recognizes all files with a 1st UID of KExecutableImageUid (defined in e32uid.h). It runs them as exe's on ARM, but loads them as dll's under WINS (exe's dont work under WINS). +UID[2] values are no longer used for exe's - KUidExe, KUidExeNonFile and KUidExeDoc have been withdrawn. + +Changes as a result of AndrewT's API review: + +) CApaDll, and it's containing header apadll.h, made private - no longer released + +) MApaAppFinder becomes CApaAppFinder - better design, as the object can be deleted through this interface +MApaAppLocator becomes CApaAppLocator for similar reasons... + +) As a result CApaAppFinder becomes CApaScanningAppFinder + +) CApaApplication::OpenIniFileLC(RFs& aFs) becomes pure virtual to avoid dangerous policy decisions on file locations. +An implementation will be provided by Eikon :-) + +) Reserved some virtual methods in CApaApplication and CApaDocument + +) KIniFileDrive removed from apadef.h along with KIniFileExtension and KAppInfoFileExtension + +) TApaDocCleanupItem (apacln.h) has changed slightly - it's now even easier to but CApaDocument-derived classes on the cleanup stack: + + TApaDocCleanupItem cleanup(iApaProcess,doc); + CleanupStack::PushL(cleanup); + // do stuff... + CleanupStack::Pop(); + +) The following definitions moved from apadef.h to a new header apfdef.h: +KAppFileExtension +KAppInfoFileExtension +KIniFileExtension +KIniFileDrive + + + + +AppArc.056 +========== + +07/04/97 by IanH + +Uses: + + apparc.dll: E32[097] ; F32[067] ; Store[041] ; GDI[047] + + apgrfx.dll: Fntstore[038] ; Fbserv[053] ; Bitgdi[053] ; Wserv[078] + +Tools: E32Tools[060] ; E32Utils[010] ; GDITOOLS[031] ; GCCTOOLS[113] + +General: + +1) Not binary compatible with previous releases. + +) CApaMaskedBitmap::NewL() made static (spotted by Bill) + +) As suggested by Geert, the protected interfaces of all public classes have been reviewed. +The following classes no longer have protected interfaces, meaning that they lose some exported functions and can no longer be derived from: + + CApaDoor + CApaModelDoor + CApaAppFinder + CApaIconFileReader / Writer (these classes have also been renamed... see below) + +) CApaAppListServer startup changed. The server now runs in the callers thread, and takes ownership of the applist and file recognizer passed to it. +Any shell should have code similar to the following in it's construction routine (eg in CShlModel::NewL()): + + CApaAppFinder* appFinder=CApaAppFinder::NewL(fs); + appList = CApaAppList::NewL(fs,appFinder); // takes ownership of appFinder + fileRecognizer = CApfFileRecognizer::NewL(fs,appList,aAppStarter); + appListServer = CApaAppListServer::NewL(appList,fileRecognizer); // takes ownership of appList and fileRecognizer + +) Icon files have been renamed to application info files - they now contain information previously encoded into the app UID. +The old .ICN file format is no longer supported - new .AIF files for all apps will be forthcoming. +The capabilities are defined by the following class in apgicnfl.h: + + class TApaAppCapability + { + public: + TBool iCannotRunAsMainApp; + TBool iIsEmbeddable; + TBool iSupportsNewFile; + }; + typedef TPckgBuf TApaAppCapabilityBuf; + +New methods of the app info file reader and writer (previously icon file reader/writer) get and set the capability: + +TInt CApaAppInfoFileReader::Capability(TDes8& aInfo)const +TInt CApaAppInfoFileWriter::SetCapability(TDes8& aInfo)const + +Both methods should be used in conjunction with the TApaAppCapabilityBuf buffer as follows: + + // set some capabilities + TApaAppCapability capability; + capability.iIsEmbeddable = ETrue; + capability.iSupportsNewFile = EFalse; + TApaAppCapabilityBuf buf(capability); + TInt ret = writer->SetCapability(buf); + + // check the capability + TApaAppCapabilityBuf buf; + TInt ret = reader->Capability(buf); + TApaAppCapability capability=buf(); + +) There have been various API changes to support this: + - The CApaIconFileXxx classes become CApaAppInfoFileXxx + - KIconFileExtension becomes KAppInfoFileExtension and is now defined as ".AIF" + - KUidAppIcon is renamed KUidAppInfoFile, but retains the same value. + - some classes have gained Capability(TDes& ) methods, into which you should pass a TApaAppCapabilityBuf as described above. + - CApaApplication::OpenIconFileLC() becomes OpenAppInfoFileLC() + - MApaAppLocator::GetAppCapabilityByUid(TDes8& aCapabilityBuf,TUid aAppUid)=0 added + +) All apps should now have the same UID[1] - KUidApp. All other app UID values have been withdrawn. +As a result CApaDll::IsAppUid() has been withdrawn. + +) EIKAPP.DEF, the def file used by apps when linking, has been renamed APP.DEF and is now reeased by apparc into epoc32\release\wins. +The link section of all apps should now contain /def:"\Epoc32\Release\Wins\app.def" unless they have any other exports apart from those specified app.def +A matching app.frz has been released into \Epoc32\Release\Marm\ - this is only a guide however. +Each app should produce it's own set of 4 ARM .frz files (one for each build) because ARM .frz files encode the dll name and build in their first line. + +) There are two new releasables dfwns and dfarm that should be fetched to \epoc32\release\wins\ and \epoc32\release\marm\ respectively. They contain the .def files for apps and recognizers. + +From Neil: + +) CApaTask::SwitchOpenFile() and SwitchCreateFile() now check the window group name for busy and not supported flags, returning an error if the request cannot be completed. +A few chnages have been made to CApaWindowGroupName to support this + + + + + + + + + +AppArc.055 +========== + +06/04/97 by IanH + +Uses: + + apparc.dll: E32[096] ; F32[065] ; Store[040] ; GDI[046] + + apgrfx.dll: Fntstore[037] ; Fbserv[052] ; Bitgdi[051] ; Wserv[076] + +Tools: E32Tools[057] ; E32Utils[009] ; GDITOOLS[031] ; GCCTOOLS[113] + +General: + +1) Not binary compatible with previous releases. + +From Neil: + +) RestartAfterBackup() and Set...() removed from CApaWindowGroupName API as these services are now handled remotely. + +) RespondsToSwitchFilesEvent() and Set...() added to CApaWindowGroupName - an app (eg OPL) can unset this flag to inform the shell that it does not support switch files and that a new instance should be created for each new launching of the app. + +) RespondsToShutdownEvent() and Set...() added to CApaWindowGroupName - an app (eg OPL) can set this flag to inform any shell that it needs to be killed, not closed. + +) TApaTask::KillTask() added to kill tasks that dont respond to "shutdown" messages + +) T_wgnam extended to test above CApaWindowGroupName changes. + +From Ian: + +) Fixes to a couple of header files such that all referenced classes are now defined prior to their use, rather than relying on someone else doing it some time before including that header. + +) CApaAppList now behaves sensibly if an app's icon file is corrupt or empty - it loads icons from the default icon file rather than leaving. + +) CApaIconFileReader::NewL() added to complement NewLC() + +) Extra "name" builds added to all .mak files to make binary compatable releases easier (suggested by Geert) + +) Temporarily iconic doors now persist the correct glass door size even if the embedded doc is edited (bug spotted by MartinH SW-2195) + +) Base address of 0x43700000 set for apserv.dll (ommission spotted by MartinB) + +) All RApaLsSession methods now implemented except for UpdateList() and StartApp(), which still return KErrNotSupported. + + + + + + + +AppArc.053 +========== + +30/03/97 by IanH + +Uses: + + apparc.dll: E32[095] ; F32[063] ; Store[039] ; GDI[046] + + apgrfx.dll: Fntstore[037] ; Fbserv[051] ; Bitgdi[051] ; Wserv[075] + +Tools: E32Tools[056] ; E32Utils[009] ; GDITOOLS[031] ; GCCTOOLS[113] + +General: + +1) Not binary compatible + +From Neil: + +) CApaCommandLine::New(HBufC*) added. + +) Untrapped leave bug fix to CApaTaskList + +From Ian: + +) OOM testcode T_OOM added. A couple of OOM fixes have arisen from this. + +) Fix to CApaAppFinder such that it ignores more F32 errors rather than stopping a search prematurely without good reason (spotted by Simon while using his floppy drive) + +) The API of RApaLsSession (apgcli.h) is now complete, though some methods are not yet implemented server-side. +This class represents a session with the app list server. +The app list server provides system-wide access to any shell's cached list of applications. +When the shell is started it will create a CApaAppList - after doing this it should start a server, passing in the handle to it's list. +The server shares the Shell's heap and accesses the list as required. +If the shell does not set up the server all client attempts to connect will fail. Among other things, this will mean that "Embed object" dialogs will not work. + +) TApaAlServStarter::StartInThread(CApaAppList* aAppList,CApaFileRecognizer* aFileRecognizer) now takes the CApaFileRecognizer* as an extra parameter. +For you can pass in a null recognizer handle if you wish, though that will mean that clients wont be able to start apps using the app list server. + +) Americanized some argument names in header files on request of MartinT (eg aRecogniser -> aRecognizer) + +) static TInt CApaApplication::GenerateFileName(RFs& aFs,TFileName& aRootName) added - some code taken from Shell. +The root name passed should consist of drive,path,and root filename. +The path is created if it doesn't already exist, and then if the root filename is already in use a new name is generated: +eg "c:\Documents\Name.ext" + "c:\Documents\name(01).ext" +aRootName is set to equal the new full name. +KErrArgument is returned if not all components of aRootname are present, and KErrOverflow is returned if the generated filename becomes too long. + +) The definition of "non-filebased" has been tightened somewhat to mean "cannot create new files" ie an app that doesn't want to appear on the Shell's "New file" list. + +) + + + + + + + + +AppArc.052 +========== + +24/03/97 by IanH + +Uses: + + apparc.dll: E32[093] ; F32[061] ; Store[037] ; GDI[044] + + apgrfx.dll: Fntstore[036] ; Fbserv[050] ; Bitgdi[050] ; Wserv[074] + +Tools: E32Tools[053] ; E32Utils[009] ; GDITOOLS[031] ; GCCTOOLS[113] + +General: + +1) Not binary compatible + +From Ian: + +) The pure virtual method CApaDocument::IsEmptyL(CStreamStore) becomes IsEmpty()const. +It becomes const, ceases to leave and no longer takes a store as a parameter - on Restore() doc's should internalize enough data such that they know whether or not they have any content. (suggested by Delma) + +) Added new dll apserv - released as a part of the apgrfx releasables. It provides server access to a cached list of apps available on the machine. Nobody bar Eikon will want to use it. +More details to follow + +) Added CApaDoor::AppUidL() that returns the UID of the app associated with the embedded doc (requested by DavidA) + +) Icon files no longer stretch icons to the required size when they're requested. +A call to CApaIconFileReader::CreateMaskedBitmapL() will now returned the largest available bitmap that isn't larger than the requested size. +If all available icons are larger than the size requested, the smallest available icon is scaled down and returned. + + + + + +AppArc.050 +========== + +19/03/97 by IanH + +Uses: + + apparc.dll: E32[093] ; F32[061] ; Store[037] ; GDI[044] + + apgrfx.dll: Fntstore[036] ; Fbserv[050] ; Bitgdi[050] ; Wserv[074] + +Tools: E32Tools[053] ; E32Utils[009] ; GDITOOLS[031] ; GCCTOOLS[113] + +General: + +1) Binary compatible with 049 + +From Ian: + +2) Bug fix to CApaDoor::ExternalizeStateStream() - temporarily iconic doors now remember their glass size correctly after multiple Store()'s (spotted by DavidA) + + + + + + + +AppArc.049 +========== + +11/3/97 by IanH + +Uses: + + apparc.dll: E32[093] ; F32[061] ; Store[037] ; GDI[044] + + apgrfx.dll: Fntstore[036] ; Fbserv[050] ; Bitgdi[050] ; Wserv[074] + +Tools: E32Tools[053] ; E32Utils[009] ; GDITOOLS[031] ; GCCTOOLS[113] + +General: + +1) Not binary compatible with previous releases + +From Ian: + +2) Bug fix to dodgy ASSERT in CApaDoor::DetachFromStore() (spotted by DavidA) + +) CApaDocument::EditL() now takes an extra parameter: TBool aReadOnly. +If aReadOnly is true, the embedded doc should be opened in read-only mode - ie navigation of the document should be allowed, but it should not be possible to change the content. +This parameter defaults to EFalse. + +) Agenda bugs SW-479 and SW-520 fixed - glass doors now correctly persist their size if they are temporarily made iconic + +) CApaDoor::SetFormatToTemporaryIcon() now takes a TBool parameter which allows it to be toggled on and off. The default parameter is ETrue +If a door is in iconic mode, SetFormatToTemporaryIcon(ETrue) has no effect - it stays iconic. +If a door is glass, SetFormatToTemporaryIcon(ETrue) temporarily makes it iconic, but when persisted the door will persist glass door settings. +SetFormatToTemporaryIcon(EFalse) only has an effect if the door is currently ETemporarilyIconic. In this case the door is returned to EGlassDoor format. + +) TApaPictureFactory::SetIconSize() added. +If called, this causes all doors restored by the factory to have their iconic size set as specified instead of using the persisted value. +This fixes SW-1026 - doors being pasted from one app to another end up with the door size of the old app, even though this is often different to the default icon size in the new app. + +From Neil: + +) TApaWindowGroupName becomes CApaWindowGroupName, using an HBufC to provide support for long filenames. +This will fix showstopper bug SW-1488 + +Consequent changes to this class are: + +The static FindByXxx() functions no longer return an instance of the class. +Use the NewL() or NewLC() variant which takes a window group id (returned by the FindByXxx() function), to initialize a window group name or the new exported function ConstructFromWgIdL() for an existing instance of the class + +SetCaption() becomes SetCaptionL() and likewise: SetDocName() becomes SetDocNameL(); + + + +AppArc.048 +========== + +11/3/97 by DavidW + +Uses: + + apparc.dll: E32[090] ; F32[060] ; Store[037] ; GDI[044] + + apgrfx.dll: Fntstore[036] ; Fbserv[049] ; Bitgdi[049] ; Wserv[073] + +Tools: E32Tools[051] ; E32Utils[008] ; GDITOOLS[030] ; GCCTOOLS[113] + +General: + +1) Not binary compatible + +2) Provided a VALID verb for MNT.CMD, to check that the (Arm Rel and +Arm Deb) releaseables are completely rebuildable from the network + +3) Three new functions added to TApaTask: + + IMPORT_C TInt SwitchOpenFile(const TDesC& aFilename); + IMPORT_C TInt SwitchCreateFile(const TDesC& aFilename); + IMPORT_C TInt SendMessage(TUid aUid, const TDesC& aParams); + +4) The above implemented by means of new Uid values + +const TUid KUidApaMessageSwitchOpenFile={0x10000163}; +const TUid KUidApaMessageSwitchCreateFile={0x10000164}; + +5) I have broken the Unicode build, since SendMessage wants to call +an RWsSession function taking a TDesC8& as a parameter. I'll leave +this for someone else to fix + +6) Fixed the FindApp(TUid) and CycleTasks() functions to TApaTaskList +to be EXPORTed + +From Ian: +--------- +7) On Kevin's suggestion, introduced a new TFormat type for CApaDoorBase, namely ETemporarilyIconic + +8) New virtual function SetFormatToTemporaryIconL() in CApaDoor, with the effect that +// if the door is currently iconic do nothing +// if the door is glass switch it's format to iconic, but ensure that when externalized the format will be persisted as glass + + + + + +AppArc.047 +========== + +10/3/97 by IanH + +Uses: + + apparc.dll: E32[090] ; F32[060] ; Store[037] ; GDI[044] + + apgrfx.dll: Fntstore[036] ; Fbserv[049] ; Bitgdi[049] ; Wserv[073] + +Tools: E32Tools[051] ; E32Utils[008] ; GDITOOLS[030] ; GCCTOOLS[113] + +General: + +1) Not binary compatible + +2) Takes new F32, GDI, GCC + +) CApaDocument::EditL() no longer takes a store as a parameter. On restoration documents should hang onto the store handle for future reference, only nulling it if DetachFromStore() is called (this will be called before the doc is stored). + +) The OPL recogniser (formerly known as recint.rdl) is no longer released by apparc. +It will now be released as a part of OPL - .iby's should change to reflect this but no changes to mnt getbld's should be required as all apparc's recognisers are packaged in one releasable. + +) Default implementation of CApaDocument::GlassDoorL() now panics instead of returning null. Should aid debugging. (suggested by MartinB) + +) TUid iSource added to CApaDoorBase for use by converters. +It stores the foreign representation of a translated door (eg MS Word doc), and is KNullUid if the door was not created by converting from a foreign file. + +From Bill: + +) CApaAppList::UpdateL() changed such that it only increments the "UpdateCounter" if the apps present have changed. +This will stop the Shell ExtrasBar from re-drawing itself every time a file is created / deleted, etc. + +) TApaTaskList::FindApp(TUid) and TApaTaskList::CycleTasks() added (merged by NeilD) + + + + + + + + + + +AppArc.046 +========== + +4/3/97 by IanH + +Uses: + + apparc.dll: E32[090] ; F32[060] ; Store[036] ; GDI[043] + + apgrfx.dll: Fntstore[036] ; Fbserv[049] ; Bitgdi[049] ; Wserv[073] + +Tools: E32Tools[051] ; E32Utils[008] ; GDITOOLS[030] ; GCCTOOLS[111] + +General: + +1) Binary compatible with 045 + +) Fixed access violation bug in CApaDoor::SetFormatToGlass() (spotted by MartinD) + + + + + + + +AppArc.045 +========== + +3/3/97 by IanH + +Uses: + + apparc.dll: E32[090] ; F32[058] ; Store[036] ; GDI[043] + + apgrfx.dll: Fntstore[036] ; Fbserv[049] ; Bitgdi[049] ; Wserv[073] + +Tools: E32Tools[051] ; E32Utils[008] ; GDITOOLS[030] ; GCCTOOLS[111] + +General: + +1) Not binary compatible with 044 + +) updated to new components as above + +) CApaAppFinder's constructor now takes it's RFs& as const (suggested by Simon) + +) CApaDocument::GlassPictureL() no longer takes a store as a parameter. +The doc will either be newly created or will be RestoreL()'ed before GlassPictureL() is called - so CApaDocument::RestoreL() must restore the doc to a state from which it can draw itself as a glass door (if it supports this form of display). + +) CApaDoor::DocumentL() and SetFormatToGlassL() no longer take a store as a parameter + +) CApaDoor::SetFormatToIconL() no longer takes a size as a parameter - the size is passed in on construction and persisted. +An iconic door's Capability() states that it does not support scaling (ie changing its size) so that form will not allow the user to drag icons to different sizes. +Despite this the icons size may still be altered through calls to SetSizeInTwips() and SetSizeInPixels(). + +) Embedded documents in doors are now put in their own embedded store inside the door. (Thanks to Charles, AndrewT and Geert for help with this) +This means that doors can be copied without having to load up the document they contain, giving speed and memory gains. +A consequence of this is that even if a main document is encrypted, any embedded documents will remain unencrypted. +Embedded documents may be encrypted in their own right, but they do not inherit any protection from container documents. +This should be stressed in user documentation. + +) Representation of doors as icons improved - they now make better use of the different sizes of icon available. + +) If an app supports embedding (eg it has a rich text component) it should ensure that it overrides CApaDocument::DetachFromStore and propagates the call to all embedded objects. + +) CApaIconFileReader::NewLC() now accepts KNullUid instead of a valid uid for the icon file, and doesn't check the type in this case. + +) MApaAppFinder gains two more pure virtual methods that return the temp file path and the full filename of the default icon file, centralizing access to the two pieces of info. + +) CApaProcess::NewL() no longer takes a temp path as a parameter. This path is now defined in apffndr.h and need not be defined anywhere else. + +) CApaModelDoor now stores and restores it's format and size such that it can be understood by a CApaDoor and vice versa. + +) Class CApaDoorBase introduced, which CApaModelDoor and CApaDoor inherit from. +The enum TFormat that was scoped by CApaDoor is now scoped by CApaDoorBase. +The method CApaDoor::GetFormat() moves to CApaDoorBase and changes name to Format(). + +) The UID typing scheme for app dll's has been extended slightly. +The general layout for an app dll's uid type has not been changed, and is: + +UID[0] = PE File +UID[1] = Type of app +UID[2] = particular app id + +The types of app have been extended to specify whether or not an app is file-based, and are now as follows: + +KUidApp 0x1000006c - file-base, non-embeddable app (eg Agenda) +KUidAppNonFile 0x1000014a - non-file based non-embeddable app (eg Calculator) +KUidAppEmbeddable 0x1000006e - file-based embeddable and main app (eg Word) +KUidAppEmbeddableNonFile 0x1000014b - non-file-based main and embeddable app (no eg) +KUidAppEmbeddableOnly 0x1000006f - app is embeddable only, cannot run as a main app (therefore non-filebased by definition) + +File-based apps are document centric and create lots of files (eg word), while non-file-based apps aren't and don't (eg calculator). +All app writers must choose the UID that best suits their app - see Ian if you're unsure. +This change will allow the shell to list only file-based apps in it's "Create new file" dialog. +This has involved a couple of UID name changes (though the meaning of the UIDs reamins the same) + +KUidAppDll becomes KUidApp +KUidAppAndEmbeddedApp becomes KUidAppEmbeddable + +) A third file recogniser dll added: RECEXE.DLL, the exe recogniser. This recognises files with the following uid layout: + +For exe's: + +UID[0] = PE File +UID[1] = Type of exe +UID[2] = particular exe id + +The types of exe mirror the types of app, and are as follows: + +KUidExe 0x10000070 +KUidExeNonFile 0x1000014C + +For doc's associated with exe's: + +UID[0] = Store type +UID[1] = KUidExeDoc 0x10000071 +UID[2] = id of associated exe + +) File recogniser dlls now have a .rdl extension (Recognizer DLl) and live in \system\recogs NB this means mnt getrel's will have to change to get the recognisers down into this directory + +) Changes to CApaFileRecognizerType: +RecognizeFileL() becomes concrete and a pure virtual method DoRecognizeFileL() is added. +TUid iFileType is added - by default this is set to UID[1] of the recognized file - it's type +TUid iAppUid is now the UID of the associated app - by default this is set to UID[2] of the recognized file. +There are now inline methods to return these two UID's. +Pure virtual method Capability() added - this returns a TCapability class detailing whether the recognised file is a program, and, if so, whether it is file-based and whether it is embeddable. + +) CApaDocument::DetachFromStoreL() now takes a CPicture::TDetach as a parameter. +This will be one of EDetachFull and EDetachDraw. +For EDetachFull you should ensure that you internalize all data that you require to fully store yourself later, and null any references to containing stores. +For EDetachDraw you should ensure that you have internalized enough info to draw yourself, nothing more, and that you null any references to containing stores. +If an app doesn't support drawing as a glass door it wont have to do anything in the case of EDetachDraw (except that nulling of stores). + +From Neil: + +) TApaCommandLine class heavily revamped. +It's now called CApaCommandLine, and gains methods for setting each component of the command line separately. + +) Implementors of MApaAppStarter::StartAppL(const CApaCommandLine& aCommandLine) should note that it must now take ownership of the command line and protect it and destroy it appropriately. + + + + + + + + +AppArc.043 +========== + +13/2/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[035] ; GDI[042] + + apgrfx.dll: Fntstore[035] ; Fbserv[045] ; Bitgdi[045] ; Wserv[065] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[111] + +General: + +1) Not binary compatible with 042 + +) updated to new components as above + +2) A large-scale re-organisation of code has taken place. +AppArc is now split into 3 major dll's plus multiple plug-in app recognisers. +Of all the changes, the highlights include: + +The file recogniser base classes now live in apparc.dll and can be found in apaflrec.h, not apgflrec.h as was previously the case. + +TApaAppIdentifier, TApaAppEntry and TApaAppFinderBase now live in a new header apaid.h in apparc.dll + +Apgrfx.h becomes apgdoor.h as it defines CApaDoor + +TApaAppFinderBase becomes MApaAppFinder, and gains member functions to find all available apps as well as finding a particular one. + +TApaAppFinder becomes CApaAppFinder. It now lives in apfile.dll and encasulates all the search logic that depends on any particular file system structure (ie system\apps etc). + +CApaAppList now takes a MApaAppFinder as a parameter to its constructor, using this to build its list of available apps. It takes ownership of the app finder supplied. + +A couple of mixins gain virtual inline destructors. This allows derived objects to be deleted through these interfaces. + +Names defined for a few previously anonymous CBase-derived classes. + +apgrfx.h becomes apgdoor.h + +CApaModelHeader::AppId() made const (suggested by Duncan) + +Class CApaScanningFileRecogniser added - this is a concrete implementation of CApaFileRecogniser that scans the system for plug-in app recogniser dlls (eg interpreted app recogniser, exe recogniser, apparc app recogniser). +Plug-in app recognisers are searched for in \system\libs\ on all non-remote drives. +Plug-in dlls should have the following UIDS: + UID[0] = [dll build] + UID[1] = KUidAppRecognizer (={0x1000013E}) + UID[2] = [uid of the particular dll] (eg KUidInterpreterExe for the exe interpreter) +A plug-in's first exported function should be a parameterless constructor that returns a pointer to full constructed object of base type CApaFileRecogniserType. + +A concrete implementation of MApaAppLocator, CApaAppLocatorProxy, is also provided (for the sole use of CApaScanningFileRecogniser). This class implements GetAppEntryByUid(TUid) by scanning the system for an app dll that has the matching UID. + +App dll's should now once again export their constructor as their ordinal 1 method. The dummy 1st export is no longer required due to changes in the shell to bring it into line with the rest of the world. (Sorry for the hassle). + + +Testcode: + +T_FILE testcode added that tests the built-in app finder, and also CApaScanningFileRecogniser. + +T_PRO expanded to test classes CApaAppList and CApaAppData that previously had no testcode. + + + + +AppArc.042 +========== + +12/2/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[035] ; GDI[042] + + apgrfx.dll: Fntstore[035] ; Fbserv[045] ; Bitgdi[045] ; Wserv[065] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[111] + +General: + +1) Binary compatible with 041 + +2) Regressed to GCCTOOLS 111 + +3) Interpreted app starter re-written (by Howard) + +4) Bug fix to command line to remove trailing space from full command line (by Neil) + +Notes for Glass-door enabled apps and SDK: + +Having just written a glass door add-on for TOPBUT1 I thought it might be worth more carefully defining a couple of the methods in the CPicture interface: + +The "Current size" of a picture is calculated from the original size taking cropping and scale factor into account. + +The value of "Crop" is relative to the *original* size of the picture. + + + + + + + +AppArc.041 +========== + +7/2/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[035] ; GDI[042] + + apgrfx.dll: Fntstore[035] ; Fbserv[045] ; Bitgdi[045] ; Wserv[065] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[112] + +General: + +1) Not build compatible with 040 + +) Apps must now export their constructor as the ordinal 2 function of their app dll. +Changes will be made to the Eikon .def file to support this, but all apps should add the following line to their project to ensure that they have a first exported function as well as a second: + +__FIRST_EXPORT + +) Bug fix in command line classes by Neil + + + + +AppArc.040 +========== + +6/2/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[035] ; GDI[042] + + apgrfx.dll: Fntstore[035] ; Fbserv[045] ; Bitgdi[045] ; Wserv[065] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[112] + +General: + +1) Binary compatible with 039 + +) Changes made to CApaAppData such that if an application doesnt have an icon file it's dll name is used as a caption and the default icon is used as it's icon. Previously apps without icon files weren't being detected by the shell at all. + + + + + + + + +AppArc.039 +========== + +5/2/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[035] ; GDI[042] + + apgrfx.dll: Fntstore[035] ; Fbserv[045] ; Bitgdi[045] ; Wserv[065] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[112] + +General: + +1) Not binary compatible with 038 + +) apgrfx.dll now has its base address set to avoid conflicts (spotted by MartinB) + +) MApaDocContainer renamed MApaEmbeddedDocObserver, and an extra exit mode "EEmpty" added. If an embedded document has no content it should return EEmpty when it exits, and the container can then choose not to insert it if it doesnt want to. + +) Bug in CApaDoor::RestoreDoc() fixed (spotted by DavidA) + +From Bill: + +) Rewrite of the file recogniser module, and new classes CApaAppList and CApaAppData that cache a list of all apps available on the system. No testcode for this stuff yet... + +) The interpreted app recogniser is now completely buggered and will have to be rewritten (Howard?) + +From Neil: + +) Relocated the TApaCommandLine class from Eikon to Apparch. This class encapsulates the command line and is formatted as follows: + +command byte> + +app name and doc name may conatain spaces if surrounded by quotes. Embedded quotes in these names is not supported. + +Various accessor functions exist to extract the various components of the command line, and setter functions will be added soon (for now you must construct the command line in a descriptor and call Set()) + +This class will be used to start all apps. This has involved some API changes to the file recognizer classes. + +New class TApaWindowGroupName to encapsulate the window group name of applications. Set and get functions exist for all components. + +The window group name stores the caption name, document name, application uid, and several "status bits" for apps to mark themselves as System (will not be closed for backup), Busy, that there document name is not actually a file (eg Platypus) and whether the app wishes to be restarted after a backup (mainly for use by OPL programs but will be ignored in version 1 anyway!) + +Test code for TApaWindowGroupName in T_WGNAM.* + + + + + + +AppArc.038 +========== + +3/2/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[035] ; GDI[042] + + apgrfx.dll: Fntstore[035] ; Fbserv[045] ; Bitgdi[045] ; Wserv[065] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[112] + +General: + +1) Not binary compatible with 037 + +2) Takes the new gdi etc. + +3) CApaProcess::NewL() now takes a TApaAppFinderBase by & instead of as a *, and no longer defaults this parameter to NULL. +The default search algorithm will now be provided in Eikon and must be passed in each time on construction of a process. +Nb CApaProcess takes ownership of the TApaAppFinderBase passed in, which should be allocated on the heap. + + + + + + + + + +AppArc.037 +========== + +31/1/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[033] ; GDI[041] + + apgrfx.dll: Fntstore[034] ; Fbserv[044] ; Bitgdi[044] ; Wserv[064] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[111] + +General + +1) Not binary compatible with 036 + +) App dlls are no longer Gate()'ed on loading. +This means that __DECLARE_APP_DLL_UID should no longer be declared in each app's code and that the ordinal one function of an app dll should now be the constructor (this was previously the ordinal 2 function). + +) Missing exports added to many file recogniser methods + + + + + + + +AppArc.036 +========== + +27/1/97 by IanH + +Uses: + + apparc.dll: E32[086] ; F32[050] ; Store[033] ; GDI[041] + + apgrfx.dll: Fntstore[034] ; Fbserv[044] ; Bitgdi[044] ; Wserv[064] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[111] + +General + +1) Not binary compatible with 035 + +) apgrfx.dll now links to wserv + +) Icon files no longer store iRequiresNewDocName, which as a result no longer has an accessor (change from Bill) + +) New modules: + +ApgTask.h - the task and task list classes (formerly in Eikon) + +ApgFlrec.h - the file recogniser classes (formerly in Shell) + +ApgApp.h - the app recogniser for app arc apps (formerly in Shell) + +ApgInt.h - the app recogniser for interpreted apps (formerly in Shell) + +The above modules have no testcode as yet... + + + + + + + +AppArc.035 +========== + +27/1/97 by IanH + +Uses: E32[085] ; F32[049] ; Store[033] ; GDI[041] ; Fntstore[034] ; Fbserv[044] ; Bitgdi[044] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[111] + +General + +1) Not binary compatible with 034 + +3) There will be at least one more non-binary compatible release this week before the B5 freeze. + +Changes + +4) Further re-arrangement of code between the two dll's. CApaDoor is now entirely in apgrfx.dll, and no longer has a CApaDoorBase baseclass. + +5) A new module apamdr added for the benefit of Nautilus-type converters. +It contains a concrete CApaModelDoor that contains a CApaModelHeader. +Concrete implementations of the header must be provided for all application models that wish to support embedding and have their embedded documents translated by Nautilus. +The persistant format of a CApaEmbeddedDoor is compatible with that of a CApaDoor to the extent that either can be internalized by the other safely. +A factory class must be provided for each implementation of the header. + +) In the interests of encapsulation CApaDocument::Capability() now returns a CApaDocument::TCapability instead of a TUint (suggested by Duncan). + +) CApaProcess::MainDocFileName() and TempFilePath() now return TPtrC instead of const TDesC* (suggested by Brendan) + +) If a glass door is passworded it will now be automatically iconified on restoration and the user will only be prompted for a password when they directly interact with it. + +) const TUid KUidSecurityStream={268435661} is now defined in apparc.h - this is the uid that should be used for the security stream for passworded documents. + +) The persistant format of CApaDoors has changed, so any apps that support embedding will find that their file formats have changed also... + + + + + + +AppArc.034 +========== + +20/1/97 by IanH + +Uses: E32[085] ; F32[049] ; Store[033] ; GDI[041] ; Fntstore[034] ; Fbserv[044] ; Bitgdi[044] + +Tools: E32Tools[050] ; E32Utils[005] ; GDITOOLS[028] ; GCCTOOLS[111] + +General + +1) Not binary compatible with 033 + +2) Takes new E32 etc. + +) The search algorithm for locating app dll's has changed. An app dll is now searched for in \system\apps\appname\appname.app on all drives until one is located. Files of the correct name can optionally have their uids checked. This new algorithm should significantly speed up loading of documents. + +) CApaProcess now takes a TApaAppFinderBase* as a parameter of its NewL() instead of a search path. This base class efines an API for access to a method in which any search algorithm required could be implemented. This parameter defaults to NULL, and if no finder is passed in a default one is used that implements the above behaviour. A substitute finder should only be passed in if eg a different directory structure is implemented on a future machine. CApaProcess takes ownership of any app finder passed in. + +) As a result of the search code moving CApaDll no longer has a FindAppDll() method. + +) CApaDoor gains a NewL to complement its NewLC (requested by SimonC) + +) inline const TDesC* TempFilePath()const added to CApaProcess (requested by SimonC) + +) CApaProcess::OpenNewDocumentL() now takes a CStreamDictionary*& as an extra parameter - this is read in from the file that is opened (error spotted by Kevin). + +) ReadRootStreamL() and OpenNewDocumentL() take a TUint aFileMode as additional parameters. aFileMode indicates the mode in which the file should be opened. For most use this should be set to EFileShareExclusive|EFileWrite, while EFileShareExclusive|EFileRead should be used if the file is to be opened read only. These methods no longer try to open files with write access, retrying with read-only access if this fails. If you require this behaviour you'll have to do it yourself by trapping calls to these methods. + +) The following CApaProcess methods are now static: + + static CStreamDictionary* ReadRootStreamLC(RFs& ,CFileStore*& ,const TDesC& ,TUint ) + static void WriteRootStreamL(CFileStore& ,CStreamDictionary& ,const CApaApplication& ) + static TApaAppIdentifier ReadAppIdentifierL(const CStreamStore& ,const CStreamDictionary& ) + static void WriteAppIdentifierL(CStreamStore& ,CStreamDictionary& ,const TApaAppIdentifier& ) + +Note that ReadRootStreamL() now takes an RFs& and WriteRootStreamL() has been overloaded with a version that takes a correctly constructed TApaAppIdentifier instead of a CApaApplication& + +) Access violation bug in ~CApaProcess() fixed (spotted by MartinB) + +) The plan for passworded documents: + +When a document's RestoreL() is called and it begins to restore, the first thing it should do is check to see whether its store contains an appropriate password stream. +If it does then this means the store is passworded, so prompt the user to enter the password (EikProcess should provide a method that pops up this dialog for you). +If the password is entered correctly then continue restoration. +If the password is wrong, RestoreL() should leave KErrLocked. + +) CApaDoor::RestoreL() will not leave if a *glass* door's RestoreL() leaves with KErrLocked. +Instead it TRAP's the leave and iconises the document without restoring it. +In this way the user can try to open the document again later if they want to view it. + +) CApaDocument::CanDrawGlass() becomes Capability() - this returns a set of flags (defined in CApaDocument) as follows: + + enum { + ECanDrawGlass =0x01, + ECanPrint =0x02 + }; + +By default this method returns 0 (ie the doc can do nothing) - return any combination of the above flags if you feel more daring + +) CApaApplication::OpenIconFileLC() is now pure virtual - an implementation will be supplied by Eikon's CEikDocument + + + + + +AppArc.033 +========== + +10/1/97 by IanH + +Uses: E32[082] ; F32[046] ; Store[032] ; GDI[040] ; Fntstore[033] ; Fbserv[043] ; Bitgdi[043] + +Tools: E32Tools[049] ; E32Utils[004] ; GDITOOLS[028] ; GCCTOOLS[111] + +General + +1) Not binary compatible with 032 + +2) Takes new GDI etc + +3) Definitions for KIconFileExtension, KIniFileExtension and KAppFileExtension are now publicised in apparc.h + +4) Ini files now always live on drive c: + + +CApaApplication changes: + +5) OpenIconFileL() and OpenIniFileL() become LC and const + +6) New method: + + TFileName AppFullName()const; + +This should return the full path and name of the app - by default the dll name & location is returned but this method may be over-ridden by eg OPL to return another location. (requested by Howard) + + +CApaDocument changes: + +7) CApaDocument::CreateFileStoreLC() has changed its specification. Previously it returned a stream dictionary and took a store by reference. The first thing any caller did after calling this function was to write the rootstream of the file to make it valid and then destroy the stream dictionary. The WriteRootStream() step has now been moved inside CreateFileStoreLC(), meaning that it now returns a CFileStore* instead of taking one by reference. One new line of code should be added at the end of applications' CreateFileStore() implementations: + + iApaProcess->WriteRootStreamL(*store,*streamDic,*Application()); + +This will ensure that CreateFileStoreLC() now returns a fully constructed and initialised file store (on the cleanup stack). + + +CApaProcess changes: + +8) MainDocFileName() becomes const + +9) SetMainDocFileNameL(const TDesC&) loses the L - it can no longer leave, though it will panic if a filename larger than a TFileName is passed in. + +10) SetMainDocument(CApaDocument* aDocument) added. It panics if aDocument has not already been added using AddNewDocument() or OpenNewDocument() + +11) ImportNewDocumentL() becomes + + CApaDocument* OpenNewDocumentL(CFileStore*& aStore,const TDesC& aDocFullFileName) + +It now returns the opened store via a parameter taken by reference. + +12) SaveToDirectFileStoreL() withdrawn - this method will now be provided by Eikon. + +13) NewMainDocumentL() and OpenMainDocumentL() have been withdrawn. A combination of Open/AddNewDocument() and SetMainDocument() should now be used. Combined with the above changes this in fact gives Eikon and applications much more flexibility in creating and opening documents. + +Replacing a typical call to OpenMainDocumentL(), the following calls should take place: + + // open the document + CFileStore* store = NULL; + CApaDocument* doc = apaProcess->OpenNewDocumentL(store,filePath); + // set it as the main document + apaProcess->SetMainDocument(doc); + apaProcess->SetMainDocFileName(filePath); + +Replacing a typical call to NewMainDocumentL(), the following calls should take place: + + // create a new document + CApaDocument* doc = apaProcess->AddNewDocumentL(dllname); + apaProcess->SetMainDocument(doc); + // create the store and initialise it + CFileStore* store = doc->CreateFileStoreLC(apaProcess->FsSession(),filePath); + apaProcess->SetMainDocFileName(filePath); + // initialise the document with factory settings + doc->NewDocumentL(); + + +CApaDoor changes: + +14) If there is no caption in an application's icn file the Caption() in a containing CApaDoor is now set to a zero length descriptor instead of "UNKNOWN". This should be detectyed at a higher level and some locale specific message substituted. + +15) Default icon size should now be passed in to CApaDoor::NewL() - it is no longer hard-coded to TSize(500,500) + + + + +AppArc.032 +========== + +19/12/96 by IanH + +Uses: E32[076] ; F32[042] ; Store[030] ; GDI[039] ; Fntstore[032] ; Fbserv[039] ; Bitgdi[041] + +Tools: E32Tools[048] ; E32Utils[004] ; GDITOOLS[027] ; GCCTOOLS[111] + +1) Binary compatible with 030 and 031 (B4 level) + +2) NewMainDocumentL() altered slightly such that the filename is correctly set before NewDocumentL() is called on the newly creaed document. This allows some speed optimisations in Word. + + + + +AppArc.031 +========== + +17/12/96 by IanH + +Uses: E32[076] ; F32[042] ; Store[030] ; GDI[039] ; Fntstore[032] ; Fbserv[039] ; Bitgdi[041] + +Tools: E32Tools[048] ; E32Utils[004] ; GDITOOLS[027] ; GCCTOOLS[111] + +1) Binary compatible with 030 + +2) As per the spec team decision the icons representing embedded objects are no longer resizable by dragging. + +This effect is slightly weird because when the icon is highlighted it has the blobby marquee around it which somewhat implies that you can drag its extent. +However, if you try to drag one of the blobs you immediately launch the embedded application - not exactly intuitive. +Maybe two different types of marquee are required, one to indicate dragableness and the other just focus (but this falls down when you consider using shift-drag to crop). + + + +AppArc.030 +========== + +13/12/96 by IanH + +Uses: E32[076] ; F32[042] ; Store[030] ; GDI[039] ; Fntstore[032] ; Fbserv[039] ; Bitgdi[041] + +Tools: E32Tools[048] ; E32Utils[004] ; GDITOOLS[027] ; GCCTOOLS[111] + +1) Binary compatible with 029 + +Changes to CApaProcess: + +) SaveToDirectFileStoreL() now creates any temporary file on the same drive as the target document to ensure that RFs::Replace() works. + +) SaveToDirectFileStoreL() now checks that the store passed in is non-null and of the right type. + +) NewMainDocumentL() code re-arranged so that it is now rollback-robust (thanks Duncan). This fixes HA-383 + + + + +AppArc.028 +========== + +05/12/96 by IanH + +Uses: E32[076] ; F32[042] ; Store[030] ; GDI[039] ; Fntstore[032] ; Fbserv[039] ; Bitgdi[041] + +Tools: E32Tools[048] ; E32Utils[004] ; GDITOOLS[027] ; GCCTOOLS[111] + +1) B4 release. This is not compatible with the previous release. + +Changes: + +) CApaDoor::SetFormatToGlassL() no longer takes a TSize as a parameter. The embedded document is now relied upon to initially size itself sensibly and from then on to remember any changes in scaling and cropping. + +) Subtle chagnes to iconic doors - they are now scalable but not cropable. + +) Any concept of document file extensions has been removed from application architecture, in line with current thinking: + + CApaApplication::DocFileExtension() withdrawn, and extensions are no longer appended to filenames. App dll's, icon files and ini files retain their extensions. + + + +AppArc.027 +========== + +03/12/96 by IanH + +Uses: E32[075] ; F32[042] ; Store[030] ; GDI[039] ; Fntstore[032] ; Fbserv[039] ; Bitgdi[041] + +Tools: E32Tools[048] ; E32Utils[004] ; GDITOOLS[027] ; GCCTOOLS[111] + +1) B4 release + +Changes: + +) inline CApaDoor::GetFormat()const added that returns one of CApaDoor::EIconic or CApaDoor::EGlassDoor depending upon the door's current format. + +) Iconic door code re-written to (hopefully) solve the problems of resizing etc. + +) CApaApplication::OpenIniFileLC() is now implemented to return a CDictionaryStore (see Store release notes for details of this class). The path of the ini file is determined to be the same as that of the app dll unless the app dll is in ROM in which case the same path is used except on drive c: +CDictionaryStore should be treated as a temporary object - all the time it exists the file is open, so the object should be destroyed as soon as it is finished with to ensure that other processes are not unnecessarily blocked from using the file. + +Here is some example code for using an ini file in a (possibly) typical scenario: + + // + // open an app's ini file + CDictionaryStore* iniFile = Application()->OpenIniFileL(TheFs); + CleanupStack::PushL(iniFile); + // + // read the required data stream out of the file + RDictionaryReadStream readStream; + readStream.OpenL(*iniFile,aDataStreamUid); + TLotsOfData data; + readStream>> data; + readStream.Close(); + // + // close the ini file + CleanupStack::PopAndDestroy(); // iniFile + iniFile = NULL; + // + // + // ... + // do loads of stuff (eg launch a dialog) that uses the data read in + // ... + // + // + // if the data has changed as a result of "doing stuff" then re-write it to the ini file + CDictionaryStore* iniFile = Application()->OpenIniFileL(TheFs); + CleanupStack::PushL(iniFile); + // + // write the new data + RDictionaryWriteStream writeStream; + writeStream.AssignL(*iniFile,aDataStreamUid); + writeStream<< data; + writeStream.CommitL(); + writeStream.Close(); + // + // commit the store safely and close it again + if (iniFile->Commit()!=KErrNone) + iniFile->RevertL(); // try to restore the store to it's previous state if things go wrong + CleanupStack::PopAndDestroy(); // iniFile + iniFile = NULL; + // + + +AppArc.026 +========== + +27/11/96 by IanH + +Uses: E32[074] ; F32[041] ; Store[029] ; GDI[038] ; Fntstore[031] ; Fbserv[038] ; Bitgdi[040] + +Tools: E32Tools[046] ; E32Utils[003] ; GDITOOLS[027] ; GCCTOOLS[111] + +1) Takes new GDI etc., and new gditools (all bitmaps have to be reconverted). + +Changes: + +) RDebug::Print()'s removed from the apparc dll + +) CApaDoor::DetachFromStoreL() added to completely restore the embedded document. + +) CApaDocument::DetachFromStoreL(const CStreamStore& aStore) added. This does nothing by default - an app should supply an imlementation if they support deferred loading. In this case the action of this method should be to load in any data not yet internalized from the store, but not to overwrite any data already in memory. + + +AppArc.025 +========== + +22/11/96 by IanH + +Uses: E32[074] ; F32[040] ; Store[029] ; GDI[037] ; Fntstore[030] ; Fbserv[037] ; Bitgdi[039] + +Tools: E32Tools[046] ; E32Utils[003] ; GDITOOLS[026] ; GCCTOOLS[111] + +1) Binary compatible bug fix release for Agenda and Data + +2) No new components taken + +Changes: + +) Files are now opened writable if this is possible, only defaulting to read-only if opening as writable fails. This allows documents based in permanent file stores to be edited :-) (Spotted by Kev) + + +AppArc.024 +========== + +19/11/96 by IanH + +Uses: E32[074] ; F32[040] ; Store[029] ; GDI[037] ; Fntstore[030] ; Fbserv[037] ; Bitgdi[039] + +Tools: E32Tools[046] ; E32Utils[003] ; GDITOOLS[026] ; GCCTOOLS[111] + +1) This release is being made primarily to allow work to proceed on OPL + +2) No new components taken + +Changes: + +) Some files have changed name: + AppIcnfl.* -> ApaIcnfl.* + AppPriv.h -> ApaDll.h + AppStd.h -> ApaStd.h + AppUtil.cpp -> ApaStd.cpp + +) CApaIconFileWriter::AddIconL(CApaMaskedBitmap& aIcon) added. + +) TAppCaption becomes TApaAppCaption + + +AppArc.023 +========== + +15/11/96 by IanH + +Uses: E32[074] ; F32[040] ; Store[029] ; GDI[037] ; Fntstore[030] ; Fbserv[037] ; Bitgdi[039] + +Tools: E32Tools[046] ; E32Utils[003] ; GDITOOLS[026] ; GCCTOOLS[111] + +2) This release reinstates all the testcode that was dropped in the change to the new directory structure. + +3) The base address for the AppArc dll is now set as 0x40000000 in line with MartinB's revised suggestion. + +4) AppArc.dll now supports typesafe linking with uid KApparcDllUid = 0x100000DE + +5) New releasable appdata that contains the default icn file (see below). It should be fetched into: + \Epoc32\Release\Wins\Rel\Z\System\Data + \Epoc32\Release\Wins\Deb\Z\System\Data + \Epoc32\Release\Marm + +and the following line should be placed in .oby files: + + data=\Epoc32\Release\Marm\default.icn System\Data\default.icn + + +Changes: + +) CApaDoor now has access to a default icon file which it uses if it can't locate the correct icon file (eg the app used to embed an object was on a CF card). This means that apps no longer *require* the existance of an icon file to be embeddable + +) The persistant format of *glass* doors has changed , so files containing such doors will be incompatible with previous versions of apparc. + +) TDesC* CApaDoor::Caption() added that returns the name of the app with which the embedded object is associated. + +) CApaApplication::IniFileUid() and IconFileUid() have been withdrawn as they were of no use and made no sense. + +) CApaDocument::HasChanged() is now pure virtual, and CApaDocument no longer has a TBool iChanged as member data. This keeps apparc policy independant as different apps will want to implement this function in different ways. Eikon may supply a default implemenation... + +) CApaDoor* NewLC(CApaDocument& aDoc,...) no longer takes a CApaProcess as a parameter as it can get at this pointer via the aDoc parameter. + +) CApaProcess::WriteRootStreamL() now takes a const CApaApplication& instead of a CApaDocument. This app should be the application used to create the main doc in the file being written. + +) CApaProcess::SaveToDirectFileStoreL() has changed in the same way as WriteRootStreamL() + +) Extra type checking of document added to CApaProcess::ReadRootStreamL(). This method now leaves KErrCorrupt if the file is not of the correct type. + +) TApaPictureFactory now takes a MGraphicsDeviceMap* on construction + +) CApaApplication::OpenIconFileLC() now just OpenIconFileL() because this call was often being trapped and the C caused aggro. + +) Some CApaDoor methods that took a TSize as a parameter now take a const TSize& instead + +Bug Fixes: + +) The correct UID for the icon file is now used in CApaApplication::OpenIconFileLC() + +) CApaApplication::Dll() now const + +) Resizing of embedded icons should now work properly. + +) CApaProcess::ReadRootStreamLC() now opens the store in read only mode (so files can be read from ROM). If you wish to make your CFileStore writable call CFileStore::File().ChangeMode(EFileShareExclusive|EFileWrite) to get exclusive write access. (Spotted by Duncan) + +Test Code: + +) T_Pro extended to test the embedding subsystem when some required app dlls and/or icn files are not present. + + + +AppArc.020 +========== + +3/11/96 by DavidW + +Uses: E32Tools[045] ; E32[072] ; F32[038] ; Store[028] ; GDI[036] ; Fntstore[030] ; Fbserv[036] ; Bitgdi[039] + +1) Fixed an infinite loop bug in CApaProcess::FindAppInListL() which +meant that a second app couldn't be added to a process + + +AppArc.019 +========== + +31/10/96 by DavidW + +Uses: E32Tools[045] ; E32[072] ; F32[038] ; Store[028] ; GDI[036] ; Fntstore[030] ; Fbserv[036] ; Bitgdi[039] + +1) Upgraded to E32[072] et al. Rebuilt the Wins Release and Debug +variants, and the Gcc Release variant. Test code not rebuilt! +Relying on Eikon's test code for now + +2) As suggested by Julian, provided CApaProcess with a public +accessor function FsSession() which returns a reference to the RFs +held inside CApaProcess property + +3) Fixed MNT GETSRC not to impose a version number if none has been +given from the command line + +4) Fixed MNT GETBLD to only run the MAKEWORK and GETTOOLS once, +instead of twice + + +AppArc.018 +========== + +29/10/96 by DavidW + +Uses: E32Tools[045] ; E32[071] ; F32[037] ; Store[027] ; GDI[035] ; Fntstore[029] ; Fbserv[035] ; Bitgdi[038] + +1) Moved up to Store[027], and therefore dropped Apparc's copy of +the CStreamDictionary class + +2) Also moved up to F32[037] + +3) CApaProcess::NewMainDocumentL() now supports being called with a +zero-length filename, in which case the function no longer attempts +to create a file of this name, but returns NULL for the CFileStore* +handle; this supports applications that don't create files + +4) Made the MainDocFileName() function of CApaProcess simply return +a const TDesC*, instead of going to the overhead of calling the Des() +function on the internal HBuf variable; this is also important for +applications that don't create files (since otherwise the function +involved creating a TPtr from the NULL pointer) + +5) The above changes mean that the iMainDoc and iMainDocFileName +data members of CApaProcess can revert to being private (previously I +had patched the INCC release component of AppArc 017 to make them +public, else Eikon couldn't work) + +6) Fixed a series of latent fatalities by altering code like + delete iMainDocFileName; + iMainDocFileName = xxx.AllocL(); +to insert the line + iMainDocFileName = NULL; +in between the delete and the AllocL() + +7) Fixed a bug pointed out by MartinD and Jezar in that the +ReadRootStreamLC() function was always opening the file in read mode +only, which is fine for Direct stores but not for Permanent +("re-writable") ones; note that some decision will need to be taken +shortly on how to cope with read-only data files + +8) As suggested by MartinB & Duncan, changed the Changed() function +in CApaDocument to be virtual and const, and renamed it to +HasChanged(); the default implementation remains to return the value +of the iChanged member data, but some applications may prefer to +implement change tracking in a more sophisticated manner + +9) As suggested by MartinB, altered the StoreL() function of +CApaDocument to be const, since Store is a const operation. At the +same time, applied const to various other CApaDocument functions + +10) Added UNLOCK and LOCK verbs to MNT.CMD. + + +AppArc.017 +========== + +18/10/96 by IanH + +Uses: E32Tools[045] ; E32[071] ; F32[036] ; Store[026] ; GDI[035] ; Fntstore[029] ; Fbserv[035] ; Bitgdi[038] + +ARM release size: + +apparc.dll 18,108 + +General +======= + +) Not binary compatible with previous release + + +Changes +======= + +Changes to CApaProcess: + +) At the request of MartinB all member data is now private and accessor functions have been supplied as required. + +) DestroyDocumentL() no longer takes the CApaDocument* by reference (and consequently no longer sets it to null). + +Changes to CApaDocument: + +) At the request of MartinB iChanged is now protected and has an inline accessor function Changed() + +General changes: + +) Fixed mnt getrel so it no longer does mad stuff (thanks Julian) + +) Extended the embedding testcode slightly + + +Still To Come +============= + +) .ini files (with visited document lists) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/group/app-framework_apparc.history.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/group/app-framework_apparc.history.xml Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,107 @@ + + + + + RApaLsSession::CancelRecognizeFiles() complete the TRequestStatus that was passed to RApaLsSession::RecognizeFilesL(). + + + + If drive name is present in the filename then it scans through the \\sys\\bin of that particular drive, + otherwise it scans through the \\sys\\bin folders in all the avaliable drives. + + + + Changed documetnation in How To Port Guide: Control Panel Plugins.doc correctly. +Changed out of date documentation in apgctl.h and apgctl.cpp +Removed incorrect check in CApaSystemControl::ConstructL() + + + + Behavior of CApaAppServiceBase::SecurityCheckL() is made to pass security checks always as this is the default behavior + + + + Modified documentation of RApaLsSession::GetSupportedDataTypesL() and RApaLsSession::DeleteDataMapping() appropriately. + + + + Added CApfMimeContentPolicy API to apfile.dll. It is used for checking MIME types and +file extensions against closed content list. + + + Framework environment for applications and application data, defines key application responsibilities and interactions with data and UI. + + + Child Process is terminated if SetOpaqueDataL() and SetProcessEnvironmentL() function leaves. + + + PDEF106542:t_IntegritySupportReboot2 test fails for WINSCW builds + + + The mismatch between UID used in ParentProcess_reg.rss and ParentProcess_Main.cpp, and UID used in the MMP file has been corrected. + Minor change in apparc CApaParentProcessMonitor::RunL + + + Appropriate changes are made while setting short caption with ELangNone. While updating short caption precedence is given to other application languages over ELangNone if it is present. + + + Update CApaApplication::GenerateFileName to return KErrNoMemory if RBuf::Create() fails. + + + Update KApplicationLocation constant in apparc.cpp to point to the data-caged location ('\\sys\\bin\\'). + + + Update test code so the heap check is not performed in the server side for this t_ServiceRegistry test case. + + + Part of fix to problem with memory leaks and crashes in app startup, found using the WillHeapChecker tool. See also Cone and Uikon changes. + + + Added test code to test : + + TInt RApaLsSession::GetAppIcon(TUid aAppUid, RFile& aFile) const API + + for native and non-native apps for SVG and MBM icons. + + + Added a new API - + EXPORT_C TInt RApaLsSession::GetAppIcon(TUid aAppUid, RFile& aFile) const + + It gets an open read only file handle to the application icon file for the application with the specified UID. + + Non-native application icons stored in the private data cage of AppArc, can now be accessed using this API. + + + The type store gets updated whenever any of these function (InsertDataMapping() & DeleteDataMapping()) call is made. Due to the timing issue, the method ’WaitForTypeStoreUpdate()’ has been moved inside the test cases TestServiceDiscovery9() & TestPrioritySystemL() soon after the call to ’DeleteDataMapping()’. The type store updation takes on the server side while the test case is still running which causes the heap check to fail.To avoid the heap check on the server side DONT_CHECK macro is used. + + + Condition has been added to check the presence of removable media drive(s), before issuing a request for removable media scan during phone boot. + + + Delay in Apparc test script is increased to ensure that apparc is fully initialised and to avoid intermittent test failure on ONB. + + + Correct the path for FileWithUnknownMimeType.UnrecognisableExtention in apparctest.iby to remove the ROM building warning + + + In APSCONSTDATA.CPP comments are updated to make sure that + patchdata_apserv_dll_KApaLoadDataRecognizersOnDemand 1 line is added to epoc.ini. + Code lines are put in place in CApaAppListServer::CApaAppListServer(TInt aPriority) ,present in APSSERV.CPP so that if WINS then it read the value from epoc.ini. UserSvr::HalFunction( ... ) is used to check epoc.ini for a specific emulator property. + + + Changes have been made in Apparc test code. Due to paging under Functional configuration of DP, the time required for Apparc update is added as part of solution. That is, a user delay of 5sec is introduced sufficient enough for Apparc to close the test app. + + + Platsec errors introduced by previous defect submissions in T_Nonnativeapps are corrected by wrapping tests within APPFWK_EXPECTED_PLATSEC_START and + APPFWK_EXPECTED_PLATSEC_FINISH Macros. Other Platsec errors are resolved by making changes in Test code of T_Rulebasedlaunching and TShutter. + + + Added new test cases to test the changes made in apparc component to enable dynamic language switching. + Test cases have been added in existing T_Locale test step. + + + Changes have been made in apparc component to reload the locale information (caption, short caption and icon file name) for all installed applications and their views on language change event. + + To enable dynamic language switching in apparc, apparc now monitors language change event using RChangeNotifier. On language change event, apparc issues a rescan on app-list which updates localisable information for all applications and their views in the app-list. + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/group/app-framework_apparc.mrp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/group/app-framework_apparc.mrp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,14 @@ +component app-framework_apparc +source \sf\mw\appsupport\appfw\apparchitecture +binary \sf\mw\appsupport\appfw\apparchitecture\group all +exports \sf\mw\appsupport\appfw\apparchitecture\group +notes_source \component_defs\release.src + + +# == IPR section auto-inserted from distribution.policy files == +ipr D +ipr T \sf\mw\appsupport\appfw\apparchitecture\tdata +ipr T \sf\mw\appsupport\appfw\apparchitecture\tdatasrc +ipr T \sf\mw\appsupport\appfw\apparchitecture\tef + +# == end auto-inserted section == diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/AIFTOOL.RH --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/AIFTOOL.RH Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,243 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// contains definitions for the resource files that are input to AIF files +// +// + + +// constants for capability.hidden +#define KAppNotHidden 0 +#define KAppIsHidden 1 + +// constants for capability.newfile +#define KAppDoesNotSupportNewFile 0 +#define KAppSupportsNewFile 1 + +// constants for capability.embeddability +#define KAppNotEmbeddable 0 +#define KAppEmbeddable 1 +#define KAppEmbeddableOnly 2 +#define KAppEmbeddableUiOrStandAlone 5 +#define KAppEmbeddableUiNotStandAlone 6 + +// constants for capability.launch +#define KAppLaunchInForeground 0 +#define KAppLaunchInBackground 1 + +// application group name +#define KAppMaxGroupName 16 + + + +/////////////////////////// +// HEADER INFO +/////////////////////////// + +STRUCT AIF_DATA + { + LONG app_uid; + // + WORD num_icons=0; // each icon should be a bitmap/mask pair + // + LEN WORD STRUCT caption_list[]; // CAPTION + // + BYTE hidden=KAppNotHidden; + BYTE embeddability=KAppNotEmbeddable; + BYTE newfile=KAppDoesNotSupportNewFile; + BYTE launch=KAppLaunchInForeground; + LTEXT groupName(KAppMaxGroupName)=""; + // + LEN WORD STRUCT datatype_list[]; // DATATYPE + // + LEN WORD STRUCT view_list[]; // VIEW_DATA + // + LEN WORD STRUCT file_ownership_list[]; // FILE_OWNERSHIP_INFO + } + + +/////////////////////////// +// CAPTIONS +/////////////////////////// + +#define KMaxCaption 256 + +enum + { + ELangTest, // 00 + ELangEnglish, // 01 + ELangFrench, // 02 + ELangGerman, // 03 + ELangSpanish, // 04 + ELangItalian, // 05 + ELangSwedish, // 06 + ELangDanish, // 07 + ELangNorwegian, // 08 + ELangFinnish, // 09 + ELangAmerican, // 10 + ELangSwissFrench, // 11 + ELangSwissGerman, // 12 + ELangPortuguese, // 13 + ELangTurkish, // 14 + ELangIcelandic, // 15 + ELangRussian, // 16 + ELangHungarian, // 17 + ELangDutch, // 18 + ELangBelgianFlemish, // 19 + ELangAustralian, // 20 + ELangBelgianFrench, // 21 + ELangAustrian, // 22 + ELangNewZealand, // 23 + ELangInternationalFrench, // 24 + ELangCzech, // 25 + ELangSlovak, // 26 + ELangPolish, // 27 + ELangSlovenian, // 28 + ELangTaiwanChinese, // 29 + ELangHongKongChinese, // 30 + ELangPrcChinese, // 31 + ELangJapanese, // 32 + ELangThai, // 33 + ELangAfrikaans, // 34 + ELangAlbanian, // 35 + ELangAmharic, // 36 + ELangArabic, // 37 + ELangArmenian, // 38 + ELangAzerbaijani, // 39 + ELangBelarussian, // 40 + ELangBengali, // 41 + ELangBulgarian, // 42 + ELangBurmese, // 43 + ELangCatalan, // 44 + ELangCroatian, // 45 + ELangCanadianEnglish, // 46 + ELangInternationalEnglish, // 47 + ELangSouthAfricanEnglish, // 48 + ELangEstonian, // 49 + ELangFarsi, // 50 + ELangCanadianFrench, // 51 + ELangScotsGaelic, // 52 + ELangGeorgian, // 53 + ELangGreek, // 54 + ELangCyprusGreek, // 55 + ELangGujarati, // 56 + ELangHebrew, // 57 + ELangHindi, // 58 + ELangIndonesian, // 59 + ELangIrish, // 60 + ELangSwissItalian, // 61 + ELangKannada, // 62 + ELangKazakh, // 63 + ELangKhmer, // 64 + ELangKorean, // 65 + ELangLao, // 66 + ELangLatvian, // 67 + ELangLithuanian, // 68 + ELangMacedonian, // 69 + ELangMalay, // 70 + ELangMalayalam, // 71 + ELangMarathi, // 72 + ELangMoldavian, // 73 + ELangMongolian, // 74 + ELangNorwegianNynorsk, // 75 + ELangBrazilianPortuguese, // 76 + ELangPunjabi, // 77 + ELangRomanian, // 78 + ELangSerbian, // 79 + ELangSinhalese, // 80 + ELangSomali, // 81 + ELangInternationalSpanish, // 82 + ELangLatinAmericanSpanish, // 83 + ELangSwahili, // 84 + ELangFinlandSwedish, // 85 + ELangTajik, // 86 + ELangTamil, // 87 + ELangTelugu, // 88 + ELangTibetan, // 89 + ELangTigrinya, // 90 + ELangCyprusTurkish, // 91 + ELangTurkmen, // 92 + ELangUkrainian, // 93 + ELangUrdu, // 94 + ELangUzbek, // 95 + ELangVietnamese, // 96 + ELangWelsh, // 97 + ELangZulu, // 98 + ELangOther // 99 + }; + + +STRUCT CAPTION + { + WORD code; + LTEXT caption(KMaxCaption); + } + +/////////////////////////// +// DATATYPE +/////////////////////////// + +#define KMaxDataTypeLength 256 + +enum + { + EDataTypePriorityHigh=10000, + EDataTypePriorityNormal=0, + EDataTypePriorityLow=-10000, + EDataTypePriorityLastResort=-20000 + }; + +STRUCT DATATYPE + { + WORD priority; + LTEXT8 type(KMaxDataTypeLength); + } + +/////////////////////////// +// VIEW_DATA +/////////////////////////// + +STRUCT VIEW_DATA + { + LONG view_uid; + // + LONG screen_mode=0; + // + WORD num_icons=0; // each icon should be a bitmap/mask pair + // + LEN WORD STRUCT caption_list[]; // CAPTION + } + +/////////////////////////// +// FILE_OWNERSHIP_INFO +/////////////////////////// + +#define KMaxFileNameLength 256 + +STRUCT FILE_OWNERSHIP_INFO + { + LTEXT file_name(KMaxFileNameLength); + } + +/////////////////////////// +// MEMORY +/////////////////////////// + +// not yet implemented + +STRUCT MEMORY + { + LONG minheap; + LONG maxheap; + LONG stack; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APACLN.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APACLN.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,69 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__APACLN_H__) +#define __APACLN_H__ + +#if !defined(__APPARC_H__) +#include +#endif + + +class TApaDocCleanupItem +/** Allows CApaDocument-derived objects to be safely put onto the cleanup +stack, by calling CApaProcess::DestroyDocument() should a leave or a call +to CleanupStack::PopAndDestroy() occur. + +It is used as follows. +@code +TApaDocCleanupItem cleanup(iEikonEnv->Process(),doc); +CleanupStack::PushL(cleanup); +// some potentially leaving code here ... +CleanupStack::Pop(cleanup); +@endcode +@publishedPartner +@deprecated +*/ + { +public: + inline TApaDocCleanupItem(CApaProcess* aProcess,CApaDocument* aDoc); + inline operator TCleanupItem(); +private: + IMPORT_C static void DoCleanup(TAny* aPtr); +public: + /** The process object that will be used to destroy the document. */ + CApaProcess* iApaProcess; + /** The document to destroy as part of cleanup. */ + CApaDocument* iApaDoc; + }; + + +inline TApaDocCleanupItem::TApaDocCleanupItem(CApaProcess* aProcess,CApaDocument* aDoc) + : iApaProcess(aProcess), iApaDoc(aDoc) +/** Constructs a cleanup item object for the specified document. + +@param aProcess A pointer to the process object that will be used to destroy the document. +@param aDoc The document to destroy as part of cleanup. */ + {} + +inline TApaDocCleanupItem::operator TCleanupItem() +/** A TCleanupItem cast operator that enables the TApaDocCleanupItem object to be pushed to +the cleanup stack as a TCleanupItem, so that the document will be properly destroyed +(by a call to CApaProcess::DestroyDocument()) should a leave or a call to +CleanupStack::PopAndDestroy() occur. */ + {return TCleanupItem(DoCleanup,this);} + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APACMDLN.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APACMDLN.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,178 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APACMDLN_H__) +#define __APACMDLN_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__APADEF_H__) +#include +#endif + +#if !defined(__F32FILE_H__) +#include +#endif + +#if !defined(__S32STRM_H__) +#include +#endif + + +class CApaCommandLine : public CBase +/** Information for launching an application. + +This is often referred to as a command line and contains: + +the name of an application EXE to be launched, + +a document name, + +a command code that defines the way the application is launched + +trailing data; the structure of this depends on the application to be launched. + +The information is held in a buffer implemented by a heap descriptor. + +@publishedAll +@released */ + { +public: + // construction/destruction + IMPORT_C static CApaCommandLine* NewL(); + IMPORT_C static CApaCommandLine* NewLC(); + IMPORT_C ~CApaCommandLine(); + + // Getting/setting the CApaCommandLine to/from process environment-slots + IMPORT_C void SetProcessEnvironmentL(RProcess& aProcess) const; + IMPORT_C static TInt GetCommandLineFromProcessEnvironment(CApaCommandLine*& aCommandLine); + + // Getting/setting the CApaCommandLine to/from a server IPC-message + IMPORT_C void GetIpcArgsLC(TIpcArgs& aIpcArgs) const; + IMPORT_C void ConstructCmdLineFromMessageL(const RMessage2& aMessage); + + // operations on the document name + IMPORT_C void SetDocumentNameL(const TDesC& aDocName); + IMPORT_C TPtrC DocumentName() const; + + // operations on the executable name + IMPORT_C void SetExecutableNameL(const TDesC& aAppName); + IMPORT_C TPtrC ExecutableName() const; + + IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData); + IMPORT_C TPtrC8 OpaqueData() const; + + // operations on the tail end + IMPORT_C void SetTailEndL(const TDesC8& aTailEnd); + IMPORT_C TPtrC8 TailEnd() const; + + // operations on the command + IMPORT_C void SetCommandL(TApaCommand aCommand); + IMPORT_C TApaCommand Command() const; + + // operations on the parent process id + IMPORT_C void SetParentProcessId(TProcessId aProcessId); + IMPORT_C TProcessId ParentProcessId() const; + + // operations on the file passed by handle + IMPORT_C void SetFileByHandleL(const RFile& aFile); + IMPORT_C void GetFileByHandleL(RFile& aFile) const; +public: + + // operations on the server requirement/differentiator number - 0 means no server, non-zero sets the differentiator for the server name + IMPORT_C void SetServerNotRequiredL(); + IMPORT_C void SetServerRequiredL(TUint aServerDifferentiator); + IMPORT_C TUint ServerRequired() const; + + // operations to support starting an application with a specific screen number + IMPORT_C void SetDefaultScreenL(TInt aDefaultScreenNumber); + IMPORT_C TInt DefaultScreen() const; + IMPORT_C TBool IsDefaultScreenSet() const; + + // Operations to support window chaining + IMPORT_C void SetParentWindowGroupID(TInt aParentWindowGroupID); + IMPORT_C TInt ParentWindowGroupID() const; + + // operations to support passing memory-allocation failure settings in to applications + IMPORT_C void SetDebugMemFailL(TInt aDebugMemFail); + IMPORT_C TInt DebugMemFail() const; + + // operations to support the instrumentation (i.e. profiling) of application startup + IMPORT_C void SetAppStartupInstrumentationEventIdBaseL(TInt aEventIdBase); + IMPORT_C TInt AppStartupInstrumentationEventIdBase() const; + + IMPORT_C static TInt EnvironmentSlotForPublicUse(TInt aIndex); + +private: + struct SOption + { + const TDesC* iToken; + TInt* iResult; + TRadix iRadix; + HBufC8* iHBufC8Result; + }; + +private: + CApaCommandLine(); + void SetServerDifferentiatorL(TUint aServerDifferentiator); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); + HBufC8* StreamableAttributesLC() const; + void GetCommandLineFromProcessEnvironmentL(); + TInt Parse(const TDesC& aCmdLine); + TPtrC StripQuotes(const TDesC& aDes) const; + +private: + enum + { + EEnvironmentSlotUnused=0, + + EEnvironmentSlotMain=1, + EEnvironmentSlotFsSession=2, + EEnvironmentSlotFile=3, + + EFirstEnvironmentSlotForPublicUse=8, + ENumberOfEnvironmentSlotsForPublicUse=4 + }; + + enum + { + EIpcSlotMain=0, + EIpcSlotFsSession=1, + EIpcSlotFile=2 + }; +public: + enum + { + EIpcFirstFreeSlot=3 + }; +private: + HBufC* iDocumentName; + HBufC* iExecutableName; + HBufC8* iOpaqueData; + HBufC8* iTailEnd; + TApaCommand iCommand; + TUint iServerDifferentiator; + TInt iDefaultScreenNumber; + TInt iParentWindowGroupID; + TInt iDebugMemFail; + TInt iAppStartupInstrumentationEventIdBase; + RFile iFile; + TProcessId iParentProcessId; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APADBASE.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APADBASE.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,127 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APADBASE_H__ +#define __APADBASE_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__S32STD_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif + + +class CApaDoorBase : public CPicture +// Base class for a wrapper for embedded CApaDocuments +/** The base class for the graphic representation of an embedded document. + +An embedded document can be represented either as an icon or as a glass picture. +Such a graphic representation is known as a door. + +The class is intended for derivation. + +@publishedAll +@released +@see CApaDoor +@see CApaModelDoor */ + { +public: + + /** Defines the possible formats for the graphical representation of the embedded + document. */ + enum TFormat { + /** The representation is an icon. */ + EIconic, + /** The representation is a glass door. */ + EGlassDoor, + /** The representation is a glass door but has been temporarily switched to an icon. */ + ETemporarilyIconic + }; +public: + inline TFormat Format()const; + inline TUid Source()const; + inline void SetSource(TUid aSource); + // Virtuals from CPicture + IMPORT_C virtual TStreamId StoreL(CStreamStore& aStore) const; + IMPORT_C virtual void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + IMPORT_C virtual void SetCropInTwips(const TMargins& aMargins); + IMPORT_C virtual TPictureCapability Capability() const; + IMPORT_C virtual void GetCropInTwips(TMargins& aMargins) const; + IMPORT_C virtual TInt ScaleFactorWidth() const; + IMPORT_C virtual TInt ScaleFactorHeight() const; + IMPORT_C virtual TBool LineBreakPossible(TUint aClass,TBool aBeforePicture,TBool aHaveSpaces) const; + IMPORT_C virtual TBool NativePixelSize(TSize& aPixelSize); +protected: + IMPORT_C CApaDoorBase(); + IMPORT_C void ExternalizeBaseStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const; + IMPORT_C TSize InternalizeBaseStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict); // returns current size in twips + +private: + IMPORT_C virtual void CApaDoorBase_Reserved1(); + IMPORT_C virtual void CApaDoorBase_Reserved2(); +protected: + + /** Returns the size of the glass door, in twips. + + A concrete implementation of this function is provided by derived classes. + + @return The size of the glass door, in twips. + + @publishedAll + @released */ + virtual TSize GlassDoorSize()const=0; +protected: + TFormat iFormat; + TUid iSource; // foreign representation of a translated door (eg MS Word doc) + +private: + TInt iCApaDoorBase_Reserved1; + }; + +// +// inlines +// + +inline CApaDoorBase::TFormat CApaDoorBase::Format()const + /** Gets the current format of the representation of the embedded document. + + @return The format for the representation of the embedded document. */ + { return iFormat; } + +inline TUid CApaDoorBase::Source()const + /** Gets the UID that identifies this door when the source originates on a non-Symbian + OS device. + + This is used by converters. + + @return The UID for the non-Symbian OS source. For a source that originates + on a Symbian OS phone, this is KNullUid. */ + { return iSource; } + +inline void CApaDoorBase::SetSource(TUid aSource) + /** Sets the UID that identifies this door when the source originates on a non-Symbian + OS device. + + This is used by converters. + + @param aSource The UID for the non-Symbian OS source. For a source that originates + on a Symbian OS phone, this is KNullUid. */ + { iSource=aSource; } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APADEF.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APADEF.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,291 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APADEF_H__ +#define __APADEF_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +// comand line tokens + +/** +@internalComponent +*/ +const TUint KApaCommandLetterOpen='O'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterCreate='C'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterRun='R'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterBackground='B'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterViewActivate='V'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterRunWithoutViews='W'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterBackgroundAndWithoutViews='A'; + +/** Defines the command codes used to indicate the way an application is to be +launched. + +@publishedAll +@released +@see CApaCommandLine */ +enum TApaCommand + { + /** The application is to open the document specified on the command line. */ + EApaCommandOpen, + /** The application is to create the document specified on the command line. */ + EApaCommandCreate, + /** The application is to run and open the last used document. */ + EApaCommandRun, + /** The application is to open the last used document and to run in the background. */ + EApaCommandBackground, + /** Reserved for future use. */ + EApaCommandViewActivate, + /** The application is to run without views. + + This should NOT be used for view based applications. */ + EApaCommandRunWithoutViews, + /** The application is to run in the background and viewless mode */ + EApaCommandBackgroundAndWithoutViews + }; + +/** +@publishedAll +@released +*/ +const TInt KApaMaxAppCaption=0x100; // Default name is a file name, so the same limit is used + +// TApaAppCaption is the current language name of the app (for task lists, dialogs etc) + +/** Defines a modifiable buffer descriptor to contain the caption or the short caption +for an application. + +@publishedAll +@released */ +typedef TBuf TApaAppCaption; + +/** +@internalComponent +*/ +const TInt KApaMaxCommandLine=0x100; + +/** +@internalComponent +*/ +typedef TBuf TApaCommandLine; + +/** +@internalComponent +*/ +const TInt KApaMaxAppFileName=0x10; // Length of App's filename without path or extension (not it's caption) + +/** +@internalComponent +*/ +typedef TBuf TApaAppFileName; + +/** Maximum length of an application group name. + +@publishedAll +@released +@see TApaAppGroupName */ +const TInt KApaMaxAppGroupName=0x10; // Length of App's logical groupname + +/** An application group name. + +This is a name that allows applications to be categorized, for instance "Games" +or "Utilities". + +@publishedAll +@released */ +typedef TBuf TApaAppGroupName; + +/** The hexadecimal value of the 2nd UID that identifies a DLL as being an ASCII UI +application. In .mmp files, the hexadecimal number is explicitly inserted +as the first value following the UID keyword. + +@publishedAll +@deprecated */ +const TInt KAppUidValue8 = 0x1000006c; + +/** The 2nd UID that identifies a DLL as being an ASCII UI application. + +@publishedAll +@deprecated */ +const TUid KUidApp8={KAppUidValue8}; + +/** The hexadecimal value of the 2nd UID that defines a DLL as being a Unicode +UI application. In .mmp files, the hexadecimal number is explicitly inserted +as the first value following the UID keyword. + +@publishedAll +@released +@see KAppUidValue */ +const TInt KAppUidValue16 = 0x100039CE; + +/** The 2nd UID that defines a DLL as being a Unicode UI application. + +@publishedAll +@released +@see KUidApp */ +const TUid KUidApp16={KAppUidValue16}; + +// +// 2nd Uid for app doc files +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppDllDoc8={268435565}; + +/** +@publishedAll +@released +*/ +const TUid KUidAppDllDoc16={0x10003A12}; + +/** The UID encoded in a TPictureHeader that identifies a picture as a door (for +ASCII builds). + +@publishedAll +@deprecated +*/ +const TUid KUidPictureTypeDoor8={268435537}; + +/** The UID encoded in a TPictureHeader that identifies a picture as a door (for +Unicode builds). + +@publishedAll +@released +@see KUidPictureTypeDoor */ +const TUid KUidPictureTypeDoor16={0x10003A33}; + +// +// Uid's for streams in stream dictionaries +/** +@publishedAll +@deprecated +*/ +const TUid KUidSecurityStream8={268435661}; + +/** +@publishedAll +@released +*/ +const TUid KUidSecurityStream16={0x10003A40}; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppIdentifierStream8={268435593}; // stream containing a TApaAppIdentifier + +/** +@publishedAll +@released +*/ +const TUid KUidAppIdentifierStream16={0x10003A34}; + +#ifdef _UNICODE +/** The type-independent 2nd UID that identifies a DLL as being a UI application. + +@publishedAll +@released +@see KUidApp16 +@see KUidApp8 */ +#define KUidApp KUidApp16 +/** The type-independent hexadecimal value of the 2nd UID that identifies a DLL as +being a UI application. + +@publishedAll +@released +@see KAppUidValue16 +@see KAppUidValue8 */ +#define KAppUidValue KAppUidValue16 //lint !e1923 supress could become const variable +/** +@publishedAll +@released +*/ +#define KUidAppDllDoc KUidAppDllDoc16 +/** The type independent UID encoded in a TPictureHeader that identifies a picture +as a door. + +@publishedAll +@released +@see KUidPictureTypeDoor16 +@see KUidPictureTypeDoor8 +@see TPictureHeader +@see TApaModelDoorFactory::NewPictureL() */ +#define KUidPictureTypeDoor KUidPictureTypeDoor16 +/** +@publishedAll +@released +*/ +#define KUidAppIdentifierStream KUidAppIdentifierStream16 +/** +@publishedAll +@released +*/ +#define KUidSecurityStream KUidSecurityStream16 +#else +/** The type independent 2nd UID that defines a DLL as being a UI application. + +@see KUidApp16 +@see KUidApp8 */ +#define KUidApp KUidApp8 +/** The type independent hexadecimal value of the 2nd UID that defines a DLL as +being a UI application. + +@see KAppUidValue16 +@see KAppUidValue8 */ +#define KAppUidValue KAppUidValue8 +#define KUidAppDllDoc KUidAppDllDoc8 +/** The type independent UID encoded in a TPictureHeader that identifies a picture +as a door. + +@see KUidPictureTypeDoor16 +@see KUidPictureTypeDoor8 +@see TPictureHeader +@see TApaModelDoorFactory::NewPictureL() */ +#define KUidPictureTypeDoor KUidPictureTypeDoor8 +#define KUidAppIdentifierStream KUidAppIdentifierStream8 +#define KUidSecurityStream KUidSecurityStream8 +#endif + +const TUid KUidFileEmbeddedApplicationInterfaceUid={0x101f8c96}; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APAFLREC.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APAFLREC.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,208 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APAFLREC_H__) +#define __APAFLREC_H__ + +#if !defined(__APADEF_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif + +// classes defined: +class MApaAppStarter; +class CApaAppLocator; +class CApaFileRecognizer; +class CApaFileRecognizerType; +class CFileRecognizerExtension; +// +// classes referenced: +class TApaAppEntry; +class CApaCommandLine; +class RFs; +// + +// KUidFileRecognizer is UID[1] for app recognizer dll's (UID[2] identifies a particular identifier) +/** +@publishedAll +@released +*/ +#ifdef _UNICODE +#define KUidFileRecognizer KUidFileRecognizer16 +#else +#define KUidFileRecognizer KUidFileRecognizer8 +#endif + +/** +@publishedAll +@deprecated +*/ +const TInt KFileRecognizerUidValue8=0x1000013E; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidFileRecognizer8={KFileRecognizerUidValue8}; + +/** +@publishedAll +@released +*/ +const TUid KUidFileRecognizer16={0x10003A37}; +// + + +class CApaAppLocator : public CBase +/** +@internalComponent +*/ + { +public: + virtual TInt GetAppEntryByUid(TApaAppEntry& aAppEntry,TUid aAppUid)=0; + virtual TInt GetAppCapabilityByUid(TDes8& aCapabilityBuf,TUid aAppUid)=0; + }; + + + +class CApaFileRecognizer : public CBase +/** +@internalComponent +@deprecated +*/ + { +public: + // + IMPORT_C CApaFileRecognizerType* RecognizeFileL(const TDesC& aFullFileName,const TUidType* aUidType=NULL); + IMPORT_C CApaAppLocator* AppLocator() const; + // + IMPORT_C ~CApaFileRecognizer(); +protected: + IMPORT_C CApaFileRecognizer(RFs& aFs); + IMPORT_C void AddFileRecognizerType(CApaFileRecognizerType* aFileRecognizerType); + IMPORT_C TInt RemoveFileRecognizerType(const CApaFileRecognizerType* aFileRecognizerType); + IMPORT_C void SetAppLocator(CApaAppLocator* aAppLocator); // should be called by child-classes eg during construction + static inline void SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter); + IMPORT_C void DestroyRecognizerList(); +protected: + RFs& iFs; + CApaAppLocator* iAppLocator; +private: + CApaFileRecognizerType *iFileRecognizerList; + }; + + + +class MApaAppStarter +/** An interface used by the Application Architecture server to start applications. + +CEikonEnv is derived from this class. + +@publishedPartner +@released +@see CEikonEnv */ + { +public: + virtual TThreadId StartAppL(const CApaCommandLine& aCommandLine)=0; +protected: + IMPORT_C MApaAppStarter(); +private: + IMPORT_C virtual void MApaAppStarter_Reserved1(); + IMPORT_C virtual void MApaAppStarter_Reserved2(); +private: + TInt iMApaAppStarter_Reserved1; + }; + + + +class CApaFileRecognizerType : public CBase +/** +@publishedPartner +@deprecated +*/ + { +public: + enum TRecognizedType {EProgram,EDoc,EOtherFile,ENotRecognized}; +public: + virtual TThreadId RunL(TApaCommand aCommand,const TDesC* aDocFileName,const TDesC8* aTailEnd) const=0; + inline TThreadId RunL(TApaCommand aCommand, const TDesC* aDocFileName) const; + inline TThreadId RunL(TApaCommand aCommand) const; + inline TUid AppUid()const; + inline TUid TypeUid()const; + inline TRecognizedType Type()const; + IMPORT_C void Capability(TDes8& aCapabilityBuf)const; + IMPORT_C void Lock(); + IMPORT_C void Unlock(); +protected: + IMPORT_C CApaFileRecognizerType(); + IMPORT_C ~CApaFileRecognizerType(); + IMPORT_C TThreadId AppRunL(const CApaCommandLine& aCommandLine) const; +private: + inline void SetAppStarter(MApaAppStarter* aAppStarter); // must be called before AppRunL() + virtual TRecognizedType DoRecognizeFileL(RFs& aFs,TUidType aUidType)=0; + TRecognizedType RecognizeFileL(RFs& aFs,const TDesC& aFullFileName,TUidType aUidType); + TBool Locked()const; + IMPORT_C virtual void Reserved_1(); +public: + IMPORT_C static CApaFileRecognizerType* CreateFileRecognizerL(TUid aImplUid); +protected: + CApaFileRecognizer* iFileRecognizer; + MApaAppStarter* iAppStarter; + HBufC* iFullFileName; + TUid iFileType; // type UID of the recognizer file (ie UID[1]) + TUid iAppUid; // UID of the associated app (ie UID[2]) + TRecognizedType iRecognizedType; + TApaAppCapabilityBuf* iCapabilityBuf; +private: + CApaFileRecognizerType* iNext; + TInt iLock; + CFileRecognizerExtension* iFileRecognizerExtn; +private: + friend class CApaFileRecognizer; + }; + + +// +// inlines +// + +inline void CApaFileRecognizer::SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter) + { aRecognizer->SetAppStarter(aAppStarter); } + +inline void CApaFileRecognizerType::SetAppStarter(MApaAppStarter* aAppStarter) + { iAppStarter = aAppStarter; } + +inline TUid CApaFileRecognizerType::AppUid() const + { return iAppUid; } + +inline TUid CApaFileRecognizerType::TypeUid() const + { return iFileType; } + +inline CApaFileRecognizerType::TRecognizedType CApaFileRecognizerType::Type()const + { return iRecognizedType; } + +inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand, const TDesC* aDocFileName) const + /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as third parameter. + @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */ + { return RunL(aCommand, aDocFileName, NULL); } + +inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand) const + /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as second and third parameter. + @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */ + { return RunL(aCommand, NULL, NULL); } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APAID.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APAID.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,358 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APAID_H__ +#define __APAID_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APADEF_H__) +#include +#endif + +#include "apmstd.h" + + +// classes defined: +class TApaAppIdentifier; +class TApaAppEntry; +class CApaAppFinder; +// +// classes referenced: +class RReadStream; +class RWriteStream; +class RFs; +// + + +class TApaAppIdentifier +/** The identity of an application. + +An object of this type contains two pieces of information: + +The application specific UID + +The file name and extension of the application DLL + +All persisted documents associated with this application have a stream containing +this information. + +@publishedAll +@released +@see CApaProcess::ReadRootStreamLC() +@see CApaProcess::WriteRootStreamL() +@see CApaProcess::ReadAppIdentifierL() +@see CApaProcess::WriteAppIdentifierL() */ + { +public: + IMPORT_C TApaAppIdentifier(); + IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); + +public: + /** The application-specific UID. */ + TUid iAppUid; + /** The full path name of the application DLL. */ + TFileName iFullName; + +private: + TInt iTApaAppIdentifier_Reserved1; + }; + + +class TApaAppEntry +/** An application entry. + +An object of this type contains two pieces of information: + +the full path name of the application DLL + +the UID type (or compound identifier) of the application DLL. + +@publishedAll +@released */ + { +public: + IMPORT_C TApaAppEntry(); + IMPORT_C TApaAppEntry(const TUidType& aAppUidType,const TFileName& aDllName); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); +public: + /** The UID type (or compound identifier) of the application DLL. */ + TUidType iUidType; + /** The full path name of the application DLL. */ + TFileName iFullName; +private: + TInt iTApaAppEntry_Reserved1; + }; + + +class TApaAppInfo +/** Application information. + +An object of this type contains four pieces of information: + +the application specific UID + +the full path name of the application DLL + +the application's caption + +a short caption; how this is used is up to the UI + +@publishedAll +@released */ + { +public: + IMPORT_C TApaAppInfo(); + IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption); + IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); +public: + /** The application specific UID. */ + TUid iUid; + /** The full path name of the application DLL. */ + TFileName iFullName; + /** The caption for the application. */ + TApaAppCaption iCaption; + /** The short caption for the application. */ + TApaAppCaption iShortCaption; + +private: + TInt iTApaAppInfo_Reserved1; + }; + + +class TApaAppViewInfo +/** Contains the basic information about an application view. + +An object of this type contains two pieces of information: + +The UID that identifies the view + +The application's caption. + +Objects of this type are returned in an array populated by a call to RApaLsSession::GetAppViews(). + +@publishedAll +@released +@see CApaAppViewArray +@see TUid */ + { +public: + IMPORT_C TApaAppViewInfo(); + IMPORT_C TApaAppViewInfo(TUid aViewUid,const TApaAppCaption& aViewCaption,TInt aScreenMode); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); +public: + /** The UID identifying the view. */ + TUid iUid; + /** The application caption. */ + TApaAppCaption iViewCaption; + TInt iScreenMode; +private: + TInt iTApaAppViewInfo_Reserved1; + }; + + +/** Defines an array of TApaAppViewInfo objects contained within a flat dynamic +buffer. + +An array of this type is populated with TApaAppViewInfo objects in a call +to RApaLsSession::GetAppViews(). + +@publishedAll +@released */ +typedef CArrayFixFlat CApaAppViewArray; + + +class TApaAppCapability +// expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no. +// default value for all data members must be 0 +/** Application capabilities. + +@publishedAll +@released */ + { +public: + IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void Internalize7_0L(RReadStream& aStream); // deprecated + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; +private: + IMPORT_C void Externalize7_0L(RWriteStream& aStream) const; // deprecated + void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName); +public: + // + /** Defines an application's support for embeddability. */ + enum TEmbeddability { + /** An application cannot be embedded. */ + ENotEmbeddable=0, + /** An application can be run embedded or standalone and can read/write embedded document-content. */ + EEmbeddable=1, + /** An application can only be run embedded and can read/write embedded document-content. */ + EEmbeddableOnly=2, + /** An application can be run embedded or standalone and cannot read/write embedded document-content. */ + EEmbeddableUiOrStandAlone=5, + /** An application can only be run embedded and cannot read/write embedded document-content. */ + EEmbeddableUiNotStandAlone=6 }; + /** Defines an application's attributes as a set of bit flags. */ + enum TCapabilityAttribute + { + /** If set, the application was built as a DLL, otherwise it was built as an EXE. */ + EBuiltAsDll = 0x00000001, + /** If set, the application provides control panel functionality. */ + EControlPanelItem = 0x00000002, + /** If set, the application is not a native executable, and hence the "path" and "extension" (as well as the "name") must be provided in the app_file field of the APP_REGISTRATION_INFO resource. */ + ENonNative = 0x00000004 + }; +public: + /** Indicates the extent to which the application can be embedded. */ + TEmbeddability iEmbeddability; + /** Indicates whether the application is document-based and supports being asked + to create a new file. */ + TBool iSupportsNewFile; + /** Indicates whether the existence of the application should be advertised to the + user. If this is set to ETrue, the application does not appear on the Extras + Bar (or equivalent). */ + TBool iAppIsHidden; // not shown in the Shell etc. + /** Allows the application to be launched in the foreground (when set to EFalse) + or in the background (when set to ETrue). */ + TBool iLaunchInBackground; // Series 60 extension to allow apps to be launched in the background + /** Stores the application's logical group name. */ + TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' + /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ + TUint iAttributes; +private: + enum { EVersion=4 }; +private: + TInt iTApaAppCapability_Reserved1; + }; + +/** Packages the TApaAppCapability class. + +@publishedAll +@released */ +typedef TPckgBuf TApaAppCapabilityBuf; + + +/** Filter used to define the subset of applications returned by RApaLsSession::GetNextApp() + +@publishedAll +@released +*/ +class TApaEmbeddabilityFilter + { +public: + IMPORT_C TApaEmbeddabilityFilter(); + IMPORT_C void AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability); + IMPORT_C TBool MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const; +private: + TUint iEmbeddabilityFlags; +private: + TInt iTApaEmbeddabilityFilter_Reserved1; + }; + + +class CApaAppFinder : public CBase +/** +@publishedPartner +@deprecated +*/ + { +public: + virtual void FindAllAppsL()=0; // sets up a scan for all apps + virtual TBool NextL(TApaAppEntry& aEntry)=0; // increments a scan for all apps + virtual TFileName FindAppL(const TDesC& aFileName,TUid aFileUid)=0; // searches for a particular app - should support wildcards in aFileName + // + virtual TFileName DefaultAppInfoFileName()const=0; // should return the full name, path and drive of the default icon file +protected: + IMPORT_C CApaAppFinder(); + +private: + IMPORT_C virtual void CApaAppFinder_Reserved1(); + IMPORT_C virtual void CApaAppFinder_Reserved2(); + }; + +/** +The uid for the Open service. + +@publishedPartner +@released +*/ +const TUid KOpenServiceUid = { 0x10208DCA }; + +/** Application service information. + +Encapsulates a service UID and associated opaque data. + +An instance of this class provides information about +a specific implementation of the service identified by +the encapsulated service UID. + +@publishedPartner +@released +*/ +class TApaAppServiceInfo + { +public: + TApaAppServiceInfo(); + TApaAppServiceInfo(TUid aUid, CArrayFixFlat* aDataTypes, + HBufC8* aOpaqueData); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); + void Release(); + CArrayFixFlat& DataTypes(); + IMPORT_C TUid Uid() const; + IMPORT_C const CArrayFixFlat& DataTypes() const; + IMPORT_C const TDesC8& OpaqueData() const; +private: + TUid iUid; + CArrayFixFlat* iDataTypes; + HBufC8* iOpaqueData; + TInt iTApaAppServiceInfo; + }; + +/** Application service information array. + +Owns an array of TApaAppServiceInfo objects. + +@see TApaAppServiceInfo +@publishedPartner +@released +*/ +class CApaAppServiceInfoArray : public CBase + { +protected: + CApaAppServiceInfoArray(); +public: + /** Provides access to the encapsulated array of + TApaAppServiceInfo objects. + + @return A generic array of TApaAppServiceInfo objects. */ + virtual TArray Array()=0; + +private: + IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1(); + IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2(); + +private: + TInt iCApaAppServiceInfoArray_Reserved1; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APAMDR.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APAMDR.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,202 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APAMDR_H__ +#define __APAMDR_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__APADBASE_H__) +#include +#endif + +// classes defined: +class TApaModelDoorFactory; +class CApaModelDoor; +class CApaModelHeader; +class MApaModelHeaderFactory; +// +// classes referenced: +class RReadStream; +class RWriteStream; +class CStreamStore; +class CStreamDictionary; +class CEmbeddedStore; +class TApaAppIdentifier; +// + + +class TApaModelDoorFactory : public MPictureFactory +// Recognizes KUidPictureTypeDoor and creates CApaModelDoor pictures +/** A factory class for instantiating and restoring an application's door using +the application's model. + +@publishedAll +@released */ + { +public: + IMPORT_C TApaModelDoorFactory(const MApaModelHeaderFactory* aFactory); + // + // from MPictureFactory + IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only +private: + const MApaModelHeaderFactory* iHeaderFactory; + TInt iTApaModelDoorFactory_Reserved1; + }; + + +class CApaModelDoor : public CApaDoorBase +/** A persistent representation of a door that also acts as a wrapper around an +application's model. + +The class allows embedded data to be manipulated without requiring the whole +associated application. + +@publishedAll +@released */ + { +public: + IMPORT_C static CApaModelDoor* NewL(CApaModelHeader* aHeader); + IMPORT_C static CApaModelDoor* NewLC(CApaModelHeader* aHeader); + IMPORT_C static CApaModelDoor* NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory); + // + /** Gets the application model wrapper object. + + @return A pointer to the application model wrapper object. */ + inline CApaModelHeader* ModelHeader() { return iModelHeader; } + + /** Sets the format of the door. + + @param aFormat The format for the graphical representation of the embedded + document. */ + inline void SetFormat(TFormat aFormat) { iFormat = aFormat; } + // + IMPORT_C TStreamId StoreL(CStreamStore& aStore) const; + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory); + // + IMPORT_C ~CApaModelDoor(); + // + // from CPicture + IMPORT_C void DetachFromStoreL(TDetach /*aDegree*/=EDetachFull); //lint !e1735 Virtual function has default parameter - Inherited from CPicture, must be fixed there + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap)const; + IMPORT_C void GetOriginalSizeInTwips(TSize& aSize)const; + IMPORT_C void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + IMPORT_C TInt ScaleFactorWidth()const; + IMPORT_C TInt ScaleFactorHeight()const; + // +private: + CApaModelDoor(); + CApaModelDoor(CApaModelHeader* aHeader); + // + static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aSourceStore,TStreamId aStreamId); + static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream); + void InternalizeModelL(const MApaModelHeaderFactory& aFactory); + // + // from CApaDoorBase + TSize GlassDoorSize()const; +private: + CApaModelHeader* iModelHeader; + CEmbeddedStore* iStore; + TSize iScaleFactor; + CBufSeg* iStoreHost; // the host for the embedded store, if the door has been detached from its originating store + }; + + +class CApaModelHeader : public CBase +// Abstract wrapper for an applications model - used for file format conversion etc +/** An interface class that acts as a wrapper for an application model. + +This is also known as an application model header. + +The class provides the knowledge for internalizing and externalizing an application +model's data. An instance of the class is used by CApaModelDoor. + +A concrete implementation of the class must be supplied by the application +model (not the application UI). An instance of the class is constructed by +a factory object that implements the MApaModelHeaderFactory interface; the +factory object is also supplied by the application model (not the application +UI). + +@publishedAll +@released +@see CApaModelDoor +@see TApaModelDoorFactory +@see MApaModelHeaderFactory */ + { +public: + /** Stores the model and its components in the specified store. + + @param aStore The store in which the model's components are to be stored. + @param aDict The stream dictionary into which stream IDs and associated UIDs + are put. */ + virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aDict) const=0; + /** Gets the identity of the application associated with the application model. + + @return The application identity. */ + virtual TApaAppIdentifier AppId()const=0; + /** Restores the model to the specified degree. + + An implementation of this function should propagate this call to all components + of the model. + + @param aDegree The degree to which restoration is needed. */ + virtual void DetachFromStoreL(CPicture::TDetach aDegree)=0; +protected: + IMPORT_C CApaModelHeader(); +private: + IMPORT_C virtual void Reserved_1(); + IMPORT_C virtual void Reserved_2(); +private: + TInt iCApaModelHeader_Reserved1; + }; + + + +class MApaModelHeaderFactory +/** An interface class that applications implement to construct an application model +wrapper object, also known as the application model header. + +@publishedAll +@released +@see CApaModelHeader */ + { +public: + /** Creates and returns an application model wrapper object. + + @param aStore The store containing model data. + @param aDict The stream dictionary. + @param aAppId The application's identity held as a stream in the application's + store + @return A pointer to the new application model wrapper object. */ + virtual CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,const TApaAppIdentifier& aAppId)const=0; +protected: + IMPORT_C MApaModelHeaderFactory(); +private: + IMPORT_C virtual void MApaModelHeaderFactory_Reserved1(); + IMPORT_C virtual void MApaModelHeaderFactory_Reserved2(); +private: + TInt iMApaModelHeaderFactory_Reserved1; + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APASVST.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APASVST.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,38 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Starting of AppArc server +// +// + +#ifndef __APASVST_H__ +#define __APASCST_H__ + +#include + +// classes referenced +class MApaAppStarter; + + +IMPORT_C TPtrC NameApaServStartSemaphore(); + +IMPORT_C TPtrC NameApaServServerThread(); + +IMPORT_C TInt StartupApaServer(MApaAppStarter& aAppStarter); + +IMPORT_C TInt StartupApaServerProcess(); + +IMPORT_C TInt ApaServThreadStart(TAny* aAppStarter); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APFCTLF.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APFCTLF.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APFCTLF_H__ +#define __APFCTLF_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif + +// +// classes referenced: +class CDir; +// + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APFDEF.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APFDEF.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,83 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APFDEF_H__ +#define __APFDEF_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +// generic file extensions etc. + +/** +@internalTechnology +*/ +_LIT(KExeAppFileExtension,".exe"); + +#if (((defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)) || defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)) +/** +@internalTechnology +*/ +_LIT(KAppFileExtension,".app"); + +/** +@internalTechnology +*/ +_LIT(KAppInfoFileExtension,".aif"); + +/** +@internalComponent +*/ +_LIT(KSystemControlFileExtension,".ctl"); + +/** +@internalComponent +*/ +_LIT(KApaCaptionFileSuffix,"_Caption"); + +/** +@internalComponent +*/ +const TInt KApparcExtraLengthOfCaptionFileName=15; +#endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1) + +/** +@internalTechnology +*/ +_LIT(KIniFileExtension,".ini"); + +/** +@internalTechnology +*/ +_LIT(KAppResourceFileExtension,".rsc"); + +// +// paths etc. + +#if (((defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)) || defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)) +class Apfile +/** +@internalComponent +@deprecated +*/ + { +public: + IMPORT_C static TPtrC TempPath(); + }; +#endif + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APFFNDR.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APFFNDR.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APFFNDR_H__ +#define __APFFNDR_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APFREC.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APFREC.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,152 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APFREC_H__) +#define __APFREC_H__ + +#if !defined(__APADEF_H__) +#include +#endif +#if !defined(__APAFLREC_H__) +#include +#endif + +#include + +// classes defined: +class CApaScanningFileRecognizer; + +// +// classes referenced: +class CApaAppFinder; +class TApaAppEntry; +class TEntry; +class RFs; +class TDriveUnit; +// + +// dir in which app recognizers should live - this dir is scanned on all drives + +/** +@internalTechnology +*/ +_LIT(KAppRecognizerSearchPath,"\\System\\Recogs\\"); + +/** +@internalComponent +*/ +_LIT(KAppRecognizerSearchString,"?:\\System\\Recogs\\"); + +/** +@internalComponent +*/ +_LIT(KAppRecognizerSearchAnyFile,"*"); + +/** +@internalComponent +*/ +const TUid KUidFileRecogInterfaceUid={0x101F7D86}; + +class CApaRecognizerDll; // private class + +/** Constructs a recognizer type + +@publishedPartner +@released +*/ +typedef CApaFileRecognizerType* (*CreateCApaFileRecognizerType)(); + +class CApaScanningFileRecognizer : public CApaFileRecognizer +/** +@internalComponent +@deprecated +*/ + { +public: + class TRecognizer + { + friend class CApaRecognizerDll; + friend class CT_File1Step; + public: + TRecognizer(HBufC* aName); + inline const TDesC& Name() const; + public: + //lint --e{1925} suppress "public data member" + TUid iUid; + TInt iDrive; + private: + inline TRecognizer(); + TRecognizer(const TRecognizer&); + TRecognizer& operator=(const TRecognizer&); + private: + HBufC* iName; + }; + typedef CArrayFixFlat CRecognizerArray; + // +private: + class CApaBackupOperationObserver : public CBase, public MBackupOperationObserver + { + public: + CApaBackupOperationObserver(CApaScanningFileRecognizer& aRecognizer); + ~CApaBackupOperationObserver(); + void RegisterObserverL(); + + virtual void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes); + TInt UpdateCounter() const; + void SetUpdateCounter( TInt aValue ); + private: + CBaBackupSessionWrapper* iSession; + CApaScanningFileRecognizer& iRecognizer; + TInt iUpdateCounter; + }; + friend class CApaScanningFileRecognizer::CApaBackupOperationObserver; +public: + IMPORT_C static CApaScanningFileRecognizer* NewL(RFs& aFs,MApaAppStarter* aAppStarter); + IMPORT_C ~CApaScanningFileRecognizer(); + IMPORT_C void ScanForRecognizersL(); + IMPORT_C TInt RecognizerCount(); + IMPORT_C CRecognizerArray* RecognizerListLC()const; + IMPORT_C const TRecognizer& operator[](TInt aIndex)const; + IMPORT_C TInt UpdateCounter()const; + +protected: + IMPORT_C CApaScanningFileRecognizer(RFs& aFs,MApaAppStarter* aAppStarter); + IMPORT_C void ConstructL(); + // +private: + void ScanDriveL(TInt aDriveNum); + void LoadRecognizerL(const TDesC& aFullName,TUid aUid); + TInt RemoveRecognizer(CApaRecognizerDll& aDll); + void LoadEcomRecognizerL(TDriveUnit& aDrive,TUid aUid); + void ScanForEcomRecognizersL(); +public: + IMPORT_C void SetEcomRecognizersFromListL(const CRecognizerArray& aList); + IMPORT_C void SetEcomRecognizerL(const TRecognizer& aRecognizer); +private: + CApaRecognizerDll* iRecognizerLib; + MApaAppStarter* iAppStarter; + CApaBackupOperationObserver* iObserver; + }; + +inline const TDesC& CApaScanningFileRecognizer::TRecognizer::Name() const + { + return *iName; + } + +inline CApaScanningFileRecognizer::TRecognizer::TRecognizer() + { + } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGAPLST.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGAPLST.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,543 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGAPLST_H__) +#define __APGAPLST_H__ + +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__APMSTD_H__) +#include +#endif +#if !defined(__BADESCA_H__) +#include +#endif + +#include + +// classes defined: +class CApaAppData; +class CApaAppList; +class CApaAppViewData; +// +// classes referenced: +class CApaMaskedBitmap; +class TEntry; +class RFs; +class CApaAppRegFinder; +class CApaAppIconArray; +class CApaIconLoader; +// + +/** +KApaMaxAppIcons + +@publishedPartner +@released +*/ +const TInt KApaMaxAppIcons=3; + +/** +KApaIconIndexSmall + +@publishedPartner +@released +*/ +const TInt KApaIconIndexSmall=0; + +/** +KApaIconIndexMedium + +@publishedPartner +@released +*/ +const TInt KApaIconIndexMedium=1; + +/** +KApaIconIndexLarge + +@publishedPartner +@released +*/ +const TInt KApaIconIndexLarge=2; + +/** +KIgnoreScreenMode + +@internalTechnology +*/ +const TInt KIgnoreScreenMode=-1; + + +_LIT(KDefaultAppIconMbm,"Z:\\Resource\\Apps\\default_app_icon.mbm"); +_LIT(KLitPathForUntrustedRegistrationResourceFiles, "?:\\private\\10003a3f\\import\\apps\\*"); + + +class CApaAppEntry : public CBase +/** +Utility class with smaller RAM footprint than TApaAppEntry + +@internalComponent +*/ + { +public: + static CApaAppEntry* NewL(const TApaAppEntry& aAppEntry); + ~CApaAppEntry(); + void Get(TApaAppEntry& aAppEntry) const; +private: + CApaAppEntry(const TUidType& aUidType); + void ConstructL(const TDesC& aFileName); +private: + TUidType iUidType; + HBufC* iFullName; + }; + +class CApaAppData : public CBase +/** Represents the data associated with a CApaApplication, such as its +caption, capabilities and icons. This should be accessed through the Apparc Server. + +@internalComponent +*/ + { +public: +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + IMPORT_C static CApaAppData* NewL(const TApaAppEntry& aAppEntry, RFs& aFs); +#else + IMPORT_C static CApaAppData* NewL(const TApaAppEntry& aAppEntry, RFs& aFs, const TDesC& aDefaultAppIconFileName); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + IMPORT_C ~CApaAppData(); + IMPORT_C TApaAppEntry AppEntry() const; + inline TPtrC Caption() const; + inline TPtrC ShortCaption() const; + IMPORT_C CApaMaskedBitmap* Icon(TInt aIconIndex) const; + IMPORT_C void Capability(TDes8& aCapabilityBuf)const; + inline TBool IsPresent() const; + // ER5 + IMPORT_C TDataTypePriority DataType(const TDataType& aDataType) const; + // ER6 + IMPORT_C CApaMaskedBitmap* Icon(TSize aSize) const; + IMPORT_C CArrayFixFlat* IconSizesL() const; + // ER6.1 + IMPORT_C CArrayPtrFlat* Views() const; + IMPORT_C CDesCArray* OwnedFiles() const; + IMPORT_C TBool CanUseScreenMode(TInt aScreenMode); + // 7.0s + IMPORT_C void GetIconInfo(TInt& aIconCount, TInt& aDefaultIconsUsed) const; + // 8.1 + IMPORT_C TUint DefaultScreenNumber() const; + IMPORT_C TBool RegistrationFileUsed() const; + IMPORT_C TPtrC IconFileName() const; + IMPORT_C TBool NonMbmIconFile() const; + + // 9.0 + IMPORT_C TBool ImplementsService(TUid aServiceUid) const; + TInt ImplementsServiceWithDataType(TUid aServiceUid, const TDataType& aDataType) const; + + // 9.1 + IMPORT_C TLanguage ApplicationLanguage() const; + IMPORT_C TPtrC RegistrationFileName() const; + IMPORT_C TPtrC8 OpaqueData() const; + IMPORT_C TUid NonNativeApplicationType() const; + IMPORT_C TPtrC LocalisableResourceFileName() const; + IMPORT_C void SetShortCaptionL(const TDesC& aShortCaption); + IMPORT_C TBool IsPending()const; + + // Icon/caption overrides + IMPORT_C void SetCaptionL(const TDesC& aCaption); + IMPORT_C void SetIconsL(const TDesC& aFileName, TInt aNumIcons); + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void ExternalizeL(RWriteStream& aWriteStream) const; + void LoadIconsL(); + TBool MbmIconsRequireLoading() const; + inline CApaAppData* Next() const; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + CApaAppData(RFs& aFs); + TBool Update(); + void SetAppPending(); + + void ConstructL(const TApaAppEntry& aAppEntry); + TInt StoreApplicationInformation(); +#else + CApaAppData(RFs& aFs); + TBool Update(const TDesC& aDefaultAppIconFileName); + void ConstructL(const TApaAppEntry& aAppEntry, const TDesC& aDefaultAppIconFileName); + TInt StoreApplicationInformation(const TDesC& aDefaultAppIconFileName); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + void UpdateServiceArray(CArrayFixFlat* aNewServiceArray); + TDataTypePriority DataType(const TDataType& aDataType, const CArrayFixFlat& aDataTypeArray) const; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void InternalizeL(RReadStream& aReadStream); + TBool ViewMbmIconsRequireLoading() const; +#endif // SYMBIAN_APPARC_APPINFO_CACHE +private: + enum { ENotPresent, ENotPresentPendingUpdate, EPresentPendingUpdate, EIsPresent, ESuperseded }; +private: + CApaAppIconArray* iIcons; + HBufC* iCaption; + HBufC* iShortCaption; + HBufC* iFullName; // filename of application binary + TInt iIsPresent; // uses enum + TUidType iUidType; + CApaAppData* iNext; + TApaAppCapabilityBuf iCapabilityBuf; + CApaAppEntry* iSuccessor; + TTime iTimeStamp; + CArrayPtrFlat* iViewDataArray; + CDesCArray* iOwnedFileArray; + RFs& iFs; + HBufC* iRegistrationFile; + TUint iDefaultScreenNumber; + HBufC* iIconFileName; + TBool iNonMbmIconFile; + HBufC* iLocalisableResourceFileName; + TTime iLocalisableResourceFileTimeStamp; + TTime iIconFileTimeStamp; + TLanguage iApplicationLanguage; + CArrayFixFlat* iServiceArray; + TInt iIndexOfFirstOpenService; + TUid iNonNativeApplicationType; + HBufC8* iOpaqueData; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + TInt iNumOfAppIcons; + TInt iNumOfAppIconsFromResourceFile; + HBufC* iIconFileNameFromResourceFile; // Icon file name as found in the localisable resource file + TBool iNonMbmIconFileFromResourceFile; // A Flag that tells whether the icon in resource file is non MBM file format + TTime iIconFileTimeStampFromResourceFile; + HBufC* iShortCaptionFromResourceFile; // Short Caption as found in the localisable resource file + HBufC* iCaptionFromResourceFile; // Caption as found in the localisable resource file + CApaIconLoader* iIconLoader; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: + friend class CApaAppList; + }; + +class CApaAppViewData : public CBase +/** +The CApaAppViewData class represents the data associated with an application view. + +@internalComponent +*/ + { +public: + IMPORT_C TUid Uid() const; + inline TPtrC Caption() const; + IMPORT_C CApaMaskedBitmap* Icon(const TSize& aSize) const; + IMPORT_C CArrayFixFlat* IconSizesL() const; + IMPORT_C TInt ScreenMode() const; + IMPORT_C TPtrC IconFileName() const; + IMPORT_C TBool NonMbmIconFile() const; +public: + ~CApaAppViewData(); + static CApaAppViewData* NewLC(); + void SetUid(TUid aUid); + void SetCaptionL(const TDesC& aCaption); + void SetIconArray(CApaAppIconArray* aIcons); + void SetScreenMode(TInt aScreenMode); + void SetIconFileNameL(const TDesC& aFileName); + void SetNonMbmIconFile(TBool aNonMbmIconFile); +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void SetNumOfViewIcons(TInt aNumOfViewIcons); +#endif // SYMBIAN_APPARC_APPINFO_CACHE +private: + CApaAppViewData(); + void ConstructL(); +private: + CApaAppIconArray* iIcons; + HBufC* iCaption; + TUid iUid; + TInt iScreenMode; + HBufC* iIconFileName; + TBool iNonMbmIconFile; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + TInt iNumOfViewIcons; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + friend class CApaAppData; + }; + + +class MApaAppListObserver +/** + The MApaAppListObserver interface allows a class to be informed when a CApaAppList is + updated. + + @internalComponent +*/ + { +public: + virtual void NotifyUpdate(TInt aReason)=0; + virtual void InitialListPopulationComplete()=0; + virtual void NotifyScanComplete()=0; + }; + +class CApaAppList : public CBase +/** +The CApaAppList class provides a list of all available applications present on a device. +Its functionality should be accessed through the Apparc Server. + +@internalComponent +*/ + { +public: + IMPORT_C static CApaAppList* NewL(RFs& aFs,CApaAppRegFinder* aAppRegFinder, TBool aLoadMbmIconsOnDemand, TInt aTimeoutDelay = 50000); // takes ownership of aAppRegFinder +public: + IMPORT_C void PurgeL(); + inline void Purge(); + IMPORT_C TInt Count() const; + IMPORT_C CApaAppData* FirstApp() const; + IMPORT_C CApaAppData* FirstApp(TInt aScreenMode) const; + IMPORT_C CApaAppData* NextApp(const CApaAppData* aApp) const; + IMPORT_C CApaAppData* NextApp(const CApaAppData* aApp, TInt aScreenMode) const; + IMPORT_C CApaAppData* AppDataByUid(TUid aAppUid) const; + IMPORT_C void StopScan(TBool aNNAInstall = EFalse); + IMPORT_C void RestartScanL(); + IMPORT_C TBool AppListUpdatePending(); +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + IMPORT_C TInt UpdateCounter() const; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + // ER5 + IMPORT_C TUid PreferredDataHandlerL(const TDataType& aDataType) const; + IMPORT_C void StartIdleUpdateL(); + IMPORT_C void StartIdleUpdateL(MApaAppListObserver* aObserver); + IMPORT_C void InitListL(MApaAppListObserver* aObserver); + IMPORT_C TBool IsIdleUpdateComplete() const; + // + IMPORT_C TBool IsFirstScanComplete() const; + IMPORT_C TBool AppScanInProgress() const; + IMPORT_C CBufFlat* ServiceArrayBufferL(TUid aAppUid) const; + IMPORT_C CBufFlat* ServiceImplArrayBufferL(TUid aServiceUid) const; + IMPORT_C CBufFlat* ServiceImplArrayBufferL(TUid aServiceUid, const TDataType& aDataType) const; + IMPORT_C CBufFlat* ServiceUidBufferL(TUid aAppUid) const; + IMPORT_C CBufFlat* ServiceOpaqueDataBufferL(TUid aAppUid, TUid aServiceUid) const; + IMPORT_C CApaAppData* FindAndAddSpecificAppL(CApaAppRegFinder* aFinder, TUid aAppUid); + IMPORT_C TUid PreferredDataHandlerL(const TDataType& aDataType, const TUid* aServiceUid, + TInt& aPriority) const; + IMPORT_C ~CApaAppList(); + // 9.1 + IMPORT_C CApaAppData* AppDataByFileName(const TDesC& aFullFileName) const; + /*IMPORT_C*/ RFs& ShareProtectedFileServer(); + IMPORT_C void AddForcedRegistrationL(HBufC* aRegistrationFile); + IMPORT_C void ResetForcedRegistrations(); + IMPORT_C static TInt CompareStrings(const HBufC& aFirst, const HBufC& aSecond); + IMPORT_C TBool IsLanguageChangePending() const; + IMPORT_C static CApaAppList* Self(); + IMPORT_C CArrayFixFlat* UninstalledAppArray(); + void AcquireDefaultIconArrayL() const; + const CApaAppIconArray& DefaultIconArray() const; + void ReleaseDefaultIconArray() const; +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void StoreL(); + void NotifyObserver(); + void DeleteAppListStorer(); + void DeleteAppIconLoader(); + void InitiateStoringOfAppList(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE +private: + enum + { + EFirstScanComplete = 0x01 +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + ,EAppListHasChanged = 0x02, // This flag is used to check if the applist has really changed after a re-scan/update scan. + ENotifyUpdateOnFirstScanComplete = 0x04 // This flag is used to notify clients for applist update on first boot when AppsList.Bin is used. +#endif // SYMBIAN_APPARC_APPINFO_CACHE + ,ELangChangePending = 0x08 // This flag is used to check if applist update is in progress on language change event. + }; + +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + enum + { + EFirstStageScan=0x01, + EScanFinished=0x02, + }; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: + CApaAppList(RFs& aFs, CApaAppRegFinder* aAppRegFinder, TBool aLoadMbmIconsOnDemand, TInt aIdlePeriodicDelay); + void UpdateNextAppL(const TApaAppEntry& aAppEntry,TBool& aHasChanged); + void AddToList( CApaAppData* aAppData ); + static void SetPending(CApaAppData* aAppData); + static void SetNotFound(CApaAppData* aAppData, TBool& aHasChanged); + static TInt IdleUpdateCallbackL(TAny* aObject); + TInt IdleUpdateL(); + void ScanComplete(); + void UndoSetPending(CApaAppData* aAppData); + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void StopIdler(); + void DeleteAppData(); +#else + void StopIdlerL(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + CArrayFixFlat* DataTypeArrayDeepCopyLC(const CArrayFixFlat& aOriginal) const; + CApaAppIconArray* LoadDefaultIconsL() const; + void UpdateDefaultIconsL(); +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + void StartIconLoadingL(); + void DeleteAppsListBackUpAndTempFiles(); + void ScanRemovableDrivesAndUpdateL(); + void CreateDefaultAppIconFileNameL(); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: + // Persistence Layer + void RestoreL(); + void ConstructL(); +#ifndef SYMBIAN_APPARC_APPINFO_CACHE + void StoreL(); + void StoreEntryL(RFileWriteStream& theWriteStream,CApaAppData* aApp); + void DoStoreL(RFileWriteStream& aWriteStream); +#endif // SYMBIAN_APPARC_APPINFO_CACHE + + void GetAppsListCachePathL(); +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + NONSHARABLE_CLASS(CApaIdleIconLoader) : public CActive + { + /** + Utility class used to Load Icons once applist is populated + @internalComponent + */ + public: + CApaIdleIconLoader(CApaAppData* aFirstAppData, RFs& aFs, CApaAppList& aAppList); + ~CApaIdleIconLoader(); + void Start(); + + private: // from CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + + private: + CApaAppData* iCurrentAppData; + RFs& iFs; + CApaAppList& iAppList; + }; + + NONSHARABLE_CLASS(CApaAppListStorer) : public CActive + { + /** + Utility class used to externalize applist to file + @internalComponent + */ + public: + static CApaAppListStorer* NewL(CApaAppData* aFirstAppData, RFs& aFs, CApaAppList& aAppList); + ~CApaAppListStorer(); + void StartL(const TTimeIntervalMicroSeconds32& aDelay); + + private: + CApaAppListStorer(CApaAppData* aFirstAppData, RFs& aFs, CApaAppList& aAppList); + static void StoreEntryL(RWriteStream& aWriteStream, const CApaAppData& aApp); + void ConstructL(); + + private: // from CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + + private: + CApaAppData* iCurrentAppData; + TFileName iTempFilename; + RFileWriteStream iWriteStream; + RTimer iTimer; + RFs& iFs; + CApaAppList& iAppList; + }; +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +private: + RFs& iFs; + CApaAppData* iAppData; // linked list of apps + CPeriodic* iAppIdler; + MApaAppListObserver* iObserver; + CApaAppData* iValidFirstAppData; //First valid app data in linked list! + TInt iFlags; + CApaAppRegFinder* iAppRegFinder; + TInt iIdlePeriodicDelay; // idle timeout periodic delay + RFs iFsShareProtected; + mutable CApaAppIconArray* iDefaultIconArray; + mutable TInt iDefaultIconUsageCount; + RPointerArray iForcedRegistrations; + class CApaLangChangeMonitor; //inner class of CApaAppList. + CApaLangChangeMonitor* iAppLangMonitor; // Active Object used for language change monitoring. + + RBuf iAppsListCacheFileName; + RBuf iAppsListCacheBackUpFileName; + RBuf iAppsListCachePath; + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE + HBufC* iDefaultAppIconMbmFileName; // This member data lives only during the scan + CApaAppListStorer* iAppListStorer; //Active Object used for writing applist to file. + CApaIdleIconLoader* iAppIconLoader; //Active Object used for icon handling +#else + TInt iScanStage; + TInt iUpdateCounter; + TApaAppEntry iCurrentApp; + TInt iOldUpdateCounter; + HBufC* iDefaultAppIcon; // This member data lives only during the scan +#endif // SYMBIAN_APPARC_APPINFO_CACHE + TBool iLoadMbmIconsOnDemand; + TBool iNNAInstallation; + CArrayFixFlat* iUninstalledApps; + +private: + friend class CApaLangChangeMonitor; + }; + +// +// inlines +// + +inline TPtrC CApaAppViewData::Caption() const + { return *iCaption; } + +inline TPtrC CApaAppData::Caption() const +/** Gets the application's caption. + +@return The application's caption. */ + { return *iCaption; } + +inline TPtrC CApaAppData::ShortCaption() const +/** Gets the application's short caption. + +@return The application's short caption. */ + { return *iShortCaption; } + +inline TBool CApaAppData::IsPresent() const +/** Tests whether the application is present or not on the device. + +@return True if application exists, else false. */ + { return iIsPresent; } + +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +inline CApaAppData* CApaAppData::Next() const +/** Gets the Next Appdata in the list + +@return iNext */ + { return iNext; } +#endif // SYMBIAN_APPARC_APPINFO_CACHE + +/** + * Use PurgeL. + * + * @deprecated + */ +inline void CApaAppList::Purge() + { TRAP_IGNORE(PurgeL()); } + +#endif //__APGAPLST_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGCLI.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGCLI.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,309 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGCLI_H__) +#define __APGCLI_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APMSTD_H__) +#include +#endif +#if !defined(__APMREC_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__BADESCA_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif + +// classes referenced +class CApaCommandLine; +class CApaMaskedBitmap; +class MArrayFiller; +class RFile; + +class CApaLsSessionExtension; + +class CDataRecognitionResultArrayEntry; +class CApaRegistrationResourceFileWriter; +class CApaLocalisableResourceFileWriter; + +/* @internalComponent +*/ +IMPORT_C TUint MinApplicationStackSize(); + +class CDataRecognitionResultArray : public CBase +/** +This class holds the recognition results of a recognized directory. +@publishedAll +@released +*/ + { +public: // exported functions + IMPORT_C CDataRecognitionResultArray(); + IMPORT_C virtual ~CDataRecognitionResultArray(); + IMPORT_C const TFileName& Path() const; + IMPORT_C TUint Count() const; + IMPORT_C void GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const; + IMPORT_C void GetFileNameL(TFileName& aFileName, const TUint aIndex) const; +public: // dll internally + TUint InternalizeL(const CBufFlat& aBuffer); + void SetPath(const TFileName& aPath); +private: + TFileName iPath; + RPointerArray iEntries; + }; + + + +//////////////////////////////////// +// RApaLsSession +//////////////////////////////////// + +class RApaLsSession : public RSessionBase +/** A session with the application architecture server. + +The server provides access to a cached list of the applications on the device. + +To use this class, clients first need to connect to the server. + +Then, one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps() needs to be called. +These functions do some initialisation of server data in preparation for returning the +application list (which is owned by the server). + +Then, GetNextApp() is called in a loop. The first time around, it populates the session's +application list and retrieves the first application in the list. Further calls to GetNextApp() +retrieve the remaining applications in the list, until RApaLsSession::ENoMoreAppsInList is +returned. + +The session should be closed when it is no longer needed, before it goes out of scope. + +Various functions in RApaLsSession need to access the application list, and may return +RApaLsSession::EAppListInvalid to indicate that the function was called before the initial +population of the list is complete. If this occurs, you could try again after a short delay. + +This class provides many other functions, for instance launching applications, querying +application-specific information, recognising data. + +@publishedAll +@released */ + { + friend class CApaLsSessionExtension; +public: + enum { + /** A possible return value from GetNextApp(), to indicate that there are no more + applications in the list. */ + ENoMoreAppsInList=1, + /** Indicates that an RApaLsSession member function was called before the session's + application list is fully populated. */ + EAppListInvalid + }; + /** Defines the way an application is launched. */ + enum TLaunchType { + /** Launches a new instance of the application. */ + ELaunchNewApp=1, + /** Launches a new instance of the application if no existing instance of the application + is running. If an instance of the application is already running, then it + is brought to the foreground. */ + ESwitchFiles + }; + +public: + IMPORT_C RApaLsSession(); + // + IMPORT_C TInt Connect(); + IMPORT_C TVersion Version() const; + // + IMPORT_C TInt AppCount(TInt& aCount) const; // returns error + IMPORT_C TInt EmbeddableAppCount(TInt& aCount) const; // returns error + // + IMPORT_C TInt GetAllApps() const; // Call to initialize + IMPORT_C TInt GetAllApps(TInt aScreenMode) const; // Call to initialize + IMPORT_C TInt GetEmbeddableApps() const; // Call to initialize + IMPORT_C TInt GetEmbeddableApps(TInt aScreenMode) const; // Call to initialize + // 7.0s + IMPORT_C TInt GetFilteredApps(const TApaEmbeddabilityFilter& aFilter) const; // Call to initialize + IMPORT_C TInt GetFilteredApps(const TApaEmbeddabilityFilter& aFilter, TInt aScreenMode) const; // Call to initialize + // 8.1 + IMPORT_C TInt GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue) const; // Call to initialize + IMPORT_C TInt GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue, TInt aScreenMode) const; // Call to initialize + // 9.0 + IMPORT_C TInt GetServerApps(TUid aServiceUid) const; // Call to initialize + IMPORT_C TInt GetServerApps(TUid aServiceUid, TInt aScreenMode) const; // Call to initialize + // + IMPORT_C TInt GetNextApp(TApaAppInfo& aInfo) const; // call repeatedly, returns err (inc ENoMoreAppsInList,EAppListInvalid) + IMPORT_C TInt GetNextApp(TApaAppInfo& aInfo,TInt aScreenMode) const; // call repeatedly, returns err (inc ENoMoreAppsInList,EAppListInvalid) + // + IMPORT_C TInt GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const; + IMPORT_C TInt SetAppShortCaption(const TDesC& aShortCaption, TLanguage aLanguage, TUid aAppUid); + IMPORT_C TInt GetDefaultScreenNumber(TInt& aDefaultScreenNumber, TUid aAppUid) const; + +public: + IMPORT_C TInt GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const; + IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine); // This is only recommended for non document based apps + IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId); + IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId,TRequestStatus* aRequestStatusForRendezvous); + // + IMPORT_C TInt RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const; + IMPORT_C TInt RecognizeData(const RFile& aFile, TDataRecognitionResult& aDataType) const; + IMPORT_C TInt RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const; + IMPORT_C TInt RecognizeSpecificData(const RFile& aFile, const TDataType& aDataType, TBool& aResult) const; + // + IMPORT_C TInt AppForDataType(const TDataType& aDataType, TUid& aAppUid) const; + IMPORT_C TInt StartDocument(const TDesC& aFileName, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + IMPORT_C TInt StartDocument(RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); + IMPORT_C TInt StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + IMPORT_C TInt StartDocument(RFile& aFile, const TDataType& aDataType, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); + IMPORT_C TInt StartDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + IMPORT_C TInt StartDocument(RFile& aFile, TUid aAppUid, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); + IMPORT_C TInt CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + // + IMPORT_C TInt GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const; + // + IMPORT_C TInt AppForDocument(const TDesC& aFileName, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt AppForDocument(const RFile& aFile, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt IsProgram(const TDesC& aFileName, TBool& aProgram) const; + IMPORT_C TInt GetAcceptedConfidence(TInt& aConfidence) const; + IMPORT_C TInt SetAcceptedConfidence(TInt aConfidence); + IMPORT_C TInt GetMaxDataBufSize(TInt& aBufSize) const; + IMPORT_C TInt SetMaxDataBufSize(TInt aBufSize); + IMPORT_C TInt GetPreferredBufSize(TInt& aPreferredBufSize) const; + IMPORT_C TInt GetSupportedDataTypesL(CDataTypeArray& aDataTypes) const; + // + IMPORT_C TInt GetAppIconSizes(TUid aAppUid, CArrayFixFlat& aArrayToFill) const; + IMPORT_C TInt GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const; + IMPORT_C TInt GetAppIcon(TUid aAppUid, RFile& aFile) const; + // + IMPORT_C TInt GetAppViews(CApaAppViewArray& aAppViews, TUid aAppUid) const; + IMPORT_C TInt GetAppViewIcon(TUid aAppUid, TUid aViewUid, const TSize& aSize, CApaMaskedBitmap& aViewBitmap) const; + IMPORT_C TInt GetAppOwnedFiles(CDesCArray& aAppOwnedFiles, TUid aAppUid) const; + // + IMPORT_C TInt NumberOfOwnDefinedIcons(TUid aAppUid, TInt& aCount) const; + // + IMPORT_C TInt GetAppIcon(TUid aAppUid, HBufC*& aFullFileName) const; + IMPORT_C TInt GetAppViewIcon(TUid aAppUid, TUid aViewUid, HBufC*& aFullFileName) const; + IMPORT_C TInt InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + IMPORT_C TInt InsertDataMappingIfHigher(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TBool& aInserted); + IMPORT_C TInt DeleteDataMapping(const TDataType& aDataType); + /** + @internalComponent + @released + */ + IMPORT_C TInt InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, + TUid aUid, TUid aServiceUid); + /** + @internalComponent + @released + */ + IMPORT_C TInt DeleteDataMapping(const TDataType& aDataType, TUid aServiceUid); + /** + @internalComponent + @released + */ + IMPORT_C TInt GetAppByDataType(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const; + +public: + // + IMPORT_C CApaAppServiceInfoArray* GetAppServicesLC(TUid aAppUid) const; + IMPORT_C CApaAppServiceInfoArray* GetServiceImplementationsLC(TUid aServiceUid) const; + IMPORT_C CApaAppServiceInfoArray* GetServiceImplementationsLC(TUid aServiceUid, const TDataType& aDataType) const; + IMPORT_C void GetAppServicesL(TUid aAppUid, CArrayFixFlat& aServiceUids) const; + IMPORT_C CApaAppServiceInfoArray* GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const; + IMPORT_C TInt AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const; + IMPORT_C TInt AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt AppForDocumentAndService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt ApplicationLanguage(TUid aAppUid, TLanguage& aLanguage) const; + IMPORT_C void Close(); //lint !e1511 Member hides non-virtual member + + IMPORT_C void RegisterListPopulationCompleteObserver(TRequestStatus& aStatus) const; + IMPORT_C TInt CancelListPopulationCompleteObserver() const; + IMPORT_C TInt MatchesSecurityPolicy(TBool& aMatches, TUid aAppUid, const TSecurityPolicy& aSecurityPolicy) const; + IMPORT_C TInt RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult) const; + IMPORT_C void RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); + IMPORT_C TInt RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult) const; + IMPORT_C void RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); + IMPORT_C void CancelRecognizeFiles(); + + IMPORT_C void RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable); + IMPORT_C void DeregisterNonNativeApplicationTypeL(TUid aApplicationType); + IMPORT_C void PrepareNonNativeApplicationsUpdatesL(); + IMPORT_C void RegisterNonNativeApplicationL(TUid aApplicationType, const TDriveUnit& aDrive, CApaRegistrationResourceFileWriter& aRegistrationResourceFile, CApaLocalisableResourceFileWriter* aLocalisableResourceFile, const RFile* aIconFile); + IMPORT_C void DeregisterNonNativeApplicationL(TUid aApplication); + IMPORT_C void CommitNonNativeApplicationsUpdatesL(); + IMPORT_C TInt RollbackNonNativeApplicationsUpdates(); + IMPORT_C void NotifyOnDataMappingChange(TRequestStatus& aRequestStatus); + IMPORT_C void CancelNotifyOnDataMappingChange(); + IMPORT_C TInt GetAppType(TUid& aTypeUid, TUid aAppUid) const; + + IMPORT_C TInt ForceRegistration(const RPointerArray& aRegFiles); + +public: + // not for public use + IMPORT_C static void SetFsSessionL(RFs& aFsSession); + IMPORT_C static void ClearFsSession(); + IMPORT_C static RFs* FsSession(); + IMPORT_C void SetNotify(TBool aCompleteImmediatelyIfNoScanImpendingOrInProgress, TRequestStatus& aStatus); + IMPORT_C void CancelNotify(); + +private: // Reserved for future use + IMPORT_C virtual void RApaLsSession_Reserved1(); + IMPORT_C virtual void RApaLsSession_Reserved2(); + +public: + /** + @publishedPartner + @released + */ + IMPORT_C void ForceCommitNonNativeApplicationsUpdatesL(); + +private: + void DoGetAppOwnedFilesL(CDesCArray& aArrayToFill, TUid aAppUid) const; + void DoGetAppViewsL(CApaAppViewArray& aArrayToFill, TUid aAppUid) const; + void DoGetAppIconSizesL(TUid aAppUid, CArrayFixFlat& aArrayToFill) const; + TInt DoAppCount(TInt& aCount,TInt aCommand) const; + void FetchArrayL(MArrayFiller& aArrayFiller,TUid aAppUid, TInt aOpcode, TInt aInitialBufSize) const; + CBufBase* GetServiceBufferLC(TInt aOpcode, TUid aUid1, TUid aUid2=KNullUid) const; + TInt StartAndCreate(TInt aRqst,const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType); + CBufBase* GetServiceBufferLC(TInt aOpcode, TUid aUid1, const TDataType& aDataType) const; + TInt SendReceiveWithReconnect(TInt aFunction,const TIpcArgs& aIpcArgs) const; + TInt TransferAndInternalizeDataL(const TDesC& aPath, const TInt aRequiredBufferSize, CDataRecognitionResultArray& aResult) const; + TInt GetExecutableName(TDes& aNativeExecutableName, TDes& aLogicalExecutableName, HBufC8*& aOpaqueData, TIpcArgs& aIpcArgs, TInt aOpcode) const; + TInt GetOpaqueData(HBufC8*& aOpaqueData, TInt aLengthOfOpaqueData) const; + TInt StartApplicationPassingFileHandle(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); + TInt StartApplicationPassingDocumentName(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const TDesC& aDocumentName, TThreadId& aThreadId,TApaCommand aCommand, TRequestStatus* aRequestStatusForRendezvous); + void StartApplicationL(const TDesC& aNativeExecutableName, const CApaCommandLine& aCommandLine, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); + TInt DoAppForDocumentOptionallySpecifyingService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const; + TInt DoAppForDocumentOptionallySpecifyingService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const; + TInt GetBufferFromFile(HBufC8*& aBuffer, const TDesC& aFileName) const; + TInt DoStartApp(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous); + void DoStartAppL(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous); + static void GetThreadIdL(TThreadId& aThreadId, const RProcess& aProcess); + static void DeletePointerToPointerToTAny(TAny* aPointerToPointerToTAny); + static CBufFlat* CreateRegFilesBufferL(const RPointerArray& aRegFiles); + static void CleanupOperation(TAny* aAny); + +private: // data + CApaLsSessionExtension* iExtension; // friend! + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGCTL.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGCTL.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,160 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGCTL_H__ +#define __APGCTL_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif + +// classes defined: +class CApaSystemControl; +class CApaSystemControlList; +// +// classes referenced: +class RFs; +class CApaMaskedBitmap; +// + +/** +Calls the control DLL's first ordinal function to create and run the control. + +The function leaves with KErrBadLibraryEntryPoint if the ordinal 1 function +cannot be found. + +@publishedAll +@released +*/ +typedef TInt (*ApaRunSystemControl)(const TDesC&); + +/** +@publishedAll +@released +*/ +#ifdef _UNICODE +#define KUidSystemControlDll KUidSystemControlDll16 +#else +#define KUidSystemControlDll KUidSystemControlDll8 +#endif + +/** +@publishedAll +@deprecated +*/ +const TInt KSystemControlDllUidValue8=0x10000297; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidSystemControlDll8={KSystemControlDllUidValue8}; + +/** +@publishedAll +@released +*/ +const TUid KUidSystemControlDll16={0x10003A34}; + + +class CApaSystemControl : public CBase +/** Wrapper to a control panel application. + +An instance of the class represents a control panel application. It is also a cache for the control's icon and caption. + +An instance of the wrapper can only be constructed by the control panel application list, which +is a CApaSystemControlList object. + +@publishedAll +@released */ + { +public: + IMPORT_C void CreateL(); + IMPORT_C TUid Type()const; + IMPORT_C TFileName FileName()const; + IMPORT_C CApaMaskedBitmap* Icon()const; // one size of icon, 48x48? + IMPORT_C TPtrC Caption()const; + IMPORT_C TPtrC ShortCaption()const; +private: + static CApaSystemControl* NewL(RFs& aFs,const TDesC& aFullPath,const TUidType aUidType); + ~CApaSystemControl(); + + CApaSystemControl(RFs& aFs); + void ConstructL(const TDesC& aFullPath,const TUidType aUidType); +private: + CApaSystemControl* iNext; + HBufC* iCaption; + HBufC* iShortCaption; + CApaMaskedBitmap* iIcon; + TBool iExists; // used during updating + TFileName iFullPath; + TUidType iUidType; + RFs& iFs; + + friend class CApaSystemControlList; + }; + + + +class CApaSystemControlList : public CBase +/** Provides a list of all available control panel applications present on the phone. +This class is implemented as a linked list of CApaSystemControl. Updates the control panel application list by removing +control panels that no longer exist, adding new control panels found to the control panel application list and replacing +a control panel if found in an earlier drive. + +@see CApaSystemControl +@publishedPartner +@released +*/ + { +public: + IMPORT_C static CApaSystemControlList* NewL(RFs& aFs); + IMPORT_C ~CApaSystemControlList(); + + IMPORT_C TInt Count()const; + IMPORT_C TInt Index(TUid aType)const; + IMPORT_C CApaSystemControl* Control(TInt aIndex)const; + IMPORT_C CApaSystemControl* Control(TUid aType)const; + + IMPORT_C void UpdateL(); + inline TInt UpdateCount()const; +private: + CApaSystemControlList(RFs& aFs); + CApaSystemControl* PreviousControl(const CApaSystemControl* aControl) const; +private: + TInt iUpdateCount; + RFs& iFs; + CApaSystemControl* iControl; + }; + + +// +// inlines +// + + +inline TInt CApaSystemControlList::UpdateCount()const +/** Gets the number of times the control panel application list has been +updated (by calling UpdateL()). It returns 1 for a newly created list. + +@return The number of times the control panel application list has been changed. */ + { return iUpdateCount; } + + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGDOOR.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGDOOR.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,181 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGDOOR_H__ +#define __APGDOOR_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__S32STD_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__APPARC_H__) +#include +#endif +#if !defined(__APADBASE_H__) +#include +#endif + +/** +@internalAll +*/ +#ifdef _UNICODE +#define KUidApaDoorDocStream KUidApaDoorDocStream16 +#else +#define KUidApaDoorDocStream KUidApaDoorDocStream8 +#endif + +/** +@internalComponent +@deprecated +*/ +const TUid KUidApaDoorDocStream8={0x10000144}; + +/** +@internalComponent +*/ +const TUid KUidApaDoorDocStream16={0x10003A35}; + +// classes defined: +class CApaDoor; +class TApaPictureFactory; +// +// classes referenced: +class CEmbeddedStore; +// + +class CApaDoor : public CApaDoorBase +/** A wrapper for an embedded document that can be displayed in a user interface +as an icon or a glass door. + +@publishedAll +@released */ + { +public: + IMPORT_C static CApaDoor* NewLC(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); // call to create a new door in iconic format - restoration is achieved with TApaPictureFactory + IMPORT_C static CApaDoor* NewL(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); // call to create a new door in iconic format - restoration is achieved with TApaPictureFactory + IMPORT_C static CApaDoor* NewL(RFs& aFs, const CStreamStore& aStore,TStreamId aStreamId,CApaProcess& aProcess); // restoring constructor called by TApaPictureFactory + // + IMPORT_C void SetFormatToIconL(); + IMPORT_C void SetFormatToGlassL(); + IMPORT_C void SetFormatToTemporaryIconL(TBool aEnabled=ETrue); + // + IMPORT_C CApaDocument* DocumentL(TBool aCheckPassword=EFalse); // returns a pointer to the doc, restoring it if necessary. Checks password if required. + inline TDesC* Caption()const; + IMPORT_C TUid AppUidL()const; + // + // persistence methods + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId); + TStreamId StoreL(CStreamStore& aStore) const; + // + IMPORT_C ~CApaDoor(); + // + // from CPicture + void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect, + MGraphicsDeviceMap* aMap)const; // draws according to current iPicFormat + void DetachFromStoreL(TDetach aDegree=EDetachFull); //lint !e1735 Virtual function has default parameter - Must use the same default as declared by CPicture + void GetOriginalSizeInTwips(TSize& aSize)const; + void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + void SetCropInTwips(const TMargins& aMargins); + TPictureCapability Capability() const; + void GetCropInTwips(TMargins& aMargins) const; + TInt ScaleFactorWidth() const; + TInt ScaleFactorHeight() const; +private: + CApaDoor(RFs& aFs, CApaProcess& aProcess); + CApaDoor(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); + void ConstructL(); + // + void SetIconSizeInTwips(TSize aSize); // for use of factory + // + void StoreDocL(CPersistentStore& aStore)const; + void RestoreDocL(const CPersistentStore& aStore); + void RestoreDoorStateL(const CStreamStore& aStore,const CStreamDictionary& streamDic); + static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aStore,TStreamId aStreamId); + static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream); + void ExternalizeStateStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const; + void InternalizeStateStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict,TSize aDefaultIconSize); + // + // required so CPicture's can be swizzled + void ExternalizeL(RWriteStream& aStream)const; + // from CApaDoorBase + virtual TSize GlassDoorSize()const; + TUid AppUidFromStreamL() const; +private: + RFs& iFs; + HBufC* iAppCaption; // name of the app used to create the embedded object + CApaProcess* iApaProcess; + CApaDocument* iApaDoc; + CPicture* iPicture; // the current view of the door, either iconic or glass + CEmbeddedStore* iStore; // store containing the doc + CBufSeg* iStoreHost; // the host for the embedded store, if the door has been detached from its originating store + __MUTABLE TSize iIconSizeInTwips; + // + friend class TApaPictureFactory; + }; + + +class TApaPictureFactory : public MPictureFactory +// Recognizes KUidPictureTypeDoor and creates CApaDoor pictures +/** A factory class for instantiating and restoring an application's door. + +A door factory object is constructed by the UI environment and can be accessed +by calling CEikonEnv::PictureFactory(). + +@publishedAll +@released +@see CEikonEnv::PictureFactory() +@see CApaDoor */ + { +public: + IMPORT_C TApaPictureFactory(CApaProcess* aAppProcess); + inline void SetIconSize(TSize aIconSizeInTwips); + // + // from MPictureFactory + IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only +protected: + IMPORT_C TApaPictureFactory(); + +private: + CApaProcess* iApaProcess; + TSize iIconSize; + TInt iSpare; + }; + + +// +// inlines +// + +inline TDesC* CApaDoor::Caption()const + /** Gets the name of the application with which the embedded document is associated. + + @return A pointer to a descriptor containing the name of the application. */ + { return iAppCaption; } + +inline void TApaPictureFactory::SetIconSize(TSize aIconSizeInTwips) + /** Sets the size of the icon. + + @param aIconSizeInTwips The size of the icon, in twips. */ + { iIconSize = aIconSizeInTwips; } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGICNFL.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGICNFL.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,561 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGICNFL_H__ +#define __APGICNFL_H__ + +#include +#include +#include +#include +#include + +class CFbsBitmap; +class CPersistentStore; +class RReadStream; +class RWriteStream; + +class CApaMaskedBitmap : public CFbsBitmap +/** An application icon. + +This is a bitmap and a mask, managed by the Font and Bitmap server. + +An object of this type is passed to RApaLsSession::GetAppIcon() to fetch a +suitable application icon. + +@publishedAll +@released +@see RApaLsSession::GetAppIcon() */ + { +public: + IMPORT_C static CApaMaskedBitmap* NewLC(); + IMPORT_C static CApaMaskedBitmap* NewL(const CApaMaskedBitmap* aSourceIcon); + // + IMPORT_C CFbsBitmap* Mask() const; + IMPORT_C void InternalizeL(RReadStream& aStream); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation + // + IMPORT_C ~CApaMaskedBitmap(); + void SetRomBitmapL(TUint8* aRomPointer); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation + IMPORT_C void SetMaskBitmap(CFbsBitmap* aMask); +private: + CApaMaskedBitmap(); + void ConstructL(); +private: + CFbsBitmap* iMask; + }; + +/** +@internalComponent +*/ +class CApaResourceFileWriterBase : public CBase + { +protected: + class RBufferSink; + class MDataSink + { + public: + void WriteBufferL(const TDesC8& aBuffer); + void WriteCompressedUnicodeRunL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aTextAsCompressedUnicode); + void WriteInCompressedUnicodeFormatL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aData, TBool aInCompressedUnicodeRun); + TInt NumberOfBytesWhenUncompressed() const; + inline TBool CompressedUnicodeFormat() const {return (iBufferSinkForCompressedUnicodeFormat!=NULL);} + protected: + MDataSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat); + void FlushL(TBool aFinalFlush); + void Reset(TInt& aNumberOfBytesWhenUncompressed); + private: + void WriteRunLengthL(TInt aRunLength); + private: + enum + { + EFlag_InCompressedUnicodeRun =0x00000001 + }; + private: + // new virtual functions + virtual void DoWriteBufferL(const TDesC8& aBuffer)=0; + private: + TInt iNumberOfBytesWhenUncompressed; + TUint iFlags; + RBufferSink* iBufferSinkForCompressedUnicodeFormat; // does not own what it points to + }; + class RBufferSink : public MDataSink + { + public: + RBufferSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat); + void ConstructLC(); + void Close(); + void FlushAndGetAndResetL(TInt& aNumberOfBytesWhenUncompressed, RBuf8& aBuffer); + private: + // from MDataSink + virtual void DoWriteBufferL(const TDesC8& aBuffer); + private: + RBuf8 iBuffer; + }; +protected: + CApaResourceFileWriterBase(); + void DoGenerateFileContentsL(RBuf8& aBuffer, TUid aUid2, TUid aUid3) const; + void WriteUidTypeL(MDataSink& aDataSink, TUid aUid2, TUid aUid3) const; + void WriteTextL(MDataSink& aDataSink, const TDesC& aText) const; + void WriteText8L(MDataSink& aDataSink, const TDesC8& aText8) const; + void WriteUint8L(MDataSink& aDataSink, TUint aUint8) const; + void WriteLittleEndianUint16L(MDataSink& aDataSink, TUint aUint16) const; + void WriteLittleEndianUint32L(MDataSink& aDataSink, TUint aUint32) const; + void WriteBufferL(MDataSink& aDataSink, const TDesC8& aBuffer) const; +private: + static HBufC8* AsCompressedUnicodeLC(const TDesC& aUncompressedUnicode); + void MainResourceInCompiledFormatLC(TInt& aMainResourceSizeInBytesWhenUncompressed, RBuf8& aBuffer, TBool aCompressedUnicodeFormat) const; +private: + // new virtual functions + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const=0; + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const=0; + }; + +/** +Used to support the registration of non-native applications. + +The task of this class is to generate the resource files expected by the Apparc server. Applications +that register other applications can use functions of this class to customise the generated resource files. + +@publishedPartner +@released +*/ +class CApaRegistrationResourceFileWriter : public CApaResourceFileWriterBase + { +public: + IMPORT_C static CApaRegistrationResourceFileWriter* NewL(TUid aAppUid, const TDesC& aAppFile, TUint aAttributes); + IMPORT_C virtual ~CApaRegistrationResourceFileWriter(); + TUid AppUid() const; + void GenerateFileContentsL(RBuf8& aBuffer) const; + void SetLocalisableResourceFileL(const TDesC& aLocalisableResourceFile); + IMPORT_C void SetAppIsHiddenL(TBool aAppIsHidden); + IMPORT_C void SetEmbeddabilityL(TApaAppCapability::TEmbeddability aEmbeddability); + IMPORT_C void SetSupportsNewFileL(TBool aSupportsNewFile); + IMPORT_C void SetLaunchInBackgroundL(TBool aLaunchInBackground); + IMPORT_C void SetGroupNameL(const TDesC& aGroupName); + IMPORT_C void SetDefaultScreenNumberL(TInt aDefaultScreenNumber); + IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData); + IMPORT_C void AddDataTypeL(TInt aPriority, const TDesC8& aType); + IMPORT_C void AddFileOwnershipInfoL(const TDesC& aFileName); +// Not needing to be supported for the foreseeable future: +// IMPORT_C void AddServiceInfoL(TUid aServiceUid, const TDesC8* aOpaqueData); +// IMPORT_C void AddServiceInfoDataTypeL(TUid aServiceUid, TInt aPriority, const TDesC8& aType); +private: + struct SDataType // DATATYPE + { + TInt iPriority; + HBufC8* iType; + }; + struct SFileOwnershipInfo // FILE_OWNERSHIP_INFO + { + HBufC* iFileName; + }; +private: + CApaRegistrationResourceFileWriter(TUid aAppUid, TUint aAttributes); + void ConstructL(const TDesC& aAppFile); + void WriteDataTypeL(MDataSink& aDataSink, const SDataType& aDataType) const; + void WriteFileOwnershipInfoL(MDataSink& aDataSink, const SFileOwnershipInfo& aFileOwnershipInfo) const; + // from CApaResourceFileWriterBase + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const; + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const; +private: + TUid iAppUid; + HBufC* iAppFile; + TUint iAttributes; + HBufC* iLocalisableResourceFile; + TBool iAppIsHidden; + TApaAppCapability::TEmbeddability iEmbeddability; + TBool iSupportsNewFile; + TBool iLaunchInBackground; + HBufC* iGroupName; + TInt iDefaultScreenNumber; + HBufC8* iOpaqueData; + RArray iDataTypeList; + RArray iFileOwnershipList; + }; + +/** +@internalAll +*/ +class CApaLocalisableResourceFileWriter : public CApaResourceFileWriterBase + { +public: + IMPORT_C static CApaLocalisableResourceFileWriter* NewL(const TDesC& aShortCaption, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aGroupName); + IMPORT_C virtual ~CApaLocalisableResourceFileWriter(); + void GenerateFileContentsL(RBuf8& aBuffer) const; + void SetIconFileL(const TDesC& aIconFile); +// Not needing to be supported for the foreseeable future: +// IMPORT_C void AddViewDataL(TUid aViewUid, TInt aScreenMode, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aIconFile); +private: + struct SCaptionAndIconInfo // CAPTION_AND_ICON_INFO + { + HBufC* iCaption; + TInt iNumberOfIcons; + HBufC* iIconFile; + }; +private: + CApaLocalisableResourceFileWriter(TInt aNumberOfIcons); + void ConstructL(const TDesC& aShortCaption, const TDesC& aCaption, const TDesC& aGroupName); + void WriteCaptionAndIconInfoL(MDataSink& aDataSink, const SCaptionAndIconInfo& aCaptionAndIcon) const; + // from CApaResourceFileWriterBase + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const; + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const; +private: + HBufC* iShortCaption; + SCaptionAndIconInfo iCaptionAndIcon; + HBufC* iGroupName; + }; + +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + +class CApaAppInfoFileWriter; + +/** +@internalAll +*/ +const TUid KUidInterimFormatFileForJavaMIDletInstaller={0x10208182}; + +/** +@internalAll +*/ +class ForJavaMIDletInstaller + { +public: + IMPORT_C static void CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile); + IMPORT_C static void GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet); + IMPORT_C static CApaAppInfoFileWriter* NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet); + }; + +#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +#if (((defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)) || defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)) + +#if !defined(IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER) +// we're compiling a source file that doesn't define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER, so give it it's default "value" of "IMPORT_C" +#define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER IMPORT_C +#endif + +/** +@publishedAll +@deprecated +*/ +#ifdef _UNICODE +#define KUidAppInfoFile KUidAppInfoFile16 +#else +#define KUidAppInfoFile KUidAppInfoFile8 +#endif + +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppInfoFile8={268435562}; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppInfoFile16={0x10003A38}; + +/** +@internalComponent +*/ +const TUid KUidAppInfoFileVersion2={0x101fb032}; + +/** +@internalComponent +*/ +enum TAifVersion +// The order here is important, only ever APPEND to the list + { + EAifVersionOriginal, + EAifVersionAddsDataType, + EAifVersionAddsViewData, + EAifVersionAddsFileOwnershipInfo +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + ,EAifVersionAddsJavaMIDletInfo +#endif + }; + +class CApaAIFCaption : public CBase +// +// Represents a caption in an AIF during reading and writing of the file. +/** +@internalComponent +*/ + { +public: + ~CApaAIFCaption(); + CApaAIFCaption(); + void ConstructL(TLanguage aLanguage,const TDesC& aCaption); + static CApaAIFCaption* NewLC(TLanguage aLanguage,const TDesC& aCaption); + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TLanguage Language() const; + TApaAppCaption Caption() const; +public: + HBufC* iCaption; + TLanguage iLanguage; + }; + +class CApaAIFViewData : public CBase +// +// Represents the data associated with an application view described in an AIF +// during reading and writing of the file. +// implementation class +/** +@internalComponent +*/ + { +public: + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* IconByIndexL(TInt aIndex) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfIcons() const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid ViewUid() const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt ScreenMode() const; +public: + ~CApaAIFViewData(); + static CApaAIFViewData* NewLC(); + static CApaAIFViewData* NewLC(const CApaAIFViewData& aSourceData); + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + void SetScreenMode(TInt aScreenMode); + void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption); + void AddIconL(CApaMaskedBitmap& aIcon); + void AddIconIndexL(TInt aIndex); + void SetViewUid(TUid aUid); + void LoadIconsL(const TDesC& aFileName, TUint aMbmOffset); +private: + CApaAIFViewData(); + void ConstructL(); + void ConstructL(const CApaAIFViewData& aSourceData); +private: + TInt iScreenMode; + CArrayPtr* iIconArray; + CArrayPtr* iCaptionArray; + TUid iViewUid; + CArrayFixFlat* iIconIndexArray; // used for AIF version 2 format + }; + +class CApaAppInfoFile : public CBase +/** +@internalComponent +*/ + { +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + friend class ForJavaMIDletInstaller; +#endif +public: + ~CApaAppInfoFile(); + // +protected: + CApaAppInfoFile(RFs& aFs); + void ConstructL(); +protected: + + class TCaptionHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iCaption; + TLanguage iLanguage; + }; + class TIconHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iIcon; // Used for old AIF format Internalize + TInt iIconSideInPixels; + TSwizzle iIconMain; // Used for new AIF format + TSwizzle iIconMask; // Used for new AIF format + }; + class TDataTypeHeader + { + public: + // header info only + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iDataType; + TDataTypePriority iPriority; + }; + class TViewDataHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iViewData; + }; + class TFileOwnershipInfoHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iOwnedFileName; + }; +protected: + RFs& iFs; + CPersistentStore* iStore; + CArrayFix* iCaptionHeaderArray; + CArrayFix* iIconHeaderArray; + CArrayFix* iDataTypeHeaderArray; + CArrayFix* iViewDataHeaderArray; + CArrayFix* iFileOwnershipInfoHeaderArray; + TApaAppCapability iCapability; + }; + +class CApaAppInfoFileReader : public CApaAppInfoFile +/** Aif file reader. + +Aif files contain information about an application, including its icons and +captions. + +An application can get a reader for its own aif file by calling CEikApplication::OpenAppInfoFileLC(). + +@publishedAll +@deprecated */ + { +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + friend class ForJavaMIDletInstaller; +#endif +public: + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewL(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid); + // + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void Capability(TDes8& aInfo) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage); + + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapL(TInt aIconSideInPixels); // If there are no bitmaps in the file this method leaves with KErrNotFound + // Not available until ER6 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapByIndexLC(TInt aIndex); // If there are no bitmaps in the file this method leaves with KErrNotFound + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfBitmaps() const; + + // Not available till ER5 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void DataTypesSupportedL(CArrayFix& aTypeList) const; + // + + // Not available till ER6.1 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetViewsL(CArrayPtr& aViewList) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetOwnedFilesL(CDesCArray& aOwnedFilesList) const; + // + + // utility function + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels); + // + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER ~CApaAppInfoFileReader(); +public: + static void GetAifFileNameL(const TDesC& aFullName,TDes& aAifName); +private: + CApaAppInfoFileReader(RFs& aFs); + void InternalizeL(RReadStream& aStream); + void ConstructL(const TDesC& aFileName,TUid aUid); + void LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid); + void AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons); +private: + HBufC* iDefaultCaption; + TUint8* iRomPointer; + TInt iMbmOffset; + HBufC* iAifFileName; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + TUint32 iJavaMIDletInfo_AmsAuthId; + TInt iJavaMIDletInfo_MIDlet; +#endif + }; + +class CApaAppInfoFileWriter : public CApaAppInfoFile +/** +Aif file writer. + +This class writes application information, including icons and captions into the aif file. + +@publishedAll +@deprecated */ + { +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + friend class ForJavaMIDletInstaller; +#endif +public: + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileWriter* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid); + // + IMPORT_C TInt SetCapability(const TDesC8& aInfo); + IMPORT_C void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddIconL(const TDesC& aIconFileName); + IMPORT_C void AddIconL(CApaMaskedBitmap& aIcon); + + // Not available till ER5 + IMPORT_C void AddDataTypeL(const TDataTypeWithPriority& aTypePriority); + // + + // Not available till ER6.1 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid,TInt aScreenMode); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void StoreViewL(TUid aViewId); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddOwnedFileL(const TDesC& aOwnedFileName); + // + + IMPORT_C void StoreL(); + // + IMPORT_C ~CApaAppInfoFileWriter(); +private: + CApaAppInfoFileWriter(RFs& aFs); + void ExternalizeL(RWriteStream& aStream) const; + void ConstructL(const TDesC& aFileName,TUid aUid +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + ,TUid aMiddleUid=KUidAppInfoFile,TUint32 aJavaMIDletInfo_AmsAuthId=0,TInt aJavaMIDletInfo_MIDlet=0 +#endif + ); +private: + CStoreMap* iMap; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + TUint32 iJavaMIDletInfo_AmsAuthId; + TInt iJavaMIDletInfo_MIDlet; +#endif + }; + +class CApaAppCaptionFileReader : public CBase +/** +@internalComponent +*/ + { +public: + CApaAppCaptionFileReader(RFs& aFs,const TDesC& iAppFileName); + void GetCaptionsL(TApaAppCaption& aCaption,TApaAppCaption& aShortCaption); +private: + RFs& iFs; + TFileName iCaptionFileName; + }; + +class AppInfoFileUtils +// Internal utilities providing helper functions for non-ROM localisation +/** +@internalComponent +*/ + { +public: // For internal use only + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void GetAifFileName(const RFs& aFs,TDes& aAifName); +public: + static void GetAifFileNameL(const RFs& aFs,const TDesC& aFullName,TDes& aAifName); + }; +#endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1) + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGTASK.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGTASK.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,195 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGTASK_H__ +#define __APGTASK_H__ + +#include +#include + +class RWsSession; +struct TKeyEvent; + +/** @internalTechnology */ +static const TInt KApaSystemEventsWithPowerMgmtCapabilityStart = 100; +/** @internalTechnology */ +static const TInt KApaSystemEventsWithPowerMgmtCapabilityEnd = 199; + +/** Defines the event types that a TApaTask object can send to its window group. + +The events are sent by TApaTask::SendSystemEvent() and are handled by CEikAppUi::HandleSystemEventL(). + +@publishedAll +@released +@see TApaTask::SendSystemEvent() +@see CEikAppUi +@see CCoeAppUi::HandleSystemEventL() */ +enum TApaSystemEvent + { + /** The task is being closed. */ + EApaSystemEventShutdown=1, + /** Reserved for future use. */ + EApaSystemEventBackupStarting, + /** Reserved for future use. */ + EApaSystemEventBackupComplete, + /** The task is being brought to the foreground. */ + EApaSystemEventBroughtToForeground, + /** Close any tasks including system tasks. + Events in the range @c KApaSystemEventsWithPowerMgmtCapabilityStart to + @c KApaSystemEventsWithPowerMgmtCapabilityEnd requires capability PowerMgmt*/ + EApaSystemEventSecureShutdown = KApaSystemEventsWithPowerMgmtCapabilityStart + }; + +#ifdef _UNICODE +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchOpenFile KUidApaMessageSwitchOpenFile16 + +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchCreateFile KUidApaMessageSwitchCreateFile16 + +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchOpenFileValue KUidApaMessageSwitchOpenFileValue16 + +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchCreateFileValue KUidApaMessageSwitchCreateFileValue16 +#else +#define KUidApaMessageSwitchOpenFile KUidApaMessageSwitchOpenFile8 +#define KUidApaMessageSwitchCreateFile KUidApaMessageSwitchCreateFile8 +#define KUidApaMessageSwitchOpenFileValue KUidApaMessageSwitchOpenFileValue8 +#define KUidApaMessageSwitchCreateFileValue KUidApaMessageSwitchCreateFileValue8 +#endif + +/** +@internalComponent +*/ +const TInt KUidApaMessageSwitchOpenFileValue16=0x10003A39; + +/** +@internalComponent +*/ +const TUid KUidApaMessageSwitchOpenFile16={KUidApaMessageSwitchOpenFileValue16}; + +/** +@internalComponent +*/ +const TInt KUidApaMessageSwitchCreateFileValue16=0x10003A3A; + +/** +@internalComponent +*/ +const TUid KUidApaMessageSwitchCreateFile16={KUidApaMessageSwitchCreateFileValue16}; + +class TApaTask +/** Application task. + +A task is a running application. At any one time, for any given application, +there may be zero, one, or more tasks running on a device. + +A task is identified by its association with the running application's window +group. + +An instance of the TApaTaskList class is used to find and access specific +tasks. + +@publishedAll +@released +@see TApaTaskList +@see RWindowGroup +@see RWsSession */ + { +public: + + IMPORT_C TApaTask(RWsSession& aWsSession); + IMPORT_C void SetWgId(TInt aWgId); + IMPORT_C TInt WgId() const; + IMPORT_C TBool Exists() const; + IMPORT_C TThreadId ThreadId() const; + IMPORT_C void BringToForeground(); + IMPORT_C void SendToBackground(); + IMPORT_C void EndTask(); + IMPORT_C void KillTask(); + IMPORT_C void SendKey(TInt aKeyCode,TInt aModifiers); + IMPORT_C void SendKey(const TKeyEvent& aKey); + IMPORT_C void SendSystemEvent(TApaSystemEvent aEvent); + IMPORT_C TInt SwitchOpenFile(const TDesC& aFilename); + IMPORT_C TInt SwitchCreateFile(const TDesC& aFilename); + IMPORT_C TInt SendMessage(TUid aUid, const TDesC8& aParams); + +private: + TInt CheckSwitchFile() const; + void SendSystemEvent(TApaSystemEvent aEvent, TEventCode aType); +private: + RWsSession& iWsSession; + TInt iWgId; + TInt iTApaTask_Reserved1; + }; + +class TApaTaskList +/** Accesses tasks running on a device. + +Tasks can be identified by document, application specific UID or by caption +name. + +Users of this class can also cycle through a set of tasks running a specific +application, bringing each one, in turn, into the foreground. + +@publishedAll +@released +@see TApaTask */ + { +public: + /** Defines the direction in which tasks are cycled to the foreground. This is used + by the CycleTasks() function. + + @see TApaTaskList::CycleTasks() */ + enum TCycleDirection + { + /** Cycles the task list forwards, i.e. the foreground task is moved to background, + bringing the next foremost task to the foreground. */ + EForwards, + /** Cycles the list backwards, i.e. the task furthest from the foreground is brought + to the foreground, pushing what was the foremost task to the next ordinal + position. */ + EBackwards + }; +public: + IMPORT_C TApaTaskList(RWsSession& aWsSession); + IMPORT_C TApaTask FindApp(const TDesC& aAppName); + IMPORT_C TApaTask FindDoc(const TDesC& aDocName); + IMPORT_C TApaTask FindByPos(TInt aPos); + IMPORT_C TApaTask FindApp(TUid aAppUid); + IMPORT_C TInt CycleTasks(TUid aAppUid,TCycleDirection aDirection=EForwards); + +private: + void FindByPosL(TApaTask& aTask,TInt aPos); +private: + RWsSession& iWsSession; + TInt iTApaTaskList_Reserved1; + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APGWGNAM.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APGWGNAM.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,106 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGWGNAM_H__) +#define __APGWGNAM_H__ + +#if !defined(__W32STD_H__) +#include +#endif + +class CApaWindowGroupName : public CBase +/** Gives access to the name of a window group and the information encoded by that +name. + +A window group is associated with a task, i.e. a running application. The +window group's name encodes four pieces of information for that task: + +the name of the document that the task is handling, + +the task's caption, + +the application specific UID, as eight hexadecimal characters, + +status information for the task, as two hexadecimal characters. + +@publishedAll +@released */ + { +public: + enum { EMaxLength=13+2*KMaxFileName }; +public: + IMPORT_C ~CApaWindowGroupName(); + IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession); + IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession); + IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, TInt aWgId); + IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, TInt aWgId); + IMPORT_C static CApaWindowGroupName* New(const RWsSession& aWsSession, HBufC* aWgName); + IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, const TDesC& aWgName); + IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, const TDesC& aWgName); + IMPORT_C void ConstructFromWgIdL(TInt aWgId); + // + IMPORT_C void SetWindowGroupNameL(const TDesC& aWgName); + IMPORT_C void SetWindowGroupName(HBufC* aWgName); + // + IMPORT_C static void FindByAppUid(TUid aAppUid, RWsSession& aWsSession, TInt& aPrevWgId); + IMPORT_C static void FindByCaption(const TDesC& aCaption, RWsSession& aWsSession, TInt& aPrevWgId); + IMPORT_C static void FindByDocName(const TDesC& aDocName, RWsSession& aWsSession, TInt& aPrevWgId); + // + IMPORT_C void SetBusy(TBool aBusy); + IMPORT_C TBool IsBusy() const; + IMPORT_C void SetSystem(TBool aSystem); + IMPORT_C TBool IsSystem() const; + IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile); + IMPORT_C TBool DocNameIsAFile() const; + IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent); + IMPORT_C TBool RespondsToShutdownEvent() const; + IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent); + IMPORT_C TBool RespondsToSwitchFilesEvent() const; + IMPORT_C void SetHidden(TBool aIsHidden); + IMPORT_C TBool Hidden() const; + IMPORT_C void SetAppReady(TBool aIsReady); + IMPORT_C TBool IsAppReady() const; + // + IMPORT_C void SetAppUid(TUid aAppUid); + IMPORT_C TUid AppUid() const; + // + IMPORT_C void SetCaptionL(const TDesC& aCaption); + IMPORT_C TPtrC Caption() const; + // + IMPORT_C void SetDocNameL(const TDesC& aDocName); + IMPORT_C TPtrC DocName() const; + // + IMPORT_C TInt SetWindowGroupName(RWindowGroup& aGroupWin) const; + IMPORT_C TPtrC WindowGroupName() const; +private: //enums + enum TApaStatus { ESystem =0x01, EBusy =0x02, EDocNameNotAFile =0x04 + ,EDoesNotRespondToShutdownEvent=0x08, EDoesNotRespondToSwitchFilesEvent=0x10 + ,EIsHidden=0x20, EAppReady=0x40 }; + enum TApaDelimiter { EEndStatus=1, EEndUid, EEndCaption, ELast=EEndCaption }; // ELast must be last and same as predecessor +private: + CApaWindowGroupName(const RWsSession& aWsSession); + // + void DefaultConstructL(); + void WriteStatusToName(); + void GetStatusFromName(); + TInt FindDelimiter(TApaDelimiter aDelim) const; + void ReAllocIfNecessaryL(TInt aExtraLengthReqd); +private: + HBufC* iBuf; + TUint iStatus; + const RWsSession& iWsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APPARC.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APPARC.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,608 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APPARC_H__ +#define __APPARC_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__APADEF_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif + +// classes defined: +class CApaApplication; +class CApaDocument; +class CApaProcess; +class MApaEmbeddedDocObserver; +// +// classes referenced: +class CApaDll; +class CApaExe; +class RFile; +class RReadStream; +class RWriteStream; +class CFileStore; +class CPersistentStore; +class CStreamDictionary; +class CDictionaryStore; +class TApaAppHolderInfo; +class CImplementationInformation; +class TApaApplicationFactory; +class CApaAppHolder; +class CApaAppServer; + +/** Creates an application interface object. + +Provides the basic roles of an application class as a factory that +creates concrete document objects, and supplies utility functions +not specific to any particular instance of a document. + +@publishedAll +@released +*/ +typedef CApaApplication* (*CreateCApaApplication)(); + + +// CApaApplication + +class CApaApplication : public CBase +// base class for applications; allows creation of documents & file stores + display of app icon and name. +/** Defines the basic behaviour for applications. + +The class defines the basic twin roles of an application class as a factory +that creates concrete document objects, and as a supplier of utility functions +not specific to any particular instance of a document. For example, returning +an application's caption, or accessing its .ini file. + +The class is derived from by the UI framework and is further derived from +by the UI application. + +@publishedAll +@released +@see CEikApplication */ + { +public: + /** Completes construction of this application object. + + The function is called after an instance of a derived class has been successfully + created using the ordinal 1 function of the application DLL. + + After calling this function, an application can create document objects. + + An implementation of this function is supplied by the UI framework. + + @see CEikApplication */ + virtual void PreDocConstructL()=0; // call once before creating document + + /** Creates a document object. + + The function is called by the application process when a new document is required. + The application process adds the new document to its list of documents. + + An implementation of this function is supplied by the UI framework. + + @param aProcess A pointer to the process associated with the application. + @return A pointer to the newly created document. + @see CApaProcess::AddNewDocumentL() */ + virtual CApaDocument* CreateDocumentL(CApaProcess* aProcess)=0; + + /** Gets the application specific UID. + + The UID is used to differentiate between UI applications. + + An implementation of this function must be supplied by the UI application. + + @return The application specific UID. */ + virtual TUid AppDllUid()const=0; + + // + // utility functions + IMPORT_C static TInt GenerateFileName(RFs& aFs,TFileName& aRootName); + IMPORT_C CDictionaryStore* OpenIniFileL(RFs& aFs)const; + + /** Opens the .ini file associated with the application, constructs the dictionary + store object, returns a pointer to it and puts the pointer onto the cleanupstack. + + The .ini file must be created, if it does not already exist. + + An implementation of this function is supplied by the UI framework. + + @param aFs Handle to a file server session + @return A pointer to the dictionary store object that represents the application's + .ini file. + @see CEikApplication */ + virtual CDictionaryStore* OpenIniFileLC(RFs& aFs)const=0; + // + // enquiry functions + IMPORT_C virtual TFileName AppFullName()const; // returns the full path and name of the app + /** Returns the capabilities of the application. + + Application capability information is represented by an instance of a TApaAppCapability + object wrapped in a packaged modifiable buffer descriptor. + + The function is called from a number of places within the application framework. + + An implementation of this function is supplied by the UI framework. + + @param aInfo A packaged modifiable buffer descriptor (a TPckgBuf), encapsulating + a TApaAppCapability object. + @see CEikApplication + @see TApaAppCapability + @see TPckgBuf */ + virtual void Capability(TDes8& aInfo)const=0; + // + // accessor function + IMPORT_C TFileName DllName()const; + + IMPORT_C ~CApaApplication(); + + // formerly a reserved virtual, Reserved_1() + IMPORT_C virtual void NewAppServerL(CApaAppServer*& aAppServer); +protected: + IMPORT_C CApaApplication(); + + IMPORT_C virtual void CApaApplication_Reserved1(); + IMPORT_C virtual void CApaApplication_Reserved2(); + +private: + CApaAppHolder* iAppHolder; // the CApaAppHolder that owns me + TUid iDtorKey; // TInt iSpare; + friend class CApaAppHolder; + friend class CApaProcess; + friend class TApaApplicationFactory; // so that it can access iDtorKey + +private: + TInt iCApaApplication_Reserved1; + }; + +class CApaDocument : public CBase +// base class for documents; allows insertion of glass doors. +/** Defines basic behaviour for documents. + +This is the base class for all documents. A document contains the data associated +with the application's content. + +The class is derived from by the UI framework and is further derived from +by the UI application. + +@publishedAll +@released +@see CEikDocument */ + { +public: + class TCapability + /** CApaDocument capabilities.*/ + { + public: + IMPORT_C TCapability(); + // + inline TBool CanDrawGlass()const; + inline TBool CanPrint()const; + inline void SetCanDrawGlass(); + inline void SetCanPrint(); + // + private: + enum { + ECanDrawGlass =0x01, + ECanPrint =0x02 + }; + private: + TUint iCapability; + TInt TCapability_Reserved1; + }; + // +public: + // document instantiation functions + /** Initialises a new, empty, document with a default setup. + + This can be the main document or an embedded document. The function is called + by the UI framework when it creates a default document file. + + An implementation of this function must be supplied by the UI application. + + If initialisation fails, the document must be left in the same state as it + was before the function was called. */ + virtual void NewDocumentL()=0; // builds a new embedded or main document without loading from a store (may create the content from eg code or a template file). + + /** Creates and fully initialises a new filestore and stores the document into it, + replacing any existing file of the same name. + + The function should put the pointer to the filestore object onto the cleanup + stack. + + An implementation of this function is supplied by the UI framework. + + @param aFs Handle to a file server session. + @param aFileName The full path name of the file to be created. + @return A pointer to the newly constructed file store. + @see CEikDocument */ + virtual CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName)=0; // creates a file for a document and stores itself to that store (store should be put on cleanup stack). + // + // interaction functions + IMPORT_C virtual CPicture* GlassPictureL(); // Does nothing by default, override to return handle to glass picture. + + /** Starts an editing session on an embedded document. + + The function should cause the application's UI to be created and the document + to be fully restored for editing. + + An implementation of this function is supplied by the UI framework. + + @param aContainer This document's observer. + @param aReadOnly True, the document should be opened in read-only mode and + should not persist any changes made to the content. False, the document can + be opened in read/write mode; this is the default. + @see CEikDocument */ + virtual void EditL(MApaEmbeddedDocObserver* aContainer,TBool aReadOnly=EFalse)=0; // Edit the document in the context of the container's environment. If aContainer is null, edit as the main document + + /** Prints the document without a need for it to be open for editing. + + Typically, this is called from a shell or a file manager type application + that wants to print the document without opening it fully. + + An empty implementation of this function is supplied by the UI framework. + + The UI application can provide its own implementation. + + @param aSourceStore A reference to the store containing the document. + @see CEikDocument */ + virtual void PrintL(const CStreamStore& aSourceStore)=0; // default print parameters, assume print context supplied by environment + // + // persistence functions + + /** Stores the document to the current file, commits the changes, and marks the + document status as unchanged. + + Typically, the function is called by the application when it implements a + "Save" type menu option in its User Interface. + + An implementation of this function is supplied by the UI framework. This is + adequate for direct file store applications. Applications using a permanent + file store model, need to provide their own implementation. + + If the function leaves, an implementation should ensure that any changes made + to the file are rolled back, leaving the file in the state it was in before + the function was called. + + @see CEikDocument */ + virtual void SaveL()=0; // save the doc to the file in the custody of iAppProcess. This fn should be called by any "Save" menu option. store->Commit() should be called within it. + /** Stores the document's content and state to the specified store, recording the + identity of any headstreams created in the specified stream dictionary. + + The store must be fully constructed before this function is called. + + An empty implementation of this function is supplied by the UI framework. + UI applications that need to persist any data must provide their own implementation. + + If the function leaves, an implementation should ensure that the store and + the stream dictionary are returned to the state they were in before the function + was called. + + @param aStore The store into which document data is to be stored. + @param aStreamDic The stream dictionary into which stream IDs and associated + UIDs are to be recorded. + @see CEikDocument */ + virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const=0; // store to aStore, lodging the headstream in aStreamDic + + /** Restores the document's content and state from data persisted in the specified + store. + + An empty implementation of this function is supplied by the UI framework. + UI applications that need to restore data must provide their own implementation. + + If the function leaves, an implementation should ensure that the store and + the stream dictionary are returned to the state they were in before the function + was called. + + @param aStore The store from which document data is to be restored. + @param aStreamDic The stream dictionary containing stream IDs and associated + UIDs. + @see CEikDocument */ + virtual void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic)=0; // restore from aStore using aStreamDic + + /** Restores the document to the extent that it does not need the store + further. + + A document only keeps a pointer to a store if it implements deferred + loading. This also tells the document that any store pointer that it + might have is just about to become invalid. + + An empty implementation of this function is supplied by the UI framework. + UI applications that support deferred loading or embedding should provide an + implementation. + + If a document supports embedding, then it should + propagate the DetachFromStoreL() call on to all embedded objects that + it contains. + + If the function leaves, the operation should be aborted + because the document has not successfully detached from the store. + Continuing with the operation may leave the document in an unsafe + state or cause user data to be lost. + + @param aDegree The degree of detachment required. */ + virtual void DetachFromStoreL(CPicture::TDetach /*aDegree*/=CPicture::EDetachFull) {} // supply an implementation if you support deferred loading or embedding + + IMPORT_C virtual void ExternalizeL(RWriteStream& aStream)const; + // + // enquiry functions + + /** Tests whether the document is empty. + + The UI framework provides a default implementation which always returns a + true value. + + The UI application can provide its own implementation. Typically, any application + that has editable content should supply an implementation that acts according + to the state of that content. Applications without associated document data + need not supply an implementation. + + @return True if the document is empty, false otherwise. + @see CEikDocument */ + virtual TBool IsEmpty()const=0; // return ETrue if the document is empty + IMPORT_C virtual void ValidatePasswordL()const; // return EFalse if there *is* a password *and* the user doesn't get it right, ETrue otherwise (ie they get it right or there isn't one). Returns ETrue by default + + IMPORT_C virtual TCapability Capability()const; // returns "cant do anything" by default + inline CApaApplication* Application()const; + inline CApaProcess* Process()const; + + /** Tests whether the document has changed since it was last persisted. + + An implementation of this function is supplied by the UI framework and need + not be changed by the UI application. + + @return True, if the document has changed since the last time that it was + persisted, false, otherwise. + @see CEikDocument */ + virtual TBool HasChanged()const =0; + // + IMPORT_C virtual ~CApaDocument(); +protected: + IMPORT_C CApaDocument(); + IMPORT_C CApaDocument(CApaApplication& aApp,CApaProcess& aProcess); +private: + IMPORT_C virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile); // was previously Reserved_1 + // Reserved virtual functions... + IMPORT_C virtual void Reserved_2(); +protected: + MApaEmbeddedDocObserver* iContainer; // null unless this is an embedded object currently being edited +private: + CApaApplication* iApplication; // the doc's associated application + CApaProcess* iApaProcess; + TInt iSpare; + }; + + + +class TApaApplicationFactory +/** Encapsulates the functionality of creating an application, whether it be via a factory function +or an ECOM plugin. Instances of this class can usually be created implicitly when required as +function parameters - just specify the function pointer, ECOM plugin UID or CImplementationInformation +reference. + +@publishedAll +@released +@see CApaProcess +@see EikStart */ + { +public: + typedef CApaApplication* (*TFunction)(); +public: + IMPORT_C TApaApplicationFactory(); + IMPORT_C TApaApplicationFactory(TFunction aFunction); + IMPORT_C TApaApplicationFactory(const CImplementationInformation& aEmbeddedApplicationInformation); + IMPORT_C TApaApplicationFactory(TUid aEmbeddedApplicationUid); + CApaApplication* CreateApplicationL() const; + HBufC* AppFileNameL() const; + TUid AppFileUid() const; +private: + enum TType + { + ETypeFunction, // if iType is this, iData is a TFunction + ETypeEmbeddedApplicationInformation, // if iType is this, iData is an ECOM CImplementationInformation + ETypeEmbeddedApplicationUid // if iType is this, iData is an ECOM implementation TUid + }; +private: + static CApaApplication* CreateEmbeddedApplicationL(TUid aUid); + static HBufC* EmbeddedApplicationDisplayNameLC(TUid aUid); + static HBufC* FullAppFileNameL(const TDesC& aAppName); + static void CleanupImplementationArray(TAny* aImplementationArray); +private: + TType iType; + TUint iData; + mutable CApaApplication* iApplication; // used to be iSpare1 + TInt iSpare2; + }; + +class CApaParentProcessMonitor; + +class CApaProcess : public CBase +/** Maintains a list of documents and all of the potentially shared resources used +by documents. + +This includes the application DLLs. The class also supplies utility functions +that provide the basic structure for persisted document files. + +The class deals with the loading of application DLLs and manages the creation +and destruction of application (CApaApplication) objects and document (CApaDocument) +objects. + +The class is derived from by the UI framework and further derivation by the +UI application is not necessary unless it needs to add extra utility functions +for the use of applications. + +@publishedAll +@released +@see CApaApplication +@see CApaDocument */ + { +public: + IMPORT_C static CApaProcess* NewL(const RFs& aFs); + IMPORT_C void ResetL(); + // + // static utility functions + IMPORT_C static CStreamDictionary* ReadRootStreamLC(RFs& aFs,CFileStore*& aStore,const TDesC& aDocFullFileName,TUint aFileMode); // opens aDocFileName as aStore and returns the stream dictionary contained in its root stream on the cleanup stack + IMPORT_C static CStreamDictionary* ReadRootStreamLC(CFileStore*& aStore, const RFile& aFile); + IMPORT_C static void WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const CApaApplication& aApp); + IMPORT_C static void WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId); + IMPORT_C static TApaAppIdentifier ReadAppIdentifierL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic); + IMPORT_C static void WriteAppIdentifierL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId); + // + // document management + IMPORT_C CApaDocument* AddNewDocumentL(TApaApplicationFactory aApplicationFactory); + IMPORT_C CApaDocument* OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode); // Open a file and restore the contained document + IMPORT_C void DestroyDocument(CApaDocument* aDoc); // Removes a doc (identified by the object) from the list and destroys it. Also removes the app and closes the AppDll if appropriate. + // + // setter functions + IMPORT_C void SetMainDocument(CApaDocument* aDocument); + IMPORT_C void SetMainDocFileName(const TDesC& aMainDocFileName); // panics if the descriptor is too long + IMPORT_C void SetMainDocFileNameL(const TDesC& aMainDocFileName); + // + // accessor functions + IMPORT_C TPtrC MainDocFileName()const; + inline RFs& FsSession()const; + inline CApaDocument* MainDocument()const; + // + IMPORT_C ~CApaProcess(); +protected: + IMPORT_C CApaProcess(); + IMPORT_C CApaProcess(const RFs& aFs); + IMPORT_C void ConstructL(); + IMPORT_C void ConstructL(TProcessId aParentProcessId); + + IMPORT_C virtual void CApaProcess_Reserved1(); + IMPORT_C virtual void CApaProcess_Reserved2(); +public: + static TInt IdleRemoveApplications(TAny* aThis); + void RemoveMarkedApplications(); +private: + CApaDll* AddAppDllL(const TDesC& aDllFullPath); + CApaExe* AddAppExeL(TApaApplicationFactory aApplicationFactory); + void RemoveApp(CApaAppHolder* aAppHolder); + CApaDocument* CreateDocL(CApaApplication* aApp); + CApaAppHolder* FindAppInListL(const TDesC& aAppFileName,TUid aUid)const; // returns NULL if not in list + void DeleteAllDocs(); + void MarkApplicationForRemoval(const CApaApplication* aApp); + static void DoReadRootStreamL(CStreamDictionary& aStreamDictionary, const CFileStore& aStore); +private: + CArrayFixFlat* iAppList; // array of apps in use + CArrayFixFlat* iDocList; // array of documents (1 main + n embedded) + CApaDocument* iMainDoc; + HBufC* iMainDocFileName; + RFs iFsSession; // file server session for doc store + CIdle* iApplicationRemover; + CApaParentProcessMonitor* iMonitor; + TInt iCApaProcess_Reserved1; + }; + + +class MApaEmbeddedDocObserver +/** An interface class for handling the completion of the editing of an embedded +document. + +@publishedAll +@released +@see CApaDocument::EditL() */ + { +public: + /** Defines the state of the embedded document on completion of editing. */ + enum TExitMode { + /** Changes to the embedded document must be saved. */ + EKeepChanges, + /** Reverts back to the saved version of the embedded document, i.e. reloads the + whole document. */ + ERevertToSaved, + /** No changes have been made to the embedded document. */ + ENoChanges, + /** The embedded document is empty. */ + EEmpty + }; +public: + /** Implements the required behaviour when the editing of an embedded document completes. + + @param aMode Indicates the state of the document. */ + virtual void NotifyExit(TExitMode aMode)=0; // called on completion of editing of an embedded document +protected: + IMPORT_C MApaEmbeddedDocObserver(); +private: + IMPORT_C virtual void MApaEmbeddedDocObserver_Reserved1(); + IMPORT_C virtual void MApaEmbeddedDocObserver_Reserved2(); +private: + TInt iMApaEmbeddedDocObserver_Reserved1; + }; + + +//// inlines //// +inline CApaApplication* CApaDocument::Application()const +/** Returns a pointer to the application that created the document. + +@return A pointer to the document's associated application. */ + { return iApplication; } + +inline CApaProcess* CApaDocument::Process()const +/** Returns a pointer to the application process associated with this document. + +@return A pointer to the application process associated with this document. */ + { return iApaProcess; } + +inline TBool CApaDocument::TCapability::CanDrawGlass()const +/** Tests whether the document supports being embedded as a glass door. + +@return True if embedding as a glass door is supported; false otherwise. */ + { return iCapability&ECanDrawGlass; } + +inline TBool CApaDocument::TCapability::CanPrint()const +/** Tests whether the document supports being printed without using the full application +UI. + +@return True, if printing is supported; false, otherwise. */ + { return iCapability&ECanPrint; } + +inline void CApaDocument::TCapability::SetCanDrawGlass() +/** Sets the document as being capable of being embedded as a glass door. */ + { iCapability = iCapability|ECanDrawGlass; } + +inline void CApaDocument::TCapability::SetCanPrint() +/** Sets the document as being capable of being printed without using the full application +UI. */ + { iCapability = iCapability|ECanPrint; } + +inline RFs& CApaProcess::FsSession()const +/** Returns a handle to the file server session used by this application process. + +@return The file server session. */ + { return (RFs&)iFsSession; } //lint !e1536 Exposing low access member - Kept for backward BC + +inline CApaDocument* CApaProcess::MainDocument()const +/** Returns a pointer to the main document. + +@return A pointer to the main document. */ + { return iMainDoc; } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APRuleBased.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APRuleBased.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,66 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// @file +// +// + +#if !defined(__APRULEBASED_H__) +#define __APRULEBASED_H__ + +#if !defined(__APADEF_H__) +#include +#endif + +#if !defined(__F32FILE_H__) +#include +#endif + +/** +@publishedPartner +@released +Uid for access to all implementations of rule-based interface +*/ +const TUid KUidRuleBasedInterfaceUid = { 0x1020d466 }; + +class CApaRuleBasedDll; +class CAppLaunchChecker; + +class CApaRuleBasedDll; +/** +@publishedPartner +@released +Rule-based framework. +Loads all rule-based plug-ins available in the system and interrogates them +whether or not an activated application should be launched +*/ +class CApaScanningRuleBasedPlugIns : public CBase + { +public: + IMPORT_C static CApaScanningRuleBasedPlugIns* NewL(); + IMPORT_C ~CApaScanningRuleBasedPlugIns(); + IMPORT_C CAppLaunchChecker* operator[](TInt aIndex) const; + IMPORT_C void ScanForRuleBasedPlugInsL(); + IMPORT_C TInt ImplementationCount() const; +private: + CApaScanningRuleBasedPlugIns() + { + } + void LoadEcomRuleBasedPlugInL(TUid aUid); + HBufC* ImplementationDisplayNameL(TUid aImplUID) const; + TInt RemovePlugIn(CApaRuleBasedDll* aDll); +private: + RPointerArray iRuleBasedLib; //all rule-based plug-ins available in the system + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APSSCAN.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APSSCAN.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,114 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// AppArc recognizer and application scanning +// +// + +#if !defined(__APSSCAN_H__) +#define __APSSCAN_H__ + +#if !defined(__F32FILE_H__) +#include +#endif + +class MApaFsChangeObserver +/** An interface for notifying a file system observer when +a change has been made to the file system. +This interface is intended for use only by CApaFsMonitor. + +@internalComponent +*/ + { +public: + virtual void FsChanged()=0; + }; + +class CApaFsMonitor : public CBase, MApaFsChangeObserver +/** Monitors changes in the file system. + +If a change is detected, the callback function supplied by the user of the class +is called after a 0.25 second delay. If there are further changes, the callback +is not called again until 3 seconds have elapsed. It uses RFs::NotifyChange() +to request notifications. + +@see RFs::NotifyChange() + +@publishedPartner +@released */ + { +public: + IMPORT_C ~CApaFsMonitor(); + IMPORT_C static CApaFsMonitor* NewL(RFs& aFs, const TDesC& aLocation, TCallBack aCallBack); + IMPORT_C void SetBlocked(TBool aIsBlocked); + IMPORT_C void Start(TNotifyType aNotifyType); + IMPORT_C TNotifyType NotifyType() const; + IMPORT_C void AddLocationL(const TDesC& aLocation); + IMPORT_C void Cancel(); + TBool AnyNotificationImpending() const; +private: + + CApaFsMonitor(RFs& aFs, TCallBack aCallBack); + static TInt TimerCallBack(TAny* aObject); + void DoStart(); + + // from MApaFsChangeObserver + void FsChanged(); + class CApaFsNotifier; +private: + RFs& iFs; + TNotifyType iNotifyType; + TCallBack iCallBack; + CPeriodic* iFsTimer; + TBool iFsHasChanged; + TBool iIsBlocked; + RPointerArray iNotifiers; + }; + +#if !defined(__WINC__) +class REComSession; +/** +CApaEComMonitor + +A low priority (EPriorityIdle) active object which monitors changes +in the Ecom plugin. + +@see REComSession::NotifyOnChange() + +@internalAll +*/ + +class CApaEComMonitor : public CActive + { +public: + ~CApaEComMonitor(); + static CApaEComMonitor* NewL(TCallBack aCallBack); + void Start(); +private: + CApaEComMonitor(TCallBack aCallBack); + void ConstructL (); + static TInt TimerCallBack(TAny* aObject); + void DoStart(); + void DoCancel(); + void RunL(); +private: + TCallBack iCallBack; + CPeriodic* iEComTimer; + REComSession* iEComSession; + TBool iEComHasChanged; + }; + +#endif + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/APSSERV.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/APSSERV.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,282 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APSSERV_H__) +#define __APSSERV_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif +#if !defined(__APMFNDR_H__) +#include +#endif +#if !defined(__APRULEBASED_H__) +#include +#endif +#if !defined(__W32STD_H__) +#include +#endif + + +#include + +// classes defined +class CApaAppListServer; +class CCustomAppInfoData; +// +// classes referenced +class CApaCommandLine; +class CApaAppList; +class CApaAppData; +class CApaFileRecognizer; +class CApaAppRegFinder; +class CApaScanningFileRecognizer; +class CApaFsMonitor; +class CTypeStoreManager; +class MApaAppStarter; +class CApaEComMonitor; +class CBaBackupSessionWrapper; +class CApsRecognitionCache; +class CRecognitionResult; +class CApaAppUnInstallMonitor; +class CApaIconCaptionOverrides; +class CApaIconCaptionCenrepObserver; +// + +// server name + +/** +KAppListServerName +@internalAll +*/ +_LIT(KAppListServerName,"!AppListServer"); + +class CApaAppListServer : public CPolicyServer, public MApaAppListObserver, public MBackupOperationObserver +/** +CApaAppListServer +@internalAll +*/ + { +public: + inline static CApaAppListServer* NewL(MApaAppStarter& aAppStarter) {return NewL(&aAppStarter);} + IMPORT_C static CApaAppListServer* NewL(MApaAppStarter* aAppStarter); + IMPORT_C static CApaAppListServer* Self(); + inline CApaAppList& AppList(); + CApaFileRecognizer* FileRecognizer(); + inline CApaDataRecognizer* DataRecognizer(); + inline CApaCommandLine* AppCmdLine(); + inline void SetAppCmdLine(CApaCommandLine* aAppCmdLine); + inline CApaScanningRuleBasedPlugIns* RuleBasedPlugIns(); + inline RWsSession& WsSession(); + void RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable); + void DeregisterNonNativeApplicationTypeL(TUid aApplicationType); + TPtrC NativeExecutableL(TUid aNonNativeApplicationType) const; + inline const CApaFsMonitor& AppFsMonitor() const {return *iAppFsMonitor;} + void UpdateApps(); + IMPORT_C TCallBack RescanCallBack(); + CRecognitionResult* RecognizeDataAsCRecognitionResultL(RFile& aFile, TInt aPreferredBufSize); + TDataRecognitionResult RecognizeDataL(const TDesC& aName, const TDesC8& aBuffer); + TDataRecognitionResult RecognizeDataL(RFile& aFile, TInt aPreferredBufSize); + TBool RecognizeDataL(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType); + TBool RecognizeDataL(RFile& aFile, TInt aPreferredBufSize, const TDataType& aDataType); + TInt DataRecognizerPreferredBufSizeL(); + void DataTypeL(CDataTypeArray& aArray); + + + void GetAppByDataType(const TDataType& aDataType, TUid& aUid) const; + void GetAppByDataType(const TDataType& aDataType, TUid aServiceUid, TUid& aUid) const; + TBool InsertAndStoreIfHigherL(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + void InsertAndStoreDataMappingL(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TUid aServiceUid); + void DeleteAndStoreDataMappingL(const TDataType& aDataType, TUid aServiceUid); + + IMPORT_C void HandleStartUninstallEvent(); + IMPORT_C void HandleEndUninstallEventL(); +#ifdef _DEBUG + void FlushRecognitionCache(); + void SetLoadRecognizersOnDemandL(TBool aLoadRecognizersOnDemand); + void PerformOutstandingRecognizerUnloading(); +#endif //_DEBUG +public: // from MApaAppListObserver + void NotifyUpdate(TInt aReason); + void InitialListPopulationComplete(); + // from MBackupOperationObserver + void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes); + // + IMPORT_C ~CApaAppListServer(); + TBool NonNativeRecovery() const; + void SetNonNativeRecovery(TBool aValue); + void AddCustomAppInfoInListL(CCustomAppInfoData* aCustomAppInfo); + TBool LoadMbmIconsOnDemand() const; + void UpdateAppListByShortCaptionL(); +private: + CApaAppListServer(TInt aPriority); + void ConstructL(MApaAppStarter* aAppStarter); + virtual CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const; + static TInt AppFsNotifyWithForcedRegistrationsResetCallBack(TAny* aPtr); + static TInt AppFsNotifyCallBack(TAny* aPtr); + static TInt PlugInNotifyCallBack(TAny* aPtr); + static TInt TypeStoreNotifyCallback(TAny* aPtr); + void UpdatePlugIns(); + void UpdateTypeStore(); + void DoUpdateTypeStoreL(); + void InternalizeNonNativeApplicationTypeArrayL(); + void ExternalizeNonNativeApplicationTypeArrayL(TInt aIndexToIgnore=-1) const; + static void DeleteLastNonNativeApplicationType(TAny* aThis); + void NotifyScanComplete(); + void DeleteCustomAppInfoList(); + void UpdateAppListByIconCaptionOverridesL(); + void LoadRecognizersLC(); + void LoadRecognizersL(); + static void RecognizerCleanup(TAny* aAny); + TInt UnloadRecognizers(); + static TInt DoUnloadRecognizersCallback(TAny* aAny); + TInt DoUnloadRecognizers(); + TBool CachedRecognitionResult(const TParseBase& aParser, TDataRecognitionResult& aResult) const; + CRecognitionResult* CachedRecognitionResult(const RFile& aFile, const TParseBase& aParser) const; + void CacheRecognitionResultL(const TParseBase& aParser, const TDataRecognitionResult& aResult); + void CacheRecognitionResultL(const RFile& aFile, const TParseBase& aParser, const TDataRecognitionResult& aResult); + void ConstructPathsToMonitorL(); +private: + enum + { + EOwnsFileRecognizer=0x01, + EOwnsAppList=0x02 + }; + struct SNonNativeApplicationType + { + TUid iTypeUid; + HBufC* iNativeExecutable; + }; +private: + RFs iFs; + TInt iRecognizerUsageCount; + CApaAppList* iAppList; + CApaScanningFileRecognizer* iScanningFileRecognizer; + CPeriodic* iRecognizerUnloadTimer; + CApaScanningDataRecognizer* iDataRecognizer; + CApaFsMonitor* iAppFsMonitor; + CApaFsMonitor* iTypeStoreMonitor; + CTypeStoreManager* iTypeStoreManager; + TTime iTypeStoreModified; + CBaBackupSessionWrapper* iBaBackupSessionWrapper; + CApaEComMonitor* iRecEcomMonitor; + CApaCommandLine* iAppCmdLine; + CApsRecognitionCache* iRecognitionCache; + CApaScanningRuleBasedPlugIns* iRuleBasedPlugIns; + RWsSession iWsSession; + RArray iNonNativeApplicationTypeArray; + /** + This is ETrue if there was a power failure during the non-native applications list + update. It means that there is a list fo updated apps that needs to be rolled back. + */ + TBool iNonNativeRecovery; + RPointerArray iCustomAppList; + TBool iLoadRecognizersOnDemand; + CApaAppUnInstallMonitor* iAppUnInstallMonitor; + TBool iLoadMbmIconsOnDemand; + RBuf iNonNativeApplicationTypeRegistry; + CApaIconCaptionOverrides* iIconCaptionOverrides; + CApaIconCaptionCenrepObserver* iIconCaptionObserver; + }; + +/** +The CCustomAppInfoData class encapsulate the attributes of customised application information +which will be used to modify short caption dynamically. + +@internalComponent +*/ +class CCustomAppInfoData: public CBase + { +public: + static CCustomAppInfoData* NewL(TUid aAppUid, TLanguage aLanguage, const TDesC& aShortCaption); + ~CCustomAppInfoData(); + inline TUid Uid() const; + inline TLanguage Language() const; + inline HBufC* ShortCaption() const; +private: + CCustomAppInfoData(TUid aAppUid, TLanguage aLanguage); + void ConstructL(const TDesC& aShortCaption); +private: + TUid iUid; + TLanguage iLanguage; + HBufC* iShortCaption; + }; + +class TApaAppViewIconSizeData +/** +The TApaAppViewIconSizeData class encapsulates the attributes that specify how to identify an icon for a particular +application and view in a certain size. + +@internalComponent +*/ + { +public: + inline TApaAppViewIconSizeData(); + inline TApaAppViewIconSizeData(TUid aAppUid,TUid aViewUid, const TSize& aSize); +public: + TUid iAppUid; + TUid iViewUid; + TSize iSize; + }; + +typedef TPckgBuf TApaAppViewIconSizeDataBuf; + +// +// inlines +// + +inline TApaAppViewIconSizeData::TApaAppViewIconSizeData() + : iAppUid(KNullUid), iViewUid(KNullUid), iSize(TSize(0,0)) + {} + +inline TApaAppViewIconSizeData::TApaAppViewIconSizeData(TUid aAppUid,TUid aViewUid, const TSize& aSize) + : iAppUid(aAppUid), iViewUid(aViewUid), iSize(aSize) + {} + +inline CApaAppList& CApaAppListServer::AppList() + { return *iAppList; } + +inline CApaDataRecognizer* CApaAppListServer::DataRecognizer() + { return iDataRecognizer; } + +/** +@internalComponent */ +inline CApaCommandLine* CApaAppListServer::AppCmdLine() + { return iAppCmdLine;} + +/** +@internalComponent */ +inline void CApaAppListServer::SetAppCmdLine(CApaCommandLine* aAppCmdLine) + { iAppCmdLine=aAppCmdLine; } + +inline CApaScanningRuleBasedPlugIns* CApaAppListServer::RuleBasedPlugIns() + { return iRuleBasedPlugIns; } + +inline RWsSession& CApaAppListServer::WsSession() + { return iWsSession; } //lint !e1536 Exposing low access member + +inline TUid CCustomAppInfoData::Uid() const + { return iUid; } + +inline TLanguage CCustomAppInfoData::Language() const + { return iLanguage; } + +inline HBufC* CCustomAppInfoData::ShortCaption() const + { return iShortCaption; } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/ApLaunchChecker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/ApLaunchChecker.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,84 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// @file +// +// + +#ifndef __APLAUNCHCHECKER_H__ +#define __APLAUNCHCHECKER_H__ + +#ifndef __E32BASE_H__ +#include +#endif + +#ifndef __E32CMN_H__ +#include +#endif + +#ifndef __APGTASK_H__ +#include +#endif + +#ifndef __ECOMRESOLVERPARAMS_H__ +#include +#endif + +#ifndef __ECOM_H__ +#include +#endif + +class CAppLaunchChecker : public CBase +/** Launch checker. + +This is an interface for rule-based launching of an application. + +An instance of the CAppLaunchChecker class is used to notify an application server whether or not +an application should be launched. Inside the plug-in could be implemented some addition actions, +for instance closing some low priority applications. + +@publishedPartner +@prototype +@see TApaTaskList +@see TUid */ + { +public: + /** Defines codes for launching an application */ + enum TAppLaunchCode + { + /** Plug-in doesn't care whether an application should be launched or not */ + EAppLaunchIndifferent, + /** Rule-based framework shouldn't launch an application */ + EAppLaunchDecline, + /** Rule-based framework can launch an application */ + EAppLaunchAccept, + }; +// Wraps ECom object instantiation + static CAppLaunchChecker* NewL(const TUid aUid); + IMPORT_C ~CAppLaunchChecker(); + /** The function to be implemented in inherited classes. */ + TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList) = 0; +private: + IMPORT_C virtual void Reserved_1(); + IMPORT_C virtual void Reserved_2(); + IMPORT_C virtual void Reserved_3(); +private: + /** ECOM identifier */ + TUid iDtor_ID_Key; + + TInt iReserved1; + TInt iReserved2; + TInt iReserved3; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/ApSidChecker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/ApSidChecker.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,80 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APSIDCHECKER_H__ +#define __APSIDCHECKER_H__ + +#include +#include +class TDriveUnit; + +class CAppSidChecker : public CBase +/** Sid checker. + +This is a plugin interface for checking whether a Sid should be +included in apparc server's list of registered applications. + + +An instance of the CAppSidChecker is used to verify that an application +may be included in application list. +There should be one implementation of this +interface for each application type (native, java midlet, ...) + + +@internalAll */ + { +public: + // Wraps ECom object instantiation + static CAppSidChecker* CheckerForAppType(const TUid &aAppTypeUid); + IMPORT_C virtual ~CAppSidChecker(); + +public: + IMPORT_C virtual TBool AppRegisteredAt(const TUid& aSid, TDriveUnit aDrive) = 0; + IMPORT_C virtual void SetRescanCallBackL(const TCallBack &aCallback); + +private: + IMPORT_C virtual void reserved1(); + IMPORT_C virtual void reserved2(); + IMPORT_C virtual void reserved3(); + +private: + /** ECOM identifier */ + TUid iDtor_ID_Key; + + TAny* iReserved1; + TAny* iReserved2; + TAny* iReserved3; + }; + +NONSHARABLE_CLASS(RSidCheckerMap) : public RHashMap +/** Sid checker map + +This Maps application type uids to Instances of the CAppSidChecker interface, +loading them if neccessary. + +@internalComponent */ + { +public: + RSidCheckerMap( TCallBack aRescanCallBack ); + + CAppSidChecker& FindSidCheckerL(TUid aAppType); + void Close(); //lint !e1511 Member hides non-virtual member + +private: + TCallBack iRescanCallBack; + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/ApaServerApp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/ApaServerApp.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,262 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef APASERVERAPP_H +#define APASERVERAPP_H + +#include + + +// +// Server application client support +// + + + +class RApaAppServiceBase : public RSessionBase +/** Server app connection and lifetime monitoring functionality. + +This is the base class for all server application service client +support implementations. + +The class is derived from by the UI framework and is further derived from +by service implementations. + +Clients of these server application services will use these derived classes as +the interface to the server application implementations of the services. + +@publishedPartner +@released +@see REikAppServiceBase */ + { +public: + + /** Constants defining the base IPC command ids usable by the system GUI and services. */ + enum TApaAppServiceBaseCmdConstants + { + /** System GUI server app command IDs must start from this base. */ + KSystemGuiCmdBase = 0x100, + /** Service specific command IDs must start from this base. */ + KServiceCmdBase = 0x200 + }; + +public: + IMPORT_C void ConnectExistingAppL(const RApaAppServiceBase& aClient); + IMPORT_C void ConnectExistingAppL(const RApaAppServiceBase& aClient, const TSecurityPolicy& aSecurityPolicy); + IMPORT_C void ConnectExistingByNameL(const TDesC& aName); + IMPORT_C void ConnectExistingByNameL(const TDesC& aServerName, const TSecurityPolicy& aSecurityPolicy); + IMPORT_C void TransferExistingSessionL(RApaAppServiceBase& aClient); + IMPORT_C void Close(); //lint !e1511 Member hides non-virtual member + + IMPORT_C void NotifyServerExit(TRequestStatus& aStatus) const; + IMPORT_C void CancelNotifyServerExit() const; + + IMPORT_C TPtrC ServerName() const; + +protected: + IMPORT_C RApaAppServiceBase(); + +private: + IMPORT_C virtual void RApaAppServiceBase_Reserved1(); + IMPORT_C virtual void RApaAppServiceBase_Reserved2(); + + /** Returns the UID of the service that this session provides an interface for. + Client side service implementations must implement this function to return + the UID for the service that they implement. + @return The UID of the service implemented by the derived class.*/ + virtual TUid ServiceUid() const = 0; + +private: + void ConnectL(); + void ConnectL(const TSecurityPolicy& aSecurityPolicy); + +private: + IMPORT_C virtual void ExtensionInterface(TUid aInterfaceId, TAny*& aImplementaion); + +private: + HBufC* iServerName; // owned + TInt iApaReserved1; + TInt iApaReserved2; + }; + + +class MApaServerAppExitObserver +/** Interface for a class that wants to receive exit notification from +a server application. + +@publishedPartner +@released +@see CApaServerAppExitMonitor*/ + { +public: + /** Receives server exit notification. + Implementers of this interface must override this function to + receive notification of server app exit reasons. + @param aReason The reason that the server app exited, this may be + a command ID from the UI if exit was triggered from the UI, or an error code + if the server app exited unexpectedly. */ + virtual void HandleServerAppExit(TInt aReason) = 0; +protected: + IMPORT_C MApaServerAppExitObserver(); +private: + IMPORT_C virtual void MApaServerAppExitObserver_Reserved1(); + IMPORT_C virtual void MApaServerAppExitObserver_Reserved2(); +private: + TInt iMApaServerAppExitObserver_Reserved1; + }; + + +class CApaServerAppExitMonitor : public CActive +/** Helper class that monitors the lifetime of a server app +through a connected RApaAppServiceBase and reports server app exits +to a MApaServerAppExitObserver derived class. + +@publishedPartner +@released +@see RApaAppServiceBase +@see MApaServerAppExitObserver */ + { +public: + IMPORT_C static CApaServerAppExitMonitor* NewL(RApaAppServiceBase& aClient, MApaServerAppExitObserver& aObserver, TInt aPriority); + IMPORT_C static CApaServerAppExitMonitor* NewLC(RApaAppServiceBase& aClient, MApaServerAppExitObserver& aObserver, TInt aPriority); + IMPORT_C ~CApaServerAppExitMonitor(); + +private: + CApaServerAppExitMonitor(RApaAppServiceBase& aClient, MApaServerAppExitObserver& aObserver, TInt aPriority); + +private: // from CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +private: + RApaAppServiceBase& iClient; + MApaServerAppExitObserver& iObserver; + }; + + +// +// Server application server support +// + +/** Panic codes that the server application framework can generate. +@internalComponent */ +enum TApaAppServerPanic + { + /** The IPC message ID used by the client is not recognised. */ + EApaAppServerPanicIllegalFunction, + /** The client already has an active notification of server exit. */ + EApaAppServerPanicNotifyExitActive, + /** The client has tried to connect an already connected session. */ + EApaAppServerPanicClientAlreadyConnected + }; + + +class CApaAppServiceBase : public CSession2 +/** Base class for all service implementations. +Provides the basic IPC and security framework that server applications +can use to receive messages from their clients. +In a typical service implementation, a service support class +will be derived from this class, and the service implementation +will then be derived from the service support class. + +Instances of this class are created by the server application +in its override of CApaAppServer::CreateServiceL(). + +@publishedPartner +@released +@see CApaAppServer +@see CPolicyServer */ + { +public: + IMPORT_C CApaAppServiceBase(); + IMPORT_C ~CApaAppServiceBase(); + + IMPORT_C virtual CPolicyServer::TCustomResult SecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing); + +public: // internal + void SendAppServerExitNotification(TInt aExitReason); + +protected: // from CSession2 + IMPORT_C void CreateL(); + IMPORT_C void ServiceL(const RMessage2& aMessage); + IMPORT_C void ServiceError(const RMessage2& aMessage,TInt aError); + IMPORT_C virtual TInt CountResources(); + IMPORT_C virtual void Disconnect(const RMessage2& aMessage); + +private: // Server exit notification handlers + void NotifyServerExit(const RMessage2& aMessage); + void CancelNotifyServerExit(const RMessage2& aMessage) const; + +private: + IMPORT_C virtual void ExtensionInterface(TUid aInterfaceId, TAny*& aImplementaion); + IMPORT_C virtual void CApaAppServiceBase_Reserved1(); + IMPORT_C virtual void CApaAppServiceBase_Reserved2(); + +private: + RMessagePtr2 iNotifyExitMsg; + TInt iExitReason; + TInt iApaReserved2; + }; + +class CApaAppServer : public CPolicyServer +/** Base class for all server application's servers. +Server applications must derive from this class to implement their +servers. These must be instantiated in an override of +CApaApplication::NewAppServerL(). +The main task of this class is to create service implementations +that clients of a server app may connect to. + +@publishedPartner +@released +@see CEikAppServer +@see CPolicyServer */ + { +public: + IMPORT_C ~CApaAppServer(); + IMPORT_C virtual void ConstructL(const TDesC& aFixedServerName); + + IMPORT_C void NotifyServerExit(TInt aReason); + + IMPORT_C virtual CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; + IMPORT_C virtual TCustomResult CreateServiceSecurityCheckL(TUid aServiceType, const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing); + +protected: + IMPORT_C CApaAppServer(); + + // From CPolicyServer + IMPORT_C TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing); + // From CServer2 + IMPORT_C virtual void DoConnect(const RMessage2& aMessage); + +private: + IMPORT_C CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; + +private: + TUid ConnectMessageServiceUid(const RMessage2& aMsg) const; + +private: + IMPORT_C virtual void ExtensionInterface(TUid aInterfaceId, TAny*& aImplementaion); + // Extensions + IMPORT_C virtual void CApaAppServer_Reserved1(); + IMPORT_C virtual void CApaAppServer_Reserved2(); + +private: + TInt iApaReserved1; + TInt iApaReserved2; + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/Apcaptionfile.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/Apcaptionfile.rh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2000-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Contains definitions for the resource files that are input to +// caption files for Series 60 +// +// + + + + +/** + @internalComponent +*/ +#define KMaxCaption 256 + +/** +@publishedAll +@released +*/ +STRUCT CAPTION_DATA + { + LTEXT caption(KMaxCaption)=""; + LTEXT shortcaption(KMaxCaption)=""; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/AppInfo.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/AppInfo.rh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,231 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined __APPINFO_RH__ +#define __APPINFO_RH__ + +// +// contains definitions for the Application Information resource files + +/** +@publishedAll +@released +*/ +#define KMaxFileNameLength 256 + +////////////////////////////////////////////////////////////////// +// DEFINITIONS FOR THE NON-LOCALISABLE REGISTRATION RESOURCE FILE +////////////////////////////////////////////////////////////////// + +/** +@publishedAll +@released +*/ +#define KUidAppRegistrationResourceFile 0x101f8021 + +/** +@publishedAll +@released +*/ +// constants for capability.hidden +#define KAppNotHidden 0 +#define KAppIsHidden 1 + +/** +@publishedAll +@released +*/ +// constants for capability.newfile +#define KAppDoesNotSupportNewFile 0 +#define KAppSupportsNewFile 1 + +/** +@publishedAll +@released +*/ +// constants for capability.embeddability +#define KAppNotEmbeddable 0 +#define KAppEmbeddable 1 +#define KAppEmbeddableOnly 2 +#define KAppEmbeddableUiOrStandAlone 5 +#define KAppEmbeddableUiNotStandAlone 6 + +/** +@publishedAll +@released +*/ +// constants for capability.launch +#define KAppLaunchInForeground 0 +#define KAppLaunchInBackground 1 + +/** +@publishedAll +@released +*/ +// bit flags for capability.attributes +#define KAppBuiltAsDll 0x00000001 +#define KAppIsControlPanelItem 0x00000002 +#define KAppNonNative 0x00000004 + +/** +@publishedAll +@released +*/ +// application group name +#define KAppMaxGroupName 16 + + +/** +@publishedAll +@released +*/ +STRUCT APP_REGISTRATION_INFO + { + LONG reserved_long = 0; // reserved for future use, do not use + LLINK reserved_llink = 0; // reserved for future use, do not use + // + LTEXT app_file(KMaxFileNameLength) = ""; // name of application binary file (not including extension) - mandatory + LONG attributes = 0; + // + LTEXT localisable_resource_file(KMaxFileNameLength) = ""; // path (not including drive) and name of localisable resource file + LONG localisable_resource_id = 1; + // + BYTE hidden = KAppNotHidden; + BYTE embeddability = KAppNotEmbeddable; + BYTE newfile = KAppDoesNotSupportNewFile; + BYTE launch = KAppLaunchInForeground; + LTEXT group_name(KAppMaxGroupName) = ""; + // + BYTE default_screen_number = 0; + // + LEN WORD STRUCT datatype_list[]; // DATATYPE + // + LEN WORD STRUCT file_ownership_list[]; // FILE_OWNERSHIP_INFO + // + LEN WORD STRUCT service_list[]; // SERVICE_INFO + // + LLINK opaque_data = 0; // use for opaque data to send to non-native application launchers i.e. MIDlet id + } + + +/** +@publishedAll +@released +*/ +#define KMaxDataTypeLength 256 + +/** +@publishedAll +@released +*/ +enum + { + EDataTypePrioritySystem = 0xFFF9, + EDataTypePriorityHigh = 10000, + EDataTypePriorityNormal = 0, + EDataTypePriorityLow = -10000, + EDataTypePriorityLastResort = -20000 + }; + +/** +@publishedAll +@released +*/ +STRUCT DATATYPE + { + LONG priority; + LTEXT8 type(KMaxDataTypeLength); + } + +/** +@publishedAll +@released +*/ +STRUCT FILE_OWNERSHIP_INFO + { + LTEXT file_name(KMaxFileNameLength); + } + +/** +@publishedAll +@released +*/ +STRUCT SERVICE_INFO + { + LONG uid = 0; + LEN WORD STRUCT datatype_list[]; + LLINK opaque_data = 0; + } + + +///////////////////////////////////////////////// +// DEFINITIONS FOR THE LOCALISABLE RESOURCE FILE +///////////////////////////////////////////////// + +/** +@publishedAll +@released +*/ +#define KMaxCaption 256 + +/** +@publishedAll +@released +*/ +STRUCT LOCALISABLE_APP_INFO + { + LONG reserved_long = 0; // reserved for future use, do not use + LLINK reserved_llink = 0; // reserved for future use, do not use + // + LTEXT short_caption(KMaxCaption) = ""; + STRUCT caption_and_icon; // CAPTION_AND_ICON_INFO + // + LEN WORD STRUCT view_list[]; // VIEW_DATA + // + LTEXT group_name(KAppMaxGroupName) = ""; + } + +/** +@publishedAll +@released +*/ +STRUCT CAPTION_AND_ICON_INFO + { + LONG reserved_long = 0; // reserved for future use, do not use + LLINK reserved_llink = 0; // reserved for future use, do not use + // + LTEXT caption(KMaxCaption) = ""; + // + WORD number_of_icons = 0; // each icon must be a bitmap/mask pair + LTEXT icon_file(KMaxFileNameLength) = ""; + } + +/** +@publishedAll +@released +*/ +STRUCT VIEW_DATA + { + LONG reserved_long = 0; // reserved for future use, do not use + LLINK reserved_llink = 0; // reserved for future use, do not use + // + LONG uid = 0; + // + LONG screen_mode = 0; + // + STRUCT caption_and_icon; // CAPTION_AND_ICON_INFO + } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/ServiceRegistry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/ServiceRegistry.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined (__SERVICE_REGISTRY_H__) +#define __SERVICE_REGISTRY_H__ + +#include +#include + +/** +The Service Registry stores associations between (service,datatype) pairs and +applications. The (service,datatype) pair is the primary key for the registry. + +@publishedPartner +@released +*/ +class CServiceRegistry : public CBase + { +public: + IMPORT_C static CServiceRegistry* NewL(); + IMPORT_C ~CServiceRegistry(); + +private: + CServiceRegistry(); + void ConstructL(); + +public: + IMPORT_C TInt SetDefault(TUid aServiceUid, const TDataType& aDataType, + TUid aDefaultAppUid); + IMPORT_C TInt RemoveEntry(TUid aServiceUid, const TDataType& aDataType); + IMPORT_C TInt GetDefault(TUid aServiceUid, const TDataType& aDataType, + TUid& aDefaultAppUid); + +private: + /** The registry is currently only a thin wrapper around the + RApaLsSession API */ + RApaLsSession iApaLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/apfmimecontentpolicy.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/apfmimecontentpolicy.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,102 @@ +/* +* 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 the License "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __APFMIMECONTENTPOLICY_H__ +#define __APFMIMECONTENTPOLICY_H__ + +#include + +class CApfMimeContentPolicyImpl; +class RFile; +class RFs; + +/** +CApfMimeContentPolicy is utility class for checking MIME types and +file extensions against closed content list. It also provides a function +for checking if a given file is a DRM envelope, and a convinience function +which combines all the checks mentioned above. + +Usage: + +@code + TFileName fileName = + TUid uid; + TDataType recData; + + CApfMimeContentPolicy *ccp = CApfMimeContentPolicy::NewLC(); + + if (ccp->IsDRMEnvelope( fileName )) + { + // Whatever needs to be done if file is DRM envelope. + } + + // Check file extension. + TParse parser; + parser.Set(fileName, NULL, NULL); + if (IsClosedExtension(parser.Ext())) + { + // Do what needs to be done if closed content. + } + + iLs.AppForDocument(fileName, uid, recData); // Get MIME type for file. + + if (ccp->IsClosedType(recData.Des()) // Check if this mime type is closed. + { + // Whatever needs to be done if type is closed. + } + + // Or you can achieve same result calling a convinience function + // which combines all the steps above: + if (cpp->IsClosedFileL( fileName ); + { + // Do whatever has to be done if file is closed. + } + + // Don't forget to clean up. + CleanupStack::PopAndDestroy(); // ccp +@endcode + +@publishedPartner +@released +*/ +class CApfMimeContentPolicy : public CBase + { +public: // Constructors and destructor + IMPORT_C static CApfMimeContentPolicy* NewL(); + IMPORT_C static CApfMimeContentPolicy* NewLC(); + IMPORT_C static CApfMimeContentPolicy* NewL(RFs& aFs); + IMPORT_C static CApfMimeContentPolicy* NewLC(RFs& aFs); + IMPORT_C ~CApfMimeContentPolicy(); +public: // New functions + IMPORT_C TBool IsClosedType(const TDesC& aMimeType); + IMPORT_C TBool IsClosedExtension(const TDesC& aFileExtension); + IMPORT_C TBool IsClosedFileL(const TDesC& aFileName); + IMPORT_C TBool IsDRMEnvelopeL(const TDesC& aFileName); + IMPORT_C TBool IsClosedFileL(RFile& aFileHandle); + IMPORT_C TBool IsDRMEnvelopeL(RFile& aFileHandle); +private: + CApfMimeContentPolicy(); + void ConstructL(); + void ConstructL(RFs& aFs); +private: + CApfMimeContentPolicyImpl* iImpl; // Implementation. + }; + + +#endif // __APFMIMECONTENTPOLICY_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/inc/apgnotif.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/inc/apgnotif.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,68 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGNOTIF_H__ +#define __APGNOTIF_H__ + +#include + + +class MApaAppListServObserver +/** +MApaAppListServObserver + +@publishedPartner +@released +*/ + { +public: + enum TApaAppListEvent + { + EAppListChanged=1 + }; + virtual void HandleAppListEvent(TInt aEvent)=0; +protected: + IMPORT_C MApaAppListServObserver(); +private: + IMPORT_C virtual void MApaAppListServObserver_Reserved1(); + IMPORT_C virtual void MApaAppListServObserver_Reserved2(); +private: + TInt iMApaAppListServObserver_Reserved1; + }; + + +class CApaAppListNotifier : public CActive +/** An application list change notifier. + +It provides notification whenever an application is added or deleted. + +@publishedPartner +@released */ + { +public: + IMPORT_C ~CApaAppListNotifier(); + IMPORT_C static CApaAppListNotifier* NewL(MApaAppListServObserver* aObserver, TPriority aPriority); +private: // from CActive + void DoCancel(); + void RunL(); +private: + CApaAppListNotifier(MApaAppListServObserver& aObserver, TPriority aPriority); + void ConstructL(); +private: + MApaAppListServObserver& iObserver; + RApaLsSession iLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/102081ce_reg.rsc Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/102081ce_reg.rsc has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/102081cf_reg.rsc Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/102081cf_reg.rsc has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/1028583d.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/1028583d.txt Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +cenrep +Version 1 + +[defaultmeta] +0 + +[Platsec] +cap_rd=alwayspass +cap_wr=WriteDeviceData + + +[Main] + +# EFDemoApp +# app UID (??FFFFFF) +0x00FFFFFF int 0x2001B674 +# English (language 0001) +0x00000001 string "CRTC UK" +0x00010001 string "CRTstCap UK" +0x00020001 int 2 +0x00030001 string "z:\\resource\\apps\\ticoncapoverride.mbm" +# French (language 0002) +0x00000002 string "CRTC FR" +0x00010002 string "CRTstCap FR" +0x00020002 int 2 +0x00030002 string "z:\\resource\\apps\\svg_icon.svg" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/AAA_reg.Rsc Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/AAA_reg.Rsc has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/CONTACT.NNA3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/CONTACT.NNA3 Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,159 @@ +BEGIN:VCARD +VERSION:2.1 +REV:20010827T134249Z +UID;ENCODING=QUOTED-PRINTABLE:01c00f98091b8820-00e06a35e115bc80-7 +N;ENCODING=QUOTED-PRINTABLE:Jones;Tom;;King=20of=20Cool; +ADR;WORK;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:;;PO=C2=A0BOX=209214;London;;; +ORG;ENCODING=QUOTED-PRINTABLE:Gut=20Records=20=20inc.; +TITLE:Singer +TEL;WORK;VOICE;ENCODING=QUOTED-PRINTABLE:66335=20=20209 +EMAIL;INTERNET;WORK;ENCODING=QUOTED-PRINTABLE:tom.jones@anonymous.com +URL;WORK;ENCODING=QUOTED-PRINTABLE:www.tomjonesistheman.com +LOGO;ENCODING=BASE64: + /9j/4AAQSkZJRgABAQAAjQDlAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEj + JR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARES + EhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj + Y2NjY2NjY2NjY2NjY2P/wAARCADlAI0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEA + AAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIh + MUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6 + Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZ + mqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx + 8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA + AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAV + YnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hp + anN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPE + xcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDp + BDEyktFGAPYU4wxFl/dqQOwXFKBzg9Pen5Cndk8d8/0ry0292dVhDBGu0BAOc9OK + eUUEcDHfNIBnJUnPr14//VTkXIyDjnByO1aJsLIcFjJ+6vQdPXFPXYqcBT7kU0FU + +bfnjByPWnKfXjH+ev6VUWQ0S4XA4wQeT+HWgqMgbR06dPWgk7ecg+uOlCgb85GM + DGK1WhAo5UcnHqT1pQcYAHHpRx1wWI4/WkyMggfkaEIUcnp0PPH1qKWZIo2YsBj1 + NE0gRSx4AHU8fnXmfiPxDcX99Lb2jsIgxUbT19+KTbbtEaS3Zu3vjiGKZ40G4A4y + B1rKk8czM2BFhc9zn/P/ANesyy0lWO6T943fJ4FXn021CfNAOuDWDnSi7O7OqOHq + SV1ZHQ6P4rhvIwJHxJ/c/wA/hXTxyLKgKAjI7149fWj2bedA52Z6eldl4R1z7RH5 + M7kyZ4J75rVe770XoYyi0+WWjOzBJJPQ4zTeeRjnPc96QMDk8A44IFR3Myw7C3G9 + go/EGtXoZorjC7dwGcc4NLgDA4wfSoi3Xnoev4U8EZHzfXua89M3uSYyDwcE54pd + 2So5x0H/ANamhuenIxx607IwCMEfStUDHkrnC9OnTrUife46dST/APrpiEYOTgbc + A05WU55x7/0rSL11M5Ej9Buz68n8/wDPvQvyglRgk9uaTeWADd+tLyzcH8D3rQgc + AMcY+tBYYx+YpqgqcADikcBRnbnA7dKp2FYxfFd8LHR5HdN4kG3H1z/jXnekWJn3 + TMcHovFdH47vBJLBYRly+dzZ7Z4xio7JUs7EHbnjAJXP+e1c05uENN2dNCmpS12R + EkUsMi4VScYJUcH60+e4VVK4y3oRxRCjvIZHyGxgAdqmt0ZwBnc4yD/n8K5G9bs9 + C1jLuvnXDxhcjkDkVi6dP9kvVffgK3X15rf1COOOBio5HBGM571zEaGW4VV5LMBx + XoYazi+x5+J0ku57TYyG4tY5SAGZQeOxNY3jS4+y6bay7tuLpT+jVsWEZjtIkYEF + UA59cCuf8fo8ujWyc5N2gx/wF6uK91Iwd7m0GCnaAM4pFxjlgPpTUJwAQRzgc56U + oIGWrzzUdlhnP5YpythcnqOQKiJBwe3XNPUcEkZYHpmqi2FyQccnA5qRZATgH2/z + +lQbmOzAyOmMdaljPQlcZHXH+f8AIrSMgZMCPlIXI7YqQkqpBJ6dR2qNSCvGSP59 + +aepOe2c9j9a6IbGTHY+U9c8/nUTkkMuRjPNSA4HBx9f51CzFsgdQOh/xpzsKO55 + 3rEgu/FsgZW+QgAN7VbuLgQRLwGG4cHvWVe3bXfiW5maPaRlcEehxWmwjuMZJ46V + y19JRud+GXussQ6nvhImCNGTtK7QCB/n+VSQqqbnRuMtgnnNUp7WPYqpw3uKsIyw + WuwcADk+oFYyaN+W2xkaoxYMgBJbI6dKo+G9Pe91qKP5lEZ3Mw4xitgzxRpLcyjp + 8qHuD3Na/g3T5IxJqM3JuP4e4Gf/AK1dVGTjFqxyYlJzuzrlO1doPGfYdqyfEFk1 + /DYpuYBLoOWHGAFatVcgDgY9uOeP8aa4HykqccZHtgVtze7ZI5ktdSiuMAAYJ7Yo + ++wyo47U0vkrtyQR/SmliTGQOPzFcBbFVwTgjaABxjoakDbQCSOTUa5Gcrz7d6eO + QBn8aLiW5KM8gH3pyMq8MBz78VRu7qK0hMkrYHseT7VlSardycKFiUe2Tn+VVz21 + NYxlPY6hZADwAvHHPSneaD3B4xgn61yY1C8AP77Of9kf4Uialejgykc9lFUsR0RT + w0tzrTNwcnIz6e3+fzqKe4RYjkqo9SQKo6i7x6QJEYiQhcsOOtc0Yp7l9sszy5Od + uetXVqOD5SKVHnV0VNRti2qzzIVcOcjbzkVPbMqgEjJ9D1/z3/8A1VZaH5thKksR + +NRy2+2RlfBORnPeuV1Obc7qcIwVkNkkVSS2QCeBjuPSs7Ur4xRPzkE8AD9KtPak + vngLnt6Vny6bc6jeRWsKEjfhmHStaMYuWpFeTjC6F8L6LNq9158jgQxOCQf4j6AV + 6eiiMBRjHt/npxWdomlW+kWhgt8tk5JY5J/zzWiuBjnAz37Cuty5nc861lYcWA5A + 4IPHrQW+fBz6dOv+frTQBjI4HuOCaFKZGMDnqfT/ABouFjNXaCR3PGTmoclJDtJw + oOT6/wCeaaxAL4cdcY/r/OkK5KqrBwckdsD+hzXCtTSxKJBuIYLhsDIByf8AOake + QKhK4JCnP61VBUo2QMgEfT6VUv7grBsyNz8fXP8AhT6jUW2VJ5muZ954RSdgP86l + gT5WJUY96gj+QjHAHHFPaRzkZ6+neob6ndGPKrIimYRhjgkDiqvzyyn5mUHIzjGK + tMpJyf1qxpVg9xfKB/qlO5iR70U43dupUpKMbs3dRiI0Py9udiLn9K5oOynKHqOm + eorrdwnMsRwFZSBzXHSRskxQcFCQR6cV0YnWSkjnwjummW7aaNmbeMsSMEjpSo5a + Vl4AduTVGVmj2lcnn5qLe7XzSxwDjAzXLyu10dLj1Ljx7pti4IzjirGn6gmmTNFN + GfLZs7x2J9faqEd2iuDgnnninTSRzgZxknHTNVBuLuyZ07qz2OxW4jeMGMqVJyGB + 60/OBweMYA61lSNHpum2+1C3AGM/ias299HdqDG2QB0PBH4V2c3K+Vnnct9VsWyd + oJPTsM04EAHBBPtTFwVH8sZzVdpmFxEgACsjHpzkbf8AE09twMwsCCc5bnGBj8TQ + xdABu6enbP8AWmH7xGBnPajJB59emO9ciNbBKQOcjHBzmsjzGkkaQkkAYAJ4z3q3 + e3JWF1QfM3yg8cds1RhVSigZxjHHGab0VzWlHUnVSTgDPeluf3U8ceMZUk9+at2k + IC72APGR7VWmSW51dYoRnC49h65qFFvRG19SxZWzXRMakDd1YjpW0FhtIvIhAweW + bOM/j+VRx7bKAQRnLnhiOpNMJLKDjOO4PH/1v511xjyK3U4qk3N+QbSJM+Z1/i2+ + 9R6jYreBrm2A83+NR/F71IvJXnA5GRxUkIdCzDHJJyCf8mj4laRKlKLujmnQAHI2 + noeKrpArEkepzxXWXa2tyAZ1wxx+8TrVR9GjP+qukP8AvCsXRkvh1OuGJjb3tDAE + Gcg5AHSrVhZvPcpEDlc5PsO5rWTQ1GPNuVxnog5P41chMFonl2yjJ+8xOSaqFJ3v + PYKmJurRKniVwsVsAMgseR26CsOGSWBxJC+18dP8fzra1+MPpsMoGRG+CfrWHC2V + weuKWIfv3HhreyN3TtXE7eRcYWQ9Dnr7fWpdbkeKBJoG2yLJgH2wa5+ZOAwI3LyD + 6VqXFwbjR4XYYbeAQT7Gs1UvEUqaU00tB0jEnIXIH8I9PamjALHfn2NNJYt8pHHG + Ce9QXEuz7nBHQqRyR600rmaRn3sxluVT+8Ov14FWLONsxqwGe4/z7VSt2ae6d85H + IB9ga3LWIquT1PoadTR2NYP3bkrsFDE545pdMcIJplX94eBx+lVbqTACYHqauWUf + l2oJO3dk/U9qqirO5lV0hr1H7vlLbiWbqP8AP1NWFzgdBg5GOmKrllEp4wAcHI49 + /wDPtRG5OCX6nHU5roszmepZUEhskjoOQPrSg7hyM+uDnH1qu12ATk/L07fhUX2j + 5cHJJ4OBnNCjYViZ3DnkA9gueeOn86l3/Lsz94YwQeveqXmb5SxbIAwOfzxUiknC + cNjrjnH+faiwyYL8riPCgrzikZhG/B5B+UnOP8/59akZtqkhSoJzkdf1prDcWUq2 + 48j/AD/9ela4kx6xC7sZocZ3KSAT/nmuVjBSXbnI/wA4rrLJWinwcbe3TmuU1FfK + v2i4VmfB/Osq0bpHZhZK8l0JHOEY+gNTQsRo8a9hMeQeD96qlxIAhAqxMNmiWsYU + jfKAWPbg8Y/E/lWEY6G8+l+5PK+2Ncbgc55P+cVm387YKdWbjPt61dmJQkAhs9+v + SsyFklvS4Bxn5f8AGto6amD10LljD5aKDnJ5Oa1wwKfezjviqUTKFbP3uNp70Cdl + jKjj3rPWWppKOlkU9VvjCUYANlhhSeuK6XcGt4pAQoYA4xxyK4i/cz3WQcIox65r + tLLL6db7lU5QFsdOldUIKMDjrSvIVguMbcZzyRjuMVGVVuoAHoO1TLGSdxwQc546 + /hTWVeNq9G6c8gUX0IVh72qbcgfN0PfmqksKqxGBnuKuRKCD8xOMD5efao54icnb + kjrnnPPr3ouwVtmU0UknPTPFOwygnHyjvU0asDkKGxn8f8f8+tPY5Unp1yM4OPTN + Fx2tsENxu4Jx+WB/nmjci9RnI4BUenWo1jVSHXAJ79M04orZyPm9PXj0xT0YtiW1 + JSVDjjd7GufulFzqU92Sdm47R61rX5Wzt9qH95L8qn09TWfx5OM8DkDNYV5WVkdO + Hjd85k3JxIR2robyJRpUIwcJID9TgisG7ULcoeACQf1rob10+wpGeobcMHr6/lkV + lJ+6jab99GLeS7UbOFO3AC8VHYRhYg5wWbnp0qvqLZdI1JGTkjHStCBNiYIGe5He + tJu0LdyaSvJsk6cCmXMgSAAHDHjk96eKrSDzbsLkfIM/5/Kopq5pN2RG0AO4dFJA + 4X8q6myAFhCMDaFH0rBZSEzjAyec9a37RUW1ij3FgEHIzg10x1TOCr0Bxg8noWHP + UimHKsAqknqO+akyWw2M98ep6/yAqNcg7SeMA9cVTRKYqy44Xg4zkZ6/nTZ5C5Jw + O3vil2gfIemck4P8u1Qv+8wDt4Oc4xSSRRNG6hCpJB9c9KV1XaF+U59Bmo0UZPKg + Y/yKNgDYBJzz9fpT66iJNvl4KjgjjPf/ABqSKTbEzOVCj5vQAd6bEgwoIGSOOORV + bWLh7XTppIjh+EDbQcfnTSJeuhmXV8l7euyY2R/IpBznvn9Km2loix7jkkj61haY + xWRlOMZ6Ae1bm7fCeBwB/hXHU+NnowVoKxl32N656Yrac+baBlA2gYyT0/zisLUn + AIH0H61sRktpwOCB154PWl9lCn8SMG5ObxV4yE+bHrzWsjB1BxWPcjOpNjONvBIx + WuoCJkgDjmtKi0SJo7MczBQSTVaGQHfJnG4k1XknaaTYBzkjjsMf/rqbZhVj4245 + Hr/n+tNLl3Ccr7BczYQjcN54zmtjS751tUWVdxAxkDBFZUUMdyzIwwF4J9K04A0Y + yBuHTK9RXdh6Xu3Z5mKq2fKjVWSKVciTaWOetMaM/dVgR6A+9V0C7AQevoeKlWIF + sjPA6k9a0lRizGGIb0sKFbLxkHA6fnUJLmUj5iwwcmrfPTJ61E21XHLAngBRWXsG + upuq6HBchQ3DKQBzwef8/lTdrFgM+mP8/hUkcoQjccqT360NcwgHcjAUvZSTuJVo + skCjaCQfpWB4nYyTwxBiFAywFak2oxxqWQM2B3rEurhr2RpWGw5wB7AVlVTgtTWj + aUrmTbtsmGenbnrWsJgV2qeccgGs6cD7RxwQOcVIpwM7uOuM9a5Zrm1PTpJOJFfK + dwzJnJySK2d+bJcZ64+tc7ev88ZGT8+M55rZlDpp6lgQAwPJ5PBzTnF8qI0dQzo/ + 3uoynI7Lu7/55q9dy7ICvRiv5D3qnaHGoygkA56flVy9iMkRKjJxj9a0klzK5nBv + kbRVsoQ2XPJ7CrknyBvm7YGahs32oVfjBxjHSpkYS3KockDlvp2pqPPOxE2oQuXN + OgCxbZT+8Y56etaCxMhxyVPrTY4/k2OAVzwfepUBBIcs4x1P+FeskoqyPCc+eV+4 + LCquWwQT1IqQRnPB4oGSOpGacOue9JlRSF5A7GmbDvDgfNjGA3FSUdeaVirkDBmb + JTPTPtSOeMFPmPOO9TnOe9M2q3JGfqKAu+hm3CSOjZjA44GazAv2bMROWH4VvXEf + mNgKfwNYd1DI146qpJZcYHPNcuJinC514RuM+Uzt58+Qt94e34VG0/GSCQO9SXOn + 3lqztJCQGGeKhhjKwbSecYrltHc9KMnsilPceYykZPOQPStW61NbjbGvKRqCSO1Y + ToRPs6EH8q1YLYpbGRj8zkgAdMVtUhFJMxUm52RasLRrq8kKDCseCB1P/wCquoTT + 44tgZgTxuz2qhoE1vbx/MVEhJ3ZOK0mtw8pnjnVkYfdNck5Ns1s46Mw9etWs5hJG + u1W4z0zTtMhUx+Y5+ZxkmrWrT+fZeWUDdAW9MVLZwAWqKRgKMcDvmu3Bxv7zODGV + HGPIXAp/hIxz9CalUHrQq07HGDXcedGPUQIM5wM+velHH/66OAe/NAzUmlwNJuIX + JHPoKdRRYEyISE9EP50pMp+6oH1NPxSHJJAxSHqV287JLFOOfYUWiIIhKsYMrNhS + R/n1p8gJUqeMjGcVTjnaO4ZZZdgRcIFXrnjNcuKT5EdOEac2XWt553ZbhQUIxkkZ + H4VyOsQizuWUEqMZPoDXSNdIANt3Ifqlc9rSC5uUQSSMMbmc9h3rgpazsek01Ftm + baW8t1Or7cK7fKR1wK2dVtUstMRhhWLgE/gauaFZZQSsMM4wueSq0eJ0W4tIo1JV + BICxHYbTmuhzUp26GK91eZli4kg3BQCM5xirkWsxKAstspPdlYg1HPHkAtyqg5B6 + 1ntHnhep5wayilI6JPQ0oZRqGogxqVgUcrnAzXQxRgDqQP0rN0a0WCDB5cnca1kG + OnSvVpwUIJI8OtP2tS72FVcUp/PFFLVkWsrCH6UdM0c1VvbnyoiVGTjODSK1ZZVw + 3SlqrYzCWJWxgkcj0NWvShO4bC03H/1qWlPSgHuRuAVOeg54rm9VuHh1SPYxwQQw + zgEZrpWODz+dctrQ3aiiRjc7dAB15rGqrxsb0NJpkov2vGEcMU7MOWJIwtNjga5n + 8o87sNIfYZwBWtatDa6YViVd+dpJ4JOBmo7VRFC0r/ec5PGMDNee0obHoqbmrPYn + aRba3OFGR6dfwrNaSTUHW2eIoN25j2I9KGle8vvLUhVXk/4VciiETPcMPl+6PpkV + OqZVls9zOuZFKsvODx6VXs1827AI+VOSPepLtyYyxB+uBU2lxYgLDndzXVhoXldn + Piqtqb8zagG1R3HSrCdBx+OKrR5LbskMR/n+lWE6ZxgV6DZ49NXY/PNJ+H40hYAH + GTUU0wVSDjBz1FSbaIdPII1yec1izSGWXYOVzzzyTU91OzIcDBJ4wKgjUrGzEZY9 + OOnvXNiavKuVbnThaXPLnexb0sbBMemW4x9K0+3T86y9Oyyuc8s2Rg/TtWkh4Gev + vWtP4Fcio/fdh4/WjoaAMdKWtDG5FIcH2HJOaxfkW9nu8R74+FPfJH9OTW5IcKxO + AMVzMn7yX7OdwO8yEnv0A/lWNVpR1NqKcpaGpCxuVzIqqBjjH4/zqDVJ/LTCHB7A + 0+GXy1Ib6j3rM1Qz3EpEcbMB8xIxXnJOUj1LcmrH2ziAq4PzN0PXqP8A9VX726J0 + tSCN4fGPr/k1maWvn3CtJuVk+UrjqPeresRs9uRbxEgSZwFxxg/pTatNIlTTV2T3 + eh3cyYRUB+v+fWrcem3EUUaBRkccNWwpwrfxE9KkBy4wQPQ1pTquCtE56kVU+Izo + 7aZcFwc5xjNTG2lOMbSccZNXSwJAydo9eKXdkg9wPXFbfWJGSw0Ck9nMMkKAT/eJ + qBtJu5DuUx4zx8xyK10OWwMdOuacCSvQAfyqlWkyXQijC/sG5LBi0OM8HcfTr0pZ + NCupI2DNHvPQ5P8AhXRcgdRwfr/n/P0pOrDr0+lZSpqbvI2jUcI8sTAttEvIVz5s + OT7tz39Kux6dOBy6Z9MmtQdB3PXjpRznv9e1bqbSsYuKbuZ39nzZxlPzNJ9gl/vJ + j8f8K0chTzz3HFZGsa7a6bG4mcbv7vU0nVaBUkwmsX8tl8yIcEfePp9KxTpM6zPK + bm3JZsY3HoO3SuWn8QaleXLmBm2k8AdBVZ31ZiWZpG7n5qznzzVpNI2prkd4ps7t + dFuJEyk0BP8AvH/CmDw7qJTmeAHocMxyPyrmNI8T3FniC4xgfxEc/wCea9D0+/iv + oQySbx0JFRGHK7SLlUlNGHbeF7qGaVnkgBblSHbt+FWLnRL2YERywrz8xy2en0ro + RxkEHpnr0NNIAOGzg1o6acrszUnawP/Z + + +NOTE;ENCODING=QUOTED-PRINTABLE:In=20his=20native=20Wales,=20he=20is=20known=20as=20"Jones=20the=20Voice".=20Today,=20he=20is=20one=20of=20the=20enduring=20p= +ersonalities=20in=20the=20music=20entertainment=20buisness,=20His=20unique=20vocal=20power,=20ability= +,=20and=20charismatica=20persona=20make=20him=20one=20of=20the=20most=20respected,=20admired=20and=20loved=20perf= +ormers=20in=20modern=20music. +END:VCARD diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/Corrupted_reg.RSC --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/Corrupted_reg.RSC Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Note: Standard test header to avoid Copyright tool complaining of missing copyright... +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +kJ!€º<©ÁÚ$ Õ  beytfyugjcert diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/FileWithUnknownMimeType.UnrecognisableExtention --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/FileWithUnknownMimeType.UnrecognisableExtention Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1 @@ +xyz \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/GIF.NNA1 Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/GIF.NNA1 has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/HTML.NNA2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/HTML.NNA2 Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ + + + + +09:48:45:769
09:48:45:769 *** TestExecute Started 16/09/2005 09:48:45:769 ***
+09:48:45:789 z:\apparctest\apparctest_t_nonnativeapps.script PRINT Run NonNativeApps Apparc test
+09:48:45:789 INFO -  104 ScriptEngine.cpp 1077  Run NonNativeApps Apparc test
+
+09:48:45:794 z:\apparctest\apparctest_t_nonnativeapps.script LOAD_SUITE ApparcTestServer
+09:48:46:165 z:\apparctest\apparctest_t_nonnativeapps.script RUN_TEST_STEP 100 ApparcTestServer T_NonNativeApps
+09:48:46:180 INFO -  112 T_NonNativeAppsStep.cpp 393 Test NonNativeApps starting....
+
+09:48:46:185 INFO -  112 T_NonNativeAppsStep.cpp 124 Testing AppForDocumentL()...
+09:48:46:185 INFO -  112 T_NonNativeAppsStep.cpp 132 ..using following file: 'GIF.NNA'
+09:48:46:190 ERROR -  112 T_NonNativeAppsStep.cpp 414 ERROR: Test Failed
+09:48:46:190 INFO -  112 T_NonNativeAppsStep.cpp 415 TestAppForDocumentL completes with ret=-12.
+
+09:48:46:190 INFO -  112 T_NonNativeAppsStep.cpp 182 Testing AppForDocumentAndServiceL()...
+09:48:46:190 INFO -  112 T_NonNativeAppsStep.cpp 190 ..using following file: 'GIF.NNA'
+09:48:46:190 INFO -  112 T_NonNativeAppsStep.cpp 421 TestAppForDocumentAndServiceL completes with ret=-12.
+
+09:48:46:195 INFO -  112 T_NonNativeAppsStep.cpp 221 Testing RecognizingL()...
+09:48:46:195 INFO -  112 T_NonNativeAppsStep.cpp 229 ..using following file: 'GIF.NNA'
+09:48:46:195 INFO -  112 T_NonNativeAppsStep.cpp 427 TestRecognizingL completes with ret=-12.
+
+09:48:46:195 INFO -  112 T_NonNativeAppsStep.cpp 285 Testing StartDocumentL()...
+09:48:46:200 INFO -  112 T_NonNativeAppsStep.cpp 293 ..using following file: 'GIF.NNA'
+09:48:46:200 INFO -  112 T_NonNativeAppsStep.cpp 433 TestStartDocumentL completes with ret=-12.
+
+09:48:46:200 INFO -  112 T_NonNativeAppsStep.cpp 438 Test completed!
+09:48:46:205 z:\apparctest\apparctest_t_nonnativeapps.script Line = 5 Command = RUN_TEST_STEP 100 ApparcTestServer T_NonNativeApps ***Result = FAIL 
+09:48:46:215 SUMMARY:
+09:48:46:215 PASS = 0
+09:48:46:215 FAIL = 1
+09:48:46:223 ABORT = 0
+09:48:46:238 PANIC = 0
+09:48:46:238 INCONCLUSIVE = 0
+09:48:46:238 UNKNOWN = 0
+09:48:46:238 UNEXECUTED = 0
+09:48:46:238 COMMENTED OUT RUN COMMAND'S = 0
+09:48:46:238 
diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/TApsRecogAppTest.mmr diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/TRApaLsSessionStartAppTest.tst diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/TSTAPPU.DOC Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/TSTAPPU.DOC has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/TXT.NNA4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/TXT.NNA4 Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2 @@ +This is a text file, used in T_NonNativeApps test in apparc. +End of file. diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/UpdatedAppsList.bin Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/UpdatedAppsList.bin has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/file1.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/file2.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/fl_goo.dm Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/fl_goo.dm has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/gif_wallpaper.gif Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/gif_wallpaper.gif has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/jpeg_wes.dm Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/jpeg_wes.dm has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/propelli.jpg Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/propelli.jpg has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/sd_goo.dcf Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/sd_goo.dcf has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/type-r.jpg Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/mimecontentpolicy/type-r.jpg has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/one_byte.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/one_byte.txt Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1 @@ +1 \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/recmime_1.rsc Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/recmime_1.rsc has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/recmime_armv5.dll Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/recmime_armv5.dll has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/recmime_winscw.dll Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/recmime_winscw.dll has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/recupgrade.rsc Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/recupgrade.rsc has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/recupgrade_armv5_rel.dll Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/recupgrade_armv5_rel.dll has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/sdk.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tdata/sdk.txt Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,11 @@ + +EPOC32 C++ SDK + + +
+
+
    +
  • Release notes
  • +
  • Getting started
  • + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/tapsrecogupgradetest.upg diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/testfile1.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/testfile2.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/testfile3.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/testfile4.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/testupdregappuninstallation_reg.rsc Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdata/testupdregappuninstallation_reg.rsc has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdata/zero_len.txt diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF25.BMP Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF25.BMP has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF25M.BMP Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF25M.BMP has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF35.BMP Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF35.BMP has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF35M.BMP Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF35M.BMP has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF50.BMP Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF50.BMP has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF50M.BMP Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/DEF50M.BMP has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/Thumbs.db Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/Thumbs.db has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon24x20.bmp Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon24x20.bmp has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon24x20m.bmp Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon24x20m.bmp has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon40x55.bmp Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon40x55.bmp has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon40x55m.bmp Binary file common/tools/ats/smoketest/localisation/apparchitecture/tdatasrc/tstappicon40x55m.bmp has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10000180.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10000180.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// App-framework notifier plug-in resource file. +// N.B. Testcode. +// +// + + + +/** + @file 10000180.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10000180; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D86; // need to create this uid in the uid database + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x101DC568; //Unique number + version_no = 1; + display_name = "TDoNothingFileRecognizer"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10000181.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10000181.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// App-framework notifier plug-in resource file. +// N.B. Testcode. +// +// + + + +/** + @file 10000181.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10000181; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D86; // need to create this uid in the uid database + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x101F7D8C; + version_no = 1; + display_name = "TTestEcomFileRec"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10000182.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10000182.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// App-framework notifier plug-in resource file. +// N.B. Testcode. +// +// + + + +/** + @file 10000182.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10000182; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // need to create this uid in the uid database + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10004c50; + version_no = 1; + display_name = "TRApaLsSessionStartAppTestRecognizer"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c4e.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c4e.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// App-framework notifier plug-in resource file. +// N.B. Testcode. +// +// + + + +/** + @file 10004c4e.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10004c4e; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // need to create this uid in the uid database + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x101F7D8D; + version_no = 1; + display_name = "TLongUrlRecognizer"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5B.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5B.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddable resource - Test +// +// + + + +/** + @file 10004c5b.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO + { + dll_uid = 0x10004c5B; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid=0x101f8c96; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10004c48; + version_no = 1; + display_name = "TAppEmbeddable"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5C.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5C.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddableOnly resource - Test +// +// + + + +/** + @file 10004c5c.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO + { + dll_uid = 0x10004c5C; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid=0x101f8c96; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10004c49; + version_no = 1; + display_name = "TAppEmbeddableOnly"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5D.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5D.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddableUiOrStandalone resource - Test +// +// + + + +/** + @file 10004c5d.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO + { + dll_uid = 0x10004c5D; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid=0x101f8c96; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10004c4A; + version_no = 1; + display_name = "TAppEmbeddableUiOrStandAlone"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5E.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c5E.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddableUiNotStandAlone resource - Test +// +// + + + +/** + @file 10004c5e.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO + { + dll_uid = 0x10004c5E; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid=0x101f8c96; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10004c4B; + version_no = 1; + display_name = "TAppEmbeddableUiNotStandAlone"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c66.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/10004c66.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// tstapp resource - Test +// +// + + + +/** + @file 10004c66.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO + { + dll_uid = 0x10004c66; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid=0x101f8c96; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 10; + version_no = 1; + display_name = "tstapp"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/102032A5.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/102032A5.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Resource File for the Test Data Recognizer TESTREC \n +// +// + + + +/** + @file 102032A5.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x102032A5; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // need to create this uid in the uid database + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x102032A6; + version_no = 1; + display_name = "TestREC"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/1020d465.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/1020d465.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,54 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "RegistryInfo.rh" + +RESOURCE REGISTRY_INFO theInfo +{ +dll_uid = 0x1020d465; +interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x1020d466; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x1020d467; + version_no = 1; + display_name = "Test implementation of application launch checker"; + default_data = ""; + opaque_data = "some extra data"; + }, + IMPLEMENTATION_INFO + { + implementation_uid = 0x1020d468; + version_no = 1; + display_name = "Second test implementation of application launch checker"; + default_data = ""; + opaque_data = ""; //some extra data + } + }; + } + }; +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/102722ba.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/102722ba.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// 0x102722ba.rss +// +// + +#include "RegistryInfo.rh" + +RESOURCE REGISTRY_INFO theInfo +{ +dll_uid = 0x102722ba; +interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x1020d466; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x102722bb; + version_no = 1; + display_name = "Third test implementation of application launch checker"; + default_data = ""; + opaque_data = "some extra data"; + }, + IMPLEMENTATION_INFO + { + implementation_uid = 0x102722bc; + version_no = 1; + display_name = "Forth test implementation of application launch checker"; + default_data = ""; + opaque_data = ""; //some extra data + } + }; + } + }; +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/A0000B70.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/A0000B70.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,46 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "RegistryInfo.rh" + +RESOURCE REGISTRY_INFO theInfo +{ +dll_uid = 0xA0000B70; // Dll UId +interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x1020d466; //Uid for access to all implementations of rule-based interface + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0xA0000B6F; // Our Test Plugin for NonNative Applications + version_no = 1; + display_name = "Test implementation of Nonnative application launch checker"; + default_data = ""; + opaque_data = "some extra data"; + } + }; + } + }; +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/AppInfo_NoLocalisableGroupName.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/AppInfo_NoLocalisableGroupName.rh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined __APPINFO_NOLOCALISABLEGROUPNAME_RH__ +#define __APPINFO_NOLOCALISABLEGROUPNAME_RH__ + +#include + +STRUCT LOCALISABLE_APP_INFO__NO_GROUP_NAME + { + LONG reserved_long = 0; // reserved for future use, do not use + LLINK reserved_llink = 0; // reserved for future use, do not use + // + LTEXT short_caption(KMaxCaption) = ""; + STRUCT caption_and_icon; // CAPTION_AND_ICON_INFO + // + LEN WORD STRUCT view_list[]; // VIEW_DATA + } + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,22 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,74 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file app_ctrl.rss + @internalComponent - Internal Symbian test code +*/ + + +NAME HEWO + +#include +#include + +#include "App_CTRL.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + + + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="SimpleApp"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_Title { buf="SimpleApp used by T_Foreground"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL2.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL2.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,22 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL2.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL2.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,73 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file App_CTRL2.rss + @internalComponent - Internal Symbian test code +*/ + +NAME HEWO + +#include +#include + +#include "App_CTRL2.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + + + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="SimpleApp"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_Title { buf="SimpleApp used by T_Foreground App 2"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file App_CTRL2_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x13008ADE +RESOURCE APP_REGISTRATION_INFO + { + app_file = app_CTRL2; + attributes=KAppIsControlPanelItem; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_CTRL_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file App_CTRL_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x13008ACE +RESOURCE APP_REGISTRATION_INFO + { + app_file = app_CTRL; + attributes=KAppIsControlPanelItem; + localisable_resource_file="\\Resource\\Apps\\App_ctrl_loc"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_ctrl.MBM Binary file common/tools/ats/smoketest/localisation/apparchitecture/tef/App_ctrl.MBM has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/App_ctrl_loc.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/App_ctrl_loc.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file App_ctrl_loc.rss + @internalComponent - Internal Symbian test code +*/ + +#include +RESOURCE LOCALISABLE_APP_INFO + { + short_caption=STRING_Caption; + caption_and_icon= + { + CAPTION_AND_ICON_INFO + { + caption="Test icon"; + number_of_icons=1; + icon_file="Z:\\Resource\\Apps\\APP_CTRL.MBM"; + } + }; +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,28 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET ChildI.exe +TARGETTYPE exe +UID 0x100039CE 0x10207f84 +VENDORID 0x70000001 +SOURCEPATH . +SOURCE ChildI_Main.cpp +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE ChildI.RSS +HEADER +TARGETPATH /Resource/Apps +end + +START RESOURCE ChildI_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,72 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +NAME HEWO + +#include +#include +#include + +#include "ChildI.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="ChildPrI"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_ChildI { buf=" CHILD I !"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET ChildII.exe +TARGETTYPE exe +UID 0x100039CE 0x10207f85 +VENDORID 0x70000001 +SOURCEPATH . +SOURCE ChildII_Main.cpp +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE ChildII.RSS +HEADER +TARGETPATH /Resource/Apps +end + +START RESOURCE ChildII_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,72 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +NAME HEWO + +#include +#include +#include + +#include "ChildII.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="ChildII"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_ChildII { buf="CHILD II !"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,28 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,51 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET ChildIII.exe +TARGETTYPE exe +UID 0x100039CE 0x10207f86 +VENDORID 0x70000001 +SOURCEPATH . +SOURCE ChildIII_Main.cpp +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE ChildIII.RSS +HEADER +TARGETPATH /Resource/Apps +end + +START RESOURCE ChildIII_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EFSRV.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,73 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +NAME HEWO + +#include +#include +#include + +#include "ChildIII.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="ChildIII"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_ChildIII { buf="CHILD III !"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII_Main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII_Main.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,350 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A simple application containing a single view with the text "Child III !" drawn on it. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include "ChildIII.hrh" + + +#include +_LIT(KFilePath,"c:\\logs\\TestExecute\\Proc.txt"); +_LIT8(KTPass, "PASS"); +_LIT8(KTFail, "FAIL"); + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// + +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +// +// Constructor for the view. +// +CExampleAppView::CExampleAppView() + { + } + +// Static NewL() function to start the standard two +// phase construction. +// +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// +// Destructor for the view. +// +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +// Second phase construction. +// +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_CHILDIII); + // Control is a window owning control + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + + +// Drawing the view - in this example, +// consists of drawing a simple outline rectangle +// and then drawing the text in the middle. +// We use the Normal font supplied by the UI. +// +// In this example, we don't use the redraw +// region because it's easier to redraw to +// the whole client area. +// +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + // Font used for drawing text + const CFont* fontUsed; + + // Start with a clear screen + gc.Clear(); + // Draw an outline rectangle (the default pen + // and brush styles ensure this) slightly + // smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// + +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + TBool ProcessCommandParametersL(CApaCommandLine& aCommandLine); + //void PrepareToExit(); + void CompParentPidL(void); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + TProcessId iParentProcessId; + RFile iFile; + RFs iFs; + }; + +// The second phase constructor of the application UI class. +// The application UI creates and owns the one and only view. +// +void CExampleAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single application view in which to + // draw the text "Child III", passing into it + // the rectangle available to it. + iAppView = CExampleAppView::NewL(ClientRect()); + } + +// The app Ui owns the two views and is. +// therefore, responsible for destroying them +// +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +// Called by the UI framework when a command has been issued. +// In this example, a command can originate through a +// hot-key press or by selection of a menu item. +// The command Ids are defined in the .hrh file +// and are 'connected' to the hot-key and menu item in the +// resource file. +// Note that the EEikCmdExit is defined by the UI +// framework and is pulled in by including eikon.hrh +// +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + // Exit the application. The call is + // implemented by the UI framework. + + case EEikCmdExit: + Exit(); + break; + } + } + +TBool CExampleAppUi::ProcessCommandParametersL(CApaCommandLine& aCommandLine) + { + iParentProcessId=aCommandLine.ParentProcessId(); + CompParentPidL(); + return CEikAppUi::ProcessCommandParametersL(aCommandLine); + } + + +void CExampleAppUi::CompParentPidL() + { + TInt val; + TInt ret; + ret = User::GetTIntParameter(12, val); + if(ret == KErrNone) + { + User::LeaveIfError(iFs.Connect()); + TInt err = iFile.Create(iFs,KFilePath,EFileWrite | EFileShareAny); + if(err == KErrAlreadyExists) + { + iFile.Open(iFs,KFilePath,EFileWrite | EFileShareAny); + } + + if(val == iParentProcessId.Id()) + { + iFile.Write(KTPass); + } + else + { + iFile.Write(KTFail); + } + iFile.Close(); + iFs.Close(); + } + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +// The constructor of the document class just passes the +// supplied reference to the constructor initialisation list. +// The document has no real work to do in this application. +// +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + + +// This is called by the UI framework as soon as the +// document has been created. It creates an instance +// of the ApplicationUI. The Application UI class is +// an instance of a CEikAppUi derived class. +// +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +const TUid KUidChildIII = { 0x10207f86 }; + +// The function is called by the UI framework to ask for the +// application's UID. The returned value is defined by the +// constant KUidChildIIIe and must match the second value +// defined in the project definition file. +// +TUid CExampleApplication::AppDllUid() const + { + return KUidChildIII; + } + +// This function is called by the UI framework at +// application start-up. It creates an instance of the +// document class. +// + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } +// The entry point for the application code. It creates +// an instance of the CApaApplication derived +// class, CExampleApplication. +// + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildIII_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f86 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "ChildIII"; + localisable_resource_file = "\\resource\\apps\\ChildIII"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII_Main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII_Main.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,305 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A simple application containing a single view with the text "Child II !" drawn on it. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "ChildII.hrh" + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +// +// Constructor for the view. +// +CExampleAppView::CExampleAppView() + { + } + +// Static NewL() function to start the standard two +// phase construction. +// +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + + +// +// Destructor for the view. +// +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + + +// Second phase construction. +// +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_CHILDII); + // Control is a window owning control + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + + +// Drawing the view - in this example, +// consists of drawing a simple outline rectangle +// and then drawing the text in the middle. +// We use the Normal font supplied by the UI. +// +// In this example, we don't use the redraw +// region because it's easier to redraw to +// the whole client area. +// +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + // Font used for drawing text + const CFont* fontUsed; + + // Start with a clear screen + gc.Clear(); + // Draw an outline rectangle (the default pen + // and brush styles ensure this) slightly + // smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + +// The second phase constructor of the application UI class. +// The application UI creates and owns the one and only view. +// +void CExampleAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single application view in which to + // draw the text "Child II", passing into it + // the rectangle available to it. + iAppView = CExampleAppView::NewL(ClientRect()); + } + + +// The app Ui owns the two views and is. +// therefore, responsible for destroying them +// +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + + +// Called by the UI framework when a command has been issued. +// In this example, a command can originate through a +// hot-key press or by selection of a menu item. +// The command Ids are defined in the .hrh file +// and are 'connected' to the hot-key and menu item in the +// resource file. +// Note that the EEikCmdExit is defined by the UI +// framework and is pulled in by including eikon.hrh +// +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + // Exit the application. The call is + // implemented by the UI framework. + + case EEikCmdExit: + Exit(); + break; + } + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +// The constructor of the document class just passes the +// supplied reference to the constructor initialisation list. +// The document has no real work to do in this application. +// +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + + +// This is called by the UI framework as soon as the +// document has been created. It creates an instance +// of the ApplicationUI. The Application UI class is +// an instance of a CEikAppUi derived class. +// +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +const TUid KUidChildII = { 0X10207f85 }; + +// The function is called by the UI framework to ask for the +// application's UID. The returned value is defined by the +// constant KUidChildIIe and must match the second value +// defined in the project definition file. +// +TUid CExampleApplication::AppDllUid() const + { + return KUidChildII; + } + +// This function is called by the UI framework at +// application start-up. It creates an instance of the +// document class. +// +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +// The entry point for the application code. It creates +// an instance of the CApaApplication derived +// class, CExampleApplication. +// + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildII_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f85 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "ChildII"; + localisable_resource_file = "\\resource\\apps\\ChildII"; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI_Main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI_Main.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,309 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A simple application containing a single view with the text "Child I !" drawn on it. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include +//#include + +#include +#include "ChildI.hrh" +//#include "T_ProcStep.h" +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + + +// +// Constructor for the view. +// +CExampleAppView::CExampleAppView() + { + } + + +// Static NewL() function to start the standard two +// phase construction. +// +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + + +// +// Destructor for the view. +// +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + + +// Second phase construction. +// +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_CHILDI); + // Control is a window owning control + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + + } + + +// Drawing the view - in this example, +// consists of drawing a simple outline rectangle +// and then drawing the text in the middle. +// We use the Normal font supplied by the UI. +// +// In this example, we don't use the redraw +// region because it's easier to redraw to +// the whole client area. +// +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + // Font used for drawing text + const CFont* fontUsed; + + // Start with a clear screen + gc.Clear(); + // Draw an outline rectangle (the default pen + // and brush styles ensure this) slightly + // smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + + +// The second phase constructor of the application UI class. +// The application UI creates and owns the one and only view. +// +void CExampleAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single application view in which to + // draw the text "Child Process I !", passing into it + // the rectangle available to it. + iAppView = CExampleAppView::NewL(ClientRect()); + } + + +// The app Ui owns the two views and is. +// therefore, responsible for destroying them +// +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + + +// Called by the UI framework when a command has been issued. +// In this example, a command can originate through a +// hot-key press or by selection of a menu item. +// The command Ids are defined in the .hrh file +// and are 'connected' to the hot-key and menu item in the +// resource file. +// Note that the EEikCmdExit is defined by the UI +// framework and is pulled in by including eikon.hrh +// +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + // Exit the application. The call is + // implemented by the UI framework. + + case EEikCmdExit: + Exit(); + break; + } + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// + +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +// The constructor of the document class just passes the +// supplied reference to the constructor initialisation list. +// The document has no real work to do in this application. +// +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +// This is called by the UI framework as soon as the +// document has been created. It creates an instance +// of the ApplicationUI. The Application UI class is +// an instance of a CEikAppUi derived class. +// +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +// The entry point for the application code. It creates +// an instance of the CApaApplication derived +// class, CExampleApplication. +// +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +const TUid KUidChildI = { 0X10207f84 }; + +// The function is called by the UI framework to ask for the +// application's UID. The returned value is defined by the +// constant KUidChildIe and must match the second value +// defined in the project definition file. +// +TUid CExampleApplication::AppDllUid() const + { + return KUidChildI; + } + +// This function is called by the UI framework at +// application start-up. It creates an instance of the +// document class. +// + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ChildI_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f84 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "ChildI"; + localisable_resource_file = "\\resource\\apps\\ChildI"; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/CustomiseDefaultIconApp_loc.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/CustomiseDefaultIconApp_loc.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CustomiseDefaultIconApp_loc.rss + @internalComponent - Internal Symbian test code +*/ + +NAME SER1 + +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption = "CustomiseDefaultIconApp"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "CustomiseDefaultIconAppLong"; + number_of_icons = 0; + } + }; + + + + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/CustomiseDefaultIconApp_reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/CustomiseDefaultIconApp_reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CustomiseDefaultIconApp_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10208181 // UID of the application this registration file represents + + +RESOURCE APP_REGISTRATION_INFO + { + app_file="CustomiseDefaultIconApp"; + + localisable_resource_file="\\resource\\apps\\CustomiseDefaultIconApp_loc"; + localisable_resource_id=R_LAI; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,22 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,73 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file M_Ctrl.rss + @internalComponent - Internal Symbian test code +*/ + +NAME MCTL + +#include +#include + +#include "M_CTRL.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + + + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="M_CTRL"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_Title { buf="M_CTRL Control Plugin App"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL_V2.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL_V2.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,264 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +//#include "appfwk_test_AppUi.h" + +#include +#include "M_CTRL.hrh" +#include +#include + + +//const TInt KMinimalControlUidValue=98; +//const TInt KMinimalControlUidValue=0x13008AEE; //Changed in m_ctrl.mmp file + +//_LIT(KGlobalSemaphore, "GlobalSemaphore"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_TITLE); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + + // From CCoeAppUi + void HandleSystemEventL(const TWsEvent& aEvent); + +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + case EEikCmdExit: + Exit(); + break; + } + } + + +void CExampleAppUi::HandleSystemEventL(const TWsEvent& /*aEvent*/) + { +/* + RSemaphore semaphore; + + switch (*(TApaSystemEvent*)(aEvent.EventData())) + { + + case EApaSystemEventBroughtToForeground: + { + semaphore.OpenGlobal(KGlobalSemaphore); + semaphore.Signal(); + semaphore.Close(); + break; + } + default: + break; + } +*/ + } + + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +const TUid KUidSimpleApp = { 0x13008AEE }; + +TUid CExampleApplication::AppDllUid() const + { + return KUidSimpleApp; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL_loc.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL_loc.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file M_Ctrl_loc.rss + @internalComponent - Internal Symbian test code +*/ + +#include +RESOURCE LOCALISABLE_APP_INFO + { + short_caption="m_ctrl"; + caption_and_icon= + { + CAPTION_AND_ICON_INFO + { + caption="m_ctrl"; + //number_of_icons=1; + //icon_file="Z:\\Resource\\Apps\\M_CTRL.MBM"; + } + }; +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/M_CTRL_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file M_Ctrl_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x13008AEE +RESOURCE APP_REGISTRATION_INFO + { + app_file = "M_CTRL"; + attributes=KAppIsControlPanelItem; + localisable_resource_file="\\Resource\\Apps\\M_ctrl_loc"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ORIG_T_CaptionStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ORIG_T_CaptionStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1016 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test for GT0247 Bravo. +// CR0583: Apparc should allow short caption to be modified dynamically +// Test for UIKON GT0143 Typhoon Work Series 60 Changes. +// REQ758.1: Add support for short captions +// This test requires that tstapp.app has been built +// tstapp.mmp has RESOURCE tstapp_caption.rss what caption is built into the .rsc file +// tstapp_loc.rss decides what version of the caption file to include: +// tstapp01.rls +// tstapp02.rls +// tstapp03.rls +// tstapp04.rls +// tstapp05.rls +// tstappsc.rls +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "tstapp.h" // KUidTestApp defined here +#include "T_CaptionStep.h" +#include "appfwk_test_utils.h" +#include "appfwk_test.h" +#include "ticoncaptionoverride.h" //KUidTestIconCapOverride defined here +#include "TIconLoaderAndIconArrayForLeaks.h" + + +///////////////////////////////////////////////////////////////////////////////// +// +// global consts and declarations +// +///////////////////////////////////////////////////////////////////////////////// + + +_LIT(KTestTApaAppInfoCaptionEnglish,"TstCap UK"); +_LIT(KTestTApaAppInfoShortCaptionEnglish,"TC UK"); + +_LIT(KTestTApaAppInfoCaptionFrench,"TstCap FR"); +_LIT(KTestTApaAppInfoShortCaptionFrench,"TC FR"); + +_LIT(KTestTApaAppInfoCaptionGerman,"TstCap GE"); +_LIT(KTestTApaAppInfoShortCaptionGerman,"TC GE"); + +// If _loc.rss does not define Short Caption, it takes long caption +_LIT(KTestTApaAppInfoCaptionSpanish,"TstCap SP"); +_LIT(KTestTApaAppInfoShortCaptionSpanish,"TstCap SP"); + +// If _loc.rss does not define Caption, it takes app name +_LIT(KTestTApaAppInfoCaptionItalian,"tstapp"); +_LIT(KTestTApaAppInfoShortCaptionItalian,"TC IT"); + +_LIT(KTestTApaAppInfoCaptionDefault,"TstCap UK"); +_LIT(KTestTApaAppInfoShortCaptionDefault,"TC UK"); + +// Cenrep configuration details for English language +_LIT(KCenRepCaption, "CRTstCap UK"); +_LIT(KCenRepShortCaption, "CRTC UK"); +_LIT(KCenRepIconFilename, "Z:\\resource\\apps\\ticoncapoverride.mbm"); + +const TUid KUidIconCaptionRepository = {0x1028583d}; // Central Repository UID. +const TInt KTextSize = 100; + +///////////////////////////////////////////////////////////////////////////////// +// +// CT_CaptionStep +// +///////////////////////////////////////////////////////////////////////////////// + + +void CT_CaptionStep::ChangeLocaleL(TLanguage aLanguage) + { + // Change locale according to information in the HAL + _LIT(KLitLocaleDllNameBase, "ELOCL"); + _LIT(KLitLocaleDllNameExtension, ".LOC"); + RLibrary localeDll; + TBuf<16> localeDllName(KLitLocaleDllNameBase); + CleanupClosePushL(localeDll); + const TUidType uidType(TUid::Uid(0x10000079),TUid::Uid(0x100039e6)); + _LIT(TwoDigExt,".%02d"); + localeDllName.AppendFormat(TwoDigExt, aLanguage); + TInt error=localeDll.Load(localeDllName, uidType); + if (error==KErrNotFound) + { + localeDllName=KLitLocaleDllNameBase; + localeDllName.Append(KLitLocaleDllNameExtension); + error=localeDll.Load(localeDllName, uidType); + } + User::LeaveIfError(error); + User::LeaveIfError(UserSvr::ChangeLocale(localeDllName)); + CleanupStack::PopAndDestroy(&localeDll); + } + + +void CT_CaptionStep::DoLanguageTestL() + { + TLanguage language = User::Language(); // keep a copy to restore it later on. + + TInt ch = 0; + for (ch=0; ch < 6; ch++) + { + TLanguage languageToTest = ELangTest; // init to supress compiler remark + switch (ch) + { + case 0: + languageToTest=ELangEnglish; + INFO_PRINTF1(_L("--------- Testing English")); + break; + case 1: + languageToTest=ELangFrench; + INFO_PRINTF1(_L("--------- Testing French")); + break; + case 2: + languageToTest=ELangGerman; + INFO_PRINTF1(_L("--------- Testing German")); + break; + case 3: + languageToTest=ELangSpanish; + INFO_PRINTF1(_L("--------- Testing Spanish")); + break; + case 4: + languageToTest=ELangItalian; + INFO_PRINTF1(_L("--------- Testing Italian")); + break; + case 5: + languageToTest=ELangAmerican; + INFO_PRINTF1(_L("--------- Testing American")); + break; + default: + User::LeaveIfError(KErrNotSupported); + break; + }; + + // Change the locale + ChangeLocaleL(languageToTest); + TEST(User::Language() == languageToTest); + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + // Do the same set of tests for each language + TestCApaSystemControlListL(); + TestCApaDoorL(); + TestTApaAppInfoStreamsL(); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestTApaAppInfoL(), iLs.ClearAppInfoArray() ); + + INFO_PRINTF1(_L("Test for that language finished...")); + } + + // restore original locale, just in case... + ChangeLocaleL(language); + TEST(User::Language() == language); + } + +/** + @SYMTestCaseID t_caption_TestCApaSystemControlListL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check (short)caption by means of a control on the list CApaSystemControlList + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates a CApaSystemControlList and checks the value of (short)caption + by creating a CApaSystemControl from index 0 of CApaSystemControlList + + @SYMTestExpectedResults The (short)caption is set to a value not null (length is not zero) + */ +void CT_CaptionStep::TestCApaSystemControlListL() + { + INFO_PRINTF1(_L("Testing CApaSystemControlList... ")); + CApaSystemControlList* list=NULL; + User::LeaveIfError(FbsStartup()); + RFbsSession fbs; + User::LeaveIfError(fbs.Connect()); + TRAPD(ret, list=CApaSystemControlList::NewL(iFs)); + TEST(ret==KErrNone); + CApaSystemControl* control=list->Control(0); + TPtrC testShortCap=control->ShortCaption(); + TEST(testShortCap.Length()>0); + TPtrC testCap=control->Caption(); + TEST(testCap.Length()>0); + } + + +/** + @SYMTestCaseID t_caption_TestTApaAppInfoL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check appInfo contains the right (short)caption for the current test language. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test searches for KUidTestApp by calling GetNextApp until the UIDs match. + Once the right app is found, it retrieves its details by calling GetAppInfo(). + The (short)caption is check to ensure it matches the expected result. + + @SYMTestExpectedResults The (short)caption matches the one specified for the application, with the + american one being the default one. + */ +void CT_CaptionStep::TestTApaAppInfoL() + { + INFO_PRINTF1(_L("Testing GetAppInfo()... ")); + + // go through the list of apps until it finds KUidTestApp + TApaAppInfo appInfo; + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + FOREVER + { + TApaAppInfo info; + ret=iLs.GetNextApp(info); + TEST(ret==KErrNone); + if (info.iUid==KUidTestApp) + { + iLs.GetAppInfo(appInfo, info.iUid); + break; + } + } + + switch (User::Language()) + { + case ELangEnglish: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionEnglish); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionEnglish); + break; + case ELangFrench: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionFrench); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionFrench); + break; + case ELangGerman: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionGerman); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionGerman); + break; + case ELangSpanish: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionSpanish); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionSpanish); + break; + case ELangItalian: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionItalian); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionItalian); + break; + case ELangAmerican: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionDefault); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionDefault); + break; + default: + User::Leave(KErrNotSupported); + break; + }; + } + + +/** + @SYMTestCaseID t_caption_TestCApaDoorL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check the caption returned by a CApaDoor (a wrapper for an embedded document). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test starts by creating an active scheduler. + A CApaProcess is created, and a new CApaDocument is added to it using the specified + application factory. This document is then used to create a CApaDoor object which + is used to retrieve the test app caption. + + @SYMTestExpectedResults The (short)caption matches the one specified for the application, with the + american one being the default one. + */ +void CT_CaptionStep::TestCApaDoorL() + { + INFO_PRINTF1(_L("Testing CApaDoor... ")); + + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + CApaProcess* process=NULL; + TRAPD(ret,process = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + + CleanupStack::PushL(process); + + CApaDocument* doc=NULL; + TApaApplicationFactory appFact(KUidTestApp); + TRAP(ret,doc=process->AddNewDocumentL(appFact)); + TEST(ret==KErrNone); + + CApaDoor* door = NULL; + TRAP(ret,door=CApaDoor::NewL(iFs,*doc,TSize(400,400))); + TEST(ret==KErrNone); + + switch (User::Language()) + { + case ELangEnglish: + TEST(*door->Caption()==KTestTApaAppInfoCaptionEnglish); + break; + case ELangFrench: + TEST(*door->Caption()==KTestTApaAppInfoCaptionFrench); + break; + case ELangGerman: + TEST(*door->Caption()==KTestTApaAppInfoCaptionGerman); + break; + case ELangSpanish: + TEST(*door->Caption()==KTestTApaAppInfoCaptionSpanish); + break; + case ELangItalian: + TEST(*door->Caption()==KTestTApaAppInfoCaptionItalian); + break; + case ELangAmerican: + TEST(*door->Caption()==KTestTApaAppInfoCaptionDefault); + break; + default: + User::Leave(KErrNotSupported); + break; + }; + process->DestroyDocument(doc); + CleanupStack::PopAndDestroy(2); //process,scheduler + } + + +/** + @SYMTestCaseID t_caption_TestTApaAppInfoStreamsL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check TApaAppInfo streaming works as expected + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create and TApaAppInfo object with the KUidTestApp test app. + Also, create a temporal file, associates the file with a write stream, + and prepares the stream for writing. + When the object is externalized to the streem, we open a file containing a + read stream and prepares the stream for reading. + + @SYMTestExpectedResults The test case is completed without any errors or panics + */ +void CT_CaptionStep::TestTApaAppInfoStreamsL() + { + INFO_PRINTF1(_L("Testing TApaAppInfo streams... ")); + + TApaAppInfo appInfoShort(KUidTestApp, _L("z:\\sys\\bin\\tstapp.exe"), _L("TstCap UK"),_L("TC UK")); + TEST(appInfoShort.iShortCaption.Compare(_L("TC UK"))==0); + + TFileName tempFile=_L("c:\\system\\test\\TC_temp.txt"); + TInt ret = iFs.MkDirAll(tempFile); + if (ret != KErrNone && ret != KErrAlreadyExists) + User::LeaveIfError(ret); + + TApaAppInfo appInfo; + + RFileWriteStream writer; + writer.PushL(); + User::LeaveIfError(writer.Replace(iFs,tempFile,EFileWrite)); + TRAP(ret, appInfo.ExternalizeL(writer)); + TEST(ret==KErrNone); + writer.CommitL(); + CleanupStack::PopAndDestroy(&writer); + + RFileReadStream reader; + reader.PushL(); + User::LeaveIfError(reader.Open(iFs,tempFile,EFileRead)); + TRAP(ret, appInfo.InternalizeL(reader)); + TEST(ret==KErrNone); + + CleanupStack::PopAndDestroy(&reader); + + User::LeaveIfError(iFs.Delete(tempFile)); + } + + + +/** + @SYMTestCaseID APPFWK-APPARC-0041 APPFWK-APPARC-0042 APPFWK-APPARC-0043 APPFWK-APPARC-0044 APPFWK-APPARC-0045 APPFWK-APPARC-0046 + + @SYMPREQ PCHY-6FTLPK + + @SYMTestCaseDesc Test the RApaLsSession::SetAppShortCaption function, used to set the app's short caption. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call SetAppShortCaption() to set the caption and read it back using the GetApaAppInfo(). + + @SYMTestExpectedResults The returned short caption must match the one set by the SetAppShortCaption function. + */ +void CT_CaptionStep::DoShortCaptionTestL() + { + INFO_PRINTF1(_L("Testing SetAppShortCaptionL() for short caption changes... ")); + + _LIT(KShortCaption1, "SC1"); + _LIT(KShortCaption2, "SC2"); + _LIT(KShortCaption3, "SC3"); + _LIT(KShortCaption4, "SC4"); + _LIT(KShortCaption5, "SC5"); + + // keep a copy of the current language, and set it to a known one + TLanguage language = User::Language(); + ChangeLocaleL(ELangEnglish); + TEST(User::Language() == ELangEnglish); + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + // SetAppShortCaption should return KErrNotFound if it could not find the app + INFO_PRINTF1(_L(".....setting short caption for an unknown app")); + TInt err = iLs.SetAppShortCaption(KShortCaption1, ELangNone, TUid::Uid(0xFFF34556)); + TEST(err == KErrNotFound); + + // Set the NULL short caption i.e. "", should return KErrArgument, + INFO_PRINTF1(_L(".....setting an empty short caption")); + err = iLs.SetAppShortCaption(KNullDesC, ELangNone, KUidTestApp); + TEST(err == KErrArgument); + + // SetAppShortCaption should return KErrArgument if short caption > KApaMaxAppCaption + INFO_PRINTF1(_L(".....setting short caption of more then KApaMaxAppCaption length")); + HBufC* longCaption = HBufC::NewL(KApaMaxAppCaption+1); + longCaption->Des().SetLength(KApaMaxAppCaption+1); + err = iLs.SetAppShortCaption(*longCaption, ELangNone, KUidTestApp); + TEST(err == KErrArgument); + delete longCaption; + + // SetAppShortCaption should return KErrNone if short caption == KApaMaxAppCaption + INFO_PRINTF1(_L(".....setting short caption of same size as KApaMaxAppCaption")); + longCaption = HBufC::NewL(KApaMaxAppCaption); + longCaption->Des().SetLength(KApaMaxAppCaption); + err = iLs.SetAppShortCaption(*longCaption, ELangCatalan, KUidTestApp); // just testing the arg length, not actual values + TEST(err == KErrNone); + delete longCaption; + + // Set short caption of an app for the current locale language (ELangEnglish so far) + INFO_PRINTF1(_L(".....setting short caption of an app for the current locale language")); + err = iLs.SetAppShortCaption(KShortCaption1, ELangEnglish, KUidTestApp); + TEST(err == KErrNone); + TApaAppInfo appInfo; + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); + + // Check short caption remains updated after a refresh of the applist + INFO_PRINTF1(_L(".....checking short caption remains updated after a refresh of the applist")); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); + + // Check short caption remains updated after a locale change + INFO_PRINTF1(_L(".....checking short caption remains updated after a locale change")); + ChangeLocaleL(ELangJapanese); + TEST(User::Language() == ELangJapanese); // Japanese locale exists in epoc32 tree but not defined in test app + User::LeaveIfError(iLs.ForceRegistration(dummy)); + ChangeLocaleL(ELangEnglish); // back to English to see what happened in between + TEST(User::Language() == ELangEnglish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); + + // Set short caption of an app for a language which is not the current one (ELangFrench, for example) + INFO_PRINTF1(_L(".....setting short caption of an app for a language which is not the current one")); + err = iLs.SetAppShortCaption(KShortCaption2, ELangFrench, KUidTestApp); + TEST(err == KErrNone); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // English, the current app language, doesn't change... + ChangeLocaleL(ELangFrench); + TEST(User::Language() == ELangFrench); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption2); + + // Set short caption of an app for a language which the app does not include (ELangAmerican) + INFO_PRINTF1(_L(".....setting short caption of an app for a language which the app does not include")); + ChangeLocaleL(ELangAmerican); + TEST(User::Language() == ELangAmerican); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + err = iLs.SetAppShortCaption(KShortCaption2, ELangAmerican, KUidTestApp); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // American takes the default...so English...which has just been updated. + + // Set short caption of an app for all languages with ELangNone + INFO_PRINTF1(_L(".....setting short caption for all languages with ELangNone")); + err = iLs.SetAppShortCaption(KShortCaption3, ELangNone, KUidTestApp); + TEST(err == KErrNone); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // American takes the default...so English...which has just been updated. + ChangeLocaleL(ELangEnglish); + TEST(User::Language() == ELangEnglish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // English set individually ===> not updated by ELangNone + ChangeLocaleL(ELangFrench); + TEST(User::Language() == ELangFrench); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption2); // French set individually ===> not updated by ELangNone + ChangeLocaleL(ELangGerman); + TEST(User::Language() == ELangGerman); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption3); // German takes the one set by ELangNone + ChangeLocaleL(ELangItalian); + TEST(User::Language() == ELangItalian); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption3); // Italian takes the one set by ELangNone + ChangeLocaleL(ELangSpanish); + TEST(User::Language() == ELangSpanish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption3); // Spanish takes the one set by ELangNone + + // Set short caption of an app for a language which was set by the previous ELangNone + INFO_PRINTF1(_L(".....setting short caption of an app which was set by the previous ELangNone")); + ChangeLocaleL(ELangItalian); + TEST(User::Language() == ELangItalian); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + err = iLs.SetAppShortCaption(KShortCaption4, ELangItalian, KUidTestApp); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption4); + + // Repeat set short caption of an app for all languages with ELangNone + INFO_PRINTF1(_L(".....repeat setting short caption for all languages with ELangNone")); + err = iLs.SetAppShortCaption(KShortCaption5, ELangNone, KUidTestApp); + TEST(err == KErrNone); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption4); // Italian set individually ===> not updated by ELangNone + ChangeLocaleL(ELangEnglish); + TEST(User::Language() == ELangEnglish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // English set individually ===> not updated by ELangNone + ChangeLocaleL(ELangFrench); + TEST(User::Language() == ELangFrench); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption2); // French set individually ===> not updated by ELangNone + ChangeLocaleL(ELangGerman); + TEST(User::Language() == ELangGerman); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption5); // German takes the one set by ELangNone + ChangeLocaleL(ELangSpanish); + TEST(User::Language() == ELangSpanish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption5); // Spanish takes the one set by ELangNone + ChangeLocaleL(ELangAmerican); + TEST(User::Language() == ELangAmerican); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // American takes the default...so English...which has just been updated. + + // restore original settings.... + INFO_PRINTF1(_L(".....restoring original settings")); + ChangeLocaleL(language); + TEST(User::Language() == language); + // restore original short captions for all langs....(h4 doesn't perform reboots between tests) + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionEnglish, ELangEnglish, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionFrench, ELangFrench, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionGerman, ELangGerman, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionItalian, ELangItalian, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionSpanish, ELangSpanish, KUidTestApp) == KErrNone); + } + + +CT_CaptionStep::~CT_CaptionStep() + { + iFs.Close(); + iLs.Close(); + } + +CT_CaptionStep::CT_CaptionStep() + { + SetTestStepName(KT_CaptionStep); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0087 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the captions, icon configuration details have been retrieved properly from + the central repository settings and has the precedence over its resource file information. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A test application with its captions, icon details defined in a test central repository file + as well as resource file (suitable field values have been given for both cenrep and resource + configurations to identify it clearly). + Gets the information about the test application by passing its UID. + Check the given configuration details matches with central repository entries. +@SYMTestExpectedResults The given configuration details should match with central repository entries. +*/ + +void CT_CaptionStep::TestIconCaptionOverridesL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0087:TestIconCaptionOverridesL started...")); + + //Change the system language to English before starting the tests + TRAPD(ret,ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + + TApaAppInfo appInfo; + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + RFile file; + TBuf fileName; + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + file.FullName(fileName); + + //compare the captions, icon with values in CenRep file. + INFO_PRINTF1(_L("Compares Caption with value in CenRep...")); + TBuf cencap(KCenRepCaption); + + INFO_PRINTF2(_L("----Expected caption==>%S"), &cencap); + INFO_PRINTF2(_L("----Retrieved caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCenRepCaption); + INFO_PRINTF1(_L("Compares ShortCaption with the value in CenRep...")); + cencap.Zero(); + cencap.Copy(KCenRepShortCaption); + + INFO_PRINTF2(_L("----Expected short caption==>%S"), &cencap); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KCenRepShortCaption); + + INFO_PRINTF1(_L("Compares Icon file with the value in CenRep...")); + cencap.Zero(); + cencap.Copy(KCenRepIconFilename); + INFO_PRINTF2(_L("----Expected icon filename==>%S"), &cencap); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KCenRepIconFilename)==0); + + file.Close(); + INFO_PRINTF1(_L("APPFWK-APPARC-0087:TestIconCaptionOverridesL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0088 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the shortcaption is set through the API has got the precedence over central + repository and resource file customisation. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A test application with its short caption defined in central repository as well as in resource file. + Update the test application's short caption through API. + Gets the information about the test application by passing its UID. + Check whether the provided short caption matches with the one which has already been set through the API. +@SYMTestExpectedResults It should retrieve the short caption set through the API and match with the given short caption value. +*/ + +void CT_CaptionStep::TestApiPrecedenceOverCenRepConfigInfoL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0088:TestApiPrecedenceOverCenRepConfigInfoL started...")); + _LIT(KTApiShortCaption,"APITC UK"); + + TInt err = iLs.SetAppShortCaption(KTApiShortCaption, ELangEnglish, KUidTestIconCapOverride); + TEST(err == KErrNone); + + TApaAppInfo appInfo; + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + TBuf shortCaption(KTApiShortCaption); + + //compares the short caption with the value which has been set through API. + INFO_PRINTF1(_L("Compares short caption with the value that has been set through API...")); + INFO_PRINTF2(_L("----Expected short caption==>%S"), &shortCaption); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KTApiShortCaption); + + //Sets the short caption back to the actual one + INFO_PRINTF1(_L("Sets the short caption back to the actual one through API...")); + err = iLs.SetAppShortCaption(KCenRepShortCaption, ELangEnglish, KUidTestIconCapOverride); + TEST(err == KErrNone); + + INFO_PRINTF1(_L("APPFWK-APPARC-0088:TestApiPrecedenceOverCenRepConfigInfoL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0089 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the changes made in central repository is notified by the central repository + observer (CApaIconCaptionCenrepObserver), which watches for changes in the Central Repository + and updates the overrides when they occur. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A test application with its caption, icon configuration details defined in central repository file. + Access the central repository. + Update the test application short caption's value in the settings. + Get the information about the test application by passing its UID. + Check the short caption value retrieved from the central repository matches with the given information. +@SYMTestExpectedResults The given new short caption value should match with the central repository entry. +*/ +void CT_CaptionStep::TestCenRepChangeNotificationL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0089:TestCenRepChangeNotificationL started...")); + + //access central repository + CRepository* cenRep = CRepository::NewL(KUidIconCaptionRepository); + CleanupStack::PushL(cenRep); + + _LIT(KCenRepSC,"CRNTC UK"); + TUint32 shortCapKey = 0x00000001; // for English + + //update the short caption value in central repository. + TInt error = cenRep->Set(shortCapKey,KCenRepSC); + + //tests whether the process with WriteDeviceData capability can update the configuration settings. + TEST(error == KErrNone); + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + TApaAppInfo appInfo; + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + //compare the short caption with the updated value in central repository + INFO_PRINTF1(_L("Compares short caption with the updated value in CenRep...")); + TBuf shortCaption(KCenRepSC); + + INFO_PRINTF2(_L("----Expected short caption==>%S"), &shortCaption); + INFO_PRINTF2(_L("----Retrieved shortcaption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KCenRepSC); + + //sets the short caption back to the actual for other tests to work + error = cenRep->Set(shortCapKey,KCenRepShortCaption); + + // Force the applist to be updated (so test app gets new language settings) + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + CleanupStack::PopAndDestroy(cenRep); //cenRep object + INFO_PRINTF1(_L("APPFWK-APPARC-0089:TestCenRepChangeNotificationL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0090 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the caption, icon configuration details have been retrieved properly from the + Central Repository with respect to change in system language. + Tests if the particular language entry is not there in the central repository file, it will + then try to get the information from the resource file. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A multilingual test application with its caption, icon configuration details defined in central repository file. + Change the system language to French. + Gets the information about the test application by passing its UID. + Checks the retrieved captions, icon from Central Repository are in French. + Change the system language to German (the settings are not there for German in Central Repository). + Again gets the information about the test application by passing its UID. + Checks the retrieved captions, icon from the Resource file are in German. + Restores the system language to English. + Again gets the information about the test application by passing its UID. + Checks the retrieved captions, icon from Central Repository are in English. +@SYMTestExpectedResults All the retrieved Central Repository configuration details should match with the given details by changing + system language. +*/ + +void CT_CaptionStep::TestIconCaptionOverridesWithChangeLangL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0090:TestIconCaptionOverridesWithChangeLangL started...")); + + TInt ret = 0; + //French + _LIT(KCaptionFrench, "CRTstCap FR"); + _LIT(KShortCaptionFrench, "CRTC FR"); + _LIT(KIconFilenameFrench, "Z:\\resource\\apps\\svg_icon.svg"); + + //German + _LIT(KCaptionGerman, "TstCap GE"); + _LIT(KShortCaptionGerman, "TC GE"); + _LIT(KIconFilenameGerman, "Z:\\resource\\apps\\ticoncapoverride.mbm"); + + TApaAppInfo appInfo; + RFile file; + TBuf fileName; + + // Change the locale to French + INFO_PRINTF1(_L("Change the locale to French...")); + TRAP(ret,ChangeLocaleL(ELangFrench)); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("----System Language==>%d"), User::Language()); + + TEST(User::Language() == ELangFrench);//check language is set to French. + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + file.FullName(fileName); + + TBuf printString(KCaptionFrench); + + //compare the captions, icon in French with the value in central repository + INFO_PRINTF1(_L("Compares Caption with value in CenRep...")); + INFO_PRINTF2(_L("----Exepcted Caption in French==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved Caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCaptionFrench); + + INFO_PRINTF1(_L("Compares Short Caption with value in CenRep...")); + printString.Zero(); + printString.Copy(KShortCaptionFrench); + INFO_PRINTF2(_L("----Expected short caption in French==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KShortCaptionFrench); + + INFO_PRINTF1(_L("Compares Icon filename with value in CenRep...")); + printString.Zero(); + printString.Copy(KIconFilenameFrench); + INFO_PRINTF2(_L("----Expected icon filename in French==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KIconFilenameFrench)==0); + + //Change the locale to German. + INFO_PRINTF1(_L("Change the locale to German...")); + TRAP(ret,ChangeLocaleL(ELangGerman)); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("----System Language==>%d"), User::Language()); + TEST(User::Language() == ELangGerman);//check language is set to German. + + // Force the applist to be updated (so test app gets new language settings) + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + file.Close(); + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + + fileName.Zero(); + file.FullName(fileName); + + // The entry for language German is not there in Central repository so it compares + // the captions, icon in this language with the values in resource file. + INFO_PRINTF1(_L("Compares Caption with value in Resource file...")); + printString.Zero(); + printString.Copy(KCaptionGerman); + INFO_PRINTF2(_L("----Expected caption in German==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCaptionGerman); + + INFO_PRINTF1(_L("Compares short caption with value in Resource file...")); + printString.Zero(); + printString.Copy(KShortCaptionGerman); + INFO_PRINTF2(_L("----Expected short caption in German==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KShortCaptionGerman); + + INFO_PRINTF1(_L("Compares icon filename with value in Resource file...")); + printString.Zero(); + printString.Copy(KIconFilenameGerman); + INFO_PRINTF2(_L("----Expected icon filename in German==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KIconFilenameGerman)==0); + + // Change the locale to English for changing the settings back to the original + INFO_PRINTF1(_L("Change the locale back to English...")); + TRAP(ret,ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("----System Language==>%d"), User::Language()); + + TEST(User::Language() == ELangEnglish);//check language is set to English. + + // Force the applist to be updated (so test app gets new language settings) + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + file.Close(); + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + + fileName.Zero(); + file.FullName(fileName); + + //compare the captions, icon in English with the value in central repository + INFO_PRINTF1(_L("Compares Caption with value in CenRep...")); + printString.Zero(); + printString.Copy(KCenRepCaption); + INFO_PRINTF2(_L("----Expected caption in English==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCenRepCaption); + + INFO_PRINTF1(_L("Compares short caption with value in CenRep...")); + printString.Zero(); + printString.Copy(KCenRepShortCaption); + INFO_PRINTF2(_L("----Expected short caption==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + + TEST(appInfo.iShortCaption == KCenRepShortCaption); + INFO_PRINTF1(_L("Compares icon filename with value in CenRep...")); + printString.Zero(); + printString.Copy(KCenRepIconFilename); + INFO_PRINTF2(_L("----Expected icon filename==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KCenRepIconFilename)==0); + + INFO_PRINTF1(_L("APPFWK-APPARC-0090:TestIconCaptionOverridesWithChangeLangL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0091 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMDEF DEF125262 +@SYMTestCaseDesc Checks there is no memory leaks when CApaIconCaptionOverridesForApp & CApaIconCaptionCenrepObserver + objects are created and destroyed. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions Marks the Heap memory + Invokes the static method 'TestIconCaptionOverridesL()' defined in 'ticonloaderandiconarrayforleaks.dll', + that creates objects of CApaIconCaptionOverridesForApp, CApaIconCaptionCenrepObserver and deletes those. + And then tests, there is no memory leak from the creation to destruction of those objects. +@SYMTestExpectedResults There should be no memory leaks. +*/ + +void CT_CaptionStep::TestIconCaptionOverridesMemoryLeaksL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0091:TestIconCaptionOverridesMemoryLeaksL started...")); + __UHEAP_MARK; + TIconLoaderAndIconArrayForLeaks::TestIconCaptionOverridesL(); + __UHEAP_MARKEND; + INFO_PRINTF1(_L("APPFWK-APPARC-0091:TestIconCaptionOverridesMemoryLeaksL finished...")); + } + +void CT_CaptionStep::DoIconCaptionOverridesTestL() + { + TestIconCaptionOverridesL(); + TestIconCaptionOverridesWithChangeLangL(); + TestCenRepChangeNotificationL(); + TestIconCaptionOverridesMemoryLeaksL(); + TestApiPrecedenceOverCenRepConfigInfoL(); + } + +TVerdict CT_CaptionStep::doTestStepL() + { + INFO_PRINTF1(_L("Test T_Caption step started....\n")); + + // Connect to Servers + TEST(iFs.Connect() == KErrNone); + TEST(iLs.Connect() == KErrNone); + + // run language tests for the test caption + TRAPD(r, DoLanguageTestL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("DoLanguageTestL() finished with value '%d'\n"), r); + + // run icon caption overrides tests + TRAP(r, DoIconCaptionOverridesTestL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("DoIconCaptionOverridesTestL() finished with value '%d'\n"), r); + + // run shortcaption setting tests + TRAP(r, DoShortCaptionTestL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("DoShortCaptionTestL() finished with value '%d'\n"), r); + + + INFO_PRINTF1(_L("....test T_Caption step finished!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,28 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET ParentProcess.exe +TARGETTYPE exe +UID 0x100039CE 0x10207f87 +VENDORID 0x70000001 +SOURCEPATH . +SOURCE ParentProcess_Main.cpp +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE ParentProcess.RSS +HEADER +TARGETPATH /Resource/Apps +end + +START RESOURCE ParentProcess_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,71 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +NAME HEWO + +#include +#include +#include + +#include "ParentProcess.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="ParentPr"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +RESOURCE TBUF r_example_text_ParentProc { buf="Parent Process!"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess_Main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess_Main.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,309 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A simple application containing a single view with the text "Parent Process !" drawn on it. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "ParentProcess.hrh" + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// + +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +// +// Constructor for the view. +// +CExampleAppView::CExampleAppView() + { + } + + +// Static NewL() function to start the standard two +// phase construction. +// +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + + +// +// Destructor for the view. +// +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + + +// Second phase construction. +// +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_PARENTPROC); + // Control is a window owning control + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + + +// Drawing the view - in this example, +// consists of drawing a simple outline rectangle +// and then drawing the text in the middle. +// We use the Normal font supplied by the UI. +// +// In this example, we don't use the redraw +// region because it's easier to redraw to +// the whole client area. +// +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + // Font used for drawing text + const CFont* fontUsed; + + // Start with a clear screen + gc.Clear(); + // Draw an outline rectangle (the default pen + // and brush styles ensure this) slightly + // smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// + +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + +// The second phase constructor of the application UI class. +// The application UI creates and owns the one and only view. +// +void CExampleAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single application view in which to + // draw the text "Parent Process !", passing into it + // the rectangle available to it. + iAppView = CExampleAppView::NewL(ClientRect()); + } + + +// The app Ui owns the two views and is. +// therefore, responsible for destroying them +// +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + + +// Called by the UI framework when a command has been issued. +// In this example, a command can originate through a +// hot-key press or by selection of a menu item. +// The command Ids are defined in the .hrh file +// and are 'connected' to the hot-key and menu item in the +// resource file. +// Note that the EEikCmdExit is defined by the UI +// framework and is pulled in by including eikon.hrh +// +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + // Exit the application. The call is + // implemented by the UI framework. + + case EEikCmdExit: + Exit(); + break; + } + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// + +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +// The constructor of the document class just passes the +// supplied reference to the constructor initialisation list. +// The document has no real work to do in this application. +// +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + + +// This is called by the UI framework as soon as the +// document has been created. It creates an instance +// of the ApplicationUI. The Application UI class is +// an instance of a CEikAppUi derived class. +// +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +// The entry point for the application code. It creates +// an instance of the CApaApplication derived +// class, CExampleApplication. +// + +const TUid KUidParentProcess = { 0x10207f87 }; + +// The function is called by the UI framework to ask for the +// application's UID. The returned value is defined by the +// constant KUidParentProcess and must match the second value +// defined in the project definition file. +// +TUid CExampleApplication::AppDllUid() const + { + return KUidParentProcess; + } + +// This function is called by the UI framework at +// application start-up. It creates an instance of the +// document class. +// +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ParentProcess_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f87 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "ParentProcess"; + localisable_resource_file = "\\resource\\apps\\ParentProcess"; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,254 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a support app used by apparc\tsrc\t_foreground +// Test for UIKON GT0143 Typhoon Work Series 60 Changes +// REQ758.8: Change TApaTask::BringToForeground to send a +// EApaSystemEventBroughtToForeground to the relevant window group +// t_foreground sends a window server message to this app, this +// message is handled in CExampleAppUi::HandleSystemEventL +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "SimpleApparcTestApp.hrh" + +#include + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_TITLE); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + + // From CCoeAppUi + void HandleSystemEventL(const TWsEvent& aEvent); + +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + case EEikCmdExit: + Exit(); + break; + } + } + + +void CExampleAppUi::HandleSystemEventL(const TWsEvent& aEvent) + { + switch (*(TApaSystemEvent*)(aEvent.EventData())) + { + case EApaSystemEventBroughtToForeground: + RProcess::Rendezvous(KErrNone); + break; + default: + break; + } + } + + + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +const TUid KUidSimpleApparcTestApp = { 0X12008ACE }; + +TUid CExampleApplication::AppDllUid() const + { + return KUidSimpleApparcTestApp; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,22 @@ +// Copyright (c) 2000-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2000-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + +#include + +target SimpleApparcTestApp.EXE +TARGETTYPE exe + +targetpath /SYS/BIN +UID 0x100039CE 0x12008ACE +VENDORID 0x70000001 +CAPABILITY All -Tcb +epocstacksize 0x5000 + +SOURCEPATH . +SOURCE SimpleApparcTestApp.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +// Application exe specific resource which is localised to the application +RESOURCE SimpleApparcTestApp.rss +start resource SimpleApparcTestApp.rss +targetpath /resource/apps +lang sc +end + + +// Application exe registration resource file +START RESOURCE SimpleApparcTestApp_reg.rss +TARGETPATH /private/10003a3f/apps +lang sc +END + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,74 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +NAME HEWO + +#include +#include + +#include "SimpleApparcTestApp.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + + + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="SimpleApparcTestApp"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_Title { buf="SimpleApparcTestApp used by T_Foreground"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp_Reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/SimpleApparcTestApp_Reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x12008ACE // application UID + +RESOURCE APP_REGISTRATION_INFO + { + + app_file = "SimpleApparcTestApp"; + + hidden = KAppNotHidden; + embeddability = KAppNotEmbeddable; + newfile = KAppDoesNotSupportNewFile; + } + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbedUids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbedUids.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_APP_EMBED_UIDS_H__) +#define __T_APP_EMBED_UIDS_H__ + +const TUid KUidAppNotEmbeddable = { 0x10004c47 }; +const TUid KUidAppEmbeddable = { 0x10004c48 }; +const TUid KUidAppEmbeddableOnly = { 0x10004c49 }; +const TUid KUidAppEmbeddableUiOrStandAlone = { 0x10004c4A }; +const TUid KUidAppEmbeddableUiNotStandAlone = { 0x10004c4B }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,231 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by other test programs that need +// to query the apparc server for applications which define +// different embeddability values in their AIF files. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "TAppEmbedUids.h" + +_LIT(KExampleText, "This test application defines KAppEmbeddable in it's AIF file"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // from CEikAppUi + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + iAppView = CExampleAppView::NewL(ClientRect()); + HandleCommandL(EEikCmdExit); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +TUid CExampleApplication::AppDllUid() const + { + return KUidAppEmbeddable; + } + +TFileName CExampleApplication::ResourceFileName() const +{ + return TFileName(); // this app doesn't have a resource file +} + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +LOCAL_D const TImplementationProxy ImplementationTable[]= + { + IMPLEMENTATION_PROXY_ENTRY(0x10004c48, NewApplication) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableOnly.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableOnly.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,231 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by other test programs that need +// to query the apparc server for applications which define +// different embeddability values in their AIF files. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "TAppEmbedUids.h" + +_LIT(KExampleText, "This test application defines KAppEmbeddableOnly in it's AIF file"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // from CEikAppUi + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +TUid CExampleApplication::AppDllUid() const + { + return KUidAppEmbeddableOnly; + } + +TFileName CExampleApplication::ResourceFileName() const +{ + return TFileName(); // this app doesn't have a resource file +} + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +LOCAL_D const TImplementationProxy ImplementationTable[]= + { + IMPLEMENTATION_PROXY_ENTRY(0x10004c49, NewApplication) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableOnly_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableOnly_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TAppEmbeddableOnly_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c49 + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TAppEmbeddableOnly"; + // + hidden=KAppNotHidden; + embeddability=KAppEmbeddableOnly; + newfile=KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableOnly_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableOnly_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddableOnly.mmp +// +// + +#include + +TARGET TAppEmbeddableOnly.dll +TARGETTYPE PLUGIN +TARGETPATH /sys/bin +UID 0x10009d8d 0x10004c5C + +CAPABILITY All -Tcb +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TAppEmbeddableOnly.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/Ecom + +MW_LAYER_SYSTEMINCLUDE + +//reg added for Datacaging +START RESOURCE TAppEmbeddableOnly_reg.rss +TARGETPATH /private/10003a3f/apps +END + +START RESOURCE 10004c5C.rss +TARGET TAppEmbeddableOnly.rsc +END + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY ECOM.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiNotStandAlone.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiNotStandAlone.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,230 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by other test programs that need +// to query the apparc server for applications which define +// different embeddability values in their AIF files. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include "TAppEmbedUids.h" + +#include +#include + +_LIT(KExampleText, "This test application defines KAppEmbeddableUiNotStandAlone in it's AIF file"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // from CEikAppUi + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +TUid CExampleApplication::AppDllUid() const + { + return KUidAppEmbeddableUiNotStandAlone; + } + +TFileName CExampleApplication::ResourceFileName() const +{ + return TFileName(); // this app doesn't have a resource file +} + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +LOCAL_D const TImplementationProxy ImplementationTable[]= + { + IMPLEMENTATION_PROXY_ENTRY(0x10004c4B, NewApplication) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiNotStandAlone_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiNotStandAlone_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TAppEmbeddableUiNotStandAlone_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c4B + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TAppEmbeddableUiNotStandAlone"; + // + hidden=KAppNotHidden; + embeddability=KAppEmbeddableUiNotStandAlone; + newfile=KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiNotStandAlone_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiNotStandAlone_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,52 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddableUiNotStandAlone.mmp +// +// + +#include + +TARGET TAppEmbeddableUiNotStandAlone.dll +TARGETPATH /sys/bin +TARGETTYPE PLUGIN +UID 0x10009d8d 0x10004c5E + +CAPABILITY All -Tcb +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TAppEmbeddableUiNotStandAlone.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/Ecom + +MW_LAYER_SYSTEMINCLUDE + +//reg added for Datacaging +START RESOURCE TAppEmbeddableUiNotStandAlone_reg.rss +TARGETPATH /private/10003a3f/apps +END + +START RESOURCE 10004c5E.rss +TARGET TAppEmbeddableUiNotStandAlone.rsc +END + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY ECOM.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandAlone.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandAlone.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,230 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by other test programs that need +// to query the apparc server for applications which define +// different embeddability values in their AIF files. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include "TAppEmbedUids.h" + +#include +#include + +_LIT(KExampleText, "This test application defines KAppEmbeddableUiOrStandAlone in it's AIF file"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // from CEikAppUi + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +TUid CExampleApplication::AppDllUid() const + { + return KUidAppEmbeddableUiOrStandAlone; + } + +TFileName CExampleApplication::ResourceFileName() const +{ + return TFileName(); // this app doesn't have a resource file +} + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +LOCAL_D const TImplementationProxy ImplementationTable[]= + { + IMPLEMENTATION_PROXY_ENTRY(0x10004c4A, NewApplication) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandAlone_embedded.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandAlone_embedded.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddableUiOrStandAlone.mmp +// +// + +#include + +TARGET TAppEmbeddableUiOrStandAlone_embedded.dll +TARGETTYPE PLUGIN +TARGETPATH /sys/bin +UID 0x10009d8d 0x10004c5D + +CAPABILITY All -Tcb +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TAppEmbeddableUiOrStandAlone.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/Ecom + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE 10004c5D.rss +TARGET TAppEmbeddableUiOrStandAlone_embedded.rsc +END + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY ECOM.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandAlone_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandAlone_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TAppEmbeddableUiOrStandAlone_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c4A + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TAppEmbeddableUiOrStandAlone"; + // + hidden=KAppNotHidden; + embeddability=KAppEmbeddableUiOrStandAlone; + newfile=KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandalone_standalone.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandalone_standalone.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// "stub" to start the application architecture with the ECom UID +// The actual standalone file. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include + +const TUid KTAppEmbeddableUid = {0x10004c4A}; //use original UID of app (before it was converted from app to exe) +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(KTAppEmbeddableUid); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandalone_standalone.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddableUiOrStandalone_standalone.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Standalone TAppEmbeddableUiOrStandalone.mmp +// +// + + + + TARGET TAppEmbeddableUiOrStandalone.exe + TARGETTYPE exe + +TARGETPATH /sys/bin +UID 0x100039CE 0x10004c4A //the original UID +VENDORID 0x70000001 +CAPABILITY All -Tcb + + +SOURCEPATH . +SOURCE TAppEmbeddableUiOrStandalone_standalone.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview //added this from original? + +//reg added for Datacaging +START RESOURCE TAppEmbeddableUiOrStandAlone_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY euser.lib apparc.lib eikcore.lib cone.lib //added cone.lib from original? diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_embedded.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_embedded.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppEmbeddable.mmp +// +// + +#include + +TARGET TAppEmbeddable_embedded.dll +TARGETPATH /sys/bin +TARGETTYPE PLUGIN +UID 0x10009d8d 0x10004c5B + +CAPABILITY All -Tcb +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TAppEmbeddable.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/Ecom +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE 10004c5B.rss +TARGET TAppEmbeddable_embedded.rsc +END + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY ECOM.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TAppEmbeddable_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c48 + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TAppEmbeddable"; + // + hidden=KAppNotHidden; + embeddability=KAppEmbeddable; + newfile=KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_standalone.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_standalone.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// "stub" to start the application architecture with the ECom UID +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include + +const TUid KTAppEmbeddableUid = {0x10004c48}; //use original UID of app (before it was converted from app to exe) +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(KTAppEmbeddableUid); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_standalone.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppEmbeddable_standalone.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Standalone TAppEmbeddable.mmp +// +// + + + + TARGET TAppEmbeddable.exe + TARGETTYPE exe + +CAPABILITY All -Tcb //do standalone need this too? + +UID 0x100039CE 0x10004c48 //the original UID +VENDORID 0x70000001 +TARGETPATH /sys/bin +EPOCSTACKSIZE 0x5000 + +SOURCEPATH . +SOURCE TAppEmbeddable_standalone.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +//reg added for Datacaging +START RESOURCE TAppEmbeddable_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY euser.lib apparc.lib eikcore.lib cone.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,181 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Source file for the testing T_AppListFileUpdateStep test step. +// TestAppInstall.cpp is a simple Hello World GUI application. +// In test build of ..\..\apparc\group TestAppInstall.RSC is created. +// T_SyncAppListAndFileUpdate installs the RSC file into C:\private\10003a3f\import\apps +// and Tests that Modified time after installation of RSC is more than +// Modified time before installation. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + + +#include "TestAppInstall.h" + +const TUid KUidTestAppInstall = { 0x102826DD }; + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the application class - CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +TUid CExampleApplication::AppDllUid() const + { + return KUidTestAppInstall; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the appui class - CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the view class - CExampleAppView +// +//////////////////////////////////////////////////////////////////////// + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_TESTAPP); + + // Control is a window owning control + CreateWindowL(); + + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); // Window graphics context + TRect drawRect = Rect(); // Area in which we shall draw + const CFont* fontUsed; // Font used for drawing text + + // Start with a clear screen + gc.Clear(); + + // Draw an outline rectangle (the default pen and brush styles ensure this) slightly smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + + // Finished using the font + gc.DiscardFont(); + } + + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the document class - CExampleDocument +// +//////////////////////////////////////////////////////////////////////// + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,119 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The class definitions for the simple application for testing using T_SynAppListAndFileUpdate.cpp +// containing a single view with the text "App Installed !" drawn on it. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __TESTAPPINSTALL_H +#define __TESTAPPINSTALL_H + +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include "testappinstall.hrh" + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,30 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,51 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET TestAppInstall.exe +TARGETTYPE exe +UID 0x100039CE 0x102826DD +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TestAppInstall.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE TestAppInstall.RSS +HEADER +TARGETPATH /Resource/Apps +end + +START RESOURCE TestAppInstall_reg.rss +TARGETPATH /apparctest +END + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib gdi.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,88 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +NAME TEAP + +#include +#include +#include + +#include "TestAppInstall.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="TestAppInstall"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_TestApp { buf="TestAppInstall!"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption = "TAI"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "TestAppInstall"; + number_of_icons = 3; // each icon must be a bitmap/mask pair + icon_file = "z:\\resource\\apps\\TestAppInstall.mbm"; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppInstall/TestAppInstall_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x102826DD // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TestAppInstall"; + localisable_resource_file = "\\resource\\apps\\TestAppInstall"; + localisable_resource_id = R_LAI; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppLaunchChecker.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppLaunchChecker.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +TARGET TAppLaunchChecker.dll +CAPABILITY All -Tcb +TARGETTYPE PLUGIN +VENDORID 0x70000001 + +// ECom Dll recognition UID followed by the unique dll UID +UID 0x10009D8D 0x1020d465 + +SOURCEPATH ../tef +SOURCE TAppLaunchChecker.cpp + +USERINCLUDE ../tef +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom + +start resource 1020d465.rss +target TAppLaunchChecker.rsc + +end + +LIBRARY euser.lib +LIBRARY ECom.lib +LIBRARY apfile.lib +LIBRARY ws32.lib +LIBRARY apgrfx.lib +LIBRARY apparc.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppLaunchChecker2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppLaunchChecker2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +TARGET TAppLaunchChecker2.dll +CAPABILITY All -Tcb +TARGETTYPE PLUGIN +VENDORID 0x70000001 + +// ECom Dll recognition UID followed by the unique dll UID +UID 0x10009D8D 0x102722ba + +SOURCEPATH ../tef +SOURCE TAppLaunchChecker2.cpp +TARGETPATH /sys/bin + +USERINCLUDE ../tef +SYSTEMINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom + +start resource 102722ba.rss +target TAppLaunchChecker2.rsc +end + +LIBRARY euser.lib +LIBRARY ECom.lib +LIBRARY ws32.lib +LIBRARY apgrfx.lib +LIBRARY apfile.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppNotEmbeddable.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppNotEmbeddable.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,217 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by other test programs that need +// to query the apparc server for applications which define +// different embeddability values in their AIF files. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "TAppEmbedUids.h" + +_LIT(KExampleText, "This test application defines KAppNotEmbeddable in it's AIF file"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // from CEikAppUi + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +TUid CExampleApplication::AppDllUid() const + { + return KUidAppNotEmbeddable; + } + +TFileName CExampleApplication::ResourceFileName() const +{ + return TFileName(); // this app doesn't have a resource file +} + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppNotEmbeddable_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppNotEmbeddable_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TAppNotEmbeddable_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c47 + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TAppNotEmbeddable"; + // + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppNotEmbeddable_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TAppNotEmbeddable_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TAppNotEmbeddable.mmp +// +// + +#include + +TARGET TAppNotEmbeddable.exe +TARGETTYPE exe + +CAPABILITY All -Tcb +UID 0x100039CE 0x10004c47 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TAppNotEmbeddable.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +TARGETPATH /sys/bin + +//reg added for Datacaging +START RESOURCE TAppNotEmbeddable_reg.rss +TARGETPATH /private/10003a3f/apps +END + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB + +epocstacksize 0x5000 diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,593 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// @file +// @internalComponent - Internal Symbian test code +// This is a support app used by Apparc\tef\TApparcTestServer (TApparc4Step in particular) +// This application covers the following tests for the static objects +// Test 1 : Existing CCoeStatic derived objects using the 2 parameter +// constructor must be destroyed before the app ui. +// Way to test this, +// Case 1: Get hold of a particular static using CCoeEnv::Static(TUid aUid) +// in an application's override of CEikAppUi::PrepareToExit() and confirm the +// returned pointer is not null. +// Case 2: Then, the same thing is done in the app ui's destructor to check that +// the pointer is now null. +// Test 2: A static constructed with a negative priority should be accessible from the +// app ui's destructor, but then destroyed before another static that has a lower priority value. +// Way to test this, +// Case 1: Construct a static (A) using the 3 parameter constructor, specifying a negative priority. +// Then construct another static (B) specifying a priority (A's priority - 1). +// Check that static A is still non-null when accessed from the app ui's destructor. +// Case 2: Then check that static A is null when accessed from B's destructor. +// Test 3: Given two statics with different positive priorities, +// the higher priority one should be destroyed first. +// Way to test this, +// Case 1: If (for example) static A has priority EDefaultDestructionPriority, +// and static B has EDefaultDestructionPriority-1, A's destructor should be able to access B, +// Case 2: But B's destructor shouldn't be able to access A. +// Test 4: Statics with priorities immediately either side of the pre/post-destroy app ui should be destroyed before/after the app ui. Should also test that +// the first negative priority static is destroyed and not "skipped over" when the code calculates +// which static should be destroyed next after the app ui has been destroyed. +// Way to test this, +// Case 1: We could create statics A, B and C with priority zero, -1 and -2 respectively. +// Then check in the app ui destructor that A is null, and B and C are both non-null. +// Case 2: Then in B's destructor check that C is still non-null. +// Case 3: And in C's destructor check that B is now null. +// +// + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ////TKAS added for exe-app + +#include + +// File which stores the test results +_LIT(KApparcTestResultsFileName, "c:\\system\\Apparctest\\ApparcTestResultsFile.txt"); +_LIT(KApparcTestDir, "c:\\system\\Apparctest\\"); + +_LIT8(KTestPass ,"PASS\r\n"); +_LIT8(KTestFail,"FAIL\r\n"); + +_LIT8(KApparcTest1,"Test1:"); +_LIT8(KApparcTest2,"Test2:"); +_LIT8(KApparcTest3,"Test3:"); +_LIT8(KApparcTest4,"Test4:"); +_LIT8(KApparcTestCase1,"Case1:"); +_LIT8(KApparcTestCase2,"Case2:"); +_LIT8(KApparcTestCase3,"Case3:"); + +const TUid KUidApparcTestApp = {0x100048F3}; + +// Uids for diffent classes for static +const TUid KUidTestStatic = {0x13003ACE}; +const TUid KUidTestStaticNegativePrioA = {0x13004ACE}; +const TUid KUidTestStaticNegativePrioB = {0x13005ACE}; +const TUid KUidTestStaticPosPriA = {0x13006ACE}; +const TUid KUidTestStaticPosPriB = {0x13007ACE}; +const TUid KUidTestStaticPriZeroA= {0x13009ACE}; +const TUid KUidTestStaticPriOneB = {0x1300AACE}; +const TUid KUidTestStaticPriTwoC = {0x1300BACE}; + +// Priorities for static objects +enum {ENegativePriortyStaticA = -3}; +enum {EPriorityTwoStaticC= -2,EPriorityOneStaticB = -1,EPriorityZeroStaticA= 0}; + +// static class for Test case 1 +class CTApparcTestStatic : public CCoeStatic + { +public: + inline CTApparcTestStatic(RFile& aFile); + inline static CTApparcTestStatic* Self(); + ~CTApparcTestStatic(); + RFile iFile; + }; + +CTApparcTestStatic::~CTApparcTestStatic() + { + } + +// Static class with negative priority for Test case 2. +class CTApparcTestNegativePrioStaticA : public CCoeStatic + { +public: + inline CTApparcTestNegativePrioStaticA(RFile& aFile); + inline static CTApparcTestNegativePrioStaticA* Self(); + ~CTApparcTestNegativePrioStaticA(); + + RFile& iFile; + }; + +// Static class with negative priority for Test case 2. (priority less than CTApparcTestNegativePrioStaticA) +class CTApparcTestNegativePrioStaticB : public CCoeStatic + { +public: + inline CTApparcTestNegativePrioStaticB(); + inline static CTApparcTestNegativePrioStaticB* Self(); + ~CTApparcTestNegativePrioStaticB(); + + RFile iFile; + RFs iFs; + }; + +CTApparcTestNegativePrioStaticA::~CTApparcTestNegativePrioStaticA() + { + } + +CTApparcTestNegativePrioStaticB::~CTApparcTestNegativePrioStaticB() + { + // Test 2, Case 2 + CTApparcTestNegativePrioStaticA* testCoeStaticA = CTApparcTestNegativePrioStaticA::Self(); + iFile.Write(KApparcTest2); + iFile.Write(KApparcTestCase2); + + if(testCoeStaticA == NULL) + iFile.Write(KTestPass); + else + iFile.Write(KTestFail); + + // CTApparcTestNegativePrioStaticB class object is the most negative prioritised + // static objects .Hence the file and session handles are closed here as no + // more logging is required hereafter. + iFile.Close(); + iFs.Close(); + } + +// Static class with positive priority for Test case 3: +class CTApparcTestPosPrioStaticA : public CCoeStatic + { +public: + inline CTApparcTestPosPrioStaticA(RFile& aFile); + inline static CTApparcTestPosPrioStaticA* Self(); + ~CTApparcTestPosPrioStaticA(); + + RFile& iFile; + }; + +// static class with positive priority less than CTApparcTestPosPrioStaticA for Test case 3. +class CTApparcTestPosPrioStaticB : public CCoeStatic + { +public: + inline CTApparcTestPosPrioStaticB(RFile& aFile); + inline static CTApparcTestPosPrioStaticB* Self(); + ~CTApparcTestPosPrioStaticB(); + + RFile& iFile; + }; + +CTApparcTestPosPrioStaticA::~CTApparcTestPosPrioStaticA() + { + // Test 3 , Case 1 + CTApparcTestPosPrioStaticB* testPosPrioStaticB = CTApparcTestPosPrioStaticB::Self(); + iFile.Write(KApparcTest3); + iFile.Write(KApparcTestCase1); + + if(testPosPrioStaticB != NULL) + iFile.Write(KTestPass); + else + iFile.Write(KTestFail); + } + +CTApparcTestPosPrioStaticB::~CTApparcTestPosPrioStaticB() + { + // Test 3 , Case 2 + CTApparcTestPosPrioStaticA* testPosPrioStaticA = CTApparcTestPosPrioStaticA::Self(); + iFile.Write(KApparcTest3); + iFile.Write(KApparcTestCase2); + + if(testPosPrioStaticA == NULL) + iFile.Write(KTestPass); + else + iFile.Write(KTestFail); + } + +// static class with priority 0 for test case 4 +class CTApparcTestPrioZeroStaticA : public CCoeStatic + { +public: + inline CTApparcTestPrioZeroStaticA(RFile& aFile); + inline static CTApparcTestPrioZeroStaticA* Self(); + ~CTApparcTestPrioZeroStaticA(); + + RFile& iFile; + }; + +// static class with priority -1 for test case 4 +class CTApparcTestPrioOneStaticB : public CCoeStatic + { +public: + inline CTApparcTestPrioOneStaticB(RFile& aFile); + inline static CTApparcTestPrioOneStaticB* Self(); + ~CTApparcTestPrioOneStaticB(); + + RFile& iFile; + }; + +// static class with priority -2 for test case 4 +class CTApparcTestPrioTwoStaticC : public CCoeStatic + { +public: + inline CTApparcTestPrioTwoStaticC(RFile& aFile); + inline static CTApparcTestPrioTwoStaticC* Self(); + ~CTApparcTestPrioTwoStaticC(); + + RFile& iFile; + }; + + +CTApparcTestPrioZeroStaticA::~CTApparcTestPrioZeroStaticA() + { + } + +CTApparcTestPrioOneStaticB::~CTApparcTestPrioOneStaticB() + { + // Test 4 , Case 2 + CTApparcTestPrioTwoStaticC* testPrioTwoCoeStaticC = CTApparcTestPrioTwoStaticC::Self(); + iFile.Write(KApparcTest4); + iFile.Write(KApparcTestCase2); + + if(testPrioTwoCoeStaticC != NULL) + iFile.Write(KTestPass); + else + iFile.Write(KTestFail); + } + +CTApparcTestPrioTwoStaticC::~CTApparcTestPrioTwoStaticC() + { + // Test 4 , Case 3 + CTApparcTestPrioOneStaticB* testPrioOneCoeStaticB = CTApparcTestPrioOneStaticB::Self(); + iFile.Write(KApparcTest4); + iFile.Write(KApparcTestCase3); + + if(testPrioOneCoeStaticB == NULL) + iFile.Write(KTestPass); + else + iFile.Write(KTestFail); + } + +//////////////////////////////////////////////////////////////////////// +// +// CTApparcTestAppView +// +//////////////////////////////////////////////////////////////////////// +class CTApparcTestAppView : public CCoeControl + { +public: + static CTApparcTestAppView* NewL(const TRect& aRect); + CTApparcTestAppView(); + ~CTApparcTestAppView(); + void ConstructL(const TRect& aRect); +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iApparcTestText; + }; + +CTApparcTestAppView::CTApparcTestAppView() + { + } + +CTApparcTestAppView* CTApparcTestAppView::NewL(const TRect& aRect) + { + CTApparcTestAppView* self = new(ELeave) CTApparcTestAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CTApparcTestAppView::~CTApparcTestAppView() + { + delete iApparcTestText; + } + +void CTApparcTestAppView::ConstructL(const TRect& aRect) + { + iApparcTestText = iEikonEnv->AllocReadResourceL(R_TAPPARCTEST_TEXT_TITLE); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CTApparcTestAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed = iEikonEnv->TitleFont(); + + gc.Clear(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iApparcTestText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// CTApparcTestAppUi +// +//////////////////////////////////////////////////////////////////////// + +class CTApparcTestAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CTApparcTestAppUi(); +private: + // Inherirted from class CEikAppUi + void PrepareToExit(); + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + + +void CTApparcTestAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CTApparcTestAppView::NewL(ClientRect()); + + // Constructs the static object for tests + CTApparcTestNegativePrioStaticB* testCoeStaticB = new(ELeave)CTApparcTestNegativePrioStaticB(); + + CTApparcTestStatic* testCoeStatic = new (ELeave)CTApparcTestStatic(testCoeStaticB->iFile); + CTApparcTestNegativePrioStaticA* testCoeStaticA = new(ELeave)CTApparcTestNegativePrioStaticA(testCoeStaticB->iFile); + CTApparcTestPrioTwoStaticC* testPrioTwoStaticC = new(ELeave) CTApparcTestPrioTwoStaticC(testCoeStaticB->iFile); + CTApparcTestPosPrioStaticA* testPosPriStaticA = new(ELeave) CTApparcTestPosPrioStaticA(testCoeStaticB->iFile); + CTApparcTestPosPrioStaticB* testPosPriStaticB = new(ELeave) CTApparcTestPosPrioStaticB(testCoeStaticB->iFile); + CTApparcTestPrioZeroStaticA* testPrioZeroStaticA = new(ELeave) CTApparcTestPrioZeroStaticA(testCoeStaticB->iFile); + CTApparcTestPrioOneStaticB* testPrioOneStaticB = new(ELeave) CTApparcTestPrioOneStaticB(testCoeStaticB->iFile); + + // to get rid of compiler warnings + if(testCoeStatic==NULL || testCoeStaticA == NULL || testCoeStaticB == NULL|| testPosPriStaticA ==NULL || + testPosPriStaticB == NULL || testPrioZeroStaticA == NULL || testPrioOneStaticB == NULL|| testPrioTwoStaticC == NULL) + return; + } + +CTApparcTestAppUi::~CTApparcTestAppUi() + { + CTApparcTestNegativePrioStaticB* testNegStaticB = CTApparcTestNegativePrioStaticB::Self(); + // Test 1, Case 2 + CTApparcTestStatic* testCoeStatic = CTApparcTestStatic::Self(); + testNegStaticB->iFile.Write(KApparcTest1); + testNegStaticB->iFile.Write(KApparcTestCase2); + + if(testCoeStatic == NULL) + testNegStaticB->iFile.Write(KTestPass); + else + testNegStaticB->iFile.Write(KTestFail); + + // Test 2, Case 1 + CTApparcTestNegativePrioStaticA* testCoeStaticA = CTApparcTestNegativePrioStaticA::Self(); + testNegStaticB->iFile.Write(KApparcTest2); + testNegStaticB->iFile.Write(KApparcTestCase1); + + if(testCoeStaticA != NULL) + testNegStaticB->iFile.Write(KTestPass); + else + testNegStaticB->iFile.Write(KTestFail); + + // Test 4, Case 1 + CTApparcTestPrioZeroStaticA* testPrioZeroCoeStaticA = CTApparcTestPrioZeroStaticA::Self(); + CTApparcTestPrioOneStaticB* testPrioOneCoeStaticB = CTApparcTestPrioOneStaticB::Self(); + CTApparcTestPrioTwoStaticC* testPrioTwoCoeStaticC = CTApparcTestPrioTwoStaticC::Self(); + testNegStaticB->iFile.Write(KApparcTest4); + testNegStaticB->iFile.Write(KApparcTestCase1); + + if(testPrioZeroCoeStaticA == NULL && testPrioOneCoeStaticB != NULL && testPrioTwoCoeStaticC != NULL) + testNegStaticB->iFile.Write(KTestPass); + else + testNegStaticB->iFile.Write(KTestFail); + + delete iAppView; + } + +void CTApparcTestAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + +void CTApparcTestAppUi::PrepareToExit() + { + CEikAppUi::PrepareToExit(); + // Test 1, Case 1 + CTApparcTestStatic* testCoeStatic = CTApparcTestStatic::Self(); + + testCoeStatic->iFile.Write(KApparcTest1); + testCoeStatic->iFile.Write(KApparcTestCase1); + + if(testCoeStatic != NULL) + testCoeStatic->iFile.Write(KTestPass); + else + testCoeStatic->iFile.Write(KTestFail); + } + +//////////////////////////////////////////////////////////////////////// +// +// CTApparcTestDocument +// +//////////////////////////////////////////////////////////////////////// + +class CTApparcTestDocument : public CEikDocument + { +public: + static CTApparcTestDocument* NewL(CEikApplication& aApp); + CTApparcTestDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CTApparcTestDocument::CTApparcTestDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CTApparcTestDocument::CreateAppUiL() + { + return new(ELeave) CTApparcTestAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// CTApparcTestApplication +// +//////////////////////////////////////////////////////////////////////// + +class CTApparcTestApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + }; + +TUid CTApparcTestApplication::AppDllUid() const + { + return KUidApparcTestApp; + } + +CApaDocument* CTApparcTestApplication::CreateDocumentL() + { + return new (ELeave) CTApparcTestDocument(*this); + } + +EXPORT_C CApaApplication* NewApplication() + { + return new CTApparcTestApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + + + +// +// inline functions +// + +// inline function for CTApparcTestStatic +inline CTApparcTestStatic::CTApparcTestStatic(RFile& aFile) + : CCoeStatic(KUidTestStatic),iFile(aFile) + { + } + +inline CTApparcTestStatic* CTApparcTestStatic::Self() + { + return STATIC_CAST(CTApparcTestStatic*,CCoeEnv::Static(KUidTestStatic)); + } + +// inline functions for CTApparcTestNegativePrioStaticA +inline CTApparcTestNegativePrioStaticA::CTApparcTestNegativePrioStaticA(RFile& aFile) + : CCoeStatic(KUidTestStaticNegativePrioA,ENegativePriortyStaticA),iFile(aFile) + { + } + +inline CTApparcTestNegativePrioStaticA* CTApparcTestNegativePrioStaticA::Self() + { + return STATIC_CAST(CTApparcTestNegativePrioStaticA*,CCoeEnv::Static(KUidTestStaticNegativePrioA)); + } + +// inline functions for CTApparcTestNegativePrioStaticB +inline CTApparcTestNegativePrioStaticB::CTApparcTestNegativePrioStaticB() + : CCoeStatic(KUidTestStaticNegativePrioB,ENegativePriortyStaticA - 1) + { + User::LeaveIfError(iFs.Connect()); + TInt err = iFs.MkDirAll(KApparcTestDir); + + err = iFile.Create(iFs,KApparcTestResultsFileName,EFileWrite | EFileShareAny); + if(err == KErrAlreadyExists) + iFile.Open(iFs,KApparcTestResultsFileName,EFileWrite | EFileShareAny); + } + +inline CTApparcTestNegativePrioStaticB* CTApparcTestNegativePrioStaticB::Self() + { + return STATIC_CAST(CTApparcTestNegativePrioStaticB*,CCoeEnv::Static(KUidTestStaticNegativePrioB)); + } + +// inline functions for CTApparcTestPosPrioStaticA +inline CTApparcTestPosPrioStaticA::CTApparcTestPosPrioStaticA(RFile& aFile) + : CCoeStatic(KUidTestStaticPosPriA,EDefaultDestructionPriority),iFile(aFile) + { + } + +inline CTApparcTestPosPrioStaticA* CTApparcTestPosPrioStaticA::Self() + { + return STATIC_CAST(CTApparcTestPosPrioStaticA*,CCoeEnv::Static(KUidTestStaticPosPriA)); + } + +// inline functions for CTApparcTestPosPrioStaticB +inline CTApparcTestPosPrioStaticB::CTApparcTestPosPrioStaticB(RFile& aFile) + : CCoeStatic(KUidTestStaticPosPriB,EDefaultDestructionPriority-1),iFile(aFile) + { + } + +inline CTApparcTestPosPrioStaticB* CTApparcTestPosPrioStaticB::Self() + { + return STATIC_CAST(CTApparcTestPosPrioStaticB*,CCoeEnv::Static(KUidTestStaticPosPriB)); + } + +// inline functions for CTApparcTestPrioZeroStaticA +inline CTApparcTestPrioZeroStaticA::CTApparcTestPrioZeroStaticA(RFile& aFile) + : CCoeStatic(KUidTestStaticPriZeroA,EPriorityZeroStaticA),iFile(aFile) + { + } + +inline CTApparcTestPrioZeroStaticA* CTApparcTestPrioZeroStaticA::Self() + { + return STATIC_CAST(CTApparcTestPrioZeroStaticA*,CCoeEnv::Static(KUidTestStaticPriZeroA)); + } + +// inline functions for CTApparcTestPrioOneStaticB +inline CTApparcTestPrioOneStaticB::CTApparcTestPrioOneStaticB(RFile& aFile) + : CCoeStatic(KUidTestStaticPriOneB,EPriorityOneStaticB),iFile(aFile) + { + } + +inline CTApparcTestPrioOneStaticB* CTApparcTestPrioOneStaticB::Self() + { + return STATIC_CAST(CTApparcTestPrioOneStaticB*,CCoeEnv::Static(KUidTestStaticPriOneB)); + } + +// inline functions for CTApparcTestPrioTwoStaticC +inline CTApparcTestPrioTwoStaticC::CTApparcTestPrioTwoStaticC(RFile& aFile) + : CCoeStatic(KUidTestStaticPriTwoC,EPriorityTwoStaticC),iFile(aFile) + { + } + +inline CTApparcTestPrioTwoStaticC* CTApparcTestPrioTwoStaticC::Self() +{ + return STATIC_CAST(CTApparcTestPrioTwoStaticC*,CCoeEnv::Static(KUidTestStaticPriTwoC)); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,64 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + +#include + +TARGETPATH /sys/bin +TARGET tapparctestapp.exe +TARGETTYPE exe + + +epocstacksize 0x5000 + + +CAPABILITY All -Tcb +UID 0x100039CE 0x100048F3 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE tapparctestapp.cpp + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include ../inc +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +RESOURCE tApparctestapp.rss + +START RESOURCE tApparctestapp.rss +HEADER +TARGETPATH /resource/apps +END + +START RESOURCE tApparctestapp_reg.rss +TARGETPATH /private/10003a3f/import/apps +END + +START RESOURCE tApparctestapp_loc.rss +TARGETPATH /resource/apps +LANG sc +END + +LIBRARY apparc.lib +LIBRARY cone.lib +LIBRARY efsrv.lib +LIBRARY eikcore.lib +LIBRARY euser.lib +LIBRARY gdi.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,63 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TApparcTestApp.rss + @internalComponent - Internal Symbian test code +*/ + + +NAME TCON + +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_tconetest_hotkeys; + menubar=r_tconetest_menubar; + } + +RESOURCE HOTKEYS r_tconetest_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_tconetest_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_tconetest_first_menu; txt="tconetest"; } + }; + } + +RESOURCE MENU_PANE r_tconetest_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +RESOURCE TBUF r_tapparctest_text_Title { buf="tapparctest for static objects"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TApparcTestApp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TApparcTestApp_reg.rss + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x100048F3 // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="TApparcTestApp"; + localisable_resource_file="\\resource\\apps\\tapparctestapp_loc.rss"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/10207f88.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/10207f88.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +// INCLUDES +#include +#include "TBufferOnlyRecUid.hrh" + +// RESOURCE DEFINITIONS +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = KBufferOnlyRecDllUid; + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // Const for all Data Recognizers + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = KBufferOnlyRecImplUid; + version_no = 1; + display_name = "TBufferOnlyRec"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } + +// End of File diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRec.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRec.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,86 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TBufferOnlyRec.h" +#include "TBufferOnlyRecUid.hrh" +#include + +enum TMimeTypes + { + EMimeType = 0, + ELastType + }; + + +_LIT8(KMimeType,"text/plain"); + +CBufferOnlyRec::CBufferOnlyRec() +: CApaDataRecognizerType(TUid::Uid(KBufferOnlyRecDllUid), CApaDataRecognizerType::ENormal) + { + iCountDataTypes = ELastType; + iRecogs = 0; + } + +CApaDataRecognizerType* CBufferOnlyRec::CreateRecognizerL() + { + return new(ELeave) CBufferOnlyRec; + } + +TUint CBufferOnlyRec::PreferredBufSize() + { + return 250; + } + +TDataType CBufferOnlyRec::SupportedDataTypeL(TInt aIndex) const + { + if (aIndex != EMimeType) + { + User::Leave(KErrNotSupported); + } + return TDataType(KMimeType); + } + +void CBufferOnlyRec::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& aBuffer) + { + if (aBuffer.CompareC(_L8("Text_TestRecognizer")) == 0) + { + iDataType = TDataType(KMimeType); + iConfidence = ECertain; + } + else if (aBuffer.CompareC(_L8("AnotherText")) == 0) + { + iDataType = TDataType(KNullDesC8); + iConfidence = EProbable; + } + else + { + iDataType = TDataType(KNullDesC8); + iConfidence = ENotRecognized; + } + iRecogs++; + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KBufferOnlyRecImplUid, + CBufferOnlyRec::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy( + TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRec.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRec.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef TBUFFERONLYREC_H +#define TBUFFERONLYREC_H + +#include +#include + +class CBufferOnlyRec : public CApaDataRecognizerType + { +public: // Constructors and destructor + CBufferOnlyRec(); + static CApaDataRecognizerType* CreateRecognizerL(); + +public: // Functions from base classes + TUint PreferredBufSize(); + TDataType SupportedDataTypeL(TInt aIndex) const; + void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + +private: + TInt iRecogs; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRec.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRec.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TBufferOnlyRec.dll Test application recogniser +// +// + + + +/** + @file +*/ + +target TBufferOnlyRec.dll +targettype plugin + +uid 0x10009d8d 0x10207f88 + +CAPABILITY ALL -Tcb + +VENDORID 0x70000001 + +systeminclude /EPOC32/INCLUDE/ECOM + +SOURCEPATH . +systeminclude ../../INC +systeminclude /EPOC32/INCLUDE /EPOC32/INCLUDE/TEST + +source TBufferOnlyRec.cpp + +library EUSER.LIB APMIME.LIB APPARC.LIB + +START resource 10207f88.rss +target TBufferOnlyRec.rsc +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRecUid.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TBufferOnlyRec/TBufferOnlyRecUid.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,24 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef TBUFFERONLYRECUID_HRH +#define TBUFFERONLYRECUID_HRH + +// Recognizer UIDs +#define KBufferOnlyRecDllUid 0x10207f88 +#define KBufferOnlyRecImplUid 0x10207f89 + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TCmdLineExe.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TCmdLineExe.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,84 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TCmdLineExe.CPP - to test commandline APIS +// This exe is called in testCmdLinesAPIsL in T_CmdlnStep.CPP +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include "T_CmdlnStep.h" + + +// Global functions + +/** This function gets the file handle from the commandline object. It returns KErrNone when successful in reading + a file else it returns a system-wide error +*/ + +TInt DoReadFileL() + { + RFile file; + TBuf8<8> fileRead; + CApaCommandLine* cmdLine; + TInt ret(0); + ret = CApaCommandLine::GetCommandLineFromProcessEnvironment(cmdLine); + User::LeaveIfError(ret); + CleanupStack::PushL(cmdLine); + + cmdLine->GetFileByHandleL(file); + ret = file.Read(fileRead); + file.Close(); + CleanupStack::PopAndDestroy(cmdLine); + return ret; + } + +GLDEF_C TInt E32Main() + { + + + __UHEAP_MARK; + CTrapCleanup *cleanup=CTrapCleanup::New(); + + if(cleanup == NULL) + { + return KErrNoMemory; + } + TInt val(0); + + TRAPD(err,val= DoReadFileL()); + delete(cleanup); + __UHEAP_MARKEND; + + if((err==KErrNone) && (val ==KErrNone )) + { + return KFileHandleTestPassed; + } + else + { + return KErrGeneral; + } + + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TCmdLineExe.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TCmdLineExe.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// TCmdLineExe.mmp + + +target TCmdLineExe.EXE +targettype EXE +targetpath /system/programs\ + +UID 0x10208180 +VENDORID 0x70000001 + +SOURCEPATH ../TEF + +userinclude ../TEF +systeminclude ../INC +systeminclude /EPOC32/INCLUDE /EPOC32/INCLUDE/TEST + +source TCmdLineExe.CPP + +userinclude ../../uiftestfw/inc + +library EUSER.LIB APPARC.LIB EFSRV.LIB APPFWK_TEST_APPUI.LIB + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TCtrlPnlApp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TCtrlPnlApp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,38 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TCtrlPnlApp +// +// + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f79 +RESOURCE APP_REGISTRATION_INFO + { + app_file="TCtrlPnlApp"; + attributes=KAppIsControlPanelItem; + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/plain"; } + }; + file_ownership_list = + { + FILE_OWNERSHIP_INFO { file_name="C:\\System\\file2"; } + }; + service_list = + { + SERVICE_INFO { uid = 0x10101010;} + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TDoNothingFileRecognizer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TDoNothingFileRecognizer.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,77 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include + +/** Recognizer doing nothing for checking the defect DEF039651. + Change Apparc's TRecognizerName in a similar way to EMime's was in DEF037809" */ + +class CDoNothingFileRec : public CApaFileRecognizerType + { +public: // from CApaFileRecognizerType + static CApaFileRecognizerType* CreateRecognizerL(); + TThreadId RunL(TApaCommand aCommand,const TDesC* aDocFileName=NULL,const TDesC8* aTailEnd=NULL) const; +private: // from CApaFileRecognizerType + TRecognizedType DoRecognizeFileL(RFs& aFs,TUidType aType); + }; + +TThreadId CDoNothingFileRec::RunL(TApaCommand /*aCommand*/,const TDesC* /*aDocFileName*/,const TDesC8* /*aTailEnd*/) const + { + TThreadId id(NULL); + return id; + } + +CApaFileRecognizerType::TRecognizedType CDoNothingFileRec::DoRecognizeFileL(RFs& /*aFs*/,TUidType /*aType*/) + { + return iRecognizedType; + } + + + +CApaFileRecognizerType* CDoNothingFileRec::CreateRecognizerL() + { + CDoNothingFileRec* doNothingFileRec=new (ELeave) CDoNothingFileRec(); + return doNothingFileRec; + //return new (ELeave) CExampleFileRecognizer (); + } + +const TImplementationProxy ImplementationTable[] = +{ +IMPLEMENTATION_PROXY_ENTRY(0x101DC568, CDoNothingFileRec::CreateRecognizerL) +}; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +GLDEF_C TInt E32Dll( + ) + +// DLL entry point + + { + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TDoNothingFileRecognizer_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TDoNothingFileRecognizer_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TDONOTHINGFILERECOGNIZER.MMP +// +// + +#include + +target TDONOTHINGFILERECOGNIZER.DLL +capability All -Tcb +targettype PLUGIN +UID 0x10009D8D 0x10000180 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TDoNothingFileRecognizer.CPP +SYSTEMINCLUDE /epoc32/include +systeminclude /epoc32/include/ecom + +MW_LAYER_SYSTEMINCLUDE + +library EUSER.LIB APPARC.LIB + +start resource 10000180.RSS +TARGET TDONOTHINGFILERECOGNIZER.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/102032A5.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/102032A5.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Resource File for the Test Data Recognizer TESTREC \n +// +// + + + +/** + @file 102032A5.rss +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x102032A5; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // need to create this uid in the uid database + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x102032A6; + version_no = 1; + display_name = "TestREC"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/TESTREC.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/TESTREC.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,198 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Defines a data recognizer +// Defines a test recognizer class which recognizes data type "test/plain".\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "testrec.h" + +/** + + Recognizer used as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + FunctionDesc : Constructor for the recognizer of data type "test\plain" . + + */ + +CAppTestRecognizer::CAppTestRecognizer() + :CApaDataRecognizerType(KUidTestTxtRecognizer,CApaDataRecognizerType::ELow) + // Text files are low recognition - they don't have a clear signature + { + iCountDataTypes=1; + } + +/** + + Recognizer used as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + FunctionDesc : Specifies the buffer size required by the data type + + */ +TUint CAppTestRecognizer::PreferredBufSize() + { + return KMaxBufferLength; + } + +/** + + Recognizer used as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + FunctionDesc : Returns the data type supported : test\plain + + */ +#if defined(_DEBUG) +TDataType CAppTestRecognizer::SupportedDataTypeL(TInt aIndex) const +#else +TDataType CAppTestRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const +#endif + { + __ASSERT_DEBUG(aIndex==0,User::Invariant()); + return TDataType(KDataTypeTestPlain); + } + + /** + + Recognizer used as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + FunctionDesc : Should recognize the data type of the file. + Called by the RecognizeL function. + Checks if the first three bytes are valid uids.If yes the file is not a plain/test + Verifies if the file extension is .test + Checks for characters that wont be in a text file. + + */ +void CAppTestRecognizer::DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer) + { + TBool nameRecognized=EFalse; + + // check if the file has valid UIDs + if (aBuffer.Length() >= 16) + { + // if the first 3 bytes are valid UIDs,then this file is not a plain/test. + // Set iConfidence appropriately and exit. + const TCheckedUid checkUid(aBuffer.Left(16)); + if (checkUid.UidType().IsValid()) + { + iConfidence=ENotRecognized; + return; + } + } + + // Compare if the file extension is .TEST + if (aName.Length()>4) + { + nameRecognized=(aName.Right(5).CompareF(KTestFileExt)==0); + } + + const TInt length=Min(aBuffer.Length(), KMaxBufferLength); + + if (length13 && chr<32)) + { + break; + } + if (chr>148) + { + break; + } + } + const TBool validChars=(index==length); + + if (nameRecognized) + { + iConfidence=validChars? EProbable : EUnlikely; + } + else + { + if (!validChars) + { + return; + } + iConfidence=EPossible; + } + iDataType=TDataType(KDataTypeTestPlain); + } + +/** + + Recognizer used as part of CommandLine tests + + + @SYMPREQ 280 File Handle Support + + FunctionDesc : Creates an instance of the recognizer . + + */ + +CApaDataRecognizerType* CAppTestRecognizer::CreateRecognizerL() + { + return new (ELeave) CAppTestRecognizer(); + } + +/** + + Recognizer used as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + Desc : Implementation table specifying the implementation uid . + + */ +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KTestTxtRecognizerValue,CAppTestRecognizer::CreateRecognizerL) + }; + +/** + + Recognizer used as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + FunctionDesc : Returns the implementation table. + + + */ +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/TESTREC.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/TESTREC.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Header File for the data recognizer +// Declares a test recognizer class which recognizes data type "test/plain".\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__TESTREC_H__) +#define __TESTREC_H__ + +#if !defined(__APMREC_H__) +#include +#endif + +#include +#include + +class CAppTestRecognizer : public CApaDataRecognizerType + { +public: // from CApaDataRecognizerType + CAppTestRecognizer(); + TUint PreferredBufSize(); + TDataType SupportedDataTypeL(TInt aIndex) const; + //for ECOM + static CApaDataRecognizerType* CreateRecognizerL(); +private: // from CApaFileRecognizerType + void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + +const TInt KTestTxtRecognizerValue=0x102032A6; +const TUid KUidTestTxtRecognizer={0x102032A6}; +const TInt KMinBufferLength=42; // minimum amount of file needed to determine a text file IF it's not called .TEST +const TInt KMaxBufferLength=1024; // maximum amount of buffer space we will ever use +_LIT8(KDataTypeTestPlain,"test/plain"); +_LIT(KTestFileExt,".TEST"); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/TESTREC.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TESTREC/TESTREC.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ + +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TESTREC.dll Test application recogniser +// +// + + + +/** + @file +*/ + +target TESTREC.DLL +targettype plugin + +uid 0x10009d8d 0x102032A5 +CAPABILITY ALL -Tcb + +VENDORID 0x70000001 + +systeminclude /EPOC32/INCLUDE/ECOM + +SOURCEPATH . +systeminclude ../../INC +systeminclude /EPOC32/INCLUDE /EPOC32/INCLUDE/TEST + +source TESTREC.CPP + +library EUSER.LIB APMIME.LIB APPARC.LIB + +START resource 102032A5.rss +target testrec.rsc +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEXE.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEXE.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,91 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include + +//const TInt KTexeUidValue=0x10004c6b; +//const TUid KUidTExe={KTexeUidValue}; + +// Global functions + + +void DoThings(const TApaCommandLine& aCommandLine) + { + RTest test(_L("TEXE")); + test.Title(); + test.Start(_L("The test dxe has been loaded.")); + test.Printf(_L("\n")); + test.Printf(aCommandLine); + test.Printf(_L("\n")); + test.End(); + test.Close(); + } + + +// dll/exe bits + + +/** +#if defined(__WINS__) + +EXPORT_C TInt EntryPoint(TAny* aParam) + { + __UHEAP_MARK; + CTrapCleanup *cleanup=CTrapCleanup::New(); + // + TApaCommandLine& docName=*(TApaCommandLine*)aParam; + DoThings(docName); + // + delete(cleanup); + __UHEAP_MARKEND; + return(0); + } + + +GLDEF_C TInt E32Dll(TDllReason) + { + return(KErrNone); + } + +#else +*/ + +GLDEF_C TInt E32Main() + { + __UHEAP_MARK; + CTrapCleanup *cleanup=CTrapCleanup::New(); + // + TApaCommandLine commandline; + User::CommandLine(commandline); + + DoThings(commandline); + // + delete(cleanup); + __UHEAP_MARKEND; + return(0); + } + +// #endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEXE_V2.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEXE_V2.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// TEXE.MMP for test component TEXE (released in APPARC) +// + +target TEXE.EXE +targettype EXE +targetpath /sys/bin\ + +UID 0x100039CE 0x10004c6b +VENDORID 0x70000001 + +SOURCEPATH ../TEF // source files + +userinclude ../TEF +systeminclude ../INC // your public include directory should be here +systeminclude /EPOC32/INCLUDE + +source TEXE.CPP + +library EUSER.LIB + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,214 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include +#include +#include +#include "EndTaskTestApp.h" +#include "EndTaskTestAppExternalInterface.h" + +/** +Standard DLL entry point function. +Creates and returns an instance of the CApaApplication-derived class. + +@return an instance of the CApaApplication-derived class +*/ +TInt E32Main() + { + return EikStart::RunApplication( CEndTaskTestApplication::NewApplication ); + } + +/** +Default constructor +*/ +CEndTaskTestApplication::CEndTaskTestApplication() + { + } + +/** +Virtual destructor +*/ +CEndTaskTestApplication::~CEndTaskTestApplication() + { + } + +/** +@return The application's UID +*/ +TUid CEndTaskTestApplication::AppDllUid() const + { + const TUid dll = {KUidEndTaskAppUid}; + return dll; + } + +/** +@return CEndTaskTestApplication or NULL if KErrNoMemory +*/ +CApaApplication* CEndTaskTestApplication::NewApplication() + { + // As the framework has at this point not started up enough, and therefore the TRAP-harness and + // exception handlers aren’t available yet, this factory function is a non-leaving function and + // can't use the new(Eleave) operator. + return new CEndTaskTestApplication(); + } + +/** +Called by the UI framework at application start-up to create an instance of the document class. + +@leave KErrNoMemory +@return A CExampleDocument +*/ +CApaDocument* CEndTaskTestApplication::CreateDocumentL() + { + return CEndTaskTestDocument::NewL(*this); + } + +/** +Constructor +*/ +CEndTaskTestDocument::CEndTaskTestDocument(CEikApplication& aApp) : CEikDocument(aApp) + { + } + +/** +Virtual destructor +*/ +CEndTaskTestDocument::~CEndTaskTestDocument() + { + } + +/** +Factory function for this class +@return a new CEndTaskTestDocument instance. +*/ +CEndTaskTestDocument* CEndTaskTestDocument::NewL(CEikApplication& aApp) + { + return new(ELeave) CEndTaskTestDocument(aApp); + } + + +/** +Called by the UI framework to construct the application UI class. +Note that the app UI's ConstructL() is called by the UI framework. +*/ +CEikAppUi* CEndTaskTestDocument::CreateAppUiL() + { + return new(ELeave) CEndTaskTestAppUi(); + } + +/** +Constructor +*/ +CEndTaskTestAppUi::CEndTaskTestAppUi() + { + } + +/** +Virtual destructor +*/ +CEndTaskTestAppUi::~CEndTaskTestAppUi() + { + } + +/** +Second phase constructor of the application UI class. +It creates and owns a single view. The view contents are not created +until the first time view is activated. +*/ +void CEndTaskTestAppUi::ConstructL() + { + // Complete the UI framework's construction of the App UI. + BaseConstructL(CEikAppUi::ENoAppResourceFile); + + // Set higher prio to preempt test-server as soon as we have an event + User::SetPriorityControl(EFalse); + RProcess p; + p.SetPriority(EPriorityHigh); + } + +/** +Events published in externalinterface.h and utilized by T_EndTaskStep.cpp +*/ +void CEndTaskTestAppUi::HandleApplicationSpecificEventL(TInt aType,const TWsEvent& /*aEvent*/) + { + switch (aType) + { + case EEndTaskTestAppSetSystem: + static_cast(iCoeEnv)->SetSystem(ETrue); + break; + case EEndTaskTestAppSetNormal: + static_cast(iCoeEnv)->SetSystem(EFalse); + break; + case ECallEndTaskWithoutPwrMgmt: + { + TApaTaskList taskList(iEikonEnv->WsSession()); + TApaTask task = taskList.FindApp(Application()->AppDllUid()); + task.EndTask(); + break; + } + case ESimulateHackerAttack1: + { + TWsEvent event; + TApaTaskList taskList(iEikonEnv->WsSession()); + TApaTask task = taskList.FindApp(Application()->AppDllUid()); + // First variant should be sorted by CCoeAppUi::HandleWsEventL + event.SetType(EEventUser); + *(TApaSystemEvent*)(event.EventData())=EApaSystemEventSecureShutdown; + iEikonEnv->WsSession().SendEventToWindowGroup(task.WgId(), event); + break; + } + case ESimulateHackerAttack2: + { + TWsEvent event; + TApaTaskList taskList(iEikonEnv->WsSession()); + TApaTask task = taskList.FindApp(Application()->AppDllUid()); + // Second variant should be handled by wserv's Client::CommandL case EWsClOpSendEventToWindowGroup + event.SetType(EEventPowerMgmt); + *(TApaSystemEvent*)(event.EventData())=EApaSystemEventSecureShutdown; + RWsSession wsSession; + wsSession.Connect(); + wsSession.SendEventToWindowGroup(task.WgId(), event); + wsSession.Close(); + break; + } + case ESimulateHackerAttack3: + { + TWsEvent event; + // Third variant should be handled by wserv's Client::CommandL case EWsClOpSendEventToAllWindowGroup + event.SetType(EEventPowerMgmt); + *(TApaSystemEvent*)(event.EventData())=EApaSystemEventSecureShutdown; + RWsSession wsSession; + wsSession.Connect(); + wsSession.SendEventToAllWindowGroups(event); + wsSession.Close(); + break; + } + default: + break; + } + } + +void CEndTaskTestAppUi::HandleCommandL(TInt aCommand) + { + switch(aCommand) + { + case EEikCmdExit: + Exit(); + break; + default: + break; + } + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,78 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ENDTASKTESTAPP_H +#define __ENDTASKTESTAPP_H + + +/** +Application class +*/ +#include +class CEndTaskTestApplication : public CEikApplication + { +public: + static CApaApplication* NewApplication(); + ~CEndTaskTestApplication(); + +private: + CEndTaskTestApplication(); + + // from CApaApplication + TUid AppDllUid() const; + CApaDocument* CreateDocumentL(); + }; + + +/** +Document class +*/ +#include +class CEikAppUi; +class CEikApplication; +class CEndTaskTestDocument : public CEikDocument + { +public: + static CEndTaskTestDocument* NewL(CEikApplication& aApp); + ~CEndTaskTestDocument(); + +private: + CEndTaskTestDocument(CEikApplication& aApp); + + // from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + + +/** +Application UI class, root of all graphical user interface in this application +*/ +#include +class CEndTaskTestAppUi : public CEikAppUi + { +public: + CEndTaskTestAppUi(); + ~CEndTaskTestAppUi(); + + // from CEikAppUi + void ConstructL(); + void HandleCommandL(TInt aCommand); + + // from CCoeAppUi + void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent); + }; + + +#endif // __ENDTASKTESTAPP_H diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,54 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "EndTaskTestAppExternalInterface.h" +#include + +TARGET EndTaskTestApp.exe +TARGETTYPE exe +CAPABILITY SwEvent + +UID 0x100039CE KUidEndTaskAppUid +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE EndTaskTestApp.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib +LIBRARY apparc.lib +LIBRARY apgrfx.lib +LIBRARY cone.lib +LIBRARY eikcore.lib +LIBRARY ws32.lib +LIBRARY gdi.lib + + +// Registration file +SOURCEPATH . +START RESOURCE EndTask_reg.rss +TARGETPATH /private/10003a3f/apps +END + +// Application resource file +SOURCEPATH . +START RESOURCE EndTaskTestApp.rss +HEADER +TARGETPATH /resource/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestApp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,27 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +NAME AAAA + +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestAppExternalInterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTaskTestAppExternalInterface.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#ifndef __ENDTASKEXTINTERFACE_H +#define __ENDTASKEXTINTERFACE_H + +#define KUidEndTaskAppUid 0x10282B33 +#define EEndTaskTestAppSetSystem 1001 // EEventUser+1 +#define EEndTaskTestAppSetNormal 1002 + +#define ECallEndTaskWithoutPwrMgmt 1003 +#define ESimulateHackerAttack1 1004 +#define ESimulateHackerAttack2 1005 +#define ESimulateHackerAttack3 1006 + +#endif // __ENDTASKEXTINTERFACE_H diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTask_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TEndTaskTestApp/EndTask_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,26 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "EndTaskTestAppExternalInterface.h" + +UID2 KUidAppRegistrationResourceFile +UID3 KUidEndTaskAppUid + +RESOURCE APP_REGISTRATION_INFO + { + // filename of application binary (minus extension) + app_file="EndTaskTestApp"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TIconLoaderAndIconArrayForLeaks.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TIconLoaderAndIconArrayForLeaks.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,70 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test for PDEF104113: This method is for memory leaks test when iconArray is created and deleted. +// This method is put in a separate dll in order to avoid exporting methods +// in server side classes (e.g., APPARC\apgrfx\CApaAppList) for test code. +// It is called by void CT_RApaLsSessionTestStep::TestIconLoaderAndIconArrayMemoryLeaksL() +// in apparctestserver +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include +#include +#include +#include +#include "APGAIR.H" +#include +#include "apprivate.h" +#include +#include +#include +#include "APGSTD.H" +#include "TIconLoaderAndIconArrayForLeaks.h" +#include "apsiconcaptionoverride.h" + + +EXPORT_C void TIconLoaderAndIconArrayForLeaks::TestIconLoaderAndIconArrayL() + { + RFs tempFs; + User::LeaveIfError(tempFs.Connect()); + CleanupClosePushL(tempFs); + + CApaIconLoader* iconLoader = CApaIconLoader::NewLC(tempFs); + CApaAppIconArray* icons = CApaAppIconArray::NewRealDefaultIconsLC(KNumberOfIconsInDefaultMbm,KDefaultAppIconMbm, *iconLoader); + CleanupStack::PopAndDestroy(2,iconLoader); + CleanupStack::PopAndDestroy(&tempFs); + } + +EXPORT_C void TIconLoaderAndIconArrayForLeaks::TestIconCaptionOverridesL() + { + CApaIconCaptionOverrides* iconcap = NULL; + CApaIconCaptionOverridesForApp* iconCapOverride = CApaIconCaptionOverridesForApp::NewL(); + CleanupStack::PushL(iconCapOverride); + CActiveScheduler* sched = NULL; + sched = new(ELeave) CActiveScheduler; + CleanupStack::PushL(sched); + CActiveScheduler::Install(sched); + CApaIconCaptionCenrepObserver* observer = CApaIconCaptionCenrepObserver::NewL(*iconcap); + CleanupStack::PushL(observer); + CleanupStack::PopAndDestroy(3,iconCapOverride); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TIconLoaderAndIconArrayForLeaks.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TIconLoaderAndIconArrayForLeaks.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +const TInt KNumberOfIconsInDefaultMbm = 3; + +class TIconLoaderAndIconArrayForLeaks + { +public: + IMPORT_C static void TestIconLoaderAndIconArrayL(); + IMPORT_C static void TestIconCaptionOverridesL(); + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TIconLoaderAndIconArrayForLeaks.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TIconLoaderAndIconArrayForLeaks.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,70 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +target TIconLoaderAndIconArrayForLeaks.dll +TARGETTYPE DLL +UID 0x1000008D 0x102833D0 +VENDORID 0x70000001 + +CAPABILITY All -Tcb + +SOURCEPATH . +SOURCE TIconLoaderAndIconArrayForLeaks.cpp + +SOURCEPATH ../apserv +SOURCE apsiconcaptionoverride.cpp + +SOURCEPATH ../apgrfx +#if defined SYMBIAN_APPARC_APPINFO_CACHE + source APGAPLSTV2.CPP +#else + source APGAPLST.CPP +#endif +source APGCTL.CPP APGDOOR.CPP APGICNFL.CPP APGSTD.CPP APGTASK.CPP +source APGWGNAM.CPP APGCLI.CPP APGPRIV.CPP +source apgnotif.cpp APGAIR.CPP APGAIRV2.CPP APSCLI.CPP apgconstdata.cpp +source apsecutils.cpp + + +USERINCLUDE . +USERINCLUDE ../apgrfx +USERINCLUDE ../apserv +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +library euser.lib apparc.lib apmime.lib gdi.lib estor.lib efsrv.lib fbscli.lib +library bitgdi.lib ws32.lib bafl.lib +library apserv.lib apfile.lib centralrepository.lib +#ifdef SYMBIAN_BAFL_SYSUTIL +library sysutil.lib +#endif + +macro UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +#if defined SYMBIAN_APPARC_APPINFO_CACHE + deffile TICONFORLEAKS.DEF +#else + deffile TICONFORLEAKSV2.DEF +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TLongUrlRecognizer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TLongUrlRecognizer.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,107 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This recognizer is part of the supporting test code +// for T_StartDocStep.CPP +// This recognizer only exists to associate the document +// name KLitLongURL (defined in TStartDoc.h) with the +// TStartDocApp.app application. +// This enables T_StartDocStep.CPP to launch TStartDocApp.app +// by starting the document KLitLongURL. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include "TStartDoc.h" + +#include +#include + + +const TUid KUidMimeLongURLRecognizer={0x10004c4e}; +const TInt KNumDataTypes = 1; +_LIT8(KLitMimeType_LongURL, "x-epoc/long-url"); + +// CLongUrlRec + +class CLongUrlRec : public CApaDataRecognizerType + { +public: + CLongUrlRec(); + static CApaDataRecognizerType* CreateRecognizerL(); +private: + // from CApaDataRecognizerType + virtual TUint PreferredBufSize(); + virtual TDataType SupportedDataTypeL(TInt aIndex) const; + virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + +CLongUrlRec::CLongUrlRec() + :CApaDataRecognizerType(KUidMimeLongURLRecognizer, EHigh) + { + iCountDataTypes=KNumDataTypes; + } + +TUint CLongUrlRec::PreferredBufSize() + { + return 0; + } + +TDataType CLongUrlRec::SupportedDataTypeL(TInt /*aIndex*/) const + { + return TDataType(KLitMimeType_LongURL); + } + +void CLongUrlRec::DoRecognizeL(const TDesC& aName, const TDesC8&) + { + if (aName==KLitLongURL) + { + iDataType=TDataType(KLitMimeType_LongURL); // TStartDocApp.app supports mime type KLitMimeType_LongURL + iConfidence=ECertain; + } + } + +// stand-alone functions + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +CApaDataRecognizerType* CLongUrlRec::CreateRecognizerL() + { + return new (ELeave) CLongUrlRec(); + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x101F7D8D,CLongUrlRec::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TLongUrlRecognizer_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TLongUrlRecognizer_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TLongUrlRecognizer.mmp +// +// + +TARGET TLongUrlRecognizer.dll +CAPABILITY All -Tcb +TARGETTYPE PLUGIN +UID 0x10009d8d 0x10004c4e +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TLongUrlRecognizer.cpp +systeminclude /EPOC32/INCLUDE +systeminclude /EPOC32/INCLUDE/ECOM + +LIBRARY EUSER.LIB APMIME.LIB + +start resource 10004c4e.rss +target tlongurlrecognizer.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/102822B7.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/102822B7.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "constants.hrh" + + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x102822B7; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // Const for all Data Recognizers + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = KUidMmrRecognizerValue; // Our test recognizer + version_no = 1; + display_name = "recmime"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/constants.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/constants.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__RECMIMECONSTANTS_H__) +#define __RECMIMECONSTANTS_H__ + +_LIT(KRscTargetDir,"c:\\resource\\plugins\\"); +_LIT(KRscSourcePathWinscw,"z:\\resource\\plugins\\recmime.rsc"); +_LIT(KRscSourcePathArmv5, "z:\\apparctest\\dummy.rsc"); +_LIT(KRscTargetPath,"c:\\resource\\plugins\\dummy.rsc"); + +_LIT8(KDataTypeNew,"mime/mmr"); + +const TUid KUidMmrRecognizer={KUidMmrRecognizerValue}; +const TInt KNumMimeTypes=1; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/constants.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/constants.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,28 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__RECMIMECONSTANTS_HRH__) +#define __RECMIMECONSTANTS_HRH__ + +#define KUidMmrRecognizerValue 0x102822B8 + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/recmime.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/recmime.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,103 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +#include "appfwk_test_utils.h" +#include "recmime.h" +#include "constants.hrh" +#include "constants.h" + +///////////////////////////////////////////////// + +const TInt KMaxBufferLength=1024; // maximum amount of buffer space we will ever use + +///////////////////////////////////////////////// + +/* +DLL entry point +*/ +GLDEF_C TInt E32Dll() + { + return KErrNone; + } + +/* +Private constructor +*/ +CTestMimeRecognizer::CTestMimeRecognizer() + :CApaDataRecognizerType(KUidMmrRecognizer, CApaDataRecognizerType::EHigh) + { + iCountDataTypes=KNumMimeTypes; + } + +/* +Ecom factory function + +Due to platsec we can't build plugin.dll to an alternative location and we can't +copy files from epoc32\release\winscw\udeb. Both plugin.rsc and plugin.dll must +be on the same drive to be installed. + +The workaround to implement this tef-test is works like this: +1. This test plugin are copied into z: by the build tools +2. This plugin will not be installed during startup because CreateRecognizerL will leave +3. During the test a dummy plugin.rsc will be copied into c:\resource\plugins to trig Ecom +4. Apparc will re-scan and make sure all recognizers listed by Ecom are properly installed +5. Ecom will not install the copied dummy file as it has no matching dll on the same drive, but +6. This recognizer will detect the dummy file and chose not to leave from CreateRecognizerL +*/ +CApaDataRecognizerType* CTestMimeRecognizer::CreateRecognizerL() + { + RSmlTestUtils fileServ; + CleanupClosePushL(fileServ); + User::LeaveIfError(fileServ.Connect()); + TBool fileExists = EFalse; + User::LeaveIfError(fileServ.IsFilePresent(KRscTargetPath, fileExists)); + CleanupStack::PopAndDestroy(&fileServ); + + if(!fileExists) + User::Leave(KErrPathNotFound); + + return new (ELeave) CTestMimeRecognizer(); + } + +TUint CTestMimeRecognizer::PreferredBufSize() + { + return KMaxBufferLength; + } + +TDataType CTestMimeRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const + { + return TDataType(KDataTypeNew); + } + +void CTestMimeRecognizer::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& /*aBuffer*/) + { + // If an error stops CTestMimeRecognizer being removed as part of test cleanup, + // returning ENotRecognized will avoid the possibility of impacting other test code. + iDataType=TDataType(); + iConfidence=ENotRecognized; + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KUidMmrRecognizerValue, CTestMimeRecognizer::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/recmime.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/recmime.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__RECMIME_H__) +#define __RECMIME_H__ + +#include + +/** +@class +@internalComponent - Internal Symbian test code + + +This recognizer is part of the CT_ApsScanStep tef test. +*/ +class CTestMimeRecognizer : public CApaDataRecognizerType + { +public: + // for ECOM + static CApaDataRecognizerType* CreateRecognizerL(); + + // from CApaDataRecognizerType + TUint PreferredBufSize(); + TDataType SupportedDataTypeL(TInt aIndex) const; + +private: + CTestMimeRecognizer(); + + // from CApaDataRecognizerType + void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/recmime.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec/recmime.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// recmime.dll Symbian OS new MIME type recognizer +// +// + + + +/** + @file +*/ + +target recmime.dll +targettype plugin +uid 0x10009d8d 0x102822B7 +VENDORID 0x70000001 +CAPABILITY All -Tcb + +systeminclude /EPOC32/INCLUDE /EPOC32/INCLUDE/ECOM /EPOC32/INCLUDE/TEST + +SOURCEPATH . +source recmime.cpp + +library EUSER.LIB APMIME.LIB EFSRV.LIB APPFWK_TEST_UTILS.LIB + +start resource 102822B7.rss +target recmime.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/A00025DD.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/A00025DD.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0xA00025DD; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // Const for all Data Recognizers + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0xA00025DE; // Our test recognizer + version_no = 1; + display_name = "recmime_1"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/recmime_1.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/recmime_1.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,94 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ +#include + +#include "appfwk_test_utils.h" +#include "recmime_1.h" + +///////////////////////////////////////////////// + +const TInt KMaxBufferLength=1024; // maximum amount of buffer space we will ever use + +///////////////////////////////////////////////// + +/* +DLL entry point +*/ +GLDEF_C TInt E32Dll() + { + return KErrNone; + } + +/* +Private constructor +*/ +CTestMimeRecognizer::CTestMimeRecognizer() + :CApaDataRecognizerType(KUidMmrRecognizer_1, CApaDataRecognizerType::EHigh) + { + iCountDataTypes = KNumMimeTypes_1; + } + +/* +Ecom factory function +*/ +CApaDataRecognizerType* CTestMimeRecognizer::CreateRecognizerL() + { + return new (ELeave) CTestMimeRecognizer(); + } + +TUint CTestMimeRecognizer::PreferredBufSize() + { + return KMaxBufferLength; + } + +TDataType CTestMimeRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const + { + return TDataType(KMimeMmrType); + } + +void CTestMimeRecognizer::DoRecognizeL(const TDesC& aName, const TDesC8& /*aBuffer*/) + { + // If an error stops CTestMimeRecognizer being removed as part of test cleanup, + // returning ENotRecognized will avoid the possibility of impacting other test code. + if (aName == KLitDocPath) + { + iDataType = TDataType(KMimeMmrType); + iConfidence = EPossible; + } + else + { + iDataType=TDataType(); + iConfidence=ENotRecognized; + } + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KUidMmrRecognizerValue_1, CTestMimeRecognizer::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/recmime_1.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/recmime_1.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,58 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ +#if !defined(__RECMIME_1_H__) +#define __RECMIME_1_H__ + +#include + +// Literals & Constants +_LIT(KLitDocPath, "Z:\\system\\data\\TApsRecogAppTest.mmr"); + +_LIT8(KMimeMmrType,"mime/mmr1"); + +#define KUidMmrRecognizerValue_1 0xA00025DE +const TUid KUidMmrRecognizer_1={KUidMmrRecognizerValue_1}; +const TInt KNumMimeTypes_1 = 1; + +/** +@class +@internalComponent - Internal Symbian test code +*/ +class CTestMimeRecognizer : public CApaDataRecognizerType + { +public: + // for ECOM + static CApaDataRecognizerType* CreateRecognizerL(); + + // from CApaDataRecognizerType + TUint PreferredBufSize(); + TDataType SupportedDataTypeL(TInt aIndex) const; + +private: + CTestMimeRecognizer(); + + // from CApaDataRecognizerType + void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/recmime_1.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TMimeRec1/recmime_1.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +target recmime_1.dll +targettype plugin +uid 0x10009d8d 0xA00025DD +VENDORID 0x70000001 +CAPABILITY All -Tcb + +systeminclude /EPOC32/INCLUDE /EPOC32/INCLUDE/ECOM /EPOC32/INCLUDE/TEST + +SOURCEPATH . +source recmime_1.cpp + +library EUSER.LIB APMIME.LIB EFSRV.LIB APPFWK_TEST_UTILS.LIB + +start resource A00025DD.rss +target recmime_1.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/10207f95.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/10207f95.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +// INCLUDES +#include + + +// RESOURCE DEFINITIONS +// ----------------------------------------------------------------------------- +// +// ----------------------------------------------------------------------------- +// +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10207f95; + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // Const for all Data Recognizers + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10207f96; + version_no = 1; + display_name = "TNonNativeRec"; + default_data = ""; + opaque_data = ""; + } + }; + } + }; + } + +// End of File diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,582 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "TNNAPP1.H" +#include + +TTstTransactionType gTransactionType=ETransactionType_null; +TBool gCallMadeToNewOverload_ProcessCommandParametersL=EFalse; +TInt gErrorWhenOpeningFile=KMinTInt; +TBuf<50> gFileNameWithoutDriveOrPath; +TBuf8<40> gBufferFromFile(KNullDesC8); + +// CTstAppService + +class CTstAppService : public CApaAppServiceBase + { +public: + static CTstAppService* NewL(); +private: + inline CTstAppService() {} + // from CApaAppServiceBase + virtual void ServiceL(const RMessage2& aMessage); + }; + +CTstAppService* CTstAppService::NewL() + { + return new(ELeave) CTstAppService; + } + +void CTstAppService::ServiceL(const RMessage2& aMessage) + { + switch (aMessage.Function()) + { + case EOpcode_receiveTestResult: + { + CActiveScheduler::Stop(); + const TBool passingFileByHandle=aMessage.Int0(); + TBuf<50> fileNameWithoutDriveOrPath; + aMessage.ReadL(1, fileNameWithoutDriveOrPath); + TBool result=(gFileNameWithoutDriveOrPath.CompareF(fileNameWithoutDriveOrPath)==0) ? KCheckPass : KCheckFail; + switch (gTransactionType) + { + case ETransactionType_filePassedByName: + if (!gCallMadeToNewOverload_ProcessCommandParametersL) + { + result=KCheckFail; + } + if (passingFileByHandle) + { + result=KCheckFail; + } + if (gErrorWhenOpeningFile!=KErrPermissionDenied) + { + result=KCheckFail; + } + if (User::CreatorSecureId().iId!=0x101F289C) // uid of the creator app => apparctestserver! + { + result=KCheckFail; + } + break; + + case ETransactionType_filePassedByHandle: + if (!gCallMadeToNewOverload_ProcessCommandParametersL) + { + result=KCheckFail; + } + if (!passingFileByHandle) + { + result=KCheckFail; + } + if (gErrorWhenOpeningFile!=KMinTInt) + { + result=KCheckFail; + } + if (User::CreatorSecureId().iId!=0x101F289C) // uid of the creator app => apparctestserver! + { + result=KCheckFail; + } + break; + + case ETransactionType_null: + default: + User::Invariant(); + break; + } + aMessage.Complete(result); + } + break; + + default: + User::Leave(KErrNotSupported); + break; + } + } + +// CTstAppServer + +class CTstAppServer : public CEikAppServer + { +public: + static CTstAppServer* NewL(); +private: + inline CTstAppServer() {} + // from CApaAppServer + virtual CApaAppServiceBase* CreateServiceL(TUid aServiceUid) const; + virtual TCustomResult CreateServiceSecurityCheckL(TUid aServiceUid, const RMessage2& aMessage, TInt& aAction, TSecurityInfo& aMissingSecurityInfo); + }; + +CTstAppServer* CTstAppServer::NewL() + { // static + CTstAppServer* const appServer=new(ELeave) CTstAppServer; + CleanupStack::PushL(appServer); + appServer->ConstructL(KLitServerName); + CleanupStack::Pop(appServer); + return appServer; + } + +CApaAppServiceBase* CTstAppServer::CreateServiceL(TUid aServiceUid) const + { + if ((aServiceUid.iUid==KTstServiceUid_nonSecure.iUid) || + (aServiceUid.iUid==KTstServiceUid_secure.iUid)) + { + return CTstAppService::NewL(); + } + User::Leave(KErrNotSupported); + return NULL; + } + +CPolicyServer::TCustomResult CTstAppServer::CreateServiceSecurityCheckL(TUid aServiceUid, const RMessage2& aMessage, TInt& aAction, TSecurityInfo& aMissingSecurityInfo) + { + if ((aServiceUid.iUid==KTstServiceUid_secure.iUid) && (aMessage.SecureId().iId!=0x101F289C)) // uid of the creator app => apparctestserver! + { + return EFail; + } + return CEikAppServer::CreateServiceSecurityCheckL(aServiceUid, aMessage, aAction, aMissingSecurityInfo); + } + +// CTstControl + +class CTstControl : public CCoeControl + { +public: + static CTstControl* NewL(); + virtual ~CTstControl(); +private: + CTstControl(); + void ConstructL(); + // from CCoeControl + virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode); + virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent); + virtual void Draw(const TRect& aRectangle) const; +private: + CTstAppServer* iAppServer; + }; + +CTstControl* CTstControl::NewL() + { // static + CTstControl* const control=new(ELeave) CTstControl; + CleanupStack::PushL(control); + control->ConstructL(); + CleanupStack::Pop(control); + return control; + } + +CTstControl::~CTstControl() + { + delete iAppServer; + iEikonEnv->RemoveFromStack(this); + } + +CTstControl::CTstControl() + { + } + +void CTstControl::ConstructL() + { + RWsSession& windowServerSession=iCoeEnv->WsSession(); + windowServerSession.SetAutoFlush(ETrue); + CreateWindowL(); + EnableDragEvents(); + ClaimPointerGrab(); + RDrawableWindow& window=*DrawableWindow(); + window.SetOrdinalPosition(0); + window.SetShadowHeight(3); + CWsScreenDevice& screenDevice=*iCoeEnv->ScreenDevice(); + const TSize screenSize(screenDevice.SizeInPixels()); + SetExtent(TPoint(20, 20), TSize(screenSize.iWidth-40, screenSize.iHeight-40)); + iEikonEnv->AddDialogLikeControlToStackL(this); + iAppServer=CTstAppServer::NewL(); + ActivateL(); + } + +TKeyResponse CTstControl::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aEventCode) + { + if (aEventCode==EEventKey) + { + switch (aKeyEvent.iCode) + { + case EKeyEscape: + iEikonEnv->EikAppUi()->HandleCommandL(EEikCmdExit); + break; + } + } + return EKeyWasConsumed; + } + +void CTstControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) + { + CCoeControl::HandlePointerEventL(aPointerEvent); + } + +void CTstControl::Draw(const TRect&) const + { + CWindowGc& graphicsContext=SystemGc(); + graphicsContext.SetPenStyle(CGraphicsContext::ESolidPen); + graphicsContext.SetPenColor(KRgbRed); + graphicsContext.SetBrushStyle(CGraphicsContext::ESolidBrush); + graphicsContext.SetBrushColor(KRgbGray); + TRect rectangle(TPoint(0, 0), Rect().Size()); + graphicsContext.DrawRect(rectangle); + rectangle.Shrink(1, 1); + graphicsContext.SetPenColor(KRgbBlue); + graphicsContext.SetBrushStyle(CGraphicsContext::ENullBrush); + + const TInt KGapAboveTop=40; + const TInt KGapBetweenLines=5; + const TInt KMaxLengthOfText=100; + TBuf text; + + TInt gapLeft=5; + const CFont* font=iCoeEnv->NormalFont(); + graphicsContext.UseFont(font); + TInt heightInPixelsPlusGapBetweenLines=font->HeightInPixels()+KGapBetweenLines; + TPtrC transactionType; + switch (gTransactionType) + { + case ETransactionType_null: + transactionType.Set(_L("null")); + break; + case ETransactionType_filePassedByName: + transactionType.Set(_L("file passed by name")); + break; + case ETransactionType_filePassedByHandle: + transactionType.Set(_L("file passed by handle")); + break; + default: + User::Invariant(); + break; + } + text.Format(_L("Transaction type: %S"), &transactionType); + TInt topOfText=KGapAboveTop+font->AscentInPixels(); + graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft); + + topOfText+=heightInPixelsPlusGapBetweenLines; + _LIT(KLit_yes, "yes"); + _LIT(KLit_no, "no"); + text.Format(_L("ProcessCommandParametersL(CApaCommandLine&) called: %S"), gCallMadeToNewOverload_ProcessCommandParametersL? &KLit_yes: &KLit_no); + graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft); + + topOfText+=heightInPixelsPlusGapBetweenLines; + text.Format(_L("Error when opening file: %d"), gErrorWhenOpeningFile); + graphicsContext.DrawText(text, rectangle, topOfText, CGraphicsContext::ELeft, gapLeft); + + topOfText+=heightInPixelsPlusGapBetweenLines; + text=_L("File contents: {"); + const TInt bufferLength=gBufferFromFile.Length(); + for (TInt i=0; iDrawNow(); + return ETrue; + } + +void CTstAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + default: + User::Invariant(); + } + } + +void CTstAppUi::OpenFileL(const TDesC&) + { + User::Invariant(); + } + +void CTstAppUi::CreateFileL(const TDesC&) + { + User::Invariant(); + } + +// CTstDocument + +class CTstDocument : public CEikDocument + { +public: + static CTstDocument* NewL(CEikApplication& aApplication); + inline CTstAppUi* TstAppUi() {return STATIC_CAST(CTstAppUi*, iAppUi);} +private: + inline CTstDocument(CEikApplication& aApplication) :CEikDocument(aApplication) {} + // from CApaDocument + virtual CFileStore* CreateFileStoreLC(RFs&, const TDesC&); + virtual void EditL(MApaEmbeddedDocObserver*, TBool); + virtual void PrintL(const CStreamStore&); + virtual void SaveL(); + virtual void StoreL(CStreamStore&, CStreamDictionary&) const; + // from CEikDocument + virtual CEikAppUi* CreateAppUiL(); + virtual CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFsSession); + virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile); + virtual void UpdateTaskNameL(CApaWindowGroupName* aWindowGroupName); + }; + +CTstDocument* CTstDocument::NewL(CEikApplication& aApplication) + { // static + return new(ELeave) CTstDocument(aApplication); + } + +CFileStore* CTstDocument::CreateFileStoreLC(RFs&, const TDesC&) + { + User::Invariant(); + return NULL; + } + +void CTstDocument::EditL(MApaEmbeddedDocObserver*, TBool) + { + User::Invariant(); + } + +void CTstDocument::PrintL(const CStreamStore&) + { + User::Invariant(); + } + +void CTstDocument::SaveL() + { + SetChanged(EFalse); + } + +void CTstDocument::StoreL(CStreamStore&, CStreamDictionary&) const + { + User::Invariant(); + } + +CEikAppUi* CTstDocument::CreateAppUiL() + { + return CTstAppUi::NewL(); + } + +CFileStore* CTstDocument::OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFsSession) + { + if (!aDoOpen) + { + User::Leave(KErrNotSupported); + } + gFileNameWithoutDriveOrPath=TParsePtrC(aFileName).NameAndExt(); + RFile file; + CleanupClosePushL(file); + APPFWK_NEGATIVE_PLATSEC_START; + gErrorWhenOpeningFile=file.Open(aFsSession, aFileName, EFileShareReadersOnly|EFileStream|EFileRead); + APPFWK_NEGATIVE_PLATSEC_FINISH; + if (gErrorWhenOpeningFile==KErrNone) + { + User::LeaveIfError(file.Read(gBufferFromFile)); + } + CleanupStack::PopAndDestroy(&file); + gTransactionType=ETransactionType_filePassedByName; + TstAppUi()->Control()->DrawNow(); + return NULL; + } + +void CTstDocument::OpenFileL(CFileStore*& aFileStore, RFile& aFile) + { + User::LeaveIfError(aFile.Name(gFileNameWithoutDriveOrPath)); + User::LeaveIfError(aFile.Read(gBufferFromFile)); + gTransactionType=ETransactionType_filePassedByHandle; + TstAppUi()->Control()->DrawNow(); + aFileStore=NULL; + } + +void CTstDocument::UpdateTaskNameL(CApaWindowGroupName* aWindowGroupName) + { + CEikDocument::UpdateTaskNameL(aWindowGroupName); + } + +// CTstApplication + +class CTstApplication : public CEikApplication + { +public: + static CTstApplication* New(); +private: + inline CTstApplication() {} + // from CApaApplication + virtual TUid AppDllUid() const; + virtual CDictionaryStore* OpenIniFileLC(RFs&) const; + // from CEikApplication + virtual void GetDefaultDocumentFileName(TFileName& aDocumentName) const; + virtual TFileName BitmapStoreName() const; + virtual TFileName ResourceFileName() const; + virtual CApaDocument* CreateDocumentL(); + virtual void NewAppServerL(CApaAppServer*& aAppServer); + }; + +CTstApplication* CTstApplication::New() + { // static + return new CTstApplication; + } + +TUid CTstApplication::AppDllUid() const + { + return TUid::Uid(0x10207f92); + } + +CDictionaryStore* CTstApplication::OpenIniFileLC(RFs&) const + { + return NULL; // must not leave anything on the clean-up stack if it returns NULL + } + +void CTstApplication::GetDefaultDocumentFileName(TFileName& aDocumentName) const + { + aDocumentName.SetLength(0); + } + +TFileName CTstApplication::BitmapStoreName() const + { + return KNullDesC(); + } + +TFileName CTstApplication::ResourceFileName() const + { + return KNullDesC(); + } + +CApaDocument* CTstApplication::CreateDocumentL() // must return non-NULL + { + return CTstDocument::NewL(*this); + } + +void CTstApplication::NewAppServerL(CApaAppServer*& aAppServer) + { + // this doesn't get called by the framework as we're not launching the server via the server-differentiator in CApaCommandLine, we launching the server as a fixed-name server so we have to call this function ourselves instead + CEikApplication::NewAppServerL(aAppServer); + } + +// stand-alone functions + +LOCAL_C CApaApplication* NewApplication() + { + return CTstApplication::New(); + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,43 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +_LIT(KLitServerName, "AppService_10207f92"); + +const TUid KTstServiceUid_secure={0x10207f97}; +const TUid KTstServiceUid_nonSecure={0x10207f98}; + +/** These numbers have been chosen at random to be used as an exit reason */ +const TInt KCheckPass = 13; +const TInt KCheckFail = 77; + +enum TTstTransactionType + { + ETransactionType_null, + ETransactionType_filePassedByName, + ETransactionType_filePassedByHandle + }; + +enum TTstOpcode + { + EOpcode_receiveTestResult + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +target TNNAPP1.EXE +targetpath /sys/bin +targettype exe +uid 0x100039ce 0x10207f92 +vendorid 0x70000001 + +capability none + +sourcepath . +source TNNAPP1.CPP + +userinclude . +userinclude .. + +systeminclude /epoc32/include +systeminclude /epoc32/include/test + +resource TNNAPP1_REG.RSS +start resource TNNAPP1_REG.RSS +targetpath /private/10003a3f/apps +lang sc +end + +library EUSER.LIB EFSRV.LIB APMIME.LIB APGRFX.LIB APPARC.LIB WS32.LIB CONE.LIB EIKCORE.LIB GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp1_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f92 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tnnapp1"; // filename of application binary (minus extension) + + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + + datatype_list= + { + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/nna-gif"; }, + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/nna-html"; }, + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/nna-vcf"; }, + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/nna-txt"; } + }; + + service_list= + { + SERVICE_INFO + { + uid=0x10207f93; + datatype_list= + { + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/nna-vcf"; } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp2.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,64 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include + +const TUint KPropertyCategory=0x101F289C; +const TUint KPropertyKey=0; + +_LIT(KLitExtension, ".NNAPP2"); + +inline void DoTest(TBool aCondition) {__ASSERT_ALWAYS(aCondition, User::Invariant());} + +// top-level functions + +LOCAL_C void MainL() + { + CApaCommandLine* commandLine=NULL; + User::LeaveIfError(CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine)); + CleanupStack::PushL(commandLine); + const TPtrC executableName(commandLine->ExecutableName()); + DoTest(TParsePtrC(executableName).Ext().CompareF(KLitExtension)==0); + User::LeaveIfError(RProperty::Set(TUid::Uid(KPropertyCategory), KPropertyKey, commandLine->DocumentName())); + CleanupStack::PopAndDestroy(commandLine); + } + +GLDEF_C TInt E32Main() + { + CTrapCleanup* const trapCleanup=CTrapCleanup::New(); + if (trapCleanup==NULL) + { + return KErrNoMemory; + } + TRAPD(error, MainL()); + DoTest(error==KErrNone); + delete trapCleanup; + return error; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +target TNNAPP2.EXE +targettype exe +uid 0x100039ce 0x10207f94 +capability none + +sourcepath . +source TNNAPP2.CPP +systeminclude /epoc32/include + + +resource TNNAPP2_REG.RSS +start resource TNNAPP2_REG.RSS +targetpath /private/10003a3f/apps +lang sc +end + + +library EUSER.LIB EFSRV.LIB APPARC.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNNApp2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f94 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tnnapp2"; // filename of application binary (minus extension) + + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + + service_list= + { + SERVICE_INFO + { + uid=0x10207f99; + datatype_list= + { + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/nna-gif"; } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNonNativeRec.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNonNativeRec.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,161 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This recognizer is part of the supporting test code for T_NonNativeAppsStep.CPP +// This recognizer only exists to associate the document names defined in T_NonNativeAppsStep.h +// with the TstNonNativeApp.exe application. +// This enables T_NonNativeAppsSt ep.CPP to launch TstNonNativeApp.app by starting the document names. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include + +#include +#include + +_LIT8(KLit8_DataType_Gif, "x-epoc/nna-gif"); +_LIT8(KLit8_DataType_Html, "x-epoc/nna-html"); +_LIT8(KLit8_DataType_Vcard, "x-epoc/nna-vcf"); +_LIT8(KLit8_DataType_plainText, "x-epoc/nna-txt"); + +const TUid KUidNonNativeRecognizer={0x10207f95}; +const TUint KImplNonNativeRecognizer=0x10207f96; + +enum TMimeTypes + { + EMimeTypeNnt1 = 0, + EMimeTypeNnt2, + EMimeTypeNnt3, + EMimeTypeNnt4, + EMimeLast + }; + +_LIT(KLitMimeExtensionNnt1, ".NNA1"); +_LIT(KLitMimeExtensionNnt2, ".NNA2"); +_LIT(KLitMimeExtensionNnt3, ".NNA3"); +_LIT(KLitMimeExtensionNnt4, ".NNA4"); + + +// CTNonNativeRec definition + +class CTNonNativeRec : public CApaDataRecognizerType + { +public: + CTNonNativeRec(); + static CApaDataRecognizerType* CreateRecognizerL(); +private: + // from CApaDataRecognizerType + virtual TUint PreferredBufSize(); + virtual TDataType SupportedDataTypeL(TInt aIndex) const; + virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + + +// CTNonNativeRec implementation + +CTNonNativeRec::CTNonNativeRec() + :CApaDataRecognizerType(KUidNonNativeRecognizer, EHigh) + { + iCountDataTypes = EMimeLast; + } + +TUint CTNonNativeRec::PreferredBufSize() + { + return 0; + } + +TDataType CTNonNativeRec::SupportedDataTypeL(TInt aIndex) const + { + if (aIndex == EMimeTypeNnt1) + return TDataType(KLit8_DataType_Gif); + + else if (aIndex == EMimeTypeNnt2) + return TDataType(KLit8_DataType_Html); + + else if (aIndex == EMimeTypeNnt3) + return TDataType(KLit8_DataType_Vcard); + + else if (aIndex == EMimeTypeNnt4) + return TDataType(KLit8_DataType_plainText); + + else + return TDataType(KNullDesC8); + } + + +void CTNonNativeRec::DoRecognizeL(const TDesC& aName, const TDesC8&) + { + + // Compare if the file extension is known + if (aName.Length() < 5) + { + iDataType = TDataType(KNullDesC8); + iConfidence = ENotRecognized; + return; + } + + if (aName.Right(5).CompareF(KLitMimeExtensionNnt1) == 0) + { + iDataType = TDataType(KLit8_DataType_Gif); + iConfidence = ECertain; + } + else if (aName.Right(5).CompareF(KLitMimeExtensionNnt2) == 0) + { + iDataType = TDataType(KLit8_DataType_Html); + iConfidence = ECertain; + } + else if (aName.Right(5).CompareF(KLitMimeExtensionNnt3) == 0) + { + iDataType = TDataType(KLit8_DataType_Vcard); + iConfidence = ECertain; + } + else if (aName.Right(5).CompareF(KLitMimeExtensionNnt4) == 0) + { + iDataType = TDataType(KLit8_DataType_plainText); + iConfidence = ECertain; + } + else + { + iDataType = TDataType(KNullDesC8); + iConfidence = ENotRecognized; + } + } + +// stand-alone functions + +CApaDataRecognizerType* CTNonNativeRec::CreateRecognizerL() + { + return new (ELeave) CTNonNativeRec(); + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KImplNonNativeRecognizer, CTNonNativeRec::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNonNativeRec.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNative/TNonNativeRec.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +TARGET TNonNativeRec.dll +CAPABILITY All -Tcb +TARGETTYPE PLUGIN +UID 0x10009d8d 0x10207f95 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TNonNativeRec.cpp + +systeminclude ../../INC +systeminclude /EPOC32/INCLUDE +systeminclude /EPOC32/INCLUDE/ECOM +systeminclude /EPOC32/INCLUDE/TEST + +LIBRARY EUSER.LIB APMIME.LIB APPARC.LIB EFSRV.LIB + +start resource 10207f95.rss +target TNonNativeRec.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNativeAppLaunchChecker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNativeAppLaunchChecker.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,77 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting ECOM plugin for use by test programs that excercise +// rule based launching of applications. +// The class CTNonNativeAppLaunchChecker implements an +// ECOM RuleBased plugin interface. +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include "tNonNativeAppLaunchChecker.h" +#include + +const TUid KUidNonNativeApp = {0xA0000B6E}; + +// Define the interface UIDs +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0xA0000B6F, CTNonNativeAppLaunchChecker::NewL), + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +CTNonNativeAppLaunchChecker* CTNonNativeAppLaunchChecker::NewL() + { + CTNonNativeAppLaunchChecker* theAppLaunchChecker = new (ELeave) CTNonNativeAppLaunchChecker(); + return theAppLaunchChecker; + } + +CTNonNativeAppLaunchChecker::~CTNonNativeAppLaunchChecker() + { + } + +/** +The function CAppLaunchChecker::OkayToLaunchL recieves the UID of the application to be launched. +The function implements a rule for not launching the application whose UID is supplied as the first parameter. +The function returns CAppLaunchChecker::EAppLaunchDecline if the rule is executed completely. +*/ +CAppLaunchChecker::TAppLaunchCode CTNonNativeAppLaunchChecker::OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& /* aTaskList */) + { + if(KUidNonNativeApp == aAppToLaunch) + { + return CAppLaunchChecker::EAppLaunchDecline; + } + return CAppLaunchChecker::EAppLaunchIndifferent; + } + +GLDEF_C TInt E32Dll() +// +// DLL entry point +// + { + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNativeAppLaunchChecker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNativeAppLaunchChecker.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,40 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __TNONNATIVEAPPLAUNCHCHECKER_H__ +#define __TNONNATIVEAPPLAUNCHCHECKER_H__ + +#include "..\inc\ApLaunchChecker.h" + +class CTNonNativeAppLaunchChecker : public CAppLaunchChecker + { +public: + static CTNonNativeAppLaunchChecker* NewL(); + ~CTNonNativeAppLaunchChecker(); + //Inherited from CApplaunchChecker + TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList); + +private: + CTNonNativeAppLaunchChecker() {}; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNativeAppLaunchChecker.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TNonNativeAppLaunchChecker.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,44 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +TARGET TNonNativeAppLaunchChecker.dll +CAPABILITY All -Tcb +TARGETTYPE PLUGIN +VENDORID 0x70000001 + +// ECom Dll recognition UID followed by the unique dll UID +UID 0x10009D8D 0xA0000B70 + +SOURCEPATH ../tef +SOURCE TNonNativeAppLaunchChecker.cpp + +USERINCLUDE ../tef +USERINCLUDE ../inc +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom + +start resource A0000B70.rss +target TNonNativeAppLaunchChecker.rsc +end + +LIBRARY euser.lib +LIBRARY apfile.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTest.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,44 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__TRAPALSSESSIONSTARTAPPTEST_H__) +#define __TRAPALSSESSIONSTARTAPPTEST_H__ + +#if !defined(__E32STD_H__) +#include +#endif + +/** KLitLongURL must be > 256 characters long, in this case it's 259 characters long + The name is a little mis-leading, as it's not a real URL. URL is used in the name + because one of the use cases for needing document names longer than 256 characters + is when starting a very long URL to be handled by a web browser application +*/ + + +_LIT(KLitTRApaLsSessionStartAppTest, "Z:\\system\\data\\TRApaLsSessionStartAppTest.tst"); + + + +const TUid KUidMimeTRApaLsSessionStartAppTestRecognizer={0x10004c50}; +const TInt KNumDataTypes = 1; +_LIT8(KLitMimeType_TRApaLsSessionStartAppTest, "x-epoc/start-app-test"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestApp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestApp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,217 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by other test programs that need +// to query the apparc server for applications which define +// different embeddability values in their AIF files. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "TRApaLsSessionTestUids.h" +#include "TRApaLsSessionStartAppTest.h" +_LIT(KExampleText, "This test application is for TRApaLsSession start app tests"); + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // from CCoeControl + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // from CEikAppUi + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +TUid CExampleApplication::AppDllUid() const + { + return KUidTRApaLsSessionStartAppTestApp; + } + +TFileName CExampleApplication::ResourceFileName() const +{ + return TFileName(); // this app doesn't have a resource file +} + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestApp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestApp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,44 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TRApaLsSessionStartAppTestApp_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10004c4f // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TRApaLsSessionStartAppTestApp"; + + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + + // MIME types + datatype_list= + { + DATATYPE { priority=EDataTypePriorityNormal; type="x-epoc/start-app-test"; } + //DATATYPE { priority=EDataTypePriorityLow; type="text/plain"; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestApp_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestApp_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TTRApaLsSessionStartAppTestApp.mmp +// +// + +#include + +targetpath /SYS/BIN + +target TRApaLsSessionStartAppTestApp.EXE +TARGETTYPE exe + +VENDORID 0x70000001 +UID 0x100039CE 0x10004c4f +CAPABILITY All -Tcb +epocstacksize 0x5000 + +SOURCEPATH . +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +// Application exe registration resource file +START RESOURCE TRApaLsSessionStartAppTestApp_reg.rss +TARGETPATH /private/10003a3f/apps +END + +SOURCE TRApaLsSessionStartAppTestApp.cpp + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestRecognizer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestRecognizer.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,101 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This recognizer is part of the supporting test code +// for T_RApaLsSessionStep.CPP +// This recognizer only exists to associate the document +// name KLitTRApaLsSessionStartAppTest (defined in TRApaLsSessionStartAppTest.h) with the +// TRApaLsSessionStartAppTestApp.app application. +// This enables the start app test case T_RApaLsSessionStep.CPP to launch TRApaLsSessionStartAppTestApp.app +// by starting the document KLitTRApaLsSessionStartAppTest. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include "TRApaLsSessionStartAppTest.h" + +#include + +//CRApaLsSessionStartAppTestRec + +class CRApaLsSessionStartAppTestRec : public CApaDataRecognizerType + { +public: + CRApaLsSessionStartAppTestRec(); + static CApaDataRecognizerType* CreateRecognizerL(); +private: + // from CApaDataRecognizerType + virtual TUint PreferredBufSize(); + virtual TDataType SupportedDataTypeL(TInt aIndex) const; + virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + +CRApaLsSessionStartAppTestRec::CRApaLsSessionStartAppTestRec() + :CApaDataRecognizerType(KUidMimeTRApaLsSessionStartAppTestRecognizer, EHigh) + { + iCountDataTypes=KNumDataTypes; + } + +TUint CRApaLsSessionStartAppTestRec::PreferredBufSize() + { + return 0; + } + +TDataType CRApaLsSessionStartAppTestRec::SupportedDataTypeL(TInt /*aIndex*/) const + { + return TDataType(KLitMimeType_TRApaLsSessionStartAppTest); + } + +void CRApaLsSessionStartAppTestRec::DoRecognizeL(const TDesC& aName, const TDesC8&) + { + if (aName==KLitTRApaLsSessionStartAppTest) + { + iDataType=TDataType(KLitMimeType_TRApaLsSessionStartAppTest); // TRApaLsSessionStartAppTest.app supports mime type KLitMimeType_TRApaLsSessionStartAppTest + iConfidence=ECertain; + } + } + +// stand-alone functions + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +CApaDataRecognizerType* CRApaLsSessionStartAppTestRec::CreateRecognizerL() + { + return new (ELeave) CRApaLsSessionStartAppTestRec(); + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x10004c50,CRApaLsSessionStartAppTestRec::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestRecognizer_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionStartAppTestRecognizer_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,38 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TRApaLsSessionStartAppTestRecognizer.mmp +// +// + +#include + +target TRApaLsSessionStartAppTestRecognizer.dll +targetpath /sys/bin +CAPABILITY All -Tcb +targettype PLUGIN +uid 0x10009d8d 0x10000182 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TRApaLsSessionStartAppTestRecognizer.CPP +systeminclude /EPOC32/INCLUDE +systeminclude /EPOC32/INCLUDE/ECOM + +MW_LAYER_SYSTEMINCLUDE + +library EUSER.LIB APPARC.LIB APMIME.LIB + +start resource 10000182.rss +target TRApaLsSessionStartAppTestRecognizer.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionTestUids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRApaLsSessionTestUids.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_RAPALSSESSION_UIDS_H__) +#define __T_RAPALSSESSION_UIDS_H__ + +const TUid KUidTRApaLsSessionStartAppTestApp = { 0x10004c4f }; +//const TUid KUidAppEmbeddable = { 0x10004c48 }; +//const TUid KUidAppEmbeddableOnly = { 0x10004c49 }; +//const TUid KUidAppEmbeddableUiOrStandAlone = { 0x10004c4A }; +//const TUid KUidAppEmbeddableUiNotStandAlone = { 0x10004c4B }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRecUpgrade_1/recupgrade_1.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRecUpgrade_1/recupgrade_1.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +target recupgrade.dll +targettype plugin +uid 0x10009d8d 0xA000B461 +VENDORID 0x70000001 +CAPABILITY All -Tcb + +systeminclude /EPOC32/INCLUDE /EPOC32/INCLUDE/ECOM /EPOC32/INCLUDE/TEST + +SOURCEPATH . +source recupgrade_1.cpp + +library EUSER.LIB APMIME.LIB EFSRV.LIB + +// Both recupgrade.rsc files are same (above one and the one which is mention in TRecUpgrade/recupgrade.MMP),so commented this one and used the othere one . +/** +start resource A000B461.rss +target recupgrade.rsc +end +*/ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TRecUpgrade_1/recupgrade_1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TRecUpgrade_1/recupgrade_1.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,100 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ +#include +#include "..\TRecUpgrade\upgconstants.h" +#include "..\TRecUpgrade\recupgrade.h" +#include // TParse + +///////////////////////////////////////////////// + +const TInt KMaxBufferLength=1024; // maximum amount of buffer space we will ever use + +///////////////////////////////////////////////// + +/* +DLL entry point +*/ +GLDEF_C TInt E32Dll() + { + return KErrNone; + } + +/* +Private constructor +*/ +CTestUpgradeRecognizer::CTestUpgradeRecognizer() + :CApaDataRecognizerType(KUidUpgradeRecognizer, CApaDataRecognizerType::ENormal) + { + iCountDataTypes = KNumUpgradeTypes; + } + +/* +Ecom factory function +*/ +CApaDataRecognizerType* CTestUpgradeRecognizer::CreateRecognizerL() + { + return new (ELeave) CTestUpgradeRecognizer(); + } + +TUint CTestUpgradeRecognizer::PreferredBufSize() + { + return KMaxBufferLength; + } + +TDataType CTestUpgradeRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const + { + return TDataType(KMimeUpgType); + } + +void CTestUpgradeRecognizer::DoRecognizeL(const TDesC& aName, const TDesC8& /*aBuffer*/) + { + // If an error stops CTestUpgradeRecognizer being removed as part of test cleanup, + // returning ENotRecognized will avoid the possibility of impacting other test code. + + _LIT(KExtension , ".upg"); + TParse parse; + parse.Set(aName,NULL,NULL); + TPtrC ext=parse.Ext(); // extract the extension from the filename + + if (ext.CompareF(KExtension)==0) + { + iDataType = TDataType(KMimeUpgType); + iConfidence = EPossible; + } + else + { + iDataType=TDataType(); + iConfidence=ENotRecognized; + } + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KUidUpgradeRecognizerValue, CTestUpgradeRecognizer::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,412 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include "tstapp.h" +#include +#include + +#include +#include +#include + +_LIT(KTestAppCaption, "Test App"); +_LIT(KTempFilePath, "c:\\system\\temp\\"); +_LIT(KTestAppIniFilePath, "c:\\system\\data\\tstapp.ini"); + + +GLDEF_C TInt E32Dll( + ) + { + return KErrNone; + } + +LOCAL_C CApaApplication* NewApplicationL() + { + CApaApplication* thing=NULL; + thing=CTestApp::NewL(); + return thing; + //return new CExampleApplication; + } + +LOCAL_D const TImplementationProxy ImplementationTable[]= + { + IMPLEMENTATION_PROXY_ENTRY(KTestAppUidValue, NewApplicationL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]); + return ImplementationTable; + } + + +///////////////////////////////////////// +// CBasicAppUi +///////////////////////////////////////// + +void CBasicAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile|ENoScreenFurniture); + } + +///////////////////////////////////////// +// CTestApp +///////////////////////////////////////// + +CTestApp* CTestApp::NewL() +// The gated function +// + { + CTestApp* self=new(ELeave) CTestApp(); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(self); + return self; + } + + +CTestApp::CTestApp() + :iCaption(KTestAppCaption) + {} + + +CTestApp::~CTestApp() + { + } + +void CTestApp::ConstructL() + { + User::LeaveIfError(iFs.Connect()); + } + + +void CTestApp::PreDocConstructL() + { + } + + +CEikDocument* CTestApp::CreateDocumentL() + { + return CTestAppDoc::NewL(*this); + } + +TDesC& CTestApp::Caption() +// return the app title in current system language +// + { + return iCaption; + } + + +TUid CTestApp::AppDllUid()const + { + return KUidTestApp; + } + +CDictionaryStore* CTestApp::OpenIniFileLC(RFs& aFs) const +// Opens the applications ini file if it exists, otherwise creates a new one +// The ini file is located on KTestAppIniFilePath + { + aFs.MkDirAll(KTestAppIniFilePath); // ignore the error + // + // open the ini file if it exists, otherwise create a new one + return CDictionaryFileStore::OpenLC(aFs, KTestAppIniFilePath(), AppDllUid()); + } + + +void CTestApp::Capability(TDes8& aInfo)const + { + RApaLsSession apaLsSession; + TInt err = apaLsSession.Connect(); + __ASSERT_ALWAYS(!err, User::Panic(_L("CTestApp::Capability"), err)); + apaLsSession.GetAppCapability(aInfo, CTestApp::AppDllUid()); + apaLsSession.Close(); + } + + +///////////////////////////////////////// +// CTestAppDoc +///////////////////////////////////////// + +CTestAppDoc* CTestAppDoc::NewL(CEikApplication& aApp) + { + CTestAppDoc* self=new(ELeave) CTestAppDoc(aApp); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + + +CTestAppDoc::CTestAppDoc(CEikApplication& aApp) + : CEikDocument(aApp), + iValue(0) + {} + + +void CTestAppDoc::ConstructL() + { + iEmbedList = new(ELeave) CArrayFixFlat(1); + } + +CEikAppUi* CTestAppDoc::CreateAppUiL() + { + + return new(ELeave) CBasicAppUi(); + } + +CTestAppDoc::~CTestAppDoc() + { + // delete all the embedded doc's first... + if (iEmbedList) + { + for (TInt i=iEmbedList->Count()-1 ; i>=0 ; i--) + delete EmbeddedDoor(i); // destroys the door (which in turn removes doc from the process and deletes it) + } + // then... + delete iEmbedList; + delete iStore; + } + + +TBool CTestAppDoc::IsEmpty()const + { + // return ETrue if the document is empty + if (iValue==0) + return ETrue; + else + return EFalse; + } + + +TBool CTestAppDoc::HasChanged()const + { + return iHasChanged; + } + +/** builds a new embedded or main document without loading from a store (may create the content from + eg code or a template file). +*/ +void CTestAppDoc::NewDocumentL() + {} + + +/** Create a document file & store of the specified name, storing into the store. + On system startup the name might not have a filename component in which case this function should parse the + passed name with a related default file name appropriate to this application and in an appropriate language +*/ +CFileStore* CTestAppDoc::CreateFileStoreLC(RFs& aFs,const TDesC& aFileName) + { + // set the default name just in case... + TFileName defaultName(_L("temp")); + TParse parser; + User::LeaveIfError(parser.Set(aFileName,&defaultName,NULL)); + // create the file store + CFileStore* store; + store = CDirectFileStore::CreateLC(aFs,parser.FullName(),EFileWrite); + store->SetTypeL(TUidType(KDirectFileStoreLayoutUid,KUidAppDllDoc,KUidTestApp)); + CStreamDictionary* streamDic=CStreamDictionary::NewL(); + CleanupStack::PushL(streamDic); + StoreL(*store,*streamDic); + Process()->WriteRootStreamL(*store,*streamDic,*Application()); + store->CommitL(); // now the store will be fully initialised + CleanupStack::PopAndDestroy(); // streamDic + return store; + } + + +void CTestAppDoc::EditL(MApaEmbeddedDocObserver* /*aContainer*/,TBool aReadOnly) + { + if (aReadOnly) + { + if (iContainer) + { + iContainer->NotifyExit(MApaEmbeddedDocObserver::ENoChanges); + iContainer = NULL; // iContainer must be nulled when editing is finished + } + } + else + { + iValue++; + iHasChanged = ETrue; + if (iContainer) + { + iContainer->NotifyExit(MApaEmbeddedDocObserver::EKeepChanges); + iContainer = NULL; // iContainer must be nulled when editing is finished + } + } + } + +void CTestAppDoc::NotifyExit(MApaEmbeddedDocObserver::TExitMode aMode) + { + switch (aMode) + { + case EKeepChanges: + iHasChanged = ETrue; // note that my contents have changed + break; + case ERevertToSaved: + // reload whole document (panic if I'm not the main doc) + break; + case ENoChanges: + // no changes + break; + case EEmpty: + // the embedded doc is empty + break; + } + } + + +void CTestAppDoc::PrintL(const CStreamStore& /*aSourceStore*/) + {} + + +void CTestAppDoc::SaveL() + { + + CDirectFileStore* store; + TParse newFilePath; + // create temp file + User::LeaveIfError( newFilePath.Set(Process()->MainDocFileName(),NULL,NULL) ); // abuse new file path + TBuf<2> drive=newFilePath.Drive(); + TFileName filePath(KTempFilePath); + User::LeaveIfError( newFilePath.Set(drive,&filePath,NULL) ); + Process()->FsSession().MkDirAll(newFilePath.DriveAndPath()); + TFileName tempName; + store = CDirectFileStore::TempLC(Process()->FsSession(),newFilePath.DriveAndPath(),tempName,EFileWrite); + store->SetTypeL(((CFileStore*)iStore)->Type()); + + // store main in temp + CStreamDictionary* streamDic=CStreamDictionary::NewL(); + CleanupStack::PushL(streamDic); + StoreL(*store,*streamDic); + iStore->CommitL(); + + // write root stream + Process()->WriteRootStreamL(*store,*streamDic,*Application()); + CleanupStack::PopAndDestroy(); // streamDic + // close the new store + store->CommitL(); + CleanupStack::PopAndDestroy(); // store + // close the old store + delete iStore; + iStore = NULL; + // replace the old file + User::LeaveIfError( Process()->FsSession().Replace(tempName,Process()->MainDocFileName()) ); + // open new file + iStore = CDirectFileStore::OpenL(Process()->FsSession(),Process()->MainDocFileName(),EFileShareExclusive); + } + + +void CTestAppDoc::StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic)const + { + // + // create map and store embedded doc's + CStoreMap* map=CStoreMap::NewLC(aStore); + StoreComponentsL(aStore,*map); + // store the headstream + RStoreWriteStream stream(*map); + TStreamId id=stream.CreateLC(aStore); + ExternalizeL(stream); + stream.CommitL(); + // assign the headstream in the dictionary + aStreamDic.AssignL(KUidTestAppHeadStream,id); + // tidy up + map->Reset(); + CleanupStack::PopAndDestroy(2); // map,stream + } + + +void CTestAppDoc::RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic) + { + // + TStreamId headStreamId=aStreamDic.At(KUidTestAppHeadStream); + RStoreReadStream stream; + stream.OpenLC(aStore,headStreamId); + InternalizeL(stream); + CleanupStack::PopAndDestroy(); // stream + // restore the embedded bits + RestoreComponentsL(aStore); + } + + +void CTestAppDoc::DetachFromStoreL(CPicture::TDetach aDegree) + { + for (TInt i=0 ; iCount() ; i++) + EmbeddedDoor(i)->DetachFromStoreL(aDegree); + } + + +void CTestAppDoc::StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)const + { + for (TInt i=0 ; iCount() ; i++) + { + TStreamId id=EmbeddedDoor(i)->StoreL(aStore); + aMap.BindL((*iEmbedList)[i].iPicture,id); + } + } + + +void CTestAppDoc::RestoreComponentsL(const CStreamStore& aStore) + { + TApaPictureFactory factory(Process()); + for (TInt i=0 ; iCount() ; i++) + { + TRAPD(ret, factory.NewPictureL((*iEmbedList)[i],aStore) ); + if ((ret!=KErrNone)&&(ret!=KErrNotFound)) + User::Leave(ret); + } + } + + +void CTestAppDoc::ExternalizeL(RWriteStream& aStream)const + { + aStream.WriteInt32L(iValue); + // externalize num of embedded objects + TInt numObjects=iEmbedList->Count(); + aStream.WriteInt32L(numObjects); + // externalize the doors + for (TInt i=0 ; i> header.iPicture; + iEmbedList->AppendL(header); + } + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,141 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#ifndef __TSTAPP_H__ +#define __TSTAPP_H__ + +#if !defined(__APPARC_H__) +#include +#endif + +#include +#include +#include +#include + +// classes defined: +class CTestApp; +class CTestAppDoc; +// + +#define KTestAppDefaultFileName _L("TestApp.doc") +const TInt KTestAppUidValue=10; +const TUid KUidTestApp={KTestAppUidValue}; +const TUid KUidTestAppHeadStream={200}; +const TInt KNarrowRelUidValue=268435578; +const TUid KUidNarrowRel={KNarrowRelUidValue}; // so it'll run under arm... +#define KTestAppUidType TUidType(KUidNarrowRel,KUidApp,KUidTestApp) + + +class CTestApp : public CEikApplication + { +public: + static CTestApp* NewL(); // the gated function + // from CApaApplication + void PreDocConstructL(); + CEikDocument* CreateDocumentL(); + TDesC& Caption(); // return the app title in current system language + TUid AppDllUid()const; + + CDictionaryStore* OpenIniFileLC(RFs& aFs)const; + void Capability(TDes8& aInfo)const; + ~CTestApp(); + +private: + CTestApp(); + void ConstructL(); + +private: + TBuf<8> iCaption; + RFs iFs; + }; + +class CBasicAppUi : public CEikAppUi + { +public: + inline CBasicAppUi() {} +private: + virtual void ConstructL(); + }; + +class CTestAppDoc : public CEikDocument, public MApaEmbeddedDocObserver + { +public: + static CTestAppDoc* NewL(CEikApplication& aApp); + ~CTestAppDoc(); + + inline void EmbedNewDocL(const TApaApplicationFactory& aTestFac); // exported so I can call it from testcode + inline void EditEmbeddedDocL(TInt aDocNum) {EmbeddedDoor(aDocNum)->DocumentL()->EditL(this);} + inline CApaDoor* EmbeddedDoor(TInt aDocNum)const {return (CApaDoor*)((*iEmbedList)[aDocNum].iPicture.AsPtr());} + virtual CEikAppUi* CreateAppUiL(); + +// from MApaEmbeddedDocObserver + void NotifyExit(MApaEmbeddedDocObserver::TExitMode aMode); +// from CApaDocument + void NewDocumentL(); + CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName); + void SaveL(); + // + void PrintL(const CStreamStore& aSourceStore); + void EditL(MApaEmbeddedDocObserver* aContainer,TBool aReadOnly); + TBool IsEmpty()const; // return ETrue if the document is empty + TBool HasChanged()const; + // + // storage functions + void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic)const; + void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic); + void DetachFromStoreL(CPicture::TDetach aDegree); + +protected: + CTestAppDoc(CEikApplication& aApp); + void ConstructL(); + + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream)const; + void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)const; + void RestoreComponentsL(const CStreamStore& aStore); + + // utility functions +public: + TInt iValue; // the "contents" of this test document + CArrayFixFlat* iEmbedList; + CStreamStore* iStore; + TBool iHasChanged; + }; + +inline void CTestAppDoc::EmbedNewDocL(const TApaApplicationFactory& aTestFac) + { + TPictureHeader header; + header.iPictureType = KUidPictureTypeDoor; + + CApaDocument* doc=Process()->AddNewDocumentL(aTestFac); + + RFs& fs=Process()->FsSession(); + header.iPicture = CApaDoor::NewLC(fs,*doc,TSize(500,500)); + + iEmbedList->AppendL(header); + CleanupStack::Pop(); // iPicture + } + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,30 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,75 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +NAME TAPP + +#include +#include + +#include "TSTAPP.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + + + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="TSTAPP"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_Title { buf="Simple Application"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP_embedded.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP_embedded.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +target TSTAPP_embedded.DLL +TARGETPATH /SYS/BIN +TARGETTYPE PLUGIN +UID 0x10009d8d 0x10004c66 + +CAPABILITY All -Tcb +VENDORID 0x70000001 + + +sourcepath . +source TSTAPP.CPP + +systeminclude ../INC // your public include directory should be here +systeminclude /EPOC32/INCLUDE +systeminclude /EPOC32/INCLUDE/techview +systeminclude /EPOC32/INCLUDE/ECOM + +MW_LAYER_SYSTEMINCLUDE + +userinclude . + + +START RESOURCE 10004c66.rss +TARGET TSTAPP_embedded.rsc +END + +library EUSER.LIB APPARC.LIB GDI.LIB ESTOR.LIB EFSRV.LIB APGRFX.LIB eikcore.lib CONE.LIB +library ECOM.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP_standalone.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP_standalone.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// "stub" to start the application architecture with the ECom UID +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include +#include + +const TUid KTstAppUid = {10}; //use original UID of app (before it was converted from app to exe) + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(KTstAppUid); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP_standalone.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSTAPP_standalone.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,103 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + + TARGET tstapp.exe + TARGETTYPE exe + TARGETPATH /sys/bin + +CAPABILITY All -Tcb + +UID 0x100039CE 10 //the original UID +VENDORID 0x70000001 +EPOCSTACKSIZE 0x5000 + +SOURCEPATH . +SOURCE TSTAPP_standalone.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +systeminclude /EPOC32/INCLUDE/ECOM + +MW_LAYER_SYSTEMINCLUDE + +//reg added for Datacaging +START RESOURCE tstapp_reg.rss +TARGETPATH /private/10003a3f/import/apps +END + +START RESOURCE tstapp.rss +TARGETPATH /resource/apps +END + +START RESOURCE tstapp_loc.rss +TARGETPATH /resource/apps +LANG SC 01 02 03 04 05 +END + +START BITMAP tstapp.mbm +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon40x55.bmp tstappicon40x55m.bmp + +END + +START BITMAP tstapp02.m02 +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 def25.bmp def25m.bmp def25.bmp def25m.bmp def50.bmp def50m.bmp +END + +START BITMAP tstappview01.m01 +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 def25.bmp def25m.bmp def35.bmp def35m.bmp def50.bmp def50m.bmp +END + +START BITMAP tstappview02.k +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon40x55.bmp tstappicon40x55m.bmp +END + +START BITMAP tstappview01.m02 +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 def25.bmp def25m.bmp def35.bmp def35m.bmp def50.bmp def50m.bmp +END + +START BITMAP tstappview +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon40x55.bmp tstappicon40x55m.bmp +END + +LIBRARY euser.lib apparc.lib eikcore.lib cone.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/10281FDF.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/10281FDF.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Registry file for the CAppSidCheckerInterface testing implementation +// +// + + + +/** + @file 10281FDF.rss + @internalComponent - Internal Symbian test code +*/ + +#include "RegistryInfo.rh" + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0x10281FDF; // must match the name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x20007D8C; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x10281FDE; + version_no = 1; + display_name = "TestSidChecker"; + default_data = "[10281fdb]"; + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/TestSidChecker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/TestSidChecker.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,418 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include "TestSidChecker.h" + +#include +#include +#include +#include +#include +#include + + +TBool E32Dll() + { + return (ETrue); + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x10281FDE, CTestSidChecker::NewL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +////////////////////////////// +// private class declarations +////////////////////////////// + +NONSHARABLE_CLASS(CApFileTestPropertyMonitor) : public CActive + { +public: + static CApFileTestPropertyMonitor* NewL(TCallBack aCallBack); + ~CApFileTestPropertyMonitor(); + void Start(); + +private: + CApFileTestPropertyMonitor(TCallBack aCallBack); + void RunL(); + void DoCancel(); + +private: + TCallBack iCallBack; + RProperty iProperty; + }; + +NONSHARABLE_CLASS(CApFileTestOneShotTimer) : public CActive + { +public: + static CApFileTestOneShotTimer* NewL(TCallBack aCallBack); + ~CApFileTestOneShotTimer(); + void Start(TTimeIntervalMicroSeconds32 aDelay); + +private: + CApFileTestOneShotTimer(TCallBack aCallBack); + void RunL(); + void DoCancel(); + +private: + TCallBack iCallBack; + RTimer iTimer; + }; + +////////////////////////////// +// CApFileTestPropertyMonitor +////////////////////////////// + +CApFileTestPropertyMonitor* CApFileTestPropertyMonitor::NewL(TCallBack aCallBack) + { + CApFileTestPropertyMonitor* self = new(ELeave) CApFileTestPropertyMonitor(aCallBack); + TInt err = self->iProperty.Attach(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey); + if(err != KErrNone) + { + delete self; + User::Leave(err); + } + return self; + } + +CApFileTestPropertyMonitor::CApFileTestPropertyMonitor(TCallBack aCallBack) : + CActive(EPriorityHigh), + iCallBack(aCallBack) + { + CActiveScheduler::Add(this); + } + +CApFileTestPropertyMonitor::~CApFileTestPropertyMonitor() + { + Cancel(); + iProperty.Close(); + } + +void CApFileTestPropertyMonitor::Start() + { + iProperty.Subscribe(iStatus); + SetActive(); + } + +void CApFileTestPropertyMonitor::RunL() + { + if(iStatus.Int() != KErrNone) + { + RDebug::Print(_L("TestSidChecker: Property subcribe failed, error code: %i"), iStatus.Int()); + } + iCallBack.CallBack(); + } + +void CApFileTestPropertyMonitor::DoCancel() + { + iProperty.Cancel(); + } + +////////////////////////////// +// CApFileTestOneShotTimer +////////////////////////////// + +CApFileTestOneShotTimer* CApFileTestOneShotTimer::NewL(TCallBack aCallBack) + { + CApFileTestOneShotTimer* self = new(ELeave) CApFileTestOneShotTimer(aCallBack); + TInt err = self->iTimer.CreateLocal(); + if(err != KErrNone) + { + delete self; + User::Leave(err); + } + return self; + } + +CApFileTestOneShotTimer::CApFileTestOneShotTimer(TCallBack aCallBack) : + CActive(EPriorityHigh), + iCallBack(aCallBack) + { + CActiveScheduler::Add(this); + } + +CApFileTestOneShotTimer::~CApFileTestOneShotTimer() + { + Cancel(); + iTimer.Close(); + } + +void CApFileTestOneShotTimer::Start(TTimeIntervalMicroSeconds32 aDelay) + { + iTimer.After(iStatus,aDelay); + SetActive(); + } + +void CApFileTestOneShotTimer::RunL() + { + if(iStatus.Int() != KErrNone) + { + RDebug::Print(_L("TestSidChecker: OneShotTimer Failed, error code: %i"), iStatus.Int()); + } + iCallBack.CallBack(); + } + +void CApFileTestOneShotTimer::DoCancel() + { + iTimer.Cancel(); + } + +////////////////////////////// +// CTestSidChecker +////////////////////////////// + +CTestSidChecker* CTestSidChecker::NewL() + { + CTestSidChecker* self = new(ELeave) CTestSidChecker(); + return self; + } + +CTestSidChecker::CTestSidChecker() + { + } + +CTestSidChecker::~CTestSidChecker() + { + } + +TBool CTestSidChecker::AppRegisteredAt(const TUid& aSid, TDriveUnit aDrive) + { + TBool ret = EFalse; + if(aSid == KApFileTestBadApp) + { + ret = EFalse; + } + else if(aSid == KApFileTestGoodApp) + { + #ifdef __WINS__ + TDriveUnit drive(EDriveX); + #else + TDriveUnit drive(EDriveX); + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + //The removable media is expected at D: on NAND ROM and at E: on normal ROMs. + //The following code works on techview but not guaranteed to work on all platforms. + TDriveInfo driveInfo; + TInt error = fs.Drive(driveInfo, EDriveD); + if(error == KErrNone && ((driveInfo.iDriveAtt & KDriveAttRemovable) != 0)) + { + // Use drive D + drive = EDriveD; + } + else + { + error = fs.Drive(driveInfo, EDriveE); + if(error == KErrNone && ((driveInfo.iDriveAtt & KDriveAttRemovable) != 0)) + { + // Use drive E + drive = EDriveE; + } + } + fs.Close(); + CleanupStack::PopAndDestroy(&fs); + #endif + ret = (aDrive == drive); + } + else if(aSid == KApFileTestCallBackApp) + { + ret = ETrue; + CallBackAppChecked(); + } + else if(aSid == KApFileTestForcedRegistration) + { + ret = EFalse; + } + else if(aSid == KApTriggerRescan) + { + ret = ETrue; + if (!iRescanTriggered) + { + iRescanTriggered = ETrue; + iRescanCallBack.CallBack(); + } + } + else if(aSid == KApFileTestAppWithMultipleRegistrationFiles) + { + ret = ETrue; + AppWithMultipleRegistrationFilesChecked(); + } + else + { + Error(_L("TestSidChecker: Unknown sid %x"), aSid.iUid); + } + return ret; + } + +void CTestSidChecker::SetRescanCallBackL(const TCallBack &aCallBack) + { + iRescanCallBack = aCallBack; + if(aCallBack.iFunction) + { + iMonitor = CApFileTestPropertyMonitor::NewL(TCallBack(&PropertyEventCallBack,this)); + iTimer = CApFileTestOneShotTimer::NewL(TCallBack(&TimerEventCallBack,this)); + } + } + +void CTestSidChecker::AppWithMultipleRegistrationFilesChecked() + { + TInt value; + TInt err = RProperty::Get(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, value); + if(err == KErrNone) + { + if(value == ECheckedOnce) + { + TInt err = RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, ECheckedTwice); + if(err != KErrNone) + { + Error(_L("TestSidChecker: Property set failed, error code: %i"), err); + } + } + else if(value == ECheckedTwice) + { + TInt err = RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, ECheckedThrice); + if(err != KErrNone) + { + Error(_L("TestSidChecker: Property set failed, error code: %i"), err); + } + } + else + { + TInt err = RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, ECheckedOnce); + if(err != KErrNone) + { + Error(_L("TestSidChecker: Property set failed, error code: %i"), err); + } + } + } + } + +void CTestSidChecker::CallBackAppChecked() + { + if(iState == ENotStarted) + { + TInt value; + TInt err = RProperty::Get(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, value); + if(err == KErrNone) + { + if(value == EPluginLoad) + { + iMonitor->Start(); + iState = EMonitorStarted; + } + else + { + Error(_L("TestSidChecker: Bad property value %u"), value); + } + } + else + { + // don't fail here, it's probably just a stale reg file. + } + } + else if(iState == EMonitorStarted) + { + // do nothing, it's a random scan happening before we start one manually + } + else if(iState == EScanStarted) + { + iState = EAppChecked; + TInt err = RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, EScanOccurred); + if(err != KErrNone) + { + Error(_L("TestSidChecker: Property set failed, error code: %i"), err); + } + } + else + { + Error(_L("TestSidChecker: Unexpected state %u"), iState); + } + } + +TInt CTestSidChecker::PropertyEventCallBack(TAny* aSelf) + { + return STATIC_CAST(CTestSidChecker*,aSelf)->PropertyEvent(); + } + +TInt CTestSidChecker::PropertyEvent() + { + if(iState == EMonitorStarted) + { + TInt value; + TInt err = RProperty::Get(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, value); + if(err == KErrNone) + { + if(value == ETriggerScan) + { + User::After(1000000); // wait a second for the testexecute to subscribe to the property + iTimer->Start(7 * 1000000); // wait 7 seconds before assuming the callback has failed + iState = EScanStarted; + iRescanCallBack.CallBack(); + } + else + { + Error(_L("TestSidChecker: Bad property value %u"), value); + } + } + else + { + Error(_L("TestSidChecker: PropertyGetFailed, error code: %i"), err); + } + } + else + { + Error(_L("TestSidChecker: Unexpected State %u"), iState); + } + + return KErrNone; + } + +TInt CTestSidChecker::TimerEventCallBack(TAny* aSelf) + { + return STATIC_CAST(CTestSidChecker*,aSelf)->TimerEvent(); + } + +TInt CTestSidChecker::TimerEvent() + { + if(iState == EScanStarted) + { + TInt err = RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, ETimedOut); + if(err != KErrNone) + { + Error(_L("TestSidChecker: Property set failed, error code: %i"), err); + } + } + else if(iState != EAppChecked) + { + Error(_L("TestSidChecker: Unexpected state %u"), iState); + } + + return KErrNone; + } + +void CTestSidChecker::Error(TRefByValue aFmt, TInt aValue) + { + // Something rather unexpected happened. Give up, keep quiet. + RDebug::Print(aFmt,aValue); + iTimer->Cancel(); + iMonitor->Cancel(); + iState = ECallBackTestError; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/TestSidChecker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/TestSidChecker.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,94 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TESTSIDCHECKER_H__ +#define __TESTSIDCHECKER_H__ + +#include +#include + +const TUid KApFileTestAppType = {0x10281FDB}; +const TUid KApFileTestBadApp = {0x10281FDC}; +const TUid KApFileTestGoodApp = {0x10281FDD}; +const TUid KApFileTestAppTypeSidChecker = {0x10281FDE}; +const TUid KApFileTestAppTypeSidCheckerDll = {0x10281FDF}; +const TUid KApFileTestPubSubCategory = {0x101F289C}; // apparc test server sid +const TUid KApFileTestCallBackApp = {0x10281FE0}; +const TUid KApFileTestForcedRegistration = {0x102825B5}; +const TUid KApTriggerRescan = {0x102825B6}; +// randomly picked, to try to avoid anything else in the apparctestserver using pub/sub +const TUint KApFileTestPubSubCallBackKey = 0x0000d3f9; +const TUid KApFileTestAppWithMultipleRegistrationFiles = {0xA000D107}; + +class CApFileTestPropertyMonitor; +class CApFileTestOneShotTimer; + +NONSHARABLE_CLASS(CTestSidChecker) : public CAppSidChecker +/** Test Sid checker. + +This is an implementation of CAppSidChecker for checking native application Sids + +This instance of the CAppSidChecker is used to verify that a native application +installed and can be launched. + +@internalComponent */ + { +public: + enum TPropertyValue + { + EPropertyDefault, + EPluginLoad, + ETriggerScan, + EScanOccurred, + ETimedOut, + EOtherError, + ECheckedOnce, + ECheckedTwice, + ECheckedThrice + }; + static CTestSidChecker* NewL(); + ~CTestSidChecker(); + +public: + virtual TBool AppRegisteredAt(const TUid& aSid, TDriveUnit aDrive); + virtual void SetRescanCallBackL(const TCallBack &aCallback); + +private: + CTestSidChecker(); + void CallBackAppChecked(); + void AppWithMultipleRegistrationFilesChecked(); + static TInt PropertyEventCallBack(TAny* aSelf); + TInt PropertyEvent(); + static TInt TimerEventCallBack(TAny* aSelf); + TInt TimerEvent(); + void Error(TRefByValue aFmt, TInt aValue); + +private: + enum TState + { + ENotStarted, + EMonitorStarted, + EScanStarted, + EAppChecked, + ECallBackTestError + }; + TCallBack iRescanCallBack; + CApFileTestPropertyMonitor* iMonitor; + CApFileTestOneShotTimer* iTimer; + TState iState; + TBool iRescanTriggered; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/TestSidChecker.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TSidChecker/TestSidChecker.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +TARGET TestSidChecker.dll +CAPABILITY All -Tcb +TARGETTYPE plugin + +UID 0x10009d8d 0x10281FDF + +SOURCEPATH . +SOURCE TestSidChecker.cpp +SYSTEMINCLUDE /epoc32/include /epoc32/include/ecom + +start RESOURCE 10281FDF.rss +target testsidchecker.rsc +end + +LIBRARY EUSER.LIB APFILE.LIB ECOM.LIB EFSRV.LIB \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDoc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDoc.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__TSTARTDOC_H__) +#define __TSTARTDOC_H__ + +#if !defined(__E32STD_H__) +#include +#endif +/** KLitLongURL must be > 256 characters long, in this case it's 259 characters long + The name is a little mis-leading, as it's not a real URL. URL is used in the name + because one of the use cases for needing document names longer than 256 characters + is when starting a very long URL to be handled by a web browser application +*/ +_LIT(KLitLongURL, "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefXYZ"); + +/** KTStartDocTestPassed is a number chosen at random to be used as an exit reason + for TStartDocApp.app's application thread to signify that the test passed +*/ + +const TInt KTStartDocTestPassed = 2387; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDocApp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDocApp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,199 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting application for use by T_StartDocStep.cpp +// The implementation of CR PHAR-5NTCWY removes the 256 character limit +// on the length of document names. +// This application is designed to be started by test code calling +// RApaLsSession::StartDocument(const TDesC& aFileName, TThreadId& aId, +// TLaunchType aLaunchType=ELaunchNewApp) +// passing a document name (first parameter) that is longer than +// 256 characters. +// The test passes if this application is started with a document name +// that is longer than 256 characters. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include + +#include + +#include "TStartDoc.h" + +const TUid KUidTStartDocApp = { 0x10004c4d }; + +enum TStartDocAppPanic + { + EPanicDocNameCheck1Failed, + EPanicDocNameCheck1NotExecuted, + EPanicDocNameCheck2Failed, + }; + +void Panic(TStartDocAppPanic aPanic) +// +// Panic the process with TESTFAILED as the category. +// + { + _LIT(KPanicCategory,"TESTFAILED"); + User::Panic(KPanicCategory, aPanic); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CStartDocAppUi +// +//////////////////////////////////////////////////////////////////////// +class CStartDocAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CStartDocAppUi(); +public: + TBool DocNameCheck1Executed() const; + // from CEikAppUi + TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); +private: + TBool iDocNameCheck1Executed; + }; + + +void CStartDocAppUi::ConstructL() + { + BaseConstructL(ENoAppResourceFile | ENoScreenFurniture); + } + +CStartDocAppUi::~CStartDocAppUi() + { + } + +TBool CStartDocAppUi::DocNameCheck1Executed() const + { + return iDocNameCheck1Executed; + } + +TBool CStartDocAppUi::ProcessCommandParametersL(TApaCommand /*aCommand*/, TFileName& aDocumentName, const TDesC8& /*aTail*/) + { + if (aDocumentName != KLitLongURL) + { + Panic(EPanicDocNameCheck1Failed); + } + iDocNameCheck1Executed = ETrue; + return EFalse; // don't try to open the document + } + + +//////////////////////////////////////////////////////////////////////// +// +// CStartDocDocument +// +//////////////////////////////////////////////////////////////////////// +class CStartDocDocument : public CEikDocument + { +public: + static CStartDocDocument* NewL(CEikApplication& aApp); + CStartDocDocument(CEikApplication& aApp); + void ConstructL(); + CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs); +private: + // from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CStartDocDocument::CStartDocDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CStartDocDocument::CreateAppUiL() + { + return new(ELeave) CStartDocAppUi; + } + +CFileStore* CStartDocDocument::OpenFileL(TBool /*aDoOpen*/,const TDesC& /*aFilename*/,RFs& /*aFs*/) + { + if (!(static_cast(CEikonEnv::Static()->EikAppUi())->DocNameCheck1Executed())) + { + Panic(EPanicDocNameCheck1NotExecuted); + } + /** the process main doc filename should have been set by the framework by the time + this function is called, so check it's been sucessfully set to a value that's + longer than 256 characters + (this tests the new CApaProcess::SetMainDocFileNameL API) + */ + if (Process()->MainDocFileName() != KLitLongURL) + { + Panic(EPanicDocNameCheck2Failed); + } + // by exiting the app here with KTStartDocTestPassed, we ensure the test cannot pass + // in cases where something leaves during app startup + User::After(10000000); // ensure that the test harness gets a chance to logon to us + User::Exit(KTStartDocTestPassed); + return NULL; // just to keep the compiler happy + } + + +//////////////////////////////////////////////////////////////////////// +// +// CStartDocApplication +// +//////////////////////////////////////////////////////////////////////// +class CStartDocApplication : public CEikApplication + { +private: + // from CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + TFileName ResourceFileName() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +CApaDocument* CStartDocApplication::CreateDocumentL() + { + return new (ELeave) CStartDocDocument(*this); + } + +TUid CStartDocApplication::AppDllUid() const + { + return KUidTStartDocApp; + } + +TFileName CStartDocApplication::ResourceFileName() const + { + return TFileName(); // this app doesn't have a resource file + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CStartDocApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDocApp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDocApp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,40 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TStartDocApp_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c4d +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TStartDocApp"; + // + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + // + datatype_list= + { + DATATYPE { priority=EDataTypePriorityHigh; type="x-epoc/long-url"; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDocApp_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TStartDocApp_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TStartDocApp.mmp +// +// + +TARGETPATH /sys/bin + + TARGET TStartDocApp.exe + TARGETTYPE exe + +CAPABILITY All -Tcb +UID 0x100039CE 0x10004c4d +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TStartDocApp.cpp + +START RESOURCE TStartDocApp_reg.rss +TARGETPATH /private/10003a3f/apps +END + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib + + +epocstacksize 0x5000 //added diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TTestEcomFileRec.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TTestEcomFileRec.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,70 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +class CTestEcomRecognizer : public CApaFileRecognizerType + { +public: // from CApaFileRecognizerType + TThreadId RunL(TApaCommand aCommand,const TDesC* aDocFileName=NULL,const TDesC8* aTailEnd=NULL) const; + static CApaFileRecognizerType* CreateRecognizerL(); +private: // from CApaFileRecognizerType + TRecognizedType DoRecognizeFileL(RFs& aFs,TUidType aType); + }; + +TThreadId CTestEcomRecognizer::RunL(TApaCommand /*aCommand*/,const TDesC* /*aDocFileName*/,const TDesC8* /*aTailEnd*/) const + { + TThreadId id(NULL); + return id; + } + +CApaFileRecognizerType::TRecognizedType CTestEcomRecognizer::DoRecognizeFileL(RFs& /*aFs*/,TUidType /*aType*/) + { + return iRecognizedType; + } + + +GLDEF_C TInt E32Dll( + ) + +// DLL entry point + + { + return KErrNone; + } + +CApaFileRecognizerType* CTestEcomRecognizer::CreateRecognizerL() + { + return new (ELeave) CTestEcomRecognizer(); + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x101F7D8C,CTestEcomRecognizer::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TTestEcomFileRec.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TTestEcomFileRec.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +target ttestecomfilerec.dll +CAPABILITY All -Tcb +targettype plugin +uid 0x10009d8d 0x10000181 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE TTESTECOMFILEREC.CPP +systeminclude /EPOC32/INCLUDE +systeminclude /EPOC32/INCLUDE/ECOM + + +library EUSER.LIB APPARC.LIB + + +start resource 10000181.rss +target ttestecomfilerec.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TWindowChaining.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TWindowChaining.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if !defined(__TWINDOWCHAINING_H__) +#define __TWINDOWCHAINING_H__ + +#if !defined(__E32STD_H__) +#include +#endif + +/** Ordinal priority chosen at random */ +const TInt KExoticOrdinalPriority=748; + +/** UIDs of the child and server (launch) application */ +const TUid KUidTChainChildApp = { 0x10009e9f }; +const TUid KUidTChainServerApp = { 0x10009f9a }; + +/** KTWindowChainingTestPassed is a number chosen at random to be used as an exit reason + for TWindowChainingApp.app's application thread to signify that the test passed */ +const TInt KTWindowChainingTestPassed = 2387; + +const TInt KChainPass = 42; +const TInt KChainFail = 59; + +/** Message ID (chosen at random) to query child to check parent id matches */ +const TInt KQueryChainChild1 = 428; +const TInt KQueryChainChild2 = 429; + +_LIT(KWinChainChildAppFileName, "z:\\sys\\bin\\t_winchainLaunch.exe"); +#endif // __TWINDOWCHAINING_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppList.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppList.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,79 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test if apparctestserver +// can return app data for a specific app by caching that data when requested. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include "T_AppList.h" + +CTestAppListStep::CTestAppListStep() + { + } + +CTestAppListStep::~CTestAppListStep() + { + iApaLsSession.Close(); + } + + +/** + @SYMTestCaseID CTestAppListStep_TestAppListL + + @SYMDEF DEF056494: Apparc App Info access APIs require the applist to be complete, delaying startup + + @SYMTestCaseDesc Testing whether apparctestserver return app info when the list is not completely populated. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions To query for a particular app Info and check if the info is available. + API Calls:\n + RApaLsSession::GetAppInfo(); + + @SYMTestExpectedResults Test should complete without any panic. + */ +void CTestAppListStep::TestAppList() + { + TApaAppInfo appInfo; + TUid uid = {0x100048F3}; + TInt ret = iApaLsSession.GetAppInfo(appInfo,uid); + INFO_PRINTF2(_L(" Call to GetAppInfo returned : %d "), ret); + TEST(ret==KErrNone); + } + + +TVerdict CTestAppListStep::doTestStepL() + { + INFO_PRINTF1(_L("Test T_AppList Started")); + + // Connect to RApaLsSession without waiting for app list population + TEST(iApaLsSession.ConnectWithoutWaitingForListPopulation()==KErrNone); + + // Run the test + //DONT_CHECK since apps are added to app list by CApaAppList::FindAndAddSpecificAppL() + HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestAppList(), NO_CLEANUP); + + INFO_PRINTF1(_L("Test Finished")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppList.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppList.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __T_APPLIST_H +#define __T_APPLIST_H + +#include "appfwk_test_AppUi.h" +#include "testableapalssession.h" + +_LIT(KTestAppListStep, "T_AppList"); + +//! CTestAppListStep +/*! + This class is used to test applist apis (GetAllApps, GetNextApp, GetAppInfo) + in RApaLsSession +*/ +class CTestAppListStep : public CTestStep + { +public: + CTestAppListStep(); + ~CTestAppListStep(); + void TestAppList(); + virtual TVerdict doTestStepL(); +private: + RTestableApaLsSession iApaLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileBootStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileBootStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,285 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Note: With PREQ1228, we introduced "REQ5896:Load application information from a single file". +// This PREQ is tested with the following two test steps: +// T_AppListBootStep (only run for emulator, as it requires epoc restart) +// |___ (APPFWK-APPARC-0033) Tests that the application information file (AppsList.bin) is created +// | if it does not exists, and we reboot the phone. +// |___ (APPFWK-APPARC-0034) Tests that the Short Caption associated with an app is restored to +// its original value when the phone is restarted. +// T_AppListUpdateStep +// |___ (APPFWK-APPARC-0035) Tests that the application information file (AppsList.bin) is created +// | if it does not exists, and we force a registration. +// |___ (APPFWK-APPARC-0032) Tests that the application information file (AppsList.bin) is updated +// whenever a new application is installed. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include +#include "T_AppListFileBootStep.h" + + +_LIT(KAppListFileName,"c:\\private\\10003a3f\\AppsListCache\\AppsList.bin"); +_LIT(KShortCaption1, "SC1"); +_LIT(KOriginalShortCaption, "TC UK"); + +const TUid KUidTestApp={10}; +const TInt KMaxTimeCount = 18; // 18 * 10 sec == 180 seconds + + +/** +Call base class method to set up the human readable name for logging TestStepName +iBootType value set as per aBootType +*/ +CT_AppListFileBootStep::CT_AppListFileBootStep(TInt aBootType) + { + iBootType = aBootType; + if(iBootType == 1) + { + SetTestStepName(KT_AppListFile_Boot1); + } + else if(iBootType == 2) + { + SetTestStepName(KT_AppListFile_Boot2); + } + else + { + SetTestStepName(KT_AppListFile_Boot3); + } + } + + +CT_AppListFileBootStep::~CT_AppListFileBootStep() + { + } + + +TVerdict CT_AppListFileBootStep::doTestStepL() + { + INFO_PRINTF1(_L("Test step started....")); + +#ifdef __WINS__ + __UHEAP_MARK; + TRAPD(ret, DoTestL()); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("DoTestL() finished with return code '%d'"), ret); + __UHEAP_MARKEND; +#else + INFO_PRINTF1(_L("TEST NOT RUN! - T_AppListFile_BootX tests are meant only to run on Emulator")); + TEST(EFalse); +#endif + + INFO_PRINTF1(_L("....test step finished!")); + return TestStepResult(); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0033, APPFWK-APPARC-0034 + + @SYMPREQ PREQ1228 (CR0831) + + @SYMREQ REQ5896 + + @SYMTestPriority High + + @SYMTestType CIT + + @SYMTestCaseDesc Tests that the application information file (AppsList.bin) is created if it does + not exists, and we reboot the phone. + Tests that the Short Caption associated with an app is restored to its original + value when the phone is restarted. + + @SYMTestStatus Implemented + + @SYMTestActions This tests the update of the applist file in \\private\\10003a3f\\import\\\apps\\. + The sequence is as follows: + (BOOT - 1) + 1.- Check the applist file exists. It must exists. + 2.- Delete the applist file. + (BOOT - 2) + 3.- Check the applist file does not exist. + 4.- Check the applist is created after a short period of time. + 5.- Set short caption of a test app to a custom value. + (BOOT - 3) + 6.- Check short caption of the test app is restored to its original value. + + @SYMTestExpectedResults For Boot1 AppList File must exist when the test starts, but not when it finishes. + For Boot2 AppList File must not exist when the test starts, but is created later on. + For Boot3 ShortCaption for tstapp.exe must return to original short caption + */ + + void CT_AppListFileBootStep::DoTestL() + { + TInt ret = iUtils.Connect(); + TEST(ret==KErrNone); + + TBool present = EFalse; + ret = iUtils.IsFilePresent(KAppListFileName, present); + TEST(ret == KErrNone); + + switch(iBootType) + { + case 1: + { + INFO_PRINTF1(_L("Starting test case: APPFWK-APPARC-0033")); + // Check the file is present, or wait until it is. When/If present, delete it. + INFO_PRINTF1(_L("The should file exists (as no other test have removed it), so then this test should delete it:")); + present = CheckForFilePresent(); + TEST(present); + if (present) + { + DeleteAppListFileL(KAppListFileName); + } + INFO_PRINTF1(_L("APPFWK-APPARC-0033 Test Continues... with Boot2 script")); + } + break; + + case 2: + { + INFO_PRINTF1(_L("APPFWK-APPARC-0033 Test Continues... from Boot1 script")); + // Check the file not present, and then wait until it is. + INFO_PRINTF1(_L("The file should not exist as it has been deleted by Boot1, otherwise the test fails:")); + TEST(!present); + present = CheckForFilePresent(); + TEST(present); + INFO_PRINTF1(_L("APPFWK-APPARC-0033 Test Finished!")); + + INFO_PRINTF1(_L("Starting test case: APPFWK-APPARC-0034")); + SetShortCaptionSettings(); + INFO_PRINTF1(_L("APPFWK-APPARC-0034 Test Continues... with Boot3 script")); + } + break; + + case 3: + { + INFO_PRINTF1(_L("APPFWK-APPARC-0034 Test Continues... from Boot2 script")); + TestShortCaptionSettings(); + INFO_PRINTF1(_L("APPFWK-APPARC-0034 Test Finished!")); + } + break; + } + iUtils.Close(); + } + + +/* +It will delete the applistfile created by apparc component to test the change in the bootup time. +*/ +void CT_AppListFileBootStep::DeleteAppListFileL(const TDesC& aFileName) + { + INFO_PRINTF2(_L("Delete AppList file '%S'..."), &aFileName); + + TInt ret = iUtils.SetReadOnly(aFileName, 0); + TEST(ret == KErrNone); + + ret = iUtils.DeleteFileL(aFileName); + TEST(ret == KErrNone); + } + + +/* +Checks whether the "AppList.Bin" exists, if not waits for a maximum time of (KMaxTimeCount * 10) seconds for the file to create. +Else the test fails. +*/ +TBool CT_AppListFileBootStep::CheckForFilePresent() + { + INFO_PRINTF2(_L("Wait for a maximum time of '%d' secs for the file to be created"), KMaxTimeCount * 10); + + TBool present = EFalse; + for (TInt index = 0; present == EFalse && index < KMaxTimeCount; index++) + { + TEST(iUtils.IsFilePresent(KAppListFileName, present) == KErrNone); + if (present) + { + INFO_PRINTF2(_L("AppList file is successfully created after '%d' seconds!"), index * 10); + break; + } + // wait 10 secs before trying again in the next loop + User::After(10 * 1000000); + } + + if (!present) + { + INFO_PRINTF2(_L("AppList file was NOT created after '%d' seconds"), KMaxTimeCount * 10); + } + + return present; + } + + +/* +Testing whether short caption for test app is set as the original short caption +*/ +void CT_AppListFileBootStep::TestShortCaptionSettings() + { + INFO_PRINTF1(_L("Testing whether short caption for test app is set as the original short caption")); + + TInt err = iSession.Connect(); + TEST(err == KErrNone); + + TApaAppInfo info1; + err = iSession.GetAppInfo(info1, KUidTestApp); + TEST(err == KErrNone); + + TBuf<10> expected; + expected.Format(KOriginalShortCaption); + TBuf<10> actual; + actual.Format(info1.iShortCaption); + INFO_PRINTF3(_L("Short Caption Settings: Expected '%S', Actual '%S'"), &expected, &actual); + TEST(info1.iShortCaption==KOriginalShortCaption); + + // close session and finish + iSession.Close(); + } + + +/* +Sets the short caption for tstapp.exe to KShortCaption1 +*/ +void CT_AppListFileBootStep::SetShortCaptionSettings() + { + INFO_PRINTF2(_L("Setting short caption settings to '%S'..."), &KShortCaption1); + + TInt err = iSession.Connect(); + TEST(err == KErrNone); + err = iSession.SetAppShortCaption(KShortCaption1, ELangEnglish, KUidTestApp); + TEST(err == KErrNone); + + // wait 2.5 secs for the caption to be updated + User::After(2500000); + + TApaAppInfo info1; + err = iSession.GetAppInfo(info1, KUidTestApp); + TEST(err == KErrNone); + + TBuf<10> expected; + expected.Format(KShortCaption1); + TBuf<10> actual; + actual.Format(info1.iShortCaption); + INFO_PRINTF3(_L("Short Caption Settings: Expected '%S', Actual '%S'"), &expected, &actual); + TEST(info1.iShortCaption==KShortCaption1); + + // close session and finish + iSession.Close(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileBootStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileBootStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,54 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_APPLISTFILEBOOTSTEP_H +#define __T_APPLISTFILEBOOTSTEP_H + +#include "ApparcTestServer.h" +#include + +_LIT(KT_AppListFile_Boot1,"T_AppListFile_Boot1"); +_LIT(KT_AppListFile_Boot2,"T_AppListFile_Boot2"); +_LIT(KT_AppListFile_Boot3,"T_AppListFile_Boot3"); + +class CT_AppListFileBootStep : public CTestStep + { +public: + CT_AppListFileBootStep(TInt); + ~CT_AppListFileBootStep(); + virtual TVerdict doTestStepL(); + +private: + void DoTestL(); + TBool CheckForFilePresent(); + void DeleteAppListFileL(const TDesC&); + void SetShortCaptionSettings(); + void TestShortCaptionSettings(); + +private: + TInt iBootType; + RApaLsSession iSession; + RSmlTestUtils iUtils; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileUpdateStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileUpdateStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,300 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Note: With PREQ1228, we introduced "REQ5896:Load application information from a single file". +// This PREQ is tested with the following two test steps: +// T_AppListBootStep (only run for emulator, as it requires epoc restart) +// |___ (APPFWK-APPARC-0033) Tests that the application information file (AppsList.bin) is created +// | if it does not exists, and we reboot the phone. +// |___ (APPFWK-APPARC-0034) Tests that the Short Caption associated with an app +// T_AppListUpdateStep +// |___ (APPFWK-APPARC-0035) Tests that the application information file (AppsList.bin) is created +// | if it does not exists, and we force a registration. +// |___ (APPFWK-APPARC-0032) Tests that the application information file (AppsList.bin) is updated +// whenever a new application is installed. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include +#include "T_AppListFileUpdateStep.h" + +_LIT(KTestAppZPath,"Z:\\ApparcTest\\TestAppInstall_reg.RSC"); +_LIT(KAppListFileName,"C:\\private\\10003a3f\\AppsListCache\\AppsList.bin"); +_LIT(KAppTimeFormat,"%:0%H%:1%T%:2%S%:3"); +_LIT(KAppDirectory,"C:\\Private\\10003a3f\\Import\\apps\\"); +_LIT(KTestAppObsolutePath1,"C:\\Private\\10003a3f\\Import\\apps\\TestAppInstall_reg.RSC"); + +const TInt KMaxTimeCount = 18; // 18 * 10 is 180 Seconds + + +CT_AppListFileUpdateStep::CT_AppListFileUpdateStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_AppListFileUpdate); + } + + +CT_AppListFileUpdateStep::~CT_AppListFileUpdateStep() + { + } + +TVerdict CT_AppListFileUpdateStep::doTestStepPreambleL() + { + User::LeaveIfError(iSession.Connect()); + User::LeaveIfError(iUtils.Connect()); + User::LeaveIfError(iFs.Connect()); + + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_AppListFileUpdateStep::doTestStepPostambleL() + { + iFs.Close(); + iUtils.Close(); + iSession.Close(); + return TestStepResult(); + } + + +TVerdict CT_AppListFileUpdateStep::doTestStepL() + { + INFO_PRINTF1(_L("AppListFileUpdateStep test step started...")); + + __UHEAP_MARK; + INFO_PRINTF1(_L("APPFWK-APPARC-0035 Test Started")); + TRAPD(ret, TestDeleteAppListFileL()); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("TestDeleteAppListFileL() finished with return code '%d'\n"), ret); + INFO_PRINTF1(_L("APPFWK-APPARC-0035 Test Finished\n")); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("APPFWK-APPARC-0032 Test Started")); + TRAP(ret, TestTimeStampL()); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("TestTimeStampL() finished with return code '%d'"), ret); + INFO_PRINTF1(_L("APPFWK-APPARC-0032 Test Finished\n")); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("...AppListFileUpdateStep test step finished!")); + return TestStepResult(); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0032 + + @SYMPREQ PREQ1228 (CR0831) + + @SYMREQ REQ5896 + + @SYMTestCaseDesc Tests that the application information file (AppsList.bin) is updated + whenever a new application is installed. + + @SYMTestType CIT + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions This tests the update of the applist file in \\private\\10003a3f\\import\\\apps\\. + The sequence is as follows: + 1.- Check the file exists. It must exists. + 2.- Record timestamp for applist file. + 3.- Install a new test application. + 4.- Record timestamp for applist file, allowing some time for the file to be updated + 4.- Compare timestamps before and after test app installation. + + @SYMTestExpectedResults Modified time of AppsList.bin after installation must be greater than before installation. + */ + + void CT_AppListFileUpdateStep::TestTimeStampL() + { + // Create KAppDirectory + TInt err = iUtils.CreateDirectoryL(KAppDirectory); + TEST(err == KErrNone || err == KErrAlreadyExists); + + // Wait until KAppListFileName is present and check that the file has been created indeed + TBool present = CheckForFilePresent(); + TEST(present); + + // Record time before app list was modified + INFO_PRINTF1(_L("Record time before app list was modified...")); + TTime timeBeforeAppListModification; + AppsListModifiedTimeL(timeBeforeAppListModification); + + // Install an application + INFO_PRINTF1(_L("Install application...")); + InstallApplicationL(KTestAppObsolutePath1); + + // wait 5 seconds for the app to be properly installed + User::After(5 * 1000000); + + // Wait until KAppListFileName is present and check that the file has been created indeed. + present = CheckForFilePresent(); + TEST(present); + + // Record time after app list was modified + INFO_PRINTF1(_L("Record time after app list was modified...")); + TTime timeAfterAppListModification; + AppsListModifiedTimeL(timeAfterAppListModification); + + // Check that the modification time "after" is after the modification time "before" + TEST(timeAfterAppListModification > timeBeforeAppListModification); + + // Uninstall & delete... + INFO_PRINTF1(_L("Uninstalling application...")); + DeleteApplicationL(KTestAppObsolutePath1); + } + + +/* +Delete a registration resource file (TestAppInstall.rsc) in the path "C:\private\10003a3f\import\apps" . +*/ +void CT_AppListFileUpdateStep::DeleteApplicationL(const TDesC& aAppName) + { + INFO_PRINTF2(_L("Deleting file '%S'"), &aAppName); + + TInt ret = iUtils.SetReadOnly(aAppName, 0); + TEST(ret == KErrNone); + ret = iUtils.DeleteFileL(aAppName); + TEST(ret == KErrNone); + } + + +/* +Copy a registration resource file (TestAppInstall.rsc) in the path "c:\private\10003a3f\import\apps" . +*/ +void CT_AppListFileUpdateStep::InstallApplicationL(const TDesC& aAppName) + { + INFO_PRINTF3(_L("Copying file '%S' to folder '%S'"), &aAppName, &KTestAppZPath); + + TInt ret = iUtils.CopyFileL(KTestAppZPath, aAppName); + TEST(ret == KErrNone); + } + + +/* +Gets the modified time for AppsList.bin +*/ +void CT_AppListFileUpdateStep::AppsListModifiedTimeL(TTime& aTime) + { + INFO_PRINTF2(_L("Retrieving modification time of file '%S'"), &KAppListFileName); + TInt ret = iFs.Modified(KAppListFileName, aTime); + TEST(ret == KErrNone); + + TBuf<40> timeString; // Holds the formatted date and time + aTime.FormatL(timeString,KAppTimeFormat); + INFO_PRINTF2(_L("Recorded modified time is '%S'"), &timeString); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0035 + + @SYMPREQ PREQ1228 (CR0831) + + @SYMREQ REQ5896 + + @SYMTestCaseDesc Apparc component repopulates the file list if it has been deleted and a registration is forced. + + @SYMTestType CIT + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions This tests the update of the applist file in \\private\\10003a3f\\import\\\apps\\. + The sequence is as follows: + 1.- Check the file exists. It must exists. + 2.- Delete the file and check it does not exist, and that is not created either. + 3.- Force Registration, which means that the applist file needs to be created again. + 4.- Check that the above mentioned file exists again after waiting for a short period of time. + + @SYMTestExpectedResults AppsList.bin is deleted and created according to the test actions. + */ + + void CT_AppListFileUpdateStep::TestDeleteAppListFileL() + { + // Check the file IS present + TBool present = CheckForFilePresent(); + TEST(present); + + // Delete applist file + DeleteAppListFileL(KAppListFileName); + + // Check the file is NOT present + present = CheckForFilePresent(); + TEST(!present); + + // Do a rescan and check that the file exists again. + INFO_PRINTF1(_L("Do a rescan and check that the file exists again....")); + RPointerArray dummy; + TEST(iSession.ForceRegistration(dummy) == KErrNone); + present = CheckForFilePresent(); + TEST(present); + } + + +/* +Checks whether the "AppList.Bin" exists, if not waits for a maximum time of (KMaxTimeCount * 10) seconds for the file to create. +Else the test fails. +*/ +TBool CT_AppListFileUpdateStep::CheckForFilePresent() + { + INFO_PRINTF2(_L("Wait for a maximum time of '%d' secs for the file to be created"), KMaxTimeCount * 10); + + TBool present = EFalse; + for (TInt index = 0; present == EFalse && index < KMaxTimeCount; index++) + { + TEST(iUtils.IsFilePresent(KAppListFileName, present) == KErrNone); + if (present) + { + INFO_PRINTF2(_L("AppList file is successfully created after '%d' seconds!"), index * 10); + break; + } + // wait 10 secs before trying again in the next loop + User::After(10 * 1000000); + } + + if (!present) + { + INFO_PRINTF2(_L("AppList file was NOT created after '%d' seconds"), KMaxTimeCount * 10); + } + + return present; + } + + +/* +It will delete the applistfile created by apparc component +*/ +void CT_AppListFileUpdateStep::DeleteAppListFileL(const TDesC& aFileName) + { + INFO_PRINTF2(_L("Delete AppList file '%S'..."), &aFileName); + + TInt ret = iUtils.SetReadOnly(aFileName, 0); + TEST(ret == KErrNone); + ret = iUtils.DeleteFileL(aFileName); + TEST(ret == KErrNone); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileUpdateStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AppListFileUpdateStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,60 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_APPLISTFILEUPDATESTEP_H +#define __T_APPLISTFILEUPDATESTEP_H + +#include "ApparcTestServer.h" +#include + + +_LIT(KT_AppListFileUpdate,"T_AppListFileUpdate"); + +class CT_AppListFileUpdateStep : public CTestStep + { +public: + CT_AppListFileUpdateStep(); + ~CT_AppListFileUpdateStep(); + virtual TVerdict doTestStepL(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + +private: + void TestTimeStampL(); + void AppsListModifiedTimeL(TTime &); + void DeleteApplicationL(const TDesC&); + void InstallApplicationL(const TDesC&); + +private: + void TestDeleteAppListFileL(); + void DeleteAppListFileL(const TDesC& aFileName); + TBool CheckForFilePresent(); + +public: + RFs iFs; + RApaLsSession iSession; + RSmlTestUtils iUtils; + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ApsScan.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ApsScan.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,204 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This test case is used to verify that a recognizer can be installed and used +// without reboot. See comment in header file. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "testableapalssession.h" + +#include "T_ApsScan.h" +#include "appfwk_test_utils.h" +#include "tmimerec\constants.hrh" +#include "tmimerec\constants.h" + +///////////////////////////////////////////////// + +const TInt KDelay = 4000000; // Should be enough for CApaEComMonitor to detect new plugin + +///////////////////////////////////////////////// + +CT_ApsScanStep::CT_ApsScanStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_ApsScanStep); + } + +CT_ApsScanStep::~CT_ApsScanStep() + { + } + +/** +Check that the test plugin file has not been left in the filesystem from a previous aborted test. +*/ +TVerdict CT_ApsScanStep::doTestStepPreambleL() + { + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + INFO_PRINTF1(_L("Verifies that dummy.rsc was not present during boot.")); + TBool fileExists = ETrue; + TInt err = fs.IsFilePresent(KRscTargetPath, fileExists); + TESTE(fileExists==EFalse, err); + + CleanupStack::PopAndDestroy(&fs); + return TestStepResult(); + } + +/* +Delete the plugin file which was installed during the test from c:. +*/ +TVerdict CT_ApsScanStep::doTestStepPostambleL() + { + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + TBool fileExists = EFalse; + fs.IsFilePresent(KRscTargetPath, fileExists); + if(fileExists) + { + fs.ChangeFilePermissionL(KRscTargetPath); // clear readonly attribute inherited from z: + const TInt err = fs.DeleteFileL(KRscTargetPath); + if(err == KErrNone) + INFO_PRINTF1(_L("Removed temporary file dummy.rsc")); + else + INFO_PRINTF1(_L("Failed to remove temporary file dummy.rsc")); + } + + CleanupStack::PopAndDestroy(&fs); + return TestStepResult(); + } + +/* +The test entry point +*/ +TVerdict CT_ApsScanStep::doTestStepL() + { + RTestableApaLsSession apparcServer; + CleanupClosePushL(apparcServer); + User::LeaveIfError(apparcServer.Connect()); + + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestDynInstallRecognizerL(apparcServer), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&apparcServer); + + return TestStepResult(); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0049 + +@SYMDEF DEF082982 + +@SYMTestCaseDesc This test verify that apparc can dynamically install an Ecom recognizer plugin. + +@SYMTestPriority High + +@SYMTestStatus Implemented + +@SYMTestActions To avoid using a precompiled recognizer for this test, following workaround is used: + + 1. The test plugin are copied into z: by the build tools when building apparc tef tests. + 2. The plugin will not be installed during startup because CreateRecognizerL will leave + 3. During the test a dummy plugin.rsc will be copied into c:\resource\plugins to trig Ecom + 4. Apparc will be notified and make sure all recognizers listed by Ecom are properly installed + 5. Ecom will not be able install the copied dummy file as it has no matching dll on the same drive, but + 6. The recognizer will detect existence of the dummy file and chose not to leave from CreateRecognizerL + + Due to platsec we can't build plugin.dll to an alternative location and we can't + copy files from epoc32\release\winscw\udeb in runtime. Both plugin.rsc and plugin.dll + must be on the same drive to be accepted by Ecom. + +@SYMTestExpectedResults Test should complete without any leave, panic or error. + */ +void CT_ApsScanStep::TestDynInstallRecognizerL(RApaLsSession& aApparcServer) + { + INFO_PRINTF1(_L("Step 1 of 4: Verifies that recognizer isn't installed.")); + // TESTL will leave and abort this teststep if DoRecognizeL returns ETrue + TESTL(EFalse == DoRecognizeL(aApparcServer, TDataType(KDataTypeNew))); + + INFO_PRINTF1(_L("Step 2 of 4: Installs recognizer plugin file ")); + CopyRecognizerFileL(); + + INFO_PRINTF2(_L("Step 3 of 4: Waits %d seconds for new recognizer to be installed."), KDelay/1000000); + User::After(KDelay); + + INFO_PRINTF1(_L("Step 4 of 4: Verifies that the new recognizer was installed successfully")); + TEST(DoRecognizeL(aApparcServer, TDataType(KDataTypeNew))); + } + +/** +Copies the test file dummy.rsc from z: to c: using RSmlTestUtils rather than aFs due to +platsec protection of involved directories. +*/ +void CT_ApsScanStep::CopyRecognizerFileL() + { + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + // Ensure c:\\resource\\plugins is created, otherwise leave and abort this teststep + TInt err = fs.CreateDirectoryL(KRscTargetDir); + TESTEL((err==KErrNone || err==KErrAlreadyExists), err); + + // Copy resource file from z: to c:, if unsuccessful - leave and abort this teststep + #if defined (__WINSCW__) + err = fs.CopyFileL(KRscSourcePathWinscw, KRscTargetPath); + #else + err = fs.CopyFileL(KRscSourcePathArmv5, KRscTargetPath); + #endif + TESTEL(err==KErrNone, err); + + CleanupStack::PopAndDestroy(&fs); + + } + +/** +Check if a certain datatype is known/recognized by apparc. + +@param aApparcServer an open session to apparc +@param aDataType the datatype you want to test +@return ETrue if @c aDataType is one of those returned from RApaLsSession::GetSupportedDataTypesL +*/ +TBool CT_ApsScanStep::DoRecognizeL(RApaLsSession& aApparcServer, const TDataType& aDataType) + { + TBool recognized = EFalse; + + CDataTypeArray* dataTypes=new(ELeave) CDataTypeArray(64); + CleanupStack::PushL(dataTypes); + aApparcServer.GetSupportedDataTypesL(*dataTypes); + + const TInt count = dataTypes->Count(); + for(TInt i=0; iAt(i); + if(tmp == aDataType) + { + recognized = ETrue; + break; + } + } + + CleanupStack::PopAndDestroy(dataTypes); + return recognized; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ApsScan.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ApsScan.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_APSSCAN_H +#define __T_APSSCAN_H + +#include "appfwk_test_AppUi.h" + +_LIT(KT_ApsScanStep, "T_ApsScan"); + +class CT_ApsScanStep : public CTestStep + { +public: + CT_ApsScanStep(); + ~CT_ApsScanStep(); + + //from CTestStep + TVerdict doTestStepPreambleL(); + TVerdict doTestStepL(); + TVerdict doTestStepPostambleL(); + +private: + void TestDynInstallRecognizerL(RApaLsSession& aApparcServer); + TBool DoRecognizeL(RApaLsSession& aApparcServer, const TDataType& aDataType); + void CopyRecognizerFileL(); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AutoMMCReaderOpen.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AutoMMCReaderOpen.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,114 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a defect fix for the following defect +// INC040672 - MMC Card door open causes wrong mime type instead of error code +// This test is fully automated and performs the following task +// Tests to access a file which is on MMC and the MMC card is removed at the time of access. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "testableapalssession.h" +#include "T_AutoMMCReaderOpen.h" + +const TInt KDirLength = 5; // No need of length more than this , hence length is 5 + +CTestAutoMMCReaderStep::~CTestAutoMMCReaderStep() + { + } + +CTestAutoMMCReaderStep::CTestAutoMMCReaderStep() + { + SetTestStepName(KTestAutoMMCReaderOpenStep); + } + +TVerdict CTestAutoMMCReaderStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CTestAutoMMCReaderStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + +TVerdict CTestAutoMMCReaderStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparch...T_AutoMMCReaderOpen")); + + OpenMMCCardReaderDrive(); + INFO_PRINTF1(_L("\nT_AutoMMCReaderOpen Completed.")); + return TestStepResult(); + } + +void CTestAutoMMCReaderStep::OpenMMCCardReaderDrive() + { + INFO_PRINTF1(_L("Testing fix for INC040672 - MMC Card door open causes wrong mime type instead of error code")); + + _LIT(KValidFileName, "ValidFileName.jpg"); + + RFs fs; + TInt ret = fs.Connect(); + TEST(ret == KErrNone); + RTestableApaLsSession ls; + ret = ls.Connect(); + TEST(ret == KErrNone); + +// The following steps are to reproduce the removal of MMC card +// Loop through drive letters Y -> D to access a file on that drive (any filename) +// Find a drive letter that returns KErrNotReady , +// setup a valid filename with that drive. + + for (TInt drive = EDriveY; drive >= EDriveD ; drive--) + { + TDriveUnit driveUnit(drive); + TDriveName driveName = driveUnit.Name(); + + TBuf bufDirName(driveName); + bufDirName.Append(_L("\\")); + + ret = fs.MkDirAll(bufDirName); + if (ret == KErrNotReady) + { + TFileName bufValidFileName(bufDirName); + bufValidFileName.Append(KValidFileName); + TDataType dataType; + TUid uid = KNullUid; + + HEAP_TEST_LS_SESSION(ls, 0, 0, ret = ls.AppForDocument(bufValidFileName, uid, dataType), NO_CLEANUP); + TEST(ret == KErrNotReady); + TEST(uid == KNullUid); + TEST(dataType == TDataType()); + break; + } + } + TEST(ret == KErrNotReady); + ls.Close(); + fs.Close(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AutoMMCReaderOpen.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_AutoMMCReaderOpen.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_AUTOMMCREADEROPEN_H +#define __T_AUTOMMCREADEROPEN_H + +#include "appfwk_test_AppUi.h" + +_LIT(KTestAutoMMCReaderOpenStep, "T_AutoMMCReaderOpen"); + +class CTestAutoMMCReaderStep : public CTestStep + { +public: + CTestAutoMMCReaderStep(); + ~CTestAutoMMCReaderStep(); + virtual TVerdict doTestStepL(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + void OpenMMCCardReaderDrive(); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_BackupStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_BackupStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,919 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Performs Tests on Backup server.\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include +#include "T_BackupStep.h" + + + +CTestActive::CTestActive() +: CActive(EPriorityIdle*2) + { + CActiveScheduler::Add(this); + } + +CTestActive::~CTestActive() + { + Cancel(); + } + +void CTestActive::DoCancel() + { + TRequestStatus* s=&iStatus; + User::RequestComplete(s, KErrNone); + } + +void CTestActive::StartL() + { + iReport = NULL; + SetActive(); + } + + +/** + Auxiliary Fn for Test Case ID T-BackupStep-testGetsCallbackOnBackupStartL, + T-BackupStep-testGetsCallbackOnBackupEndL, + T-BackupStep-testGetsCallbackOnBackupStartInSecondWrapperL, + T-BackupStep-testGetsCallbackOnBackupWrapperKillL, and + T-BackupStep-testGetsCallbackOnBackupWrapperKillOtherL + + This function is used to set the event request to the AO and + to set that AO active.\n + +*/ +void CTestActive::StartL(TRequestStatus& aRequestStatus) + { + iReport = &aRequestStatus; + SetActive(); + } + +void CTestActive::RunL() + { + CActiveScheduler::Stop(); + } + +// Class to test the n-th recieved event from the backup server is the same as the event +// the object is initialised with +CTestBackupOperationObserver::CTestBackupOperationObserver(const TBackupOperationAttributes& aEvent, CTestExecuteLogger& aLogger) : CTestActive(), iEvent(aEvent), iCount(1) + { + iLogger=aLogger; + } +CTestBackupOperationObserver::CTestBackupOperationObserver(const TBackupOperationAttributes& aEvent, TInt aCount, CTestExecuteLogger& aLogger) : CTestActive(), iEvent(aEvent), iCount(aCount) + { + iLogger=aLogger; + } + + +/** + Auxiliary Fn for Test Case ID T-BackupStep-testGetsCallbackOnBackupStartL, + T-BackupStep-testGetsCallbackOnBackupEndL, + T-BackupStep-testGetsCallbackOnBackupStartInSecondWrapperL, + T-BackupStep-testGetsCallbackOnBackupWrapperKillL, and + T-BackupStep-testGetsCallbackOnBackupWrapperKillOtherL + + This function is overridden from MBackupOperationObserver and is called + when a backup or restore operation either starts or ends. The function is used + to receive signals that tell what backup operation completed.\n + +*/ +void CTestBackupOperationObserver::HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes) + { + const TInt KOneOfOurEvents = 12321; + if(iCount!=KOneOfOurEvents) + { + INFO_PRINTF2(_L("Got event #%d from backup server; ignoring this one\n"), iCount+1); + } + else + { + iCount=0; + if(iReport) + { + User::RequestComplete(iReport, aBackupOperationAttributes.iOperation); + INFO_PRINTF1(_L("Got event from backup server; Completing...\n")); + } + else + { + INFO_PRINTF1(_L("Got event from backup server; iReport not set...testing...\n")); + } + } + } + +void CTestBackupOperationObserver::SetReadyToGo() +{ + const TInt KOneOfOurEvents = 12321; + iCount=KOneOfOurEvents; +} + + +/** + Auxiliary Fn for all test cases + + This function creates an Active Object (AO).Sets the AO to + be active. Starts the active scheduler to complete any pending requests + and flushes all requests from the scheduler list.\n + +*/ +void CT_BackupStep::FlushSchedulerQueueL() +{ + CTestActive* active = new(ELeave) CTestActive(); + CleanupStack::PushL(active); + RTimer timer; + timer.CreateLocal(); + timer.After(active->iStatus,500000); + active->StartL(); + CActiveScheduler::Start(); + CleanupStack::PopAndDestroy(1);//active +} + + +/** + @SYMTestCaseID T-BackupStep-testGetsCallbackOnBackupStartL + + @SYMPREQ + + @SYMTestCaseDesc Test whether backup server signals the test backup observer + on backup start operation. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates an object of test observer to observe for + start backup event and registers the specified observer to be notified + when a backup operation starts by calling RegisterBackupOperationObserverL(). + Set attributes to indicate start of backup operation. Flush the scheduler + of all pending requests. Set start backup event to the AO. Notify the + server of backup operation using NotifyBackupOperationL(). + Start the active scheduler to receive signal for start event from backup + server.\n + API Calls:\n + CBaBackupSessionWrapper::RegisterBackupOperationObserverL(MBackupOperationObserver& aBackupOperationObserver)\n + CBaBackupSessionWrapper::NotifyBackupOperationL(const TBackupOperationAttributes& aBackupOperationAttributes)\n + CBaBackupSessionWrapper::DeRegisterBackupOperationObserver(MBackupOperationObserver& aBackupOperationObserver)\n + + @SYMTestExpectedResults The test should complete with Backup server signaling the observer + when the Backup operation starts.\n + + */ +void CT_BackupStep::testGetsCallbackOnBackupStartL() + { + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + CTestBackupOperationObserver* backupObserver = new(ELeave) CTestBackupOperationObserver(gEventStart, Logger()); + CleanupStack::PushL(backupObserver); + gWrapper->RegisterBackupOperationObserverL(*backupObserver); + FlushSchedulerQueueL(); + + backupObserver->StartL(backupObserver->iStatus); + gWrapper->NotifyBackupOperationL(gEventStart); + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventStart.iOperation); + + gWrapper->DeRegisterBackupOperationObserver(*backupObserver); + CleanupStack::PopAndDestroy();//backupObserver; + } + + +/** + @SYMTestCaseID T-BackupStep-testGetsCallbackOnBackupEndL + + @SYMPREQ + + @SYMTestCaseDesc Test whether backup server signals the test backupobserver on + backup end operation. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates an object of test observer to observe for end + of backup event and registers the specified observer to be notified when a + backup operation ends by calling RegisterBackupOperationObserverL().Set + attributes to indicate start and end of backup operation. Flush the scheduler + from all pending requests. Set start backup event to the AO. Notify the + server of a start backup operation using NotifyBackupOperationL(). + Start the active scheduler to receive signal for start event from backup + server. Now set end of backup event to the AO. Notify server of an end + backup operation using NotifyBackupOperationL(). Start the active + scheduler to receive signal for end of backup event from backup server.\n + API Calls:\n + CBaBackupSessionWrapper::RegisterBackupOperationObserverL(MBackupOperationObserver& aBackupOperationObserver)\n + CBaBackupSessionWrapper::NotifyBackupOperationL(const TBackupOperationAttributes& aBackupOperationAttributes)\n + CBaBackupSessionWrapper::DeRegisterBackupOperationObserver(MBackupOperationObserver& aBackupOperationObserver)\n + + @SYMTestExpectedResults The test should complete with Backup server signaling the observer + when the Backup operation ends. + + */ +void CT_BackupStep::testGetsCallbackOnBackupEndL() + { + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + CTestBackupOperationObserver* backupObserver = new(ELeave) CTestBackupOperationObserver(gEventEnd, Logger()); + CleanupStack::PushL(backupObserver); + gWrapper->RegisterBackupOperationObserverL(*backupObserver); + FlushSchedulerQueueL(); + + backupObserver->StartL(backupObserver->iStatus); + gWrapper->NotifyBackupOperationL(gEventStart); + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventStart.iOperation); + + backupObserver->StartL(backupObserver->iStatus); + gWrapper->NotifyBackupOperationL(gEventEnd); + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventEnd.iOperation); + + gWrapper->DeRegisterBackupOperationObserver(*backupObserver); + CleanupStack::PopAndDestroy();//backupObserver; + } + + +/** + @SYMTestCaseID T-BackupStep-testGetsCallbackOnBackupStartInSecondWrapperL + + @SYMPREQ + + @SYMTestCaseDesc Test whether signal for start backup operation can be + received by a second observer that is not associated + with the wrapper object that issued the request for start + of backup. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates two test observers and two wrappers to the + backup server. Set attributes to indicate start of backup operation. + Register & associate each observer with each session wrappers that needs + to be notified of backup start operation, issued by the respective wrappers + by calling RegisterBackupOperationObserverL(). Using the first wrapper, + notify the server to start backup. Verify that second observer receives + the notification for start of server.\n + API Calls:\n + CBaBackupSessionWrapper::NewL()\n + CBaBackupSessionWrapper::RegisterBackupOperationObserverL(MBackupOperationObserver& aBackupOperationObserver)\n + CBaBackupSessionWrapper::NotifyBackupOperationL(const TBackupOperationAttributes& aBackupOperationAttributes)\n + CBaBackupSessionWrapper::DeRegisterBackupOperationObserver(MBackupOperationObserver& aBackupOperationObserver)\n + + @SYMTestExpectedResults The test should confirm that second observer receives + the signal for backup start operation issued by the first wrapper object. + + */ +void CT_BackupStep::testGetsCallbackOnBackupStartInSecondWrapperL() + { + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + CTestBackupOperationObserver* backupObserver = new(ELeave) CTestBackupOperationObserver(gEventStart, Logger()); + CleanupStack::PushL(backupObserver); + gWrapper->RegisterBackupOperationObserverL(*backupObserver); + FlushSchedulerQueueL(); + + CBaBackupSessionWrapper* secondWrapper=CBaBackupSessionWrapper::NewL(); + CleanupStack::PushL(secondWrapper); + + CTestBackupOperationObserver* backupObserver2 = new(ELeave) CTestBackupOperationObserver(gEventStart, Logger()); + CleanupStack::PushL(backupObserver2); + secondWrapper->RegisterBackupOperationObserverL(*backupObserver2); + FlushSchedulerQueueL(); + + backupObserver2->StartL(backupObserver2->iStatus); + gWrapper->NotifyBackupOperationL(gEventStart); + backupObserver2->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver2->iStatus == gEventStart.iOperation); + + gWrapper->DeRegisterBackupOperationObserver(*backupObserver); + secondWrapper->DeRegisterBackupOperationObserver(*backupObserver2); + CleanupStack::PopAndDestroy(3);//backupObserver, backupObserver2, secondWrapper + } + + +/** + @SYMTestCaseID T-BackupStep-testGetsCallbackOnBackupWrapperKillL + + @SYMPREQ + + @SYMTestCaseDesc Test if MBackupOperationObserver::EAbort event is received + when wrapper to the backup server is destroyed immediately + after backup start operation is requested. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a test backup observer. Register the observer to receive + event from server. Create a second wrapper to the backup server. Use the + second wrapper to notify the server to start backup. After receiving signal + for start of backup, destroy the second wrapper. Observe event received + from the server.\n + API Calls:\n + CBaBackupSessionWrapper::NewL()\n + CBaBackupSessionWrapper::RegisterBackupOperationObserverL(MBackupOperationObserver& aBackupOperationObserver)\n + CBaBackupSessionWrapper::NotifyBackupOperationL(const TBackupOperationAttributes& aBackupOperationAttributes)\n + CBaBackupSessionWrapper::DeRegisterBackupOperationObserver(MBackupOperationObserver& aBackupOperationObserver)\n + + @SYMTestExpectedResults Test confirms that event MBackupOperationObserver::EAbort + is received. + + */ +void CT_BackupStep::testGetsCallbackOnBackupWrapperKillL() + { + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + const TBackupOperationAttributes gEventAbort(MBackupObserver::ETakeLock, MBackupOperationObserver::EAbort); + CTestBackupOperationObserver* backupObserver = new(ELeave) CTestBackupOperationObserver(gEventEnd, Logger()); + CleanupStack::PushL(backupObserver); + gWrapper->RegisterBackupOperationObserverL(*backupObserver); + FlushSchedulerQueueL(); + + CBaBackupSessionWrapper* secondWrapper=CBaBackupSessionWrapper::NewL(); + CleanupStack::PushL(secondWrapper); + + backupObserver->StartL(backupObserver->iStatus); + secondWrapper->NotifyBackupOperationL(gEventStart); + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventStart.iOperation); + + backupObserver->StartL(backupObserver->iStatus); + CleanupStack::PopAndDestroy();//secondWrapper + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventAbort.iOperation); + + gWrapper->DeRegisterBackupOperationObserver(*backupObserver); + CleanupStack::PopAndDestroy(1);//backupObserver + } + + +/** + @SYMTestCaseID T-BackupStep-testGetsCallbackOnBackupWrapperKillOtherL + + @SYMPREQ + + @SYMTestCaseDesc Test that the backup is not terminated after a backup start event, + which is followed by destruction of any wrapper other than the wrapper + which requested the backup start event. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a test observer. Register the observer with the server. + Create second and third wrappers to the backup server besides the global + wrapper. Use the second observer to start backup. Observe that the event for + start of backup is received. Destroy the third wrapper created. Observe + event received from the server. Notify the server to observe for event + MBackupOperationObserver::ENone.Observe the event received. Notify the server + to stop backup. Observe the event received. Destroy the second observer. + Note that this destruction causes an abort event.\n + API Calls:\n + CBaBackupSessionWrapper::NewL()\n + CBaBackupSessionWrapper::RegisterBackupOperationObserverL(MBackupOperationObserver& aBackupOperationObserver)\n + CBaBackupSessionWrapper::NotifyBackupOperationL(const TBackupOperationAttributes& aBackupOperationAttributes)\n + CBaBackupSessionWrapper::DeRegisterBackupOperationObserver(MBackupOperationObserver& aBackupOperationObserver)\n + + @SYMTestExpectedResults Test confirms that backup will not be terminated by + destruction of wrapper object that did not initiate the back up process, + after the backup operation has started. + + */ +void CT_BackupStep::testGetsCallbackOnBackupWrapperKillOtherL() + { + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + const TBackupOperationAttributes gEventNone(MBackupObserver::ETakeLock, MBackupOperationObserver::ENone); + + CTestBackupOperationObserver* backupObserver = new(ELeave) CTestBackupOperationObserver(gEventEnd, Logger()); + CleanupStack::PushL(backupObserver); + gWrapper->RegisterBackupOperationObserverL(*backupObserver); + FlushSchedulerQueueL(); + + CBaBackupSessionWrapper* secondWrapper=CBaBackupSessionWrapper::NewL(); + CleanupStack::PushL(secondWrapper); // This one starts the backup + + CBaBackupSessionWrapper* thirdWrapper=CBaBackupSessionWrapper::NewL(); + CleanupStack::PushL(thirdWrapper); // This one gets destroyed + FlushSchedulerQueueL(); + + backupObserver->StartL(backupObserver->iStatus); + secondWrapper->NotifyBackupOperationL(gEventStart);; + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventStart.iOperation); + + backupObserver->StartL(backupObserver->iStatus); + CleanupStack::PopAndDestroy(thirdWrapper);//thirdWrapper + TEST(backupObserver->iStatus == gEventStart.iOperation); // + secondWrapper->NotifyBackupOperationL(gEventNone); + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventNone.iOperation); + + backupObserver->StartL(backupObserver->iStatus); + secondWrapper->NotifyBackupOperationL(gEventEnd); + backupObserver->SetReadyToGo(); + CActiveScheduler::Start(); + TEST(backupObserver->iStatus == gEventEnd.iOperation); + + backupObserver->StartL(backupObserver->iStatus); + CleanupStack::PopAndDestroy(secondWrapper);//secondWrapper + TEST(backupObserver->iStatus == gEventEnd.iOperation); + CleanupStack::PopAndDestroy();//backupObserver + gWrapper->DeRegisterBackupOperationObserver(*backupObserver); + } + + +CThreadLaunchCounter::CThreadLaunchCounter() : CActive(0) + { + CActiveScheduler::Add(this); + gCount = 0; + } + +CThreadLaunchCounter::~CThreadLaunchCounter() + { + if(IsActive()) + Cancel(); + } + +void CThreadLaunchCounter::Start() + { + iStatus=KRequestPending; + gCount++; + SetActive(); + } + +void CThreadLaunchCounter::RunL() + { + if(--gCount==0) + CActiveScheduler::Stop(); + delete this; + } + + +/** + @SYMTestCaseID T-BackupStep-testMultipleClientsL + + @SYMPREQ + + @SYMTestCaseDesc Test multiple clients accessing the Backup server. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates multiple threads to make multiple clients + access the backup server simultaneously. Each of the threads execute the + thread function BackupMultipleTestThreadEntry() to create a wrapper object + to the backup server so that a backup operation can be carried out. + The test thus emulates a multiple client scenario.\n + API Calls:\n + RThread::Create(const TDesC& aName, TThreadFunction aFunction, TInt aStackSize, RAllocator* aHeap, TAny* aPtr, TOwnerType aType=EOwnerProcess)\n + RThread::Resume() const\n + RThread::Logon(TRequestStatus& aStatus) const\n + RThread::Close()\n + + @SYMTestExpectedResults The test completes creating multiple threads and tests + multi-client interaction with the backup server. + + */ +void CT_BackupStep::testMultipleClientsL() + { + const TInt KNumMultipleThreads=1; + _LIT(KMultiThreadBaseName,"Multithread"); + const TInt KBackupServerStackSize =0x3000; // 16k + CBackupTestThreadParams Params; + Params.Step = this; + for(TInt i=0;i name(KMultiThreadBaseName); + name.AppendNum(i); + TInt64 theSeed = 12312312; + Params.seed=Math::Rand(theSeed); + User::LeaveIfError(thread.Create(name, BackupMultipleTestThreadEntry, KBackupServerStackSize, NULL, &Params)); + thread.Resume(); + thread.Logon(threadCounter->iStatus); + threadCounter->Start(); + thread.Close(); + } + User::After(2000000); + CActiveScheduler::Start();//runs until all the CThreadLaunchCounter are completed + User::After(2000000); + CleanupStack::Pop(KNumMultipleThreads); + } + + + +TRequestStatus CT_BackupStep::testExtraRestartLockedOutL() +// +// Tests that we are only able to restart the apps once - no extra threads around! +// + { +//vm + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + gWrapper->NotifyBackupOperationL(gEventStart); +//vm + _LIT(KAppRestarterThreadName,"AppRestarterThread"); + TRequestStatus status; + gWrapper->CloseAll(MBackupObserver::EReleaseLockNoAccess, status); + User::WaitForRequest(status); +///vm + if(status != KErrNone) + { + return status; + } + + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + gWrapper->NotifyBackupOperationL(gEventEnd); +//// + + gWrapper->RestartAll(); + gWrapper->RestartAll(); + gWrapper->RestartAll(); + gWrapper->RestartAll(); + + TInt err; + err=KErrNone; + TFullName name; + TFindThread find(KAppRestarterThreadName); + err=find.Next(name); + if(err==KErrNotFound) + { + INFO_PRINTF1(_L("Error in test code timing - need to try again\n")); + + return status; + } + gWrapper->RestartAll(); + gWrapper->RestartAll(); + + RThread thread; + err=thread.Open(name); + TInt ignoreId = thread.Id(); + if(err==KErrNotFound) + { + INFO_PRINTF1(_L("Error in test code timing - need to try again\n")); + return status; + } + thread.Logon(status); + User::WaitForRequest(status); + thread.Close(); + + TFindThread find1(KAppRestarterThreadName); + while( (err=find1.Next(name)) != KErrNotFound) + { + RThread thread; + if(thread.Open(name)==KErrNone) + { + TInt id=thread.Id(); + TEST(id == ignoreId); + thread.Close(); + } + } + return status; + } + + +/** + @SYMTestCaseID T-BackupStep-testRestartAppsL + + @SYMPREQ + + @SYMTestCaseDesc Test whether CBaBackupSessionWrapper::RestartAll() unlocks + file locks (MBackupObserver::ETakeLock flag) for the + registered files locked by CloseAll(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call TFindThread::Next() continuously to find all threads and + append id of each of these threads to a list. + Call CBaBackupSessionWrapper::CloseAll() to close all non-system + applications and call all observers to release or stop writing to the + registered files. Call CBaBackupSessionWrapper::RestartAll(). + Call TFindThread::Next() continuously to find all threads. Compare the id + of each thread to the id stored in the list to find a match.\n + API Calls:\n + CBaBackupSessionWrapper::RestartAll()\n + CBaBackupSessionWrapper::CloseAll(MBackupObserver::TFileLockFlags aFlags, TRequestStatus& aStatus)\n + + @SYMTestExpectedResults Test that CBaBackupSessionWrapper::RestartAll() take + back file locks (MBackupObserver::ETakeLock flag) for the registered files + locked by CloseAll(). + + */ +void CT_BackupStep::testRestartAppsL() + { +//vm + const TBackupOperationAttributes gEventStart(MBackupObserver::EReleaseLockNoAccess, MBackupOperationObserver::EStart); + gWrapper->NotifyBackupOperationL(gEventStart); +//vm + + TFindThread find; + INFO_PRINTF1(_L("\nRestartApps.......")); + TFullName name; + RArray idArray; + CleanupClosePushL(idArray); + while(find.Next(name)!=KErrNotFound) + { + INFO_PRINTF1(_L("\nAppending thread id.......")); + RThread thread; + thread.Open(name); + TInt id=thread.Id(); + idArray.Append(id); + thread.Close(); + INFO_PRINTF1(_L("\nCompleted.")); + } + + INFO_PRINTF1(_L("\nGWrapper: Close all.......")); + TRequestStatus status; + gWrapper->CloseAll(MBackupObserver::EReleaseLockNoAccess, status); + + User::WaitForRequest(status); + + INFO_PRINTF1(_L("\nWait.")); + User::After(1000000); + +///vm + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + gWrapper->NotifyBackupOperationL(gEventEnd); + +//// + + INFO_PRINTF1(_L("\nGWrapper: Restart all.......")); + gWrapper->RestartAll(); + INFO_PRINTF1(_L("\nGWrapper: Restart all.....Completed")); + INFO_PRINTF1(_L("\nGWrapper: Close all.......Completed.")); + + TFindThread find2; + + while(find2.Next(name)!=KErrNotFound) + { +// Create a thread in the calling process + INFO_PRINTF1(_L("\nGet Thread ID.......")); + RThread thread; + thread.Open(name); + TInt id=thread.Id(); + thread.Close(); + INFO_PRINTF1(_L("\nGet Thread ID......Completed.")); + + INFO_PRINTF1(_L("\nFind process ID in idArray")); + if(idArray.Find(id)==KErrNone) + { + TInt temp =0; + TEST(temp==0); // no instance of this thread is found + } + INFO_PRINTF1(_L("\nFind process ID in idArray.....Completed.")); + } + CleanupStack::PopAndDestroy(&idArray); //idArray + + + INFO_PRINTF1(_L("\nRestartApps completed.")); + } + + + +/** + Auxiliary Fn for all Test Cases. + + The method initiates all the tests to be performed. + +*/ +void CT_BackupStep::doTestsL() + { + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + TRAPD(err,gWrapper=CBaBackupSessionWrapper::NewL()); + if(err!=KErrNone) + { + INFO_PRINTF1(_L("Couldn't open session wrapper\n")); + User::Leave(err); + } + INFO_PRINTF1(_L("Backup session test 1\n")); + TRAP(err,gWrapper->NotifyBackupOperationL(gEventEnd)); + if(err!=KErrNone) + { + INFO_PRINTF1(_L("Couldn't notify backup operation\n")); + User::Leave(err); + } + + FlushSchedulerQueueL(); + testGetsCallbackOnBackupStartL(); + + gWrapper->NotifyBackupOperationL(gEventEnd); + FlushSchedulerQueueL(); + INFO_PRINTF1(_L("Backup session test 2\n")); + testGetsCallbackOnBackupEndL(); + + gWrapper->NotifyBackupOperationL(gEventEnd); + FlushSchedulerQueueL(); + INFO_PRINTF1(_L("Backup session test 3\n")); + testGetsCallbackOnBackupStartInSecondWrapperL(); + + gWrapper->NotifyBackupOperationL(gEventEnd); + FlushSchedulerQueueL(); + INFO_PRINTF1(_L("Backup session test 4\n")); + testGetsCallbackOnBackupWrapperKillL(); + + gWrapper->NotifyBackupOperationL(gEventEnd); + FlushSchedulerQueueL(); + INFO_PRINTF1(_L("Backup session test 5\n")); + testGetsCallbackOnBackupWrapperKillOtherL(); + + gWrapper->NotifyBackupOperationL(gEventEnd); + FlushSchedulerQueueL(); + INFO_PRINTF1(_L("Backup session test 6\n")); + /*TRequestStatus status = testExtraRestartLockedOutL(); + + if(status=KErrNone) + { + gWrapper->NotifyBackupOperationL(gEventEnd); + FlushSchedulerQueueL(); + INFO_PRINTF1(_L("Backup session test 7\n")); + testRestartAppsL(); + + gWrapper->NotifyBackupOperationL(gEventEnd); + INFO_PRINTF1(_L("Backup session test 8\n")); + testMultipleClientsL(); + }*/ + delete gWrapper; + + } + + +/** + Auxiliary Fn for Test Case ID T-BackupStep-testMultipleClientsL + + Entry point for the thread used to test multiple simultaneous wrapper + sessions with the backup server. This method calls + DoBackupMultipleTestThreadEntryL() method to perform this task.\n + +*/ +GLDEF_C TInt CT_BackupStep::BackupMultipleTestThreadEntry(TAny* aPtr) + { + CActiveScheduler* scheduler=new CActiveScheduler; + if (!scheduler) + return KErrNoMemory; + CTrapCleanup* trapCleanup=CTrapCleanup::New(); + if (!trapCleanup) + { + delete scheduler; + return KErrNoMemory; + } + CActiveScheduler::Install(scheduler); + + CBackupTestThreadParams& threadParams = *(CBackupTestThreadParams*)aPtr; + TRAPD(err,threadParams.Step->DoBackupMultipleTestThreadEntryL(/*aPtr*/)); + + delete CActiveScheduler::Current(); + delete trapCleanup; + return err; + } + + +/** + Auxiliary Fn for Test Case ID T-BackupStep-testMultipleClientsL + + The method is called by the thread function BackupMultipleTestThreadEntry() + to create a wrapper session to perform some backup operation.\n + +*/ +TInt CT_BackupStep::DoBackupMultipleTestThreadEntryL(/*TAny* aSeed*/) + { + const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd); + CBaBackupSessionWrapper* wrapper=CBaBackupSessionWrapper::NewL(); + CleanupStack::PushL(wrapper); + + CTestBackupOperationObserver* backupObserver = new(ELeave) CTestBackupOperationObserver(gEventEnd, Logger()); + CleanupStack::PushL(backupObserver); + wrapper->RegisterBackupOperationObserverL(*backupObserver); + FlushSchedulerQueueL(); + wrapper->NotifyBackupOperationL(gEventEnd); + + wrapper->DeRegisterBackupOperationObserver(*backupObserver); + CleanupStack::PopAndDestroy(2);//backupObserver, wrapper + return KErrNone; + } + + +/** + Auxiliary Fn for entire Test Step + + This method creates and installs an active scheduler for tests. + +*/ +void CT_BackupStep::SetupSchedulerL() + { + testScheduler = new (ELeave) CActiveScheduler; + CleanupStack::PushL( testScheduler ); + CActiveScheduler::Install( testScheduler ); + } + +/** + Auxiliary Fn for entire Test Step + + This method removes the active scheduler from the cleanup stack and + destroys it on completion of the tests. + +*/ +void CT_BackupStep::CloseScheduler() + { + CleanupStack::PopAndDestroy(); // Scheduler + testScheduler = NULL; + } + +//********************************** +// Global +//********************************** + + +void CT_BackupStep::doMainL() + { + SetupSchedulerL(); + doTestsL(); + CloseScheduler(); + } + + +CT_BackupStep::~CT_BackupStep() +/** + Destructor + */ + { + } + +CT_BackupStep::CT_BackupStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_BackupStep); + } + +TVerdict CT_BackupStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + +TVerdict CT_BackupStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +TVerdict CT_BackupStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ +{ + INFO_PRINTF1(_L("Testing Apparc...T_Backup")); + // + __UHEAP_MARK; + TRAPD(ret,doMainL()); + TEST(ret==KErrNone); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test completed!")); + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_BackupStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_BackupStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,123 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_BACKUP_STEP_H__) +#define __T_BACKUP_STEP_H__ +#include "ApparcTestServer.h" +#include + +class CT_BackupStep; +struct CBackupTestThreadParams + { + TInt64 seed; + CT_BackupStep* Step; + }; + + + +//! A CT_BackupStep test class. +/*! + Performs Tests on Backup server +*/ +class CT_BackupStep :public CTestStep + { +public: + CT_BackupStep(); + ~CT_BackupStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + TInt DoBackupMultipleTestThreadEntryL(/*TAny* aPtr*/); + +//private: + void doMainL(); + void SetupSchedulerL(); + void CloseScheduler(); + void doTestsL(); + void testMultipleClientsL(); + void testRestartAppsL(); + TRequestStatus testExtraRestartLockedOutL(); + void testGetsCallbackOnBackupWrapperKillOtherL(); + void testGetsCallbackOnBackupWrapperKillL(); + void testGetsCallbackOnBackupStartInSecondWrapperL(); + void testGetsCallbackOnBackupEndL(); + void testGetsCallbackOnBackupStartL(); + void FlushSchedulerQueueL(); + static TInt BackupMultipleTestThreadEntry(TAny* aPtr); + +private: + CBaBackupSessionWrapper* gWrapper; + CActiveScheduler *testScheduler; + }; + +_LIT(KT_BackupStep,"T_Backup"); + +//********************************** +// CTestActive +//********************************** + +class CTestActive : public CActive + { +public: + CTestActive(); + ~CTestActive(); + void StartL(); + void StartL(TRequestStatus& aRequestStatus); +protected: + void DoCancel(); + void RunL(); + + TRequestStatus* iReport; + }; + +// Class to test the n-th recieved event from the backup server is the same as the event +// the object is initialised with + + +class CTestBackupOperationObserver : public CTestActive, public MBackupOperationObserver + { +public: + virtual void HandleBackupOperationEventL(const TBackupOperationAttributes& aBackupOperationAttributes); + CTestBackupOperationObserver(const TBackupOperationAttributes& aEvent, CTestExecuteLogger& aLogger); + CTestBackupOperationObserver(const TBackupOperationAttributes& aEvent, TInt aCount, CTestExecuteLogger& aLogger); + void SetReadyToGo();/*{iCount=KOneOfOurEvents;};*/ + inline CTestExecuteLogger& Logger() {return iLogger;}; +private: + TBackupOperationAttributes iEvent; + TInt iCount; + CTestExecuteLogger iLogger; + }; + +class CThreadLaunchCounter : public CActive + { +public: + CThreadLaunchCounter(); + ~CThreadLaunchCounter(); + void Start(); +protected: + void DoCancel(){}; + void RunL(); +private: + TInt gCount; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability1.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,128 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether apparctestserver has the capability +// to access writable apis +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_Capability1.h" +#include "tstapp.h" +#include "testableapalssession.h" +#include + +/** + @SYMTestCaseID APPFWK-APPARC-0030 + + @SYMPREQ Policing server apis + + @SYMTestCaseDesc Testing whether apparctestserver has the capability to access writable apis + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + To connect to RApaLsSession and to check whether uiktestserver process + has the permission to access the mentioned apis + API Calls:\n + RApaLsSession::Connect(); + RApaLsSession::SetAcceptedConfidence(TInt aConfidence); + RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + RApaLsSession::InsertDataMappingIfHigher(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TBool& aInserted); + RApaLsSession::DeleteDataMapping(const TDataType& aDataType); + + @SYMTestExpectedResults Test should complete without any panic. + + */ +void CT_Capability1::ExecuteL(RApaLsSession& aLs) + { + TInt ret; + TInt temp=1234; + TBool added=EFalse; + _LIT8(KLitPlainText,"text/plain"); + const TDataTypePriority KPriLow = 1; + const TDataTypePriority KPriHigh = 2; + + + TSecurityInfo info; + info.Set(RProcess()); + + APPFWK_NEGATIVE_PLATSEC_START; + ret=aLs.SetAcceptedConfidence(temp); + APPFWK_NEGATIVE_PLATSEC_FINISH; + INFO_PRINTF1(_L("Capability check of SetAcceptedConfidence")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrPermissionDenied, ret); + TEST(ret==KErrPermissionDenied); + + APPFWK_NEGATIVE_PLATSEC_START; + ret=aLs.InsertDataMapping(TDataType(KLitPlainText), KPriLow, KUidTestApp); + APPFWK_NEGATIVE_PLATSEC_FINISH; + INFO_PRINTF1(_L("Capability check of InsertDataMapping")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrPermissionDenied, ret); + TEST(ret==KErrPermissionDenied); + + APPFWK_NEGATIVE_PLATSEC_START; + ret=aLs.InsertDataMappingIfHigher(TDataType(KLitPlainText), KPriHigh, KUidTestApp, added); + APPFWK_NEGATIVE_PLATSEC_FINISH; + INFO_PRINTF1(_L("Capability check of InsertDataMappingIfHigher")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrPermissionDenied, ret); + TEST(ret==KErrPermissionDenied); + + APPFWK_NEGATIVE_PLATSEC_START; + ret=aLs.DeleteDataMapping(TDataType(KLitPlainText)); + APPFWK_NEGATIVE_PLATSEC_FINISH; + INFO_PRINTF1(_L("Capability check of DeleteDataMapping")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrPermissionDenied, ret); + TEST(ret==KErrPermissionDenied); + + + } + +CT_Capability1::CT_Capability1() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_Capability1); + } + +CT_Capability1::~CT_Capability1() + { + } + +TVerdict CT_Capability1::doTestStepL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0030: Capability1 - Started")); + + RTestableApaLsSession apaLsSession; + TEST(apaLsSession.Connect()==KErrNone); + CleanupClosePushL(apaLsSession); + + HEAP_TEST_LS_SESSION(apaLsSession, 0, 0, ExecuteL(apaLsSession), NO_CLEANUP); + + + CleanupStack::PopAndDestroy(&apaLsSession); + + INFO_PRINTF1(_L("APPFWK-APPARC-0030: Capability1 - Finished")); + + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability1.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability1.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,51 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test writable APIs in RApaLsSession and to test whether +// apparctestserver process has the capability to access those APIs. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__T_CAPABILITY1_H__) +#define __T_CAPABILITY1_H__ + +#include "ApparcTestServer.h" +#include "appfwk_test_AppUi.h" + +class RApaLsSession; + +//! CT_Capability1 +/** + This class is used to test writable apis in RApaLsSession +*/ +class CT_Capability1 : public CTestStep + { +public: + CT_Capability1(); + virtual TVerdict doTestStepL(); + void ExecuteL(RApaLsSession& aLs); +private: + ~CT_Capability1(); +private: + }; + +_LIT(KT_Capability1,"T_Capability1"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability2.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,119 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether apparctestserver has the capability +// to access writable apis +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_Capability2.h" +#include "tstapp.h" +#include "testableapalssession.h" +#include + +/** + @SYMTestCaseID APPFWK-APPARC-0030 + + @SYMPREQ Policing server apis + + @SYMTestCaseDesc Testing whether apparctestserver has the capability to access writable apis + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + To connect to RApaLsSession and to check whether uiktestserver process + has the permission to access the mentioned apis + API Calls:\n + RApaLsSession::Connect(); + RApaLsSession::SetAcceptedConfidence(TInt aConfidence); + RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + RApaLsSession::InsertDataMappingIfHigher(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TBool& aInserted); + RApaLsSession::DeleteDataMapping(const TDataType& aDataType); + + @SYMTestExpectedResults Test should complete without any panic. + + */ +void CT_Capability2::ExecuteL(RApaLsSession& aLs) + { + TInt ret; + TInt temp=1234; + TBool added=EFalse; + _LIT8(KLitPlainText,"text/plain"); + const TDataTypePriority KPriLow = 1; + const TDataTypePriority KPriHigh = 2; + + TSecurityInfo info; + info.Set(RProcess()); + + ret=aLs.SetAcceptedConfidence(temp); + INFO_PRINTF1(_L("Capability check of SetAcceptedConfidence")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + + ret=aLs.InsertDataMapping(TDataType(KLitPlainText), KPriLow, KUidTestApp); + INFO_PRINTF1(_L("Capability check of InsertDataMapping")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + + ret=aLs.InsertDataMappingIfHigher(TDataType(KLitPlainText), KPriHigh, KUidTestApp, added); + INFO_PRINTF1(_L("Capability check of InsertDataMappingIfHigher")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + + ret=aLs.DeleteDataMapping(TDataType(KLitPlainText)); + INFO_PRINTF1(_L("Capability check of DeleteDataMapping")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + + } + +CT_Capability2::CT_Capability2() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_Capability2); + } + +CT_Capability2::~CT_Capability2() + { + } + +TVerdict CT_Capability2::doTestStepL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0031: Capability2 - Started")); + + RTestableApaLsSession apaLsSession; + TEST(apaLsSession.Connect()==KErrNone); + CleanupClosePushL(apaLsSession); + + //DONT_CHECK since array in type store is uncompressed + HEAP_TEST_LS_SESSION(apaLsSession, 0, DONT_CHECK, ExecuteL(apaLsSession), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&apaLsSession); + + + INFO_PRINTF1(_L("APPFWK-APPARC-0031: Capability2 - Finished")); + + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Capability2.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,51 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test writable APIs in RApaLsSession and to test whether +// apparctestserver process has the capability to access those APIs. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__T_CAPABILITY2_H__) +#define __T_CAPABILITY2_H__ + +#include "ApparcTestServer.h" +#include "appfwk_test_AppUi.h" + +class RApaLsSession; + +//! CT_Capability2 +/** + This class is used to test writable apis in RApaLsSession +*/ +class CT_Capability2 : public CTestStep + { +public: + CT_Capability2(); + virtual TVerdict doTestStepL(); + void ExecuteL(RApaLsSession& aLs); +private: + ~CT_Capability2(); +private: + }; + +_LIT(KT_Capability2,"T_Capability2"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CaptionStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CaptionStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1016 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test for GT0247 Bravo. +// CR0583: Apparc should allow short caption to be modified dynamically +// Test for UIKON GT0143 Typhoon Work Series 60 Changes. +// REQ758.1: Add support for short captions +// This test requires that tstapp.app has been built +// tstapp.mmp has RESOURCE tstapp_caption.rss what caption is built into the .rsc file +// tstapp_loc.rss decides what version of the caption file to include: +// tstapp01.rls +// tstapp02.rls +// tstapp03.rls +// tstapp04.rls +// tstapp05.rls +// tstappsc.rls +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "tstapp.h" // KUidTestApp defined here +#include "T_CaptionStep.h" +#include "appfwk_test_utils.h" +#include "appfwk_test.h" +#include "ticoncaptionoverride.h" //KUidTestIconCapOverride defined here +#include "TIconLoaderAndIconArrayForLeaks.h" + + +///////////////////////////////////////////////////////////////////////////////// +// +// global consts and declarations +// +///////////////////////////////////////////////////////////////////////////////// + + +_LIT(KTestTApaAppInfoCaptionEnglish,"TstCap UK"); +_LIT(KTestTApaAppInfoShortCaptionEnglish,"TC UK"); + +_LIT(KTestTApaAppInfoCaptionFrench,"TstCap FR"); +_LIT(KTestTApaAppInfoShortCaptionFrench,"TC FR"); + +_LIT(KTestTApaAppInfoCaptionGerman,"TstCap GE"); +_LIT(KTestTApaAppInfoShortCaptionGerman,"TC GE"); + +// If _loc.rss does not define Short Caption, it takes long caption +_LIT(KTestTApaAppInfoCaptionSpanish,"TstCap SP"); +_LIT(KTestTApaAppInfoShortCaptionSpanish,"TstCap SP"); + +// If _loc.rss does not define Caption, it takes app name +_LIT(KTestTApaAppInfoCaptionItalian,"tstapp"); +_LIT(KTestTApaAppInfoShortCaptionItalian,"TC IT"); + +_LIT(KTestTApaAppInfoCaptionDefault,"TstCap UK"); +_LIT(KTestTApaAppInfoShortCaptionDefault,"TC UK"); + +// Cenrep configuration details for English language +_LIT(KCenRepCaption, "CRTstCap UK"); +_LIT(KCenRepShortCaption, "CRTC UK"); +_LIT(KCenRepIconFilename, "Z:\\resource\\apps\\ticoncapoverride.mbm"); + +const TUid KUidIconCaptionRepository = {0x1028583d}; // Central Repository UID. +const TInt KTextSize = 100; + +///////////////////////////////////////////////////////////////////////////////// +// +// CT_CaptionStep +// +///////////////////////////////////////////////////////////////////////////////// + + +void CT_CaptionStep::ChangeLocaleL(TLanguage aLanguage) + { + // Change locale according to information in the HAL + _LIT(KLitLocaleDllNameBase, "ELOCL"); + _LIT(KLitLocaleDllNameExtension, ".LOC"); + RLibrary localeDll; + TBuf<16> localeDllName(KLitLocaleDllNameBase); + CleanupClosePushL(localeDll); + const TUidType uidType(TUid::Uid(0x10000079),TUid::Uid(0x100039e6)); + _LIT(TwoDigExt,".%02d"); + localeDllName.AppendFormat(TwoDigExt, aLanguage); + TInt error=localeDll.Load(localeDllName, uidType); + if (error==KErrNotFound) + { + localeDllName=KLitLocaleDllNameBase; + localeDllName.Append(KLitLocaleDllNameExtension); + error=localeDll.Load(localeDllName, uidType); + } + User::LeaveIfError(error); + User::LeaveIfError(UserSvr::ChangeLocale(localeDllName)); + CleanupStack::PopAndDestroy(&localeDll); + } + + +void CT_CaptionStep::DoLanguageTestL() + { + TLanguage language = User::Language(); // keep a copy to restore it later on. + + TInt ch = 0; + for (ch=0; ch < 6; ch++) + { + TLanguage languageToTest = ELangTest; // init to supress compiler remark + switch (ch) + { + case 0: + languageToTest=ELangEnglish; + INFO_PRINTF1(_L("--------- Testing English")); + break; + case 1: + languageToTest=ELangFrench; + INFO_PRINTF1(_L("--------- Testing French")); + break; + case 2: + languageToTest=ELangGerman; + INFO_PRINTF1(_L("--------- Testing German")); + break; + case 3: + languageToTest=ELangSpanish; + INFO_PRINTF1(_L("--------- Testing Spanish")); + break; + case 4: + languageToTest=ELangItalian; + INFO_PRINTF1(_L("--------- Testing Italian")); + break; + case 5: + languageToTest=ELangAmerican; + INFO_PRINTF1(_L("--------- Testing American")); + break; + default: + User::LeaveIfError(KErrNotSupported); + break; + }; + + // Change the locale + ChangeLocaleL(languageToTest); + TEST(User::Language() == languageToTest); + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + // Do the same set of tests for each language + TestCApaSystemControlListL(); + TestCApaDoorL(); + TestTApaAppInfoStreamsL(); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestTApaAppInfoL(), iLs.ClearAppInfoArray() ); + + INFO_PRINTF1(_L("Test for that language finished...")); + } + + // restore original locale, just in case... + ChangeLocaleL(language); + TEST(User::Language() == language); + } + +/** + @SYMTestCaseID t_caption_TestCApaSystemControlListL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check (short)caption by means of a control on the list CApaSystemControlList + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates a CApaSystemControlList and checks the value of (short)caption + by creating a CApaSystemControl from index 0 of CApaSystemControlList + + @SYMTestExpectedResults The (short)caption is set to a value not null (length is not zero) + */ +void CT_CaptionStep::TestCApaSystemControlListL() + { + INFO_PRINTF1(_L("Testing CApaSystemControlList... ")); + CApaSystemControlList* list=NULL; + User::LeaveIfError(FbsStartup()); + RFbsSession fbs; + User::LeaveIfError(fbs.Connect()); + TRAPD(ret, list=CApaSystemControlList::NewL(iFs)); + TEST(ret==KErrNone); + CApaSystemControl* control=list->Control(0); + TPtrC testShortCap=control->ShortCaption(); + TEST(testShortCap.Length()>0); + TPtrC testCap=control->Caption(); + TEST(testCap.Length()>0); + } + + +/** + @SYMTestCaseID t_caption_TestTApaAppInfoL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check appInfo contains the right (short)caption for the current test language. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test searches for KUidTestApp by calling GetNextApp until the UIDs match. + Once the right app is found, it retrieves its details by calling GetAppInfo(). + The (short)caption is check to ensure it matches the expected result. + + @SYMTestExpectedResults The (short)caption matches the one specified for the application, with the + american one being the default one. + */ +void CT_CaptionStep::TestTApaAppInfoL() + { + INFO_PRINTF1(_L("Testing GetAppInfo()... ")); + + // go through the list of apps until it finds KUidTestApp + TApaAppInfo appInfo; + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + FOREVER + { + TApaAppInfo info; + ret=iLs.GetNextApp(info); + TEST(ret==KErrNone); + if (info.iUid==KUidTestApp) + { + iLs.GetAppInfo(appInfo, info.iUid); + break; + } + } + + switch (User::Language()) + { + case ELangEnglish: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionEnglish); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionEnglish); + break; + case ELangFrench: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionFrench); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionFrench); + break; + case ELangGerman: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionGerman); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionGerman); + break; + case ELangSpanish: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionSpanish); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionSpanish); + break; + case ELangItalian: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionItalian); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionItalian); + break; + case ELangAmerican: + TEST(appInfo.iCaption==KTestTApaAppInfoCaptionDefault); + TEST(appInfo.iShortCaption==KTestTApaAppInfoShortCaptionDefault); + break; + default: + User::Leave(KErrNotSupported); + break; + }; + } + + +/** + @SYMTestCaseID t_caption_TestCApaDoorL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check the caption returned by a CApaDoor (a wrapper for an embedded document). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test starts by creating an active scheduler. + A CApaProcess is created, and a new CApaDocument is added to it using the specified + application factory. This document is then used to create a CApaDoor object which + is used to retrieve the test app caption. + + @SYMTestExpectedResults The (short)caption matches the one specified for the application, with the + american one being the default one. + */ +void CT_CaptionStep::TestCApaDoorL() + { + INFO_PRINTF1(_L("Testing CApaDoor... ")); + + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + CApaProcess* process=NULL; + TRAPD(ret,process = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + + CleanupStack::PushL(process); + + CApaDocument* doc=NULL; + TApaApplicationFactory appFact(KUidTestApp); + TRAP(ret,doc=process->AddNewDocumentL(appFact)); + TEST(ret==KErrNone); + + CApaDoor* door = NULL; + TRAP(ret,door=CApaDoor::NewL(iFs,*doc,TSize(400,400))); + TEST(ret==KErrNone); + + switch (User::Language()) + { + case ELangEnglish: + TEST(*door->Caption()==KTestTApaAppInfoCaptionEnglish); + break; + case ELangFrench: + TEST(*door->Caption()==KTestTApaAppInfoCaptionFrench); + break; + case ELangGerman: + TEST(*door->Caption()==KTestTApaAppInfoCaptionGerman); + break; + case ELangSpanish: + TEST(*door->Caption()==KTestTApaAppInfoCaptionSpanish); + break; + case ELangItalian: + TEST(*door->Caption()==KTestTApaAppInfoCaptionItalian); + break; + case ELangAmerican: + TEST(*door->Caption()==KTestTApaAppInfoCaptionDefault); + break; + default: + User::Leave(KErrNotSupported); + break; + }; + process->DestroyDocument(doc); + CleanupStack::PopAndDestroy(2); //process,scheduler + } + + +/** + @SYMTestCaseID t_caption_TestTApaAppInfoStreamsL + + @SYMPREQ 0 + + @SYMTestCaseDesc Check TApaAppInfo streaming works as expected + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create and TApaAppInfo object with the KUidTestApp test app. + Also, create a temporal file, associates the file with a write stream, + and prepares the stream for writing. + When the object is externalized to the streem, we open a file containing a + read stream and prepares the stream for reading. + + @SYMTestExpectedResults The test case is completed without any errors or panics + */ +void CT_CaptionStep::TestTApaAppInfoStreamsL() + { + INFO_PRINTF1(_L("Testing TApaAppInfo streams... ")); + + TApaAppInfo appInfoShort(KUidTestApp, _L("z:\\sys\\bin\\tstapp.exe"), _L("TstCap UK"),_L("TC UK")); + TEST(appInfoShort.iShortCaption.Compare(_L("TC UK"))==0); + + TFileName tempFile=_L("c:\\system\\test\\TC_temp.txt"); + TInt ret = iFs.MkDirAll(tempFile); + if (ret != KErrNone && ret != KErrAlreadyExists) + User::LeaveIfError(ret); + + TApaAppInfo appInfo; + + RFileWriteStream writer; + writer.PushL(); + User::LeaveIfError(writer.Replace(iFs,tempFile,EFileWrite)); + TRAP(ret, appInfo.ExternalizeL(writer)); + TEST(ret==KErrNone); + writer.CommitL(); + CleanupStack::PopAndDestroy(&writer); + + RFileReadStream reader; + reader.PushL(); + User::LeaveIfError(reader.Open(iFs,tempFile,EFileRead)); + TRAP(ret, appInfo.InternalizeL(reader)); + TEST(ret==KErrNone); + + CleanupStack::PopAndDestroy(&reader); + + User::LeaveIfError(iFs.Delete(tempFile)); + } + + + +/** + @SYMTestCaseID APPFWK-APPARC-0041 APPFWK-APPARC-0042 APPFWK-APPARC-0043 APPFWK-APPARC-0044 APPFWK-APPARC-0045 APPFWK-APPARC-0046 + + @SYMPREQ PCHY-6FTLPK + + @SYMTestCaseDesc Test the RApaLsSession::SetAppShortCaption function, used to set the app's short caption. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call SetAppShortCaption() to set the caption and read it back using the GetApaAppInfo(). + + @SYMTestExpectedResults The returned short caption must match the one set by the SetAppShortCaption function. + */ +void CT_CaptionStep::DoShortCaptionTestL() + { + INFO_PRINTF1(_L("Testing SetAppShortCaptionL() for short caption changes... ")); + + _LIT(KShortCaption1, "SC1"); + _LIT(KShortCaption2, "SC2"); + _LIT(KShortCaption3, "SC3"); + _LIT(KShortCaption4, "SC4"); + _LIT(KShortCaption5, "SC5"); + + // keep a copy of the current language, and set it to a known one + TLanguage language = User::Language(); + ChangeLocaleL(ELangEnglish); + TEST(User::Language() == ELangEnglish); + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + // SetAppShortCaption should return KErrNotFound if it could not find the app + INFO_PRINTF1(_L(".....setting short caption for an unknown app")); + TInt err = iLs.SetAppShortCaption(KShortCaption1, ELangNone, TUid::Uid(0xFFF34556)); + TEST(err == KErrNotFound); + + // Set the NULL short caption i.e. "", should return KErrArgument, + INFO_PRINTF1(_L(".....setting an empty short caption")); + err = iLs.SetAppShortCaption(KNullDesC, ELangNone, KUidTestApp); + TEST(err == KErrArgument); + + // SetAppShortCaption should return KErrArgument if short caption > KApaMaxAppCaption + INFO_PRINTF1(_L(".....setting short caption of more then KApaMaxAppCaption length")); + HBufC* longCaption = HBufC::NewL(KApaMaxAppCaption+1); + longCaption->Des().SetLength(KApaMaxAppCaption+1); + err = iLs.SetAppShortCaption(*longCaption, ELangNone, KUidTestApp); + TEST(err == KErrArgument); + delete longCaption; + + // SetAppShortCaption should return KErrNone if short caption == KApaMaxAppCaption + INFO_PRINTF1(_L(".....setting short caption of same size as KApaMaxAppCaption")); + longCaption = HBufC::NewL(KApaMaxAppCaption); + longCaption->Des().SetLength(KApaMaxAppCaption); + err = iLs.SetAppShortCaption(*longCaption, ELangCatalan, KUidTestApp); // just testing the arg length, not actual values + TEST(err == KErrNone); + delete longCaption; + + // Set short caption of an app for the current locale language (ELangEnglish so far) + INFO_PRINTF1(_L(".....setting short caption of an app for the current locale language")); + err = iLs.SetAppShortCaption(KShortCaption1, ELangEnglish, KUidTestApp); + TEST(err == KErrNone); + TApaAppInfo appInfo; + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); + + // Check short caption remains updated after a refresh of the applist + INFO_PRINTF1(_L(".....checking short caption remains updated after a refresh of the applist")); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); + + // Check short caption remains updated after a locale change + INFO_PRINTF1(_L(".....checking short caption remains updated after a locale change")); + ChangeLocaleL(ELangJapanese); + TEST(User::Language() == ELangJapanese); // Japanese locale exists in epoc32 tree but not defined in test app + User::LeaveIfError(iLs.ForceRegistration(dummy)); + ChangeLocaleL(ELangEnglish); // back to English to see what happened in between + TEST(User::Language() == ELangEnglish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); + + // Set short caption of an app for a language which is not the current one (ELangFrench, for example) + INFO_PRINTF1(_L(".....setting short caption of an app for a language which is not the current one")); + err = iLs.SetAppShortCaption(KShortCaption2, ELangFrench, KUidTestApp); + TEST(err == KErrNone); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // English, the current app language, doesn't change... + ChangeLocaleL(ELangFrench); + TEST(User::Language() == ELangFrench); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption2); + + // Set short caption of an app for a language which the app does not include (ELangAmerican) + INFO_PRINTF1(_L(".....setting short caption of an app for a language which the app does not include")); + ChangeLocaleL(ELangAmerican); + TEST(User::Language() == ELangAmerican); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + err = iLs.SetAppShortCaption(KShortCaption2, ELangAmerican, KUidTestApp); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // American takes the default...so English...which has just been updated. + + // Set short caption of an app for all languages with ELangNone + INFO_PRINTF1(_L(".....setting short caption for all languages with ELangNone")); + err = iLs.SetAppShortCaption(KShortCaption3, ELangNone, KUidTestApp); + TEST(err == KErrNone); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // American takes the default...so English...which has just been updated. + ChangeLocaleL(ELangEnglish); + TEST(User::Language() == ELangEnglish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // English set individually ===> not updated by ELangNone + ChangeLocaleL(ELangFrench); + TEST(User::Language() == ELangFrench); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption2); // French set individually ===> not updated by ELangNone + ChangeLocaleL(ELangGerman); + TEST(User::Language() == ELangGerman); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption3); // German takes the one set by ELangNone + ChangeLocaleL(ELangItalian); + TEST(User::Language() == ELangItalian); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption3); // Italian takes the one set by ELangNone + ChangeLocaleL(ELangSpanish); + TEST(User::Language() == ELangSpanish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption3); // Spanish takes the one set by ELangNone + + // Set short caption of an app for a language which was set by the previous ELangNone + INFO_PRINTF1(_L(".....setting short caption of an app which was set by the previous ELangNone")); + ChangeLocaleL(ELangItalian); + TEST(User::Language() == ELangItalian); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + err = iLs.SetAppShortCaption(KShortCaption4, ELangItalian, KUidTestApp); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption4); + + // Repeat set short caption of an app for all languages with ELangNone + INFO_PRINTF1(_L(".....repeat setting short caption for all languages with ELangNone")); + err = iLs.SetAppShortCaption(KShortCaption5, ELangNone, KUidTestApp); + TEST(err == KErrNone); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption4); // Italian set individually ===> not updated by ELangNone + ChangeLocaleL(ELangEnglish); + TEST(User::Language() == ELangEnglish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // English set individually ===> not updated by ELangNone + ChangeLocaleL(ELangFrench); + TEST(User::Language() == ELangFrench); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption2); // French set individually ===> not updated by ELangNone + ChangeLocaleL(ELangGerman); + TEST(User::Language() == ELangGerman); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption5); // German takes the one set by ELangNone + ChangeLocaleL(ELangSpanish); + TEST(User::Language() == ELangSpanish); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption5); // Spanish takes the one set by ELangNone + ChangeLocaleL(ELangAmerican); + TEST(User::Language() == ELangAmerican); + User::LeaveIfError(iLs.ForceRegistration(dummy)); + iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(appInfo.iShortCaption == KShortCaption1); // American takes the default...so English...which has just been updated. + + // restore original settings.... + INFO_PRINTF1(_L(".....restoring original settings")); + ChangeLocaleL(language); + TEST(User::Language() == language); + // restore original short captions for all langs....(h4 doesn't perform reboots between tests) + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionEnglish, ELangEnglish, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionFrench, ELangFrench, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionGerman, ELangGerman, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionItalian, ELangItalian, KUidTestApp) == KErrNone); + TEST(iLs.SetAppShortCaption(KTestTApaAppInfoShortCaptionSpanish, ELangSpanish, KUidTestApp) == KErrNone); + } + + +CT_CaptionStep::~CT_CaptionStep() + { + iFs.Close(); + iLs.Close(); + } + +CT_CaptionStep::CT_CaptionStep() + { + SetTestStepName(KT_CaptionStep); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0087 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the captions, icon configuration details have been retrieved properly from + the central repository settings and has the precedence over its resource file information. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A test application with its captions, icon details defined in a test central repository file + as well as resource file (suitable field values have been given for both cenrep and resource + configurations to identify it clearly). + Gets the information about the test application by passing its UID. + Check the given configuration details matches with central repository entries. +@SYMTestExpectedResults The given configuration details should match with central repository entries. +*/ + +void CT_CaptionStep::TestIconCaptionOverridesL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0087:TestIconCaptionOverridesL started...")); + + //Change the system language to English before starting the tests + TRAPD(ret,ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + + TApaAppInfo appInfo; + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + RFile file; + TBuf fileName; + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + file.FullName(fileName); + + //compare the captions, icon with values in CenRep file. + INFO_PRINTF1(_L("Compares Caption with value in CenRep...")); + TBuf cencap(KCenRepCaption); + + INFO_PRINTF2(_L("----Expected caption==>%S"), &cencap); + INFO_PRINTF2(_L("----Retrieved caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCenRepCaption); + INFO_PRINTF1(_L("Compares ShortCaption with the value in CenRep...")); + cencap.Zero(); + cencap.Copy(KCenRepShortCaption); + + INFO_PRINTF2(_L("----Expected short caption==>%S"), &cencap); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KCenRepShortCaption); + + INFO_PRINTF1(_L("Compares Icon file with the value in CenRep...")); + cencap.Zero(); + cencap.Copy(KCenRepIconFilename); + INFO_PRINTF2(_L("----Expected icon filename==>%S"), &cencap); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KCenRepIconFilename)==0); + + file.Close(); + INFO_PRINTF1(_L("APPFWK-APPARC-0087:TestIconCaptionOverridesL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0088 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the shortcaption is set through the API has got the precedence over central + repository and resource file customisation. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A test application with its short caption defined in central repository as well as in resource file. + Update the test application's short caption through API. + Gets the information about the test application by passing its UID. + Check whether the provided short caption matches with the one which has already been set through the API. +@SYMTestExpectedResults It should retrieve the short caption set through the API and match with the given short caption value. +*/ + +void CT_CaptionStep::TestApiPrecedenceOverCenRepConfigInfoL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0088:TestApiPrecedenceOverCenRepConfigInfoL started...")); + _LIT(KTApiShortCaption,"APITC UK"); + + TInt err = iLs.SetAppShortCaption(KTApiShortCaption, ELangEnglish, KUidTestIconCapOverride); + TEST(err == KErrNone); + + TApaAppInfo appInfo; + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + TBuf shortCaption(KTApiShortCaption); + + //compares the short caption with the value which has been set through API. + INFO_PRINTF1(_L("Compares short caption with the value that has been set through API...")); + INFO_PRINTF2(_L("----Expected short caption==>%S"), &shortCaption); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KTApiShortCaption); + + //Sets the short caption back to the actual one + INFO_PRINTF1(_L("Sets the short caption back to the actual one through API...")); + err = iLs.SetAppShortCaption(KCenRepShortCaption, ELangEnglish, KUidTestIconCapOverride); + TEST(err == KErrNone); + + INFO_PRINTF1(_L("APPFWK-APPARC-0088:TestApiPrecedenceOverCenRepConfigInfoL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0089 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the changes made in central repository is notified by the central repository + observer (CApaIconCaptionCenrepObserver), which watches for changes in the Central Repository + and updates the overrides when they occur. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A test application with its caption, icon configuration details defined in central repository file. + Access the central repository. + Update the test application short caption's value in the settings. + Get the information about the test application by passing its UID. + Check the short caption value retrieved from the central repository matches with the given information. +@SYMTestExpectedResults The given new short caption value should match with the central repository entry. +*/ +void CT_CaptionStep::TestCenRepChangeNotificationL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0089:TestCenRepChangeNotificationL started...")); + + //access central repository + CRepository* cenRep = CRepository::NewL(KUidIconCaptionRepository); + CleanupStack::PushL(cenRep); + + _LIT(KCenRepSC,"CRNTC UK"); + TUint32 shortCapKey = 0x00000001; // for English + + //update the short caption value in central repository. + TInt error = cenRep->Set(shortCapKey,KCenRepSC); + + //tests whether the process with WriteDeviceData capability can update the configuration settings. + TEST(error == KErrNone); + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + TApaAppInfo appInfo; + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + //compare the short caption with the updated value in central repository + INFO_PRINTF1(_L("Compares short caption with the updated value in CenRep...")); + TBuf shortCaption(KCenRepSC); + + INFO_PRINTF2(_L("----Expected short caption==>%S"), &shortCaption); + INFO_PRINTF2(_L("----Retrieved shortcaption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KCenRepSC); + + //sets the short caption back to the actual for other tests to work + error = cenRep->Set(shortCapKey,KCenRepShortCaption); + + // Force the applist to be updated (so test app gets new language settings) + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + CleanupStack::PopAndDestroy(cenRep); //cenRep object + INFO_PRINTF1(_L("APPFWK-APPARC-0089:TestCenRepChangeNotificationL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0090 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMTestCaseDesc Tests whether the caption, icon configuration details have been retrieved properly from the + Central Repository with respect to change in system language. + Tests if the particular language entry is not there in the central repository file, it will + then try to get the information from the resource file. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions A multilingual test application with its caption, icon configuration details defined in central repository file. + Change the system language to French. + Gets the information about the test application by passing its UID. + Checks the retrieved captions, icon from Central Repository are in French. + Change the system language to German (the settings are not there for German in Central Repository). + Again gets the information about the test application by passing its UID. + Checks the retrieved captions, icon from the Resource file are in German. + Restores the system language to English. + Again gets the information about the test application by passing its UID. + Checks the retrieved captions, icon from Central Repository are in English. +@SYMTestExpectedResults All the retrieved Central Repository configuration details should match with the given details by changing + system language. +*/ + +void CT_CaptionStep::TestIconCaptionOverridesWithChangeLangL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0090:TestIconCaptionOverridesWithChangeLangL started...")); + + TInt ret = 0; + //French + _LIT(KCaptionFrench, "CRTstCap FR"); + _LIT(KShortCaptionFrench, "CRTC FR"); + _LIT(KIconFilenameFrench, "Z:\\resource\\apps\\svg_icon.svg"); + + //German + _LIT(KCaptionGerman, "TstCap GE"); + _LIT(KShortCaptionGerman, "TC GE"); + _LIT(KIconFilenameGerman, "Z:\\resource\\apps\\ticoncapoverride.mbm"); + + TApaAppInfo appInfo; + RFile file; + TBuf fileName; + + // Change the locale to French + INFO_PRINTF1(_L("Change the locale to French...")); + TRAP(ret,ChangeLocaleL(ELangFrench)); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("----System Language==>%d"), User::Language()); + + TEST(User::Language() == ELangFrench);//check language is set to French. + + // Force the applist to be updated (so test app gets new language settings) + RPointerArray dummy; + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + file.FullName(fileName); + + TBuf printString(KCaptionFrench); + + //compare the captions, icon in French with the value in central repository + INFO_PRINTF1(_L("Compares Caption with value in CenRep...")); + INFO_PRINTF2(_L("----Exepcted Caption in French==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved Caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCaptionFrench); + + INFO_PRINTF1(_L("Compares Short Caption with value in CenRep...")); + printString.Zero(); + printString.Copy(KShortCaptionFrench); + INFO_PRINTF2(_L("----Expected short caption in French==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KShortCaptionFrench); + + INFO_PRINTF1(_L("Compares Icon filename with value in CenRep...")); + printString.Zero(); + printString.Copy(KIconFilenameFrench); + INFO_PRINTF2(_L("----Expected icon filename in French==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KIconFilenameFrench)==0); + + //Change the locale to German. + INFO_PRINTF1(_L("Change the locale to German...")); + TRAP(ret,ChangeLocaleL(ELangGerman)); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("----System Language==>%d"), User::Language()); + TEST(User::Language() == ELangGerman);//check language is set to German. + + // Force the applist to be updated (so test app gets new language settings) + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + file.Close(); + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + + fileName.Zero(); + file.FullName(fileName); + + // The entry for language German is not there in Central repository so it compares + // the captions, icon in this language with the values in resource file. + INFO_PRINTF1(_L("Compares Caption with value in Resource file...")); + printString.Zero(); + printString.Copy(KCaptionGerman); + INFO_PRINTF2(_L("----Expected caption in German==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCaptionGerman); + + INFO_PRINTF1(_L("Compares short caption with value in Resource file...")); + printString.Zero(); + printString.Copy(KShortCaptionGerman); + INFO_PRINTF2(_L("----Expected short caption in German==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + TEST(appInfo.iShortCaption == KShortCaptionGerman); + + INFO_PRINTF1(_L("Compares icon filename with value in Resource file...")); + printString.Zero(); + printString.Copy(KIconFilenameGerman); + INFO_PRINTF2(_L("----Expected icon filename in German==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KIconFilenameGerman)==0); + + // Change the locale to English for changing the settings back to the original + INFO_PRINTF1(_L("Change the locale back to English...")); + TRAP(ret,ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("----System Language==>%d"), User::Language()); + + TEST(User::Language() == ELangEnglish);//check language is set to English. + + // Force the applist to be updated (so test app gets new language settings) + User::LeaveIfError(iLs.ForceRegistration(dummy)); + + //Get test app's information + iLs.GetAppInfo(appInfo, KUidTestIconCapOverride); + + file.Close(); + //Get test app's icon information + iLs.GetAppIcon(KUidTestIconCapOverride,file); + + fileName.Zero(); + file.FullName(fileName); + + //compare the captions, icon in English with the value in central repository + INFO_PRINTF1(_L("Compares Caption with value in CenRep...")); + printString.Zero(); + printString.Copy(KCenRepCaption); + INFO_PRINTF2(_L("----Expected caption in English==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved caption==>%S"), &appInfo.iCaption); + TEST(appInfo.iCaption == KCenRepCaption); + + INFO_PRINTF1(_L("Compares short caption with value in CenRep...")); + printString.Zero(); + printString.Copy(KCenRepShortCaption); + INFO_PRINTF2(_L("----Expected short caption==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved short caption==>%S"), &appInfo.iShortCaption); + + TEST(appInfo.iShortCaption == KCenRepShortCaption); + INFO_PRINTF1(_L("Compares icon filename with value in CenRep...")); + printString.Zero(); + printString.Copy(KCenRepIconFilename); + INFO_PRINTF2(_L("----Expected icon filename==>%S"), &printString); + INFO_PRINTF2(_L("----Retrieved icon filename==>%S"), &fileName); + TEST(fileName.Compare(KCenRepIconFilename)==0); + + INFO_PRINTF1(_L("APPFWK-APPARC-0090:TestIconCaptionOverridesWithChangeLangL finished...")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0091 +@SYMPREQ CR1787 +@SYMREQ REQ9167 +@SYMDEF DEF125262 +@SYMTestCaseDesc Checks there is no memory leaks when CApaIconCaptionOverridesForApp & CApaIconCaptionCenrepObserver + objects are created and destroyed. +@SYMTestType CIT +@SYMTestPriority Critical +@SYMTestActions Marks the Heap memory + Invokes the static method 'TestIconCaptionOverridesL()' defined in 'ticonloaderandiconarrayforleaks.dll', + that creates objects of CApaIconCaptionOverridesForApp, CApaIconCaptionCenrepObserver and deletes those. + And then tests, there is no memory leak from the creation to destruction of those objects. +@SYMTestExpectedResults There should be no memory leaks. +*/ + +void CT_CaptionStep::TestIconCaptionOverridesMemoryLeaksL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0091:TestIconCaptionOverridesMemoryLeaksL started...")); + __UHEAP_MARK; + TIconLoaderAndIconArrayForLeaks::TestIconCaptionOverridesL(); + __UHEAP_MARKEND; + INFO_PRINTF1(_L("APPFWK-APPARC-0091:TestIconCaptionOverridesMemoryLeaksL finished...")); + } + +void CT_CaptionStep::DoIconCaptionOverridesTestL() + { + TestIconCaptionOverridesL(); + TestIconCaptionOverridesWithChangeLangL(); + TestCenRepChangeNotificationL(); + TestIconCaptionOverridesMemoryLeaksL(); + TestApiPrecedenceOverCenRepConfigInfoL(); + } + +TVerdict CT_CaptionStep::doTestStepL() + { + INFO_PRINTF1(_L("Test T_Caption step started....\n")); + + // Connect to Servers + TEST(iFs.Connect() == KErrNone); + TEST(iLs.Connect() == KErrNone); + + // run language tests for the test caption + TRAPD(r, DoLanguageTestL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("DoLanguageTestL() finished with value '%d'\n"), r); + + // run icon caption overrides tests +/* TRAP(r, DoIconCaptionOverridesTestL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("DoIconCaptionOverridesTestL() finished with value '%d'\n"), r); */ + + // run shortcaption setting tests +/* TRAP(r, DoShortCaptionTestL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("DoShortCaptionTestL() finished with value '%d'\n"), r); */ + + + INFO_PRINTF1(_L("....test T_Caption step finished!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CaptionStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CaptionStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,71 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_CAPTION_STEP_H__) +#define __T_CAPTION_STEP_H__ + + +#include +#include +#include "ApparcTestServer.h" +#include "testableapalssession.h" + + + +///////////////////////////////////////////////////////////////////////////////// +// +// CT_CaptionStep definition +// +///////////////////////////////////////////////////////////////////////////////// + + +class CT_CaptionStep :public CTestStep + { +public: + CT_CaptionStep(); + ~CT_CaptionStep(); + virtual TVerdict doTestStepL(); +private: + void DoLanguageTestL(); + void DoShortCaptionTestL(); + void ChangeLocaleL(TLanguage aLanguage); + void DoIconCaptionOverridesTestL(); +private: + void TestTApaAppInfoStreamsL(); + void TestTApaAppInfoL(); + void TestCApaDoorL(); + void TestCApaSystemControlListL(); + void TestIconCaptionOverridesL(); + void TestApiPrecedenceOverCenRepConfigInfoL(); + void TestCenRepChangeNotificationL(); + void TestIconCaptionOverridesWithChangeLangL(); + void TestIconCaptionOverridesMemoryLeaksL(); +private: + RFs iFs; + RTestableApaLsSession iLs; + }; + +_LIT(KT_CaptionStep,"T_Caption"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CmdlnStep.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CmdlnStep.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,677 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test CApaCommandLine Apis\n +// Test CApaCommandLine API by setting launching information and +// checking setter and getter function.\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_CmdlnStep.h" +#include "testableapalssession.h" + + /** + @SYMTestCaseID T-CmdlnStep-testSecureCmdLinesL + + @SYMPREQ 280 - File Handle Support + + @SYMTestCaseDesc Tests CApaCommandLine Apis. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + + @SYMTestActions . + Observe the operation that is executed on each command.\n + Test the following accessor functions:\n + CApaCommandLine::ExecutableName()\n + CApaCommandLine::Command()\n + CApaCommandLine::DocumentName()\n + CApaCommandLine::TailEnd()\n + CApaCommandLine::ServerId()\n + CApaCommandLine::SessionHandle()\n + CApaCommandLine::SubSessionHandle()\n + Check whether each of these getter functions return the individual components.\n\n + Test the following setter functions:\n + CApaCommandLine::SetExecutableNameL()\n + CApaCommandLine::SetCommandL()\n + CApaCommandLine::SetDocumentNameL()\n + CApaCommandLine::SetTailEndL()\n + CApaCommandLine::SetServerId()\n + CApaCommandLine::SetSessionHandle()\n + CApaCommandLine::SetSubSessionHandle()\n + Use the setter functions to set the individual components. Use the + getter methods to verify values set to the individual components.\n + API Calls:\n + CApaCommandLine::NewL(const RMessagePtr2& aMessage)\n + CApaCommandLine::ExecutableName() const\n + CApaCommandLine::Command() const\n + CApaCommandLine::DocumentName() const\n + CApaCommandLine::TailEnd() const\n + CApaCommandLine::TailEnd() const\n + CApaCommandLine::ServerId() const\n + CApaCommandLine::SessionHandle() const\n + CApaCommandLine::SubSessionHandle() const\n + CApaCommandLine::EnviromentSlotsReaderL()\n + CApaCommandLine::SetExecutableNameL(const TDesC& aAppName)\n + CApaCommandLine::SetCommandL(TApaCommand aCommand)\n + CApaCommandLine::SetDocumentNameL(const TDesC& aDocName)\n + CApaCommandLine::SetTailEndL(const TDesC8& aTailEnd)\n + CApaCommandLine::SetServerId(TInt aServerId)\n + CApaCommandLine::SetSessionHandle(TInt aSessionHandle)\n + CApaCommandLine::SetSubSessionHandle(TInt aSubSessionHandle)\n + CApaCommandLine::SetProcessEnvironmentL(RProcess& aProcess) const\n + + + + @SYMTestExpectedResults Tests checks results against desired results. + + */ + void CT_CmdlnStep::testSecureCmdLinesL() + { + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + + testPositiveInputsL(); + testInitializationL(); + testBoundaryConditionsL(); + //DONT_CHECK since type store is updated + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, testRecAppLaunchL(ls), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&ls); + } + +/** + Auxiliary function for TestCaseID T-CmdlnStep-testSecureCmdLinesL + + + @SYMPREQ 280 - File Handle Support + + Call the Set APIs below with valid inputs + CApaCommandLine::SetExecutableNameL(appName); + CApaCommandLine::SetDocumentNameL(docName); + CApaCommandLine::SetTailEndL(tailEnd); + CApaCommandLine::SetFileByHandleL(aFile); + CApaCommandLine::SetCommandL(command); + + Compares the values set by the above APIs with those obtained by the GET APIs mentioned below + CApaCommandLine::ExecutableName()); + CApaCommandLine::DocumentName()); + CApaCommandLine::TailEnd()); + CApaCommandLine::GetFileByHandleL(); + CApaCommandLine::Command()); + + + */ +void CT_CmdlnStep::testPositiveInputsL() + { + TPtrC appName; + TPtrC docName; + TApaCommand command = EApaCommandRun; + TPtrC8 tailEnd; + TEntry dirEntry; + RFs fSession; + RFile file; + + INFO_PRINTF1(_L("Tests the Set and Get command line APIs for valid inputs")); + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); // start with an empty command line + + appName.Set(KTAppName); + docName.Set(KTDocName); + tailEnd.Set(KTTailEnd); + + User::LeaveIfError(fSession.Connect()); + //User::LeaveIfError(fSession.ShareProtected()); + INFO_PRINTF1(_L("Check for the existence of C:\\System\\Data Directory")); + TInt ret = fSession.Entry(KTempDir,dirEntry); + if(ret==KErrNotFound) + { + INFO_PRINTF1(_L("Create C:\\System\\Data Directory if not existing already")); + fSession.MkDir(KTempDir); /* Create Data Directory as it does not exist */ + } + User::LeaveIfError(file.Replace(fSession, KTDocName, EFileStreamText|EFileShareAny)); + User::LeaveIfError(file.Write(KTWriteData));//write some test data + + INFO_PRINTF1(_L("The Set command line APIs are invoked with valid arguments")); + // Set the member variables using the Set functions + + TRAP(ret, + { + cmdLine->SetExecutableNameL(appName); + cmdLine->SetDocumentNameL(docName); + cmdLine->SetTailEndL(tailEnd); + cmdLine->SetFileByHandleL(file); + cmdLine->SetCommandL(command); + } ) + + TEST(KErrNone==ret); + + if(KErrNone==ret) + { + INFO_PRINTF1(_L("The Get command line APIs are invoked and their return values are verified")); + //Test the values returned by the Get Functions + TEST(appName==cmdLine->ExecutableName()); + TEST(docName==cmdLine->DocumentName()); + TEST(tailEnd==cmdLine->TailEnd()); + + RFile tempFile; + TBuf8<10> readData; + TRAP(ret,cmdLine->GetFileByHandleL(tempFile)); + TEST(KErrNone==ret); + if(KErrNone==ret) + { + tempFile.Read(0,readData);//file still open so rewind file pointer + TEST(readData==KTWriteData); + } + } + + file.Close(); + fSession.Close(); + //fSession.Delete(KTDocName); + CleanupStack::PopAndDestroy(cmdLine); + + } + + +/** + Auxiliary function for TestCaseID T-CmdlnStep-testSecureCmdLinesL + + @SYMPREQ 280 - File Handle Support + + Tests the initial values of the member variables + + Following are the SET APIs tested + CApaCommandLine::SetExecutableNameL(appName); + CApaCommandLine::SetDocumentNameL(docName); + CApaCommandLine::SetTailEndL(tailEnd); + CApaCommandLine::SetSessionHandle(TInt aSessionHandle); + CApaCommandLine::SetSubSessionHandle(TInt aSubSessionHandle); + CApaCommandLine::SetServerIdL(TInt serverId); + CApaCommandLine::SetCommandL(command); + + Compares the values set with those obtained by the GET APIs + CApaCommandLine::ExecutableName(); + CApaCommandLine::DocumentName(); + CApaCommandLine::TailEnd(); + CApaCommandLine::ServerId(); + CApaCommandLine::SessionHandle(); + CApaCommandLine::SubSessionHandle(); + CApaCommandLine::Command(); + + Following Scenarios are tested + + 1. Do not set the values and check the values returned by the GET APIs + 2. Set Application Name and check all the values returned by the GET APIs + 3. Set AppName,DocName and check all the values returned by the GET APIs + 4. Set AppName,DocName,Tailend and check all the values returned by the GET APIs + 5. Set AppName,DocName,Tailend,Serverid and check all the values returned by the GET APIs + 6. Set AppName,DocName,Tailend,Serverid,sessionId and check all the values returned by the GET APIs + 7. Set AppName,DocName,Tailend,Serverid,sessionId and subsessionId and check all the values returned by the GET APIs + */ + +void CT_CmdlnStep::testInitializationL() + { + + TPtrC appName(KNullDesC); + TPtrC docName(KNullDesC); + TApaCommand cmdType = EApaCommandRun;//CApaCommandLine's initial value + TPtrC8 tailEnd(KNullDesC8); + RFs fSession; + RFile file; + TEntry dirEntry; + + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); // start with an empty command line + + for(TInt index = 0; index < TEST_SET_APIS-1; index++) + { + switch(index) + { + case TEST_INITIALIZATION: + INFO_PRINTF1(_L("Tests the initial values of the member data")); + break; + case TEST_APP: + INFO_PRINTF1(_L("Setting Application Name to \"app name\".")); + appName.Set(KTAppName); + cmdLine->SetExecutableNameL(appName); + break; + case TEST_DOC: + INFO_PRINTF1(_L("Setting document name to \"doc name\".")); + docName.Set(KTDocName); + cmdLine->SetDocumentNameL(docName); + break; + case TEST_TAILEND: + INFO_PRINTF1(_L("Setting tail end to \"tail end \".")); + tailEnd.Set(KTTailEnd); + cmdLine->SetTailEndL(tailEnd); + break; + case TEST_COMMAND: + INFO_PRINTF1(_L("Setting tail end to \"command type \".")); + cmdType=EApaCommandOpen;//any update to the command value + cmdLine->SetCommandL(cmdType); + break; + case TEST_FILE_HANDLE: + { + INFO_PRINTF1(_L("Setting file handle name to \"handle name\".")); + User::LeaveIfError(fSession.Connect()); + User::LeaveIfError(fSession.ShareProtected()); + INFO_PRINTF1(_L("Check for the existence of C:\\System\\Data Directory")); + TInt ret = fSession.Entry(KTempDir,dirEntry); + if(ret==KErrNotFound) + { + INFO_PRINTF1(_L("Create C:\\System\\Data Directory if not existing already")); + } + User::LeaveIfError(file.Replace(fSession, KTDocName, EFileStreamText|EFileShareAny)); + TRAP(ret,cmdLine->SetFileByHandleL(file)); + TEST(KErrNone==ret); + break; + } + default: + break; + } + + INFO_PRINTF1(_L("The Get command line APIs are invoked and their return values are verified")); + + //Test the values returned by the Get Functions + TEST(appName==cmdLine->ExecutableName()); + TEST(docName==cmdLine->DocumentName()); + TEST(tailEnd==cmdLine->TailEnd()); + TEST(cmdType==cmdLine->Command()); + + RFile testFile; + TRAPD(ret,cmdLine->GetFileByHandleL(testFile)); + TEST(KErrNone==ret); + if(KErrNone==ret) + { //this test relies on TEST_FILE_HANDLE being the last case in the case statement + if(index==TEST_FILE_HANDLE) + {//not equal when initialised + TEST(file.SubSessionHandle()!=testFile.SubSessionHandle()); + } + else + {//equal when uninitialised + TEST(file.SubSessionHandle()==testFile.SubSessionHandle()); + } + } + } + + file.Close(); + fSession.Close(); + //fSession.Delete(KTDocName); + CleanupStack::PopAndDestroy(cmdLine); + + } + +/** + Auxiliary function for TestCaseID T-CmdlnStep-testSecureCmdLinesL + + @SYMPREQ 280 - File Handle Support + + Tests CApaCommandLine Apis. + + Tests the Boundary values of the member variables like Null descriptors and zero for integer member variables + Also test negative values for the integer member variables + + CApaCommandLine::SetExecutableNameL(appName); + CApaCommandLine::SetDocumentNameL(docName); + CApaCommandLine::SetTailEndL(tailEnd); + CApaCommandLine::SetCommandL(command); + + Compares the values set with those obtained by the GET APIs + CApaCommandLine::ExecutableName()); + CApaCommandLine::DocumentName()); + CApaCommandLine::TailEnd()); + CApaCommandLine::Command()); + + Following Scenarios are tested + + 1. Set AppName,DocName and Tailend to Null descriptors and check the values returned by the corresponding + GET APIs + */ + +void CT_CmdlnStep::testBoundaryConditionsL() + { + + TPtrC appName(KNullDesC); + TPtrC docName(KNullDesC); + TPtrC8 tailEnd; + + CApaCommandLine* cmdLine = CApaCommandLine::NewLC(); // start with an empty command line + + INFO_PRINTF1(_L("TEST APIS WITH BOUNDARY CONDITIONS\n")); + + //Set the member variables + cmdLine->SetExecutableNameL(appName); + cmdLine->SetDocumentNameL(docName); + tailEnd.Set(KTNullTail); + cmdLine->SetTailEndL(tailEnd); + + // Check the values returned by the Get Functions + TEST(appName==cmdLine->ExecutableName()); + TEST(docName==cmdLine->DocumentName()); + TEST(tailEnd==cmdLine->TailEnd()); + + CleanupStack::PopAndDestroy(cmdLine); + + } + +/** + Auxiliary function for TestCaseID T-CmdlnStep-testSecureCmdLinesL + + @SYMPREQ 280 - File Handle Support + + Tests CApaCommandLine Apis. + + The functions tests positive and negative test scenarios for API + TInt RApaLsSession::StartDocument(const TDesC& aFileName, RFs& aFSession, RFile& aFile, TThreadId& aThreadId) + + The test case opens a document "temp.test" with datatype "test/plain" which is recognized by TESTREC. + T_EnvSlots.exe is application mapped to the this data type using InsertDataMappingL function. + When the file is opened using StartDocument the application is launched which verifies the environment slots + of the launched application to those set. + + + */ + +void CT_CmdlnStep::testRecAppLaunchL(RApaLsSession& aLs) + { + + TThreadId startAppThreadID; + RFs fSession; + RFile file; + TDataType dataType(KTDataType); + TEntry dirEntry; + + User::LeaveIfError(fSession.Connect()); + User::LeaveIfError(fSession.ShareProtected()); + + INFO_PRINTF1(_L("Check for the existence of C:\\System\\Data Directory")); + TInt ret = fSession.Entry(KTempDir,dirEntry); + + if(ret==KErrNotFound) + { + INFO_PRINTF1(_L("Create C:\\System\\Data Directory if not existing already")); + } + + User::LeaveIfError(file.Replace(fSession, KTDocName, EFileStreamText|EFileShareAny)); + User::LeaveIfError(file.Write(KTWriteData)); + + //Create A Global mutex to control the access to the logfile + + RMutex fileAccess; + fileAccess.CreateGlobal(KTLogFileAccess); + + INFO_PRINTF1(_L("Start Valid Document of Data type : test")); + + TUid uid; + uid.iUid = (0x102032AB); + ret = aLs.InsertDataMapping(dataType, KDataTypePriorityHigh, uid); + TEST(ret==KErrNone); + if(ret == KErrNone) + { + INFO_PRINTF1(_L("InsertDataMapping API call successful")); + } + else + { + INFO_PRINTF1(_L("InsertDataMapping API call failed")); + } + + ret = aLs.StartDocument(file,startAppThreadID); + TEST(ret==KErrNone); + if(ret == KErrNone) + { + INFO_PRINTF1(_L("Start Document API call successful")); + } + else + { + INFO_PRINTF1(_L("Start Document API call failed")); + } + + // Make the process sleep in order to launch T_EnvSlots + User::After(KOneSecond); + + // Wait for the Mutex for log file access + fileAccess.Wait(); + TBufC filePath(KEnvFilePath); + RFile logFile; + + INFO_PRINTF1(_L("File Access Mutex obtained")); + + //Open the logfile in the readmode + User::LeaveIfError(logFile.Open(fSession,filePath,EFileRead)); + + INFO_PRINTF1(_L("Env Log File Open successful")); + + TBuf8<8> expected(KTPass); + TBuf8<8> obtained; + TBuf8<8> failReason; + + // Read from the logfile + User::LeaveIfError(logFile.Read(obtained)); + + INFO_PRINTF1(_L("Env Log File Read successful")); + + TEST(expected==obtained); + + if(expected == obtained) + { + INFO_PRINTF1(_L("Environment slots verification Passed")); + } + else { + // Read up to the end of the file to log all the failures + do + { + // Read the environment slot whose verification failed + logFile.Read(failReason); + + if(failReason == KTApp) + { + INFO_PRINTF1(_L("Environment slot verification failed for Application Name")); + } + else if(failReason == KTDoc) + { + INFO_PRINTF1(_L("Environment slot verification failed for Document Name")); + } + else if(failReason == KTServer) + { + INFO_PRINTF1(_L("Environment slot verification failed for Server Id")); + } + else if(failReason == KTCommand) + { + INFO_PRINTF1(_L("Environment slot verification failed for Command")); + } + + // Skip the "TestFail" text + logFile.Read(failReason); + + //Exit the loop if end of the file + if(failReason.Length() == 0) + break; + + } while(ETrue); + } + + ret = aLs.DeleteDataMapping(dataType); + TEST(ret==KErrNone); + if(ret == KErrNone) + { + INFO_PRINTF1(_L("DeleteDataMapping API call successful")); + } + else + { + INFO_PRINTF1(_L("DeleteDataMapping API call failed")); + } + + ret = aLs.StartDocument(file,startAppThreadID); + TEST(ret==KErrNotFound); + if(ret == KErrNotFound) + { + INFO_PRINTF1(_L("Start Document API call with expected failure successful")); + } + else + { + INFO_PRINTF1(_L("Start Document API call with expected failure failed")); + } + + logFile.Close(); + + // Test on Invalid Document Name, Invalid File Session and Invalid File Args removed + // This test was invalid & panics + + file.Close(); + fSession.Close(); + //fSession.Delete(KTDocName); + fileAccess.Close(); + + } + +/** + @SYMTestCaseID CT-CmdlnStep-testCmdLinesAPIsL() + + @SYMPREQ + + @SYMTestCaseDesc Command line APIs to be properly tested + + @SYMTestActions CApaCommandLine::NewLC() is called to create a commandline object;CApaCommandLineSetFileByHandleL() is called to set the file session and file handle; RProcess::Create is called to create a new process to launch the exe; + CApaCommandLine::SetProcessEnvironmentL is called to initialise the parameters of the child process; CApaCommandLine::GetCommandLineFromProcessEnvironment is + called by the child process to get the commandline object created by the parent process; In order to be able to read the file, CApaCommandLine::GetFileByHandleL is called by the child process + to get the file handle created by the parent process. + + API Calls:static CApaCommandLine* NewLC(); + void SetProcessEnvironmentL(RProcess& aProcess) const; + static TInt GetCommandLineFromProcessEnvironment(CApaCommandLine*& aCommandLine); + void SetFileByHandleL(const RFile& aFile); + void GetFileByHandleL(RFile& aFile) const; + + @SYMTestExpectedResults Returns an integer value (99) if no exception occurs else return system wide errors. + + */ +void CT_CmdlnStep::testCmdLinesAPIsL() + { + INFO_PRINTF1(_L("Start test testCmdLinesAPIsL ...")); + RFs fs; + RFile file; + RProcess process; + TInt ret(0); + _LIT(KFileName, "z:\\system\\data\\one_byte.txt"); //the file to be read by the process + _LIT(KExeName, "TCmdLineExe"); //exe that is created for this test case + TRequestStatus status; + + ret = fs.Connect(); + TEST(ret==KErrNone); + CleanupClosePushL(fs); + ret = fs.ShareProtected(); + TEST(ret==KErrNone); + ret = file.Open(fs, KFileName, EFileRead|EFileShareAny); //open for read + TEST(ret==KErrNone); + CleanupClosePushL(file); + if(ret == KErrNone) + { + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); + ret = process.Create(KExeName, KNullDesC); + CleanupClosePushL(process); + TEST(ret==KErrNone); + if(ret==KErrNone) + { + TRAP(ret,cmdLine->SetFileByHandleL(file)); + TEST(ret==KErrNone); + if(ret==KErrNone) + { + TRAP(ret,cmdLine->SetProcessEnvironmentL(process)); + TEST(ret==KErrNone); + if(ret==KErrNone) + { + status = KRequestPending; + process.Logon(status); + process.Resume(); + User::WaitForRequest(status); + } + TEST(status.Int()==KFileHandleTestPassed); + } + } + + CleanupStack::PopAndDestroy(&process); + CleanupStack::PopAndDestroy(cmdLine); + } + CleanupStack::PopAndDestroy(2); + TEST(ret==KErrNone); + } + + + +CT_CmdlnStep::~CT_CmdlnStep() +/** + Destructor + */ + { + } + +CT_CmdlnStep::CT_CmdlnStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_CmdlnStep); + } + +TVerdict CT_CmdlnStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_CmdlnStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +// need to also test CApaCommandLine - SetServerNotRequiredL/SetServerRequiredL/ServerRequired + +TVerdict CT_CmdlnStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ +{ + INFO_PRINTF1(_L("Test setting full command lines")); + + // run the testcode (inside an alloc heaven harness) + + __UHEAP_MARK; + TRAPD(ret,testSecureCmdLinesL()); + TEST(ret==KErrNone); + + TRAP(ret,testCmdLinesAPIsL()); + TEST(ret==KErrNone); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test completed!")); + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CmdlnStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_CmdlnStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,95 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_CMDLN_STEP_H__) +#define __T_CMDLN_STEP_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ApparcTestServer.h" +#include + +//! A CT_CmdlnStep test class. +/** + Test CApaCommandLine Apis. +*/ +class CT_CmdlnStep : public CTestStep + { +public: + CT_CmdlnStep(); + ~CT_CmdlnStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + + void testSecureCmdLinesL(); + void testBoundaryConditionsL(); + void testInitializationL(); + void testPositiveInputsL(); + void testRecAppLaunchL(RApaLsSession& aLs); + void testCmdLinesAPIsL(); + + }; + +_LIT(KT_CmdlnStep,"T_Cmdln"); + + +#define TEST_INITIALIZATION 0 +#define TEST_APP 1 +#define TEST_DOC 2 +#define TEST_TAILEND 3 +#define TEST_COMMAND 4 +#define TEST_FILE_HANDLE 5 + +#define TEST_SET_APIS 7 + +_LIT(KTLogFileAccess,"TestLogFile"); +_LIT(KEnvFilePath,"c:\\Logs\\TestExecute\\EnvSlots.txt"); + +_LIT(KTAppName,"Z:\\sys\\bin\\T_EnvSlots.exe"); +_LIT(KTDocName,"C:\\System\\data\\temp.test"); +_LIT(KTempDir,"C:\\System\\data\\"); +_LIT(KTNoDocName,"C:\\Logs\\TestExecute\\NotFound.aaa"); + +_LIT8(KTTailEnd,"TailEnd"); +_LIT8(KTNullTail,""); +_LIT8(KTDataType,"test/plain"); +_LIT8(KTWriteData,"Support"); +_LIT8(KTPass,"TestPass"); +_LIT8(KTFail,"TestFail"); +_LIT8(KTApp,"ApplName"); +_LIT8(KTDoc,"DocuName"); +_LIT8(KTServer,"ServerId"); +_LIT8(KTCommand,"ECommand"); + +const TInt KEnvThirdUidValue = 0x102032AB; +const TInt KOneSecond = 1000000; +const TInt KMaxFilePath = 50; +const TInt KFileHandleTestPassed = 99; + +#endif //__T_CMDLN_STEP_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ControlPanelTest.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ControlPanelTest.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,502 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests control panel Application Apparc base classes and utility functions to get application's data.\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include + +#include +#include "..\apparc\apadll.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "T_ControlPanelTest.h" +#include "tstapp.h" +#include + +#if !defined(__E32TEST_H__) +#include +#endif + +_LIT(KCompleted, "Completed."); + + +_LIT(KRSCDIR,"C:\\Resource\\apps\\"); +_LIT(KRSCREGDIR,"C:\\private\\10003a3f\\import\\apps\\"); +_LIT(KNEWCTLPATH,"C:\\sys\\bin\\app_CTRL2.exe"); +_LIT(KSRCRESOURCEPATH,"Z:\\private\\10003a3f\\import\\apps\\App_CTRL2_reg.Rsc"); +_LIT(KDESTRESOURCEPATH,"C:\\private\\10003a3f\\import\\apps\\App_CTRL2_reg.Rsc"); + +LOCAL_D TInt SimulateKey(TAny*) + { + User::After(3000000); + RWsSession session; + User::LeaveIfError(session.Connect()); + //control down + TRawEvent rawEvent; + + rawEvent.Set(TRawEvent::EKeyDown,EStdKeyLeftCtrl); + session.SimulateRawEvent(rawEvent); + + // e down + rawEvent.Set(TRawEvent::EKeyDown,'E'); + session.SimulateRawEvent(rawEvent); + + // e up + rawEvent.Set(TRawEvent::EKeyUp,'E'); + session.SimulateRawEvent(rawEvent); + + //control up + rawEvent.Set(TRawEvent::EKeyUp,EStdKeyLeftCtrl); + session.SimulateRawEvent(rawEvent); + + session.Flush(); + + session.Close(); + + return KErrNone; + } + +void CT_ControlPanelTestStep::RemoveFilesFromCDrive() + { + TInt ret = iTestServ.SetReadOnly(KDESTRESOURCEPATH,0); //remove READ ONLY option + TEST(ret==KErrNone); + + TRAP(ret,iTestServ.DeleteFileL(KDESTRESOURCEPATH)); + TEST(ret==KErrNone); + } + + + +/** + Auxiliary Fn for Test Case ID T-ControlPanelStep-testControls1L, + T-ControlPanelStep-testControls2L, T-ControlPanelStep-testControls3L + + The method finds the index of control app_ctrl2.exe in the control list. + Depending on the Boolean value of argument aIsNewPath the search is + done on ROM / RAM.\n + +*/ + +TInt CT_ControlPanelTestStep::ControlIndexInList(CApaSystemControlList* aList, TBool aIsNewPath) + { + TFileName ctlPath=_L("Z:\\sys\\bin\\app_CTRL2.exe"); + TFileName newCtlPath=_L("c:\\sys\\bin\\app_ctrl2.exe"); + const TInt count = aList->Count(); + TInt retVal = KErrNotFound; + for(TInt ii = 0; ii < count; ++ii) + { + if(((aList->Control(ii)->FileName().CompareF(ctlPath)==0) && (!aIsNewPath)) || + ((aList->Control(ii)->FileName().CompareF(newCtlPath)==0) && (aIsNewPath))) + { + retVal = ii; + + + if(aList->Control(ii)->FileName().CompareF(ctlPath)==0) + { + INFO_PRINTF1(_L("***Found control on the z: drive")); + } + else + { + INFO_PRINTF1(_L("***Found control on the c: drive")); + } + break; + } + } + INFO_PRINTF2(_L("Out [%d] controlIndexInList"),retVal); + return retVal; + } + + +/** + @SYMTestCaseID T-ControlPanelStep-testControls1L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaSystemControlList::UpdateL(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Check the control list to find the number of controls in the + list and the number of updates to the list. Call UpdateL(). Check the list + again for no change in the count of controls and updates to the list.\n + API Calls:\n + CApaSystemControlList::UpdateL()\n + + @SYMTestExpectedResults Test confirms that there is no change in the control + list after updating. + */ +void CT_ControlPanelTestStep::testControls1L() + { + INFO_PRINTF1(_L("In testControls1L......")); + + iControlCount1 = iControlList->Count(); + TEST((iControlCount1>=1)); + + TEST((iControlList->UpdateCount()>=1));//update count returns 1 if new list + // + // do an update - there should be no changes + TInt ret; + INFO_PRINTF1(_L("Updating the list ......")); + TRAP(ret, iControlList->UpdateL()); + TEST(ret==KErrNone); + iControlCount2 = iControlList->Count(); + TEST(iControlCount2 == iControlCount1); + TEST((iControlList->UpdateCount()>=1)); + iIndex = ControlIndexInList(iControlList,EFalse); + TEST((iIndex >= 0) && (iIndex < iControlCount2)); + + INFO_PRINTF1(_L("Out testControls1L......")); + } + + +/** + @SYMTestCaseID T-ControlPanelStep-testControls2L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaSystemControlList::UpdateL() and UpdateCount(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Copy control from Z: drive to C: drive. Call UpdateL() to + update the control list. Check if UpdateL() has incremented iUpdateCount + by calling UpdateCount(). Check the filename of control to ensure that the + control copied to C: drive has been updated in the list. Delete the newly + copied control.\n + API Calls:\n + CApaSystemControlList::UpdateL()\n + CApaSystemControlList::UpdateCount()const\n + + @SYMTestExpectedResults The test shows updating of the copied control in control list. + */ + +void CT_ControlPanelTestStep::testControls2L() + { + INFO_PRINTF1(_L("In testControls2L......")); + + iTestServ.CreateDirectoryL(KRSCDIR); + iTestServ.CreateDirectoryL(KRSCREGDIR); + + TInt ret=iTestServ.CopyFileL(KSRCRESOURCEPATH,KDESTRESOURCEPATH); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Files Copied to C Drive......")); + INFO_PRINTF1(_L("Updating the list ......")); + iControlCount=iControlList->UpdateCount(); + while(iControlList->UpdateCount()<=iControlCount) + { + TRAP(ret, iControlList->UpdateL()); + if(ret!=KErrNone) + { + break; + } + User::After(100000); + } + + INFO_PRINTF2(_L("In testControls2L After Controllist update [%d]......"),ret); + TEST(ret==KErrNone); + iControlCount3 = iControlList->Count(); + TEST(iControlCount3 == iControlCount1); + TEST((iControlList->UpdateCount()>=2)); + iIndex = ControlIndexInList(iControlList,ETrue); + TEST((iIndex >= 0) && (iIndex < iControlCount3)); + + TFileName name=iControlList->Control(iIndex)->FileName(); + TEST(name.CompareF(KNEWCTLPATH)==0); + RemoveFilesFromCDrive(); + INFO_PRINTF1(_L("Removed the file from C Drive......")); + INFO_PRINTF1(_L("Updating the list ......")); + iControlCount=iControlList->UpdateCount(); + while(iControlList->UpdateCount()<=iControlCount) + { + TRAPD(ret, iControlList->UpdateL()); + if(ret!=KErrNone) + { + break; + } + User::After(100000); + } + INFO_PRINTF1(_L("Out testControls2L......")); + } + +/** + @SYMTestCaseID T-ControlPanelStep-testControls3L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaSystemControlList::Control() and CApaSystemControl APIs Type() and Caption(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Update the control list to ensure that the deleted control is + removed from the list and the control on the Z: Drive is added to the list. + Retrieve this control from the list using CApaSystemControlList::Control(). + Check the type and caption of the control calling Type() and Caption() methods.\n + API Calls:\n + CApaSystemControlList::Control(TInt aIndex)const\n + CApaSystemControl::Type()const\n + CApaSystemControl::Caption()const\n + + @SYMTestExpectedResults The test shows the addition of the control present on + Z: drive in control list. Test confirms the retrieved info on the control + obtained from the control list. + + */ +void CT_ControlPanelTestStep::testControls3L() + { + INFO_PRINTF1(_L("In testControls3L......")); + TFileName ctlPath=_L("Z:\\sys\\bin\\app_ctrl2.exe"); + TFileName ctlCaption=_L("app_ctrl2"); + // This method is called to close the panic dialog generated by previous test + CloseAllPanicWindowsL(); + + INFO_PRINTF1(_L("IN testControls3L Before Updating the list......")); + TRAPD(ret, iControlList->UpdateL()); + + TEST(ret==KErrNone); + const TInt controlCount4 = iControlList->Count(); + TEST(controlCount4 == iControlCount1); // no changes in the count + TEST((iControlList->UpdateCount()>=3)); + + iIndex = ControlIndexInList(iControlList,EFalse); + TEST((iIndex >= 0) && (iIndex < controlCount4)); + TEST(iControlList->Control(iIndex)->FileName().CompareF(ctlPath)==0); + + INFO_PRINTF1(_L("Testing CApaSystemControl")); + // + //get the control from the list and check it's type and caption + iControl=iControlList->Control(iIndex); + TEST(iControl!=NULL); + TFileName caption=iControl->Caption(); + TEST(caption.CompareF(ctlCaption)==0); + TEST(iControl->Icon()!=NULL); + + RThread thread; + TFullName name=_L("Control Panel Test"); + TInt r=thread.Create(name,SimulateKey,KDefaultStackSize,KDefaultStackSize,KDefaultStackSize,NULL); + TEST(r==KErrNone); + thread.Resume(); + + // run the control + TRAP(ret, iControl->CreateL()); // this call is synchronous + TEST(ret==KErrNone); + + thread.Close(); + INFO_PRINTF1(_L("Out testControls3L......")); + } + + + +/** + Auxiliary Fn for T-ControlPanelStep-testControls1L, T-ControlPanelStep-testControls2L, T-ControlPanelStep-testControls3L + + This method creates a control list by calling CApaSystemControlList::NewL() and + initiates subsequent tests on CApaSystemControlList and CApaSystemControl APIs. + + */ +void CT_ControlPanelTestStep::testControlsL() + { + INFO_PRINTF1(_L("Testing CApaSystemControlList")); + + //Create a session with F & B server + TInt ret=RFbsSession::Connect(); + TEST(!ret); + + TRAP(ret,iControlList=CApaSystemControlList::NewL(iFs)); + TEST(ret==KErrNone); + + TRAPD(err,testControls1L()); + TRAP(err,testControls2L()); + TRAP(err,testControls3L()); + + delete iControlList; + + //Close the session F & B server. + RFbsSession::Disconnect(); + } + + +/** + Auxiliary Fn for all Test Cases. + + This method creates and installs an active scheduler and puts the + test code on the scheduler as a CIdle object. The method initiates + all tests by calling the static method CT_ControlPanelTestCallBack::CallBack(). + +*/ +void CT_ControlPanelTestStep::DoStepTestsInCallbackL() + { + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + // put the test code onto the scheduler as an idle object + CIdle* idle=CIdle::NewL(-20); + CleanupStack::PushL(idle); + + CT_ControlPanelTestCallBack* callBack = new(ELeave) CT_ControlPanelTestCallBack(this); + CleanupStack::PushL(callBack); + + idle->Start(TCallBack(CT_ControlPanelTestCallBack::CallBack,callBack)); + // start the test code + CActiveScheduler::Start(); + + // all outstanding requests complete - kill the scheduler + CleanupStack::PopAndDestroy(3); //scheduler, callBack, idle + } + + + + +/** + Auxiliary Fn for all Test Cases. + + The method initiates all tests to be performed. + +*/ +void CT_ControlPanelTestStep::DoStepTests() + { + __UHEAP_MARK; + INFO_PRINTF1(_L("Test Controls......")); + TRAPD(r,testControlsL()); + TEST(r==KErrNone); + INFO_PRINTF1(KCompleted); + __UHEAP_MARKEND; + } + + +CT_ControlPanelTestStep::~CT_ControlPanelTestStep() +/** + Destructor + */ + { + } + +CT_ControlPanelTestStep::CT_ControlPanelTestStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_ControlPanelTest); + } + +TVerdict CT_ControlPanelTestStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_ControlPanelTestStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +TVerdict CT_ControlPanelTestStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual +*/ + { + INFO_PRINTF1(_L("Testing Apparc ...T_ControlPanel")); + + // set up the directory structure + User::LeaveIfError(iFs.Connect()); + + // connect to the test utils server + User::LeaveIfError(iTestServ.Connect()); + + // Run the tests...w + TRAPD(ret,DoStepTestsInCallbackL()) + TEST(ret==KErrNone); + + // Close everything + iFs.Close(); + iTestServ.Close(); + + INFO_PRINTF1(_L("T_ControlPanel Completed.")); + return TestStepResult(); + } + + +TInt CT_ControlPanelTestCallBack::CallBack(TAny* callBack /*aThis*/) +/** + This static method is the callback function of CIdle object. The method + calls the non-static method DoStepTests() which initiates all the tests. +*/ + { + + //Call Test Step func + + ((CT_ControlPanelTestCallBack *)callBack)->iTestStep->DoStepTests(); + + CActiveScheduler::Stop(); + return EFalse; // don't call back again + } + + +CT_ControlPanelTestCallBack::CT_ControlPanelTestCallBack(CT_ControlPanelTestStep* aTestStep) +/** + Constructor + */ + { + iTestStep = aTestStep; + } + +CT_ControlPanelTestCallBack::~CT_ControlPanelTestCallBack() +/** + Destructor + */ + { + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ControlPanelTest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ControlPanelTest.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,96 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +//#if (!defined __T_CONTROLPANEL_STEP_H) +//#define __T_CONTROLPANEL_STEP_H + +#ifndef __T_CONTROLPANEL_STEP_H +#define __T_CONTROLPANEL_STEP_H + +#include "ApparcTestServer.h" + +#include +#include "..\apparc\apadll.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "appfwk_test_utils.h" +#include "..\apserv\apsclsv.h" // so I can start the server + + +_LIT(KT_ControlPanelTest, "T_ControlPanelTest"); + +//! A CT_ControlPanelTestStep test class. +/*! +Tests Application Apparc base classes and utility functions.\n +*/ + +class CT_ControlPanelTestStep : public CTestStep + { +public: + CT_ControlPanelTestStep(); + ~CT_ControlPanelTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void DoStepTests(); + void DoStepTestsInCallbackL(); + void testControlsL(); + void loadDllL(); + void RemoveFilesFromCDrive(); + TInt ControlIndexInList(CApaSystemControlList* aList, TBool aIsNewPath); + void testControls1L(); + void testControls2L(); + void testControls3L(); +private: + RFs iFs; + CApaSystemControlList* iControlList; + CApaSystemControl* iControl; + TInt iControlCount; + TInt iControlCount1; + TInt iControlCount2; + TInt iControlCount3; + TInt iIndex; + RSmlTestUtils iTestServ; + }; + + +class CT_ControlPanelTestCallBack : public CBase + { +public: + CT_ControlPanelTestCallBack(CT_ControlPanelTestStep* aTestStep); + ~CT_ControlPanelTestCallBack(); + static TInt CallBack(TAny* /*aThis*/); + CT_ControlPanelTestStep* iTestStep; + +private: + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceA.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceA.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,91 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_DataMappingPersistenceA.h" + + +/** + * Constructor + */ +CT_DataMappingPersistenceATestStep::CT_DataMappingPersistenceATestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_DataMappingPersistenceAStep); + } + +/** + * Destructor + */ +CT_DataMappingPersistenceATestStep::~CT_DataMappingPersistenceATestStep() + { + iSession.Close(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_DataMappingPersistenceATestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + TInt error = iSession.Connect(); + TEST(error==KErrNone); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_DataMappingPersistenceATestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_DataMappingPersistenceATestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_DataMappingPersistenceA Test Cases Running...")); + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_DataMappingPersistenceA Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_DataMappingPersistenceATestStep::RunTestCasesL() + { + //DONT_CHECK since array in type store is uncompressed + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestInsertDataMappingL(), NO_CLEANUP); + + return KErrNone; + } + +void CT_DataMappingPersistenceATestStep::TestInsertDataMappingL() + { + TUid appUid = {0x10004c58}; + _LIT8(KLitMimeTypeData,"text/TestDataMappingPersistence"); + TDataType dataType (KLitMimeTypeData); + TInt error = iSession.InsertDataMapping(dataType,1,appUid); + TEST(error==KErrNone); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceA.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceA.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_DATAMAPPINGPERSISTENCEA_STEP_H__) +#define __T_DATAMAPPINGPERSISTENCEA_STEP_H__ + +#include "appfwk_test_AppUi.h" +#include "T_RApaLsSessionStep.h" + +_LIT(KT_DataMappingPersistenceAStep,"T_DataMappingPersistenceA"); + +class CT_DataMappingPersistenceATestStep : public CTestStep + { +public: + CT_DataMappingPersistenceATestStep(); + ~CT_DataMappingPersistenceATestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestInsertDataMappingL(); + +private: + RTestableApaLsSession iSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceB.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceB.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,95 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_DataMappingPersistenceB.h" + +/** + * Constructor + */ +CT_DataMappingPersistenceBTestStep::CT_DataMappingPersistenceBTestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_DataMappingPersistenceBStep); + } + +/** + * Destructor + */ +CT_DataMappingPersistenceBTestStep::~CT_DataMappingPersistenceBTestStep() + { + iSession.Close(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_DataMappingPersistenceBTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + TInt error = iSession.Connect(); + TEST(error==KErrNone); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_DataMappingPersistenceBTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_DataMappingPersistenceBTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_DataMappingPersistenceB Test Cases Running...")); + + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_DataMappingPersistenceB Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_DataMappingPersistenceBTestStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iSession, 0, 0, TestDeleteDataMappingL() , NO_CLEANUP); + + return KErrNone; + } + +void CT_DataMappingPersistenceBTestStep::TestDeleteDataMappingL() + { + TUid appUid = {0x10004c58}; + _LIT8(KLitMimeTypeData,"text/TestDataMappingPersistence"); + TDataType dataType (KLitMimeTypeData); + TUid retAppUid; + TInt error = iSession.AppForDataType(dataType,retAppUid); + TEST(error==KErrNone); + TEST(appUid == retAppUid); + error = iSession.DeleteDataMapping(dataType); + TEST(error==KErrNone); + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceB.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceB.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_DATAMAPPINGPERSISTENCEB_STEP_H__) +#define __T_DATAMAPPINGPERSISTENCEB_STEP_H__ + +#include "appfwk_test_AppUi.h" +#include "T_RApaLsSessionStep.h" + +_LIT(KT_DataMappingPersistenceBStep,"T_DataMappingPersistenceB"); + +class CT_DataMappingPersistenceBTestStep : public CTestStep + { +public: + CT_DataMappingPersistenceBTestStep(); + ~CT_DataMappingPersistenceBTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestDeleteDataMappingL(); + +private: + RTestableApaLsSession iSession; + + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceC.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceC.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,94 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include "T_DataMappingPersistenceC.h" + + + +/** + * Constructor + */ +CT_DataMappingPersistenceCTestStep::CT_DataMappingPersistenceCTestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_DataMappingPersistenceCStep); + } + +/** + * Destructor + */ +CT_DataMappingPersistenceCTestStep::~CT_DataMappingPersistenceCTestStep() + { + iSession.Close(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_DataMappingPersistenceCTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + TInt error = iSession.Connect(); + TEST(error==KErrNone); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_DataMappingPersistenceCTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_DataMappingPersistenceCTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_DataMappingPersistenceC Test Cases Running...")); + + TRAPD(ret,RunTestCasesL()); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_DataMappingPersistenceC Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_DataMappingPersistenceCTestStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iSession, 0, 0, TestCheckDeleteDataMappingL(), NO_CLEANUP); + + return KErrNone; + } + +void CT_DataMappingPersistenceCTestStep::TestCheckDeleteDataMappingL() + { + TUid appUid = {0x10004c58}; + _LIT8(KLitMimeTypeData,"text/TestDataMappingPersistence"); + TDataType dataType (KLitMimeTypeData); + TUid retAppUid; + TInt error = iSession.AppForDataType(dataType,retAppUid); + TEST(error==KErrNone); + TEST(appUid != retAppUid); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceC.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataMappingPersistenceC.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_DATAMAPPINGPERSISTENCEC_STEP_H__) +#define __T_DATAMAPPINGPERSISTENCEC_STEP_H__ + +#include "appfwk_test_AppUi.h" +#include "T_RApaLsSessionStep.h" + +_LIT(KT_DataMappingPersistenceCStep,"T_DataMappingPersistenceC"); + +class CT_DataMappingPersistenceCTestStep : public CTestStep + { +public: + CT_DataMappingPersistenceCTestStep(); + ~CT_DataMappingPersistenceCTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestCheckDeleteDataMappingL(); + +private: + RTestableApaLsSession iSession; + + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,25 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +GLDEF_C TInt E32Main() +/** + EXE Entry Point + @return - Standard Epoc error code on exit + */ + { + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,64 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// T_DataPrioritySystem1.EXE Test application for checking system prioirty for +// datatype handlers +// +// + + + +/** + @file +*/ + +TARGETPATH /sys/bin +target T_DataPrioritySystem1.EXE +targettype EXE + + +UID 0x1000007a 0x10207f7b + +VENDORID 0x70000001 + +CAPABILITY WriteDeviceData + +SYSTEMINCLUDE /EPOC32/INCLUDE + +systeminclude /epoc32/include/test + + +SOURCEPATH . +source T_DataPrioritySystem1.CPP + +USERINCLUDE . +USERINCLUDE .. + + +start resource T_DataPrioritySystem1_reg.rss +targetpath /private/10003A3F/apps +end + +start resource T_DataPrioritySystem1_loc.rss +targetpath /resource/apps +end + +LIBRARY CONE.LIB WS32.LIB +LIBRARY APPFWK_TEST_APPUI.LIB +LIBRARY EUSER.LIB +LIBRARY TESTEXECUTEUTILS.LIB TestExecuteLogClient.LIB +LIBRARY APPARC.LIB EFSRV.LIB ESTOR.LIB GDI.LIB FBSCLI.LIB +LIBRARY APFILE.LIB APGRFX.LIB BAFL.LIB APMIME.LIB +LIBRARY EIKCORE.LIB +LIBRARY APSERV.LIB +LIBRARY ECOM.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + short_caption = "T_DataPrioritySystem1"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_DataPrioritySystem1"; + number_of_icons = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem1/T_DataPrioritySystem1_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f7b + +RESOURCE APP_REGISTRATION_INFO + { + app_file="T_DataPrioritySystem1"; + localisable_resource_file="\\resource\\apps\\T_DataPrioritySystem1_loc"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + service_list = + { + SERVICE_INFO + { + uid = 0x10207f7d; + datatype_list = + { + DATATYPE { priority=0xFFF9; type="text/custom1"; } + }; + opaque_data = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,25 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +GLDEF_C TInt E32Main() +/** + EXE Entry Point + @return - Standard Epoc error code on exit + */ + { + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,63 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// T_DataPrioritySystem2.EXE Test application for checking system prioirty for +// datatype handlers +// +// + + + +/** + @file +*/ + +TARGETPATH /sys/bin +target T_DataPrioritySystem2.EXE +targettype EXE + + +UID 0x1000007a 0x10207f7c + +VENDORID 0x70000001 + +CAPABILITY None + +SYSTEMINCLUDE /EPOC32/INCLUDE + +systeminclude /epoc32/include/test + + +SOURCEPATH . +source T_DataPrioritySystem2.CPP + +USERINCLUDE . +USERINCLUDE .. + +start resource T_DataPrioritySystem2_reg.rss +targetpath /private/10003A3F/apps +end + +start resource T_DataPrioritySystem2_loc.rss +targetpath /resource/apps +end + +LIBRARY CONE.LIB WS32.LIB +LIBRARY APPFWK_TEST_APPUI.LIB +LIBRARY EUSER.LIB +LIBRARY TESTEXECUTEUTILS.LIB TestExecuteLogClient.LIB +LIBRARY APPARC.LIB EFSRV.LIB ESTOR.LIB GDI.LIB FBSCLI.LIB +LIBRARY APFILE.LIB APGRFX.LIB BAFL.LIB APMIME.LIB +LIBRARY EIKCORE.LIB +LIBRARY APSERV.LIB +LIBRARY ECOM.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + short_caption = "T_DataPrioritySystem2"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_DataPrioritySystem2"; + number_of_icons = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem2/T_DataPrioritySystem2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f7c + +RESOURCE APP_REGISTRATION_INFO + { + app_file="T_DataPrioritySystem2"; + localisable_resource_file="\\resource\\apps\\T_DataPrioritySystem2_loc"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + service_list = + { + SERVICE_INFO + { + uid = 0x10207f7e; + datatype_list = + { + DATATYPE { priority=0xFFF9; type="text/custom1"; } + }; + opaque_data = 0; + } + }; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem3_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataPrioritySystem3_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,51 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f7f + +RESOURCE APP_REGISTRATION_INFO + { + app_file="T_DataPrioritySystem3"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + service_list = + { + SERVICE_INFO + { + uid = 0x10207f7d; + datatype_list = + { + DATATYPE { priority=EDataTypePriorityHigh; type="text/custom1"; } + }; + opaque_data = 0; + }, + SERVICE_INFO + { + uid = 0x10207f7e; + datatype_list = + { + DATATYPE { priority=EDataTypePriorityHigh; type="text/custom1"; } + }; + opaque_data = 0; + } + + }; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataTypeMappingWithSid1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataTypeMappingWithSid1.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,136 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether untrusted applications +// are able to override MIME types mappings using InsertDataMappingIfHigher API. +// It is to ensure that priority checking mechanism (downgrading priority of +// untrusted apps) works as was designed. +// +// + + + +/** + @file T_DataTypeMappingWithSid1.cpp + @internalComponent - Internal Symbian test code +*/ + +#include "T_DataTypeMappingWithSid1.h" +#include "tstapp.h" +#include "testableapalssession.h" +#include + +/** + @SYMTestCaseID APPFWK-APPARC-0036 + + @SYMPREQ Policing server apis + + @SYMTestCaseDesc Testing whether untrusted applications are able to override MIME types mapping + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions To connect to RApaLsSession and try to register trusted and untrusted apps for mime types. + @SYMTestExpectedResults Test should complete without any panic. + + */ +void CT_DataTypeMappingWithSid1::ExecuteL(RApaLsSession& aLs) + { + TInt ret; + TBool added=EFalse; + _LIT8(KLitAudioFake, "audio/fakedata"); + + TDataType dataType( KLitAudioFake ); + + TUid trustedAppUid = {0x10207f8f}; + TUid untrustedAppUid = {0xA3010010}; + TUid retAppUid( KNullUid ); + + ret=aLs.InsertDataMapping(dataType, KDataTypePriorityHigh, trustedAppUid); + INFO_PRINTF1(_L("Trusted app sets a MimeType mapping: InsertDataMapping with PriorityHigh")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + ret = aLs.AppForDataType(dataType,retAppUid); + INFO_PRINTF3(_L("Testing SID: Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + INFO_PRINTF3(_L("Expected SID: %d, Actual SID value: %d"), trustedAppUid, retAppUid); + TEST(retAppUid == trustedAppUid); + + ret=aLs.InsertDataMappingIfHigher(dataType, KDataTypePriorityTrustedHigh, untrustedAppUid, added); + INFO_PRINTF1(_L("UnTrusted app sets a MimeType mapping: InsertDataMapping with PriorityTrustedHigh")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + ret = aLs.AppForDataType(dataType,retAppUid); + INFO_PRINTF3(_L("Testing SID: Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + INFO_PRINTF3(_L("Expected SID: %d, Actual SID value: %d"), untrustedAppUid, retAppUid); + TEST(retAppUid == untrustedAppUid); + + ret=aLs.InsertDataMappingIfHigher(dataType, KDataTypePriorityTrustedHigh, trustedAppUid, added); + INFO_PRINTF1(_L("Trusted app sets a MimeType mapping: InsertDataMapping with PriorityTrustedHigh")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + ret = aLs.AppForDataType(dataType,retAppUid); + INFO_PRINTF3(_L("Testing SID: Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + INFO_PRINTF3(_L("Expected SID: %d, Actual SID value: %d"), trustedAppUid, retAppUid); + TEST(retAppUid == trustedAppUid); + + ret=aLs.InsertDataMappingIfHigher(dataType, KDataTypePriorityTrustedHigh+1, untrustedAppUid, added); + INFO_PRINTF1(_L("UnTrusted app sets a MimeType mapping: InsertDataMapping with KDataTypePriorityTrustedHigh+1")); + INFO_PRINTF3(_L("Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + ret = aLs.AppForDataType(dataType,retAppUid); + INFO_PRINTF3(_L("Testing SID: Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + INFO_PRINTF3(_L("Expected SID: %d, Actual SID value: %d"), trustedAppUid, retAppUid); + TEST(retAppUid == trustedAppUid); + + //delete data type mapping + ret=aLs.DeleteDataMapping(dataType); + INFO_PRINTF3(_L("Deleting data mapping: Expected return code: %d, Actual return code: %d"), KErrNone, ret); + TEST(ret==KErrNone); + } + +CT_DataTypeMappingWithSid1::CT_DataTypeMappingWithSid1() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_DataTypeMappingWithSid1); + } + +CT_DataTypeMappingWithSid1::~CT_DataTypeMappingWithSid1() + { + } + +TVerdict CT_DataTypeMappingWithSid1::doTestStepL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0036: DataTypeMappingWithSid1 - Started")); + + RTestableApaLsSession apaLsSession; + TEST(apaLsSession.Connect()==KErrNone); + CleanupClosePushL(apaLsSession); + + //DONT_CHECK since array in type store is uncompressed + HEAP_TEST_LS_SESSION(apaLsSession, 0, DONT_CHECK, ExecuteL(apaLsSession), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&apaLsSession); + + + INFO_PRINTF1(_L("APPFWK-APPARC-0036: DataTypeMappingWithSid1 - Finished")); + + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataTypeMappingWithSid1.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_DataTypeMappingWithSid1.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether untrusted applications +// are able to override MIME types mappings using InsertDataMappingIfHigher API. +// It is to ensure that priority checking mechanism (downgrading priority of +// untrusted apps) works as was designed. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__T_DATATYPEMAPPINGWITHSID1_H__) +#define __T_DATATYPEMAPPINGWITHSID1_H__ + +#include "ApparcTestServer.h" +#include "appfwk_test_AppUi.h" + +class RApaLsSession; + +//! CT_DataTypeMappingWithSid1 +/** + This class is used to test priority checks in InsertDataMappingIfHigher API +*/ +class CT_DataTypeMappingWithSid1 : public CTestStep + { +public: + CT_DataTypeMappingWithSid1(); + virtual TVerdict doTestStepL(); + void ExecuteL(RApaLsSession& aLs); +private: + ~CT_DataTypeMappingWithSid1(); +private: + }; + +_LIT(KT_DataTypeMappingWithSid1, "T_DataTypeMappingWithSid1"); + +#endif // __T_DATATYPEMAPPINGWITHSID1_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EndTaskStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EndTaskStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,289 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test cases test the funtionality of RuleBased plugins framework. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +#include +#include "T_EndTaskStep.h" +#include "TEndTaskTestApp\EndTaskTestAppExternalInterface.h" + +CTEndTaskStep::CTEndTaskStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_EndTaskStep); + } + +CTEndTaskStep::~CTEndTaskStep() + { + } + +void CTEndTaskStep::ExecuteL() + { + RApaLsSession theLs; + User::LeaveIfError(theLs.Connect()); + CleanupClosePushL(theLs); + + User::LeaveIfError(iWs.Connect()); + CleanupClosePushL(iWs); + + EndTaskTest1L(theLs); + EndTaskTest2L(theLs); + EndTaskTest3L(theLs); + + CleanupStack::PopAndDestroy(); //iWs.Close(); + CleanupStack::PopAndDestroy(&theLs); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0057 + +@SYMDEF PDEF092171 + +@SYMTestCaseDesc Test case for defect "TApaTask::EndTask() allows any application kill any task" + +@SYMTestPriority High + +@SYMTestStatus Implemented + +@SYMTestActions Launch and close both a standard and a system application using TApaTask::EndTask(). + +@SYMTestExpectedResults The app should be launched and closed accordingly +*/ +void CTEndTaskStep::EndTaskTest1L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 1 started")); + + // Launch App + const TUid appUid = {KUidEndTaskAppUid}; + TEST(KErrNone == LaunchAppL(aLs, appUid)); + + // Get a handle to App + TApaTaskList taskList(iWs); + TApaTask task1 = taskList.FindApp(appUid); + TEST(task1.Exists()); + + // Close it + task1.EndTask(); + User::After(500000); + TApaTask refresh1 = taskList.FindApp(appUid); + TEST(!refresh1.Exists()); + + // + // Now do the same again but with a system app + // + + // Launch App + TEST(KErrNone == LaunchAppL(aLs, appUid)); + + // Get a handle to App + TApaTask task2 = taskList.FindApp(appUid); + TEST(task2.Exists()); + + // Mark as a system app + TWsEvent event; + event.SetType(EEndTaskTestAppSetSystem); + iWs.SendEventToWindowGroup(task2.WgId(), event); + + // Close it + task2.EndTask(); + User::After(500000); + TApaTask refresh2 = taskList.FindApp(appUid); + TEST(!refresh2.Exists()); + + INFO_PRINTF1(_L("Test case 1 finished")); + } + + +/** +@SYMTestCaseID APPFWK-APPARC-0058 + +@SYMDEF PDEF092171 + +@SYMTestCaseDesc Test case for defect "TApaTask::EndTask() allows any application kill any task" + +@SYMTestPriority High + +@SYMTestStatus Implemented + +@SYMTestActions Try to close a systemapp from a process that do not have PwrMgmt + +@SYMTestExpectedResults The app should be closed accordingly +*/ +void CTEndTaskStep::EndTaskTest2L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 2 started")); + + // Launch App + const TUid appUid = {KUidEndTaskAppUid}; + TEST(KErrNone == LaunchAppL(aLs, appUid)); + + // Get a handle to App + TApaTaskList taskList(iWs); + TApaTask task = taskList.FindApp(appUid); + TEST(task.Exists()); + + // Mark as a system task + TWsEvent event; + event.SetType(EEndTaskTestAppSetSystem); + iWs.SendEventToWindowGroup(task.WgId(), event); + + // Call TApaTask::EndTask() on the systemtask from an arbitrary process which don't have PwrMgmt + event.SetType(ECallEndTaskWithoutPwrMgmt); + APPFWK_NEGATIVE_PLATSEC_START; + iWs.SendEventToWindowGroup(task.WgId(), event); + APPFWK_NEGATIVE_PLATSEC_FINISH; + User::After(500000); + TApaTask refresh = taskList.FindApp(appUid); + TEST(refresh.Exists()); // application should have stayed open + + // Close app from this process (which do have PwrMgmt) + task.EndTask(); + User::After(500000); + TApaTask refresh2 = taskList.FindApp(appUid); + TEST(!refresh2.Exists()); + + INFO_PRINTF1(_L("Test case 2 finished")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0059 + +@SYMDEF PDEF092171 + +@SYMTestCaseDesc Test case for defect "TApaTask::EndTask() allows any application kill any task" + +@SYMTestPriority High + +@SYMTestStatus Implemented + +@SYMTestActions Launch and close application using wserv APIs (way of faking new secure close-message) + +@SYMTestExpectedResults This test should pass if the process doesn't have PowerMgmt +*/ +void CTEndTaskStep::EndTaskTest3L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 3 started")); + + // Launch App + const TUid appUid = {KUidEndTaskAppUid}; + TEST(KErrNone == LaunchAppL(aLs, appUid)); + + // Get a handle to App + TApaTaskList taskList(iWs); + TApaTask task = taskList.FindApp(appUid); + TEST(task.Exists()); + + // Mark as a system app + TWsEvent event; + event.SetType(EEndTaskTestAppSetSystem); + iWs.SendEventToWindowGroup(task.WgId(), event); + + // First variant should be sorted by CCoeAppUi::HandleWsEventL + event.SetType(ESimulateHackerAttack1); + iWs.SendEventToWindowGroup(task.WgId(), event); + User::After(500000); + TApaTask refresh = taskList.FindApp(appUid); + TEST(refresh.Exists()); + + if(refresh.Exists()) + { + // Second variant should be handled by wserv's Client::CommandL + event.SetType(ESimulateHackerAttack2); + APPFWK_NEGATIVE_PLATSEC_START; + iWs.SendEventToWindowGroup(task.WgId(), event); + APPFWK_NEGATIVE_PLATSEC_FINISH; + User::After(500000); + TApaTask refresh2 = taskList.FindApp(appUid); + TEST(refresh2.Exists()); + + if(refresh2.Exists()) + { + // Third variant should also be handled by wserv's Client::CommandL in another switch-case + event.SetType(ESimulateHackerAttack3); + APPFWK_NEGATIVE_PLATSEC_START; + iWs.SendEventToWindowGroup(task.WgId(), event); + APPFWK_NEGATIVE_PLATSEC_FINISH; + User::After(500000); + TApaTask refresh3 = taskList.FindApp(appUid); + TEST(refresh3.Exists()); + + if(refresh3.Exists()) + { + // Remove system property + event.SetType(EEndTaskTestAppSetNormal); + iWs.SendEventToWindowGroup(task.WgId(), event); + + // Close app + task.EndTask(); + User::After(500000); + TApaTask refresh5 = taskList.FindApp(appUid); + TEST(!refresh5.Exists()); + } + } + } + + INFO_PRINTF1(_L("Test case 3 finished")); + } + +/** +The function is used to launch an app whose UID is supplied as its second input parameter. +The function returns KErrNone upon success, KErrGeneral otherwise. +*/ +TInt CTEndTaskStep::LaunchAppL(RApaLsSession& aLs, const TUid& aAppUid) + { + TApaAppInfo info; + TFileName fileName; + User::LeaveIfError(aLs.GetAppInfo(info, aAppUid)); + + //Wait 1 sec for function to complete + User::After(1000000); + fileName = info.iFullName; + CApaCommandLine* cmdLn = CApaCommandLine::NewLC(); + cmdLn->SetDocumentNameL(KNullDesC); //need to start without resource file + cmdLn->SetExecutableNameL(fileName); + TInt result = aLs.StartApp(*cmdLn); + //Wait 1 sec for App to start + User::After(1000000); + CleanupStack::PopAndDestroy(cmdLn); + return result; + } + +TVerdict CTEndTaskStep::doTestStepL() + { + INFO_PRINTF1(_L("TEndTaskStep test started....")); + + __UHEAP_MARK; + TRAPD(err, ExecuteL()); + if(err != KErrNone) + { + INFO_PRINTF2(_L("execute tests ended with return value '%d'"), err); + TEST(EFalse); + } + __UHEAP_MARKEND; + + INFO_PRINTF1(_L(".... TEndTaskStep test finished!!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EndTaskStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EndTaskStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__T_ENDTASK_STEP_H__) +#define __T_ENDTASK_STEP_H__ + +#include +#include "appfwk_test_appui.h" +#include + +class CTEndTaskStep : public CTestStep + { +public: + CTEndTaskStep(); + virtual TVerdict doTestStepL(); + void ExecuteL(); +private: + ~CTEndTaskStep(); + void EndTaskTest1L(RApaLsSession& aLs); + void EndTaskTest2L(RApaLsSession& aLs); + void EndTaskTest3L(RApaLsSession& aLs); + TInt LaunchAppL(RApaLsSession& aLs, const TUid& aAppUid); +private: + RWsSession iWs; + }; + +_LIT(KT_EndTaskStep,"T_EndTask"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,138 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test Application for verification of environment slots\n +// Calls the EnvironmentSlotsReaderL function and verfies the CApaCommandLine object returned \n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include "T_EnvSlots.H" + +/** + + Application invoked as part of CommandLine tests + + @SYMPREQ 280 File Handle Support + + FunctionDesc Tests Environment slots . + Acquires a Mutex for log file access + Invokes EnvironmentSlotsReaderL() which returns an CApaCommandLine Object + Verifies the values returned by the GET APIs of CApaCommandLine object with those of predefined values + Writes "Pass" to the logfile if verification passes else "Fail" is written. + + */ +void testEnvironmentSlotsL() + { + + TPtrC appName; + TPtrC docName; + TApaCommand command = EApaCommandOpen; + TBool testResult = PASS; + + + //Get the Mutex to access the log file + RMutex fileAccess; + fileAccess.OpenGlobal(KTLogFileAccess); + fileAccess.Wait(); + + /** Invoke EnvironmenstSlotsReaderL() function which would constuct the CApaCommandLine class object + from the environment slots and return the pointer to that object */ + //CApaCommandLine* cmdLine = CApaCommandLine::EnvironmentSlotsReaderL(); + + //Method CApaCommandLine::EnvironmentSlotsReaderL has been implemented in a different fashion + CApaCommandLine* cmdLine; + CApaCommandLine::GetCommandLineFromProcessEnvironment(cmdLine); + + CleanupStack::PushL(cmdLine); + + appName.Set(KTAppName); + docName.Set(KTDocName); + + RFs fSession; + fSession.Connect(); + RFile logFile; + TBufC testFilePath(KFilePath); + + //Open the Log file in Write Mode + User::LeaveIfError(logFile.Replace(fSession,testFilePath,EFileWrite)); + + // Compare the values returned by GET APIs with pre defined values + TESTCOND(appName,cmdLine->ExecutableName()); + + if(appName != cmdLine->ExecutableName()) + { + logFile.Write(KTFail); + logFile.Write(KTApp); + } + + TESTCOND(docName,cmdLine->DocumentName()); + if(docName != cmdLine->DocumentName()) + { + logFile.Write(KTFail); + logFile.Write(KTDoc); + } + + TESTCOND(command,cmdLine->Command()); + + if(command != cmdLine->Command()) + { + logFile.Write(KTFail); + logFile.Write(KTCommand); + } + + if(testResult == PASS) + { + logFile.Write(KTPass); + } + + + //Close the file and the file session + logFile.Close(); + fSession.Close(); + + //Signal the Mutex + fileAccess.Signal(); + CleanupStack::PopAndDestroy(cmdLine); + + } + + +GLDEF_C TInt E32Main() +/** + EXE Entry Point + @return - Standard Epoc error code on exit + */ + { + + __UHEAP_MARK; + + CTrapCleanup* cleanupStack = CTrapCleanup::New(); + + TRAPD(error,testEnvironmentSlotsL()); + + __ASSERT_ALWAYS(!error,User::Panic(KTEnvSlots,error)); + + delete cleanupStack; + + __UHEAP_MARKEND; + + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,68 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Header File for the test application for environment slots verification +// Declares literals and macros used in T_EnvSlots.CPP .\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_ENVSLOTS_H__ +#define __T_ENVSLOTS_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ApparcTestServer.h" +#include "appfwk_test_AppUi.h" + + +//! A Environment slots reader test class. + +/** + Test Environment slots of the process. +*/ + +_LIT(KTLogFileAccess,"TestLogFile"); +_LIT(KFilePath,"c:\\logs\\TestExecute\\EnvSlots.txt"); +_LIT(KTAppName,"Z:\\sys\\bin\\T_EnvSlots.exe"); +_LIT(KTDocName,"C:\\System\\data\\temp.test"); +_LIT(KTEnvSlots,"T_EnvSlots"); + +_LIT8(KTPass,"TestPass"); +_LIT8(KTFail,"TestFail"); +_LIT8(KTApp,"ApplName"); +_LIT8(KTDoc,"DocuName"); +_LIT8(KTCommand,"ECommand"); + +const TInt PASS = 1; +const TInt FAIL = 0; + +#define TESTCOND(a,b) if(a != b) \ +{\ + testResult = FAIL;\ +}\ + +const TInt KMaxFilePath=50; +#endif //__T_ENVSLOTS_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,62 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// T_EnvSlots.EXE Test application for environment slots verification +// +// + + + +/** + @file +*/ + +TARGETPATH /sys/bin +target T_EnvSlots.EXE +targettype EXE + + +UID 0x1000007a 0x102032AB +VENDORID 0x70000001 + +CAPABILITY All -Tcb + +SYSTEMINCLUDE /EPOC32/INCLUDE + +systeminclude /epoc32/include/test + + +SOURCEPATH . +source T_EnvSlots.CPP + +USERINCLUDE . +USERINCLUDE .. + + +start resource T_EnvSlots_reg.rss +targetpath /private/10003A3F/apps +end + +start resource T_EnvSlots_loc.rss +targetpath /resource/apps +end + +LIBRARY CONE.LIB WS32.LIB +LIBRARY APPFWK_TEST_APPUI.LIB +LIBRARY EUSER.LIB +LIBRARY TESTEXECUTEUTILS.LIB TestExecuteLogClient.LIB +LIBRARY APPARC.LIB EFSRV.LIB ESTOR.LIB GDI.LIB FBSCLI.LIB +LIBRARY APFILE.LIB APGRFX.LIB BAFL.LIB APMIME.LIB +LIBRARY EIKCORE.LIB +LIBRARY APSERV.LIB +LIBRARY ECOM.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file t_envslots_loc.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + short_caption = "T_EnvSlots"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_EnvSlots"; + number_of_icons = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_EnvSlots/T_EnvSlots_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file t_envslots_reg.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x102032AB + +RESOURCE APP_REGISTRATION_INFO + { + app_file="T_EnvSlots"; + localisable_resource_file="\\resource\\apps\\T_EnvSlots_loc"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ExeStep.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ExeStep.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,111 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include "T_ExeStep.h" + +/** + Auxiliary Fn for Test Case ID T-ExeStep-doTestStepL + + This function accepts the data passed to the thread function and prints it. + +*/ +void CT_ExeStep::DoThings(const TApaCommandLine& aCommandLine) + { + INFO_PRINTF1(_L("The test exe has been loaded.")); + INFO_PRINTF1(_L("\n")); + INFO_PRINTF1(aCommandLine); + INFO_PRINTF1(_L("\n")); + } + +CT_ExeStep::~CT_ExeStep() +/** + Destructor + */ + { + } + +CT_ExeStep::CT_ExeStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_ExeStep); + } + +TVerdict CT_ExeStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_ExeStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +/** + @SYMTestCaseID T-ExeStep-doTestStepL + + @SYMPREQ + + @SYMTestCaseDesc Test retrieving data from main thread of a process. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates a new process by calling the constructor of + RProcess. Call RProcess::CommandLine() to get a copy of data which is + passed to the thread function of the newly created process's main thread. + Pass the data thus copied to method DoThings() to print the information.\n + API Calls:\n + RProcess::CommandLine(TDes& aCommand) const + + @SYMTestExpectedResults Test should create a new process and copy data from + main thread of newly created process. + + */ +TVerdict CT_ExeStep::doTestStepL() +{ + __UHEAP_MARK; + TApaCommandLine commandline; + User::CommandLine(commandline); + DoThings(commandline); + __UHEAP_MARKEND; + + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ExeStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ExeStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,46 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_EXE_STEP_H__) +#define __T_EXE_STEP_H__ + +#include "ApparcTestServer.h" + +//! A CT_ExeStep test class. + +/** Tests Retrieving data from main thread. */ + +class CT_ExeStep : public CTestStep + { +public: + CT_ExeStep(); + ~CT_ExeStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); +//private: + void DoThings(const TApaCommandLine& aCommandLine); + }; + +_LIT(KT_ExeStep,"T_Exe"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File1Step.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File1Step.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,172 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests CApaScanningFileRecognizer APIs. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tstapp.h" +#include "T_File1Step.h" + +// +#if !defined(__E32TEST_H__) +#include +#endif + +const TUid KTestEcomFileRecognizerUid={0x101F7D8C}; + +void CT_File1Step::setup() + { +#if defined(__EPOC32__) + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + TFullName tempPath=_L("c:\\system\\temp\\"); + // if we're on the rack create the directories we need + TParse parser; + parser.Set(filePath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); + parser.Set(tempPath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); +#endif + } + +/** + @SYMTestCaseID T-FileStep-testScanningFileTheRecognizerL + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The method creates a scanning file recognizer object and observes whether + return values from RecognizerCount() and UpdateCounter() match with the + expected results. The setter function SetRecognizerL() is also tested with a recognizer + that doesn't exist to check if it would return KErrNotFound.\n + API Calls:\n + CApaScanningFileRecognizer::NewL(RFs& aFs, MApaAppStarter* aAppStarter)\n + CApaScanningFileRecognizer::RecognizerCount()\n + CApaScanningFileRecognizer::UpdateCounter()\n + CApaScanningFileRecognizer::SetRecognizerL(const TRecognizer& aRecognizer)\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +void CT_File1Step::testScanningFileTheRecognizerL() + { + INFO_PRINTF1(_L("Testing the Scanning File-Recognizer")); + // + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler(); + CleanupStack::PushL(scheduler); + CActiveScheduler::Install(scheduler); + // + // construct - this scans for iRecognizer plug-ins + TRAPD(ret, iRecognizer=CApaScanningFileRecognizer::NewL(iFs,NULL)); + TEST(ret==KErrNone); + // 06/09/99 SimonC: following tests updated as they'll fail when run with a baseline build + TEST(iRecognizer->RecognizerCount()>=2); + TEST(iRecognizer->UpdateCounter()>=2); + + //for testing ecom style plugin + INFO_PRINTF1(_L("Testing the ecom style TTESTECOMFILEREC recognizer is loaded or not")); + CApaScanningFileRecognizer::TRecognizer testEcomFileRec; + testEcomFileRec.iUid=KTestEcomFileRecognizerUid; + testEcomFileRec.iDrive=25; + TRAP(ret,iRecognizer->SetEcomRecognizerL(testEcomFileRec)); + TEST(ret==KErrNone); + TEST(iRecognizer->UpdateCounter()>=2); + + INFO_PRINTF1(_L("Wait a couple of seconds to stop dlls closing too early...")); // stop the dll's being closed too early + User::After(2000000); + + delete iRecognizer; + CleanupStack::PopAndDestroy(scheduler); + } + +CT_File1Step::~CT_File1Step() +/** + Destructor + */ + { + } + +CT_File1Step::CT_File1Step() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_File1Step); + } + +TVerdict CT_File1Step::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_File1Step::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + +TVerdict CT_File1Step::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual +*/ + { + INFO_PRINTF1(_L("Testing the APFILE dll...")); + // + // set up the directory structure + iFs.Connect(); + setup(); + // + // run the testcode (inside an alloc heaven harness) + + __UHEAP_MARK; + TRAPD(r,testScanningFileTheRecognizerL()); + TEST(r==KErrNone); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + iFs.Close(); + + INFO_PRINTF1(_L("Test completed!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File1Step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File1Step.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_FILE1_STEP_H__) +#define __T_FILE1_STEP_H__ +#include "ApparcTestServer.h" + +class CApaScanningFileRecognizer; + +//! A CT_File1Step test class. + +/** A more elaborate class description. */ + +class CT_File1Step : public CTestStep + { +public: + CT_File1Step(); + ~CT_File1Step(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void testScanningFileTheRecognizerL(); + void setup(); +private: + RFs iFs; + CApaScanningFileRecognizer* iRecognizer; + }; + +_LIT(KT_File1Step,"T_File1"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File2Step.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File2Step.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,133 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests CApaAppRegFinder APIs. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_File2Step.h" +#include "..\apfile\aprfndr.h" + +// +#if !defined(__E32TEST_H__) +#include +#endif + +/** + @SYMTestCaseID T-FileStep-testFindAllAppsRegL + + @SYMPREQ + + @SYMTestCaseDesc Test CApaAppRegFinder::FindAllAppsL() API. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The method creates an Application Finder object and calls + CApaAppRegFinder::FindAllAppsL() to perform a complete scan of all + available applications. It traverses through the application list by calling + CApaAppRegFinder::NextL() to confirm that the list contains entries.\n + API Calls:\n + CApaAppRegFinder::FindAllAppsL()\n + + @SYMTestExpectedResults Test checks the number of applications present in the list. + + */ +void CT_File2Step::testFindAllAppsRegL() + { + INFO_PRINTF1(_L("Testing CApaAppRegFinder::FindAllAppsL()")); + RFs fSession; + fSession.Connect(); + CApaAppRegFinder* regFinder=CApaAppRegFinder::NewL(fSession); + // + TRAPD(ret, regFinder->FindAllAppsL() ); + TEST(ret==KErrNone); + // + TBool more=ETrue; + TInt count=0; + while (more) + { + TApaAppEntry entry; + RPointerArray dummy; + TRAPD(ret, more=regFinder->NextL(entry, dummy) ); + TEST(ret==KErrNone); + if (more) + count++; + } + TEST(count>0); + INFO_PRINTF2(_L(" Apps found: %D"),count); + // + delete regFinder; + fSession.Close(); + } + +CT_File2Step::~CT_File2Step() +/** + Destructor + */ + { + } + +CT_File2Step::CT_File2Step() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_File2Step); + } + +TVerdict CT_File2Step::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_File2Step::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + +TVerdict CT_File2Step::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual +*/ + { + INFO_PRINTF1(_L("Testing the APFILE dll...")); + // + + __UHEAP_MARK; + TRAPD(r,testFindAllAppsRegL()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test completed!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File2Step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File2Step.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,43 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_FILE2_STEP_H__) +#define __T_FILE2_STEP_H__ +#include "ApparcTestServer.h" + +//! A CT_File2Step test class. + +/** A more elaborate class description. */ + +class CT_File2Step : public CTestStep + { +public: + CT_File2Step(); + ~CT_File2Step(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void testFindAllAppsRegL(); + }; + +_LIT(KT_File2Step,"T_File2"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File3Step.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File3Step.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,604 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests CApaAppRegFinder APIs. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include "T_File3Step.h" +#include "..\apfile\aprfndr.h" +#include "TSidChecker\TestSidChecker.h" + +#include +#include + +_LIT(KCallBackAppRsc,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\10281fe0_reg.rsc"); +_LIT(KCallBackAppIst,"\\TestSidCheckerCallBackApp.ist"); +_LIT(KBadAppRsc,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\10281fdc_reg.rsc"); +_LIT(KBadAppIst,"\\TestSidCheckerBadApp.ist"); +_LIT(KGoodAppRsc,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\10281fdd_reg.rsc"); +_LIT(KGoodAppIst,"\\TestSidCheckerGoodApp.ist"); +_LIT(KForcedAppRsc, "\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102825b5_reg.rsc"); +_LIT(KForcedAppIst, "\\TestSidCheckerForcedApp.ist"); +_LIT(KTriggerRescanRsc,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102825b6_reg.rsc"); +_LIT(KTriggerRescanIst,"\\TestSidCheckerTriggerRescan.ist"); +_LIT(KMmcPrivateDir,"\\private\\10003a3f\\"); +_LIT(KAppRsc1,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\A000D107_reg.rsc"); +_LIT(KAppRsc2,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\A000D107_r02.rsc"); +_LIT(KAppRsc3,"\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\A000D107_r03.rsc"); +_LIT(KAppIst, "\\TestSidCheckerMultipleRegistrationFilesApp.ist"); + +CT_File3Step::CT_File3Step() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_File3Step); + } + +_LIT(KLitNativeExecutable, "z:\\sys\\bin\\SidCheckerTestDummy.exe"); + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_File3Step::doTestStepPreambleL() + { + SetTestStepResult(EPass); + TInt err = iSession.Connect(); + TEST(err==KErrNone); + err = iUtils.Connect(); + TEST(err==KErrNone); + return TestStepResult(); + } + +TVerdict CT_File3Step::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual +*/ + { + INFO_PRINTF1(_L("Testing the CAppSidChecker api")); + FindRemovableDriveAndSetPathL(); + // Must be first, since the plugin must not be loaded when this is started. + //DONT_CHECK since changes on file system changes the heap + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestRescanCallBackL(), REComSession::FinalClose() ); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestAppPresenceL(), REComSession::FinalClose() ); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestForceRegistrationL(), REComSession::FinalClose() ); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestCorruptedRegFileL(), NO_CLEANUP ); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestMultipleRegistrationFilesForSameAppL(), REComSession::FinalClose() ); + + INFO_PRINTF1(_L("Test completed!")); + return TestStepResult(); + } + + +/** + @SYMTestCaseID UIFRAMEWORKS-APPARC-0047 + + @SYMDEF INC069526 + + @SYMTestCaseDesc When an implementation of the ApSidChecker interface invokes the rescan callback that was passed to it, + the App list server should scan for application registration files. This tests that it does so. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Trigger the loading of a special plugin implementing the ApSidChecker interface + Tell the loaded instance of the aforementioned implementation to trigger a rescan via pub&sub + -> The plugin will invoke its callback + -> The plugin will start a timer + -> The timer will publish a result when either: + a) it recieves an AppRegisteredAt() call -- this is part of the scan we tried to trigger. (success) + b) the timer completes (failure) + Retrieve the results from the plugin, again via pub & sub + + @SYMTestExpectedResults The Apparc App list server scans for new/removed apps when a plugins requests it + */ +void CT_File3Step::TestRescanCallBackL() + { + INFO_PRINTF1(_L("Testing CApaAppRegFinder::TestRescanCallBackL()")); + + CleanupRegFilesL(); + + User::LeaveIfError(RProperty::Define(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, RProperty::EInt)); + User::LeaveIfError(RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, CTestSidChecker::EPluginLoad)); + + TProcessPriority oldPriority = RProcess().Priority(); + RProcess().SetPriority(EPriorityLow); // so that we're pre-empted by the Apparc server when it does its scan + + iSession.RegisterNonNativeApplicationTypeL(KApFileTestAppType, KLitNativeExecutable); + TRAPD(err, PrepareRegFileL(KApFileTestCallBackApp, iCallBackAppRsc, iCallBackAppIst)); + TEST(err==KErrNone); + User::After(20 * 1000000); + + TRequestStatus status; + RProperty property; + CleanupClosePushL(property); + User::LeaveIfError(RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, CTestSidChecker::ETriggerScan)); + User::LeaveIfError(property.Attach(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey)); + property.Subscribe(status); + + RTimer timer; + CleanupClosePushL(timer); + User::LeaveIfError(timer.CreateLocal()); + TRequestStatus timerStatus; + timer.After(timerStatus,30 * 1000000); + + User::WaitForRequest(status,timerStatus); + TEST(status != KRequestPending); + if(status != KRequestPending) + { + timer.Cancel(); + User::WaitForRequest(timerStatus); + TInt result; + User::LeaveIfError(RProperty::Get(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, result)); + TEST(result == CTestSidChecker::EScanOccurred); + } + else + { + property.Cancel(); + User::WaitForRequest(status); + ASSERT(timerStatus != KRequestPending); + INFO_PRINTF1(_L("Timeout exceeded")); + } + + CleanupStack::PopAndDestroy(2,&property); + + RProcess().SetPriority(oldPriority); + + CleanupRegFilesL(); + } + +/** + @SYMTestCaseID UIFRAMEWORKS-APPARC-0048 + + @SYMDEF INC069526 + + @SYMTestCaseDesc Test that the results of the AppRegisteredAt() function in the ApSidChecker ECOM interface are handled correctly + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create application registration files on a removable drive + Iterate over all registration files with an instance of CApaAppRegFinder + + @SYMTestExpectedResults CApaAppRegFinder's list of entries contains KApFileTestGoodApp but not KApFileTestBadApp + */ +void CT_File3Step::TestAppPresenceL() + { + INFO_PRINTF1(_L("Testing CApaAppRegFinder::TestAppPresenceL()")); + + /* + * Prepare registration files + */ + + CleanupRegFilesL(); + + iSession.RegisterNonNativeApplicationTypeL(KApFileTestAppType, KLitNativeExecutable); + TRAPD(err, PrepareRegFileL(KApFileTestBadApp, iBadAppRsc, iBadAppIst)); + TEST(err==KErrNone); + TRAP(err, PrepareRegFileL(KApFileTestGoodApp, iGoodAppRsc, iGoodAppIst)); + TEST(err==KErrNone); + + /* + * Manually scan files + */ + RFs fSession; + User::LeaveIfError(fSession.Connect()); + CleanupClosePushL(fSession); + CApaAppRegFinder* regFinder=CApaAppRegFinder::NewLC(fSession); + + TRAPD(ret, regFinder->FindAllAppsL() ); + TEST(ret==KErrNone); + + TBool more = ETrue; + TBool foundGoodApp = EFalse; + TBool foundBadApp = EFalse; + while (more) + { + TApaAppEntry entry; + RPointerArray dummy; + TRAPD(ret, more=regFinder->NextL(entry, dummy) ); + TEST(ret==KErrNone); + if(entry.iUidType[2] == KApFileTestBadApp) + foundBadApp = ETrue; + if(entry.iUidType[2] == KApFileTestGoodApp) + foundGoodApp = ETrue; + } + TEST(foundGoodApp); + TEST(!foundBadApp); + + CleanupStack::PopAndDestroy(2,&fSession); + + /* + * Cleanup + */ + CleanupRegFilesL(); + } + +/** + @SYMTestCaseID UIFRAMEWORKS-APPARC-0051 + + @SYMDEF INC084770 + + @SYMTestCaseDesc Test that the AppRegisteredAt check can be overridden + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Installs an application for which AppRegisteredAt returns EFalse. Then adds this + application to a list of applications for which the results of AppRegisteredAt will be ignored and + tests that the application appears in the list of apps. + + @SYMTestExpectedResults CApaAppList contains the application. + */ +void CT_File3Step::TestForceRegistrationL() + { + INFO_PRINTF1(_L("Testing RApaLsSession::ForceRegistrationL()")); + + /* + * Prepare registration files + */ + CleanupRegFilesL(); + + // Install the test application + iSession.RegisterNonNativeApplicationTypeL(KApFileTestAppType, KLitNativeExecutable); + TRAPD(err, PrepareRegFileL(KApFileTestForcedRegistration, iForcedAppRsc, iForcedAppIst)); + TEST(err==KErrNone); + + // Wait for a rescan and check that the application is not in the list + RPointerArray dummy; + err = iSession.ForceRegistration(dummy); + TApaAppInfo info; + err = iSession.GetAppInfo(info,KApFileTestForcedRegistration); + TEST(err==KErrNotFound); + + // Add the application to the list of applications that ignore the AppRegisteredAt test + RPointerArray regFiles; + _LIT(KRegFile2, "test2"); // Add a second dummy registration file just to check that this works + regFiles.Append(iForcedAppRsc.AllocL()); + regFiles.Append(KRegFile2().AllocL()); + err = iSession.ForceRegistration(regFiles); + TEST(err==KErrNone); + regFiles.ResetAndDestroy(); + err = iSession.GetAppInfo(info,KApFileTestForcedRegistration); + TEST(err==KErrNone); + + // triggers a rescan from the sid checker, this will cause the + // list to be emptied + TRAP(err, PrepareRegFileL(KApTriggerRescan, iTriggerRescanRsc, iTriggerRescanIst)); + TEST(err==KErrNone); + + // Now the app should not be listed anymore as we have removed it from the "force" list + err = iSession.ForceRegistration(dummy); + err = iSession.GetAppInfo(info,KApFileTestForcedRegistration); + TEST(err==KErrNotFound); + + /* + * Cleanup + */ + CleanupRegFilesL(); + } + +void CT_File3Step::PrepareRegFileL(const TUid& aUid, const TDesC& aRscFile, const TDesC& aLogicalExecutable) + { + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter = + CApaRegistrationResourceFileWriter::NewL(aUid, + aLogicalExecutable, + TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + + iSession.PrepareNonNativeApplicationsUpdatesL(); + iSession.RegisterNonNativeApplicationL(KApFileTestAppType, iDrive, *registrationResourceFileWriter, NULL, NULL); + iSession.CommitNonNativeApplicationsUpdatesL(); + TBool present = EFalse; + User::LeaveIfError(iUtils.IsFilePresent(aRscFile, present)); + TEST(present); + + CleanupStack::PopAndDestroy(registrationResourceFileWriter); + } + +void CT_File3Step::CleanupRegFilesL() + { + iSession.PrepareNonNativeApplicationsUpdatesL(); + iSession.DeregisterNonNativeApplicationL(KApFileTestBadApp); + iSession.DeregisterNonNativeApplicationL(KApFileTestGoodApp); + iSession.DeregisterNonNativeApplicationL(KApFileTestCallBackApp); + iSession.DeregisterNonNativeApplicationL(KApFileTestForcedRegistration); + iSession.DeregisterNonNativeApplicationL(KApTriggerRescan); + iSession.DeregisterNonNativeApplicationL(KApFileTestAppWithMultipleRegistrationFiles); + iSession.CommitNonNativeApplicationsUpdatesL(); + iSession.DeregisterNonNativeApplicationTypeL(KApFileTestAppType); + RFs fSession; + User::LeaveIfError(fSession.Connect()); + CleanupClosePushL(fSession); + CFileMan* fMan = CFileMan::NewL(fSession); + CleanupStack::PushL(fMan); + TInt err = fMan->Delete(iMmcPrivateDir, CFileMan::ERecurse); + if(err != KErrNone && err != KErrNotFound && err != KErrPathNotFound) + { + User::Leave(err); + } + CleanupStack::PopAndDestroy(2,&fSession); + } + +/** + @SYMTestCaseID UIFRAMEWORKS-APPARC-0052 + + @SYMDEF INC87806 + + @SYMTestCaseDesc Test that apparc does not stop scanning its list of registration files after scanning a corrupted registration file. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Copy a corrupted registration file into C:\\Private\\10003a3f\\import\\apps\\. Register a non-native application. Force apparc to rescan. Since non-native applications + are scanned after native ones, we eliminate the risk that the corrupted registration file is scanned after the non-native one. Call GetAppInfo on non-native application. + + @SYMTestExpectedResults Apparc successfully scans the non-native app. Calling GetAppInfo on the non-native app returns KErrNone. + */ +void CT_File3Step::TestCorruptedRegFileL() + { + INFO_PRINTF1(_L("TestCorruptedRegFileL about to start...")); + _LIT(KCorruptedSourceFileName, "Z:\\ApparcTest\\Corrupted_reg.RSC"); // corrupted_reg.rsc file is pre-built. + _LIT(KCorruptedTargetFileName, "C:\\Private\\10003a3f\\import\\apps\\Corrupted_reg.RSC"); + _LIT(KDir, "C:\\private\\10003a3f\\import\\apps\\"); + _LIT(KNonNativeFileName,"C:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\NonCorrupted_reg.rsc"); + _LIT(KLitNoncorruptedExe, "z:\\sys\\bin\\NonCorrupted.exe"); + const TUid KNonCorruptedAppUid = {0x102826DE}; + + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + TInt ret = fs.MkDirAll(KDir); + if (ret != KErrAlreadyExists) + { + User::LeaveIfError(ret); + } + CFileMan* fileManager = CFileMan::NewL(fs); + CleanupStack::PushL(fileManager); + ret = fileManager->Copy(KCorruptedSourceFileName, KCorruptedTargetFileName, CFileMan::EOverWrite); + TEST(ret==KErrNone); + + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter=CApaRegistrationResourceFileWriter::NewL(KNonCorruptedAppUid,KNonNativeFileName,TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + iSession.PrepareNonNativeApplicationsUpdatesL(); + iSession.RegisterNonNativeApplicationTypeL(KApFileTestAppType,KLitNoncorruptedExe); + iSession.RegisterNonNativeApplicationL(KApFileTestAppType, EDriveC, *registrationResourceFileWriter, NULL, NULL); + iSession.CommitNonNativeApplicationsUpdatesL(); + + RPointerArray empty; + ret = iSession.ForceRegistration(empty); + TEST(ret==KErrNone); + TApaAppInfo appInfo; + ret = iSession.GetAppInfo(appInfo,KNonCorruptedAppUid); + TEST(ret==KErrNone); + + iSession.PrepareNonNativeApplicationsUpdatesL(); + iSession.DeregisterNonNativeApplicationL(KNonCorruptedAppUid); + iSession.DeregisterNonNativeApplicationTypeL(KApFileTestAppType); + iSession.CommitNonNativeApplicationsUpdatesL(); + fileManager->RmDir(KDir); + + CleanupStack::PopAndDestroy(registrationResourceFileWriter); + CleanupStack::PopAndDestroy(fileManager); + CleanupStack::PopAndDestroy(&fs); + } + +/** + @SYMTestCaseID UIFRAMEWORKS-APPARC-0102 + + @SYMDEF PDEF139147 + + @SYMTestCaseDesc Test that apparc calls sid checker only once for multiple registration resource file for same application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Make copies of a registration resource file in the removable drive. Plugin implementing the ApSidChecker + interface will set a Pub&Sub value everytime it is called. Check that it has been called only once. + + @SYMTestExpectedResults Pub&Sub value has been set only once by the SidChecker plugin. + */ +void CT_File3Step::TestMultipleRegistrationFilesForSameAppL() + { + INFO_PRINTF1(_L("Testing Multiple registration files for same application")); + + //Cleanup registration files + CleanupRegFilesL(); + + // Install the test application + iSession.RegisterNonNativeApplicationTypeL(KApFileTestAppType, KLitNativeExecutable); + TRAPD(err, PrepareRegFileL(KApFileTestAppWithMultipleRegistrationFiles, iAppRsc1, iAppIst)); + TEST(err==KErrNone); + INFO_PRINTF1(_L("Reg File 1 commited")); + + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + TInt ret = fs.MkDirAll(KMmcPrivateDir); + if (ret != KErrAlreadyExists) + { + User::LeaveIfError(ret); + } + CFileMan* fileManager = CFileMan::NewL(fs); + CleanupStack::PushL(fileManager); + //Make copies of the registration resource files. + ret = fileManager->Copy(iAppRsc1, iAppRsc2, CFileMan::EOverWrite); + TEST(ret==KErrNone); + TBool present = EFalse; + User::LeaveIfError(iUtils.IsFilePresent(iAppRsc2, present)); + TEST(present); + INFO_PRINTF1(_L("Reg File 2 created")); + + ret = fileManager->Copy(iAppRsc1, iAppRsc3, CFileMan::EOverWrite); + TEST(ret==KErrNone); + present = EFalse; + User::LeaveIfError(iUtils.IsFilePresent(iAppRsc3, present)); + TEST(present); + INFO_PRINTF1(_L("Reg File 3 created")); + + TProcessPriority oldPriority = RProcess().Priority(); + RProcess().SetPriority(EPriorityLow); // so that we're pre-empted by the Apparc server when it does its scan + + TRequestStatus status; + RProperty property; + CleanupClosePushL(property); + User::LeaveIfError(RProperty::Set(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, CTestSidChecker::EPropertyDefault)); + User::LeaveIfError(property.Attach(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey)); + property.Subscribe(status); + + RTimer timer; + CleanupClosePushL(timer); + User::LeaveIfError(timer.CreateLocal()); + TRequestStatus timerStatus; + timer.After(timerStatus,50 * 1000000); + + RPointerArray empty; + ret = iSession.ForceRegistration(empty); + TEST(ret==KErrNone); + + // Wait for a rescan + User::WaitForRequest(status,timerStatus); + TEST(status != KRequestPending); + if(status != KRequestPending) + { + timer.Cancel(); + User::WaitForRequest(timerStatus); + TInt result; + User::LeaveIfError(RProperty::Get(KApFileTestPubSubCategory, KApFileTestPubSubCallBackKey, result)); + TEST(result == CTestSidChecker::ECheckedOnce); + } + else + { + property.Cancel(); + User::WaitForRequest(status); + TEST(timerStatus != KRequestPending); + INFO_PRINTF1(_L("Timeout exceeded")); + } + + RProcess().SetPriority(oldPriority); + + INFO_PRINTF1(_L("Removing duplicate reg files")); + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + + TEST(fileManager->Attribs(iAppRsc2,0,KEntryAttReadOnly,tempTime,CFileMan::ERecurse,status)==KErrNone); + User::WaitForRequest(status); + TEST(status.Int()==KErrNone); + TEST(KErrNone==fileManager->Delete(iAppRsc2,CFileMan::ERecurse)); + + TEST(fileManager->Attribs(iAppRsc3,0,KEntryAttReadOnly,tempTime,CFileMan::ERecurse,status)==KErrNone); + User::WaitForRequest(status); + TEST(status.Int()==KErrNone); + TEST(KErrNone==fileManager->Delete(iAppRsc3,CFileMan::ERecurse)); + + CleanupStack::PopAndDestroy(4,&fs); + CleanupRegFilesL(); + } + +void CT_File3Step::FindRemovableDriveAndSetPathL() +{ +#if defined(__WINS__) + // The removable media is expected at X: on emulator. + iDrive = EDriveX; +#else + + RFs fs; + User::LeaveIfError(fs.Connect()); + + // The removable media is expected at D: on NAND ROM and at E: on normal ROMs. + //The following code works on techview but not guaranteed to work on all platforms. + TDriveInfo driveInfo; + TInt err = fs.Drive(driveInfo, EDriveD); + if(err == KErrNone && ((driveInfo.iDriveAtt & KDriveAttRemovable) != 0)) + { + // Use drive D + iDrive = EDriveD; + } + else + { + err = fs.Drive(driveInfo, EDriveE); + if(err == KErrNone && ((driveInfo.iDriveAtt & KDriveAttRemovable) != 0)) + { + // Use drive E + iDrive = EDriveE; + } + } + fs.Close(); +#endif + iCallBackAppRsc = iDrive.Name(); + iCallBackAppIst = iDrive.Name(); + iBadAppRsc = iDrive.Name(); + iBadAppIst = iDrive.Name(); + iGoodAppRsc = iDrive.Name(); + iGoodAppIst = iDrive.Name(); + iForcedAppRsc = iDrive.Name(); + iForcedAppIst = iDrive.Name(); + iTriggerRescanRsc = iDrive.Name(); + iTriggerRescanIst = iDrive.Name(); + iMmcPrivateDir = iDrive.Name(); + iAppRsc1 = iDrive.Name(); + iAppRsc2 = iDrive.Name(); + iAppRsc3 = iDrive.Name(); + iAppIst = iDrive.Name(); + + iCallBackAppRsc.Append(KCallBackAppRsc); + iCallBackAppIst.Append(KCallBackAppIst); + iBadAppRsc.Append(KBadAppRsc); + iBadAppIst.Append(KBadAppIst); + iGoodAppRsc.Append(KGoodAppRsc); + iGoodAppIst.Append(KGoodAppIst); + iForcedAppRsc.Append(KForcedAppRsc); + iForcedAppIst.Append(KForcedAppIst); + iTriggerRescanRsc.Append(KTriggerRescanRsc); + iTriggerRescanIst.Append(KTriggerRescanIst); + iMmcPrivateDir.Append(KMmcPrivateDir); + iAppRsc1.Append(KAppRsc1); + iAppRsc2.Append(KAppRsc2); + iAppRsc3.Append(KAppRsc3); + iAppIst.Append(KAppIst); +} + +TVerdict CT_File3Step::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + iSession.Close(); + iUtils.Close(); + return TestStepResult(); + } + +CT_File3Step::~CT_File3Step() +/** + Destructor + */ + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File3Step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_File3Step.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,79 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_FILE3_STEP_H__ +#define __T_FILE3_STEP_H__ + +#include "ApparcTestServer.h" + +#include "testableapalssession.h" +#include +#include + +class CTestSidChecker; + +//! A CT_File3Step test class. + +/** Test the CAppSidChecker Interface. */ + +class CT_File3Step : public CTestStep + { +public: + CT_File3Step(); + ~CT_File3Step(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void TestAppPresenceL(); + void TestRescanCallBackL(); + void TestForceRegistrationL(); + void TestCorruptedRegFileL(); + void TestMultipleRegistrationFilesForSameAppL(); +private: + void PrepareRegFileL(const TUid& aUid, const TDesC& aRscFile, const TDesC& aLogicalExecutable); + void CleanupRegFilesL(); + void FindRemovableDriveAndSetPathL(); +private: + RTestableApaLsSession iSession; + REComSession iEComSession; + CTestSidChecker* iTestSidChecker; + RSmlTestUtils iUtils; + TBuf<128> iCallBackAppRsc; + TBuf<64> iCallBackAppIst; + TBuf<128> iBadAppRsc; + TBuf<64> iBadAppIst; + TBuf<128> iGoodAppRsc; + TBuf<64> iGoodAppIst; + TBuf<128> iForcedAppRsc; + TBuf<64> iForcedAppIst; + TBuf<128> iTriggerRescanRsc; + TBuf<64> iTriggerRescanIst; + TBuf<64> iMmcPrivateDir; + TBuf<128> iAppRsc1; + TBuf<128> iAppRsc2; + TBuf<128> iAppRsc3; + TBuf<128> iAppIst; + TDriveUnit iDrive; + }; + +_LIT(KT_File3Step,"T_File3"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Foreground.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Foreground.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,333 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// @file +// @internalComponent - Internal Symbian test code +// Test for UIKON GT0143 Typhoon Work Series 60 Changes +// REQ758.8: Change TApaTask::BringToForeground to send a +// EApaSystemEventBroughtToForeground to the relevant window group +// This test requires Apparc\Tsrc\SampleApp to be built first +// The test runs in the full GUI emulator and can be launched from +// z:\system\programs\t_foreground.dll +// This test is fully automated and performs the following tasks +// - Launches SampleApp +// - Calls TApaTask::BringToForeground to send a Window Server +// event to SimpleApparcTestApp +// - Waits on a Rendezvous in the process +// - SimpleApparcTestApp handles the window server event by overriding +// CCoeAppUi::HandleSystemEventL +// - SimpleApparcTestApp's HandleSystemEventL checks the window server event +// is of type EApaSystemEventBroughtToForeground and if so signals +// using a Rendezvous in the process +// - T_Foreground closes SimpleApparcTestApp +// This test calls TApaTask::BringToForeground on SimpleApparcTestApp to send +// a window server message to SimpleApparcTestApp +// +// + + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include "t_foreground.h" + +_LIT(KAppName, "SimpleApparcTestApp"); +_LIT(KAppFileName, "z:\\sys\\bin\\SimpleApparcTestApp.exe"); +_LIT(KAppFile, "c:\\logs\\testApp.txt"); +const TInt KNonExistantWgId = KErrNotFound; + +//////////////////////////////////////////////////////////////////////////////////// +// +// The CTestDriver class runs a series of tests on timer callback +// +//////////////////////////////////////////////////////////////////////////////////// + +CTestDriver::CTestDriver(CCoeAppUi& aAppUi) : iAppUi(aAppUi) + { + } + +CTestDriver::~CTestDriver() + { + } + +void CTestDriver::LoadAppL() + { + TBuf<256> fileNameBuf(KAppFileName); + TFileName appName = fileNameBuf; + + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); + cmdLine->SetExecutableNameL(appName); + cmdLine->SetCommandL(EApaCommandOpen); + RApaLsSession ls; + + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + User::LeaveIfError(ls.StartApp(*cmdLine)); + CleanupStack::PopAndDestroy(2); // ls and cmdLine + } + +void CTestDriver::BringToForegroundL() + { + User::After(10000000); + TApaTaskList taskList(CCoeEnv::Static()->WsSession()); + TApaTask task = taskList.FindApp(KAppName); + + RThread thread; + User::LeaveIfError(thread.Open(task.ThreadId())); + CleanupClosePushL(thread); + RProcess process; + User::LeaveIfError(thread.Process(process)); + CleanupClosePushL(process); + + TRequestStatus requestStatus; + process.Rendezvous(requestStatus); + task.BringToForeground(); + User::WaitForRequest(requestStatus); + CleanupStack::PopAndDestroy(&process); + CleanupStack::PopAndDestroy(&thread); + + User::LeaveIfError(requestStatus.Int()); + } + +void CTestDriver::CloseAppL() + { + TApaTaskList taskList(CCoeEnv::Static()->WsSession()); + TApaTask task = taskList.FindApp(KAppName); + User::LeaveIfError(task.Exists()); + task.KillTask(); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0053 + + @SYMDEF DEF092013 + + @SYMTestCaseDesc Tests Whether the TApaTask::SwitchCreateFile returns the right return code. + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Give a NonExistant file name that has to be created.This method checks that + the file does not get created but on its default implementation returns KErrNone or System Wide errors. + + + @SYMTestExpectedResults The test passes if the return value is KErrNone , It means the request has been successfuly sent to + the windows Server session. +*/ + +TInt CTestDriver::SwitchCreate() + { + TApaTaskList taskList(CCoeEnv::Static()->WsSession()); + TApaTask task = taskList.FindApp(KAppName); + + TInt errForCreate=task.SwitchCreateFile(KAppFile); + return errForCreate; + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0054. + + @SYMDEF DEF092013 + + @SYMTestCaseDesc Tests Whether the TApaTask::SwitchOpenFile returns the right return code. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Give a NonExistant file name that has to be Opened.This method checks that + the file does not get opened but on its default implementation returns KErrNone or System Wide errors. + + + @SYMTestExpectedResults The test passes if the return value is KErrNone , It means the request has been successfuly sent to + the windows Server session. + + +*/ +TInt CTestDriver::SwitchOpen() + { + TApaTaskList taskList(CCoeEnv::Static()->WsSession()); + TApaTask task = taskList.FindApp(KAppName); + + TInt errForOpen=task.SwitchOpenFile(KAppFile); + return errForOpen; + } + +/** + @SYMTestCaseID T_Foreground-CloseNonExistantWindowGroupTask + + @SYMDEF INC086383 + + @SYMTestCaseDesc Tests CloseNonExistantWindowGroupTask to ensure that the kernel doesn't get terminated when KillTask() is called on a non-existant window group Id. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions First, construct TApaTask with a non-existant window group Id. Then close the app by calling KillTask(). + API Calls:\n + TApaTask::SetWgId(TInt aWgId);\n + TApaTask::KillTask();\n + + @SYMTestExpectedResults The test passes if it is able to complete without the test being killed off. + */ +void CTestDriver::CloseNonExistantWindowGroupTask() + { + // close the app with a non-existant window group ID + TApaTask task(CCoeEnv::Static()->WsSession()); + task.SetWgId(KNonExistantWgId); + + // KillTask has not effect on a non existing task + task.KillTask(); + } + +class CTestDriver; + + +//////////////////////////////////////////////////////////////////////////////////// +// +// class CTestForegroundAppUi +// +//////////////////////////////////////////////////////////////////////////////////// + +CTestForegroundAppUi::CTestForegroundAppUi(CTestStep* aStep) : CTestCoeAppUi(aStep) + { + } + +void CTestForegroundAppUi::ConstructL() + { + CTestCoeAppUi::ConstructL(); + iDriver=new (ELeave) CTestDriver(*this); + AutoTestManager().StartAutoTest(); + } + + +CTestForegroundAppUi::~CTestForegroundAppUi() + { + delete iDriver; + } + +void CTestForegroundAppUi::RunTestStepL(TInt aNumStep) + { + User::After(TTimeIntervalMicroSeconds32(1000000)); + switch(aNumStep) + { + case 1: + { + INFO_PRINTF1(_L("LoadingApp")); + TRAPD(ret, iDriver->LoadAppL()); + TEST(ret==KErrNone); + } + break; + case 2: + { + INFO_PRINTF1(_L("TApaTask::BringToForeground")); + TRAPD(ret, iDriver->BringToForegroundL()); + TEST(ret==KErrNone); + } + break; + case 3: + INFO_PRINTF1(_L("TApaTask::SwitchCreate")); + TEST(iDriver->SwitchCreate()==KErrNone); + break; + case 4: + INFO_PRINTF1(_L("TApaTask::SwitchOpen")); + TEST(iDriver->SwitchOpen()==KErrNone); + break; + case 5: + INFO_PRINTF1(_L("Closing App")); + TRAPD(ret, iDriver->CloseAppL()); + TEST(ret==KErrNone); + break; + case 6: + INFO_PRINTF1(_L("Closing App with an invalid window group ID")); + //There's no return value here we can check. The system doesn't complain about closing a non existant task + iDriver->CloseNonExistantWindowGroupTask(); + break; + case 7: + AutoTestManager().FinishAllTestCases(CAutoTestManager::EPass); + break; + default: + break; + } + } + + +//////////////////////////////////////////////////////////////////////////////////// +// +// class CTestForegroundStep +// +//////////////////////////////////////////////////////////////////////////////////// + +CTestForegroundStep::CTestForegroundStep() + { + SetTestStepName(KTestForegroundStep); + } + +CTestForegroundStep::~CTestForegroundStep() + { + } + + +void CTestForegroundStep::ConstructAppL(CCoeEnv* aCoe) + { // runs inside a TRAP harness + aCoe->ConstructL(); + CTestForegroundAppUi* appUi= new (ELeave) CTestForegroundAppUi(this); + aCoe->SetAppUi(appUi); + appUi->ConstructL(); + } + + +TVerdict CTestForegroundStep::doTestStepL() // main function called by E32 + { + INFO_PRINTF1(_L("Test Started")); + + PreallocateHALBuffer(); + + __UHEAP_MARK; + + CCoeEnv* coe=new(ELeave) CCoeEnv; + TRAPD(err,ConstructAppL(coe)); + + if (!err) + coe->ExecuteD(); + else + { + SetTestStepResult(EFail); + delete coe; + } + + REComSession::FinalClose(); + + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test Finished")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Foreground.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Foreground.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,93 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_FOREGROUND_H +#define __T_FOREGROUND_H + + +#include +#include "ApparcTestServer.h" +#include "appfwk_test_AppUi.h" + + +const TInt KTVwaStandardAppUiId=0; + +// +// A CBase Derived Class +// +class CTestDriver : public CBase + { +public: + CTestDriver(CCoeAppUi& aAppUi); + ~CTestDriver(); +public: + void LoadAppL(); + void CloseAppL(); + void BringToForegroundL(); + TInt SwitchCreate(); + TInt SwitchOpen(); + void CloseNonExistantWindowGroupTask(); +private: + inline CTestAppUi& AppUi(TInt aAppUiId=KTVwaStandardAppUiId); +private: + TInt iTestNum; + TInt iState; + CCoeAppUi& iAppUi; + }; + + +// +// A CTestStep Derived Class +// +class CTestForegroundStep : public CTestStep + { +public: + CTestForegroundStep(); + ~CTestForegroundStep(); + virtual TVerdict doTestStepL(); + void ConstructAppL(CCoeEnv* aCoe); +private: + }; + + +// +// A CTestCoeAppUi derived Class +// +class CTestForegroundAppUi : public CTestCoeAppUi + { +public: // from CCoeAppUi + CTestForegroundAppUi(CTestStep* aStep); + ~CTestForegroundAppUi(); + void ConstructL(); + void RunTestStepL(TInt aNumStep); +private: + CTestDriver* iDriver; + }; + + +// +// Test Step Name +// +_LIT(KTestForegroundStep, "T_Foreground"); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportRebootStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportRebootStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,224 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_IntegritySupportRebootStep.h" + +/** + * Constructor + */ +CT_IntegritySupportReboot1TestStep::CT_IntegritySupportReboot1TestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_IntegritySupportReboot1Step); + } + +/** + * Destructor + */ +CT_IntegritySupportReboot1TestStep::~CT_IntegritySupportReboot1TestStep() + { + iSession.Close(); + iUtils.Close(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_IntegritySupportReboot1TestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + doAbstractNonNativeAppsTestStepPreambleL(); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_IntegritySupportReboot1TestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_IntegritySupportReboot1TestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_IntegritySupportReboot1 Test Cases Running...")); + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_IntegritySupportReboot1 Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_IntegritySupportReboot1TestStep::RunTestCasesL() + { + //DONT_CHECK due to recreation of applist on server + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestSetupL(), NO_CLEANUP); + + return KErrNone; + } + +_LIT(KLitLogicalExecutable1, "c:\\TestIntegritySupportReboot1.ist"); +_LIT(KLitRegistrationFile1,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081ce_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication1(0x102081CE,KLitLogicalExecutable1,KLitRegistrationFile1); + + +_LIT(KLitLogicalExecutable2, "c:\\TestIntegritySupportReboot2.ist"); +_LIT(KLitRegistrationFile2,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081cf_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication2(0x102081CF,KLitLogicalExecutable2,KLitRegistrationFile2); + +/** + @SYMTestCaseID T-IntegritySupportReboot1TestStep-TestSetupL + + @SYMPREQ + + @SYMTestCaseDesc This is only the first half of the test case. It will simulate a + reboot in the middle of an installation. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Simulate a reboot in the middle of an installation. + + @SYMTestExpectedResults None. See CT_IntegritySupportReboot2TestStep for the actual test. + */ +void CT_IntegritySupportReboot1TestStep::TestSetupL() + { + INFO_PRINTF1(_L("Setting up reboot recovery test...")); + + // so that we can check the presence/absence of stuff before apparc has respawned + RProcess().SetPriority(EPriorityHigh); + + // make sure we're starting from a clean sheet + CleanupAndReset(iSession, KApplication1); + CleanupAndReset(iSession, KApplication2); + + // prepare the starting state: KApp1 uninstalled, KApp2 installed + CompleteRegisterL(iSession, KApplication2); + + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppPresent(iSession, KApplication2)); + + // Prepare to install KApp1 and remove KApp2, and then panic after actually performing these steps + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallRegisterL(iSession, KApplication1); + CallDeregisterL(iSession, KApplication2); + iSession.AddPanicingNonNativeApplicationsUpdate(); + + // test that nothing has changed yet + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppPresent(iSession, KApplication2)); + + // commit, expect Apparc to die horribly + // this function will actually restart apparc if it fails the first time + TRAPD(err,iSession.CommitNonNativeApplicationsUpdatesL()); + TEST(err == KErrServerTerminated); + + // the files should be as-if the update happened, but we can't check + // the app list because apparc is now dead. + TEST(FilePresent(KLitUpdatedAppsList)); + TEST(FilePresent(KApplication1.iRegistrationFile)); + TEST(FileAbsent(KApplication2.iRegistrationFile)); + } + +/** + * Constructor + */ +CT_IntegritySupportReboot2TestStep::CT_IntegritySupportReboot2TestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_IntegritySupportReboot2Step); + } + +/** + * Destructor + */ +CT_IntegritySupportReboot2TestStep::~CT_IntegritySupportReboot2TestStep() + { + iSession.Close(); + iUtils.Close(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_IntegritySupportReboot2TestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + doAbstractNonNativeAppsTestStepPreambleL(); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_IntegritySupportReboot2TestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_IntegritySupportReboot2TestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_IntegritySupportReboot2 Test Cases Running...")); + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_IntegritySupportReboot2 Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_IntegritySupportReboot2TestStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iSession, 0, 0, TestRollbackL(), NO_CLEANUP); + return KErrNone; + } + +/** + @SYMTestCaseID T-IntegritySupportReboot2TestStep-TestRollbackL + + @SYMPREQ + + @SYMTestCaseDesc This test case assumes IntegritySupportReboot1TestStep has been run before + IntegritySupportReboot1TestStep have been rolled back and that the device is in a consistent state. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Check the presence/absence of KApplication2 and KApplication1 respectively + + @SYMTestExpectedResults KApplication1 is absent, KApplication2 is present. + */ +void CT_IntegritySupportReboot2TestStep::TestRollbackL() + { + INFO_PRINTF1(_L("Checking that the device is in a consistent state, with all updates rolled back")); + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppPresent(iSession, KApplication2)); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportRebootStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportRebootStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,64 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __T_INTEGRITYREBOOTSUPPORT_STEP_H__ +#define __T_INTEGRITYREBOOTSUPPORT_STEP_H__ + +#include "t_abstractnonnativeappsstep.h" + +_LIT(KT_IntegritySupportReboot1Step,"T_IntegritySupportReboot1"); + +class CT_IntegritySupportReboot1TestStep : public CT_AbstractNonNativeAppsTestStep + { +public: + CT_IntegritySupportReboot1TestStep(); + ~CT_IntegritySupportReboot1TestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestSetupL(); + }; + +_LIT(KT_IntegritySupportReboot2Step,"T_IntegritySupportReboot2"); + +class CT_IntegritySupportReboot2TestStep : public CT_AbstractNonNativeAppsTestStep + { +public: + CT_IntegritySupportReboot2TestStep(); + ~CT_IntegritySupportReboot2TestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestClosingSessionL(); + void TestAppsAreIgnoredL(); + void TestUpdatesL(); + void TestRollbackL(); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,623 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "T_IntegritySupportStep.h" +#include + + + +/** + * Constructor + */ +CT_IntegritySupportTestStep::CT_IntegritySupportTestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_IntegritySupportStep); + } + +/** + * Destructor + */ +CT_IntegritySupportTestStep::~CT_IntegritySupportTestStep() + { + iSession.Close(); + iUtils.Close(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_IntegritySupportTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + doAbstractNonNativeAppsTestStepPreambleL(); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_IntegritySupportTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_IntegritySupportTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_IntegritySupport Test Cases Running...")); + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_IntegritySupport Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_IntegritySupportTestStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestNormalInstallation1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestManualRollback1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestRollbackOnError1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestRollbackOnSessionCloseL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestNormalRemoval1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestManualRollback2L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestRollbackWithoutPrepareL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestRegisterWithoutPrepareL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestCallingPrepareTwiceL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestCallingPrepareFromTwoSessionsL(), NO_CLEANUP); + /* Removed from armv5 because they seem to cause filesystem corruption */ +#ifdef __WINS__ + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestReregisterApplicationL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestDoubleInstallFailsL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iSession, 0, DONT_CHECK, TestRollbackOnFailedUpdateStepL(), NO_CLEANUP); +#endif + return KErrNone; + } + + +_LIT(KLitLogicalExecutable1,"c:\\TestIntegritySupport1.ist"); +_LIT(KLitRegistrationFile1,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081a1_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication1(0x102081A1,KLitLogicalExecutable1,KLitRegistrationFile1); + +_LIT(KLitLogicalExecutable2,"c:\\TestIntegritySupport2.ist"); +_LIT(KLitRegistrationFile2,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081c0_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication2(0x102081C0,KLitLogicalExecutable2,KLitRegistrationFile2); + +_LIT(KLitLogicalExecutable3,"c:\\TestIntegritySupport3.ist"); +_LIT(KLitRegistrationFile3,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081c1_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication3(0x102081C1,KLitLogicalExecutable3,KLitRegistrationFile3); + +_LIT(KLitLogicalExecutable4,"c:\\TestIntegritySupport4.ist"); +_LIT(KLitRegistrationFile4,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081c2_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication4(0x102081C2,KLitLogicalExecutable4,KLitRegistrationFile4); + +// uses logical executable from KApplication4 +_LIT(KLitRegistrationFile5,"c:\\private\\10003a3f\\import\\apps\\NonNative\\Resource\\102081c3_reg.rsc"); +static const CT_AbstractNonNativeAppsTestStep::TTestAppDetails KApplication5(0x102081C3,KLitLogicalExecutable4,KLitRegistrationFile5); + + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestNormalInstallation1L + + @SYMPREQ + + @SYMTestCaseDesc Tests the integrity support during a normal installation + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests installation process when there are no problems. + + @SYMTestExpectedResults The application is successfully installed and then removed. + */ +void CT_IntegritySupportTestStep::TestNormalInstallation1L() + { + INFO_PRINTF1(_L("Testing normal application installation...")); + + RProcess().SetPriority(EPriorityLow); // so that we're pre-empted by the Apparc server when it does its scan + CleanupAndReset(iSession, KApplication1); + + iSession.PrepareNonNativeApplicationsUpdatesL(); + + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + CallRegisterL(iSession, KApplication1); + + // Since we have not committed yet, at this stage the files should not be in their + // final locations + TEST(AppAbsent(iSession, KApplication1)); + + iSession.CommitNonNativeApplicationsUpdatesL(); + + // the files should now be present in their final locations + TEST(AppPresent(iSession, KApplication1)); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + CompleteDeregisterL(iSession, KApplication1); + + TEST(AppAbsent(iSession, KApplication1)); + } + + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestManualRollback1L + + @SYMPREQ + + @SYMTestCaseDesc Tests the integrity support during an installation that is rolled back + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests installation process when the client decides to rollback the changes. + + @SYMTestExpectedResults The installtion is successfully rolled back and the device is in the + same state as before the installation attempt. + */ +void CT_IntegritySupportTestStep::TestManualRollback1L() + { + INFO_PRINTF1(_L("Testing manual rollback during installation...")); + CleanupAndReset(iSession, KApplication2); + + iSession.PrepareNonNativeApplicationsUpdatesL(); + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + CallRegisterL(iSession, KApplication2); + + // Since we have not committed yet, at this stage the files should not be in their + // final locations + TEST(AppAbsent(iSession, KApplication2)); + + iSession.RollbackNonNativeApplicationsUpdates(); + + // Test that they're still all absent since we never committed + TEST(AppAbsent(iSession, KApplication2)); + } + +void CT_IntegritySupportTestStep::TestRollbackOnError1L() + { + + // this can be tested by trying to overwrite an icon file. + } + + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestRollbackOnSessionCloseL + + @SYMPREQ + + @SYMTestCaseDesc Tests that any updates are rolled back if the session is closed in the middle + of an update + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests installation process when the client closes the session before + committing or rolling back. + + @SYMTestExpectedResults The installation is successfully rolled back and the device is in the + same state as before the installation attempt. + */ +void CT_IntegritySupportTestStep::TestRollbackOnSessionCloseL() + { + INFO_PRINTF1(_L("Testing rollback if RApaLsSession is closed...")); + + RTestableApaLsSession apaSession; + User::LeaveIfError(apaSession.Connect()); + CleanupClosePushL(apaSession); + + CleanupAndReset(apaSession, KApplication3); + + apaSession.PrepareNonNativeApplicationsUpdatesL(); + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + CallRegisterL(apaSession, KApplication3); + + // shouldn't be present until comitted + TEST(AppAbsent(iSession, KApplication3)); + + // We close the session before committing or rolling back. + CleanupStack::PopAndDestroy(&apaSession); + + // We never committed, so check that nothing's changed + TEST(AppAbsent(iSession, KApplication3)); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestNormalRemoval1L + + @SYMPREQ + + @SYMTestCaseDesc Tests a normal removal attempt + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests the correct working of the removal process. + + @SYMTestExpectedResults The application is installed and then removed without errors. + */ +void CT_IntegritySupportTestStep::TestNormalRemoval1L() + { + INFO_PRINTF1(_L("Testing removal...")); + CleanupAndReset(iSession, KApplication4); + + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + CompleteRegisterL(iSession, KApplication4); + TEST(AppPresent(iSession, KApplication4)); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallDeregisterL(iSession,KApplication4); + + // Check that everythign is still the same as we haven't committed yet + TEST(AppPresent(iSession, KApplication4)); + + iSession.CommitNonNativeApplicationsUpdatesL(); + TEST(AppAbsent(iSession, KApplication4)); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestManualRollback2L + + @SYMPREQ + + @SYMTestCaseDesc Tests the integrity support during an installation that is rolled back + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests installation process when the client decides to rollback the changes. + + @SYMTestExpectedResults The installtion is successfully rolled back and the device is in the + same state as before the installation attempt. + */ +void CT_IntegritySupportTestStep::TestManualRollback2L() + { + INFO_PRINTF1(_L("Testing removal rollback...")); + CleanupAndReset(iSession, KApplication5); + + iSession.PrepareNonNativeApplicationsUpdatesL(); + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + CallRegisterL(iSession, KApplication5); + iSession.CommitNonNativeApplicationsUpdatesL(); + + TEST(AppPresent(iSession, KApplication5)); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallDeregisterL(iSession, KApplication5); + + // Check that all is still present as we haven't committed yet + TEST(AppPresent(iSession, KApplication5)); + iSession.RollbackNonNativeApplicationsUpdates(); + + // Check that app is in list of installed apps, still + TEST(AppPresent(iSession, KApplication5)); + + // Cleanup and remove app + CompleteDeregisterL(iSession, KApplication5); + + // Check that app is not in list of installed apps anymore + TEST(AppAbsent(iSession, KApplication5)); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestRollbackWithoutPrepareL + + @SYMPREQ + + @SYMTestCaseDesc Tests that calling RollbackNonNativeApplicationsUpdates works even if + the client hasn't calling the PrepareNonNativeApplicationsUpdatesL function. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests that calling RollbackNonNativeApplicationsUpdates works even if + the client hasn't calling the PrepareNonNativeApplicationsUpdatesL function. + + @SYMTestExpectedResults The function doesn't return an error. + */ +void CT_IntegritySupportTestStep::TestRollbackWithoutPrepareL() + { + INFO_PRINTF1(_L("Testing RollbackNonNativeApplicationsUpdates without prepare before...")); + // Just call the function, if it doesn't panic, we assume it works + iSession.RollbackNonNativeApplicationsUpdates(); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestRegisterWithoutPrepareL + + @SYMPREQ + + @SYMTestCaseDesc Tests that calling RegisterNonNativeApplicationL fails if + PrepareNonNativeApplicationsUpdatesL hasn't been called. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call RegisterNonNativeApplicationL without calling PrepareNonNativeApplicationsUpdatesL + first. + + @SYMTestExpectedResults The function returns KErrNotReady. + */ +void CT_IntegritySupportTestStep::TestRegisterWithoutPrepareL() + { + INFO_PRINTF1(_L("Testing RegisterNonNativeApplicationL without prepare before...")); + TRAPD(err, CallRegisterL(iSession,KApplication1)); + TEST(err == KErrNotReady); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestCallingPrepareTwiceL + + @SYMPREQ + + @SYMTestCaseDesc Tests that calling PrepareNonNativeApplicationsUpdatesL twice fails. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call PrepareNonNativeApplicationsUpdatesL twice. + + @SYMTestExpectedResults The second call returns KErrNotReady. + */ +void CT_IntegritySupportTestStep::TestCallingPrepareTwiceL() + { + INFO_PRINTF1(_L("Testing PrepareNonNativeApplicationsUpdatesL twice...")); + + // Should work + iSession.PrepareNonNativeApplicationsUpdatesL(); + + // Shouldn't work since already called + TRAPD(err, iSession.PrepareNonNativeApplicationsUpdatesL()); + TEST(err == KErrInUse); + iSession.RollbackNonNativeApplicationsUpdates(); + + // Should work again since we have rolled back + iSession.PrepareNonNativeApplicationsUpdatesL(); + iSession.RollbackNonNativeApplicationsUpdates(); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestCallingPrepareFromTwoSessionsL + + @SYMPREQ + + @SYMTestCaseDesc Tests that commiting an app update when another session + has already installed it is successfull. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call PrepareNonNativeApplicationsUpdatesL from a session and then from + another one. + + @SYMTestExpectedResults The second call returns KErrNone. + */ +void CT_IntegritySupportTestStep::TestCallingPrepareFromTwoSessionsL() + { + INFO_PRINTF1(_L("Testing PrepareNonNativeApplicationsUpdatesL and other function calls from 2 sessions...")); + INFO_PRINTF1(_L(" Cleaning up any existing reg files first...")); + + CleanupAndReset(iSession, KApplication1); + + INFO_PRINTF1(_L(" Running test...")); + + // open a second session + RTestableApaLsSession session2; + User::LeaveIfError(session2.Connect()); + CleanupClosePushL(session2); + + // Prepare & Register with the first session + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallRegisterL(iSession, KApplication1); + + // Prepare, Register & Deregister with the second session + TRAPD(err,session2.PrepareNonNativeApplicationsUpdatesL()); + TEST(err == KErrNone); + CallRegisterL(session2, KApplication1); + + // commit the updates with iSession, installing app 1 + TRAP(err, iSession.CommitNonNativeApplicationsUpdatesL()); + TEST(err == KErrNone); + + // both sessions should now report app 1 as installed + TEST(AppPresent(iSession, KApplication1)); + TEST(AppPresent(session2, KApplication1)); + + // Try to commit with session 2 + // This could be an upgrade of the app so completes successfully + TRAP(err, session2.CommitNonNativeApplicationsUpdatesL()); + INFO_PRINTF2(_L("Err: %d "), err); + TEST(err == KErrNone); + + // check that nothing was damaged + TEST(AppPresent(iSession, KApplication1)); + TEST(AppPresent(session2, KApplication1)); + + CleanupStack::PopAndDestroy(&session2); + + // clean up + CompleteDeregisterL(iSession, KApplication1); + TEST(AppAbsent(iSession, KApplication1)); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestReregisterApplicationL + + @SYMPREQ + + @SYMTestCaseDesc Tests we can deregister an already-installed app and reregister it in + one transaction + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call Prepare updates, Deregister, Register, Commit + + @SYMTestExpectedResults All successful, no panics + */ +void CT_IntegritySupportTestStep::TestReregisterApplicationL() + { + INFO_PRINTF1(_L("Testing deregister/register of an application in one transaction...")); + INFO_PRINTF1(_L(" Cleaning up any existing reg files first...")); + + CleanupAndReset(iSession, KApplication1); + + INFO_PRINTF1(_L(" Registering beforehand so that the deregister has something to do...")); + CompleteRegisterL(iSession, KApplication1); + + // test that it has installed OK + TEST(AppPresent(iSession, KApplication1)); + + INFO_PRINTF1(_L(" Running test...")); + // Prepare, Deregister & Register + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallDeregisterL(iSession, KApplication1); + CallRegisterL(iSession, KApplication1); + TRAPD(err, iSession.CommitNonNativeApplicationsUpdatesL()); + TEST(err == KErrNone); + + // test that it is still installed OK + TEST(AppPresent(iSession, KApplication1)); + + // clean up + CompleteDeregisterL(iSession, KApplication1); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestDoubleInstallFailsL + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions + + @SYMTestExpectedResults + */ +void CT_IntegritySupportTestStep::TestDoubleInstallFailsL() + { + INFO_PRINTF1(_L("Testing double register of an application in one transaction...")); + INFO_PRINTF1(_L(" Cleaning up any existing reg files first...")); + + CleanupAndReset(iSession, KApplication1); + + // test that the application is absent + TEST(AppAbsent(iSession, KApplication1)); + + INFO_PRINTF1(_L(" Running test...")); + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallRegisterL(iSession, KApplication1); + CallRegisterL(iSession, KApplication1); + TRAPD(err, iSession.CommitNonNativeApplicationsUpdatesL()); + TEST(err == KErrAccessDenied); // Since app is already registered, KErrAccessDenied will be returned when try to delete the registered app. + + // test that the rollback happened when the second register failed, + // and thus the app is still absent + TEST(AppAbsent(iSession, KApplication1)); + + // test that things still work + TRAP(err, CompleteRegisterL(iSession, KApplication1)); + TEST(err == KErrNone); + TEST(AppPresent(iSession, KApplication1)); + + CompleteDeregisterL(iSession, KApplication1); + TEST(AppAbsent(iSession, KApplication1)); + } + +/** + @SYMTestCaseID T-IntegritySupportTestStep-TestRollbackOnFailedUpdateStepL + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions + + @SYMTestExpectedResults + */ +void CT_IntegritySupportTestStep::TestRollbackOnFailedUpdateStepL() + { + INFO_PRINTF1(_L("Testing register app1, deregister app2, then a force-failed update that causes the first two to roll back...")); + INFO_PRINTF1(_L(" Cleaning up any existing reg files first...")); + + CleanupAndReset(iSession, KApplication1); + CleanupAndReset(iSession, KApplication2); + + // test that both apps are absent + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppAbsent(iSession, KApplication2)); + + // register app 2 and check + TRAPD(err,CompleteRegisterL(iSession, KApplication2)); + TEST(err == KErrNone); + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppPresent(iSession, KApplication2)); + + INFO_PRINTF1(_L(" Running test...")); + iSession.PrepareNonNativeApplicationsUpdatesL(); + // call register/deregister/fail operations + CallRegisterL(iSession, KApplication1); + CallDeregisterL(iSession, KApplication2); + iSession.AddFailingNonNativeApplicationsUpdate(); + // test that nothing has changed yet + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppPresent(iSession, KApplication2)); + // commit, expect KErrGeneral from the force-fail step + TRAP(err, iSession.CommitNonNativeApplicationsUpdatesL()); + TEST(err == KErrGeneral); + // make sure nothing has changed, i.e. everything rolled back ok + TEST(AppAbsent(iSession, KApplication1)); + TEST(AppPresent(iSession, KApplication2)); + + // test that things still work + iSession.PrepareNonNativeApplicationsUpdatesL(); + CallRegisterL(iSession, KApplication1); + CallDeregisterL(iSession, KApplication2); + TRAP(err,iSession.CommitNonNativeApplicationsUpdatesL()); + TEST(err == KErrNone); + TEST(AppPresent(iSession, KApplication1)); + TEST(AppAbsent(iSession, KApplication2)); + + CompleteDeregisterL(iSession, KApplication1); + TEST(AppAbsent(iSession, KApplication1)); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_IntegritySupportStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __T_INTEGRITYSUPPORT_STEP_H__ +#define __T_INTEGRITYSUPPORT_STEP_H__ + +#include "t_abstractnonnativeappsstep.h" + +_LIT(KT_IntegritySupportStep,"T_IntegritySupport"); + +class CT_IntegritySupportTestStep : public CT_AbstractNonNativeAppsTestStep + { +public: + CT_IntegritySupportTestStep(); + ~CT_IntegritySupportTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestNormalInstallation1L(); + void TestManualRollback1L(); + void TestRollbackOnError1L(); + void TestRollbackOnSessionCloseL(); + void TestNormalRemoval1L(); + void TestManualRollback2L(); + void TestRollbackWithoutPrepareL(); + void TestRegisterWithoutPrepareL(); + void TestCallingPrepareTwiceL(); + void TestCallingPrepareFromTwoSessionsL(); + void TestReregisterApplicationL(); + void TestDoubleInstallFailsL(); + void TestRollbackOnFailedUpdateStepL(); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_LocaleStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_LocaleStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,782 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests to meet REQ758.2: "Captions localization must be efficient +// (i.e. not waste disk space) and extensible (i.e. support non-ROM language packs)"\n +// Test for UIKON GT0143 Typhoon Work Series 60 Changes +// REQ758.2: Captions localization must be efficient (i.e. not waste disk space) +// and extensible (i.e. support non-ROM language packs) +// Test for CR0902 - Enable Dynamic Language Switching in APPARC. +// Application's localisable information should be updated by apparc on language change event. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include "T_LocaleStep.h" + +const TUid KUidTestApp = { 10 }; //uid of tstapp. +const TUid KUidCustomiseDefaultIconApp = {0x10208181}; // uid of CustomiseDefaultIconApp. +const TInt KDelayForOnDemand = 20000; //a small delay +const TInt KDelay = 4000000; // Most apparc tests have 2.5 secs wait time to let apparc update the app-list, but on safer side let us give 4 secs. +const TInt KViewCount = 3; // Total no of views in tstapp + + +/** + Auxiliary Fn for Test Case ID T-LocaleStep-TestAllLanguages + + This method loads the required DLL for the language specified as argument + and changes the locale accordingly. + +*/ +void CT_LocaleStep::ChangeLocaleL(TLanguage aLanguage) + { + _LIT(KLitLocaleDllNameBase, "ELOCL"); + _LIT(KLitLocaleDllNameExtension, ".LOC"); + RLibrary localeDll; + TBuf<16> localeDllName(KLitLocaleDllNameBase); + CleanupClosePushL(localeDll); + const TUidType uidType(TUid::Uid(0x10000079),TUid::Uid(0x100039e6)); + _LIT(TwoDigExt,".%02d"); + localeDllName.AppendFormat(TwoDigExt, aLanguage); + TInt error=localeDll.Load(localeDllName, uidType); + if (error==KErrNotFound) + { + localeDllName=KLitLocaleDllNameBase; + localeDllName.Append(KLitLocaleDllNameExtension); + error=localeDll.Load(localeDllName, uidType); + } + User::LeaveIfError(error); + User::LeaveIfError(UserSvr::ChangeLocale(localeDllName)); + CleanupStack::PopAndDestroy(); // localeDll + } + +// CheckIcons is a function used in testcase TestLocaleDefaultIconL to check the size of the default icons +void CT_LocaleStep::CheckIcons(CArrayFixFlat* aNewIconSizes,TSize aSmall,TSize aMedium,TSize aLarge, TSize& afstIcon, TSize& asecIcon, TSize& atrdIcon) + { + afstIcon = (*aNewIconSizes)[0]; + asecIcon = (*aNewIconSizes)[1]; + atrdIcon = (*aNewIconSizes)[2]; + TEST((afstIcon==aSmall) || (afstIcon==aMedium) || (afstIcon==aLarge) && ((afstIcon!=asecIcon) && (afstIcon!=atrdIcon))); + TEST((asecIcon==aSmall) || (asecIcon==aMedium) || (asecIcon==aLarge) && ((asecIcon!=afstIcon) && (asecIcon!=atrdIcon))); + TEST((atrdIcon==aSmall) || (atrdIcon==aMedium) || (atrdIcon==aLarge) && ((atrdIcon!=afstIcon) && (atrdIcon!=asecIcon))); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0070 + + @SYMPREQ + + @SYMTestCaseDesc Test whether the default app icons change with respect to the locale/language. + This testcase checks whether BaflUtils::NearestLanguageFile is called when the locale has been changed. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call User::Language() to check that the default locale is English; Call CT_LocaleStep::CheckIcons + to check the size of the current default icons; Call UserSvr::ChangeLocale to change the Locale to French; + Call CT_LocaleStep::CheckIcons to check the size of the new icons; Restore the file system and the locale + and check if the icons are restored. + API Calls:\n + + @SYMTestExpectedResults Returns KErrNone + */ +void CT_LocaleStep::TestLocaleDefaultIconL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0070: TestLocaleDefaultIconL started...")); + + TInt ret = 0; + + //first checks that language is not currently set to French (any other language except English since English is the default language + TEST(User::Language()!=ELangFrench); + + // getappiconsizes must be called to check if the icons are the default ones + // KUidCustomiseDefaultIconApp - uid of CustomiseDefaultIconApp_reg.RSS; this app has a localisable resource file, CustomiseDefaultIconApp_loc.RSS, that does not define any icon + // Hence, the default icons must be picked up when the language changes to French. The default icons for French are defined in default_app_icon.m02 + + CArrayFixFlat* newIconSizes = new(ELeave) CArrayFixFlat(3); + CleanupStack::PushL(newIconSizes); + TRAP(ret,iLs.GetAppIconSizes(KUidCustomiseDefaultIconApp, *newIconSizes)); + TEST(ret==KErrNone); + TEST(newIconSizes->Count()!=0); + // these are the sizes of the default icons + TSize small(24,24); + TSize medium(32,32); + TSize large(48,48); + TSize fstIcon; + TSize secIcon; + TSize trdIcon; + CheckIcons(newIconSizes, small, medium,large, fstIcon, secIcon, trdIcon); + + // Change the locale to French + TRAP(ret,ChangeLocaleL(ELangFrench)); + TEST(ret==KErrNone); + TEST(User::Language()==ELangFrench);//checks that the language has been set to French + + //Wait for a small period to let apparc receive language change notification + User::After(KDelayForOnDemand); + //call getappiconsizes to see if the new icons have been changed as as expected + // The size of the icons indicates whether the icon corresponding to French Locale has been picked up + newIconSizes->Reset(); + TRAP(ret,iLs.GetAppIconSizes(KUidCustomiseDefaultIconApp, *newIconSizes)); + TEST(ret==KErrNone); + TEST(newIconSizes->Count()!=0); + small.SetSize(25,25); + medium.SetSize(35,35); + large.SetSize(50,50); + CheckIcons(newIconSizes, small, medium,large, fstIcon, secIcon, trdIcon); + + //have to restore the locale before exiting the testcase + TRAP(ret,ChangeLocaleL(ELangEnglish)); + TEST(ret==KErrNone); + TEST(User::Language()==ELangEnglish); + + //Again wait for a small period to let apparc receive language change notification + User::After(KDelayForOnDemand); + + //call getappiconsizes to see if the new icons have been changed as as expected + // The size of the icons indicates whether the icon corresponding to English Locale has been picked up + newIconSizes->Reset(); + TRAP(ret,iLs.GetAppIconSizes(KUidCustomiseDefaultIconApp, *newIconSizes)); + TEST(ret==KErrNone); + TEST(newIconSizes->Count()!=0); + small.SetSize(24,24); + medium.SetSize(32,32); + large.SetSize(48,48); + CheckIcons(newIconSizes, small, medium,large, fstIcon, secIcon, trdIcon); + + // Icon cleanup + CleanupStack::PopAndDestroy(newIconSizes); + newIconSizes=NULL; + INFO_PRINTF1(_L("APPFWK-APPARC-0070: TestLocaleDefaultIconL finished...")); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0061 + + @SYMPREQ CR0902 - Enable Dynamic Language Switching in APPARC. + + @SYMTestCaseDesc Test whether caption, short caption and app icon, is updated with respect to the change + in locale/language. This test case checks on language change event apparc updates application + localisable information for all installed applications, without forcing a change in the part of + file system which apparc monitors. + This test also tests, on a language change event, application's localisable information is + updated immediately, if not yet updated by the re-scan (On demand loading). This is done by not + giving enough time to finish rescan of app-list. + + @SYMTestPriority Critical + + @SYMTestStatus Implemented + + @SYMTestActions Check if language is English by calling User::Language(). + + 1. Call GetAppInfo() by passing an application's UID which provides support for multiple languages. + Check if the caption and short caption, both are in English. Change locale to French. + 2. Call GetAppIcon() by passing same application's UID. Check app icons are same as sepcified in + app icon file for English locale. + + Wait for a small period (20 milli seconds) to let apparc receive language change notification. + Again - + 1. Call GetAppInfo() by passing same application's UID and check if the caption and short caption, + both are in French. + 2. Call GetAppIcon() by passing same application's UID. Check app icons are same as sepcified in + app icon file for French locale. + + Restore locale to English and again check - + 1. If caption and short caption are in English after a call to GetAppInfo() for the same application. + 2. Call GetAppIcon() by passing same application's UID. Check app icons are same as sepcified in + app icon file for English locale. + + @SYMTestExpectedResults + 1. GetAppInfo() should fetch caption and short caption in the newly-set language. + 2. GetAppIcon() should fetch icons from the icon file selected for current locale. + */ +void CT_LocaleStep::TestLocaleApplicationInfoOnDemandL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0061: TestLocaleApplicationInfoOnDemandL started...")); + TestAppInfoL(ETrue); + INFO_PRINTF1(_L("APPFWK-APPARC-0061: TestLocaleApplicationInfoOnDemandL finished...")); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0062 + + @SYMPREQ CR0902 - Enable Dynamic Language Switching in APPARC. + + @SYMTestCaseDesc Test whether caption, short caption and app icon, is updated with respect to the change in + locale/language. This test case checks on language change event apparc updates application localisable + information for all installed applications, without forcing a change in the part of file system which + apparc monitors. + + @SYMTestPriority Critical + + @SYMTestStatus Implemented + + @SYMTestActions Check if language is English by calling User::Language(). + + 1. Call GetAppInfo() by passing an application's UID which provides support for multiple languages. + Check if the caption and short caption, both are in English. Change locale to French. + 2. Call GetAppIcon by passing same application's UID. Check app icons are same as sepcified in + app icon file for English locale. + + Change locale to French. Wait for some time (e.g. 4 seconds) to let apparc complete rescanning of app-list. + Again - + 1. Call GetAppInfo() by passing same application's UID and check if the caption and short caption, + both are in French. + 2. Call GetAppIcon() by passing same application's UID. Check app icons are same as sepcified in + app icon file for French locale. + + Restore locale to English and again check - + 1. If caption and short caption are in English after a call to GetAppInfo() for the same application. + 2. Call GetAppIcon() by passing same application's UID. Check app icons are same as sepcified in + app icon file for English locale. + + @SYMTestExpectedResults + 1. GetAppInfo() should fetch caption and short caption in the newly-set language. + 2. GetAppIcon() should fetch icons from the icon file selected for current locale. + */ +void CT_LocaleStep::TestLocaleApplicationInfoL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0062: TestLocaleApplicationInfoL started...")); + TestAppInfoL(EFalse); + INFO_PRINTF1(_L("APPFWK-APPARC-0062: TestLocaleApplicationInfoL finished...")); + } + +/** + This function performs steps to test application related information (caption, short caption and app icon) + on language change event . + It is called from TestLocaleApplicationInfoOnDemandL and TestLocaleApplicationInfoL. + + @param aOnDemand Pass true if on demand loading is required, otherwise false. +*/ +void CT_LocaleStep::TestAppInfoL(TBool aOnDemand) + { + TInt ret = RFbsSession::Connect(); + TEST(ret == KErrNone); + + // If it is on-demand loading delay would be very less. + TInt delay = aOnDemand ? KDelayForOnDemand : KDelay; + + // Check language is not currently set to French (any other language except English since English is the default language. + TEST(User::Language() != ELangFrench); + + // Caption and Short-caption should be same as defined in English localisable strings file (tstapp01.rls) + _LIT(KCaptionEng, "TstCap UK"); + _LIT(KShortCaptionEng, "TC UK"); + + // Call GetAppInfo() by passing KUidTestApp as tstapp's UID. tstapp provides support for multiple languages. + TApaAppInfo appInfo; + ret = iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(ret == KErrNone); + + // Caption and short-caption should be in English. + TEST(appInfo.iCaption == KCaptionEng); + TEST(appInfo.iShortCaption == KShortCaptionEng); + + // Test application's icons, should be same as sepcified in app icon file for English locale. + TestAppIconL(TSize(40,55)); + + // Change the locale to French + TRAP(ret, ChangeLocaleL(ELangFrench)); + TEST(ret == KErrNone); + TEST(User::Language() == ELangFrench);//check language is set to French + + // Caption and Short-caption should be same as defined in French localisable strings file (tstapp02.rls) + _LIT(KCaptionFrench, "TstCap FR"); + _LIT(KShortCaptionFrench, "TC FR"); + + User::After(delay); + + // Again call GetAppInfo() by passing KUidTestApp as UID. + ret = iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(ret == KErrNone); + + // Caption and short-caption should be in French. + TEST(appInfo.iCaption == KCaptionFrench); + TEST(appInfo.iShortCaption == KShortCaptionFrench); + + // Test application's icons, should be same as sepcified in app icon file for French locale. + TestAppIconL(TSize(50,50)); + + // Restore locale before exiting the testcase. + TRAP(ret, ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + TEST(User::Language() == ELangEnglish); + + User::After(delay); + + ret = iLs.GetAppInfo(appInfo, KUidTestApp); + TEST(ret == KErrNone); + + // Caption and short-caption should again be in English. + TEST(appInfo.iCaption == KCaptionEng); + TEST(appInfo.iShortCaption == KShortCaptionEng); + + // Test application's icons, should be same as sepcified in app icon file for English locale. + TestAppIconL(TSize(40,55)); + + RFbsSession::Disconnect(); + } +/** + This function tests application's icon. It is called from TestAppInfoL function. +*/ +void CT_LocaleStep::TestAppIconL(TSize aSize) + { + CApaMaskedBitmap* icon = CApaMaskedBitmap::NewLC(); + TSize lastSize(0,0); + + TInt ret = iLs.GetAppIcon(KUidTestApp, aSize, *icon); + TEST(ret == KErrNone); + // Returned icon size should be exactly same as asked. + TEST(icon->SizeInPixels().iWidth * icon->SizeInPixels().iHeight == aSize.iWidth * aSize.iHeight); + + CleanupStack::PopAndDestroy(icon); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0063 + + @SYMPREQ CR0902 - Enable Dynamic Language Switching in APPARC. + + @SYMTestCaseDesc Test whether caption and short caption remains same on language change, if application + does not provide support for multiple languages. + + @SYMTestPriority Critical + + @SYMTestStatus Implemented + + @SYMTestActions Check if language is English by calling User::Language(). Call GetAppInfo() by passing an + application's UID which does not provide support for multiple languages. Check if the caption and short + caption, both are in English. Change locale to French.Wait for a small period (20 milli seconds) to let + apparc receive language change notification. Again Call GetAppInfo() by passing same application's UID and + check if the caption and short caption, both are still in English. Restore locale to English and again check + if caption and short caption are in English after a call to GetAppInfo() for the same application. + + @SYMTestExpectedResults GetAppInfo() should fetch caption and short caption in the same language. + */ +void CT_LocaleStep::TestLocaleApplicationInfo1L() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0063: TestLocaleApplicationInfo1L started...")); + TInt ret = KErrNotFound; + + // Check language is not currently set to French (any other language except English since English is the default language. + TEST(User::Language() != ELangFrench); + + // Caption and Short-caption should be same as defined in the localisable resource file. (CustomiseDefaultIconApp_loc.RSS) + _LIT(KCaptionEng, "CustomiseDefaultIconAppLong"); + _LIT(KShortCaptionEng, "CustomiseDefaultIconApp"); + + // KUidCustomiseDefaultIconApp - uid of CustomiseDefaultIconApp_reg.RSS; this app does not provide support for multiple languages. + + // Call GetAppInfo() by passing above UID. + TApaAppInfo appInfo; + ret = iLs.GetAppInfo(appInfo, KUidCustomiseDefaultIconApp); + TEST(ret == KErrNone); + + // Caption and short-caption should be in English. + TEST(appInfo.iCaption == KCaptionEng); + TEST(appInfo.iShortCaption == KShortCaptionEng); + + // Change the locale to French + TRAP(ret,ChangeLocaleL(ELangFrench)); + TEST(ret == KErrNone); + TEST(User::Language() == ELangFrench);//check language is set to French. + + // Wait for a small period (20 milli seconds) to let apparc receive language change notification. + User::After(KDelayForOnDemand); + + // Again call GetAppInfo() by passing KUidTestApp as UID. + ret = iLs.GetAppInfo(appInfo, KUidCustomiseDefaultIconApp); + TEST(ret == KErrNone); + + // Caption and short-caption should be in English. + TEST(appInfo.iCaption == KCaptionEng); + TEST(appInfo.iShortCaption == KShortCaptionEng); + + // Restore locale before exiting the testcase. + TRAP(ret,ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + TEST(User::Language() == ELangEnglish); + + User::After(KDelayForOnDemand); + ret = iLs.GetAppInfo(appInfo, KUidCustomiseDefaultIconApp); + TEST(ret == KErrNone); + + // Caption and short-caption should be in English again. + TEST(appInfo.iCaption == KCaptionEng); + TEST(appInfo.iShortCaption == KShortCaptionEng); + + INFO_PRINTF1(_L("APPFWK-APPARC-0063: TestLocaleApplicationInfo1L finished...")); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0064 APPFWK-APPARC-0066 APPFWK-APPARC-0068 + + @SYMPREQ CR0902 - Enable Dynamic Language Switching in APPARC. + + @SYMTestCaseDesc Test whether + 1. View's caption is updated with respect to the change in locale/language. + 2. View's icons is updated with respect to the change in locale/language. + 3. View's icon file name changes with respect to the change in locale/language. + + This test case checks apparc updates application localisable information for all installed applications + on language change event without forcing a change in the part of file system which apparc monitors. + This test also tests, on a language change event, application's localisable information is updated + immediately, if not yet updated by the re-scan (On demand loading). This is done by not giving enough + time to finish rescan of app-list. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Check if language is English by calling User::Language(). Call GetAppViews() by passing + an application's UID which provides support for multiple languages and different size icons for French + language. + + 1. Check if all view captions are same as specified in localisable file and in English. + 2. Call GetAppViewIcon() passing above application's ID. Check view icon size, it should be as + specified in English icon file. + 3. Call overload of GetAppViewIcon() which returns view's icon file, passing above application's ID. + + Change locale to French.Wait for a small period (20 milli seconds) to let apparc receive language change + notification. Again - + + 1. Call GetAppViews() by passing same application's UID and check if the view captions for all views + are in French. + 2. Call GetAppViewIcon() by passing same application's UID.Check view icon size, it should be as specified + in French icon file. + 3. Call GetAppViewIcon() by passing same application's UID. Check view icon file, it should be same as + specified in French locale. + + Restore locale to English and again check + 1. if view captions are same as specified in English resource file. + 2. if view icon size is same as specified in English icon file. + 3. if view icon file is same as specified in English resource file. + + @SYMTestExpectedResults Following are the expected results. + 1. GetAppViews() should fetch captions for all views in the newly-set language. + 2. GetAppViewIcon() should fetch icons specified in the newly-set language. + 3. GetAppViewIcon() should fetch view's icon file specified in the newly-set language. + */ +void CT_LocaleStep::TestLocaleViewCaptionAndIconOnDemandL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0064: TestLocaleViewCaptionOnDemandL started...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0066: TestLocaleViewIconSizeOnDemandL started...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0068: TestLocaleViewIconFileOnDemandL started...")); + TestViewCaptionAndIconL(ETrue); + INFO_PRINTF1(_L("APPFWK-APPARC-0064: TestLocaleViewCaptionOnDemandL finished...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0066: TestLocaleViewIconSizeOnDemandL finished...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0068: TestLocaleViewIconFileOnDemandL finished...")); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0065 APPFWK-APPARC-0067 APPFWK-APPARC-0069 + + @SYMPREQ CR0902 - Enable Dynamic Language Switching in APPARC. + @SYMDEF PDEF113054 - Apparc fails to detect the presence of localized Mbm files + + @SYMTestCaseDesc Test whether + 1. View's caption changes with respect to the change in locale/language. + 2. View's icons is updated with respect to the change in locale/language. + 3. View's icon file name changes with respect to the change in locale/language. + + This test case checks apparc updates application localisable information for all installed applications + on language change event without forcing a change in the part of file system which apparc monitors. + + It checks for localized MBM files and MBM icon files with generic extension for an application. + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Check if language is English by calling User::Language(). Call GetAppViews() by passing + an application's UID which provides support for multiple languages and different size icons for French + language. + 1. Check if all view captions are same as specified in localisable file and in English. + 2. Call GetAppViewIcon() passing above application's ID. Check view icon size, it should be as + specified in English icon file. + 3. Call overload of GetAppViewIcon() which returns view's icon file, passing above application's ID. + + Change locale to French. Wait for some time (e.g. 4 seconds) to let apparc complete rescanning of app-list. + Again - + 1. Call GetAppViews() by passing same application's UID and check if the view captions for all views + are in French. + 2. Call GetAppViewIcon() by passing same application's UID.Check view icon size, it should be as specified + in French icon file. + 3. Call GetAppViewIcon() by passing same application's UID. Check view icon file, it should be same as + specified in French locale. + + Restore locale to English and again check - + 1. if view captions are same as specified in English resource file. + 2. if view icon size is same as specified in English icon file. + 3. if view icon file is same as specified in English resource file. + + @SYMTestExpectedResults Following are the expected results. + 1. GetAppViews() should fetch captions for all views in the newly-set language. + 2. GetAppViewIcon() should fetch icons specified in the newly-set language. + 3. GetAppViewIcon() should fetch view's icon file specified in the newly-set language. + */ + void CT_LocaleStep::TestLocaleViewCaptionAndIconL() + { + INFO_PRINTF1(_L("APPFWK-APPARC-0065: TestLocaleViewCaption started...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0067: TestLocaleViewIconSizeL started...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0069: TestLocaleViewIconFileL started...")); + TestViewCaptionAndIconL(EFalse); + INFO_PRINTF1(_L("APPFWK-APPARC-0065: TestLocaleViewCaption finished...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0067: TestLocaleViewIconSizeL finished...")); + INFO_PRINTF1(_L("APPFWK-APPARC-0069: TestLocaleViewIconFileL finished...")); + } + + +/** + This function performs steps to test view related information (view caption, view icon size and view icon + file name) on language change event. + and view icon file name. + + This function is called from following test cases - + TestLocaleViewCaptionAndIconOnDemandL, + TestLocaleViewCaptionAndIconL + + @param aTesCaption Pass true if caption test is required, otherwise false for view icon test. + @param aOnDemand Pass true if on demand loading is required, otherwise false. +*/ +void CT_LocaleStep::TestViewCaptionAndIconL(TBool aOnDemand) + { + TInt ret = RFbsSession::Connect(); + TEST(ret == KErrNone); + + // If it is on-demand loading delay would be very less. + TInt delay = aOnDemand ? KDelayForOnDemand : KDelay; + + // Check language is not currently set to French (any other language except English since English is the default language. + TEST(User::Language() != ELangFrench); + + // Create view array to hold views for TstApp. + CApaAppViewArray* appViews = new(ELeave) CApaAppViewArray(KViewCount); + CleanupStack::PushL(appViews); + + // Call GetAppViews() by passing tstapp's KUidTestApp as UID. + // tstapp provides support for multiple languages. + ret = iLs.GetAppViews(*appViews, KUidTestApp); + TEST(ret == KErrNone); + + // Check application's view count. It should have three views.One of them is invalid + TInt count = appViews->Count(); + TEST(count == KViewCount); + + // Check application's view's captions or icons. They should be in English + CheckViewCaptionAndIconL(ELangEnglish, appViews); + CleanupStack::PopAndDestroy(appViews); + + // Switch locale to French + TRAP(ret, ChangeLocaleL(ELangFrench)); + TEST(ret == KErrNone); + TEST(User::Language() == ELangFrench);//check language is set to French + + // Wait for a small period to let apparc receive language change notification. + User::After(delay); + + // Create view array to hold views for TstApp. + appViews = NULL; + appViews = new(ELeave) CApaAppViewArray(KViewCount); + CleanupStack::PushL(appViews); + + ret = iLs.GetAppViews(*appViews, KUidTestApp); + TEST(ret == KErrNone); + + count = appViews->Count(); + TEST(count == KViewCount); + + //Check application's view's captions or icons. They should be in French. + CheckViewCaptionAndIconL(ELangFrench, appViews); + CleanupStack::PopAndDestroy(appViews); + + //Restore locale to English before exiting the testcase + TRAP(ret, ChangeLocaleL(ELangEnglish)); + TEST(ret == KErrNone); + TEST(User::Language() == ELangEnglish); + + User::After(delay); + + appViews = NULL; + appViews = new(ELeave) CApaAppViewArray(KViewCount); + CleanupStack::PushL(appViews); + ret = iLs.GetAppViews(*appViews, KUidTestApp); + + TEST(ret == KErrNone); + count = appViews->Count(); + TEST(count == KViewCount); + + //check every thing is restored to English. + CheckViewCaptionAndIconL(ELangEnglish, appViews); + CleanupStack::PopAndDestroy(appViews); + RFbsSession::Disconnect(); + } + +/** + Tests view's caption and view's icon. + It is called from TestViewCaptionAndIconL function. + This function is hardcoded to test view captions and icons for two languages - + ELangEnglish and ELangFrench, + if any other language is passed from any test case, this function will cause the test case to fail. + + @param aLanguage Language for which to test caption/icon. + @param aAppViews application's view array. +*/ +void CT_LocaleStep::CheckViewCaptionAndIconL(TLanguage aLanguage, CApaAppViewArray* aAppViews) + { + TInt testNumberOfIcons=KViewCount-1; + // the for loop will check for all view icons except the last one which is invalid + // Hence the upper limit is KViewCount-1 + for (TInt ii=0; ii < testNumberOfIcons ; ii++) + + { + const TApaAppViewInfo& viewInfo = (*aAppViews)[ii]; + TEST(viewInfo.iViewCaption.Length() > 0); + TBuf<256> viewCaption; + TBuf<256> viewIconFileName; + TSize iconSize; + + switch(aLanguage) + { + case ELangEnglish: + viewCaption.Format(_L("V%d UK"), ii+1); + iconSize.iWidth = 50; + iconSize.iHeight = 50; + break; + + case ELangFrench: + viewCaption.Format(_L("V%d FR"), ii+1); + iconSize.iWidth = 40; + iconSize.iHeight = 55; + break; + + default: + // This case will cause test case to fail if any other language is passed apart from English and French. + break; + } + + // View's captions should be same as defined in language's localisable strings file (tstappXX.rls) + TEST(viewInfo.iViewCaption == viewCaption); + + // View's icon size should be same as defined in icon file for the selected locale/language. + CApaMaskedBitmap* viewBitmap = CApaMaskedBitmap::NewLC(); + TInt ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, iconSize, *viewBitmap); + TEST(ret == KErrNone); + CleanupStack::PopAndDestroy(viewBitmap); + + // View's icon file should be same as defined in language's localisable strings file (tstappXX.rls) + HBufC* fullFileName = NULL; + ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, fullFileName); + TEST(ret == KErrNone); + TEST(fullFileName != NULL); + INFO_PRINTF2(_L("View's icon file name is - %S"), fullFileName); + TEST(fullFileName->Length() > 0); + + delete fullFileName; + fullFileName = NULL; + } //end of for +/*The invalid View icon for language French has the file name "tstappview.mbm" This should +return KErrNotSupported. Refer to PDEF113054 for details */ + if (aLanguage==ELangFrench) + { + TSize iconSize; + const TApaAppViewInfo& viewInfo = (*aAppViews)[2]; + CApaMaskedBitmap* viewBitmap = CApaMaskedBitmap::NewLC(); + TInt ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, iconSize, *viewBitmap); + TEST(ret == KErrNotSupported); + CleanupStack::PopAndDestroy(viewBitmap); + HBufC* fullFileName = NULL; + ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, fullFileName); + TEST(ret == KErrNone); + TEST(fullFileName != NULL); + INFO_PRINTF2(_L("Negative View icon file name is - %S"), fullFileName); + TEST(fullFileName->Length() > 0); + delete fullFileName; + fullFileName = NULL; + } + } + +CT_LocaleStep::~CT_LocaleStep() +/** + Destructor + */ + { + } + +CT_LocaleStep::CT_LocaleStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_LocaleStep); + } + +TVerdict CT_LocaleStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_LocaleStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +TVerdict CT_LocaleStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ +{ + INFO_PRINTF1(_L("Locale tests started")); + + FbsStartup(); + TEST(KErrNone == iFs.Connect()); + TEST(KErrNone == iLs.Connect()); + + // run the tests + //DONT_CHECK due to changes to file system + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestLocaleApplicationInfoOnDemandL() ,NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestLocaleApplicationInfoL() ,NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestLocaleApplicationInfo1L() ,NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestLocaleViewCaptionAndIconOnDemandL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestLocaleViewCaptionAndIconL() ,NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestLocaleDefaultIconL() ,NO_CLEANUP); + + iLs.Close(); + iFs.Close(); + + INFO_PRINTF1(_L("Test completed!")); + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_LocaleStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_LocaleStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,68 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_LOCALE_STEP_H__) +#define __T_LOCALE_STEP_H__ + +#include "ApparcTestServer.h" +#include +#include "testableapalssession.h" + +//! A CT_LocaleStep test class. + +/** Class tests for UIKON GT0143 Typhoon Work Series 60 Changes. +It also tests CR0902 work : Enable Dynamic Language Switching in APPARC. +*/ + +class CT_LocaleStep : public CTestStep + { +public: + CT_LocaleStep(); + ~CT_LocaleStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); +private: + void ChangeLocaleL(TLanguage aLanguage); + void CheckIcons(CArrayFixFlat* aNewIconSizes,TSize aSmall,TSize aMedium,TSize aLarge, TSize& afstIcon, TSize& asecIcon, TSize& atrdIcon); + void TestLocaleDefaultIconL(); + + //Functions to test application information on language change event. + void TestLocaleApplicationInfoOnDemandL(); + void TestLocaleApplicationInfoL(); + void TestLocaleApplicationInfo1L(); + void TestAppInfoL(TBool aOnDemand); + void TestAppIconL(TSize aSize); + + //Functions to test view's caption and icons on language change event. + void TestLocaleViewCaptionAndIconOnDemandL(); + void TestLocaleViewCaptionAndIconL(); + void TestViewCaptionAndIconL(TBool aOnDemand); + void CheckViewCaptionAndIconL(TLanguage aLanguage, CApaAppViewArray* aAppViews); + +private: + RFs iFs; + RTestableApaLsSession iLs; + }; + +_LIT(KT_LocaleStep,"T_Locale"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MRUStep.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MRUStep.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,338 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test MRU list\n +// Tests MRU list by calling CApaProcess::SetMainDocFileName().\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include "tstapp.h" +#include +#include +#include +#include +#include +#include "T_MruStep.h" + +#if !defined(__E32TEST_H__) +#include +#endif + + +void CT_MruStep::setup() + { +#if defined(__EPOC32__) + // if we're on the rack create the directories we need + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + TFullName tempPath=_L("c:\\system\\temp\\"); + TParse parser; + parser.Set(filePath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); + parser.Set(tempPath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); +#endif + } + + +/** + @SYMTestCaseID T-MruStep-TestMRUL + + @SYMPREQ + + @SYMTestCaseDesc Test MRU list by calling CApaProcess::SetMainDocFileName() multiple times. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test MRU list by calling CApaProcess::SetMainDocFileName() + in the following cases:\n + (1) Call CApaProcess::SetMainDocFileName() with no document created.\n + (2) Call CApaProcess::SetMainDocFileName() after document creation. \n + (3) Create a document for tstapp. Call CApaProcess::SetMainDocFileName() + multiple times using the same filename to be set in the + Most Recently Used (MRU) list. Ensure that only once the list is updated + with the filename.\n + (4) Create a document for tstapp. Call CApaProcess::SetMainDocFileName() + multiple times using different filename to be set in the + Most Recently Used (MRU) list on each attempt. Ensure that only a + maximum of 50 filenames are present.\n + (5) Open MRU.DAT and then call CApaProcess::SetMainDocFileName(). + The filename set should not appear in MRU list since MRU.DAT is open.\n + (6) Create a document for tstapp. Call CApaProcess::SetMainDocFileName() + multiple times when there is no memory available on the device. + The MRU list should not reflect the newly set file name.\n + (7) Test CApaRecentFile::GetRecentFileL() by passing KNullUid. + Ensure that all entries for those last used documents are retrieved + when KNullUid is passed.\n + (8) Test CApaRecentFile::GetRecentFileListL() to ensure that it returns NULL.\n + In the above mentioned situations tests ensure that + there are no memory leaks.\n\n + API Calls:\n + CApaProcess::SetMainDocFileName(const TDesC& aMainDocFileName)\n + CApaRecentFile::GetRecentFileL(RFs& aFs, TUid aAppUid, TInt aIndex)\n + CApaRecentFile::GetRecentFileListL(RFs& aFs, TUid aAppUid)\n + + @SYMTestExpectedResults Each of the tests should complete with the desired + output and without any memory leaks. + + */ +void CT_MruStep::TestMRUL() + { + CApaProcess* process=NULL; + CApaDocument* doc=NULL; + + // Test 1 + INFO_PRINTF1(_L("SetMainDocFileName with no document")); + __UHEAP_RESET; + __UHEAP_MARK; + process = CApaProcess::NewL(iFs); + process->SetMainDocFileName(_L("FileName 01")); + delete process; + __UHEAP_MARKEND; + + // test 2 + INFO_PRINTF1(_L("SetMainDocFileName after document construction")); + + __UHEAP_RESET; + __UHEAP_MARK; + + // Create document + process = CApaProcess::NewL(iFs); + TApaApplicationFactory appFact(KUidTestApp); + doc = process->AddNewDocumentL(appFact); + + // Set file name into MRU list + process->SetMainDocFileName(_L("FileName 02")); + process->DestroyDocument(doc); + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + + // test 3 + INFO_PRINTF1(_L("SetMainDocFileName x100 with same filename")); + TInt count; + + __UHEAP_RESET; + __UHEAP_MARK; + + process = CApaProcess::NewL(iFs); + doc = process->AddNewDocumentL(appFact); + + // Set file name into MRU list - this name should only appear once + for (count=0; count<100; count++) + process->SetMainDocFileName(_L("FileName 03")); + + process->DestroyDocument(doc); + delete process; + + REComSession::FinalClose(); + __UHEAP_MARKEND; + + // test 4 + INFO_PRINTF1(_L("SetMainDocFileName x100 with different filenames")); + + __UHEAP_RESET; + __UHEAP_MARK; + + process = CApaProcess::NewL(iFs); + doc = process->AddNewDocumentL(appFact); + + /** Set file name into MRU list - there should only be a maximum of 50 names in the list */ + TBuf<20> fileName; + + for (count=0; count < 100; count++) + { + fileName.Zero(); + fileName.AppendFormat(_L("FileName %d"),count); + + process->SetMainDocFileName(fileName); + } + + process->DestroyDocument(doc); + delete process; + + REComSession::FinalClose(); + __UHEAP_MARKEND; + + + // test 7 + INFO_PRINTF1(_L("Testing GetRecentFileL with KNullUid")); + + __UHEAP_RESET; + __UHEAP_MARK; + + process = CApaProcess::NewL(iFs); + doc = process->AddNewDocumentL(appFact); + + process->DestroyDocument(doc); + delete process; + + REComSession::FinalClose(); + __UHEAP_MARKEND; + + // MRU functionality has been removed in 7.0s test that GetRecentFile returns NULL + // test 8 + INFO_PRINTF1(_L("Testing GetRecentFileListL returns NULL")); + + __UHEAP_RESET; + __UHEAP_MARK; + + process = CApaProcess::NewL(iFs); + doc = process->AddNewDocumentL(appFact); + + process->DestroyDocument(doc); + delete process; + + REComSession::FinalClose(); + __UHEAP_MARKEND; + } + + +/** + Auxiliary Fn for all Test Cases. + + This method creates and installs an active scheduler and puts the + test code onto the scheduler as a CIdle object. The method initiates + all tests by calling the static method CT-MruTestCallBackWrapper::CallBack(). + +*/ +void CT_MruStep::DoTestsInScheldulerLoopL() + { + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + // put the test code onto the scheduler as an idle object + CIdle* idle=CIdle::NewL(-20); + CleanupStack::PushL(idle); + + CT_MruTestCallBackWrapper* callBack = new(ELeave) CT_MruTestCallBackWrapper(this); + CleanupStack::PushL(callBack); + + idle->Start(TCallBack(CT_MruTestCallBackWrapper::CallBack,callBack)); + // start the test code + CActiveScheduler::Start(); + + // all outstanding requests complete - kill the scheduler + CleanupStack::PopAndDestroy(3); //scheduler, callBack, idle + } + + +CT_MruTestCallBackWrapper::CT_MruTestCallBackWrapper(CT_MruStep* aTestStep) +/** + Constructor + */ + { + iTestStep=aTestStep; + } + +CT_MruTestCallBackWrapper::~CT_MruTestCallBackWrapper() +/** + Destructor + */ + { + } + +TInt CT_MruTestCallBackWrapper::CallBack(TAny* aPtr) +/** + This static method is the callback function of CIdle object.The method + calls the non-static method TestMRUL() which initiates all the tests. +*/ + { + __UHEAP_MARK; + + TRAPD(r,((CT_MruTestCallBackWrapper *)aPtr)->iTestStep->TestMRUL()); + __ASSERT_ALWAYS(!r,User::Panic(_L("TestMRUL"),r)); + __UHEAP_MARKEND; + + CActiveScheduler::Stop(); + return EFalse; // don't call back again + } + +CT_MruStep::~CT_MruStep() +/** + Destructor + */ + { + } + +CT_MruStep::CT_MruStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_MruStep); + } + +TVerdict CT_MruStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_MruStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +TVerdict CT_MruStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + INFO_PRINTF1(_L("Testing Apparch...T_Mru")); + + // set up an fbs + FbsStartup(); + TInt ret=RFbsSession::Connect(); + TEST(!ret); + + // set up the directory structure + iFs.Connect(); + setup(); + + // run the testcode + TRAP(ret,DoTestsInScheldulerLoopL()) + TEST(ret==KErrNone); + + iFs.Close(); + + INFO_PRINTF1(_L("Testing T_Mru Completed!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MdrStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MdrStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,544 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test for CApaDoor and CApaModelDoor Apis\n +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include +#include +#include +#include +#include +#include +// +#include +#include +#include "tstapp.h" +#include "T_MdrStep.h" +// +#include + +/** + Auxiliary Fn for Test Case ID T-MdrStep-testModelDoorL, + T-MdrStep-testConversionL + + This method overrides CApaModelHeader::AppId(). It returns a + TApaAppIdentifier object which identifies the application. + +*/ +TApaAppIdentifier CTestModelHeader::AppId()const + { + TFileName dllname=_L("tstapp.app"); + #define KTestAppId TApaAppIdentifier(KUidTestApp,dllname) + return KTestAppId; + } + + +/** + Auxiliary Fn for Test Case ID T-MdrStep-testModelDoorL, + T-MdrStep-testConversionL + + This method overrides CApaModelHeader::StoreL().It stores the + data in the stream to a store. + +*/ +void CTestModelHeader::StoreL(CStreamStore& aStore,CStreamDictionary& aDict) const + { + // write out some data + RStoreWriteStream stream; + TStreamId id=stream.CreateLC(aStore); + stream.WriteInt32L(iData); + stream.WriteInt32L(0); // write testapp doc format - no subdocuments + stream.CommitL(); + aDict.AssignL(KUidTestAppHeadStream,id); + CleanupStack::PopAndDestroy(); // stream + } + + +/** + Auxiliary Fn for Test Case ID T-MdrStep-testModelDoorL, + T-MdrStep-testConversionL + + This method reads the data stored in the store. + +*/ +void CTestModelHeader::RestoreL(const CStreamStore& aStore,const CStreamDictionary& aDict) + { + // read in some data + RStoreReadStream stream; + stream.OpenLC(aStore,aDict.At(KUidTestAppHeadStream)); + iData = stream.ReadInt32L(); + CleanupStack::PopAndDestroy(); // stream + } + + +void CTestModelHeader::DetachFromStoreL(CPicture::TDetach /*aDetach*/) + {} + + +/** + Auxiliary Fn for Test Case ID T-MdrStep-testModelDoorL, + T-MdrStep-testConversionL + + This method overrides MApaModelHeaderFactory::NewHeaderL().It creates and + restores model header from the store. + +*/ +CApaModelHeader* TTestModelHeaderFactory::NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict, + const TApaAppIdentifier& aAppId)const + { + TFileName dllname=_L("tstapp.app"); + #define KTestAppId TApaAppIdentifier(KUidTestApp,dllname) + if (aAppId.iAppUid!=KTestAppId.iAppUid) + User::Leave(KErrNotSupported); + CTestModelHeader* header = new(ELeave) CTestModelHeader(); + CleanupStack::PushL(header); + header->RestoreL(aStore,aDict); + CleanupStack::Pop(); // header + return header; + } + + +/** + @SYMTestCaseID T-MdrStep-testModelDoorL + + @SYMPREQ + + @SYMTestCaseDesc Tests storing and restoring of Model door. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test creates a test model header and initializes its + member variable iData. A model door object is created by passing + application model wrapper object to be embedded to CApaModelDoor::NewL(). + A temporary store is created and CTestModelHeader::StoreL() is called to + store the model door. Call CApaModelDoor::NewL() specifying the store and + stream to restore the stored model door. Test values from the restored + model door.\n + API Calls:\n + CApaModelDoor::NewL(CApaModelHeader* aHeader)\n + CApaModelDoor::StoreL(CStreamStore& aStore) const\n + CApaModelDoor::NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory)\n + CApaModelDoor::ModelHeader()\n + + @SYMTestExpectedResults Test completes restoration of model door successfully. + + */ +void CT_MdrStep::testModelDoorL() + { + const TUid KTestSourceId={458}; + INFO_PRINTF1(_L("Creating a model door")); + + // create a model header + CTestModelHeader* header = new CTestModelHeader(); + TEST(header!=NULL); + header->iData = 7; + + // embed the header in a door + CApaModelDoor* door=NULL; + TRAPD(ret, door=CApaModelDoor::NewL(header) ); + TEST(ret==KErrNone); + + // set the source + door->SetSource(KTestSourceId); + + // create an in-memory store + CBufStore* store=NULL; + TRAP(ret, store=CBufStore::NewL(2) ); + TEST(ret==KErrNone); + + // store the door + INFO_PRINTF1(_L("Storing the model door")); + TStreamId id = TStreamId(NULL); + TRAP(ret, id=door->StoreL(*store) ); + TEST(ret==KErrNone); + delete door; // deletes header also + + // restore the door + INFO_PRINTF1(_L("Restoring the model door")); + TTestModelHeaderFactory factory; + TRAP(ret, door=CApaModelDoor::NewL(*store,id,&factory) ); + TEST(ret==KErrNone); + TEST( ((CTestModelHeader*)door->ModelHeader())->iData==7 ); + TEST((door->Source()==KTestSourceId)); + delete door; + delete store; + } + + +/** + @SYMTestCaseID T-MdrStep-testConversionL + + @SYMPREQ + + @SYMTestCaseDesc Tests conversion of door format to model door format and back. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a new document for the tstapp and create a door for the + document by calling CApaDoor::NewL(). Create a temporary store to store + the door format by calling CTestModelHeader::StoreL(). Restore the door + to a model door from the temporary store by calling CApaModelDoor::NewL(). + Delete the store and store the model door format to a newly created store. + Change the format and size of the model door by calling CApaModelDoor::SetFormat() + and CApaModelDoor::SetSizeInTwips(). Store the new model door format to + the temporary store. Restore the saved model door format to a new door. + Observe the conversion of format & size from the saved format to default + while it is restored as door.\n + API Calls:\n + CApaDoor::NewL(RFs& aFs,CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips)\n + CApaDoor::StoreL(CStreamStore& aStore) const\n + CApaModelDoor::NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory)\n + CApaModelDoor::StoreL(CStreamStore& aStore) const\n + CApaModelDoor::SetFormat(TFormat aFormat)\n + CApaModelDoor::SetSizeInTwips(const TSize& aSize)\n + + @SYMTestExpectedResults Test confirms that there is a conversion from the saved model format to + default format while it is restored as a door. + + */ +void CT_MdrStep::testConversionL() + { + INFO_PRINTF1(_L("Testing Conversions")); + const TUid KTestSourceId={458}; + + // set things up + TRAPD(ret,iProcess = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + CBufStore* store=NULL; + // + // create a door + INFO_PRINTF1(_L("Restoring a full door as a model door")); + CApaDocument* doc=NULL; + TRAP(ret,doc=iProcess->AddNewDocumentL(KUidTestApp)); + + TEST(ret==KErrNone); + doc->EditL(NULL); // increments value to 1 + CApaDoor* door=NULL; + TRAP(ret, door=CApaDoor::NewL(iFs,*doc,TSize(1000,1000)) ); + TEST(ret==KErrNone); + + // set the source + door->SetSource(KTestSourceId); + + // create an in-memory store + TRAP(ret, store=CBufStore::NewL(2) ); + TEST(ret==KErrNone); + + // store the door + TStreamId id = TStreamId(NULL); + TRAP(ret, id=door->StoreL(*store) ); + TEST(ret==KErrNone); + delete door; // deletes doc also + door = NULL; + doc = NULL; + + // restore the door into a model door + TTestModelHeaderFactory factory; + CApaModelDoor* modelDoor=NULL; + TRAP(ret, modelDoor=CApaModelDoor::NewL(*store,id,&factory) ); + TEST(ret==KErrNone); + TEST( ((CTestModelHeader*)modelDoor->ModelHeader())->iData==1 ); + TEST(modelDoor->Format()==CApaDoorBase::EIconic); + TEST(modelDoor->Source()==KTestSourceId); + TSize size; + modelDoor->GetSizeInTwips(size); + TEST(size==TSize(1000,1000)); + + // store the model door + INFO_PRINTF1(_L("Restoring a model door as a full door")); + delete store; + store = NULL; + TRAP(ret, store=CBufStore::NewL(2) ); + TEST(ret==KErrNone); + TRAP(ret, id=modelDoor->StoreL(*store) ); + TEST(ret==KErrNone); + + // restore the model door into a full door + TRAP(ret, door=CApaDoor::NewL(iFs,*store,id,*iProcess) ); + TEST(ret==KErrNone); + delete door; + door = NULL; + delete store; + store = NULL; + + // change the model door format to glass & store it + TRAP(ret, store=CBufStore::NewL(2) ); + TEST(ret==KErrNone); + modelDoor->SetFormat(CApaDoorBase::EGlassDoor); + modelDoor->SetSizeInTwips(TSize(2500,27)); + TRAP(ret, id=modelDoor->StoreL(*store) ); + TEST(ret==KErrNone); + + delete modelDoor; // deletes header also + modelDoor = NULL; + + // restore into a full door - this should switch the format to iconic and use the default icon size + TRAP(ret, door=CApaDoor::NewL(iFs,*store,id,*iProcess) ); + TEST(ret==KErrNone); + TEST(door->Format()==CApaDoorBase::EIconic); + TEST(door->Source()==KTestSourceId); + door->GetSizeInTwips(size); + TEST(size==TSize(500,500)); + delete door; + door = NULL; + delete store; + store = NULL; + + delete iProcess; + } + + +// Tests various functions to increase API test coverage + +/** + @SYMTestCaseID T-MdrStep-testMiscellaneousL + + @SYMPREQ + + @SYMTestCaseDesc Tests capabalities of CApaDoor Apis. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a document for tstapp. Create a door to this document.\n + Test the following APIs:\n + CApaDoor::Capability() const\n + CApaDoor::AppUidL() const\n + CApaDoor::SetFormatToTemporaryIconL()\n + CApaDoor::SetCropInTwips()\n + CApaDoor::SetScaleFactor()\n + API Calls:\n + CApaDoor::Capability() const\n + CApaDoor::AppUidL() const\n + CApaDoor::SetFormatToTemporaryIconL(TBool aEnabled=ETrue)\n + CApaDoor::SetCropInTwips(const TMargins& aMargins)\n + CApaDoor::SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight)\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +void CT_MdrStep::testMiscellaneousL() + { + INFO_PRINTF1(_L("Testing Misc.")); + const TUid KTestSourceId={458}; + + // set things up + TRAPD(ret,iProcess = CApaProcess::NewL(iFs)); + + CApaDocument* doc=NULL; + TApaApplicationFactory appFact(KUidTestApp); + TRAP(ret,doc=iProcess->AddNewDocumentL(appFact)); + + TEST(ret==KErrNone); + doc->EditL(NULL); // increments value to 1 + CApaDoor* door=NULL; + TRAP(ret, door=CApaDoor::NewL(iFs,*doc,TSize(1000,1000))); + TEST(ret==KErrNone); + + // set the source + door->SetSource(KTestSourceId); + + INFO_PRINTF1(_L("Testing CApaDoor's picture capability")); + TPictureCapability pictCap = door->Capability(); + TEST(ret==KErrNone); + TEST(pictCap.iScalingType == TPictureCapability::ENotScaleable); + TEST(pictCap.iIsCroppable == EFalse); + + INFO_PRINTF1(_L("Testing CApaDoor AppUidL")); + TUid uid = door->AppUidL(); + TEST(uid ==KUidTestApp); + + INFO_PRINTF1(_L("Testing SetFormatToTemporaryIconL")); + TRAP(ret, door->SetFormatToTemporaryIconL(ETrue)); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Testing SetCropInTwips")); + TMargins margins; + TRAP(ret, door->SetCropInTwips(margins)); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Testing SetScaleFactor")); + TRAP(ret, door->SetScaleFactor(500, 500)); + TEST(ret==KErrNone); + + delete door; + delete iProcess; + } + + +/** + Auxiliary Fn for entire Test Step. + + This method creates and installs an active scheduler and puts the + test code on the scheduler as a CIdle object. The method initiates all + tests by calling the static method CT-MdrTestCallBackWrapper::CallBack(). + +*/ +void CT_MdrStep::DoTestsInScheldulerLoopL() + { + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + // put the test code onto the scheduler as an idle object + CIdle* idle=CIdle::NewL(-20); + CleanupStack::PushL(idle); + + CT_MdrTestCallBackWrapper* callBack = new(ELeave) CT_MdrTestCallBackWrapper(this); + CleanupStack::PushL(callBack); + + idle->Start(TCallBack(CT_MdrTestCallBackWrapper::CallBack,callBack)); + // start the test code + CActiveScheduler::Start(); + + // all outstanding requests complete - kill the scheduler + CleanupStack::PopAndDestroy(3); //scheduler, callBack, idle + } + + + +CT_MdrTestCallBackWrapper::CT_MdrTestCallBackWrapper(CT_MdrStep* aTestStep) +/** + Constructor + */ + { + iTestStep=aTestStep; + } + + +CT_MdrTestCallBackWrapper::~CT_MdrTestCallBackWrapper() +/** + Destructor + */ + { + } + +TInt CT_MdrTestCallBackWrapper::CallBack(TAny* aPtr) +/** + This static method is the callback function of CIdle object. The method + calls the non-static method DoStepTests() which initiates all the tests. +*/ + { + ((CT_MdrTestCallBackWrapper *)aPtr)->iTestStep->DoStepTests(); + + CActiveScheduler::Stop(); + return EFalse; // don't call back again + } + +CT_MdrStep::~CT_MdrStep() +/** + Destructor + */ + { + } + +CT_MdrStep::CT_MdrStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_MdrStep); + } + +TVerdict CT_MdrStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_MdrStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +TVerdict CT_MdrStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing model doors...")); + + // set up an fbs + FbsStartup(); + + // set up the directory structure + iFs.Connect(); + + // run the testcode + TRAPD(ret,DoTestsInScheldulerLoopL()) + TEST(ret==KErrNone); + + iFs.Close(); + //delete TheTrapCleanup; + return TestStepResult(); + } + +/** + Auxiliary Fn for entire Test Step. + + The method initiates all tests to be performed. + +*/ +void CT_MdrStep::DoStepTests() + { + __UHEAP_MARK; + TRAPD(r,testModelDoorL()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + + __UHEAP_MARK; + TInt ret=RFbsSession::Connect(); + TEST(ret==KErrNone); + TRAP(r,testConversionL()); + + TEST(r==KErrNone); +/** The memory that is allocated in AllocScanLineBuffer() is shared + between all bitmaps using the same session and is only released when + RFbsSession::Disconnect(); is called. */ + RFbsSession::Disconnect(); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + ret=RFbsSession::Connect(); + TEST(ret==KErrNone); + TRAP(r,testMiscellaneousL()); + TEST(r==KErrNone); + RFbsSession::Disconnect(); + REComSession::FinalClose(); + __UHEAP_MARKEND; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MdrStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MdrStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,82 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_MDR_STEP_H__) +#define __T_MDR_STEP_H__ + +#include "ApparcTestServer.h" + +#include +#include + +class TTestModelHeaderFactory : public MApaModelHeaderFactory + { +public: + CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,const TApaAppIdentifier& aAppId)const; + }; + +class CTestModelHeader : public CApaModelHeader + { +public: + void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aDict); + void StoreL(CStreamStore& aStore,CStreamDictionary& aDict) const; + void DetachFromStoreL(CPicture::TDetach aDetach); + TApaAppIdentifier AppId()const; +public: + TInt iData; + }; + +//! A CT-MdrStep test class. + +/** Class tests CApaDoor and CApaModelDoor Apis. */ + +class CT_MdrStep:public CTestStep + { +public: + CT_MdrStep(); + ~CT_MdrStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void testModelDoorL(); + void testConversionL(); + void testMiscellaneousL(); + void DoTestsInScheldulerLoopL(); + void DoStepTests(); + +private: + RFs iFs; + CApaProcess* iProcess; + }; + +class CT_MdrTestCallBackWrapper : public CBase + { +public: + CT_MdrTestCallBackWrapper(CT_MdrStep* aTestStep); + ~CT_MdrTestCallBackWrapper(); + static TInt CallBack(TAny* aPtr); +private: + CT_MdrStep* iTestStep; + }; + +_LIT(KT_MdrStep,"T_Mdr"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MruStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_MruStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,63 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_MRU_STEP_H__) +#define __T_MRU_STEP_H__ + +#include "ApparcTestServer.h" + +//! A CT_MruStep test class. + +/** Tests MRU list. */ + +class CT_MruStep : public CTestStep + { +public: + CT_MruStep(); + ~CT_MruStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void TestMRUL(); +//private: + void DoTestsInScheldulerLoopL(); + + void setup(); +private: + RFs iFs; + }; + + + +class CT_MruTestCallBackWrapper : public CBase + { +public: + CT_MruTestCallBackWrapper(CT_MruStep* aTestStep); + ~CT_MruTestCallBackWrapper(); + static TInt CallBack(TAny* aThis); +private: + CT_MruStep* iTestStep; + }; + +_LIT(KT_MruStep,"T_Mru"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NonNativeAppsStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NonNativeAppsStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1305 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include "testableapalssession.h" +#include +#include +#include +#include +#include + +#include "..\tef\TNonNative\tnnapp1.h" +#include "T_NonNativeAppsStep.h" +#include + + +const TUint KApplicationType=0x10207f90; +const TUint KApplicationA=0x10207f91; +TUint KApplicationB = 0x2002237C; +const TUint KMySID=0x101F289C; // apparctestserver UID +const TUint KPropertyCategory=KMySID; +const TUint KPropertyKey=0; +const TUint KBytesToRead=100; + +_LIT8(KLit8_DataType_Gif, "x-epoc/nna-gif"); +_LIT8(KLit8_DataType_Html, "x-epoc/nna-html"); +_LIT8(KLit8_DataType_Vcard, "x-epoc/nna-vcf"); +_LIT8(KLit8_DataType_plainText, "x-epoc/nna-txt"); + +_LIT(KLitLogicalExecutableA, "c:\\A.NNAPP2"); // this file never actually needs to exist +_LIT(KLitApplicationCaptionA, "Caption NNA A"); +_LIT(KLitDocumentName1, "nnapp2:1"); +_LIT(KLitDocumentName2, "nnapp2:2"); +_LIT(KLitDocumentName3, "nnapp2:3"); +_LIT(KLitNativeExecutable, "z:\\sys\\bin\\TNNAPP2.EXE"); +_LIT8(KLitMimeTypeA, "x-epoc/a-nnapp2"); +_LIT8(KLitMimeTypeB, "x-epoc/dummy"); + +enum TOption + { + EAppA, + EAppB + }; + + +LOCAL_C void DeregisterNonNativeL(TAny* aApparcServer) + { + RApaLsSession& apparcServer=*STATIC_CAST(RApaLsSession*, aApparcServer); + apparcServer.PrepareNonNativeApplicationsUpdatesL(); + apparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + apparcServer.CommitNonNativeApplicationsUpdatesL(); + apparcServer.DeregisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType)); + } + + +// RTstFileArray + +RTstFileArray::RTstFileArray(TInt aGranularity) + :iFileArray(aGranularity) + { + } + +void RTstFileArray::Close() + { + for (TInt i=iFileArray.Count()-1; i>=0; --i) + { + const SFile& file=iFileArray[i]; + delete file.iFullFileName; + delete file.iExpectedDataType; + } + iFileArray.Close(); + } + +void RTstFileArray::AppendL(const TDesC& aFullFileName, const TDesC8& aExpectedDataType) + { + SFile file; + file.iFullFileName=aFullFileName.AllocLC(); + file.iExpectedDataType=aExpectedDataType.AllocLC(); + iFileArray.AppendL(file); + CleanupStack::Pop(2, file.iFullFileName); + } + +void RTstFileArray::Get(TPtrC& aFullFileName, TPtrC8& aExpectedDataType, TInt aIndex) const + { + const SFile& file=iFileArray[aIndex]; + aFullFileName.Set(*file.iFullFileName); + aExpectedDataType.Set(*file.iExpectedDataType); + } + + +// RTstAppService + +TInt RTstAppService::DoTestL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath) + { // static + RTstAppService appService(aServiceUid); + CleanupClosePushL(appService); + appService.ConnectL(); + TRequestStatus requestStatus; + appService.ReceiveTestResult(requestStatus, aPassingFileByHandle, aFileNameWithoutDriveOrPath); + User::WaitForRequest(requestStatus); + const TInt result=User::LeaveIfError(requestStatus.Int()); + CleanupStack::PopAndDestroy(&appService); + User::After(5 * 1000000); //Wait 5sec for Apparc update due to paging + return result; + } + +RTstAppService::RTstAppService(TUid aServiceUid) + :iServiceUid(aServiceUid) + { + } + +void RTstAppService::ConnectL() + { + ConnectExistingByNameL(KLitServerName); + } + +void RTstAppService::ReceiveTestResult(TRequestStatus& aRequestStatus, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath) + { + SendReceive(EOpcode_receiveTestResult, TIpcArgs(aPassingFileByHandle, &aFileNameWithoutDriveOrPath), aRequestStatus); + } + +TUid RTstAppService::ServiceUid() const + { + return iServiceUid; + } + + +// top-level functions + +HBufC8* CT_NonNativeAppsStep::OpenFileAndReadBufferLC(RApaLsSession& aApparcServer, RFs& aFileServer, const TDesC& aFullFileName) + { + TInt preferredBufSize=0; + User::LeaveIfError(aApparcServer.GetPreferredBufSize(preferredBufSize)); + HBufC8* const buffer=HBufC8::NewLC(preferredBufSize); + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.Open(aFileServer, aFullFileName, EFileShareReadersOnly|EFileStream|EFileRead)); + {TPtr8 buffer_asWritable(buffer->Des()); + User::LeaveIfError(file.Read(buffer_asWritable));} + CleanupStack::PopAndDestroy(&file); + return buffer; + } + +void CT_NonNativeAppsStep::OpenFileAndSetFilePositionToSomewhereUnusualLC(RFile& aFile, TInt& aFilePosition, RFs& aFileServer, const TDesC& aFullFileName) + { + CleanupClosePushL(aFile); + User::LeaveIfError(aFile.Open(aFileServer, aFullFileName, EFileShareReadersOnly|EFileStream|EFileRead)); + aFilePosition=0; + User::LeaveIfError(aFile.Seek(ESeekEnd, aFilePosition)); + aFilePosition=(aFilePosition*83)/100; // set it to somewhere "random" in the middle of the file (83% of the way through) + User::LeaveIfError(aFile.Seek(ESeekStart, aFilePosition)); + } + +void CT_NonNativeAppsStep::TestFilePosition(RFile& aFile, TInt aFilePosition) + { + TInt filePosition=0; + TEST(aFile.Seek(ESeekCurrent, filePosition) == KErrNone); + TEST(filePosition==aFilePosition); + } + +/** + @SYMTestCaseID T_NonNativeAppsStep-TestAppForDocument + + @SYMDEF DEF065742 + + @SYMTestCaseDesc Tests AppForDocument API for non native applications. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call AppForDocument, first with the file name, and then with the file data, with a series of different known files. + API Calls:\n + RApaLsSession::AppForDocument(const TDesC &aFileName, TUid &aAppUid, TDataType &aDataType) const;\n + RApaLsSession::AppForDocument(RFile &aFile, TUid &aAppUid, TDataType &aDataType) const;\n + + @SYMTestExpectedResults Test checks MIME type and UIDs obtained match the expected ones. + */ +void CT_NonNativeAppsStep::TestAppForDocumentL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray) + { + INFO_PRINTF1(_L("Testing AppForDocumentL()...")); + for (TInt i=aFileArray.Count()-1; i>=0; --i) + { + TPtrC fullFileName; + TPtrC8 expectedDataType; + aFileArray.Get(fullFileName, expectedDataType, i); + + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + INFO_PRINTF2(_L("..using following file: '%S'"), &fileNameWithoutDriveOrPath); + + { + TDataType dataType; + TUid appUid; + //due to access of file in private folder + APPFWK_EXPECTED_PLATSEC_START; + User::LeaveIfError(aApparcServer.AppForDocument(fullFileName, appUid, dataType)); + RDebug::Print(_L("The Full FileName is '%S' "),&fullFileName); + APPFWK_EXPECTED_PLATSEC_FINISH; + TEST(dataType.Des8().CompareF(expectedDataType)==0); + TEST(appUid.iUid==0x10207f92); + } + + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + { + TDataType dataType; + TUid appUid; + User::LeaveIfError(aApparcServer.AppForDocument(file, appUid, dataType)); + TEST(dataType.Des8().CompareF(expectedDataType)==0); + TEST(appUid.iUid==0x10207f92); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + } + } + +void CT_NonNativeAppsStep::TestResultsOfAppForDocumentAndServiceL(TUid aServiceUid, TInt aError, + const TUid& aAppUid, // aAppUid needs to be passed by reference (rather than by value) because of the way that this function is called, namely the aAppUid parameter seems to be put into the stack before the expression passed to the aError parameter has executed, the latter having the side-effect of changing the app-UID + const TDataType& aDataType, const TDesC8& aExpectedDataType) + { + if (aServiceUid.iUid==0x10207f99) + { + User::LeaveIfError(aError); + TEST(aDataType.Des8().CompareF(aExpectedDataType)==0); + (aDataType.Des8().CompareF(KLit8_DataType_Gif)==0) ? TEST(aAppUid.iUid==0x10207f94) : TEST(aAppUid.iUid==0); + } + else + { + User::LeaveIfError(aError); + TEST(aDataType.Des8().CompareF(aExpectedDataType)==0); + TEST(aAppUid.iUid==0x10207f92); + } + } + +/** + @SYMTestCaseID T_NonNativeAppsStep-TestAppForDocumentAndServiceL + + @SYMDEF DEF065742 + + @SYMTestCaseDesc Tests AppForDocumentAndService API for non native applications. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call AppForDocumentAndService, first with the file name, and then with the file data, with a series of different known files and serviceUIDs. + Note the following: + - TNNAPP1 defines in the datatype_list the 4 datatypes, while in the service_list, only 1 datatype is defined. + - TNNAPP2 defines no datatype_list, while it just contains 1 datatype in the service_list. + - The datatype of the file to be opened is searched in the service_list corresponding to the serviceUID. If not found, + the datatype_list of the same reg file is searched. If not found there, it returns a KNullUid as the app. + - It means that the service_list has 'priority' over the datatype_list in the same reg file. + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC &aFileName, TUid aServiceUid, TUid &aAppUid, TDataType &aDataType) const;\n + RApaLsSession::AppForDocumentAndService(RFile &aFile, TUid aServiceUid, TUid &aAppUid, TDataType &aDataType) const;\n + + @SYMTestExpectedResults Test checks MIME type and UIDs obtained match the expected ones. + */ +void CT_NonNativeAppsStep::TestAppForDocumentAndServiceL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray) + { + INFO_PRINTF1(_L("Testing AppForDocumentAndServiceL()...")); + for (TInt i=aFileArray.Count()-1; i>=0; --i) + { + TPtrC fullFileName; + TPtrC8 expectedDataType; + aFileArray.Get(fullFileName, expectedDataType, i); + + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + INFO_PRINTF2(_L("..using following file: '%S'"), &fileNameWithoutDriveOrPath); + + { + TDataType dataType; + TUid appUid; + TUid serviceUid(TUid::Uid(0x10207f99)); + //due to access of file in private folder + APPFWK_EXPECTED_PLATSEC_START; + TestResultsOfAppForDocumentAndServiceL(serviceUid, aApparcServer.AppForDocumentAndService(fullFileName, serviceUid, appUid, dataType), appUid, dataType, expectedDataType); + APPFWK_EXPECTED_PLATSEC_FINISH; + serviceUid.iUid=0x10207f93; + //due to access of file in private folder + APPFWK_EXPECTED_PLATSEC_START; + TestResultsOfAppForDocumentAndServiceL(serviceUid, aApparcServer.AppForDocumentAndService(fullFileName, serviceUid, appUid, dataType), appUid, dataType, expectedDataType); + APPFWK_EXPECTED_PLATSEC_FINISH; + } + + { + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + TDataType dataType; + TUid appUid; + TUid serviceUid(TUid::Uid(0x10207f99)); + TestResultsOfAppForDocumentAndServiceL(serviceUid, aApparcServer.AppForDocumentAndService(file, serviceUid, appUid, dataType), appUid, dataType, expectedDataType); + serviceUid.iUid=0x10207f93; + TestResultsOfAppForDocumentAndServiceL(serviceUid, aApparcServer.AppForDocumentAndService(file, serviceUid, appUid, dataType), appUid, dataType, expectedDataType); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + } + } + +/** + @SYMTestCaseID T_NonNativeAppsStep-TestRecognizingL + + @SYMDEF DEF065742 + + @SYMTestCaseDesc Tests RecognizeData API for non native applications. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RecognizeData, first with the file name, and then with the file data, with a series of different known files. + API Calls:\n + RApaLsSession::RecognizeData(const TDesC &aName, const TDesC8 &aBuffer, TDataRecognitionResult &aDataType) const;\n + RApaLsSession::RecognizeData(RFile &aFile, TDataRecognitionResult &aDataType) const;\n + + @SYMTestExpectedResults Test checks MIME type and conficence obtained match the expected ones. + */ +void CT_NonNativeAppsStep::TestRecognizingL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray) + { + INFO_PRINTF1(_L("Testing RecognizingL()...")); + for (TInt i=aFileArray.Count()-1; i>=0; --i) + { + TPtrC fullFileName; + TPtrC8 expectedDataType; + aFileArray.Get(fullFileName, expectedDataType, i); + + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + INFO_PRINTF2(_L("..using following file: '%S'"), &fileNameWithoutDriveOrPath); + + { + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + TDataRecognitionResult dataRecognitionResult; + dataRecognitionResult.Reset(); + User::LeaveIfError(aApparcServer.RecognizeData(file, dataRecognitionResult)); + TEST(dataRecognitionResult.iConfidence>=CApaDataRecognizerType::EProbable); + TEST(dataRecognitionResult.iDataType.Des8().CompareF(expectedDataType)==0); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + + { + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + TBool result=EFalse; + User::LeaveIfError(aApparcServer.RecognizeSpecificData(file, TDataType(expectedDataType), result)); + TEST(result); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + + { + HBufC8* const buffer=OpenFileAndReadBufferLC(aApparcServer, aFileServer, fullFileName); + + TDataRecognitionResult dataRecognitionResult; + dataRecognitionResult.Reset(); + APPFWK_EXPECTED_PLATSEC_START; + User::LeaveIfError(aApparcServer.RecognizeData(fullFileName, *buffer, dataRecognitionResult)); + APPFWK_EXPECTED_PLATSEC_FINISH; + TEST(dataRecognitionResult.iConfidence>=CApaDataRecognizerType::EProbable); + TEST(dataRecognitionResult.iDataType.Des8().CompareF(expectedDataType)==0); + + CleanupStack::PopAndDestroy(buffer); + } + + { + HBufC8* const buffer=OpenFileAndReadBufferLC(aApparcServer, aFileServer, fullFileName); + + TBool result=EFalse; + User::LeaveIfError(aApparcServer.RecognizeSpecificData(fullFileName, *buffer, TDataType(expectedDataType), result)); + TEST(result); + + CleanupStack::PopAndDestroy(buffer); + } + } + } + +/** + @SYMTestCaseID T_NonNativeAppsStep-TestStartDocumentL + + @SYMDEF DEF065742 + + @SYMTestCaseDesc Tests StartDocument API for non native applications. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call StartDocument, either with the file name as a parameter or a file handle. The test presupposes that when + the file is passed by name, it can't be oppened as it's in a private folder (since the app doesn't have AllFiles capability). + These provokes few negative platsec errors in the epocwind.out file. + On the other hand, when the file is passed by handle, there are no problems opening the file. No platsec errors should be reported. + API Calls:\n + RApaLsSession::StartDocument(const TDesC &aFileName, TThreadId &aThreadId, TLaunchType aLaunchType=ELaunchNewApp);\n + RApaLsSession::StartDocument(RFile &aFile, TThreadId &aThreadId, TRequestStatus *aRequestStatusForRendezvous=0);\n + RApaLsSession::StartDocument(const TDesC &aFileName, const TDataType &aDataType, TThreadId &aThreadId, TLaunchType aLaunchType=ELaunchNewApp);\n + RApaLsSession::StartDocument(RFile &aFile, const TDataType &aDataType, TThreadId &aThreadId, TRequestStatus *aRequestStatusForRendezvous=0);\n + + @SYMTestExpectedResults Test the requeststatus obtained match the expected one. + */ +void CT_NonNativeAppsStep::TestStartDocumentL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray) + { + INFO_PRINTF1(_L("Testing StartDocumentL()...")); + for (TInt i=aFileArray.Count()-1; i>=0; --i) + { + TPtrC fullFileName; + TPtrC8 expectedDataType; + aFileArray.Get(fullFileName, expectedDataType, i); + + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + INFO_PRINTF2(_L("..using following file: '%S'"), &fileNameWithoutDriveOrPath); + + for (TInt j=0; j<2; ++j) + { + const TUid serviceUid=(j==0)? KTstServiceUid_nonSecure: KTstServiceUid_secure; + { + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + TThreadId threadId; + TRequestStatus requestStatusForRendezvous; + User::LeaveIfError(aApparcServer.StartDocument(file, threadId, &requestStatusForRendezvous)); + User::WaitForRequest(requestStatusForRendezvous); + TEST(RTstAppService::DoTestL(serviceUid, ETrue, fileNameWithoutDriveOrPath) == KCheckPass); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + + { + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + TThreadId threadId; + TRequestStatus requestStatusForRendezvous; + User::LeaveIfError(aApparcServer.StartDocument(file, TDataType(expectedDataType), threadId, &requestStatusForRendezvous)); + User::WaitForRequest(requestStatusForRendezvous); + TEST(RTstAppService::DoTestL(serviceUid, ETrue, fileNameWithoutDriveOrPath) == KCheckPass); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + + { + RFile file; + TInt originalFilePosition=0; + OpenFileAndSetFilePositionToSomewhereUnusualLC(file, originalFilePosition, aFileServer, fullFileName); + + TThreadId threadId; + TRequestStatus requestStatusForRendezvous; + User::LeaveIfError(aApparcServer.StartDocument(file, TUid::Uid(0x10207f92), threadId, &requestStatusForRendezvous)); + User::WaitForRequest(requestStatusForRendezvous); + TEST(RTstAppService::DoTestL(serviceUid, ETrue, fileNameWithoutDriveOrPath) == KCheckPass); + + TestFilePosition(file, originalFilePosition); + CleanupStack::PopAndDestroy(&file); + } + + { + TThreadId threadId; + //due to access of file in private folder + APPFWK_EXPECTED_PLATSEC_START; + User::LeaveIfError(aApparcServer.StartDocument(fullFileName, threadId)); + APPFWK_EXPECTED_PLATSEC_FINISH; + User::After(1500000); + TEST(RTstAppService::DoTestL(serviceUid, EFalse, fileNameWithoutDriveOrPath) == KCheckPass); + } + + { + TThreadId threadId; + User::LeaveIfError(aApparcServer.StartDocument(fullFileName, TDataType(expectedDataType), threadId)); + User::After(1500000); + TEST(RTstAppService::DoTestL(serviceUid, EFalse, fileNameWithoutDriveOrPath) == KCheckPass); + } + + { + TThreadId threadId; + User::LeaveIfError(aApparcServer.StartDocument(fullFileName, TUid::Uid(0x10207f92), threadId)); + User::After(1500000); + TEST(RTstAppService::DoTestL(serviceUid, EFalse, fileNameWithoutDriveOrPath) == KCheckPass); + } + } + } + //avoid race conditions + User::After(1500000); + } + +void CT_NonNativeAppsStep::CheckPropertyUpdateAndResetL(const TDesC& aExpectedNewValue) + { + __ASSERT_ALWAYS(aExpectedNewValue.Length()>0, User::Invariant()); + RProperty property; + CleanupClosePushL(property); + User::LeaveIfError(property.Attach(TUid::Uid(KPropertyCategory), KPropertyKey)); + TRequestStatus requestStatus; + property.Subscribe(requestStatus); + TBuf<50> propertyValue; + User::LeaveIfError(property.Get(propertyValue)); + if (propertyValue.Length()>0) + { + property.Cancel(); + } + User::WaitForRequest(requestStatus); + if (propertyValue.Length()==0) + { + User::LeaveIfError(property.Get(propertyValue)); + } + TEST(propertyValue.CompareF(aExpectedNewValue)==0); + User::LeaveIfError(property.Set(KNullDesC)); // reset it to an empty descriptor + CleanupStack::PopAndDestroy(&property); + } + +void CT_NonNativeAppsStep::CheckApplicationLaunchesOkayL(RApaLsSession& aApparcServer, const CApaCommandLine& aCommandLine, TAny* aOption) + { + TThreadId notUsed; + const TInt option = TInt(aOption); + switch(option) + { + case EAppA: + INFO_PRINTF1(_L("..Checking ApplicationLaunchesOkayL for app 'A'..")); + User::LeaveIfError(aApparcServer.StartDocument(KLitDocumentName1, TDataType(KLitMimeTypeA), notUsed)); + CheckPropertyUpdateAndResetL(KLitDocumentName1); + User::LeaveIfError(aApparcServer.StartApp(aCommandLine)); + CheckPropertyUpdateAndResetL(KLitDocumentName2); + break; + case EAppB: + INFO_PRINTF1(_L("..Checking ApplicationLaunchesOkayL for app 'B'..")); + TEST( aApparcServer.StartDocument(KLitDocumentName3, TDataType(KLitMimeTypeB), notUsed) == KErrNone); + break; + default: + break; + } + } + +void CT_NonNativeAppsStep::CheckApplicationFailsToLaunchL(RApaLsSession& aApparcServer, const CApaCommandLine& aCommandLine, TAny* aOption) + { + TThreadId notUsed; + const TInt option = TInt(aOption); + switch(option) + { + case EAppA: + INFO_PRINTF1(_L("..Checking ApplicationFailsToLaunchL for app 'A'..")); + TEST(aApparcServer.StartDocument(KLitDocumentName1, TDataType(KLitMimeTypeA), notUsed) != KErrNone); + TEST(aApparcServer.StartApp(aCommandLine)!=KErrNone); + break; + case EAppB: + INFO_PRINTF1(_L("..Checking ApplicationFailsToLaunchL for app 'B'..")); + TEST( aApparcServer.StartDocument(KLitDocumentName3, TDataType(KLitMimeTypeB), notUsed) != KErrNone); + break; + default: + break; + } + } + +/** + @SYMTestCaseID T_NonNativeAppsStep-TestRegisterNonNativeApplicationL + + @SYMDEF DEF065742 + + @SYMTestCaseDesc Tests RegisterNonNativeApplicationL and DeregisterNonNativeApplicationL API for non native applications. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RegisterNonNativeApplicationL and try to launch the app. Then call + DeregisterNonNativeApplicationL and try to launch the app again. This is repeated with + localisable resource files, etc., etc.. + API Calls:\n + RApaLsSession::RegisterNonNativeApplicationL(TUid aApplicationType, const TDriveUnit& aDrive, CApaRegistrationResourceFileWriter& aRegistrationResourceFile, CApaLocalisableResourceFileWriter* aLocalisableResourceFile, RFile* aIconFile); \n + RApaLsSession::DeregisterNonNativeApplicationL(TUid aApplication);\n + RApaLsSession::GetAppIcon(TUid aAppUid, RFile& aFile) const; \n + + @SYMTestExpectedResults Test checks if app is registered (and launches ok) and deregistered (and fails to launch). + */ +void CT_NonNativeAppsStep::TestRegisterNonNativeApplicationL(RApaLsSession& aApparcServer, RFs& aFileServer ) + { + INFO_PRINTF1(_L("Testing RegisterNonNativeApplicationL()...")); + + RProcess().SetPriority(EPriorityLow); // so that we're pre-empted by the Apparc server when it does its scan + + CApaCommandLine* commandLine=NULL; + User::LeaveIfError(CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine)); + CleanupStack::PushL(commandLine); + const TPtrC executableName(commandLine->ExecutableName()); + + _LIT_SECURITY_POLICY_S0(readSecurityPolicy, KMySID); + _LIT_SECURITY_POLICY_PASS(writeSecurityPolicy); + const TInt error=RProperty::Define(KPropertyKey, RProperty::EText, readSecurityPolicy, writeSecurityPolicy); + if (error!=KErrAlreadyExists) + { + User::LeaveIfError(error); + } + User::LeaveIfError(RProperty::Set(TUid::Uid(KPropertyCategory), KPropertyKey, KNullDesC)); + + // make sure we're starting from a clean sheet + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType)); + CleanupStack::PushL(TCleanupItem(DeregisterNonNativeL, &aApparcServer)); + + aApparcServer.RegisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType), KLitNativeExecutable); + + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter=CApaRegistrationResourceFileWriter::NewL(TUid::Uid(KApplicationA), KLitLogicalExecutableA, TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + registrationResourceFileWriter->AddDataTypeL(KDataTypePriorityNormal, KLitMimeTypeA); + + CApaCommandLine* const nextCommandLine=CApaCommandLine::NewLC(); + nextCommandLine->SetDocumentNameL(KLitDocumentName2); + nextCommandLine->SetExecutableNameL(KLitLogicalExecutableA); + + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, NULL, NULL); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CheckApplicationLaunchesOkayL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + //Check if there is no problem in registering same app again(basically simulating an upgrade) + INFO_PRINTF1(_L("..registering same app again using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, NULL, NULL); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CheckApplicationLaunchesOkayL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + _LIT8(KLitOpData, "opaquedata"); + registrationResourceFileWriter->SetOpaqueDataL(KLitOpData); + + CApaLocalisableResourceFileWriter* const localisableResourceFileWriter_noIcons=CApaLocalisableResourceFileWriter::NewL(KNullDesC, KLitApplicationCaptionA, 0, KNullDesC); + CleanupStack::PushL(localisableResourceFileWriter_noIcons); + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() with localisableResourceFileWriter_noIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, localisableResourceFileWriter_noIcons, NULL); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CleanupStack::PopAndDestroy(localisableResourceFileWriter_noIcons); + CheckApplicationLaunchesOkayL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + //Testing with OpaqueData + TPtrC8 opData =nextCommandLine->OpaqueData(); + TInt tst=opData.CompareF(KLitOpData); + TEST(opData.CompareF(KLitOpData)==0); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() with localisableResourceFileWriter_noIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + //Testing with IconFile + CApaLocalisableResourceFileWriter* const localisableResourceFileWriter_withIcons=CApaLocalisableResourceFileWriter::NewL(KNullDesC, KLitApplicationCaptionA, 2, KNullDesC); + CleanupStack::PushL(localisableResourceFileWriter_withIcons); + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() with localisableResourceFileWriter_withIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + + RFile iconFile; + CleanupClosePushL(iconFile); + _LIT(KIconFullFileName, "z:\\resource\\apps\\tstapp.mbm"); + User::LeaveIfError(iconFile.Open(aFileServer, KIconFullFileName, EFileRead)); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, localisableResourceFileWriter_withIcons, &iconFile); + iconFile.Close(); + CleanupStack::PopAndDestroy(&iconFile); + + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CheckApplicationLaunchesOkayL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + HBufC* iconFileName = NULL; + TInt err = aApparcServer.GetAppIcon(TUid::Uid(KApplicationA),iconFileName); + TEST(err == KErrNone); + _LIT(KIconFileName, "tstapp.mbm"); + TEST(iconFileName != NULL); + if(iconFileName != NULL) + { + TEST(iconFileName->Des().Find(KIconFileName) >= 0); + delete iconFileName; + } + + //Test other overload of GetAppIcon for MBM icon file. + RFile mbmIconFile; + CleanupClosePushL(mbmIconFile); + INFO_PRINTF1(_L("..testing GetAppIcon for non-native app to retrieve an open file handle to an MBM icon file")); + err = aApparcServer.GetAppIcon(TUid::Uid(KApplicationA), mbmIconFile); + TEST(err == KErrNone); + + TBuf mbmIconFileName; + mbmIconFile.FullName(mbmIconFileName); + TEST(mbmIconFileName.Length() != 0); + + //Try to write into the MBM icon file whose handle was returned. + INFO_PRINTF1(_L("..writing into the MBM icon file whose handle was returned.")); + _LIT8(KSomeText, "It would not be written into the file"); + err = mbmIconFile.Write(KSomeText); + TEST(err == KErrAccessDenied); + + //Try to read from the MBM icon file whose handle was returned. + INFO_PRINTF1(_L("..reading from the MBM icon file whose handle was returned.")); + TBuf8 buffer; //buffer to read first KBytesToRead bytes of the mbm icon file. + err = mbmIconFile.Read(buffer); + TEST(err == KErrNone); + + //First KBytesToRead bytes of the icon file, this should be same as in mbm file. + RFile tempFile; + CleanupClosePushL(tempFile); + err = tempFile.Open(aFileServer, KIconFullFileName, EFileRead); + TEST(err == KErrNone); + TBuf8 buffer1; + err = tempFile.Read(buffer1); + TEST(err == KErrNone); + TEST(buffer == buffer1); + + //Close icon files. + CleanupStack::PopAndDestroy(2, &mbmIconFile); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() with localisableResourceFileWriter_withIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + //Testing GetAppIcon API for non-native application with SVG icon. + TestGetAppIconForNonNativeL(aApparcServer,aFileServer, registrationResourceFileWriter, localisableResourceFileWriter_withIcons); + + // clean-up + CleanupStack::PopAndDestroy(5, commandLine); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0072 + + @SYMDEF INC098717: support for scalable midlet icons is missing + + @SYMTestCaseDesc Tests GetAppIcon API for non native applications with SVG icon file. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Register a non-native app with a SVG icon file, Call GetAppIcon API, + deregister the app. Again register the same app without the icon file, call GetAppIcon + API, deregister the app. Call GetAppIcon with an invalid app uid. + + @SYMTestExpectedResults RApaLsSession::GetAppIcon should return KErrNotFound when + an invalid app uid is passed, KErrNotFound when application does not have an icon + file, KErrNone and an open file handle to the application's icon file if app has icon file. + */ +void CT_NonNativeAppsStep::TestGetAppIconForNonNativeL(RApaLsSession& aApparcServer, + RFs& aFileServer, + CApaRegistrationResourceFileWriter* const aRegistrationResourceFileWriter, + CApaLocalisableResourceFileWriter* const aLocalisableResourceFileWriter) + { + //Testing GetAppIcon for non-native app having SVG icon file + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() with localisableResourceFileWriter_withIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + + RFile iconFile; + CleanupClosePushL(iconFile); + _LIT(KSVGIconSourceFile, "z:\\resource\\apps\\svg_icon.svg"); + User::LeaveIfError(iconFile.Open(aFileServer, KSVGIconSourceFile, EFileRead)); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *aRegistrationResourceFileWriter, aLocalisableResourceFileWriter, &iconFile); + CleanupStack::PopAndDestroy(&iconFile); + + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + + RFile svgIconFile; + CleanupClosePushL(svgIconFile); + INFO_PRINTF1(_L("..testing GetAppIcon for non-native app to retrieve an open file handle to an SVG icon file")); + TInt err = aApparcServer.GetAppIcon(TUid::Uid(KApplicationA),svgIconFile); + TEST(err == KErrNone); + + _LIT(KSVGIconFileName, "c:\\private\\10003a3f\\import\\apps\\nonnative\\resource\\svg_icon.svg"); + TBuf iconFileName; + //Get the name of the icon file + svgIconFile.FullName(iconFileName); + TEST(iconFileName.Length() != 0); + if (iconFileName.Length() != 0) + { + INFO_PRINTF1(_L("..testing if the SVG icon file for non-native app gets installed in apparc's data cage")); + iconFileName.LowerCase(); + TEST(iconFileName.Compare(KSVGIconFileName) == 0); + } + + //Try to write into the icon file whose handle was returned. + INFO_PRINTF1(_L("..writing into the SVG icon file whose handle was returned.")); + _LIT8(KSomeText, "It would not be written into the file"); + err = svgIconFile.Write(KSomeText); + TEST(err == KErrAccessDenied); + + //Try to read from the icon file whose handle was returned. + INFO_PRINTF1(_L("..reading from the SVG icon file whose handle was returned.")); + TBuf8 buffer; //buffer to read first KBytesToRead bytes of the icon file. + err = svgIconFile.Read(buffer); + TEST(err == KErrNone); + + //First KBytesToRead bytes of the icon file, this should be same as in svg file. + RFile tempFile; + CleanupClosePushL(tempFile); + err = tempFile.Open(aFileServer, KSVGIconSourceFile, EFileRead); + TEST(err == KErrNone); + TBuf8 buffer1; + err = tempFile.Read(buffer1); + TEST(err == KErrNone); + TEST(buffer == buffer1); + + //Close icon files + CleanupStack::PopAndDestroy(2, &svgIconFile); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() with localisableResourceFileWriter_withIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + + //Testing GetAppIcon for non-native app without SVG Icon file. + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() with localisableResourceFileWriter_withIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *aRegistrationResourceFileWriter, aLocalisableResourceFileWriter, NULL); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + + INFO_PRINTF1(_L("..testing GetAppIcon for non-native app that does not have an icon file")); + RFile iconFile1; + CleanupClosePushL(iconFile1); + err = aApparcServer.GetAppIcon(TUid::Uid(KApplicationA),iconFile1); + TEST(err == KErrNotFound); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() with localisableResourceFileWriter_withIcons")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + + //Testing GetAppIcon with an invalid app UID. + INFO_PRINTF1(_L("..testing GetAppIcon, if an invalid app UID is passed")); + err = aApparcServer.GetAppIcon(TUid::Uid(KApplicationA),iconFile1); + TEST(err == KErrNotFound); + + //Close icon file + CleanupStack::PopAndDestroy(&iconFile1); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0099 + + @SYMDEF PDEF129466 + + @SYMTestCaseDesc Tests ForceCommitNonNativeApplicationsUpdatesL() API. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RegisterNonNativeApplicationL and try to launch the app. Then call + DeregisterNonNativeApplicationL and try to launch the app again. ForceCommitNonNativeApplicationsUpdatesL + API is used to commit the non-native application updates. + + @SYMTestExpectedResults Test checks ForceCommitNonNativeApplicationsUpdatesL behaviour and completed with success. + */ +void CT_NonNativeAppsStep::TestCommitNNAppUpdatesL(RApaLsSession& aApparcServer) + { + INFO_PRINTF1(_L("Testing ForceCommitNonNativeApplicationsUpdatesL API...")); + + RProcess().SetPriority(EPriorityLow); // so that we're pre-empted by the Apparc server when it does its scan + + CApaCommandLine* commandLine=NULL; + User::LeaveIfError(CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine)); + CleanupStack::PushL(commandLine); + const TPtrC executableName(commandLine->ExecutableName()); + + + _LIT_SECURITY_POLICY_S0(readSecurityPolicy, KMySID); + _LIT_SECURITY_POLICY_PASS(writeSecurityPolicy); + + //TNNAPP2.exe sets the document name passed as part of the command line to this property. + const TInt error=RProperty::Define(KPropertyKey, RProperty::EText, readSecurityPolicy, writeSecurityPolicy); + if (error!=KErrAlreadyExists) + { + User::LeaveIfError(error); + } + User::LeaveIfError(RProperty::Set(TUid::Uid(KPropertyCategory), KPropertyKey, KNullDesC)); + + // make sure we're starting from a clean sheet + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType)); + CleanupStack::PushL(TCleanupItem(DeregisterNonNativeL, &aApparcServer)); + + aApparcServer.RegisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType), KLitNativeExecutable); + + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter=CApaRegistrationResourceFileWriter::NewL(TUid::Uid(KApplicationA), KLitLogicalExecutableA, TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + registrationResourceFileWriter->AddDataTypeL(KDataTypePriorityNormal, KLitMimeTypeA); + + CApaCommandLine* const nextCommandLine=CApaCommandLine::NewLC(); + nextCommandLine->SetDocumentNameL(KLitDocumentName2); + nextCommandLine->SetExecutableNameL(KLitLogicalExecutableA); + + + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, NULL, NULL); + TTime startTime,endTime; + TTimeIntervalMicroSeconds timeTakenToCommitRegistration; + INFO_PRINTF1(_L("..start commiting the registration with CommitNonNativeApplicationsUpdatesL")); + startTime.HomeTime(); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + endTime.HomeTime(); + INFO_PRINTF1(_L("..commiting the registration is done")); + timeTakenToCommitRegistration=endTime.MicroSecondsFrom(startTime); + + TInt64 value = timeTakenToCommitRegistration.Int64(); + INFO_PRINTF2(_L("..Time taken for registration of application by CommitNonNativeApplicationsUpdatesL is %d micro seconds"), value); + CheckApplicationLaunchesOkayL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + TTimeIntervalMicroSeconds timeTakenToCommitDeregistration; + INFO_PRINTF1(_L("..start commiting the deregistration with CommitNonNativeApplicationsUpdatesL")); + startTime.HomeTime(); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + endTime.HomeTime(); + INFO_PRINTF1(_L("..commiting the deregistration is done")); + timeTakenToCommitDeregistration=endTime.MicroSecondsFrom(startTime); + value = timeTakenToCommitDeregistration.Int64(); + INFO_PRINTF2(_L("..Time taken for deregistration of application by CommitNonNativeApplicationsUpdatesL is %d micro seconds"), value); + CheckApplicationFailsToLaunchL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, NULL, NULL); + TTimeIntervalMicroSeconds timeTakenToForceCommitRegistration; + INFO_PRINTF1(_L("..start commiting the registration with ForceCommitNonNativeApplicationsUpdatesL")); + startTime.HomeTime(); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + endTime.HomeTime(); + INFO_PRINTF1(_L("..commiting the registration is done")); + timeTakenToForceCommitRegistration=endTime.MicroSecondsFrom(startTime); + value = timeTakenToForceCommitRegistration.Int64(); + INFO_PRINTF2(_L("..Time taken for registration of application by ForceCommitNonNativeApplicationsUpdatesL is %d micro seconds"), value); + TRequestStatus appScanCompleted=KRequestPending; + aApparcServer.SetNotify(EFalse,appScanCompleted); + User::WaitForRequest(appScanCompleted); + TEST(appScanCompleted.Int()==MApaAppListServObserver::EAppListChanged); + CheckApplicationLaunchesOkayL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + TTimeIntervalMicroSeconds timeTakenToForceCommitDeregistration; + INFO_PRINTF1(_L("..start commiting the deregistration with ForceCommitNonNativeApplicationsUpdatesL")); + startTime.HomeTime(); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + endTime.HomeTime(); + INFO_PRINTF1(_L("..commiting the deregistration is done")); + timeTakenToForceCommitDeregistration=endTime.MicroSecondsFrom(startTime); + value = timeTakenToForceCommitDeregistration.Int64(); + INFO_PRINTF2(_L("..Time taken for deregistration of application by ForceCommitNonNativeApplicationsUpdatesL is %d micro seconds"), value); + appScanCompleted=KRequestPending; + aApparcServer.SetNotify(EFalse,appScanCompleted); + User::WaitForRequest(appScanCompleted); + TEST(appScanCompleted.Int()==MApaAppListServObserver::EAppListChanged); + CheckApplicationFailsToLaunchL(aApparcServer, *nextCommandLine, (TAny*)EAppA); + TEST(timeTakenToForceCommitRegistrationExecutableName()); + + + _LIT_SECURITY_POLICY_S0(readSecurityPolicy, KMySID); + _LIT_SECURITY_POLICY_PASS(writeSecurityPolicy); + + //TNNAPP2.exe sets the document name passed as part of the command line to this property. + const TInt error=RProperty::Define(KPropertyKey, RProperty::EText, readSecurityPolicy, writeSecurityPolicy); + if (error!=KErrAlreadyExists) + { + User::LeaveIfError(error); + } + User::LeaveIfError(RProperty::Set(TUid::Uid(KPropertyCategory), KPropertyKey, KNullDesC)); + + // make sure we're starting from a clean sheet + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType)); + CleanupStack::PushL(TCleanupItem(DeregisterNonNativeL, &aApparcServer)); + + INFO_PRINTF1(_L("..Registering type KApplicationType using RegisterNonNativeApplicationTypeL() ")); + aApparcServer.RegisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType), KLitNativeExecutable); + + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter=CApaRegistrationResourceFileWriter::NewL(TUid::Uid(KApplicationA), KLitLogicalExecutableA, TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + INFO_PRINTF1(_L("..Add datatype to app 'A'")); + registrationResourceFileWriter->AddDataTypeL(KDataTypePriorityNormal, KLitMimeTypeA); + + CApaCommandLine* const nextCommandLine=CApaCommandLine::NewLC(); + nextCommandLine->SetDocumentNameL(KLitDocumentName2); + nextCommandLine->SetExecutableNameL(KLitLogicalExecutableA); + + TApaAppInfo info; + CApaRegistrationResourceFileWriter* const registrationResourceFileWriterB=CApaRegistrationResourceFileWriter::NewL(TUid::Uid(KApplicationB), KLitLogicalExecutableA, TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriterB); + registrationResourceFileWriterB->AddDataTypeL(KDataTypePriorityNormal, KLitMimeTypeB); + + TestForceCommitL(aApparcServer, *registrationResourceFileWriter, *registrationResourceFileWriterB, *nextCommandLine); + TestRollbackRegistrationL(aApparcServer, *registrationResourceFileWriter, *registrationResourceFileWriterB, *nextCommandLine); + TestRollbackDeregistrationL(aApparcServer, *registrationResourceFileWriter, *registrationResourceFileWriterB, *nextCommandLine); + + CleanupStack::PopAndDestroy(5, commandLine); + } + + void CT_NonNativeAppsStep::WaitForApplistUpdate(RApaLsSession& aApparcServer) + { + INFO_PRINTF1(_L("..waiting for applist to be updated ")); + TRequestStatus appScanCompleted=KRequestPending; + aApparcServer.SetNotify(EFalse,appScanCompleted); + User::WaitForRequest(appScanCompleted); + TEST(appScanCompleted.Int()==MApaAppListServObserver::EAppListChanged); + } + + void CT_NonNativeAppsStep::TestForceCommitL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine) + { + INFO_PRINTF1(_L("..Start Testing TestForceCommitL API...")); + + //Register app A and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..registering app 'A' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, aRegistrationResourceFileWriter, NULL, NULL); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppA);//Since applist update has not yet completed + + //Register app B and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..registering app 'B' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, aRegistrationResourceFileWriterB, NULL, NULL); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + TThreadId notUsed2; + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA);//Check if app A launches since applist update is complete now + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppB);//Similarly check if app B launches + + //DeRegister app B and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..deregistering app 'B' using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationB)); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + //Since applist update has not yet completed, both apps should launch + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + //Check if app B fails to launches Since applist update is complete now + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + //Deregister app A and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..deregistering app 'A' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + WaitForApplistUpdate(aApparcServer); + //Both apps fail to launch since they are deregistered + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + INFO_PRINTF1(_L("..End Testing TestForceCommitL API...")); + } + + void CT_NonNativeAppsStep::TestRollbackRegistrationL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine) + { + INFO_PRINTF1(_L("..Start Testing TestRollbackRegistrationL API...")); + + //Register app A and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..registering app 'A' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, aRegistrationResourceFileWriter, NULL, NULL); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppA);//Since applist update has not yet completed + + //Register app B and RollbackNNAUpdates + INFO_PRINTF1(_L("..registering app 'B' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, aRegistrationResourceFileWriterB, NULL, NULL); + aApparcServer.RollbackNonNativeApplicationsUpdates(); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA);//Check if app A launches + //App B's registration was rolled back, so cannot launch it + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + //DeRegister app A and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..deregistering app 'A' using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + //Since applist update has not yet completed, app A should launch + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + //Both apps fail to launch + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + INFO_PRINTF1(_L("..End Testing TestRollbackRegistrationL API...")); + } + + void CT_NonNativeAppsStep::TestRollbackDeregistrationL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine) + { + INFO_PRINTF1(_L("..Start Testing TestRollbackDeregistrationL API...")); + + //Register app A and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..registering app 'A' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, aRegistrationResourceFileWriter, NULL, NULL); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppA);//Since applist update has not yet completed + + //Register app B and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..registering app 'B' using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, aRegistrationResourceFileWriterB, NULL, NULL); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + //Check if both apps launches since applist update is complete now + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + //DeRegister app B and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..deregistering app 'B' using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationB)); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + + //DeRegister app A and ForceCommitNNAUpdate + INFO_PRINTF1(_L("..deregistering app 'A' using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.RollbackNonNativeApplicationsUpdates(); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + //Since deregistration of app A was rolled back it still launches + CheckApplicationLaunchesOkayL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + INFO_PRINTF1(_L("..deregistering app 'A' using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KApplicationA)); + aApparcServer.ForceCommitNonNativeApplicationsUpdatesL(); + + //Wait for applist to be updated + WaitForApplistUpdate(aApparcServer); + //Both apps fail to launch + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppA); + CheckApplicationFailsToLaunchL(aApparcServer, aNextCommandLine, (TAny*)EAppB); + + INFO_PRINTF1(_L("..End Testing TestRollbackDeregistrationL API...")); + } + +// CTestStep derived functions + +CT_NonNativeAppsStep::~CT_NonNativeAppsStep() + { + } + +CT_NonNativeAppsStep::CT_NonNativeAppsStep() + { + SetTestStepName(KT_NonNativeAppsStep); + } + +TVerdict CT_NonNativeAppsStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_NonNativeAppsStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_NonNativeAppsStep::doTestStepL() + { + INFO_PRINTF1(_L("Test NonNativeApps starting....\n")); + + RTstFileArray fileArray(2); + CleanupClosePushL(fileArray); + fileArray.AppendL(_L("z:\\private\\101F289C\\GIF.NNA1"), KLit8_DataType_Gif); + fileArray.AppendL(_L("z:\\private\\101F289C\\HTML.NNA2"), KLit8_DataType_Html); + fileArray.AppendL(_L("z:\\private\\101F289C\\CONTACT.NNA3"), KLit8_DataType_Vcard); + fileArray.AppendL(_L("z:\\private\\101F289C\\TXT.NNA4"), KLit8_DataType_plainText); + + RTestableApaLsSession apparcServer; + CleanupClosePushL(apparcServer); + User::LeaveIfError(apparcServer.Connect()); + + RFs fileServer; + CleanupClosePushL(fileServer); + User::LeaveIfError(fileServer.Connect()); + User::LeaveIfError(fileServer.ShareProtected()); + + apparcServer.FlushRecognitionCache(); + HEAP_TEST_LS_SESSION(apparcServer, 0, 0, TestAppForDocumentL(apparcServer, fileServer, fileArray), apparcServer.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(apparcServer, 0, 0, TestAppForDocumentAndServiceL(apparcServer, fileServer, fileArray), apparcServer.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(apparcServer, 0, 0, TestRecognizingL(apparcServer, fileServer, fileArray), apparcServer.FlushRecognitionCache()); + + //avoid race conditions + User::After(1500000); + //DONT_CHECK Skips the heap check at server side. This heap imbalance happens intermittently,with no known reason (See PDEF111975). + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestStartDocumentL(apparcServer, fileServer, fileArray), apparcServer.FlushRecognitionCache()); + //DONT_CHECK due to file system changes + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestRegisterNonNativeApplicationL(apparcServer,fileServer), NO_CLEANUP); + + //INC127734: Test case is added to test ForceCommitNonNativeApplicationsUpdatesL API + //DONT_CHECK due to file system changes + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestCommitNNAppUpdatesL(apparcServer), NO_CLEANUP); + //DONT_CHECK due to file system changes + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestForceCommitNNAppUpdatesL(apparcServer), NO_CLEANUP); + + CleanupStack::PopAndDestroy(3, &fileArray); + + INFO_PRINTF1(_L("....Test NonNativeApps completed!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NonNativeAppsStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NonNativeAppsStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,112 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_NONNATIVEAPPSTEP_H__) +#define __T_NONNATIVEAPPSTEP_H__ + +#include +#include + +#include "ApparcTestServer.h" + +// RTstFileArray + +class RTstFileArray + { +public: + RTstFileArray(TInt aGranularity); + void Close(); + void AppendL(const TDesC& aFullFileName, const TDesC8& aExpectedDataType); + inline TInt Count() const {return iFileArray.Count();} + void Get(TPtrC& aFullFileName, TPtrC8& aExpectedDataType, TInt aIndex) const; +private: + struct SFile + { + HBufC* iFullFileName; + HBufC8* iExpectedDataType; + }; +private: + RArray iFileArray; + }; + + +// RTstAppService + +class RTstAppService : public RApaAppServiceBase + { +public: + static TInt DoTestL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath); +private: + RTstAppService(TUid aServiceUid); + void ConnectL(); + void ReceiveTestResult(TRequestStatus& aRequestStatus, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath); + // from RApaAppServiceBase + virtual TUid ServiceUid() const; +private: + const TUid iServiceUid; + }; + + + +// CT_NonNativeApps test class. + +class CT_NonNativeAppsStep : public CTestStep + { +public: + CT_NonNativeAppsStep(); + ~CT_NonNativeAppsStep(); + + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + HBufC8* OpenFileAndReadBufferLC(RApaLsSession& aApparcServer, RFs& aFileServer, const TDesC& aFullFileName); + void OpenFileAndSetFilePositionToSomewhereUnusualLC(RFile& aFile, TInt& aFilePosition, RFs& aFileServer, const TDesC& aFullFileName); + void TestFilePosition(RFile& aFile, TInt aFilePosition); + void TestResultsOfAppForDocumentAndServiceL(TUid aServiceUid, TInt aError, const TUid& aAppUid, const TDataType& aDataType, const TDesC8& aExpectedDataType); + void CheckPropertyUpdateAndResetL(const TDesC& aExpectedNewValue); + void CheckApplicationLaunchesOkayL(RApaLsSession& aApparcServer, const CApaCommandLine& aCommandLine, TAny* aOption); + void CheckApplicationFailsToLaunchL(RApaLsSession& aApparcServer, const CApaCommandLine& aCommandLine, TAny* aOption); + void WaitForApplistUpdate(RApaLsSession& aApparcServer); +private: + void TestAppForDocumentL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray); + void TestAppForDocumentAndServiceL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray); + void TestRecognizingL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray); + void TestStartDocumentL(RApaLsSession& aApparcServer, RFs& aFileServer, const RTstFileArray& aFileArray); + void TestRegisterNonNativeApplicationL(RApaLsSession& aApparcServer, RFs& aFileServer); + void TestGetAppIconForNonNativeL(RApaLsSession& aApparcServer, RFs& aFileServer, CApaRegistrationResourceFileWriter* const aRegistrationResourceFileWriter, CApaLocalisableResourceFileWriter* const aLocalisableResourceFileWriter); + void TestCommitNNAppUpdatesL(RApaLsSession& aApparcServer); + void TestForceCommitNNAppUpdatesL(RApaLsSession& aApparcServer); + void TestForceCommitL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine); + void TestRollbackRegistrationL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine); + void TestRollbackDeregistrationL(RApaLsSession& aApparcServer, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriter, CApaRegistrationResourceFileWriter& aRegistrationResourceFileWriterB, CApaCommandLine& aNextCommandLine); + +private: + + }; + + +_LIT(KT_NonNativeAppsStep,"T_NonNativeApps"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NotifStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NotifStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,305 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Checks for notifications when application list changes.\n +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "appfwk_test_utils.h" +#include "T_NotifStep.h" + + +/** + + Overridden from virtual method MApaAppListServObserver::HandleAppListEvent(). + This method is used to receive notification for change in application list.\n + +*/ +void CTestObserver::HandleAppListEvent(TInt /*aEvent*/) + { + + iNotified++; + if (iNotifier) + iNotifier->Cancel(); + CActiveScheduler::Stop(); + } + +/** + Auxiliary Fn for Test Case ID T-NotifStep-TestAppNotificationL + + Copy a registration resource file in the path "c:\private\10003a3f\import\apps" . +*/ +void CT_NotifStep::CreateAppL(const TDesC& aAppName) + { + TFileName appFullName; + TFileName appTargetName; + CFileMan* fileManager = CFileMan::NewL(iFs); + CleanupStack::PushL(fileManager); + appFullName.Format(_L("z:\\ApparcTest\\%S_reg.RSC"),&aAppName); + appTargetName.Format(_L("C:\\Private\\10003a3f\\Import\\apps\\%S_reg.Rsc"), &aAppName); + INFO_PRINTF2(_L("copying the file: %S"), &appTargetName); + TInt ret = fileManager->Copy (appFullName, appTargetName, CFileMan::ERecurse); + TEST(ret==KErrNone); + CleanupStack::PopAndDestroy(fileManager); + } + +/** + Auxiliary Fn for Test Case ID T-NotifStep-TestAppNotificationL + Delete a registration resource file from the path "c:\private\10003a3f\import\apps" . +*/ +void CT_NotifStep::DeleteAppL(const TDesC& aAppName) + { + TFileName appFullName; + CFileMan* fileManager = CFileMan::NewL(iFs); + CleanupStack::PushL(fileManager); + appFullName.Format(_L("C:\\Private\\10003a3f\\Import\\apps\\%S_reg.Rsc"),&aAppName); + + INFO_PRINTF2(_L("Deleting the file: %S"), &appFullName); + TRequestStatus status; + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + TEST(fileManager->Attribs(appFullName,0,KEntryAttReadOnly, tempTime, CFileMan::ERecurse, status)==KErrNone); + User::WaitForRequest(status); + TEST(status.Int() == KErrNone); + TInt ret = fileManager->Delete(appFullName, CFileMan::ERecurse); + TEST(ret==KErrNone); + CleanupStack::PopAndDestroy(fileManager); + } + +/** + @SYMTestCaseID T-NotifStep-TestAppNotificationL + + @SYMPREQ REQ1087, PCHY-5L3RDW + + @SYMTestCaseDesc Test whether notification is received from CApaAppListNotifier + whenever application list changes. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The method creates an object of user-defined observer CTestObserver + and creates a CApaAppListNotifier active object which is associated to the + observer. It then starts the active scheduler and adds a new application or deletes + an application from the application list. To ensure that notifications are received on + change in application list HandleAppListEvent() method which is derived + from interface class MApaAppListServObserver is observed.\n + API Calls:\n + CApaAppListNotifier::NewL(MApaAppListServObserver* aObserver, TPriority aPriority)\n + + @SYMTestExpectedResults On deletion of the app the notification for change in + the application list is received. + + */ +void CT_NotifStep::TestAppNotificationL() + { + // Force the applist to be updated + //To ensure that server has time to count all applications in the system + RPointerArray dummy; + User::LeaveIfError(iSession.ForceRegistration(dummy)); + + TInt theAppCount = 0; + TInt theErr1 = iSession.AppCount(theAppCount); + TEST(theErr1==KErrNone); + + INFO_PRINTF2(_L("The number of applications : %d"), theAppCount); + + CTestObserver* obs=new(ELeave) CTestObserver(); + CleanupStack::PushL(obs); + CApaAppListNotifier* notif=CApaAppListNotifier::NewL(obs,CActive::EPriorityHigh); + CleanupStack::PushL(notif); + obs->iNotifier=notif; + INFO_PRINTF1(_L("Creating and deleting apps for notification")); + CreateAppL(_L("AAA")); + + CActiveScheduler::Start(); + + TInt theAppCount1 = 0; + theErr1 = iSession.AppCount(theAppCount1); + TEST((theAppCount1 - 1) == theAppCount); + INFO_PRINTF2(_L("The number of applications : %d"), theAppCount1); + CleanupStack::PopAndDestroy(notif); + + notif = CApaAppListNotifier::NewL(obs,CActive::EPriorityHigh); + CleanupStack::PushL(notif); + obs->iNotifier = notif; + INFO_PRINTF1(_L("Deleting the application")); + DeleteAppL(_L("AAA")); + + CActiveScheduler::Start(); + + CleanupStack::PopAndDestroy(notif); + User::LeaveIfError(iSession.ForceRegistration(dummy)); + theErr1 = iSession.AppCount(theAppCount1); + TEST(theErr1==KErrNone); + TEST(theAppCount1 == theAppCount); + + INFO_PRINTF2(_L("The number of applications : %d"), theAppCount1); + TEST(obs->iNotified>0); + + INFO_PRINTF2(_L("Received %d notifications"),obs->iNotified); + CleanupStack::PopAndDestroy(obs); + } + +void CT_NotifStep::ModifyIconFileTimeStamp() + { + _LIT(KMbmIconFile, "c:\\resource\\apps\\tupgradeiconapp.mbm"); + _LIT(KTestIconFile, "c:\\TestUpgradeIcon\\tupgradeiconapp.mbm"); + _LIT(KTestIconFileTempPath, "c:\\TestUpgradeIcon\\"); + + // Create KMbmIconFileTempPath + TInt ret = iUtils.CreateDirectoryL(KTestIconFileTempPath); + TEST(ret == KErrNone || ret == KErrAlreadyExists); + INFO_PRINTF1(_L("Copy icon file from C: drive to temp path")); + ret = iUtils.CopyFileL(KMbmIconFile, KTestIconFileTempPath); + + INFO_PRINTF1(_L("Modify timestamp of the icon file")); + TTime modifiedTime(0); + modifiedTime.HomeTime(); + ret = iFs.SetModified(KTestIconFile, modifiedTime); + TEST(ret==KErrNone); + ret = iUtils.SetReadOnly(KTestIconFile, 0); + TEST(ret==KErrNone); + INFO_PRINTF2(_L("Replace the modified icon file in C: drive (%S)"), &KMbmIconFile); + ret = iUtils.CopyFileL(KTestIconFile, KMbmIconFile); + // wait 5 seconds to finish re-scan + User::After(5*1000000); + TEST(ret==KErrNone); + } + +/** + @SYMTestCaseID T-NotifStep-TTestIconFileNotificationL + + @SYMPREQ PDEF102804 + + @SYMTestCaseDesc Test whether notification is received from CApaAppListNotifier whenever the application icon file is changed + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Modify the application icon file in a temporary location. Move icon file to a location specified in the resource file. + + @SYMTestExpectedResults A notification is recieved when the updated icon file is replaced to a location specified in the resource file. +*/ +void CT_NotifStep::TestIconFileNotificationL() + { + // Force the applist to be updated + //To ensure that server has time to count all applications in the system + RPointerArray dummy; + User::LeaveIfError(iSession.ForceRegistration(dummy)); + + // Create observer + CTestObserver* obs = new(ELeave) CTestObserver(); + CleanupStack::PushL(obs); + CApaAppListNotifier* notif = CApaAppListNotifier::NewL(obs, CActive::EPriorityHigh); + CleanupStack::PushL(notif); + obs->iNotifier=notif; + + // Change the timestamp of the icon file + INFO_PRINTF1(_L("Modifying the icon file...attempt to check it's notified")); + ModifyIconFileTimeStamp(); + + CActiveScheduler::Start(); + + CleanupStack::PopAndDestroy(notif); + // Test if notification is recieved. + TEST(obs->iNotified > 0); + if (obs->iNotified > 0) + { + INFO_PRINTF2(_L("Received %d notifications"),obs->iNotified); + } + + CleanupStack::PopAndDestroy(obs); //obs + } + +CT_NotifStep::~CT_NotifStep() +/** + Destructor + */ + { + delete iScheduler; + } + +CT_NotifStep::CT_NotifStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_NotifStep); + } + +TVerdict CT_NotifStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + INFO_PRINTF1(_L("Testing Apparc...T_Notif")); + + TInt ret = FbsStartup(); + TEST(ret==KErrNone); + ret=RFbsSession::Connect(); + TEST(ret==KErrNone); + // start an active scheduler + iScheduler=new(ELeave) CActiveScheduler(); + CActiveScheduler::Install(iScheduler); + + TEST(KErrNone == iFs.Connect()); + TEST(KErrNone == iSession.Connect()); + TEST(KErrNone == iUtils.Connect()); + + // run the testcode (inside an alloc heaven harness) + __UHEAP_MARK; +#if defined (__WINSCW__) + INFO_PRINTF1(_L("T-NotifStep-TTestIconFileNotificationL Test Started...")); + TRAP(ret,TestIconFileNotificationL()); + TEST(ret==KErrNone); + INFO_PRINTF2(_L("TestIconFileNotificationL() finished with return code '%d'\n"), ret); +#endif + INFO_PRINTF1(_L("T-NotifStep-TestAppNotificationL Test Started...")); + TRAP(ret,TestAppNotificationL()); + TEST(ret==KErrNone); + INFO_PRINTF2(_L("TestAppNotificationL() finished with return code '%d'\n"), ret); + __UHEAP_MARKEND; + + iUtils.Close(); + iSession.Close(); + iFs.Close(); + RFbsSession::Disconnect(); + INFO_PRINTF1(_L("T_Notif Completed.")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NotifStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_NotifStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,67 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_NOTIF_STEP_H__) +#define __T_NOTIF_STEP_H__ +#include +#include "ApparcTestServer.h" +#include "testableapalssession.h" + +//! A CT_NotifStep test class. + +/** Checks for notifications when application list changes. */ + +class CT_NotifStep :public CTestStep + { +public: + CT_NotifStep(); + ~CT_NotifStep(); + virtual TVerdict doTestStepL(); + void TestAppNotificationL(); + void TestIconFileNotificationL(); + +private: + void CreateAppL(const TDesC& aAppName); + void DeleteAppL(const TDesC& aAppName); + void ModifyIconFileTimeStamp(); + +private: + CActiveScheduler* iScheduler; + RFs iFs; + RApaLsSession iSession; + RSmlTestUtils iUtils; + }; + +class CTestObserver : public CBase, public MApaAppListServObserver + { +public: // from MApaAppListServObserver + void HandleAppListEvent(TInt aEvent); + +public: + TInt iNotified; + CApaAppListNotifier* iNotifier; + }; + +_LIT(KT_NotifStep,"T_Notif"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_OOMStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_OOMStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,616 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Performs the Out of Memory Tests.\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include "tstapp.h" +#include +#include +#include +#include +#include +#include "T_OOMStep.h" +// +#if !defined(__E32TEST_H__) +#include +#endif + + +void CT_OOMStep::setup() + { +#if defined(__EPOC32__) + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + TFullName tempPath=_L("c:\\system\\temp\\"); + // if we're on the rack create the directories we need + TParse parser; + parser.Set(filePath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); + parser.Set(tempPath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); +#endif + } + + + +/** + Auxiliary Fn for Test Case ID T-OOMStep-TestOOMConstructionL + + This function adds a new document to the app DLL and associates a + temporary store. The document is then initialized with the default settings. +*/ +CApaDocument* CT_OOMStep::CreateTestDocL(CApaProcess* aProcess) + { + + TFileName dllname=_L("tstapp.app"); + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + // create a new main doc of type tstapp + CApaDocument* doc=NULL; + + TApaApplicationFactory appFact(KUidTestApp); + doc=aProcess->AddNewDocumentL(appFact); + + aProcess->SetMainDocument(doc); + // + // create the store and initialise it + CFileStore* store = doc->CreateFileStoreLC(aProcess->FsSession(),filePath); + CleanupStack::Pop(); // store + ((CTestAppDoc*)aProcess->MainDocument())->iStore = store; + aProcess->SetMainDocFileName(filePath); + // + // initialise the document with factory settings + doc->NewDocumentL(); + // + return doc; + } + + +/** + Auxiliary Fn for Test Case ID T-OOMStep-TestOOMConstructionL + + This function creates a test document for app DLL and saves + the document. + +*/ +void CT_OOMStep::CreateTestDocFileL() + { + + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + // delete the file to be created by the testcode + iFs.Delete(filePath); + iFs.MkDir(_L("c:\\docs\\")); + + // create an appfinder and process + CApaProcess* process = CApaProcess::NewL(iFs); + CApaDocument* doc = CreateTestDocL(process); + + // save it + doc->SaveL(); + + // tidy up + process->DestroyDocument(doc); + delete process; + } + +/** + @SYMTestCaseID T-OOMStep-TestOOMConstructionL + + @SYMPREQ + + @SYMTestCaseDesc Test methods CApaScanningAppFinder::NewL, CApaProcess::NewL, + CApaProcess::AddNewDocumentL, CApaProcess::OpenNewDocumentL and CApaDocument::SaveL + when device goes Out of Memory. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n OOM Test for CApaScanningAppFinder::NewL:\n + Use macro __UHEAP_SETFAIL() to simulate the out of memory + situation. Call CApaScanningAppFinder::NewL() to allocate memory. Observe + the leave that occurs. Observe after how many allocations the leave occurs.\n\n + OOM Test for CApaProcess::NewL:\n + Use macro __UHEAP_SETFAIL() to simulate the out of memory situation. Call + CApaProcess::NewL() to allocate memory. Observe the leave that occurs. + Observe after how many allocations the leave occurs.\n\n + OOM Test for CApaProcess::AddNewDocumentL:\n + Use macro __UHEAP_SETFAIL() to simulate the out of memory situation. Call + CApaProcess::AddNewDocumentL() to allocate memory. Observe the leave that + occurs. Observe after how many allocations the leave occurs.\n\n + OOM Test for CApaProcess::OpenNewDocumentL:\n + Use macro __UHEAP_SETFAIL() to simulate the out of memory situation. Call + CApaProcess::OpenNewDocumentL() to allocate memory. Observe the leave that + occurs. Observe after how many allocations the leave occurs.\n\n + OOM Test for CApaDocument::SaveL:\n + Create and initialize a document for tstapp. Use macro __UHEAP_SETFAIL() + to simulate the out of memory situation. Call CApaDocument::SaveL() to + allocate memory for the document to be saved. Observe the leave that occurs. + Observe after how many allocations the leave occurs.\n\n + API Calls:\n + CApaScanningAppFinder::NewL(const RFs& aFs)\n + CApaProcess::NewL(const RFs& aFs,CApaAppFinder& aAppFinder)\n + CApaProcess::AddNewDocumentL(const TDesC& aDllFileName,TUid aDllUid=KNullUid)\n + CApaProcess::OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode)\n + CApaDocument::SaveL()\n + + @SYMTestExpectedResults Tests should complete without any memory leaks. It should + also observe the no of allocations which occur before OOM situation. + + */ +void CT_OOMStep::TestOOMConstructionL() + { + TInt failRate=0; + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + + __UHEAP_RESET; + + // CApaProcess + INFO_PRINTF1(_L("CApaProcess construction under OOM")); + CApaProcess* process=NULL; + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + __UHEAP_MARK; + + TRAPD(ret, process = CApaProcess::NewL(iFs)); + + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + __UHEAP_MARKEND; + TEST(process==NULL); + } + else + { + TEST(process!=NULL); + delete process; + process = NULL; + REComSession::FinalClose(); + __UHEAP_MARKEND; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); + // + // creating CApaDocument + INFO_PRINTF1(_L("CApaDocument construction under OOM")); + CApaDocument* doc=NULL; + // + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + process = CApaProcess::NewL(iFs); + TEST(process!=NULL); + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + __UHEAP_MARK; + + TApaApplicationFactory appFact(KUidTestApp); + TRAPD(ret,doc=process->AddNewDocumentL(appFact)); + + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + TEST(doc==NULL); + } + else + { + TEST(doc!=NULL); + process->DestroyDocument(doc); + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); + // + // opening a CApaDocument + INFO_PRINTF1(_L("CApaDocument Restoration under OOM")); + TRAPD(err,CreateTestDocFileL()); + TEST(err==KErrNone); + // + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + doc = NULL; + process = CApaProcess::NewL(iFs); + + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + __UHEAP_MARK; + CFileStore* store=NULL; + CStreamDictionary* streamDic=NULL; + TRAPD(ret, doc=process->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + delete streamDic; + delete store; + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + TEST(doc==NULL); + } + else + { + TEST(doc!=NULL); + TEST(streamDic!=NULL); + TEST(store!=NULL); + delete streamDic; + delete store; + process->DestroyDocument(doc); + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); + // + // saving a CApaDocument + INFO_PRINTF1(_L("CApaDocument Storing under OOM")); + // + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + // delete the file to be created by the testcode + iFs.Delete(filePath); + process = CApaProcess::NewL(iFs); + doc = CreateTestDocL(process); + // attempt to save + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + __UHEAP_MARK; + TRAPD(ret, doc->SaveL()); + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + process->DestroyDocument(doc); + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + } + else + { + process->DestroyDocument(doc); + delete process; + REComSession::FinalClose(); + __UHEAP_MARKEND; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); + // + } + +/** + @SYMTestCaseID T-OOMStep-TestDoorOOML + + @SYMPREQ + + @SYMTestCaseDesc Test CApaDoor APIs NewL(), StoreL(), Restore() when device + goes Out of Memory. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The method simulates an OOM scenario to test CApaDoor APIs NewL(), + StoreL() and Restore().\n\n + To test CApaDoor::NewL(), the method creates a process and adds a new document + to app DLL using AddNewDocumentL(). Using the macro __UHEAP_SETFAIL() OOM + scenario is simulated. Call CApaDoor::NewL() to observe the leave returned.\n\n + To test CApaDoor::StoreL(), the method creates a process and adds a new + document to app DLL using AddNewDocumentL(). It calls CApaDoor::NewL() to + create a wrapper for the document. A temporary buffer store is created. + Now Use macro __UHEAP_SETFAIL() to simulate the OOM scenario. + Call CApaDoor::StoreL() to store the document in the specified store. + Observe the leave returned.\n\n + To test CApaDoor::Restore(), the method creates a process and adds a new + document to app DLL using AddNewDocumentL(). It calls CApaDoor::NewL() + to create a wrapper for the document. A temporary buffer store is created. + Now Call CApaDoor::StoreL() to store the document in the specified store. + Use macro __UHEAP_SETFAIL() to simulate the OOM scenario. Call + CApaDoor::RestoreL() to restore the document from the specified store. + Observe the leave returned.\n + API Calls:\n + CApaDoor::NewL(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips)\n + CApaDoor::StoreL(CStreamStore& aStore) const\n + CApaDoor::RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId)\n + + @SYMTestExpectedResults Tests should complete without any memory leaks. + + */ +void CT_OOMStep::TestDoorOOML() + { + CApaProcess* process=NULL; + CApaDocument* doc=NULL; + CApaDoor* door=NULL; + TInt failRate=0; + // + INFO_PRINTF1(_L("CApaDoor construction under OOM")); + // + __UHEAP_MARK; + //Create a session with F & B server + TInt ret=RFbsSession::Connect(); + TEST(!ret); + + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + door = NULL; + process = CApaProcess::NewL(iFs); + TApaApplicationFactory appFact(KUidTestApp); + doc=process->AddNewDocumentL(appFact); + + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + + door = NULL; + TRAPD(ret,door=CApaDoor::NewL(iFs,*doc,TSize(400,400))); + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + delete process; + TEST(door==NULL); + } + else + { + TEST(door!=NULL); + delete door; + + delete process; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs for c'tion: %d\n"),failRate-1); + // + INFO_PRINTF1(_L("CApaDoor Store() under OOM")); + // + CBufStore* store=NULL; + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + door = NULL; + process = CApaProcess::NewL(iFs); + TApaApplicationFactory appFact(KUidTestApp); + doc=process->AddNewDocumentL(appFact); + + door = CApaDoor::NewL(iFs,*doc,TSize(400,400)); // owns doc + store = CBufStore::NewL(10); + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + + TStreamId id=KNullStreamId; + TRAPD(ret,id=door->StoreL(*store)); + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + TEST(id==KNullStreamId); + delete store; + delete door; + + delete process; + } + else + { + TEST(id!=KNullStreamId); + delete store; + + delete door; + delete process; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs: %d\n"),failRate-1); + // + INFO_PRINTF1(_L("CApaDoor Restore() under OOM")); + // + for (failRate=1;;failRate++) + { + __UHEAP_RESET; + door = NULL; + process = CApaProcess::NewL(iFs); + TApaApplicationFactory appFact(KUidTestApp); + doc = process->AddNewDocumentL(appFact); + door = CApaDoor::NewL(iFs,*doc,TSize(400,400)); // owns doc + store = CBufStore::NewL(10); + TStreamId id = door->StoreL(*store); + __UHEAP_SETFAIL(RHeap::EDeterministic,failRate); + + TRAPD(ret,door->RestoreL(*store,id)); + TEST((ret==KErrNone || ret==KErrNoMemory)); + if (ret!=KErrNone) + { + delete store; + delete door; + + delete process; + } + else + { + delete store; + delete door; + + delete process; + break; + } + } + __UHEAP_RESET; + INFO_PRINTF2(_L(" #allocs: %d\n"),failRate-1); + // + //Close the session F & B server. + RFbsSession::Disconnect(); + REComSession::FinalClose(); + __UHEAP_MARKEND; + } + + +/** + Auxiliary Fn for all Test Cases. + + This method creates and installs an active scheduler and puts the + test code on the scheduler as a CIdle object. The method initiates + all tests by calling the static method CT-OOMStepCallBack::CallBack(). + +*/ +void CT_OOMStep::DoTestsInCallBackL() + { + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + // put the test code onto the scheduler as an idle object + CIdle* idle=CIdle::NewL(-20); + CleanupStack::PushL(idle); + + CT_OOMStepCallBack* callBack = new(ELeave) CT_OOMStepCallBack(this); + CleanupStack::PushL(callBack); + + idle->Start(TCallBack(CT_OOMStepCallBack::CallBack,callBack)); + // start the test code + CActiveScheduler::Start(); + + // all outstanding requests complete - kill the scheduler + CleanupStack::PopAndDestroy(3); //scheduler, callBack, idle + } + + + +CT_OOMStepCallBack::CT_OOMStepCallBack(CT_OOMStep* aTestStep) +{ + iTestStep = aTestStep; +} + + +CT_OOMStepCallBack::~CT_OOMStepCallBack() +{ + +} +/** + Auxiliary Fn for all Test Cases. + + The method initiates all tests to be performed. + +*/ +void CT_OOMStep::DoStepTests() +{ + __UHEAP_MARK; + + INFO_PRINTF1(_L("About to test OOM resilience")); + TRAPD(r,TestOOMConstructionL()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("About to test door OOM resilience")); + TRAP(r,TestDoorOOML()); + TEST(r==KErrNone); + __UHEAP_MARKEND; +} + +TInt CT_OOMStepCallBack::CallBack(TAny* callBack/*aThis*/) +/** + This static method is the callback function of CIdle object. The method + calls the non-static method DoStepTests() which initiates all the tests. +*/ + { + + //Do Tests. + ((CT_OOMStepCallBack *)callBack)->iTestStep->DoStepTests(); + + CActiveScheduler::Stop(); + return EFalse; // don't call back again + } + + + + +CT_OOMStep::~CT_OOMStep() +/** + Destructor + */ + { + } + +CT_OOMStep::CT_OOMStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_OOMStep); + } + +TVerdict CT_OOMStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_OOMStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + +TVerdict CT_OOMStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual +*/ +{ + INFO_PRINTF1(_L("Testing Apparch...OOM tests")); + // + // set up an fbs + FbsStartup(); + // + // set up the directory structure + iFs.Connect(); + setup(); + // + // run the testcode + + TRAPD(ret,DoTestsInCallBackL()) + TEST(ret==KErrNone); + + iFs.Close(); + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_OOMStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_OOMStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,67 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_OOM_STEP_H__) +#define __T_OOM_STEP_H__ + +#include "ApparcTestServer.h" + +//! A CT_OOMStep test class. + +/** Performs the Out of Memory Tests. */ + +class CT_OOMStep : public CTestStep + { +public: + CT_OOMStep(); + ~CT_OOMStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void DoStepTests(); + +//private: + CApaDocument* CreateTestDocL(CApaProcess* aProcess); + void CreateTestDocFileL(); + void TestOOMConstructionL(); + void TestDoorOOML(); + void DoTestsInCallBackL(); + void setup(); + +private: + RFs iFs; + }; + +class CT_OOMStepCallBack : public CBase + { +public: + CT_OOMStepCallBack(CT_OOMStep* aTestStep); + ~CT_OOMStepCallBack(); + static TInt CallBack(TAny* aThis); + CT_OOMStep* iTestStep; + }; + + + +_LIT(KT_OOMStep,"T_OOM"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1548 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests Application Apparc base classes and utility functions to get application's data.\n +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include "..\apparc\apadll.h" +#include "..\apgrfx\apgstd.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "testableapalssession.h" +#include + +#include "T_ProStep.h" +#include "tstapp.h" +#include + +#if !defined(__E32TEST_H__) +#include +#endif + +TInt PanicTestThread(TAny* aOption); + +enum TPanicOption + { + EFirst, + ENegativePanicTest, + EUnknownPanicOption, + ELast + }; + + +_LIT(KCTLDIR,"C:\\private\\10003a3f\\import\\apps\\"); +_LIT(KSOURCEPATH,"z:\\private\\10003a3f\\import\\apps\\m_ctrl_reg.rsc"); +_LIT(KNEWCTLPATH,"C:\\private\\10003a3f\\import\\apps\\m_ctrl_reg.rsc"); +_LIT(KNEWPATH,"C:\\cm.txt"); +_LIT(KEMPTYFILEPATH,"z:\\system\\data\\Testpath\\FilterTests\\testfile1.txt"); + +_LIT(KRSCDIR,"C:\\Resource\\apps\\"); +_LIT(KLOCPATH,"z:\\Resource\\apps\\M_ctrl_loc.rsc"); +_LIT(KNEWLOCPATH,"C:\\Resource\\apps\\M_ctrl_loc.rsc"); +_LIT(KCTRLNAME,"C:\\sys\\bin\\m_ctrl.exe"); +TFileName ctlPath=_L("z:\\sys\\bin\\m_ctrl.exe"); + + +LOCAL_D TInt SimulateKeyL(TAny*) + { + User::After(3000000); + RWsSession session; + User::LeaveIfError(session.Connect()); + + //control down + TRawEvent rawEvent; + rawEvent.Set(TRawEvent::EKeyDown,EStdKeyLeftCtrl); + session.SimulateRawEvent(rawEvent); + + // e down + rawEvent.Set(TRawEvent::EKeyDown,'E'); + session.SimulateRawEvent(rawEvent); + + // e up + rawEvent.Set(TRawEvent::EKeyUp,'E'); + session.SimulateRawEvent(rawEvent); + + //control up + rawEvent.Set(TRawEvent::EKeyUp,EStdKeyLeftCtrl); + session.SimulateRawEvent(rawEvent); + + session.Flush(); + session.Close(); + + return KErrNone; + } + +void CT_ProStep::setup() + { +#if defined(__EPOC32__) + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + TFullName tempPath=_L("c:\\system\\temp\\"); + // if we're on the rack create the directories we need + TParse parser; + parser.Set(filePath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); + parser.Set(tempPath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); +#endif + } + + +/** + @SYMTestCaseID T-ProStep-testAppIdentifierL + + @SYMPREQ + + @SYMTestCaseDesc Tests TApaAppIdentifier API. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a temporary store. Construct an application identifier + for the specified application DLL, and Uid. Call WriteAppIdentifierL() to + store application identifier details. Read the stored application identifier + details.\n + API Calls:\n + TApaAppIdentifier::TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName)\n + CApaProcess::WriteAppIdentifierL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId)\n + CApsProcess::ReadAppIdentifierL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic)\n + + @SYMTestExpectedResults Test checks whether stored and read application + identifier details match. + + */ +void CT_ProStep::testAppIdentifierL() + { + const TFullName tempPath=_L("c:\\system\\temp\\"); + const TUid testUid={1}; + + INFO_PRINTF1(_L("Testing TApaAppIdentifier")); + + // create a process + TRAPD(ret,iProcess = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + + // create a temporary store and stream dictionary + TParse newFilePath; + HBufC* related = HBufC::NewL(20); + (*related)=_L("temp.idf"); + newFilePath.Set(tempPath,related,NULL); + delete related; + iFs.MkDirAll(newFilePath.DriveAndPath()); + CDirectFileStore* store = CDirectFileStore::ReplaceLC(iFs,newFilePath.FullName(),EFileWrite); + store->SetTypeL(TUidType(KDirectFileStoreLayoutUid,testUid,testUid)); + CStreamDictionary* streamDic=CStreamDictionary::NewL(); + CleanupStack::PushL(streamDic); + + // set up an id + TApaAppIdentifier* origId=new(ELeave) TApaAppIdentifier (testUid,_L("FileName")); + CleanupStack::PushL(origId); + + // write it out and read it in again + iProcess->WriteAppIdentifierL(*store,*streamDic,*origId); + TApaAppIdentifier* copyId=new(ELeave) TApaAppIdentifier(); + *copyId=iProcess->ReadAppIdentifierL(*store,*streamDic); + + CleanupStack::PushL(copyId); + TEST((origId->iAppUid==copyId->iAppUid)); + TEST((origId->iFullName==copyId->iFullName)); + + // tidy up + CleanupStack::PopAndDestroy(4); // store,streamDic,origId,copyId + delete iProcess; + iFs.Delete(newFilePath.FullName()); + } + + +/** + @SYMTestCaseID T-ProStep-doTestGenerateFileName + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaApplication::GenerateFileName(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call GenerateFileName() under following scenarios:\n + (1) when root name doesn't exist\n + (2) when root name exists\n + (3) when illegal paths are mentioned.\n + (4) when no memory is available to perfom the operation.\n + API Calls:\n + CApaApplication::GenerateFileName(RFs& aFs,TFileName& aRootName)\n + + @SYMTestExpectedResults Test should return the desired filename or error + code for each scenario + + */ +void CT_ProStep::doTestGenerateFileName() + { + TFileName rootName; + + // delete the test files just in case... + iFs.Delete(_L("c:\\path\\name")); + iFs.Delete(_L("c:\\path\\name.ext")); + + // try it with a root that doesn't exist + rootName = _L("c:\\path\\name"); + TInt ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST(ret==KErrNone); + TEST(rootName.CompareF(_L("c:\\path\\name"))==0); + + // try it with a root (inc ext) that doesn't exist + rootName = _L("c:\\path\\name.ext"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST(ret==KErrNone); + TEST(rootName.CompareF(_L("c:\\path\\name.ext"))==0); + + // create a couple of files + RFile file; + file.Create(iFs,_L("c:\\path\\name"),EFileWrite); + file.Close(); + file.Create(iFs,_L("c:\\path\\name.ext"),EFileWrite); + // file.Close(); // purposely don't close this one + + // try it with a root that exists + rootName = _L("c:\\path\\name"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST(ret==KErrNone); + TEST(rootName.CompareF(_L("c:\\path\\name(01)"))==0); + + // try it with a root (inc ext) that exists + rootName = _L("c:\\path\\name.ext"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST(ret==KErrNone); + TEST(rootName.CompareF(_L("c:\\path\\name(01).ext"))==0); + + // try with illegal paths + rootName = _L("c:name"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST((ret==KErrArgument)); + rootName = _L("\\dir\\name"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST((ret==KErrArgument)); + rootName = _L("c:\\dir\\"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST((ret==KErrBadName)); + + // try when no memory is available to perform the operation. + // (we haven't used a conventional OOM loop, but this is not a leaving function) + __UHEAP_MARK; + __UHEAP_SETFAIL(RHeap::EDeterministic,1); + rootName = _L("c:\\path\\nomemory.ext"); + ret=CApaApplication::GenerateFileName(iFs,rootName); + TEST(ret==KErrNoMemory); + __UHEAP_MARKEND; + __UHEAP_RESET; + + // tidy up + file.Close(); + iFs.Delete(_L("c:\\path\\name")); + iFs.Delete(_L("c:\\path\\name.ext")); + + } + +/** + @SYMTestCaseID APPFWK-APPARC-0055 + + @SYMDEF DEF092509 + + @SYMTestCaseDesc Tests CApaProcess::ReadRootStreamLC (). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call ReadRootStreamLC() under following scenarios:\n + (1) when File name Doesnt Exists\n + (2) When an empty file is present \n + + + + @SYMTestExpectedResults Test should return KErrNotFound for scenario (1). And error + KErrEof orKErrCorrupt for scenario (2). + + */ + + void CT_ProStep::testReadStreamL() + + { + CFileStore* docStore=NULL; + TUint appFileMode=EFileRead|EFileWrite; + CStreamDictionary* streamDic=NULL; + TRAPD(err,streamDic=CApaProcess::ReadRootStreamLC(iFs,docStore,KNEWPATH,appFileMode)); + TEST(err==KErrNotFound); + + delete docStore; + delete streamDic; + docStore=NULL; + streamDic=NULL; + appFileMode=EFileRead; + TRAP(err,streamDic=CApaProcess::ReadRootStreamLC(iFs,docStore,KEMPTYFILEPATH,appFileMode)); + TEST(err==KErrCorrupt || err==KErrEof); + } +/** + @SYMTestCaseID T-ProStep-testDocCreation1L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaProcess::AddNewDocumentL(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a process, call AddNewDocumentL() to create a new + document for an app DLL by\n + (1) passing full path of app.\n + (2) passing full path of app and the Uid.\n + In both cases call DestroyDocument() to destroy the document thus created.\n + API Calls:\n + CApaProcess::NewL(const RFs& aFs,CApaAppFinder& aAppFinder)\n + CApaProcess::AddNewDocumentL(const TDesC& aDllFileName,TUid aDllUid=KNullUid)\n + CApaProcess::DestroyDocument(CApaDocument* aDoc)\n + CApaProcess::ResetL()\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +void CT_ProStep::testDocCreation1L() + { + const TFullName filePath=_L("c:\\docs\\tstapp.doc"); + + INFO_PRINTF1(_L("Testing CApaProcess")); + + iFs.MkDirAll(filePath); + // delete the file to be created by the testcode + iFs.Delete(filePath); + + // create a process + TRAPD(ret,iProcess = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + + // create a new doc passing the full path of the app dll + CApaDocument* doc=NULL; + TApaApplicationFactory appFact(KUidTestApp); + TRAP(ret,doc=iProcess->AddNewDocumentL(appFact)); + TEST(ret==KErrNone); + iProcess->DestroyDocument(doc); + doc = NULL; + TRAP(ret,iProcess->ResetL()); + TEST(ret==KErrNone); + } + + +/** + @SYMTestCaseID T-ProStep-testDocCreation2L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaProcess::AddNewDocumentL(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call AddNewDocumentL() to create a new document for an app DLL. + Set it as the main document. Associate it with a temporary store. Initialize + the document to default settings. Store the document.\n + API Calls:\n + CApaProcess::AddNewDocumentL(const TDesC& aDllFileName,TUid aDllUid=KNullUid)\n + CApaDocument::NewDocumentL()\n + CApaDocument::SaveL()\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +void CT_ProStep::testDocCreation2L() + { + const TFullName filePath=_L("c:\\docs\\tstapp.doc"); + CApaDocument* doc=NULL; + + TApaApplicationFactory appFact(KUidTestApp); + TRAPD(ret,doc=iProcess->AddNewDocumentL(appFact)); + TEST(ret==KErrNone); + iProcess->SetMainDocument(doc); + CFileStore* store=NULL; + + // create the store and initialise it + TRAP(ret, { + store=doc->CreateFileStoreLC(iProcess->FsSession(),filePath); + CleanupStack::Pop(); // store + }); + TEST(ret==KErrNone); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + iProcess->SetMainDocFileName(filePath); + + // initialise the document with factory settings + TRAP(ret, doc->NewDocumentL() ); + TEST(ret==KErrNone); + + // close it + TRAP(ret,doc->SaveL()); + TEST(ret==KErrNone); + TRAP(ret, iProcess->ResetL() ); + TEST(ret==KErrNone); + store = NULL; + doc = NULL; + } + +/** + @SYMTestCaseID T-ProStep-testDocCreation3L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaProcess::OpenNewDocumentL() and CApaAppFileReader APIs. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a document from a specified file. Set it as main + document file. Create a CApaAppInfoFileReader object by calling + OpenAppInfoFileL(). Use CaptionL() and CreateMaskedBitmapL() to read + application information like caption and bitmap.\n + API Calls:\n + CApaProcess::OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode);\n + CApaApplication::OpenAppInfoFileL() const\n + CApaAppInfoFileReader::CaptionL(TLanguage aLanguage)\n + CApaAppInfoFileReader::CreateMaskedBitmapL(TInt aIconSideInPixels)\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +CApaDocument* CT_ProStep::testDocCreation3L() + { + // try re-opening it + const TFullName filePath=_L("c:\\docs\\tstapp.doc"); + CStreamDictionary* streamDic=NULL; + CApaDocument* doc=NULL; + CFileStore* store=NULL; + TRAPD(ret,doc=iProcess->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); + TEST(ret==KErrNone); + delete streamDic; + streamDic = NULL; + iProcess->SetMainDocument(doc); + iProcess->SetMainDocFileName(filePath); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + + // remove the main document + iProcess->DestroyDocument(iProcess->MainDocument()); + TEST(iProcess->MainDocument()==NULL); + + // try re-opening the doc without the app in memory + TRAP(ret,iProcess->ResetL()); + TEST(ret==KErrNone); + delete iProcess; + return doc; + } + + +/** + @SYMTestCaseID T-ProStep-testDocCreation4L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaProcess::OpenNewDocumentL(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a Process. Create a document for an app DLL from a + specified file by calling OpenNewDocumentL(). Call DestroyDocument() to + delete the document.\n + API Calls:\n + CApaProcess::OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode);\n + CApaProcess::DestroyDocument(CApaDocument* aDoc)\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +void CT_ProStep::testDocCreation4L(CApaDocument* aDoc) + { + const TFullName filePath=_L("c:\\docs\\tstapp.doc"); + CStreamDictionary* streamDic=NULL; + CFileStore* store=NULL; + TRAPD(ret,iProcess = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + TRAP(ret,aDoc=iProcess->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); + TEST(ret==KErrNone); + iProcess->DestroyDocument(aDoc); + delete store; + delete streamDic; + + // tidy up + TRAP(ret,iProcess->ResetL()); + TEST(ret==KErrNone); + delete iProcess; + + // delete the file created by the testcode + iFs.Delete(filePath); + } + + +/** + Auxiliary Fn for Test Case ID T-ProStep-testDocCreation1L, T-ProStep-testDocCreation2L, + T-ProStep-testDocCreation3L, T-ProStep-testDocCreation4L. + + The method initiates tests on operation such as creation, storing + and deletion of a document. + +*/ +void CT_ProStep::testDocCreationL() + { + //Create a session with F & B server + TInt ret = RFbsSession::Connect(); + TEST(ret == KErrNone); + + testDocCreation1L(); + testDocCreation2L(); + testDocCreation4L(testDocCreation3L()); + + //Close the session F & B server. + RFbsSession::Disconnect(); + } + +/** + @SYMTestCaseID T-ProStep-testEmbeddingL + + @SYMPREQ + + @SYMTestCaseDesc Tests embedding of a document and accessing the embedded document. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test connects to the Font and Bitmap Server and creates a + process by calling CApaProcess::NewL(). + The method first tests the embedding of document. To do so a document of + type tstapp is added to the process and set as the main document. The main + document is opened for editing by calling CApaDocument::EditL() and another + document of type tstapp is created to embed it within the main document. + Tests for the number of embedded documents and editing of the embedded + document is done. The main document is closed and then reloaded to verify + that the embedded document is saved.\n + A test to access the embedded document is then done. For this purpose the + main document is detached from its store by calling CApaDocument::DetachFromStoreL() + and an attempt to access the embedded document is done by calling CApaDocument::DocumentL(). + The same test to access the embedded document is again done by reloading + the main document without detaching it from its store.\n + Finally embedded document is tested to change the format of the door to + glass by calling CApaDoor::SetFormatToGlassL(). The test ensures that the + embedded document does not support being represented by a glass door by + checking for leave KErrNotSupported.\n Then the same embedded document is supported when being + called by CApaDoor::SetFormatToIconL() and returns KErrNone. + API Calls:\n + CApaProcess::NewL(const RFs& aFs,CApaAppFinder& aAppFinder)\n + CApaProcess::AddNewDocumentL(const TDesC& aDllFileName,TUid aDllUid=KNullUid)\n + CApaDocument::EditL(MApaEmbeddedDocObserver* aContainer,TBool aReadOnly=EFalse) = 0\n + CApaDocument::DetachFromStoreL(CPicture::TDetach aDegree = CPicture::EDetachFull)\n + CApaDoor::DocumentL(TBool aCheckPassword=EFalse)\n + CApaDoor::SetFormatToGlassL()\n + CApaDoor::SetFormatToIconL()\n + + @SYMTestExpectedResults All tests completes successfully by checking the + results obtained against expected results. + + */ +void CT_ProStep::testEmbeddingL() + { + const TFullName filePath=_L("c:\\docs\\tstapp.doc"); + + //Create a session with F & B server + TInt ret=RFbsSession::Connect(); + TEST(ret == KErrNone); + + // delete the file to be created by the testcode + iFs.Delete(filePath); + // create a process + TRAP(ret,iProcess = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + + // create a new main doc of type tstapp + CApaDocument* doc=NULL; + TApaApplicationFactory appFact(KUidTestApp); + TRAP(ret,doc=iProcess->AddNewDocumentL(appFact)); + TEST(ret==KErrNone); + iProcess->SetMainDocument(doc); + CFileStore* store=NULL; + + // create the store and initialise it + TRAP(ret, { + store=doc->CreateFileStoreLC(iProcess->FsSession(),filePath); + CleanupStack::Pop(); // store + }); + TEST(ret==KErrNone); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + iProcess->SetMainDocFileName(filePath); + + // initialise the document with factory settings + TRAP(ret, doc->NewDocumentL() ); + TEST(ret==KErrNone); + + // edit it + TRAP(ret,iProcess->MainDocument()->EditL(NULL)); + TEST(ret==KErrNone); + + // embed another tstapp doc inside it + INFO_PRINTF1(_L("...Embed a doc")); + TRAP(ret,((CTestAppDoc*)iProcess->MainDocument())->EmbedNewDocL(appFact)); + TEST(ret==KErrNone); + TEST(((CTestAppDoc*)iProcess->MainDocument())->iEmbedList->Count()==1); + + // edit that doc + TRAP(ret,((CTestAppDoc*)iProcess->MainDocument())->EditEmbeddedDocL(0)); + TEST(ret==KErrNone); + + // close the main doc and reload it + TRAP(ret,iProcess->MainDocument()->SaveL()); + TEST(ret==KErrNone); + TRAP(ret, iProcess->ResetL() ); + TEST(ret==KErrNone); + CStreamDictionary* streamDic=NULL; + TRAP(ret,doc=iProcess->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); + TEST(ret==KErrNone); + delete streamDic; + streamDic = NULL; + iProcess->SetMainDocument(doc); + iProcess->SetMainDocFileName(filePath); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + TEST(((CTestAppDoc*)iProcess->MainDocument())->iEmbedList->Count()==1); + + // close the main doc and reload it again... + TRAP(ret,iProcess->MainDocument()->SaveL()); + TEST(ret==KErrNone); + iProcess->ResetL(); + TRAP(ret,doc=iProcess->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); + TEST(ret==KErrNone); + delete streamDic; + streamDic = NULL; + iProcess->SetMainDocument(doc); + iProcess->SetMainDocFileName(filePath); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + TEST(((CTestAppDoc*)iProcess->MainDocument())->iEmbedList->Count()==1); + + // detach the main doc from it's store & access the embedded doc + TRAP(ret, iProcess->MainDocument()->DetachFromStoreL(CPicture::EDetachFull) ); + TEST(ret==KErrNone); + TRAP(ret, ((CTestAppDoc*)iProcess->MainDocument())->EmbeddedDoor(0)->DocumentL() ); + TEST(ret==KErrNone); + + // save it, then save it again immediately + TRAP(ret,iProcess->MainDocument()->SaveL()); + TEST(ret==KErrNone); + TRAP(ret,iProcess->MainDocument()->SaveL()); + TEST(ret==KErrNone); + + // load the doc and get a handle to the embedded doc + iProcess->ResetL(); + TRAP(ret,doc=iProcess->OpenNewDocumentL(store,streamDic,filePath,EFileShareExclusive|EFileWrite)); + TEST(ret==KErrNone); + delete streamDic; + streamDic = NULL; + iProcess->SetMainDocument(doc); + iProcess->SetMainDocFileName(filePath); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + TEST(((CTestAppDoc*)iProcess->MainDocument())->iEmbedList->Count()==1); + TRAP(ret, ((CTestAppDoc*)iProcess->MainDocument())->EmbeddedDoor(0)->DocumentL() ); + TEST(ret==KErrNone); + + // try to set the embedded doc's format to glass + TRAP(ret, ((CTestAppDoc*)iProcess->MainDocument())->EmbeddedDoor(0)->SetFormatToGlassL() ); + TEST((ret==KErrNotSupported)); + + // try to set the embedded docs to temporary Icon + TRAP(ret, ((CTestAppDoc*)iProcess->MainDocument())->EmbeddedDoor(0)->SetFormatToTemporaryIconL(ETrue) ); + TEST((ret==KErrNone)); + + // try to set embedded doc's format to Icon + TRAP(ret, ((CTestAppDoc*)iProcess->MainDocument())->EmbeddedDoor(0)->SetFormatToIconL() ); + TEST((ret==KErrNone)); + + // tidy up and delete the file created by the testcode + delete iProcess; + iFs.Delete(filePath); + + //Close the session F & B server. + RFbsSession::Disconnect(); + } + +_LIT(KMaxLengthDocFileName, "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"); // length must be equal to KMaxFileName + +void CT_ProStep::MainDocFileNameTestsL() + { + testMainDocFileName1L(); + testMainDocFileName2L(); + testMainDocFileName3L(); + } + /** + @SYMTestCaseID CT-ProStep-testMainDocFileName1L + + @SYMPREQ PHAR-5NTCWY + + @SYMTestCaseDesc + Checks that the CApaProcess's MainDocFileName is large enough by default. + Clients of CApaProcess::SetMainDocFileName API expect to be able to + pass it a descriptor with a length between zero and KMaxFileName inclusive. + Check that passing a descriptor of length KMaxFileName doesn't give an + APPARC 7 panic (EPanicFileNameTooLong) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a CApaProcess object, and call SetMainDocFileName on it, passing + a file name KMaxFileName characters long + + @SYMTestExpectedResults + The call to CApaProcess::SetMainDocFileName should not cause a panic + + */ +void CT_ProStep::testMainDocFileName1L() + { + CApaProcess* process = CApaProcess::NewL(iFs); + process->SetMainDocFileName(KMaxLengthDocFileName); // should not panic + delete process; + } + + /** + @SYMTestCaseID CT-ProStep-testMainDocFileName2L + + @SYMPREQ PHAR-5NTCWY + + @SYMTestCaseDesc + Checks that the maximum length of CApaProcess's MainDocFileName is still large + enough to store a file name KMaxFileName characters long after setting a file name using + CApaProcess::SetMainDocFileNameL which is less than KMaxFileName characters long + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + 1. Construct a CApaProcess object, and call SetMainDocFileNameL on it, passing + a file name which is less than KMaxFileName characters long + 2. Call SetMainDocFileName passing a file name which is KMaxFileName characters long + + @SYMTestExpectedResults + The call to CApaProcess::SetMainDocFileName should not cause a panic + + */ +void CT_ProStep::testMainDocFileName2L() + { + _LIT(KShortDocFileName, "ShortDocumentFileName"); // must be < KMaxFileName in length + CApaProcess* process = CApaProcess::NewL(iFs); + CleanupStack::PushL(process); + process->SetMainDocFileNameL(KShortDocFileName); + process->SetMainDocFileName(KMaxLengthDocFileName); // should not panic + CleanupStack::PopAndDestroy(process); + } + + /** + @SYMTestCaseID CT-ProStep-testMainDocFileName3L + + @SYMPREQ PHAR-5NTCWY + + @SYMTestCaseDesc + Checks that CApaProcess's MainDocFileName can store a filename longer than KMaxFileName + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + 1. Construct a CApaProcess object, and call SetMainDocFileNameL on it, passing + a file name which is greater than KMaxFileName characters long + 2. Check the length of the file name returned by MainDocFileName + + @SYMTestExpectedResults + The file name returned by MainDocFileName should be the same length as the file name + passed to SetMainDocFileNameL + + */ +void CT_ProStep::testMainDocFileName3L() + { + _LIT(KLongDocFileName, "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefLong"); // must be > KMaxFileName in length + TPtrC longDocFileName(KLongDocFileName); + CApaProcess* process = CApaProcess::NewL(iFs); + CleanupStack::PushL(process); + process->SetMainDocFileNameL(longDocFileName); + TEST(process->MainDocFileName().Length() == longDocFileName.Length()); + CleanupStack::PopAndDestroy(process); + } + +/** + @SYMTestCaseID T-ProStep-testIniFilesL + + @SYMPREQ + + @SYMTestCaseDesc Tests creation of ini file and reading or writing of data to an ini file. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create a Process. Add a new document for an app DLL by calling + AddNewDocumentL().Create a store and initialize the document. Create + an .ini file by calling OpenIniFileLC().Write data to ini file using + RDictionaryWriteStream. Save changes by calling CDictionaryStore::CommitL() + and close the ini file. Re-open the ini file and read data from it using + RDictionaryReadStream.\n + API Calls:\n + CApaApplication::OpenIniFileLC(RFs& aFs) \n + RDictionaryWriteStream::AssignL(CDictionaryStore& aDictStore,TUid aUid)\n + RDictionaryWriteStream::WriteInt8L(TInt aValue)\n + RDictionaryWriteStream::CommitL()\n + CDictionaryStore::CommitL()\n + RDictionaryReadStream::OpenL(const CDictionaryStore& aDictStore,TUid aUid)\n + RDictionaryReadStream::ReadInt8L()\n + + @SYMTestExpectedResults Test checks whether stored and read values from the + ini file match. + */ +void CT_ProStep::testIniFilesL() + { + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + const TFullName iniPath=_L("c:\\system\\data\\tstapp.ini"); // defined in tstapp + const TUid testUid={1}; + + // delete the files to be created by the testcode + iFs.Delete(filePath); + iFs.Delete(iniPath); + // create a process + TRAPD(ret,iProcess = CApaProcess::NewL(iFs)); + TEST(ret==KErrNone); + + // create a new main doc of type tstapp + CApaDocument* doc=NULL; + TApaApplicationFactory appFact(KUidTestApp); + TRAP(ret,doc=iProcess->AddNewDocumentL(appFact)); + TEST(ret==KErrNone); + iProcess->SetMainDocument(doc); + CFileStore* store=NULL; + + // create the store and initialise it + TRAP(ret, { + store=doc->CreateFileStoreLC(iProcess->FsSession(),filePath); + CleanupStack::Pop(); // store + }); + TEST(ret==KErrNone); + ((CTestAppDoc*)iProcess->MainDocument())->iStore = store; + iProcess->SetMainDocFileName(filePath); + + // initialise the document with factory settings + TRAP(ret, doc->NewDocumentL() ); + TEST(ret==KErrNone); + + // create a new ini file for the app + CDictionaryStore* iniFile=NULL; + TRAP(ret, { + iniFile=iProcess->MainDocument()->Application()->OpenIniFileLC(iFs); + CleanupStack::Pop(); + }); + TEST(ret==KErrNone); + + // add some data to it + RDictionaryWriteStream writeStream; + TRAP(ret, writeStream.AssignL(*iniFile,testUid) ); + TEST(ret==KErrNone); + TInt data=17; + TRAP(ret, writeStream.WriteInt8L(data) ); + TEST(ret==KErrNone); + TRAP(ret, writeStream.CommitL() ); + TEST(ret==KErrNone); + writeStream.Close(); + + // close it + TRAP(ret, iniFile->CommitL() ); + TEST(ret==KErrNone); + delete iniFile; + iniFile = NULL; + + // re-open it + TRAP(ret, { + iniFile=iProcess->MainDocument()->Application()->OpenIniFileLC(iFs); + CleanupStack::Pop(); + }); + TEST(ret==KErrNone); + + // check the contents + RDictionaryReadStream readStream; + TRAP(ret, readStream.OpenL(*iniFile,testUid) ); + TEST(ret==KErrNone); + TInt check=0; + TRAP(ret, check=readStream.ReadInt8L() ); + TEST(ret==KErrNone); + TEST(check==data); + readStream.Close(); + + // close it + delete iniFile; + + // tidy up + delete iProcess; + iFs.Delete(filePath); + iFs.Delete(iniPath); + } + +/** + Auxiliary Fn for Test Case ID T-ProStep-testControls1L, + T-ProStep-testControls2L, T-ProStep-testControls3L + + The method finds the index of control m_ctrl.exe in the control list. + Depending on the Boolean value of argument aIsNewPath the search is + done on ROM / RAM.\n + +*/ + +TInt CT_ProStep::ControlIndexInList(CApaSystemControlList* aList, TBool aIsNewPath) + { + TFileName newCtlPath=_L("c:\\sys\\bin\\m_ctrl.exe"); + + const TInt count = aList->Count(); + TInt retVal = KErrNotFound; + for(TInt ii = 0; ii < count; ++ii) + { + if(((aList->Control(ii)->FileName().CompareF(ctlPath)==0) && (!aIsNewPath)) || + ((aList->Control(ii)->FileName().CompareF(newCtlPath)==0) && (aIsNewPath))) + { + retVal = ii; + break; + } + } + return retVal; + } + + +/** + @SYMTestCaseID T-ProStep-testControls1L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaSystemControlList::UpdateL(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Check the control list to find the number of controls in the + list and the number of updates to the list. Call UpdateL(). Check the list + again for no change in the count of controls and updates to the list.\n + API Calls:\n + CApaSystemControlList::UpdateL()\n + + @SYMTestExpectedResults Test confirms that there is no change in the control + list after updating. + */ +void CT_ProStep::testControls1L() + { + iControlCount1 = iControlList->Count(); + TEST((iControlCount1>=1)); + TEST((iControlList->UpdateCount()>=1)); + + // do an update - there should be no changes + TInt ret; + TRAP(ret, iControlList->UpdateL()); + TEST(ret==KErrNone); + iControlCount2 = iControlList->Count(); + TEST(iControlCount2 == iControlCount1); // no change in the count (finds a m_ctrl.exe file on z, not c) + TEST((iControlList->UpdateCount()>=1)); + TInt index = ControlIndexInList(iControlList,EFalse); + TEST((index >= 0) && (index < iControlCount2)); + } + + +/** + @SYMTestCaseID T-ProStep-testControls2L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaSystemControlList::UpdateL() and UpdateCount(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Copy control from Z: drive to C: drive. Call UpdateL() to + update the control list. Check if UpdateL() has incremented iUpdateCount + by calling UpdateCount(). Check the filename of control to ensure that the + control copied to C: drive has been updated in the list. Delete the newly + copied control.\n + API Calls:\n + CApaSystemControlList::UpdateL()\n + CApaSystemControlList::UpdateCount()const\n + + @SYMTestExpectedResults The test shows updating of the copied control in control list. + */ +void CT_ProStep::testControls2L() + { + RSmlTestUtils testSession; + User::LeaveIfError(testSession.Connect()); + + testSession.CreateDirectoryL(KCTLDIR); + testSession.CreateDirectoryL(KRSCDIR); + + TInt ret=testSession.CopyFileL(KSOURCEPATH,KNEWCTLPATH); + TEST(ret==KErrNone); + ret=testSession.CopyFileL(KLOCPATH,KNEWLOCPATH); + TEST(ret==KErrNone); + + TInt controlCount=iControlList->UpdateCount(); + while(iControlList->UpdateCount()<=controlCount) + { + TRAP(ret, iControlList->UpdateL()); + if(ret!=KErrNone) + { + break; + } + User::After(100000); + } + TEST(ret==KErrNone); + + iControlCount3 = iControlList->Count(); + TEST(iControlCount3 == iControlCount1); // still no changes in the count (finds a m_ctrl.exe file on c, not z) + TEST((iControlList->UpdateCount()==controlCount+1)); + + TInt index = ControlIndexInList(iControlList,ETrue); + TEST((index>=0)&&(index=0) + { + TFileName name=iControlList->Control(index)->FileName(); + TEST(name.CompareF(KCTRLNAME)==0); + } + + // hide the control and do an update - there should be changes + testSession.SetReadOnly(KNEWCTLPATH,0); // remove the read only attribute + ret=testSession.DeleteFileL(KNEWCTLPATH); + TEST(ret==KErrNone); + testSession.SetReadOnly(KNEWLOCPATH,0); // remove the read only attribute + ret=testSession.DeleteFileL(KNEWLOCPATH); + TEST(ret==KErrNone); + controlCount=iControlList->UpdateCount(); + while(iControlList->UpdateCount()<=controlCount) + { + TRAPD(ret, iControlList->UpdateL()); + if(ret!=KErrNone) + { + break; + } + User::After(100000); + } + + testSession.Close(); + } + + +/** + @SYMTestCaseID T-ProStep-testControls3L + + @SYMPREQ + + @SYMTestCaseDesc Tests CApaSystemControlList::Control() and CApaSystemControl APIs Type() and Caption(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Update the control list to ensure that the deleted control is + removed from the list and the control on the Z: Drive is added to the list. + Retrieve this control from the list using CApaSystemControlList::Control(). + Check the type and caption of the control calling Type() and Caption() methods.\n + API Calls:\n + CApaSystemControlList::Control(TInt aIndex)const\n + CApaSystemControl::Type()const\n + CApaSystemControl::Caption()const\n + + @SYMTestExpectedResults The test shows the addition of the control present on + Z: drive in control list. Test confirms the retrieved info on the control + obtained from the control list. + + */ +void CT_ProStep::testControls3L() + { + TUid KUidMinimalControl={0x13008AEE}; + TFileName ctlCaption=_L("m_ctrl"); + // This method is called to close the panic dialog generated by previous test + ClosePanicWindowL(); + + TRAPD(ret, iControlList->UpdateL()); + TEST(ret==KErrNone); + const TInt controlCount4 = iControlList->Count(); + TEST(controlCount4 == iControlCount1); // still no changes in the count (finds a .ctl file on z, not c) + TEST((iControlList->UpdateCount()==3)); + TInt index = ControlIndexInList(iControlList,EFalse); + TEST((index >= 0) && (index < controlCount4)); + if(index>=0) + { + TEST(iControlList->Control(index)->FileName().CompareF(ctlPath)==0); + + INFO_PRINTF1(_L("Testing CApaSystemControl")); + + //get the control from the list and check it's type and caption + iControl=iControlList->Control(index); + TEST(iControl!=NULL); + TEST((iControl->Type()==KUidMinimalControl)); + TFileName caption=iControl->Caption(); + TEST(caption.CompareF(ctlCaption)==0); + TEST(iControl->Icon()!=NULL); + RThread thread; + TFullName name=_L("Control Panel Test"); + TInt r=thread.Create(name,SimulateKeyL,KDefaultStackSize,KDefaultStackSize,KDefaultStackSize,NULL); + TEST(r==KErrNone); + thread.Resume(); + + // run the control + TRAP(ret, iControl->CreateL()); // this control is synchronous + TEST(ret==KErrNone); + thread.Close(); + } + } + +/** + Auxiliary Fn for T-ProStep-testControls1L, T-ProStep-testControls2L, T-ProStep-testControls3L + + This method creates a control list by calling CApaSystemControlList::NewL() and + initiates subsequent tests on CApaSystemControlList and CApaSystemControl APIs. + + */ +void CT_ProStep::testControlsL() + { + INFO_PRINTF1(_L("Testing CApaSystemControlList")); + + //Create a session with F & B server + TInt ret = RFbsSession::Connect(); + TEST(ret == KErrNone); + + CFileMan* fileMan=CFileMan::NewL(iFs); + CleanupStack::PushL(fileMan); + + TRAP(ret,iControlList=CApaSystemControlList::NewL(iFs)); + TEST(ret==KErrNone); + + testControls1L(); + testControls2L(); + testControls3L(); + + // tidy up + delete iControlList; + CleanupStack::PopAndDestroy(fileMan); + + //Close the session F & B server. + RFbsSession::Disconnect(); + + } + + TInt PanicTestThread(TAny* aOption) + { + CTrapCleanup::New(); + const TInt option = TInt(aOption); + //Create a session with F & B server + TInt ret = RFbsSession::Connect(); + switch(option) + { + case ENegativePanicTest: + + if(ret==KErrNone) + { + RFs fs; + fs.Connect(); + CApaSystemControlList *controlList=NULL; + TRAP(ret,controlList=CApaSystemControlList::NewL(fs)); + if(ret==KErrNone) + { + TInt count=controlList->Count(); + controlList->Control(count+10); + } + delete controlList; + fs.Close(); + } + break; + default: + User::Panic(_L("TProStep Error"), EUnknownPanicOption); + } + RFbsSession::Disconnect(); + return KErrNone; + } + +/** + @SYMTestCaseID APPFWK-APPARC-0056 + + @SYMDEF DEF092293 + + @SYMTestCaseDesc Tests CApaSystemControlList::Control() Throws the right Panic on Invalid Count. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Create Seperate Thread to call the PanicTestThread Method where we create a new system ControlList + and get the actual count of the lists present inside . now call the CApaSystemControlList::Control(Index);where Index + is a number greater than the actual count list. + CApaSystemControlList::Control(TInt aIndex)const\n + + + @SYMTestExpectedResults Expect a APGRFX Panic EPanicIndexOutOfRange. + + */ + +void CT_ProStep::testPanicForControlListL() + { + RThread thrd; + TRequestStatus stat; + TInt ret=thrd.Create(_L("ptt"),PanicTestThread,KDefaultStackSize,0x2000,0x20000,(TAny*)ENegativePanicTest); + User::LeaveIfError(ret); + thrd.SetPriority(EPriorityMuchMore); + thrd.Logon(stat); + User::SetJustInTime(EFalse); + thrd.Resume(); + User::WaitForRequest(stat); + TEST(thrd.ExitType()==EExitPanic); + TEST(thrd.ExitReason()==EPanicIndexOutOfRange); + INFO_PRINTF2(_L("TestPanicForControlList panic=%d"), thrd.ExitReason()); + thrd.Close(); + User::SetJustInTime(ETrue); + ClosePanicWindowL(); + + } + +// This method is called to close the panic generated by the testPanicForControlListL() test. +void CT_ProStep::ClosePanicWindowL() + { + RWsSession ws; + User::LeaveIfError(ws.Connect()); + + TInt wgFocus = ws.GetFocusWindowGroup(); + + const TUint32 ENullWsHandle = 0xFFFFFFFF; // Events delivered to this handle are thrown away + RWindowGroup wg = RWindowGroup(ws); + + wg.Construct(ENullWsHandle); + TInt wgId = wg.Identifier(); + + TWsEvent event; + event.SetType(EEventKey); + TKeyEvent *keyEvent = event.Key(); + keyEvent->iCode = EKeyEscape; + keyEvent->iScanCode = EStdKeyEscape; + keyEvent->iModifiers = 0; + + TInt limit = 0; + for(limit = 0; wgFocus != wgId && (limit < 50); limit++) + { + ws.SendEventToAllWindowGroups(event); + wgFocus = ws.GetFocusWindowGroup(); + RDebug::Print(_L("CloseAllPanicWindowsL() - EKeyEscape sent to Windows Group")); + } + + // close everything + wg.Close(); + ws.Close(); + + } +/** + @SYMTestCaseID T_ProStep_DoAppListInvalidTestL + + @SYMPREQ + + @SYMTestCaseDesc Tests GetNextApp() never returns RApaLsSession::EAppListInvalid. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Copy tstapp files from z: drive to c: drive. Create a session + with the Application Architecture server. Populate the list of applications + to cache by calling RApaLsSession::GetAllApps().Remove the copied files + from C: drive. Traverse through the list by calling + RApaLsSession::GetNextApp(). Check return value to ensure that + RApaLsSession::EAppListInvalid is never returned.\n + API Calls:\n + RApaLsSession::GetNextApp(TApaAppInfo& aInfo) const + + @SYMTestExpectedResults Test confirms that RApaLsSession::EAppListInvalid is never returned. + + */ +void CT_ProStep::DoAppListInvalidTestL(RApaLsSession& aLs) + { + _LIT(KTempAppDir, "C:\\private\\10003a3f\\import\\apps\\"); + _LIT(KTempRegPath, "C:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc"); + TFullName regPath=_L("z:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc"); + + CFileMan* fileMan = CFileMan::NewL (iFs); + CleanupStack::PushL(fileMan); + + INFO_PRINTF1(_L("Copy tstapp files to C: drive.......")); + TInt ret = iFs.MkDir(KTempAppDir); + TEST(ret==KErrNone || ret==KErrAlreadyExists); + TEST(fileMan->Copy(regPath, KTempRegPath)==KErrNone); //Just to start the idle update. + + User::After(8000000); + + INFO_PRINTF1(_L("Get app list.......")); + ret = aLs.GetAllApps(); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Remove temp files from C: drive.......")); + TRequestStatus status; + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + TInt err=fileMan->Attribs(KTempAppDir,0,KEntryAttReadOnly, tempTime, CFileMan::ERecurse, status); + TEST(err==KErrNone); + User::WaitForRequest(status); + TEST(status.Int() == KErrNone); + TEST(fileMan->Delete(KTempRegPath)==KErrNone); //Just to start the idle update. + TEST(fileMan->RmDir(KTempAppDir)==KErrNone); + + User::After(8000000); + + INFO_PRINTF1(_L("Testing GetNextApp() never returns RApaLsSession::EAppListInvalid.")); + TApaAppInfo info; + while(ret==KErrNone) + { + ret=aLs.GetNextApp(info); + } + TEST(ret!=RApaLsSession::EAppListInvalid); + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + CleanupStack::PopAndDestroy(fileMan); + } + + +/** + Auxiliary Fn for all Test Cases. + + This method creates and installs an active scheduler and puts the + test code on the scheduler as a CIdle object. The method initiates + all tests by calling the static method CT_ProStepCallBack::CallBack(). + +*/ +void CT_ProStep::DoStepTestsInCallbackL() + { + // create an active scheduler + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + // put the test code onto the scheduler as an idle object + CIdle* idle=CIdle::NewL(-20); + CleanupStack::PushL(idle); + + CT_ProStepCallBack* callBack = new(ELeave) CT_ProStepCallBack(this); + CleanupStack::PushL(callBack); + + idle->Start(TCallBack(CT_ProStepCallBack::CallBack,callBack)); + // start the test code + CActiveScheduler::Start(); + + // all outstanding requests complete - kill the scheduler + CleanupStack::PopAndDestroy(3); //scheduler, callBack, idle + } + +/** + This static method is the callback function of CIdle object. The method + calls the non-static method DoStepTests() which initiates all the tests. +*/ +TInt CT_ProStepCallBack::CallBack(TAny* callBack /*aThis*/) +{ + //Call Test Step func + ((CT_ProStepCallBack *)callBack)->iTestStep->DoStepTests(); + + CActiveScheduler::Stop(); + return EFalse; // don't call back again + } + + +/** + Constructor + */ +CT_ProStepCallBack::CT_ProStepCallBack(CT_ProStep* aTestStep) + { + iTestStep = aTestStep; + } + +/** + Destructor + */ +CT_ProStepCallBack::~CT_ProStepCallBack() + { + } + +/** + Auxiliary Fn for all Test Cases. + The method initiates all tests to be performed. +*/ +void CT_ProStep::DoStepTests() + { + INFO_PRINTF1(_L("Test AppListInvalidTest......")); + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + //DONT_CHECK due to changes to file system + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, DoAppListInvalidTestL(ls), REComSession::FinalClose() ); + CleanupStack::PopAndDestroy(&ls); + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test AppIdentifier......")); + TRAPD(r,testAppIdentifierL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test AppIdentifier completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test TestGenerateFileName......")); + TRAP(r,doTestGenerateFileName()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test TestGenerateFileName completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test TestReadStreamL......")); + TRAP(r,testReadStreamL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test TestReadStream completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test DocCreation......")); + TRAP(r,testDocCreationL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test DocCreation completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test Embedding......")); + TRAP(r,testEmbeddingL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test Embedding completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test MainDocFileName......")); + TRAP(r,MainDocFileNameTestsL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test MainDocFileName completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test IniFiles......")); + TRAP(r,testIniFilesL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test IniFiles completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test Controls......")); + TRAP(r,testControlsL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test Controls completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + + __UHEAP_MARK; + INFO_PRINTF1(_L("Test Panic Controls......")); + TRAP(r,testPanicForControlListL()); + TEST(r==KErrNone); + INFO_PRINTF2(_L("Test Panic Controls completed with code %d\n"), r); + REComSession::FinalClose(); + __UHEAP_MARKEND; + } + +/** + Destructor + */ +CT_ProStep::~CT_ProStep() + { + } + +/** + Constructor + */ +CT_ProStep::CT_ProStep() + { + SetTestStepName(KT_ProStep); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_ProStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_ProStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +/** + @return - TVerdict code + Override of base class virtual +*/ +TVerdict CT_ProStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparch...T_Pro")); + + FbsStartup(); + + iFs.Connect(); + setup(); + + TRAPD(ret,DoStepTestsInCallbackL()) + TEST(ret==KErrNone); + + iFs.Close(); + + INFO_PRINTF1(_L("T_Pro Completed.")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,108 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_PRO_STEP_H__) +#define __T_PRO_STEP_H__ + +_LIT(KT_ProStep,"T_Pro"); + +#include "ApparcTestServer.h" + +#include +#include "..\apparc\apadll.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//! A CT_ProStep test class. + +/** Tests Application Apparc base classes and utility functions.\n */ + +class CT_ProStep : public CTestStep + { +public: + CT_ProStep(); + ~CT_ProStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void DoStepTests(); +//private: + void DoStepTestsInCallbackL(); + void testAppIdentifierL(); + void doTestGenerateFileName(); + void testDocCreationL(); + void testDocCreation1L(); + CApaDocument* testDocCreation3L(); + void testDocCreation2L(); + void testDocCreation4L(CApaDocument* aDoc); + void testEmbeddingL(); + void testIniFilesL(); + void testControlsL(); + void setup(); + TInt ControlIndexInList(CApaSystemControlList* aList, TBool aIsNewPath); + void testControls1L(); + void testControls2L(); + void testControls3L(); + void DoAppListInvalidTestL(RApaLsSession& aLs); + void MainDocFileNameTestsL(); + void testMainDocFileName1L(); + void testMainDocFileName2L(); + void testMainDocFileName3L(); + void testReadStreamL(); + void testPanicForControlListL(); + void ClosePanicWindowL(); + + +private: + RFs iFs; + CApaProcess* iProcess; + CApaSystemControlList* iControlList; + CApaSystemControl* iControl; + + TInt iControlCount1; + TInt iControlCount2; + TInt iControlCount3; + + TInt iAppListCount; + }; + + +class CT_ProStepCallBack : public CBase + { +public: + CT_ProStepCallBack(CT_ProStep* aTestStep); + ~CT_ProStepCallBack(); + static TInt CallBack(TAny* /*aThis*/); + CT_ProStep* iTestStep; + +private: + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProcStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProcStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1388 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following tests are performed to test the Child behaviour on its Parent's termination. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include "T_ProcStep.h" +const TInt KTProcTerminatingChildI = 1246; +const TInt KTProcTerminatingChildII = 1247; +const TInt KTProcTerminatingChildIII = 1248; +const TInt KTProcTerminatingParent = 1249; + +CChildProcess* CChildProcess::NewL(RProcess& aParentProcess,TProcessId aChildProcessId) + { + CChildProcess* self= new(ELeave) CChildProcess(aParentProcess,aChildProcessId); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +CChildProcess::~CChildProcess() +/** + * Destructor + */ + { + Cancel(); + } + +void CChildProcess::ConstructL() +/** + * Sets active, so that control goes into RunL() + * where parent is terminated and child process logged on. + */ + { + User::LeaveIfError(iChildProcess.Open(iChildProcessId)); + SetActive(); + TRequestStatus *status=&iStatus; + User::RequestComplete(status,KErrNone); + CActiveScheduler::Start(); + } + +CChildProcess::CChildProcess(RProcess& aParentProcess,TProcessId aChildProcessId):CActive(0),iChildProcessId(aChildProcessId),iParentProcess(aParentProcess),iCount(0) + { + CActiveScheduler::Add(this); + } + +void CChildProcess::RunL() +/** + * Opens the parent process, on failure leaves. + * Logs on the child process status, sets it active and terminates the parent process. + * When child terminates scheduler is stopped. + */ + { + switch(iCount) + { + case 0: + iCount++; + iChildProcess.Logon(iStatus); + SetActive(); + iParentProcess.Terminate(KErrNone); + break; + case 1: + CActiveScheduler::Stop(); + default: + break; + } + } + +void CChildProcess::DoCancel() + { + switch(iCount) + { + case 0: + iChildProcess.LogonCancel(iStatus); + iCount++; + break; + case 1: + iChildProcess.LogonCancel(iStatus); + break; + default: + break; + } + } + + +//////////////////////////////////////////////////////////////////////////// +// +// T_ProcStep.cpp +// ------------ +// +// Implements the test cases to test Child behaviour on Parent termination. +// +//////////////////////////////////////////////////////////////////////////// + +CT_ProcStep::CT_ProcStep() +/** + * Constructor + */ + { + } + + +CT_ProcStep::~CT_ProcStep() +/** + * Destructor + */ + { + } + +/** + @SYMTestCaseID APPFWK-APPARC-0015 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc The Test determines that the Child dies when its Parent is terminated. + + @SYMTestPriority Critical + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates another process (child) passing the first(parent) process ID. + Launches the child process. Terminates parent and checks the existance of child process. The child should die. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + CApaCommandLine::SetParentProcessId(TProcessId); + + @SYMTestExpectedResults Termination of child process automatically.\n + + */ +void CT_ProcStep::testChildSetToTerminateL(void) + { + TInt ret(0); + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent Process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //commandline for child process + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId); + + CApaCommandLine* childProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Process created ")); + + //setting the parent process ID to child + childProcCmdln->SetParentProcessId(parentProcId); + INFO_PRINTF1(_L(" Set ParentProcessId to Child ")); + + //child process + RProcess childProc; + ret = childProc.Create(KChildOneExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProc); + + INFO_PRINTF2(_L(" Create Child Process returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcCmdln->SetProcessEnvironmentL(childProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Child Process ")); + childProc.Resume(); + //Time for the child process to launch itself + User::After(500000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcId = childProc.Id(); + INFO_PRINTF2(_L(" Child Process Id = 0x%lx "),childProcId); + + CChildProcess* childProcess=NULL; + TRAP(ret, childProcess=CChildProcess::NewL(parentProc,childProcId)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupStack::PushL(childProcess); + + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == 0); + if(exitType==EExitTerminate && exitReason==0) + { + INFO_PRINTF1(_L(" Parent process is Terminated")); + } + + exitType = childProc.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProc.ExitReason(); + TEST(exitReason == 0); + if(exitType == EExitTerminate && exitReason==0) + { + INFO_PRINTF1(_L(" The child process is killed automatically ... ")); + } + + CleanupStack::PopAndDestroy(childProcess); + CleanupStack::PopAndDestroy(&childProc); + CleanupStack::PopAndDestroy(childProcCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0016 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc Test determines that the Child remains when its Parent is terminated. + + @SYMTestPriority Critical + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates another process (child) without passing the first(parent) process ID. + Launches the child process. Terminates parent and checks the existance of child process. The child process should be alive. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::Terminate(TInt aReason); + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + + @SYMTestExpectedResults Existence of child process.\n + + */ +void CT_ProcStep::testChildSetToRemainL(void) + { + TInt ret(0); + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent Process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //commandline for child process + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId); + + CApaCommandLine* childProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Process created ")); + + //child process + RProcess childProc; + ret = childProc.Create(KChildOneExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProc); + + INFO_PRINTF2(_L(" Create Child Process returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcCmdln->SetProcessEnvironmentL(childProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Child Process ")); + childProc.Resume(); + //Time for the child process to launch itself + User::After(500000); + + parentProc.Terminate(KTProcTerminatingParent); + INFO_PRINTF1(_L(" Kill Parent Process ... ")); + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == KTProcTerminatingParent); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcId = childProc.Id(); + INFO_PRINTF2(_L(" Child Process Id = 0x%lx "),childProcId); + + //Wait for child to terminate ... if it really does + User::After(10000000); + + exitType = childProc.ExitType(); + TEST(exitType == EExitPending); + if(exitType == EExitPending) + { + INFO_PRINTF1(_L(" Child process is still running ")); + INFO_PRINTF1(_L(" so terminating it manually ...")); + childProc.Terminate(KTProcTerminatingChildI); + exitType = childProc.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProc.ExitReason(); + TEST(exitReason == KTProcTerminatingChildI); + } + + CleanupStack::PopAndDestroy(&childProc); + CleanupStack::PopAndDestroy(childProcCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0017 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc Test determines that one Child remains and another terminates when their Parent terminates, based on their creation. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates a process (child I) passing the first (parent) process ID. + Creates a second process (child II) without passing the first (parent) process ID. Launches both the child processes. + Terminates parent and checks the existance of both the child processes. Child I should die and Child II should remain alive. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::Terminate(TInt aReason); + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + CApaCommandLine::SetParentProcessId(TProcessId); + + @SYMTestExpectedResults Termination of first child process and existence of the second.\n + + */ +void CT_ProcStep::testTwoChildsOneToTerminateAndOtherToRemainL(void) + { + TInt ret(0); + TExitType exitType; + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent Process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //commandline for child process + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx"),parentProcId); + + //For Child ONE + CApaCommandLine* childProcOneCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child One created ")); + + //setting the parent process ID to child I + childProcOneCmdln->SetParentProcessId(parentProcId); + INFO_PRINTF1(_L(" Set ParentProcessId to Child One ")); + + //child process ONE + RProcess childProcOne; + ret = childProcOne.Create(KChildOneExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcOne); + + INFO_PRINTF2(_L(" Create Child One returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcOneCmdln->SetProcessEnvironmentL(childProcOne)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child One to its Process ")); + + INFO_PRINTF1(_L(" Run Child One ")); + childProcOne.Resume(); + //Time for the child one to launch itself + User::After(500000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcOneId = childProcOne.Id(); + INFO_PRINTF2(_L(" Child One Id = 0x%lx "),childProcOneId); + + //For Child TWO + CApaCommandLine* childProcTwoCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Two created ")); + + //child process TWO + RProcess childProcTwo; + ret = childProcTwo.Create(KChildTwoExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcTwo); + + INFO_PRINTF2(_L(" Create Child Two returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcTwoCmdln->SetProcessEnvironmentL(childProcTwo)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child Two to its Process ")); + + INFO_PRINTF1(_L(" Run Child Two ")); + childProcTwo.Resume(); + //Time for the child one to launch itself + User::After(500000); + + //child II process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcTwoId = childProcTwo.Id(); + INFO_PRINTF2(_L(" Child Two Id = 0x%lx "),childProcTwoId); + + CChildProcess* childProcess=NULL; + TRAP(ret, childProcess=CChildProcess::NewL(parentProc,childProcOneId)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupStack::PushL(childProcess); + + exitType = parentProc.ExitType(); + TEST(exitType == EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == 0); + if(exitType==EExitTerminate && exitReason==0) + { + INFO_PRINTF1(_L(" Parent process is Terminated")); + } + + exitType = childProcOne.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProcOne.ExitReason(); + TEST(exitReason == 0); + if(exitType==EExitTerminate && exitReason==0) + { + INFO_PRINTF1(_L(" Child I is killed automatically ... ")); + } + + //Wait and see if child II terminates automatically... + User::After(10000000); + + exitType = childProcTwo.ExitType(); + TEST(exitType == EExitPending); + if(exitType==EExitPending) + { + INFO_PRINTF1(_L(" Child II running successfully")); + childProcTwo.Terminate(KTProcTerminatingChildII); + exitType = childProcTwo.ExitType(); + TEST(exitType==EExitTerminate); + exitReason = childProcTwo.ExitReason(); + TEST(exitReason == KTProcTerminatingChildII); + INFO_PRINTF1(_L(" So Terminated it manually ...")); + } + + CleanupStack::PopAndDestroy(childProcess); + CleanupStack::PopAndDestroy(&childProcTwo); + CleanupStack::PopAndDestroy(childProcTwoCmdln); + CleanupStack::PopAndDestroy(&childProcOne); + CleanupStack::PopAndDestroy(childProcOneCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0018 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc The Test determines that a process is launched and terminated without any problem.\n + + @SYMTestPriority Low + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process. No Child is created. Parent should launch properly, and on termination should die. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::Terminate(TInt aReason); + + @SYMTestExpectedResults Proper creation and termination.\n + + */ +void CT_ProcStep::testParentWithoutAChildL(void) + { + TInt ret(0) ; + + //process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + TUint64 parentProcId=parentProc.Id(); + INFO_PRINTF2(_L(" Process Id = 0x%lx "),parentProcId); + + INFO_PRINTF1(_L(" Run the Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(5000000); + + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitKill||exitType == EExitPending); + if(exitType==EExitPending) + { + INFO_PRINTF1(_L(" Process running normally ")); + parentProc.Terminate(KTProcTerminatingParent); + exitType = parentProc.ExitType(); + TEST(exitType==EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == KTProcTerminatingParent); + INFO_PRINTF1(_L(" Terminating the process ")); + } + CleanupStack::PopAndDestroy(&parentProc); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0019 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc The Test determines that more than one Child for a parent terminate on their Parent's termination. + + @SYMTestPriority Medium + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates 3 processes (child I,II,III) passing the first (parent) process ID. + Launches all the 3 processes. Terminates parent and checks the existance of the child processes. All 3 children should die. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::Terminate(TInt aReason); + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + CApaCommandLine::SetParentProcessId(TProcessId); + + @SYMTestExpectedResults Termination of all child processes automatically.\n + + */ +void CT_ProcStep::testAllChildsSetToTerminateL(void) + { + TInt ret(0); + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent Process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId); + + //Child I + CApaCommandLine* childProcOneCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child One created ")); + + //setting the parent process ID to child + childProcOneCmdln->SetParentProcessId(parentProcId); + INFO_PRINTF1(_L(" Set ParentProcessId to Child One ")); + + //Child process I + RProcess childProcOne; + ret = childProcOne.Create(KChildOneExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcOne); + + INFO_PRINTF2(_L(" Create Child One returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcOneCmdln->SetProcessEnvironmentL(childProcOne)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child One to its Process ")); + + INFO_PRINTF1(_L(" Run Child One ")); + childProcOne.Resume(); + //Time for the child process to launch itself + User::After(1000000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcOneId = childProcOne.Id(); + INFO_PRINTF2(_L(" Child One Id = 0x%lx "),childProcOneId); + + //Child II + CApaCommandLine* childProcTwoCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Two created ")); + + //setting the parent process ID to child + childProcTwoCmdln->SetParentProcessId(parentProcId); + INFO_PRINTF1(_L(" Set ParentProcessId to Child Two ")); + + //child process II + RProcess childProcTwo; + ret = childProcTwo.Create(KChildTwoExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcTwo); + + INFO_PRINTF2(_L(" Create Child Two returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcTwoCmdln->SetProcessEnvironmentL(childProcTwo)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child Two to its Process ")); + + INFO_PRINTF1(_L(" Run Child Two ")); + childProcTwo.Resume(); + //Time for the child process to launch itself + User::After(1000000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcTwoId = childProcTwo.Id(); + INFO_PRINTF2(_L(" Child Two Id = 0x%lx "),childProcTwoId); + + //Child III + CApaCommandLine* childProcThreeCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Three created ")); + + //setting the parent process ID to child + childProcThreeCmdln->SetParentProcessId(parentProcId); + INFO_PRINTF1(_L(" Set ParentProcessId to Child Three ")); + + //child process III + RProcess childProcThree; + ret = childProcThree.Create(KChildThreeExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcThree); + + INFO_PRINTF2(_L(" Create Child Three returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcThreeCmdln->SetProcessEnvironmentL(childProcThree)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child Three to its Process ")); + + childProcThree.Resume(); + + //Time for the child process to launch itself + User::After(1000000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcThreeId = childProcThree.Id(); + INFO_PRINTF2(_L(" Child Three Id = 0x%lx "),childProcThreeId); + + CChildProcess* childProcess=NULL; + TRAP(ret, childProcess=CChildProcess::NewL(parentProc,childProcOneId)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupStack::PushL(childProcess); + + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == 0); + if(exitType == EExitTerminate && exitReason == 0) + { + INFO_PRINTF1(_L(" Parent process is Terminated ")); + } + + exitType = childProcOne.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProcOne.ExitReason(); + TEST(exitReason == 0); + if(exitType == EExitTerminate && exitReason == 0) + { + INFO_PRINTF1(_L(" Child I is killed ")); + } + + exitType = childProcTwo.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProcTwo.ExitReason(); + TEST(exitReason == 0); + if(exitType == EExitTerminate && exitReason == 0) + { + INFO_PRINTF1(_L(" Child II is killed ")); + } + + //Wait 1sec to close the child process + User::After(1000000); + exitType = childProcThree.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProcThree.ExitReason(); + TEST(exitReason == 0); + if(exitType == EExitTerminate && exitReason == 0) + { + INFO_PRINTF1(_L(" Child III is killed ")); + } + + CleanupStack::PopAndDestroy(childProcess); + CleanupStack::PopAndDestroy(&childProcThree); + CleanupStack::PopAndDestroy(childProcThreeCmdln); + CleanupStack::PopAndDestroy(&childProcTwo); + CleanupStack::PopAndDestroy(childProcTwoCmdln); + CleanupStack::PopAndDestroy(&childProcOne); + CleanupStack::PopAndDestroy(childProcOneCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0020 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc The Test determines that more than one Child for a Parent remain alive on their parent's termination. + + @SYMTestPriority Medium + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates 3 processes (child I,II,III) without passing the first (parent) process ID. + Launches all the 3 processes. Terminates parent and checks the existance of the child processes. All 3 children should remain alive. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::Terminate(TInt aReason); + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + + @SYMTestExpectedResults Existence of all child processes.\n + + */ +void CT_ProcStep::testNoChildSetToTerminateL(void) + { + TInt ret(0); + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent Process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //commandline for child process + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId); + + //Child I + CApaCommandLine* childProcOneCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child One created ")); + + //child process + RProcess childProcOne; + ret = childProcOne.Create(KChildOneExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcOne); + + INFO_PRINTF2(_L(" Create Child One returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcOneCmdln->SetProcessEnvironmentL(childProcOne)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child One to its Process ")); + + childProcOne.Resume(); + + //Time for the child process to launch itself + User::After(1000000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcOneId = childProcOne.Id(); + INFO_PRINTF2(_L(" Child Process Id = 0x%lx "),childProcOneId); + + //Child II + CApaCommandLine* childProcTwoCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Two created ")); + + //child process + RProcess childProcTwo; + ret = childProcTwo.Create(KChildTwoExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcTwo); + + INFO_PRINTF2(_L(" Create Child Two returned : %d "),ret); + + //attach commandline to child process + TRAP(ret,childProcTwoCmdln->SetProcessEnvironmentL(childProcTwo)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child Two to its Process ")); + + INFO_PRINTF1(_L(" Run Child Two ")); + childProcTwo.Resume(); + //Time for the child process to launch itself + User::After(1000000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcTwoId = childProcTwo.Id(); + INFO_PRINTF2(_L(" Child Two Id = 0x%lx "),childProcTwoId); + + //Child III + CApaCommandLine* childProcThreeCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Three created ")); + + //child process + RProcess childProcThree; + ret = childProcThree.Create(KChildThreeExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProcThree); + + INFO_PRINTF2(_L(" Create Child Three returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcThreeCmdln->SetProcessEnvironmentL(childProcThree)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine of Child Three to its Process ")); + + childProcThree.Resume(); + + //Time for the child process to launch itself + User::After(1000000); + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcThreeId = childProcThree.Id(); + INFO_PRINTF2(_L(" Child Three Id = 0x%lx "),childProcThreeId); + + parentProc.Terminate(KTProcTerminatingParent); + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == KTProcTerminatingParent); + INFO_PRINTF1(_L(" Terminating parent process ")); + + //Time for the child processes to terminate if they really do + User::After(500000); + + exitType = childProcOne.ExitType(); + TEST(exitType == EExitPending); + if(exitType == EExitPending) + { + INFO_PRINTF1(_L(" Child I is still running ")); + INFO_PRINTF1(_L(" So Terminating it manually ... ")); + childProcOne.Terminate(KTProcTerminatingChildI); + exitType = childProcOne.ExitType(); + TEST(exitType==EExitTerminate); + exitReason = childProcOne.ExitReason(); + TEST(exitReason == KTProcTerminatingChildI); + } + + exitType = childProcTwo.ExitType(); + TEST(exitType == EExitPending); + if(exitType == EExitPending) + { + INFO_PRINTF1(_L(" Child II is still running ")); + INFO_PRINTF1(_L(" So Terminating it manually ... ")); + childProcTwo.Terminate(KTProcTerminatingChildII); + exitType = childProcTwo.ExitType(); + TEST(exitType==EExitTerminate); + exitReason = childProcTwo.ExitReason(); + TEST(exitReason == KTProcTerminatingChildII); + } + + exitType = childProcThree.ExitType(); + TEST(exitType == EExitPending); + if(exitType == EExitPending) + { + INFO_PRINTF1(_L(" Child III is still running ")); + INFO_PRINTF1(_L(" So Terminating it manually ... ")); + childProcThree.Terminate(KTProcTerminatingChildIII); + exitType = childProcThree.ExitType(); + TEST(exitType==EExitTerminate); + exitReason = childProcThree.ExitReason(); + TEST(exitReason == KTProcTerminatingChildIII); + } + + CleanupStack::PopAndDestroy(&childProcThree); + CleanupStack::PopAndDestroy(childProcThreeCmdln); + CleanupStack::PopAndDestroy(&childProcTwo); + CleanupStack::PopAndDestroy(childProcTwoCmdln); + CleanupStack::PopAndDestroy(&childProcOne); + CleanupStack::PopAndDestroy(childProcOneCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0021 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc The Test determines that the child receives its parent process ID correctly, when set during its creation. + + @SYMTestPriority Medium + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates another process (child) setting the first(parent) process ID. + Parent Process Id is passed to child through SetParameter API. Launches the child process. Child obtains the parent process Id from within. + Child compares both the Id's and writes the results to a file. The Id's should match each other. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::SetParameter(TInt aSlot, TInt aData); + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + CApaCommandLine::SetParentProcessId(TProcessId); + RFile::Open(RFs &aFs, const TDesC &aName, TUint aFileMode); + RFile::Read(TInt aPos, TDes8 &aDes) const; + RFile::Close(); + RFs::Connect(TInt aMessageSlots=KFileServerDefaultMessageSlots); + RFs::Delete(const TDesC &aName); + RFs::Close(); + @SYMTestExpectedResults Id received by child process should match its parent process Id.\n + + */ +void CT_ProcStep::testIdAvailableToChildL(void) + { + TInt ret(0); + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //commandline for child process + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId); + + CApaCommandLine* childProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child process created ")); + + //setting the parent process ID to child + childProcCmdln->SetParentProcessId(parentProcId); + INFO_PRINTF1(_L(" Set ParentProcessId to Child ")); + + //child process + RProcess childProc; + ret = childProc.Create(KChildThreeExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProc); + + INFO_PRINTF2(_L(" Create Child Process returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcCmdln->SetProcessEnvironmentL(childProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + +// Setting the parent process Id in an environment slot for the child to receive. + ret = childProc.SetParameter(12,parentProcId); + TEST(ret == KErrNone); + INFO_PRINTF2(_L(" Set the Parent Process Id - 0x%lx to Child through SetParameter API in Slot 12 "),parentProcId); + + INFO_PRINTF1(_L(" Run Child Process ")); + childProc.Resume(); + //Time for the child process to launch itself + User::After(1000000); + + RFs fs; + RFile file; + ret=fs.Connect(); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Create File server session ")); + + ret = file.Open(fs,KFilePath,EFileWrite | EFileShareAny); + TEST(ret == KErrNone); + if(ret == KErrNone) + { + INFO_PRINTF1(_L(" File opened successfully ")); + TBuf8<5> readData; + file.Read(0,readData); + TBuf8<5> result(KTResultPass); + TEST(result==readData); + if(result==readData) + { + INFO_PRINTF1(_L(" Child received the parent process ID correctly ...")); + } + else + { + INFO_PRINTF1(_L(" Child Failed to receive the parent process ID ...")); + } + file.Close(); + fs.Delete(KFilePath); + fs.Close(); + INFO_PRINTF1(_L(" File Close & Delete and Session Close ")); + } + + //child process Id is reqd to monitor if it gets killed on its parent's termination + TUint64 childProcId = childProc.Id(); + INFO_PRINTF2(_L(" Child Process Id = 0x%lx "),childProcId); + + CChildProcess* childProcess=NULL; + TRAP(ret, childProcess=CChildProcess::NewL(parentProc,childProcId)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupStack::PushL(childProcess); + + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitTerminate); + TInt exitReason = parentProc.ExitReason(); + TEST(exitReason == 0); + if(exitType==EExitTerminate && exitReason == 0) + { + INFO_PRINTF1(_L(" Parent process is Terminated")); + } + + exitType = childProc.ExitType(); + TEST(exitType == EExitTerminate); + exitReason = childProc.ExitReason(); + TEST(exitReason == 0); + if(exitType==EExitTerminate && exitReason == 0) + { + INFO_PRINTF1(_L(" The child process is killed ")); + } + CleanupStack::PopAndDestroy(childProcess); + CleanupStack::PopAndDestroy(&childProc); + CleanupStack::PopAndDestroy(childProcCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0022 + + @SYMPREQ PREQ1123 + + @SYMTestCaseDesc The Test determines that the child doesn't receive its parent process ID correctly, when not set during its creation. + + @SYMTestPriority Medium + + @SYMTestStatus Implemented + + @SYMTestActions. Creates and launches a process (parent). Creates another process (child) without setting any parent. + Parent Process Id is passed to child through SetParameter API. Launches the child process. Child obtains the parent process Id from within. + Child compares both the Id's. The Id's should not match each other. + API Calls:\n + RProcess::Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);\n + RProcess::Resume(); + RProcess::ExitType() const; + RProcess::ExitReason() const; + RProcess::Id() const; + RProcess::SetParameter(TInt aSlot, TInt aData); + CApaCommandLine::SetProcessEnvironmentL(RProcess &aProcess) const; + CApaCommandLine::NewLC(); + RFile::Open(RFs &aFs, const TDesC &aName, TUint aFileMode); + RFile::Read(TInt aPos, TDes8 &aDes) const; + RFile::Close(); + RFs::Connect(TInt aMessageSlots=KFileServerDefaultMessageSlots); + RFs::Delete(const TDesC &aName); + RFs::Close(); + @SYMTestExpectedResults Id received by child process should not match its parent process Id.\n + + */ +void CT_ProcStep::testIdNotAvailableToChildL(void) + { + TInt ret(0); + TInt exitReason(0); + + //commandline for parent process + CApaCommandLine* parentProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Parent Process created ")); + + //parent process + RProcess parentProc; + ret = parentProc.Create(KParentExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(parentProc); + INFO_PRINTF2(_L(" Create Parent Process returned : %d"),ret); + + //attach commandline to parent process + TRAP(ret,parentProcCmdln->SetProcessEnvironmentL(parentProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + INFO_PRINTF1(_L(" Run Parent Process ")); + parentProc.Resume(); + //Time for the parent process to launch itself + User::After(500000); + + //commandline for child process + //Get parent process ID here + TUint64 parentProcId = parentProc.Id(); + INFO_PRINTF2(_L(" Parent Process Id = 0x%lx "),parentProcId); + + CApaCommandLine* childProcCmdln=CApaCommandLine::NewLC(); + INFO_PRINTF1(_L(" CommandLine for Child Process created ")); + + //child process + RProcess childProc; + ret = childProc.Create(KChildThreeExe,KNullDesC); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupClosePushL(childProc); + + INFO_PRINTF2(_L(" Create Child Process returned : %d"),ret); + + //attach commandline to child process + TRAP(ret,childProcCmdln->SetProcessEnvironmentL(childProc)); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Attach CommandLine to Process ")); + + //Setting the parent process Id in an environment slot for the child to receive. + ret = childProc.SetParameter(12,parentProcId); + TEST(ret == KErrNone); + INFO_PRINTF2(_L(" Set the Parent Process Id - 0x%lx to Child through SetParameter API in Slot 12 "),parentProcId); + + INFO_PRINTF1(_L(" Run Child Process ")); + childProc.Resume(); + //Time for the child process to launch itself + User::After(1000000); + + RFs fs; + RFile file; + ret = fs.Connect(); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + INFO_PRINTF1(_L(" Create File server session ")); + + ret = file.Open(fs,KFilePath,EFileWrite | EFileShareAny); + TEST(ret == KErrNone); + if(ret == KErrNone) + { + INFO_PRINTF1(_L(" File opened successfully ")); + TBuf8<5> readData; + file.Read(0,readData); + TBuf8<5> result(KTResultFail); + TEST(result==readData); + if(result==readData) + { + INFO_PRINTF1(_L(" Child did not receive the parent process ID as intended...")); + } + else + { + INFO_PRINTF1(_L(" Child received the Wrong parent process ID ...")); + } + file.Close(); + fs.Delete(KFilePath); + fs.Close(); + INFO_PRINTF1(_L(" File Close & Delete and Session Close ")); + } + + TExitType exitType = parentProc.ExitType(); + TEST(exitType == EExitPending); + if(exitType == EExitPending) + { + INFO_PRINTF1(_L(" Parent is still running ")); + INFO_PRINTF1(_L(" So Terminating it manually ... ")); + parentProc.Terminate(KTProcTerminatingParent); + exitType = parentProc.ExitType(); + TEST(exitType==EExitTerminate); + exitReason = parentProc.ExitReason(); + TEST(exitReason == KTProcTerminatingParent); + } + + exitType = childProc.ExitType(); + TEST(exitType == EExitPending); + if(exitType == EExitPending) + { + INFO_PRINTF1(_L(" Child is still running ")); + INFO_PRINTF1(_L(" So Terminating it manually ... ")); + childProc.Terminate(KTProcTerminatingChildIII); + exitType = childProc.ExitType(); + TEST(exitType==EExitTerminate); + exitReason = childProc.ExitReason(); + TEST(exitReason == KTProcTerminatingChildIII); + } + + CleanupStack::PopAndDestroy(&childProc); + CleanupStack::PopAndDestroy(childProcCmdln); + CleanupStack::PopAndDestroy(&parentProc); + CleanupStack::PopAndDestroy(parentProcCmdln); + } + +void CT_ProcStep::testChildExistsL(void) +/** + * Calls other functions which implement the test cases. + */ + { + INFO_PRINTF1(_L("Begin - testChildSetToTerminateL ----------- ")); + TRAPD(ret,testChildSetToTerminateL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testChildSetToTerminateL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testChildSetToRemainL ----------- ")); + TRAP(ret,testChildSetToRemainL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testChildSetToRemainL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testTwoChildsOneToTerminateAndOtherToRemainL ----------- ")); + TRAP(ret,testTwoChildsOneToTerminateAndOtherToRemainL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testTwoChildsOneToTerminateAndOtherToRemainL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testParentWithoutAChildL ----------- ")); + TRAP(ret,testParentWithoutAChildL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testParentWithoutAChildL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testAllChildsSetToTerminateL ----------- ")); + TRAP(ret,testAllChildsSetToTerminateL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testAllChildsSetToTerminateL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testNoChildSetToTerminateL ----------- ")); + TRAP(ret,testNoChildSetToTerminateL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testNoChildSetToTerminateL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testIdAvailableToChildL ----------- ")); + TRAP(ret,testIdAvailableToChildL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testIdAvailableToChildL ----------- \n")); + + INFO_PRINTF1(_L("Begin - testIdNotAvailableToChildL ----------- ")); + TRAP(ret,testIdNotAvailableToChildL()); + TEST(ret==KErrNone); + INFO_PRINTF1(_L("End - testIdNotAvailableToChildL ----------- \n")); + } + +TVerdict CT_ProcStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + INFO_PRINTF1(_L("Test child process existence when parent terminates/exists begins here ------- \n")); + + __UHEAP_MARK; + + CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; + CActiveScheduler::Install(scheduler); + CleanupStack::PushL(scheduler); + + TRAPD(ret,testChildExistsL()); + TEST(ret==KErrNone); + + CleanupStack::PopAndDestroy(scheduler); + + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test child process existence when parent terminates/exists ends here ------- \n")); + + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProcStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ProcStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,87 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_PROC_STEP_H__) +#define __T_PROC_STEP_H__ + +#include +#include +#include "ApparcTestServer.h" +#include + +_LIT(KT_ProcStep,"T_Proc"); +_LIT(KParentExe, "ParentProcess"); +_LIT(KChildOneExe, "ChildI"); +_LIT(KChildTwoExe, "ChildII"); +_LIT(KChildThreeExe, "ChildIII"); +_LIT(KT_ParentProcessID,"ParentProcessID"); +_LIT(KFilePath,"c:\\logs\\TestExecute\\Proc.txt"); +_LIT8(KTResultPass, "PASS"); +_LIT8(KTResultFail, "FAIL"); + + +//! A CT_ProcStep test class. + +/** Checks for child process existence when its parent terminates. */ + +class CT_ProcStep : public CTestStep + { +public: + CT_ProcStep(); + ~CT_ProcStep(); + virtual TVerdict doTestStepL(); +private: + void testChildExistsL(void); + void testChildSetToTerminateL(void); + void testChildSetToRemainL(void); + void testTwoChildsOneToTerminateAndOtherToRemainL(void); + void testParentWithoutAChildL(void); + void testAllChildsSetToTerminateL(void); + void testNoChildSetToTerminateL(void); + void testIdAvailableToChildL(void); + void testIdNotAvailableToChildL(void); + }; + + +//! A support class for CT_ProcStep test class. + +/** An active object which monitors the current status of child when its parent terminates. */ + +class CChildProcess : public CActive + { +public: + static CChildProcess* NewL(RProcess& aParentProcess,TProcessId aChildProcessId); + void RunL(); + void DoCancel(); + ~CChildProcess(); +private: + void ConstructL(); + CChildProcess(RProcess& aParentProcess,TProcessId aChildProcessId); +private: + TProcessId iChildProcessId; + RProcess iParentProcess; + RProcess iChildProcess; + TExitType iExitType; + TInt iCount; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RApaLsSessionStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RApaLsSessionStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,2461 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "..\apparc\apadll.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tstapp.h" +#include + +#include "T_RApaLsSessionStep.h" +#include "appfwk_test_AppUi.h" +#include "TRApaLsSessionStartAppTest.h" +#include "TIconLoaderAndIconArrayForLeaks.h" + +#if !defined(__E32TEST_H__) +#include +#endif + +// Literals & Constants +_LIT(KCompleted, "Completed."); +const TUint KBytesToRead=100; + + +/**************************************** + Auxiliary functions used by test cases +*****************************************/ +void CT_RApaLsSessionTestStep::setup() + { +#if defined(__EPOC32__) + + TFullName filePath=_L("c:\\docs\\tstapp.doc"); + TFullName tempPath=_L("c:\\system\\temp\\"); + // if we're on the rack create the directories we need + TParse parser; + parser.Set(filePath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); + parser.Set(tempPath,NULL,NULL); + iFs.MkDirAll(parser.DriveAndPath()); +#endif + } + + +//////////////////////////// +// Might actually be tests...... +///////////////////////////// + +void CT_RApaLsSessionTestStep::TestAppListInfoDataInterrogationSetupL() + { + // + INFO_PRINTF1(_L("Initialising App List Cache using GetAllApps.....")); + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + INFO_PRINTF1(KCompleted); + +// get the full app count + INFO_PRINTF1(_L("Getting AppCount.....")); + TInt count=0; + ret = iLs.AppCount(count); + TEST(ret==KErrNone); + TEST(count>=1); + INFO_PRINTF1(KCompleted); + +// prepare to get a list of embeddable apps + INFO_PRINTF1(_L("Initialising embeddable app list cache using GetEmbeddableApps.....")); + ret = iLs.GetEmbeddableApps(); + TEST(ret==KErrNone); + INFO_PRINTF1(KCompleted); + +// get the embedded app count + INFO_PRINTF1(_L("Initialising embeddable app list cache using EmbeddableAppCount.....")); + count=0; + ret = iLs.EmbeddableAppCount(count); + TEST(ret==KErrNone); + TEST(count>=1); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppInfo1 + + @SYMPREQ + + @SYMTestCaseDesc Test RApaLsSession::GetNextApp() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAllApps() to initialize the process of + getting all applications in the cached list. Traverse the application list + by calling RApaLsSession::GetNextApp() to search for application tstapp. + Test the application info obtained from GetNextApp() to ensure the application + info obtained is of tstapp. Complete traversal of the list to ensure that at + the end of the list, the enum ENoMoreAppInList is returned by GetNextApp().\n + API Calls:\n + RApaLsSession::GetAllApps() const\n + RApaLsSession::GetNextApp(TApaAppInfo& aInfo) const\n + + @SYMTestExpectedResults The test compares the results obtained with expected values. + + */ +void CT_RApaLsSessionTestStep::TestAppInfo1() + { + + INFO_PRINTF1(_L("Testing RApaLsSession::ENoMoreAppsInList....attempt to get an app")); + //Go to end of Applist for next test... + TApaAppInfo info; + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + + do + { + ret=iLs.GetNextApp(info); + } + while (ret != RApaLsSession::ENoMoreAppsInList); + + //try to get another app (there arn't any more) + ret = iLs.GetNextApp(info); + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppInfo2 + + @SYMPREQ + + @SYMTestCaseDesc Test RApaLsSession::GetNextApp() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAllApps() to initialize the process of + getting all applications in the cached list. Traverse the application list + by calling RApaLsSession::GetNextApp() to search for application tstapp. + Test the application information obtained from GetNextApp() to ensure that + information retrieved is of tstapp.\n + API Calls:\n + RApaLsSession::GetAllApps() const\n + RApaLsSession::GetNextApp(TApaAppInfo& aInfo) const\n + + @SYMTestExpectedResults The test compares the results obtained with expected values. + + */ +void CT_RApaLsSessionTestStep::TestAppInfo2() + { + INFO_PRINTF1(_L("Testing RApaLsSession::GetNextApps() return info....")); + _LIT(KLitAppPath,"z:\\sys\\bin\\tstapp.exe"); + TFullName appPath(KLitAppPath); + + TApaAppInfo info; + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + + do + { + iLs.GetNextApp(info); + } + while (ret==KErrNone && info.iUid!=KUidTestApp); + + TEST(ret==KErrNone); + TEST(info.iUid==KUidTestApp); + info.iFullName.LowerCase(); + TEST(info.iFullName.Compare(appPath) == 0); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppInfo3 + + @SYMPREQ + + @SYMTestCaseDesc Test RApaLsSession::GetAppInfo(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAppInfo() by passing the Uid of test + application tstapp and test the application info obtained from GetAppInfo() + to ensure the obtained information is of test application tstapp.\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms that RApaLsSession::GetAppInfo() + returns the expected application info. + + */ +void CT_RApaLsSessionTestStep::TestAppInfo3() + { + INFO_PRINTF1(_L("Testing RApaLsSession::GetAppInfo()....")); + _LIT(KLitAppPath,"z:\\sys\\bin\\tstapp.exe"); + TFullName appPath(KLitAppPath); + // Get info for an app that exists + TApaAppInfo info; + TInt ret = iLs.GetAppInfo(info,KUidTestApp); + TEST(ret==KErrNone); + TEST(info.iUid==KUidTestApp); + info.iFullName.LowerCase(); + TEST(info.iFullName.Compare(appPath) == 0); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppInfo4 + + @SYMPREQ + + @SYMTestCaseDesc Test if RApaLsSession::GetAppInfo() return KErrNotFound. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The method calls RApaLsSession::GetAppInfo() by passing the null Uid + KNullUid. Observe whether KErrNotFound is returned when Uid that doesn't match + is passed to GetAppInfo().\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms RApaLsSession::GetAppInfo() returns + KErrNotFound when no match is found for the Uid passed.\n + + */ +void CT_RApaLsSessionTestStep::TestAppInfo4() + { + INFO_PRINTF1(_L("Testing RApaLsSession::GetAppInfo()....non-existent app")); + + TApaAppInfo info; + TInt ret = iLs.GetAppInfo(info,KNullUid); + TEST(ret==KErrNotFound); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServerIconSizeCountL + + @SYMPREQ + + @SYMTestCaseDesc Test Get the number of icon sizes for testapp app. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Allocate a flat dynamic buffer which would hold available icon + sizes for tstapp. Call RApaLsSession::GetAppIconSizes() to store the sizes + of icons available for the app tstapp to the allocated flat dynamic buffer. + Check that it is non zero, i.e. that a number of icon sizes has been retreived + for testapp.\n + API Calls:\n + RApaLsSession::GetAppIconSizes(TUid aAppUid, CArrayFixFlat& aArrayToFill) const\n + + @SYMTestExpectedResults aTestIconSizeArray->Count() is greater than 0. + + */ +void CT_RApaLsSessionTestStep::TestServerIconSizeCountL(CArrayFixFlat& aTestIconSizeArray) + { + INFO_PRINTF1(_L("Test RApaLsSession::GetAppIconSizes...")); + + TInt ret=iLs.GetAppIconSizes(KUidTestApp,aTestIconSizeArray); + if(ret==KErrNoMemory) + User::Leave(KErrNoMemory); + TEST(ret==KErrNone); + TEST(aTestIconSizeArray.Count()!=0); + + INFO_PRINTF1(KCompleted); + } + + + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServerIconLoadingBySize1L + + @SYMPREQ + + @SYMTestCaseDesc Test loading of Icon by size. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Allocate a flat dynamic buffer which would hold available icon + sizes for tstapp. Call RApaLsSession::GetAppIconSizes() to store the sizes + of icons available for the app tstapp to the allocated flat dynamic buffer. + Call RApaLsSession::GetAppIcon() by passing each of the icon sizes stored. + Verify whether icon is retrieved each time by GetAppIcon().\n + API Calls:\n + RApaLsSession::GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults The results obtained are compared with the expected values to verify + functionality of RApaLsSession::GetAppIcon(). + + */ +void CT_RApaLsSessionTestStep::TestServerIconLoadingBySize1L(CArrayFixFlat& aTestIconSizeArray) + { + INFO_PRINTF1(_L("Test RApaLsSession::GetAppIcon....Compare icon sizes")); + + for(TInt i=0;iSizeInPixels()==aTestIconSizeArray[i]); + CleanupStack::PopAndDestroy(iconBySize); + } + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServerIconLoadingBySize2L + + @SYMPREQ + + @SYMTestCaseDesc Test loading of Icon by size. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Allocate a flat dynamic buffer which would hold available icon + sizes for tstapp. Call RApaLsSession::GetAppIconSizes() to store the sizes + of icons available for the app tstapp to the allocated flat dynamic buffer. + Call RApaLsSession::GetAppIcon() by passing each of the icon sizes stored. + Test calling RApaLsSession::GetAppIcon() by specifying reduced size than + the actual icon size. Since no match would be found, KErrNotFound should be + returned.\n + API Calls:\n + RApaLsSession::GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults The results obtained are compared with the expected values to verify + functionality of RApaLsSession::GetAppIcon(). + + */ +void CT_RApaLsSessionTestStep::TestServerIconLoadingBySize2L(CArrayFixFlat& aTestIconSizeArray) + { + INFO_PRINTF1(_L("Test RApaLsSession::GetAppIcon....Compare icon sizes that don't match")); + + // now try non exact sizes + CApaMaskedBitmap* iconBySize=CApaMaskedBitmap::NewLC(); + TInt ret=iLs.GetAppIcon(KUidTestApp,(aTestIconSizeArray[0])+TSize(-5,-5),*iconBySize); //by Size + if(ret==KErrNoMemory) + User::Leave(KErrNoMemory); + TEST(ret==KErrNotFound); + CleanupStack::PopAndDestroy(iconBySize); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServerIconLoadingBySize3L + + @SYMPREQ + + @SYMTestCaseDesc Test loading of Icon by size. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Allocate a flat dynamic buffer which would hold available icon + sizes for tstapp. Call RApaLsSession::GetAppIconSizes() to store the sizes + of icons available for the app tstapp to the allocated flat dynamic buffer. + Call RApaLsSession::GetAppIcon() by passing each of the icon sizes stored. + Test GetAppIcon() again by specifying an increased size than the + actual icon size. Observe whether the GetAppIcon() in this case gets the + closest icon available.\n + API Calls:\n + RApaLsSession::GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults The results obtained are compared with the expected values to verify + functionality of RApaLsSession::GetAppIcon(). + + */ +void CT_RApaLsSessionTestStep::TestServerIconLoadingBySize3L(CArrayFixFlat& aTestIconSizeArray) + { + INFO_PRINTF1(_L("Test RApaLsSession::GetAppIcon....Compare icon sizes that don't match.")); + for(TInt ii=0;iiSizeInPixels()==aTestIconSizeArray[ii]); // should get size below always!!! + CleanupStack::PopAndDestroy(iconBySize); + } + INFO_PRINTF1(KCompleted); + } + + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppListInvalidL() + + @SYMPREQ + + @SYMTestCaseDesc Test . + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test RApaLsSession::AppForDocument() to recognize data type & + applications that can handle the data type of data stored in the specified + file. The test is performed on files of one byte and zero byte sizes. + Observe that on both occasions the API returns Uid of an application that + can handle text \ plain data type.\n + Test RApaLsSession::AppForDataType() to recognize Uid of an application + that can handle a specified data type. To do this the test calls + RApaLsSession::RecognizeData() which gets the data type for data taken + from a specified file. The test is performed on files of one byte and zero + byte sizes. The test ensures that RApaLsSession::AppForDataType() doesn't + return KNullUid for both sizes of the file.\n + API Calls:\n + RApaLsSession::AppForDocument(const TDesC& aFileName, TUid& aUid, TDataType& aDataType) const\n + RApaLsSession::RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const\n + RApaLsSession::AppForDataType(const TDataType& aDataType, TUid& aAppUid) const\n + + @SYMTestExpectedResults Test ensures that the data recognition functions identify the data type of + data in a file and the application capable of handling the specified + data type. + + */ +void CT_RApaLsSessionTestStep::TestAppListInvalidL() + { + __UHEAP_MARK; + TestAppListInvalidSetupL(); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test RApaLsSession::GetNextApp() never returns RApaLsSession::EAppListInvalid.")); + + TApaAppInfo info; + TInt ret=0; + while(ret==KErrNone) + { + ret=iLs.GetNextApp(info); + } + + //tests GetNextApp() never returns RApaLsSession::EAppListInvalid + TEST(ret!=RApaLsSession::EAppListInvalid); + TEST(ret==RApaLsSession::ENoMoreAppsInList); + INFO_PRINTF1(KCompleted); + } + + +void CT_RApaLsSessionTestStep::TestAppListInvalidSetupL() + { + INFO_PRINTF1(_L("Setting up Applist invalid test.")); + + _LIT(KTempAppDir, "C:\\private\\10003a3f\\import\\apps\\"); + _LIT(KTempRegPath, "C:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc"); + TFullName regPath=_L("z:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc"); + + CFileMan* iAppListInvalidTestFileMan = CFileMan::NewL (iFs); + CleanupStack::PushL(iAppListInvalidTestFileMan); + + INFO_PRINTF1(_L("Copy tstapp files to C: drive.......")); + TInt rtn=iFs.MkDir(KTempAppDir); + TEST(rtn==KErrNone||rtn==KErrAlreadyExists); + TEST(iAppListInvalidTestFileMan->Copy(regPath, KTempRegPath)==KErrNone); //Just to start the idle update. + + INFO_PRINTF1(_L("Get app list.......")); + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Remove temp files from C: drive.......")); + TRequestStatus status; + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + TEST(iAppListInvalidTestFileMan->Attribs(KTempAppDir,0,KEntryAttReadOnly, tempTime, CFileMan::ERecurse, status)==KErrNone); + + User::WaitForRequest(status); + TEST(status.Int() == KErrNone); + INFO_PRINTF1(_L("Deleting Reg file.......")); + TEST(iAppListInvalidTestFileMan->Delete(KTempRegPath)==KErrNone); //Just to start the idle update. + INFO_PRINTF1(_L("Removing App dir.......")); + TEST(iAppListInvalidTestFileMan->RmDir(KTempAppDir)==KErrNone); + CleanupStack::PopAndDestroy(iAppListInvalidTestFileMan); + + INFO_PRINTF1(KCompleted); + } + + + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppListRecognizeDataL + + @SYMPREQ + + @SYMTestCaseDesc Test data recognition functions of RApaLsSession. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test RApaLsSession::AppForDocument() to recognize data type & + applications that can handle the data type of data stored in the specified + file. The test is performed on files of one byte and zero byte sizes. + Observe that on both occasions the API returns Uid of an application that + can handle text \ plain data type.\n + Test RApaLsSession::AppForDataType() to recognize Uid of an application + that can handle a specified data type. To do this the test calls + RApaLsSession::RecognizeData() which gets the data type for data taken + from a specified file. The test is performed on files of one byte and zero + byte sizes. The test ensures that RApaLsSession::AppForDataType() doesn't + return KNullUid for both sizes of the file.\n + API Calls:\n + RApaLsSession::AppForDocument(const TDesC& aFileName, TUid& aUid, TDataType& aDataType) const\n + RApaLsSession::RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const\n + RApaLsSession::AppForDataType(const TDataType& aDataType, TUid& aAppUid) const\n + + @SYMTestExpectedResults Test ensures that the data recognition functions identify the data type of + data in a file and the application capable of handling the specified + data type. + + */ +void CT_RApaLsSessionTestStep::TestAppListRecognizeDataL() + { + // The following tests will only succeed if the text recogniser and an app which likes text files are both installed + // The tests check that file recognisers work for zero and non zero length files. + INFO_PRINTF1(_L("Testing AppForDocument(), RecognizeData() and AppForDataType()")); + TInt ret; + TUid appUid=KNullUid; + TDataType dataType; + INFO_PRINTF1(_L("Testing 1 byte text file recognition")); + ret = iLs.AppForDocument(_L("z:\\system\\data\\one_byte.txt"), appUid,dataType); + TEST(ret==KErrNone); + TEST(appUid!=KNullUid); + INFO_PRINTF1(KCompleted); + + appUid=KNullUid; + INFO_PRINTF1(_L("Testing zero byte text file recognition")); + ret = iLs.AppForDocument(_L("z:\\system\\data\\zero_len.txt"), appUid,dataType); + TEST(ret==KErrNone); + TEST(appUid!=KNullUid); + INFO_PRINTF1(KCompleted); + + // this following exihibits a defect which was fixed for Release 6 is fixed. + // KNullUid was recognized for zero length text files using this method before the fix. + appUid=KNullUid; + TBuf8<255> buffer; + buffer.FillZ(255); + buffer[0] = 'a'; // We used to fill it entirely with zeroes but an ICL recognizer know interferes + // with this, so we added an 'a' + TDataRecognitionResult recogResult; + + appUid=KNullUid; + INFO_PRINTF1(_L("Testing 1 byte text file recognition - lengthy method")); + ret = iLs.RecognizeData(_L("z:\\system\\data\\one_byte.txt"),buffer,recogResult); + TEST(ret==KErrNone); + ret = iLs.AppForDataType(recogResult.iDataType,appUid); + TEST(ret==KErrNone); + TEST(appUid!=KNullUid); + INFO_PRINTF1(KCompleted); + + appUid=KNullUid; + INFO_PRINTF1(_L("Testing zero byte text file recognition -lengthy method")); + ret = iLs.RecognizeData(_L("z:\\system\\data\\zero_len.txt"),buffer,recogResult); + TEST(ret==KErrNone); + ret = iLs.AppForDataType(recogResult.iDataType,appUid); + TEST(ret==KErrNone); + TEST(appUid!=KNullUid); + INFO_PRINTF1(KCompleted); + + // the following attempts to open a file of an unknown mime type with extension .UnrecognisableExtention + + INFO_PRINTF1(_L("Testing RecognizeData() with unrecognizable file type...")); + buffer.FillZ(255); + _LIT8(KLitUnRecog,""); + iLs.FlushRecognitionCache(); + recogResult.Reset(); + //First call to RecognizeData() does not utilize the cache + User::LeaveIfError(iLs.RecognizeData(_L("z:\\system\\data\\FileWithUnknownMimeType.UnrecognisableExtention"),buffer,recogResult)); + TEST(recogResult.iDataType.Des8().CompareF(KLitUnRecog)==0); + recogResult.Reset(); + //Second call to RecognizeData() utilizes the cache + User::LeaveIfError(iLs.RecognizeData(_L("z:\\system\\data\\FileWithUnknownMimeType.UnrecognisableExtention"),buffer,recogResult)); + TEST(recogResult.iDataType.Des8().CompareF(KLitUnRecog)==0); + INFO_PRINTF1(_L("Completed Testing unrecognizable file type...")); + + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppListRecognizeDataBufferOnlyL + + @SYMPREQ INC064138 + + @SYMTestCaseDesc Test data recognition functions of RApaLsSession without a filename. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + + @SYMTestExpectedResults Test ensures that the data recognition functions identify the data type of + data in a file. + */ +void CT_RApaLsSessionTestStep::TestAppListRecognizeDataBufferOnlyL() + { + INFO_PRINTF1(_L("Testing recognition without filename")); + + TDataRecognitionResult rr; + _LIT8(KTestBuffer, "Text_TestRecognizer"); + rr.Reset(); + TInt error = iLs.RecognizeData(KNullDesC, KTestBuffer, rr); + if (rr.iConfidence != CApaDataRecognizerType::ECertain) + { + INFO_PRINTF1(_L("Error: confidence should be ECertain")); + TEST(EFalse); + } + + _LIT8(KAnotherBuffer, "AnotherText"); + rr.Reset(); + error = iLs.RecognizeData(KNullDesC, KAnotherBuffer, rr); + if (rr.iConfidence != CApaDataRecognizerType::EProbable) + { + INFO_PRINTF1(_L("Error: confidence should be EProbable")); + TEST(EFalse); + } + + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-Serv2Step-DoEnquiryTestsL + + @SYMPREQ + + @SYMTestCaseDesc Tests querying of data (MIME) type information. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test setting and getting the confidence threshold for + successful data recognition by calling RApaLsSession::SetAcceptedConfidence() + and RApaLsSession::GetAcceptedConfidence().\n + Test setting and getting maximum size of the data that can be read + from a file for the purpose of recognizing the data type by calling + RApaLsSession::SetMaxDataBufSize() and RApaLsSession::GetMaxDataBufSize(). + Finally test retrieval of all supported data (MIME) types.\n + API Calls:\n + RApaLsSession::SetAcceptedConfidence(TInt aConfidence)\n + RApaLsSession::GetAcceptedConfidence(TInt& aConfidence) const\n + RApaLsSession::SetMaxDataBufSize(TInt aBufSize)\n + RApaLsSession::GetMaxDataBufSize(TInt& aBufSize) const\n + RApaLsSession::GetSupportedDataTypesL(CDataTypeArray& aDataTypes) const\n + + @SYMTestExpectedResults Test results against expected values. + + */ +void CT_RApaLsSessionTestStep::TestSetGetAcceptedConfidenceL() + { + INFO_PRINTF1(_L("Test SetAcceptedConfidence....")); + + TInt temp=1234; + TInt ret=iLs.SetAcceptedConfidence(temp); + TSecurityInfo info; + info.Set(RProcess()); + + info.iCaps.HasCapability(ECapabilityWriteDeviceData) ? TEST(ret==KErrNone) : TEST(ret==KErrPermissionDenied); + INFO_PRINTF1(KCompleted); + + INFO_PRINTF1(_L("Test GetAcceptedConfidence....")); + temp=0; + ret=iLs.GetAcceptedConfidence(temp); + TEST(ret==KErrNone); + TEST(temp==1234); + INFO_PRINTF1(KCompleted); + } + +void CT_RApaLsSessionTestStep::TestSetGetMaxDataBufSizeL() + { + INFO_PRINTF1(_L("Test SetMaxDataBufSize....")); + + TInt temp=1234; + TInt ret=iLs.SetMaxDataBufSize(temp); + TEST(ret==KErrNone); + INFO_PRINTF1(KCompleted); + + INFO_PRINTF1(_L("Test GetMaxDataBufSize....")); + temp=0; + ret=iLs.GetMaxDataBufSize(temp); + TEST(ret==KErrNone); + TEST(temp==1234); + INFO_PRINTF1(KCompleted); + } + +void CT_RApaLsSessionTestStep::TestGetSupportedDataTypesL() +{ + INFO_PRINTF1(_L("Test GetSupportedDataTypes....")); + + CDataTypeArray* dataTypes=new(ELeave) CDataTypeArray(5); + CleanupStack::PushL(dataTypes); + + TInt ret=iLs.GetSupportedDataTypesL(*dataTypes); + TEST(ret==KErrNone); + TEST(dataTypes->Count()>=4); + CleanupStack::PopAndDestroy(); // dataTypes + + INFO_PRINTF1(KCompleted); + } + + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetAllApps + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Check that RApaLsSession::GetAllApps() hasn't been + affected by the new code to filter the app list + based on embeddability (implemented for CR PHAR-5Q4FX8) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetAllApps() once, followed by repeated calls + to GetNextApp until something other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for the following test apps: + TAppNotEmbeddable.exe + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetAllApps() + { + INFO_PRINTF1(_L("DoGetAllApps")); + + TInt ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + }; + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x1F); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetEmbeddableApps + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Check that RApaLsSession::GetEmbeddableApps() hasn't been + affected by the new code to filter the app list + based on embeddability (implemented for CR PHAR-5Q4FX8) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetEmbeddableApps() once, followed by repeated calls + to GetNextApp until something other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for the following test apps: + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + and should not return app info for: + TAppNotEmbeddable.exe + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetEmbeddableApps() + { + INFO_PRINTF1(_L("DoGetEmbeddableApps")); + + TInt ret = iLs.GetEmbeddableApps(); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + }; + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x06); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoEmbeddableAppCount + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + The number of apps returned by GetEmbeddableApps should be the + same as EmbeddableAppCount returns. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Count the number of apps returned by calling GetEmbeddableApps + followed by repeated calls to GetNextApp. + Count the number of apps returned by EmbeddableAppCount. + + @SYMTestExpectedResults + The counts should be equal. + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoEmbeddableAppCount() + { + INFO_PRINTF1(_L("DoEmbeddableAppCount")); + + TInt ret = iLs.GetEmbeddableApps(); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TInt count1 = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + count1 ++; + }; + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + TInt count2 = 0; + ret = iLs.EmbeddableAppCount(count2); + TEST(ret==KErrNone); + TEST(count1 == count2); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetAppCapability + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Confirm that the application embeddability value that a specific app + defines in it's AIF file, matches the value returned by + RApaLsSession::GetAppCapability. + Check that this is true for all supported embeddability values + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetAppCapability for each of the following test apps: + TAppNotEmbeddable.exe + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + + @SYMTestExpectedResults + For each app, GetAppCapability should return the embeddability value + defined in the application's AIF file. + + */ +void CT_RApaLsSessionTestStep::DoGetAppCapability() + { + INFO_PRINTF1(_L("DoGetAppCapability")); + + const TInt numberOfCapabilities = 5; + TUid uidArray[numberOfCapabilities]; + uidArray[0] = KUidAppNotEmbeddable; + uidArray[1] = KUidAppEmbeddable; + uidArray[2] = KUidAppEmbeddableOnly; + uidArray[3] = KUidAppEmbeddableUiOrStandAlone; + uidArray[4] = KUidAppEmbeddableUiNotStandAlone; + + const TApaAppCapability::TEmbeddability embeddabilityArray[numberOfCapabilities] + = { TApaAppCapability::ENotEmbeddable, + TApaAppCapability::EEmbeddable, + TApaAppCapability::EEmbeddableOnly, + TApaAppCapability::EEmbeddableUiOrStandAlone, + TApaAppCapability::EEmbeddableUiNotStandAlone }; + + for (TInt ii = 0; ii < numberOfCapabilities; ii++) + { + INFO_PRINTF2(_L("Testing embeddability value, %d"), uidArray[ii]); + TApaAppCapabilityBuf capabilityBuf; + TInt ret = iLs.GetAppCapability(capabilityBuf, uidArray[ii]); + TEST(ret==KErrNone); + TEST(capabilityBuf().iEmbeddability == embeddabilityArray[ii]); + } + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetFilteredApps1 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Passing an empty filter to RApaLsSession::GetFilteredApps + should cause no apps to be returned by subsequent calls + to RApaLsSession::GetNextApp + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a default constructed filter, + followed by a single call to GetNextApp + + @SYMTestExpectedResults + GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetFilteredApps1() + { + INFO_PRINTF1(_L("DoGetFilteredApps1")); + + TApaEmbeddabilityFilter filter; + TInt ret = iLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TEST(iLs.GetNextApp(appInfo) == RApaLsSession::ENoMoreAppsInList); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetFilteredApps2 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Passing a filter specifying only ENotEmbeddable + to RApaLsSession::GetFilteredApps should cause subsequent + calls to RApaLsSession::GetNextApp to return only + applications which cannot be embedded + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing ENotEmbeddable, + followed by repeated calls to GetNextApp until something other than + KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for only the following test app: + TAppNotEmbeddable.exe + and should not return app info for: + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetFilteredApps2() + { + INFO_PRINTF1(_L("DoGetFilteredApps2")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + TInt ret = iLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x01); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetFilteredApps3 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + EEmbeddableUiOrStandAlone (value 5) shares a bit flag (bit 1) + with EEmbeddable (value 1). + Confirm that a filter of EEmbeddableUiOrStandAlone only returns + apps that define EEmbeddableUiOrStandAlone + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing EEmbeddableUiOrStandAlone, + followed by repeated calls to GetNextApp until something other than + KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for only the following test app: + TAppEmbeddableUiOrStandAlone.dll + and should not return app info for: + TAppEmbeddable.dll + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetFilteredApps3() + { + INFO_PRINTF1(_L("DoGetFilteredApps3")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + TInt ret = iLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x08); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetFilteredApps4 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + A filter specifying two embeddability values should + include apps of either embeddability + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing EEmbeddableUiOrStandAlone + and EEmbeddableUiNotStandAlone followed by repeated calls to GetNextApp + until something other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for only the following test apps: + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + and should not return app info for: + TAppNotEmbeddable.exe + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetFilteredApps4() + { + INFO_PRINTF1(_L("DoGetFilteredApps4")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + TInt ret = iLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x18); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetFilteredApps5 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Getting apps using a filter specifying all embeddability values + should return the same number of apps as RApaLsSession::GetAllApps() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing all embeddability values, + and count the number of calls to GetNextApp until something other than + KErrNone is returned. + Then call GetAllApps and count the number of calls to GetNextApp until + something other than KErrNone is returned. + + @SYMTestExpectedResults + The two counts should be equal. + The last call in each sequence of calls to GetNextApp should return + RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetFilteredApps5() + { + INFO_PRINTF1(_L("DoGetFilteredApps5")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + TInt ret = iLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TInt filteredCount = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + filteredCount++; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + ret = iLs.GetAllApps(); + TEST(ret==KErrNone); + + TInt allAppsCount = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + allAppsCount++; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + TEST(filteredCount == allAppsCount); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoGetFilteredApps6 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + None of the following embeddability test apps support + screen mode 1, so none of them should be returned even + if the filter specifies all embeddability types. + TAppNotEmbeddable.exe + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing all embeddability values + and screen mode 1, followed by repeated calls to GetNextApp until something + other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should not return app info for any of the following test apps: + TAppNotEmbeddable.exe + TAppEmbeddable.dll + TAppEmbeddableOnly.dll + TAppEmbeddableUiOrStandAlone.dll + TAppEmbeddableUiNotStandAlone.dll + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_RApaLsSessionTestStep::DoGetFilteredApps6(/*RApaLsSession& iLs*/) + { + INFO_PRINTF1(_L("DoGetFilteredApps6")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + const TInt screenMode1 = 1; + TInt ret = iLs.GetFilteredApps(filter, screenMode1); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = iLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoTestEmbeddabilityFilter1 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Ensure default constructed TApaEmbeddabilityFilter object is + initialized correctly. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object and call + MatchesEmbeddability using each of the following embeddability values: + TApaAppCapability::ENotEmbeddable + TApaAppCapability::EEmbeddable + TApaAppCapability::EEmbeddableOnly + TApaAppCapability::EEmbeddableUiOrStandAlone + TApaAppCapability::EEmbeddableUiNotStandAlone + + @SYMTestExpectedResults + All calls to MatchesEmbeddability should return fiLse. + + */ +void CT_RApaLsSessionTestStep::DoTestEmbeddabilityFilter1() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter1")); + + TApaEmbeddabilityFilter filter; + TEST(!filter.MatchesEmbeddability(TApaAppCapability::ENotEmbeddable)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddable)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableOnly)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone)); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoTestEmbeddabilityFilter2 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Bit 2 is used by both EEmbeddableUiNotStandAlone and EEmbeddableOnly. + Make sure that setting the filter to only EEmbeddableUiNotStandAlone + doesn't match EEmbeddableOnly. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to only EEmbeddableUiNotStandAloneand + and call MatchesEmbeddability passing EEmbeddableOnly + + @SYMTestExpectedResults + MatchesEmbeddability should return fiLse. + + */ +void CT_RApaLsSessionTestStep::DoTestEmbeddabilityFilter2() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter2")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableOnly)); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoTestEmbeddabilityFilter3 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Bit 2 is used by both EEmbeddableUiNotStandAlone and EEmbeddableOnly. + Make sure that setting the filter to only EEmbeddableOnly + doesn't match EEmbeddableUiNotStandAlone. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to only EEmbeddableOnly + and call MatchesEmbeddability passing EEmbeddableUiNotStandAlone + + @SYMTestExpectedResults + MatchesEmbeddability should return fiLse. + + */ +void CT_RApaLsSessionTestStep::DoTestEmbeddabilityFilter3() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter3")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone)); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoTestEmbeddabilityFilter4 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Ensure MatchesEmbeddability returns true when the filter only contains + the embeddability being matched. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to only EEmbeddable + and call MatchesEmbeddability passing EEmbeddable + + @SYMTestExpectedResults + MatchesEmbeddability should return true. + + */ +void CT_RApaLsSessionTestStep::DoTestEmbeddabilityFilter4() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter4")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + TEST(filter.MatchesEmbeddability(TApaAppCapability::EEmbeddable)); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoTestEmbeddabilityFilter5 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Ensure MatchesEmbeddability returns true when the filter contains + a superset of the embeddability being matched. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to both ENotEmbeddable and EEmbeddable + and call MatchesEmbeddability passing EEmbeddable + + @SYMTestExpectedResults + MatchesEmbeddability should return true. + + */ +void CT_RApaLsSessionTestStep::DoTestEmbeddabilityFilter5() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter5")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + TEST(filter.MatchesEmbeddability(TApaAppCapability::EEmbeddable)); + INFO_PRINTF1(KCompleted); + } + + /** + @SYMTestCaseID T-RApaLsSessionTestStep-TestGetAppCapabilityL + + @SYMPREQ + + @SYMTestCaseDesc Test interrogates the Application Architecture Server. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const\n + RApaLsSession::RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const\n + RApaLsSession::RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const\n + RApaLsSession::GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults All tests compare the results obtained with the desired result. + + */ +void CT_RApaLsSessionTestStep::TestGetAppCapabilityL() + { + TApaAppCapabilityBuf buf; + INFO_PRINTF1(_L("Checking GetAppCapability from Test App Uid...")); + TInt ret = iLs.GetAppCapability(buf,KUidTestApp); + TEST(ret==KErrNone); + TApaAppCapability cap=buf(); + TEST(cap.iEmbeddability==TApaAppCapability::EEmbeddable); + TEST(!cap.iSupportsNewFile); + TEST(!cap.iAppIsHidden); + INFO_PRINTF1(KCompleted); + + INFO_PRINTF1(_L("Checking GetAppCapability Null Id returns KErrNotFound...")); + ret = iLs.GetAppCapability(buf,KNullUid); + TEST(ret==KErrNotFound); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestRecognizeSpecificData + + @SYMPREQ + + @SYMTestCaseDesc Test interrogates the Application Architecture Server. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + RApaLsSession::RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const\n + RApaLsSession::RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const\n + RApaLsSession::GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults All tests compare the results obtained with the desired result. + + */ +void CT_RApaLsSessionTestStep::TestRecognizeSpecificData() +{ + INFO_PRINTF1(_L("Checking data type information")); + INFO_PRINTF1(_L("Checking RecognizeSpecificData...")); + TBool isText=EFalse; + TInt ret=iLs.RecognizeSpecificData(_L("a file name.txt"),_L8("Some plain text"),TDataType(_L8("text/plain")),isText); + TEST(ret==KErrNone); + TEST(isText); + + INFO_PRINTF1(_L("Checking RecognizeData...")); + TDataRecognitionResult result; + ret=iLs.RecognizeData(_L("a file name.txt"),_L8("Some plain text"),result); + TEST(ret==KErrNone); + TEST(result.iDataType==TDataType(_L8("text/plain"))); + TEST(result.iConfidence==CApaDataRecognizerType::EProbable); + + isText=EFalse; + INFO_PRINTF1(_L("Checking RecognizeSpecificData...unknown data type...")); + ret=iLs.RecognizeSpecificData(_L("a file name.txt"),_L8("Some plain text"),TDataType(_L8("foo/bar")),isText); + TEST(!isText); + INFO_PRINTF1(KCompleted); +} + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestGetAppIconL + + @SYMPREQ + + @SYMTestCaseDesc Test interrogates the Application Architecture Server. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestExpectedResults All tests compare the results obtained with the desired result. + + */ +void CT_RApaLsSessionTestStep::TestGetAppIconL() + { + INFO_PRINTF1(_L("Checking icon loading by index")); + CApaMaskedBitmap* icon=CApaMaskedBitmap::NewLC(); + TSize lastSize(0,0); + + INFO_PRINTF1(_L("Checking index 0")); + TInt ret=iLs.GetAppIcon(KUidTestApp,0,*icon); + TEST(ret==KErrNone); + TEST(icon->SizeInPixels().iWidth*icon->SizeInPixels().iHeight > lastSize.iWidth*lastSize.iHeight); + lastSize=icon->SizeInPixels(); + + INFO_PRINTF1(_L("Checking icon index 1")); + ret=iLs.GetAppIcon(KUidTestApp,1,*icon); + TEST(ret==KErrNone); + TEST(icon->SizeInPixels().iWidth*icon->SizeInPixels().iHeight == lastSize.iWidth*lastSize.iHeight); + lastSize=icon->SizeInPixels(); + + INFO_PRINTF1(_L("Checking icon index 2")); + ret=iLs.GetAppIcon(KUidTestApp,2,*icon); + TEST(ret==KErrNone); + TEST((icon->SizeInPixels().iWidth*icon->SizeInPixels().iHeight) > (lastSize.iWidth*lastSize.iHeight)); + lastSize=icon->SizeInPixels(); + + INFO_PRINTF1(_L("Checking icon loading unknown Uid....")); + TUid uid={9999}; + ret=iLs.GetAppIcon(uid,0,*icon); + TEST(ret==KErrNotFound); + CleanupStack::PopAndDestroy(icon); + INFO_PRINTF1(KCompleted); + } +/** + @SYMTestCaseID APPFWK-APPARC-0085 + + @SYMDEF PDEF113054: Apparc fails to detect the presence of localized MBM files + + @SYMTestCaseDesc + Negative Test: Test an icon file with an extension which is not supported. + + + @SYMTestPriority High + + @SYMTestStatus Implemented + + Call GetAppViewIcon API on an App which has a localized MBM icon file associated with it with an invalid extension. + GetAppViewIcon returns KErrNotSupported + + @SYMTestExpectedResults RApaLsSession::GetAppViewIcon should return KErrNotSupported when + the view icon file is an invalid icon file + */ +void CT_RApaLsSessionTestStep::TestGetAppIcon2L() + { + CApaAppViewArray* appViews = new(ELeave) CApaAppViewArray(4); + CleanupStack::PushL(appViews); + TInt ret = iLs.GetAppViews(*appViews, KUidTestApp); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Negative test- checking for file extension which is not supported")); + //the third view icon is not a valid mbm file + const TApaAppViewInfo& viewInfo=(*appViews)[2]; + TEST(viewInfo.iUid != KNullUid); + TEST(viewInfo.iViewCaption.Length() > 0); + TEST(viewInfo.iScreenMode == 0x00); + CApaMaskedBitmap* viewBitmap = CApaMaskedBitmap::NewLC(); + ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, TSize(50,50), *viewBitmap); + TEST(ret==KErrNotSupported); + INFO_PRINTF2(_L("The View icon's UID is - %d"), viewInfo.iUid); + + HBufC* fullIconFileName = NULL; + ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, fullIconFileName); + TEST(ret == KErrNone); + TEST(fullIconFileName != NULL); + if (fullIconFileName != NULL) + { + TEST(fullIconFileName->Length() > 0); + INFO_PRINTF2(_L("Invalid View's icon file name is - %S"), fullIconFileName); + } + delete fullIconFileName; + fullIconFileName = NULL; + + CleanupStack::PopAndDestroy(viewBitmap); + CleanupStack::PopAndDestroy(appViews); + + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0073 + + @SYMDEF INC098717: support for scalable midlet icons is missing + + @SYMTestCaseDesc Test interrogates the Application Architecture Server's GetAppIcon API . + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppIcon API on an app which has an icon file associated with it. + Again Call GetAppIcon API on an app which does not have an icon file associated with it. + Again Call GetAppIcon with an invalid app uid. Do it for SVG and MBM icon file. + + @SYMTestExpectedResults RApaLsSession::GetAppIcon should return KErrNotFound when + an invalid app uid is passed, KErrNotFound when application does not have an icon + file, KErrNone and an open file handle to the application's icon file if application + has an icon file. + */ +void CT_RApaLsSessionTestStep::TestGetAppIcon1L() + { + TestGetAppIconForMBMIconsL(); + TestGetAppIconForSVGIconsL(); + + //Generic tests for both MBM and SVG icon files + RFile iconFile; + CleanupClosePushL(iconFile); + //Testing GetAppIcon for native app without an icon file. + INFO_PRINTF1(_L("Testing GetAppIcon API for an app that does not have an icon file")); + const TUint KGroupNameApp = 0x10208185; //T_groupNametest app, does not have an icon file. + TInt err = iLs.GetAppIcon(TUid::Uid(KGroupNameApp), iconFile); + TEST(err == KErrNotFound); + + //Checking the iconfile name when the icon file is not a physical file on the file system. + CApaAppViewArray* appViews = new(ELeave) CApaAppViewArray(4); + CleanupStack::PushL(appViews); + TInt ret = iLs.GetAppViews(*appViews, TUid::Uid(KGroupNameApp)); + TEST(ret==KErrNone); + TEST(appViews->Count() > 0); + + const TApaAppViewInfo& viewInfo=(*appViews)[0]; + TEST(viewInfo.iUid != KNullUid); + + HBufC* fullIconFileName = NULL; + ret = iLs.GetAppViewIcon(TUid::Uid(KGroupNameApp), viewInfo.iUid, fullIconFileName); + TEST(ret == KErrNone); + TEST(fullIconFileName != NULL); + INFO_PRINTF2(_L("The View icon's UID is - %X"), viewInfo.iUid); + TEST(!fullIconFileName->Compare(_L("file:///c/resource/apps/tcheckiconapp.xyz"))); + INFO_PRINTF2(_L("View's icon file name is - %S"), fullIconFileName); + + delete fullIconFileName; + CleanupStack::PopAndDestroy(appViews); + + //Testing GetAppIcon with an invalid app UID. + INFO_PRINTF1(_L("Testing GetAppIcon API with unknown app uid")); + TUid invalidAppUid = {9999}; + err = iLs.GetAppIcon(invalidAppUid, iconFile); + TEST(err == KErrNotFound); + + //Close icon file + CleanupStack::PopAndDestroy(&iconFile); + + INFO_PRINTF1(KCompleted); + } + +void CT_RApaLsSessionTestStep::TestGetAppIconForMBMIconsL() + { + //Testing GetAppIcon for native app with MBM icon file. + INFO_PRINTF1(_L("Testing GetAppIcon API for an app to retrieve an open file handle to an MBM icon file")); + const TUint KTestApp = 10; //Tstapp app, has MBM icon file + + RFile mbmIconFile; + CleanupClosePushL(mbmIconFile); + + TInt err = iLs.GetAppIcon(TUid::Uid(KTestApp), mbmIconFile); + TEST(err == KErrNone); + + _LIT(KMBMIconFileName, "z:\\resource\\apps\\tstapp.mbm"); + //Get the name of the icon file + TBuf mbmIconFileName; + mbmIconFile.FullName(mbmIconFileName); + TEST(mbmIconFileName.Length() != 0); + if (mbmIconFileName.Length() != 0) + { + mbmIconFileName.LowerCase(); + TEST(mbmIconFileName.Compare(KMBMIconFileName) == 0); + } + + //Try to write into the MBM icon file whose handle was returned. + INFO_PRINTF1(_L("..writing into the MBM icon file whose handle was returned.")); + _LIT8(KSomeText, "It would not be written into the file"); + err = mbmIconFile.Write(KSomeText); + TEST(err == KErrAccessDenied); + + //Try to read from the MBM icon file whose handle was returned. + INFO_PRINTF1(_L("..reading from the MBM icon file whose handle was returned.")); + TBuf8 buffer; //buffer to read first KBytesToRead bytes of the mbm icon file. + err = mbmIconFile.Read(buffer); + TEST(err == KErrNone); + + //Close icon files. + CleanupStack::PopAndDestroy(&mbmIconFile); + + //First KBytesToRead bytes of the icon file, this should be same as in mbm file. + RFile tempFile; + CleanupClosePushL(tempFile); + err = tempFile.Open(iFs, KMBMIconFileName, EFileShareReadersOnly); + TEST(err == KErrNone); + TBuf8 buffer1; + err = tempFile.Read(buffer1); + TEST(err == KErrNone); + TEST(buffer == buffer1); + CleanupStack::PopAndDestroy(&tempFile); + } + +void CT_RApaLsSessionTestStep::TestGetAppIconForSVGIconsL() + { + //Testing GetAppIcon for native app with SVG icon file. + RFile svgIconFile; + CleanupClosePushL(svgIconFile); + INFO_PRINTF1(_L("Testing GetAppIcon API for an app to retrieve an open file handle to an SVG icon file")); + const TUint KApparcTestApp = 0x100048F3; //Tstapp app, has SVG icon file + TInt err = iLs.GetAppIcon(TUid::Uid(KApparcTestApp), svgIconFile); + TEST(err == KErrNone); + + _LIT(KSVGIconFileName, "z:\\resource\\apps\\svg_icon.svg"); + //Get the name of the icon file + TBuf svgIconFileName; + svgIconFile.FullName(svgIconFileName); + TEST(svgIconFileName.Length() != 0); + if (svgIconFileName.Length() != 0) + { + svgIconFileName.LowerCase(); + TEST(svgIconFileName.Compare(KSVGIconFileName) == 0); + } + + //Try to write into the icon file whose handle was returned. + INFO_PRINTF1(_L("..writing into the SVG icon file whose handle was returned.")); + _LIT8(KSomeText, "It would not be written into the file"); + err = svgIconFile.Write(KSomeText); + TEST(err == KErrAccessDenied); + + //Try to read from the icon file whose handle was returned. + INFO_PRINTF1(_L("..reading from the SVG icon file whose handle was returned.")); + TBuf8 svgBuffer; //buffer to read first KBytesToRead bytes of the icon file. + err = svgIconFile.Read(svgBuffer); + TEST(err == KErrNone); + + //Close icon file + CleanupStack::PopAndDestroy(&svgIconFile); + + //First KBytesToRead bytes of the icon file, this should be same as in mbm file. + RFile tempFile; + CleanupClosePushL(tempFile); + err = tempFile.Open(iFs, KSVGIconFileName, EFileRead); + TEST(err == KErrNone); + TBuf8 buffer1; + err = tempFile.Read(buffer1); + TEST(err == KErrNone); + TEST(svgBuffer == buffer1); + CleanupStack::PopAndDestroy(&tempFile); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppListInstallationL + + @SYMPREQ + + @SYMTestCaseDesc Test updating of Application list on installation of a new application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test updating of application list on installation of a new application. + Copy the tstapp from z: import\apps folder to c: import\apps folder. + Call RApaLsSession::GetAppInfo() and test the application information obtained to + verify whether the application architecture server updates the application to reside in c: drive. + Delete the copied application and call RApaLsSession::GetAppInfo(). + Verify that the application list updates the tstapp application to reside + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms that the application architecture + server updates the application list on installation of a new application. It also confirms that + if UID of an application which is present on import\apps folder on any non-ROM drive, is same + as UID of an existing application present on z: import\apps folder then the apparc server + updates the applist and uses the application residing on non-ROM drive's import\apps folder. + + */ +void CT_RApaLsSessionTestStep::TestAppListInstallationL() + { + _LIT(KTestAppDestDir, "C:\\private\\10003a3f\\import\\apps\\" ); + _LIT(KTestAppSource, "Z:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc" ); + _LIT(KTestAppDest, "C:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc" ); + + _LIT(KTestWaitingForApplistUpdate,"Waiting %d microseconds for applist to be updated"); + const TInt KApplistUpdateTime = 10000000; + + // Copy App files around and delete them to check whether + // the app list updates and stores the cache correctly. + RFs theFS; + theFS.Connect(); + + // Remove Test app from the file system + CFileMan* fileManager = CFileMan::NewL (theFS); + + INFO_PRINTF1(_L("Copying the app to C")); + TEST(KErrNone == fileManager->Copy (KTestAppSource, KTestAppDest, CFileMan::ERecurse)); + + INFO_PRINTF2(KTestWaitingForApplistUpdate, KApplistUpdateTime); + User::After(KApplistUpdateTime); + + TApaAppInfo aInfo; + TEST(KErrNone == iLs.GetAppInfo (aInfo, KUidTestApp)); + + TParsePtrC parse (aInfo.iFullName); + _LIT (KCdrive, "C:"); + INFO_PRINTF1(_L("Comparing App drive location is C:... ")); + TEST(parse.Drive ().CompareF (KCdrive) == 0); + + INFO_PRINTF1(_L("Removing the app from C")); + TRequestStatus status; + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + TEST(fileManager->Attribs(KTestAppDest,0,KEntryAttReadOnly, tempTime, CFileMan::ERecurse, status)==KErrNone); + User::WaitForRequest(status); + TEST(status.Int() == KErrNone); + TEST(KErrNone == fileManager->Delete (KTestAppDest, CFileMan::ERecurse)); + INFO_PRINTF1(_L("Removing the app dir from C")); + TEST(fileManager->RmDir(KTestAppDestDir)==KErrNone); + + INFO_PRINTF2(KTestWaitingForApplistUpdate, KApplistUpdateTime); + User::After(KApplistUpdateTime); + + // That should put the file in the right place + TEST(KErrNone == iLs.GetAppInfo( aInfo, KUidTestApp)); + + TParsePtrC parse1 (aInfo.iFullName); + _LIT (KZdrive, "Z:"); + INFO_PRINTF1(_L("Comparing App drive location is Z:... ")); + TEST((parse1.Drive().CompareF(KZdrive)) == 0); + + delete fileManager; + theFS.Close(); + + INFO_PRINTF1(_L("Test TestAppListInstallationL completed")); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppListInstallation1L + + @SYMDEF DEF055654: Platform-security loop-hole for "import-directory" applications + + @SYMTestCaseDesc Test updating of Application list on installation of a new application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test updating of application list on installation of a new application. + Copy the SimpleApparcTestApp from z:\private\10003a3f\apps folder to c:\private\10003a3f\import\apps + folder. Call RApaLsSession::GetAppInfo() and test the application information obtained to + verify that apparc server does not update the application to reside in c: drive + but on z drive. Delete the copied application and call RApaLsSession::GetAppInfo(). + Verify that the application list does not update app list again.\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms that the scanning order of apparc server + for applications is 'apps' folder for all ROM drives and then 'import\apps' folder + for all other drives. It also confirms that if UID of an application which is present in + import\apps folder on any non-ROM drive, is same as UID of an existing application present + on z: apps folder then the apparc server does not update app list and uses the application + residing on z drive. + + */ +void CT_RApaLsSessionTestStep::TestAppListInstallation1L() + { + _LIT(KTestAppDestDir, "C:\\private\\10003a3f\\import\\apps\\" ); + _LIT(KTestAppSource, "Z:\\private\\10003a3f\\apps\\SimpleApparcTestApp_reg.rsc" ); + _LIT(KTestAppDest, "C:\\private\\10003a3f\\import\\apps\\SimpleApparcTestApp_reg.rsc" ); + + _LIT(KTestWaitingForApplistUpdate,"Waiting %d microseconds for applist to be updated"); + const TInt KApplistUpdateTime=10000000; + + // Copy reg files around and delete them to check the app list does not update. + RFs theFS; + User::LeaveIfError(theFS.Connect()); + CleanupClosePushL(theFS); + + // Remove simple app from the file system + CFileMan* fileManager=CFileMan::NewL(theFS); + CleanupStack::PushL(fileManager); + + INFO_PRINTF1(_L("Copying the app to C \\import\\apps folder")); + TEST(KErrNone==fileManager->Copy(KTestAppSource,KTestAppDest,CFileMan::ERecurse)); + + INFO_PRINTF2(KTestWaitingForApplistUpdate,KApplistUpdateTime); + User::After(KApplistUpdateTime); + + TApaAppInfo appInfo; + const TUid KUidSimpleApparcTestApp={0x12008ACE}; + TEST(KErrNone==iLs.GetAppInfo(appInfo,KUidSimpleApparcTestApp)); + + TParsePtrC parse(appInfo.iFullName); + _LIT (KZdrive,"Z:"); + INFO_PRINTF1(_L("After copying app to C:, there should not be any update in app list:... ")); + INFO_PRINTF1(_L("Comparing App drive location is Z:... ")); + TEST(parse.Drive().CompareF(KZdrive)==0); + + INFO_PRINTF1(_L("Removing the app from C")); + TRequestStatus status; + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + TEST(fileManager->Attribs(KTestAppDest,0,KEntryAttReadOnly,tempTime,CFileMan::ERecurse,status)==KErrNone); + User::WaitForRequest(status); + TEST(status.Int()==KErrNone); + TEST(KErrNone==fileManager->Delete(KTestAppDest, CFileMan::ERecurse)); + + INFO_PRINTF1(_L("Removing the app dir from C")); + TEST(fileManager->RmDir(KTestAppDestDir)==KErrNone); + + + INFO_PRINTF2(KTestWaitingForApplistUpdate,KApplistUpdateTime); + User::After(KApplistUpdateTime); + + TEST(KErrNone==iLs.GetAppInfo(appInfo,KUidSimpleApparcTestApp)); + + TParsePtrC parse1(appInfo.iFullName); + INFO_PRINTF1(_L("After removing app from C:, there should not be any update in app list:... ")); + INFO_PRINTF1(_L("Comparing App drive location is Z:... ")); + TEST((parse1.Drive().CompareF(KZdrive))==0); + + CleanupStack::PopAndDestroy(2, &theFS); + + INFO_PRINTF1(_L("Test TestAppListInstallation1L completed")); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestAppFolderNonRomDrivesL + + @SYMDEF DEF055654: Platform-security loop-hole for "import-directory" applications + + @SYMTestCaseDesc Test scanning of app folder for non-ROM drives. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test scanning of app folder for non-ROM drives. + Copy a new application AAA_reg from z:\Apparctest folder to c:\private\10003a3f\apps folder. + Call RApaLsSession::GetAppInfo() and test application architecture server does not + populate the new application in app list. Delete the copied application.\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms that the application architecture server does not + scans applications residing in 'apps' folder for all non-ROM drives. + */ +void CT_RApaLsSessionTestStep::TestAppFolderNonRomDrivesL() + { + _LIT(KTestAppDestDir, "C:\\private\\10003a3f\\apps\\" ); + _LIT(KTestAppSource, "Z:\\Apparctest\\AAA_reg.rsc" ); + _LIT(KTestAppDest, "C:\\private\\10003a3f\\apps\\AAA_reg.rsc" ); + + _LIT(KTestWaitingForApplistUpdate,"Waiting %d microseconds for applist to be updated"); + const TInt KApplistUpdateTime=10000000; + + INFO_PRINTF1(_L("Test scanning of app folder for non-ROM drives")); + // Copy reg files around and delete them to check + // the app list does not update. + RFs theFS; + User::LeaveIfError(theFS.Connect()); + CleanupClosePushL(theFS); + + // Remove simple app from the file system + CFileMan* fileManager=CFileMan::NewL(theFS); + CleanupStack::PushL(fileManager); + + INFO_PRINTF1(_L("Copying AAA app to C apps folder")); + TEST(KErrNone==fileManager->Copy(KTestAppSource,KTestAppDest,CFileMan::ERecurse)); + + INFO_PRINTF2(KTestWaitingForApplistUpdate,KApplistUpdateTime); + User::After(KApplistUpdateTime); + + TApaAppInfo appInfo; + // UID of AAA app is 0x10207f74 + const TUid KUidSimpleApp={0x10207f74}; + INFO_PRINTF1(_L("Finding AAA app in app list... ")); + TEST(KErrNotFound==iLs.GetAppInfo(appInfo,KUidSimpleApp)); + + INFO_PRINTF1(_L("Removing AAA app from C apps folder")); + TRequestStatus status; + TTime tempTime(0); // added tempTime to avoid asynch CFileMan::Attribs request completing with KErrArgument + TEST(fileManager->Attribs(KTestAppDest,0,KEntryAttReadOnly,tempTime,CFileMan::ERecurse,status)==KErrNone); + User::WaitForRequest(status); + TEST(status.Int()==KErrNone); + TEST(KErrNone==fileManager->Delete(KTestAppDest,CFileMan::ERecurse)); + + INFO_PRINTF1(_L("Removing the app dir from C")); + TEST(fileManager->RmDir(KTestAppDestDir)==KErrNone); + + + INFO_PRINTF2(KTestWaitingForApplistUpdate,KApplistUpdateTime); + User::After(KApplistUpdateTime); + + INFO_PRINTF1(_L("Finding AAA app in app list... ")); + TEST(KErrNotFound==iLs.GetAppInfo(appInfo,KUidSimpleApp)); + + CleanupStack::PopAndDestroy(2, &theFS); + + INFO_PRINTF1(_L("Test scanning of app folder for non-ROM drives completed")); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-DoNumDefIconsTestL + + @SYMDEF DEF037571 - Provide a better alternative to CApaAppInfoFileReader::NumberOfBitmaps' + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + API Calls:\n + RApaLsSession::GetAppIconSizes() \n + RApaLsSession::NumberOfOwnDefinedIcons(appUid, iconCount) + @SYMTestExpectedResults + + */ +void CT_RApaLsSessionTestStep::DoNumDefIconsTestL() + { + INFO_PRINTF1(_L("Testing RApaLsSession::NumberOfOwnDefinedIcons")); + + CArrayFixFlat* array = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(array); + + // Test the GetAppIconSizes function, check 3 icons are returned (default icons) + INFO_PRINTF1(_L("Testing GetAppIconSizes")); + TUid appUid; + appUid.iUid = 0x12008ACE; // SimpleApparcTestApp UID + TInt err = iLs.GetAppIconSizes(appUid, *array); + TEST(err == KErrNone); + TEST(array->Count() == 3); + + // Test the NumberOfOwnDefinedIcons function, check count is zero (no own defined icons) + INFO_PRINTF1(_L("Testing NumberOfOwnDefinedIcons (SimpleApparcTestApp)")); + TInt iconCount = -1; + err = iLs.NumberOfOwnDefinedIcons(appUid, iconCount); + TEST(err == KErrNone); + TEST(iconCount == 0); + + // Test NumberOfOwnDefinedIcons again, this time with Agenda app UID (icons defined) + INFO_PRINTF1(_L("Testing NumberOfOwnDefinedIcons (Paint app)")); + iconCount = -1; + appUid.iUid = 0x10003A5C;//agenda app UID + err = iLs.NumberOfOwnDefinedIcons(appUid, iconCount); + TEST(err == KErrNone); + TEST(iconCount == 3); + + CleanupStack::PopAndDestroy(array); + + INFO_PRINTF1(_L("NumberOfOwnDefinedIcons test complete")); + } + + +void CT_RApaLsSessionTestStep::TestMatchesSecurityPolicy() + { + TUid appUid; + appUid.iUid=0X10009f9a; + TBool matches; + + //Testing with valid TSecurityPolicy + INFO_PRINTF1(_L("Testing MatchesSecurityPolicy with valid TSecurityPolicy")); + iLs.MatchesSecurityPolicy(matches, appUid, TSecurityPolicy(TVendorId(0x70000001))); + TEST(matches); + INFO_PRINTF1(KCompleted); + + //Testing with invalid TSecurityPolicy + INFO_PRINTF1(_L("Testing MatchesSecurityPolicy with invalid TSecurityPolicy")); + APPFWK_NEGATIVE_PLATSEC_START; + iLs.MatchesSecurityPolicy(matches, appUid, TSecurityPolicy(TVendorId(0x70000002))); + APPFWK_NEGATIVE_PLATSEC_FINISH; + TEST(!matches); + INFO_PRINTF1(KCompleted); + } + +void CT_RApaLsSessionTestStep::TestGetAppViewsL() + { + INFO_PRINTF1(_L("Testing RApaLsSession::GetAppViews() with a valid app uid")); + + CApaAppViewArray* appViews = new(ELeave) CApaAppViewArray(4); + CleanupStack::PushL(appViews); + + TInt ret = iLs.GetAppViews(*appViews, KUidTestApp); + TEST(ret==KErrNone); + + // check appviews contain entries + const TInt count=appViews->Count(); + TEST(count > 0); + TInt testNumberOfIcons = count-1; + //the last view is invalid. Hence it checks till count-1 + for (TInt ii=0; ii 0); + TEST(viewInfo.iScreenMode == 0x00); + + // check icons in the views + CApaMaskedBitmap* viewBitmap = CApaMaskedBitmap::NewLC(); + ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, TSize(50,50), *viewBitmap); + TEST(ret==KErrNone); + CleanupStack::PopAndDestroy(viewBitmap); + + HBufC* fullFileName = NULL; + ret = iLs.GetAppViewIcon(KUidTestApp, viewInfo.iUid, fullFileName); + TEST(ret == KErrNone); + TEST(fullFileName != NULL); + if (fullFileName != NULL) + { + TEST(fullFileName->Length() > 0); + } + delete fullFileName; + fullFileName = NULL; + } + + CleanupStack::PopAndDestroy(appViews); + INFO_PRINTF1(KCompleted); + } + +void CT_RApaLsSessionTestStep::TestGetAppViewsFailureL() + { + INFO_PRINTF1(_L("Testing RApaLsSession::GetAppViews() with an invalid app uid")); + + const TUid appUid={10000}; // invalid uid + CApaAppViewArray* appViews = new(ELeave) CApaAppViewArray(2); + CleanupStack::PushL(appViews); + + //Create App View array + TInt ret = iLs.GetAppViews(*appViews, appUid); + TEST(ret=KErrNotFound); + + CleanupStack::PopAndDestroy(appViews); + INFO_PRINTF1(KCompleted); + } + +void CT_RApaLsSessionTestStep::IconLoadingTestCasesL() + { + CArrayFixFlat* testIconSizeArray; + testIconSizeArray=new(ELeave) CArrayFixFlat(3); + CleanupStack::PushL(testIconSizeArray); + TestServerIconSizeCountL(*testIconSizeArray); + TestServerIconLoadingBySize1L(*testIconSizeArray); + TestServerIconLoadingBySize2L(*testIconSizeArray); + TestServerIconLoadingBySize3L(*testIconSizeArray); + CleanupStack::PopAndDestroy(testIconSizeArray); + } + +void CT_RApaLsSessionTestStep::AppInfoTestCasesL() + { + TestAppListInfoDataInterrogationSetupL(); + + TestAppInfo1(); + TestAppInfo2(); + TestAppInfo3(); + TestAppInfo4(); + + TestGetAppCapabilityL(); + TestRecognizeSpecificData(); + + TestSetGetAcceptedConfidenceL(); + TestSetGetMaxDataBufSizeL(); + + TestGetSupportedDataTypesL(); + TestGetAppIconL(); + TestGetAppIcon1L(); + TestGetAppIcon2L(); + + TestGetAppViewsL(); + TestGetAppViewsFailureL(); + } + +void CT_RApaLsSessionTestStep::EmbeddedAppsTestCases() + { + DoGetAllApps(); + DoGetEmbeddableApps(); + DoEmbeddableAppCount(); + DoGetAppCapability(); + DoGetFilteredApps1(); + DoGetFilteredApps2(); + DoGetFilteredApps3(); + DoGetFilteredApps4(); + DoGetFilteredApps5(); + DoGetFilteredApps6(); + DoTestEmbeddabilityFilter1(); + DoTestEmbeddabilityFilter2(); + DoTestEmbeddabilityFilter3(); + DoTestEmbeddabilityFilter4(); + DoTestEmbeddabilityFilter5(); + } + +void CT_RApaLsSessionTestStep::TestNotifyOnDataMappingChangeL() + { + INFO_PRINTF1(_L("Test RApaLsSession::TestNotifyOnDataMappingChangeL()")); + RApaLsSession lsMappingChange; + lsMappingChange.Connect(); + CleanupClosePushL(lsMappingChange); + TRequestStatus status; + lsMappingChange.NotifyOnDataMappingChange(status); + //Test for TestCancelNotifyOnDataMappingChange + lsMappingChange.CancelNotifyOnDataMappingChange(); + User::WaitForRequest(status); + TEST( status ==KErrCancel); + //Test for TestNotifyOnDataMappingChangeL + lsMappingChange.NotifyOnDataMappingChange(status); + const TUid KTestUidValue1={10101010}; + const TDataType dataType(_L8("sonew/else")); + iLs.InsertDataMapping(dataType,KDataTypePriorityHigh,KTestUidValue1); + User::WaitForRequest(status); + TEST(status==KErrNone); + TEST(KErrNone == iLs.DeleteDataMapping(dataType)); + CleanupStack::PopAndDestroy(&lsMappingChange); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestDataPriorityForUnTrustedApps + + @SYMDEF DEF063982 + + @SYMTestCaseDesc Tests the Un-Trusted Apps Datatypepriority assigned through + RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid)\n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestExpectedResults All tests compare the results obtained with the desired result. +*/ +void CT_RApaLsSessionTestStep::TestDataPriorityForUnTrustedApps() + { + INFO_PRINTF1(_L("TestDataPriorityForUnTrustedApps about to start...")); + const TUid KUidUnTrustedApp = {0x10207f8C}; + const TUid KUidTrustedApp = {0x10207f8D}; + TInt ret; + TBool insertVal = EFalse; + //There is no restriction for the Trusted Apps datapriority + TDataTypePriority KTrustedAppPriority = {KDataTypeUnTrustedPriorityThreshold+1}; + //The data priority for UnTrusted Apps is greater than the Threshold + TDataTypePriority KUnTrustedAppPriority = {KDataTypeUnTrustedPriorityThreshold+10}; + _LIT8(KLitMimeTypeTestData,"test/data"); + ret = iLs.InsertDataMapping(TDataType(KLitMimeTypeTestData),KTrustedAppPriority,KUidTrustedApp); + //UnTrusted Apps data priority will be reduced to Security Threshold if it is greater than it. + ret = iLs.InsertDataMappingIfHigher(TDataType(KLitMimeTypeTestData),KUnTrustedAppPriority,KUidUnTrustedApp,insertVal); + TUid testUid; + ret = iLs.AppForDataType(TDataType(KLitMimeTypeTestData),testUid); + TEST(ret == KErrNone); + TEST(testUid == KUidTrustedApp); + INFO_PRINTF1(_L("Completed")); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestDataPriorityForUnTrustedAppsRegFile + + @SYMDEF DEF063982 + + @SYMTestCaseDesc Tests the UnTrusted Apps Datatypepriority assigned through the registration files + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestExpectedResults All tests compare the results obtained with the desired result. + */ +void CT_RApaLsSessionTestStep::TestDataPriorityForUnTrustedAppsRegFile() + { + INFO_PRINTF1(_L("TestDataPriorityForUnTrustedAppsRegFile about to start...")); + const TUid KUidRegTrustedApp = {0x10207f8F}; + _LIT8(KLitMimeTypeTestData,"text/html"); + TUid testUid; + TInt ret; + //The datatype priority of UnTrusted Apps is reduced to Threshold. + ret = iLs.AppForDataType(TDataType(KLitMimeTypeTestData),testUid); + TEST(ret == KErrNone); + TEST(testUid == KUidRegTrustedApp); + INFO_PRINTF1(_L("Completed")); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestIconLoaderAndIconArrayMemoryLeaksL + + @SYMDEF PDEF104113 + + @SYMTestCaseDesc Checks there's no memory leaks when a CApaAppIconArray oject + is created and deleted + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions It creates an object of CApaAppIconArray class and deletes it. + Then test there is no memory leak from the creation to destory the object. + + @SYMTestExpectedResults There should be no memory leak checked by __UHEAP_MARK + and __UHEAP_MARKEND. + */ +void CT_RApaLsSessionTestStep::TestIconLoaderAndIconArrayMemoryLeaksL() + { + INFO_PRINTF1(_L("Test TestIconLoaderAndIconArrayMemoryLeaksL")); + __UHEAP_MARK; + TIconLoaderAndIconArrayForLeaks::TestIconLoaderAndIconArrayL(); + __UHEAP_MARKEND; + INFO_PRINTF1(_L("Completed")); + } + +void CT_RApaLsSessionTestStep::RunTestCasesL() + { + //make sure the RFbsSession doesn't have to allocate buffer since it would change the heap + CFbsBitmap* bufferAllocator = new(ELeave) CFbsBitmap; + CleanupStack::PushL(bufferAllocator); + bufferAllocator->Create(TSize(200,1), EColor16M); + CleanupStack::PopAndDestroy(bufferAllocator); + + + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestAppListInvalidL(), iLs.ClearAppInfoArray() ); + //DONT_CHECK due to file system changes + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestAppListInstallationL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestAppListInstallation1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestAppFolderNonRomDrivesL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, 0, IconLoadingTestCasesL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, 0, AppInfoTestCasesL(), iLs.ClearAppInfoArray(); NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, 0, EmbeddedAppsTestCases(), iLs.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, DoNumDefIconsTestL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestMatchesSecurityPolicy(), NO_CLEANUP); + //DONT_CHECK since there's a new typestore + HEAP_TEST_LS_SESSION(iLs, 0, DONT_CHECK, TestNotifyOnDataMappingChangeL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestAppListRecognizeDataBufferOnlyL(), iLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestAppListRecognizeDataL(), iLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestDataPriorityForUnTrustedApps(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iLs, 0, 0, TestDataPriorityForUnTrustedAppsRegFile(), NO_CLEANUP); + TestIconLoaderAndIconArrayMemoryLeaksL(); + } + +/** + Destructor + */ +CT_RApaLsSessionTestStep::~CT_RApaLsSessionTestStep() + { + RFbsSession::Disconnect(); + iFs.Close(); + iLs.Close(); + } + +/** + Constructor + */ +CT_RApaLsSessionTestStep::CT_RApaLsSessionTestStep() + { + FbsStartup(); + TInt ret=RFbsSession::Connect(); + TEST(ret==KErrNone); + + ret=iFs.Connect(); + TEST(ret==KErrNone); + + setup(); + + ret = iLs.Connect(); + TEST(ret==KErrNone); + + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_RApaLsSessionStep); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_RApaLsSessionTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_RApaLsSessionTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + + +TVerdict CT_RApaLsSessionTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_RApaLsSession Test Cases Running...")); + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_RApaLsSession Test Cases Completed.")); + + return TestStepResult(); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RApaLsSessionStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RApaLsSessionStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,140 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_RAPALSSESSION_STEP_H__) +#define __T_RAPALSSESSION_STEP_H__ + +_LIT(KT_RApaLsSessionStep,"T_RApaLsSession"); + +#include "ApparcTestServer.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "..\apparc\apadll.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "testableapalssession.h" +#include +#include +#include +#include "appfwk_test_AppUi.h" +#include "TAppEmbedUids.h" + + +class CT_RApaLsSessionTestStep : public CTestStep + { +public: + CT_RApaLsSessionTestStep(); + ~CT_RApaLsSessionTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + void RunTestCases(); + +private: + void ConstructL(); + void setup(); + void RunTestCasesL(); + void TestAppListInvalidSetupL(); + TBool ComparePaths(const TDesC& aFilename, const TDesC& aPath); + + void TestAppListInvalidL(); + + void IconLoadingTestCasesL(); + void TestServerIconLoadingBySizeSetupL(); + void TestServerIconSizeCountL(CArrayFixFlat& aTestIconSizeArray); + void TestServerIconLoadingBySize1L(CArrayFixFlat& aTestIconSizeArray); + void TestServerIconLoadingBySize2L(CArrayFixFlat& aTestIconSizeArray); + void TestServerIconLoadingBySize3L(CArrayFixFlat& aTestIconSizeArray); + + void AppInfoTestCasesL(); + void TestGetAppCapabilityL(); + void TestRecognizeSpecificData(); + void TestSetGetAcceptedConfidenceL(); + void TestSetGetMaxDataBufSizeL(); + void TestGetSupportedDataTypesL(); + void TestGetAppIconL(); + void TestGetAppIcon1L(); + void TestGetAppIcon2L(); + void TestGetAppIconForMBMIconsL(); + void TestGetAppIconForSVGIconsL(); + + void TestGetAppViewsL(); + void TestGetAppViewsFailureL(); + + void TestAppListInfoDataInterrogationSetupL(); + void TestAppInfo1(); + void TestAppInfo2(); + void TestAppInfo3(); + void TestAppInfo4(); + + void TestAppListRecognizeDataL(); + void TestAppListRecognizeDataBufferOnlyL(); + void TestAppListInstallationL(); + void TestAppListInstallation1L(); + void TestAppFolderNonRomDrivesL(); + + void EmbeddedAppsTestCases(); + void DoGetAllApps(); + void DoGetEmbeddableApps(); + void DoEmbeddableAppCount(); + void DoGetAppCapability(); + void DoGetFilteredApps1(); + void DoGetFilteredApps2(); + void DoGetFilteredApps3(); + void DoGetFilteredApps4(); + void DoGetFilteredApps5(); + void DoGetFilteredApps6(); + void DoTestEmbeddabilityFilter1(); + void DoTestEmbeddabilityFilter2(); + void DoTestEmbeddabilityFilter3(); + void DoTestEmbeddabilityFilter4(); + void DoTestEmbeddabilityFilter5(); + void DoNumDefIconsTestL(); + void TestMatchesSecurityPolicy(); + void TestNotifyOnDataMappingChangeL(); + void TestDataPriorityForUnTrustedApps(); + void TestDataPriorityForUnTrustedAppsRegFile(); + void TestIconLoaderAndIconArrayMemoryLeaksL(); +private: + RFs iFs; + RTestableApaLsSession iLs; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RecUpgrade.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RecUpgrade.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,223 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This test case is used to verify that a recognizer plugin can be upgraded and used +// without reboot. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "testableapalssession.h" +#include "T_RecUpgrade.h" +#include "appfwk_test_utils.h" +#include "trecupgrade/upgconstants.h" + +///////////////////////////////////////////////// + +// Should be enough for CApaEComMonitor to detect new plugin +const TInt KOneSecondDelay = 1000000; + +///////////////////////////////////////////////// + +CT_RecUpgradeStep::CT_RecUpgradeStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_RecUpgradeStep); + } + +CT_RecUpgradeStep::~CT_RecUpgradeStep() + { + } + +/** +Check that the test plugin file has not been left in the filesystem from a previous run. +*/ +TVerdict CT_RecUpgradeStep::doTestStepPreambleL() + { + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + INFO_PRINTF1(_L("Verifies that recupgrade.rsc was not present during boot.")); + TBool fileExists = ETrue; + TInt err = fs.IsFilePresent(KUpgRscTargetPath, fileExists); + TESTE(fileExists==EFalse, err); + + CleanupStack::PopAndDestroy(&fs); + return TestStepResult(); + } + +/* +Delete the plugin file which was installed during the test from c:. +*/ +TVerdict CT_RecUpgradeStep::doTestStepPostambleL() + { + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + TBool fileExists = EFalse; + fs.IsFilePresent(KUpgRscTargetPath, fileExists); + if(fileExists) + { + fs.ChangeFilePermissionL(KUpgRscTargetPath); // clear readonly attribute inherited from z: + const TInt err = fs.DeleteFileL(KUpgRscTargetPath); + if(err == KErrNone) + INFO_PRINTF1(_L("Removed temporary file recupgrade.rsc")); + else + INFO_PRINTF1(_L("Failed to remove temporary file recupgrade.rsc")); + } + + CleanupStack::PopAndDestroy(&fs); + return TestStepResult(); + } + +/* +The test entry point +*/ +TVerdict CT_RecUpgradeStep::doTestStepL() + { + RTestableApaLsSession apparcServer; + CleanupClosePushL(apparcServer); + User::LeaveIfError(apparcServer.Connect()); + //DONT_CHECK skips the heap check at server side. This heap imbalance happens due to copying recupgrade.dll to c:\sys\bin + //and failed to delete it in cleanup (Windows OS don’t allow to delete any file which are in use). + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestUpgradeRecognizerL(apparcServer), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&apparcServer); + + return TestStepResult(); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0100 + +@SYMDEF INC127312 + +@SYMTestCaseDesc This test verify that apparc can dynamically upgrade and use an Ecom recognizer plugin. + +@SYMTestPriority High + +@SYMTestStatus Implemented + +@SYMTestActions: + + 1. Try to recognize .upg file with version 1 of recupgrade ECOM plugin but if shuld not be able to recognize as it is implemented like that + 2. Install version 2 of recupgrade plugin (copy recupgrade_winscw/armv5_rec.dll and recupgrade_1.rsc from z:\system\data to c:\sys\bin and c:\resource\plugin respectively) + + 3. Because of installation Apparc will be notified and it will reload all recognizers plugin + 4. Now try to recognize .upg file . it shuld be able to recognize as vertion 2 is implemented like that + +@SYMTestExpectedResults Test should complete without any leave, panic or error. + */ +void CT_RecUpgradeStep::TestUpgradeRecognizerL(RApaLsSession& aApparcServer) + { + + TDataRecognitionResult recogResult; + TBuf8<255> buffer; + buffer.FillZ(255); + recogResult.Reset(); + + // Since recognizer for "mime\upg" mime type is installed but it will return CApaDataRecognizerType::ENotRecognized as implemented : call to RecognizeData() + // returns CApaDataRecognizerType::ENotRecognized. + INFO_PRINTF1(_L("MIME type recognition cache is not used...")); + TEST(aApparcServer.RecognizeData(KUpgDocPath, buffer, recogResult)==KErrNone); + + TEST(recogResult.iConfidence == CApaDataRecognizerType::ENotRecognized); + + INFO_PRINTF1(_L("Installs upgrade of mime/upg recognizer plugin file ")); + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + // Ensure c:\\resource\\plugins is created, otherwise leave from this teststep + + TInt err = fs.CreateDirectoryL(KUpgRscTargetDir); + TESTEL((err == KErrNone || err == KErrAlreadyExists), err); + INFO_PRINTF1(_L("c:\\resource\\plugins is created successfully or already exists")); + + // Ensure c:\\sys\\bin is created, otherwise leave from this teststep + + err = fs.CreateDirectoryL(KUpgDllTargetDir); + TESTEL((err == KErrNone || err == KErrAlreadyExists), err); + INFO_PRINTF1(_L("c:\\sys\\bin is created successfully or already exists")); + + // Copy recupgrade.rsc from z:\\ to c:\\resource\\plugins, to trigger the rescan for plugins. + + err = fs.CopyFileL(KUpgRscSourcePath, KUpgRscTargetPath); + TEST(err == KErrNone); + INFO_PRINTF1(_L("Successfully copied recupgrade.rsc from Z:\\system\\data to c\\resource\\plugins")); + // Copy recupgrade_*.dll from z:\\ to c:\\sys\\bin. + #ifdef __WINS__ + err = fs.CopyFileL(KUpgDllSourcePathWinscw, KUpgDllTargetPath); + #else + err = fs.CopyFileL(KUpgDllSourcePathArmv5, KUpgDllTargetPath); + #endif + TEST(err == KErrNone); + INFO_PRINTF1(_L("Successfully copied recupgrade_*.dll from Z:\\system\\data to c:\\sys\\bin")); + + INFO_PRINTF2(_L("Waits %d seconds for new mime/upg recognizer with EPossible confidence to be installed."), (4 * KOneSecondDelay)/1000000); + User::After(4 * KOneSecondDelay); + + // Without fix for INC127312: Apparc server will not reload all upgraded MIME type recognition hence new version of existing will not used for recognization + INFO_PRINTF1(_L("MIME type recognition cache is flushed when a new recogizer is installed")); + recogResult.Reset(); + TEST(aApparcServer.RecognizeData(KUpgDocPath, buffer, recogResult)==KErrNone); + TEST(recogResult.iDataType.Des8().CompareF(KMimeUpgType) == 0); + TEST(recogResult.iConfidence == CApaDataRecognizerType::EPossible); + + +// Delete the plugin resource file of the recognizer with EPossible confidence which was installed during the test from z:. + + TInt fileExists = EFalse; + fs.IsFilePresent(KUpgRscTargetPath, fileExists); + if (fileExists) + { + fs.ChangeFilePermissionL(KUpgRscTargetPath); // clear readonly attribute inherited from z: + err = fs.DeleteFileL(KUpgRscTargetPath); + if(err == KErrNone) + INFO_PRINTF1(_L("Removed file recupgrade.rsc")); + else + INFO_PRINTF1(_L("Failed to remove recupgrade.rsc")); + } + + fileExists = EFalse; + fs.IsFilePresent(KUpgDllTargetPath, fileExists); + if (fileExists) + { + fs.ChangeFilePermissionL(KUpgDllTargetPath); // clear readonly attribute inherited from z: + err = fs.DeleteFileL(KUpgDllTargetPath); + if(err == KErrNone) + INFO_PRINTF1(_L("Removed recupgrade.dll")); + else + INFO_PRINTF1(_L("Failed to remove recupgrade.dll")); + } + + INFO_PRINTF2(_L("Waits %d seconds for the data recognizer list maintained by EMIME to be updated"), (10 * KOneSecondDelay)/1000000); + User::After(10 * KOneSecondDelay); + + // Since "mime/upg" recognizer version 2 is uninstalled, mime/upg mime type is not recognized. + INFO_PRINTF1(_L("MIME type recognition cache is flushed when a existing recogizer is uninstalled")); + recogResult.Reset(); + TEST(aApparcServer.RecognizeData(KUpgDocPath, buffer, recogResult)==KErrNone); + TEST(recogResult.iConfidence == CApaDataRecognizerType::ENotRecognized); + + CleanupStack::PopAndDestroy(&fs); + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RecUpgrade.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RecUpgrade.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,47 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_RECUPGRADE_H +#define __T_RECUPGRADE_H + +#include + +_LIT(KT_RecUpgradeStep, "T_RecUpgrade"); + +class CT_RecUpgradeStep : public CTestStep + { +public: + CT_RecUpgradeStep(); + ~CT_RecUpgradeStep(); + + //from CTestStep + TVerdict doTestStepPreambleL(); + TVerdict doTestStepL(); + TVerdict doTestStepPostambleL(); + +private: + void TestUpgradeRecognizerL(RApaLsSession& aApparcServer); + TBool DoRecognizeL(RApaLsSession& aApparcServer, const TDataType& aDataType); + void CopyRecognizerFileL(); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RuleBasedLaunchingStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RuleBasedLaunchingStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,467 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test cases test the funtionality of RuleBased plugins framework. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include "..\tef\tRuleBasedApps\RuleBasedUID.H" //The UID'S for the 4 applications used during testing +#include "T_RuleBasedLaunchingStep.h" +#include +#include "testableapalssession.h" + +const TUint KNonNativeApplicationType = 0x10207f90; +const TUint KNonNativeApplication = 0xA0000B6E; + +_LIT(KLitNativeExecutable, "z:\\sys\\bin\\TNNAPP2.EXE"); +_LIT(KLitLogicalExecutableA, "c:\\A.NNAPP2"); // this file never actually needs to exist +_LIT8(KLitMimeTypeA, "x-epoc/a-nnapp2"); + +CTRuleBasedLaunchingStep::CTRuleBasedLaunchingStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_RuleBasedLaunchingStep); + } + +CTRuleBasedLaunchingStep::~CTRuleBasedLaunchingStep() + { + iWs.Close(); + iFs.Close(); + } + +void CTRuleBasedLaunchingStep::ExecuteL() + { + RTestableApaLsSession theLs; + User::LeaveIfError(theLs.Connect()); + CleanupClosePushL(theLs); + + //DONT_CHECK since app list is updated + HEAP_TEST_LS_SESSION(theLs, 0, DONT_CHECK, TestLaunchNonNativeApplicationForRuleBasedL(theLs), NO_CLEANUP); + //DONT_CHECK since result is unstable + HEAP_TEST_LS_SESSION(theLs, 0, DONT_CHECK, LaunchAppTests1L(theLs), theLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests2L(theLs), theLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests3L(theLs), theLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests4L(theLs), theLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests5L(theLs), theLs.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(theLs, 0, 0, LaunchAppTests6L(theLs), theLs.FlushRecognitionCache() ); + + CleanupStack::PopAndDestroy(&theLs); + } + +LOCAL_C void DeregisterNonNativeForRuleBased(TAny* aApparcServer) + { + RApaLsSession& apparcServer = *static_cast(aApparcServer); + TRAP_IGNORE(apparcServer.PrepareNonNativeApplicationsUpdatesL()); + TRAP_IGNORE(apparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KNonNativeApplication))); + TRAP_IGNORE(apparcServer.CommitNonNativeApplicationsUpdatesL()); + TRAP_IGNORE(apparcServer.DeregisterNonNativeApplicationTypeL(TUid::Uid(KNonNativeApplicationType))); + } + +void CTRuleBasedLaunchingStep::TestLaunchNonNativeApplicationForRuleBasedL(RApaLsSession& aApparcServer) + { + INFO_PRINTF1(_L("TestLaunchNonNativeApplicationForRuleBasedL...")); + + // make sure we're starting from a clean sheet + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KNonNativeApplication)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationTypeL(TUid::Uid(KNonNativeApplicationType)); + CleanupStack::PushL(TCleanupItem(DeregisterNonNativeForRuleBased, &aApparcServer)); + + aApparcServer.RegisterNonNativeApplicationTypeL(TUid::Uid(KNonNativeApplicationType), KLitNativeExecutable); + + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter = CApaRegistrationResourceFileWriter::NewL(TUid::Uid(KNonNativeApplication), KLitLogicalExecutableA, TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + registrationResourceFileWriter->AddDataTypeL(KDataTypePriorityNormal, KLitMimeTypeA); + + CApaCommandLine* const commandLineForNonNativeApp = CApaCommandLine::NewLC(); + commandLineForNonNativeApp->SetExecutableNameL(KLitLogicalExecutableA); + + INFO_PRINTF1(_L("..registering app using RegisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.RegisterNonNativeApplicationL(TUid::Uid(KNonNativeApplicationType), EDriveC, *registrationResourceFileWriter, NULL, NULL); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + + // Since NonNative application will be launched inspite of Rule saying it should not be launched + INFO_PRINTF1(_L("Testing launching of a NonNativeApp...")); + TEST(aApparcServer.StartApp(*commandLineForNonNativeApp) == KErrCancel); + + INFO_PRINTF1(_L("..deregistering app using DeregisterNonNativeApplicationL() ")); + aApparcServer.PrepareNonNativeApplicationsUpdatesL(); + aApparcServer.DeregisterNonNativeApplicationL(TUid::Uid(KNonNativeApplication)); + aApparcServer.CommitNonNativeApplicationsUpdatesL(); + + // clean-up + CleanupStack::PopAndDestroy(3); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0023 +@SYMPREQ PREQ1122 +@SYMTestCaseDesc Rule Based Launching of Applications +@SYMTestPriority High +@SYMTestStatus Implemented + +@SYMTestActions The test utilises 4 test applications that simply display the appication name. + Each application is launched and closed in sequence. + +@SYMTestExpectedResults The test verifies that each application can be opened and closed normally. +*/ +void CTRuleBasedLaunchingStep::LaunchAppTests1L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 1 started")); + + // App1 is launched and closed + TEST(AppLaunchedL(aLs, KUidApp1) == KErrNone); + TEST(AppClosed(KUidApp1) == KErrNone); + + // App2 is launched and closed + TEST(AppLaunchedL(aLs, KUidApp2) == KErrNone); + TEST(AppClosed(KUidApp2) == KErrNone); + + // App3 is launched and closed + TEST(AppLaunchedL(aLs, KUidApp3) == KErrNone); + TEST(AppClosed(KUidApp3) == KErrNone); + + // App4 is launched and closed + TEST(AppLaunchedL(aLs, KUidApp4) == KErrNone); + TEST(AppClosed(KUidApp4) == KErrNone); + + // Close all apps + ClosedAllTestApp(); + + INFO_PRINTF1(_L("Test case 1 finished")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0024 +@SYMPREQ PREQ1122 +@SYMTestCaseDesc Rule Based Launching of Applications +@SYMTestPriority High +@SYMTestStatus Implemented + +@SYMTestActions The test utilises 3 test applications that simply display the appication name. + The test utilises a single plugin that implements 2 rules. + Only the first rule is executed(Launching App3 closes App1). + +@SYMTestExpectedResults The test verifies that that when an application is launched, + the rule based mechanism is invoked and only the corresponding rule executed. + +*/ +void CTRuleBasedLaunchingStep::LaunchAppTests2L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 2 started")); + + TEST(AppLaunchedL(aLs, KUidApp1) == KErrNone); + TEST(AppLaunchedL(aLs, KUidApp2) == KErrNone); + TEST(AppLaunchedL(aLs, KUidApp3) == KErrNone); + + TApaTaskList taskList(iWs); + + //Wait 2sec for App1 to be closed + User::After(2 * 1000000); + + // App1 should be closed when App3 is launched + const TApaTask task1 = taskList.FindApp(KUidApp1); + TEST(!task1.Exists()); + const TApaTask task2 = taskList.FindApp(KUidApp2); + TEST(task2.Exists()); + const TApaTask task3 = taskList.FindApp(KUidApp3); + TEST(task3.Exists()); + + // Close all apps + ClosedAllTestApp(); + + INFO_PRINTF1(_L("Test case 2 finished")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0025 +@SYMPREQ PREQ1122 +@SYMTestCaseDesc Rule Based Launching of Applications +@SYMTestPriority High +@SYMTestStatus Implemented + +@SYMTestActions The test utilises 2 test applications that simply display the appication name. + Only the first rule is executed(A running App3 prevents App1 launching). + Only the second rule is executed(App1 cannot launch if App3 is running). + +@SYMTestExpectedResults The test verifies that multiple rules can be implemented in a single plugin and + only the correct rule is executed. + +*/ +void CTRuleBasedLaunchingStep::LaunchAppTests3L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 3 started")); + + // App1 cannot be launched if App3 is running + TEST(AppLaunchedL(aLs, KUidApp2) == KErrNone); + TEST(AppLaunchedL(aLs, KUidApp3) == KErrNone); + TEST(AppLaunchedL(aLs, KUidApp1) == KErrCancel); + + TApaTaskList taskList(iWs); + + const TApaTask task1 = taskList.FindApp(KUidApp1); + TEST(!task1.Exists()); + const TApaTask task2 = taskList.FindApp(KUidApp2); + TEST(task2.Exists()); + const TApaTask task3 = taskList.FindApp(KUidApp3); + TEST(task3.Exists()); + + // Close all apps + ClosedAllTestApp(); + + INFO_PRINTF1(_L("Test case 3 finished")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0026 +@SYMPREQ PREQ1122 +@SYMTestCaseDesc Rule Based Launching of Applications +@SYMTestPriority High +@SYMTestStatus Implemented + +@SYMTestActions The test utilises 3 test applications that simply display the appication name. + The test utilises 2 plugins. + Rules from both plugins are executed. + Plugin1 (Launching App4 closes App2) + Plugin2 (Launching App4 closes App3) + +@SYMTestExpectedResults The test verifies that multiple rules can be implemented in multiple plugins and + only the correct rules are executed. +*/ +void CTRuleBasedLaunchingStep::LaunchAppTests4L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 4 started")); + + // App2 and App3 are closed if App4 is launched + TEST(AppLaunchedL(aLs, KUidApp3) == KErrNone); + TEST(AppLaunchedL(aLs, KUidApp2) == KErrNone); + TEST(AppLaunchedL(aLs, KUidApp4) == KErrNone); + + TApaTaskList taskList(iWs); + + //Wait 2sec for App2 and App3 to be closed + User::After(2 * 1000000); + + const TApaTask task2 = taskList.FindApp(KUidApp2); + TEST(!task2.Exists()); + const TApaTask task3 = taskList.FindApp(KUidApp3); + TEST(!task3.Exists()); + const TApaTask task4 = taskList.FindApp(KUidApp4); + TEST(task4.Exists()); + + // Close all apps + ClosedAllTestApp(); + + INFO_PRINTF1(_L("Test case 4 finished")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0027 +@SYMPREQ PREQ1122 +@SYMTestCaseDesc Rule Based Launching of Applications +@SYMTestPriority High +@SYMTestStatus Implemented + +@SYMTestActions The test cases is similar to APPFWK-APPARC-0025 but it launching applications + via associated documents. + +@SYMTestExpectedResults The test verifies that multiple rules can be implemented in a single plugin and + only the correct rule is executed. + +*/ +void CTRuleBasedLaunchingStep::LaunchAppTests5L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 5 started")); + + // App1 cannot be launched if App3 is running + TEST(LaunchAppFromAssociatedDocument(aLs, KUidApp2) == KErrNone); + TEST(LaunchAppFromAssociatedDocument(aLs, KUidApp3) == KErrNone); + // Wait 2sec for App2 and App3 to be closed + User::After(2 * 1000000); + TEST(LaunchAppFromAssociatedDocument(aLs, KUidApp1) == KErrCancel); + + TApaTaskList taskList(iWs); + + const TApaTask task1 = taskList.FindApp(KUidApp1); + TEST(!task1.Exists()); + const TApaTask task2 = taskList.FindApp(KUidApp2); + TEST(task2.Exists()); + const TApaTask task3 = taskList.FindApp(KUidApp3); + TEST(task3.Exists()); + + // Close all apps + ClosedAllTestApp(); + + INFO_PRINTF1(_L("Test case 5 finished")); + } + +/** +@SYMTestCaseID APPFWK-APPARC-0028 +@SYMPREQ PREQ1122 +@SYMTestCaseDesc Rule Based Launching of Applications +@SYMTestPriority High +@SYMTestStatus Implemented + +@SYMTestActions The test case launches an applications where file name defined whether without extension or + disk drive, or as non system path. + +@SYMTestExpectedResults Rule based framework has to process this name correctly and apply pre-defined rules. + +*/ +void CTRuleBasedLaunchingStep::LaunchAppTests6L(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Test case 6 started")); + + TPtrC arFileName[] = { _L("tRuleBasedApp1.exe"), + _L("\\sys\\bin\\tRuleBasedApp1.exe"), + _L("\\nonsys\\bin\\tRuleBasedApp1.exe"), + _L("\\sys\\bin\\tRuleBasedApp1"), + _L("tRuleBasedApp1"), + }; + TInt sizeOfFileNameArray = sizeof(arFileName) / sizeof(arFileName[0]); + + for(TInt ii = 0; ii < sizeOfFileNameArray; ii++) + { + TEST(LaunchAppFromAssociatedDocument(aLs, KUidApp3) == KErrNone); + TEST(AppLaunchedL(aLs, arFileName[ii]) == KErrCancel); + + TApaTaskList taskList(iWs); + + const TApaTask task1 = taskList.FindApp(KUidApp1); + TEST(!task1.Exists()); + const TApaTask task3 = taskList.FindApp(KUidApp3); + TEST(task3.Exists()); + if(task1.Exists() || !task3.Exists()) + { + INFO_PRINTF2(_L("The name %S is not recognized by rule based plug-ins as a valid"), &arFileName[ii]); + } + + // Close all apps + ClosedAllTestApp(); + } + + INFO_PRINTF1(_L("Test case 6 finished")); + } + +/** +The function is used to launch an app whose UID is supplied as its second input parameter. +The function returns KErrNone upon success, KErrGeneral otherwise. +*/ +TInt CTRuleBasedLaunchingStep::AppLaunchedL(RApaLsSession& aLs, const TUid& aAppUid) + { + TApaAppInfo info; + TFileName fileName; + aLs.GetAppInfo(info,aAppUid); + //Wait 0.5sec for function to complete + User::After(500000); + fileName = info.iFullName; + CApaCommandLine* cmdLn = CApaCommandLine::NewLC(); + cmdLn->SetExecutableNameL(fileName); + TInt result = aLs.StartApp(*cmdLn); + //Wait 0.5sec for App to start + User::After(500000); + CleanupStack::PopAndDestroy(cmdLn); + return result; + } + +/** +The function is used to launch an application using full file name as param. +*/ +TInt CTRuleBasedLaunchingStep::AppLaunchedL(RApaLsSession& aLs, const TDesC& aAppFullFileName) + { + CApaCommandLine* cmdLn = CApaCommandLine::NewLC(); + cmdLn->SetExecutableNameL(aAppFullFileName); + TInt result = aLs.StartApp(*cmdLn); + //Wait 0.5sec for App to start + User::After(500000); + CleanupStack::PopAndDestroy(cmdLn); + return result; + } + +/** +The function is used to launch an application via dummy document associated with this application. +*/ +TInt CTRuleBasedLaunchingStep::LaunchAppFromAssociatedDocument(RApaLsSession& aLs,const TUid& aAppUid) + { + TDataType theDataType(aAppUid); + TThreadId theThreadId; + TInt result = aLs.StartDocument(KNullDesC, theDataType, theThreadId); + //Wait 2sec for App to start + User::After(2 * 1000000); + return result; + } + +/** +The function is used to close an app whose UID is supplied as the input parameter. +The function returns KerrNone upon success, KErrGeneral othewise. +*/ +TInt CTRuleBasedLaunchingStep::AppClosed(TUid AppUid) + { + TInt result = KErrNone; + TApaTaskList taskList(iWs); + TApaTask task1 = taskList.FindApp(AppUid); + if(task1.Exists()) + { + task1.EndTask(); + //Wait 0.5sec for the App to close + User::After(500000); + + const TApaTask task2 = taskList.FindApp(AppUid); + if (task2.Exists()) + { + result = KErrGeneral; + } + } + return result; + } + +/** The function close all test applications */ +void CTRuleBasedLaunchingStep::ClosedAllTestApp() + { + AppClosed(KUidApp1); + AppClosed(KUidApp2); + AppClosed(KUidApp3); + AppClosed(KUidApp4); + } + +TVerdict CTRuleBasedLaunchingStep::doTestStepL() + { + INFO_PRINTF1(_L("TRuleBasedLaunchingStep test started....")); + + User::LeaveIfError(FbsStartup()); + TInt ret=RFbsSession::Connect(); + + User::LeaveIfError(iFs.Connect()); + User::LeaveIfError(iWs.Connect()); + + TEST(ret==KErrNone); + __UHEAP_MARK; + TRAPD(err, ExecuteL()); + TEST(err == KErrNone); + INFO_PRINTF2(_L("execute tests ended with return value '%d'"), err); + __UHEAP_MARKEND; + + RFbsSession::Disconnect(); + INFO_PRINTF1(_L(".... TRuleBasedLaunchingStep test finished!!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RuleBasedLaunchingStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_RuleBasedLaunchingStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,60 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if !defined(__T_RULEBASEDLAUNCHING_STEP_H__) +#define __T_RULEBASEDLAUNCHING_STEP_H__ + +#include +#include "ApparcTestServer.h" +#include "appfwk_test_AppUi.h" +#include + +class CTRuleBasedLaunchingStep : public CTestStep + { +public: + CTRuleBasedLaunchingStep(); + virtual TVerdict doTestStepL(); + void ExecuteL(); +private: + ~CTRuleBasedLaunchingStep(); + TInt AppLaunchedL(RApaLsSession& aLs, const TUid& AppUid); + TInt AppLaunchedL(RApaLsSession& aLs, const TDesC& aAppFullFileName); + TInt LaunchAppFromAssociatedDocument(RApaLsSession& aLs, const TUid& aAppUid); + TInt AppClosed(TUid AppUid); + void ClosedAllTestApp(); + + void TestLaunchNonNativeApplicationForRuleBasedL(RApaLsSession& aApparcServer); + void LaunchAppTests1L(RApaLsSession& aLs); + void LaunchAppTests2L(RApaLsSession& aLs); + void LaunchAppTests3L(RApaLsSession& aLs); + void LaunchAppTests4L(RApaLsSession& aLs); + void LaunchAppTests5L(RApaLsSession& aLs); + void LaunchAppTests6L(RApaLsSession& aLs); +private: + RFs iFs; + RWsSession iWs; + }; + +_LIT(KT_RuleBasedLaunchingStep,"T_RuleBasedLaunching"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv2Step.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv2Step.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1828 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test wrapper to Application Architecture Server. +// Tests Application information, Data recognition and application +// launching capabilities of the application architecture server.\n +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include "testableapalssession.h" +#include +#include +#include +#include +#include +#include +#include "tstapp.h" +// +#include +#include "T_Serv2Step.h" + +#include +#include +#include "TAppEmbedUids.h" +#include "appfwk_test_utils.h" + +// Constants +const TInt KOneSecondDelay = 1000000; + + +/** + This function accepts a filename with full path and searches all available + drives for the presence of file. + The method returns Filename if a match is found. +*/ +TFileName CT_Serv2Step::SearchAndReturnCompleteFileName(const TDesC& aFileName) + { + RFs fs; + TInt ret = fs.Connect(); + TEST(ret==KErrNone); + + TParsePtrC parse(aFileName); + TFindFile findFile(fs); + ret = findFile.FindByDir(parse.NameAndExt(), parse.Path()); + if (ret!=KErrNone) + { + TBuf<64> buffer; + buffer.Format(_L("Error while finding the file, %d"), ret); + } + fs.Close(); + return findFile.File(); + } + + +/** + @SYMTestCaseID T-Serv2Step-AppInfoTest1 + + @SYMPREQ + + @SYMTestCaseDesc Test RApaLsSession::GetNextApp() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAllApps() to initialize the process of + getting all applications in the cached list. Traverse the application list + by calling RApaLsSession::GetNextApp() to search for application tstapp. + Test the application info obtained from GetNextApp() to ensure the application + info obtained is of tstapp. Complete traversal of the list to ensure that at + the end of the list, the enum ENoMoreAppInList is returned by GetNextApp().\n + API Calls:\n + RApaLsSession::GetAllApps() const\n + RApaLsSession::GetNextApp(TApaAppInfo& aInfo) const\n + + @SYMTestExpectedResults The test compares the results obtained with expected values. + + */ +void CT_Serv2Step::AppInfoTest1(RApaLsSession& aLs) + { + _LIT(KLitAppPath,"z:\\sys\\bin\\tstapp.exe"); + TFullName appPath(KLitAppPath); + //Search for TestApp + TApaAppInfo info; + TInt ret = aLs.GetAllApps(); + TEST(ret==KErrNone); + + do + { + ret=aLs.GetNextApp(info); + } + while (ret==KErrNone && info.iUid!=KUidTestApp); + + TEST(ret==KErrNone); + info.iFullName.LowerCase(); + TEST(info.iFullName.Compare(appPath) == 0); + + //Make sure ENoMoreAppsInList is returned at the end of list. + do + { + ret=aLs.GetNextApp(info); + } + while (ret != RApaLsSession::ENoMoreAppsInList); + + ret=aLs.GetNextApp(info); + TEST(ret==RApaLsSession::ENoMoreAppsInList); + } + + +/** + @SYMTestCaseID T-Serv2Step-DoCheckServerIconLoadingBySizeL + + @SYMPREQ + + @SYMTestCaseDesc Test loading of Icon by size. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Allocate a flat dynamic buffer which would hold available icon + sizes for tstapp. Call RApaLsSession::GetAppIconSizes() to store the sizes + of icons available for the app tstapp to the allocated flat dynamic buffer. + Call RApaLsSession::GetAppIcon() by passing each of the icon sizes stored. + Verify whether icon is retrieved each time by GetAppIcon(). + Test calling RApaLsSession::GetAppIcon() by specifying reduced size than + the actual icon size. Since no match would be found, KErrNotFound should be + returned. Test GetAppIcon() again by specifying an increased size than the + actual icon size. Observe whether the GetAppIcon() in this case gets the + closest icon available.\n + API Calls:\n + RApaLsSession::GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults The results obtained are compared with the expected values to verify + functionality of RApaLsSession::GetAppIcon(). + + */ +void CT_Serv2Step::DoCheckServerIconLoadingBySizeL(RApaLsSession& aLs) + { + CArrayFixFlat* array=new(ELeave) CArrayFixFlat(3); + CleanupStack::PushL(array); + TInt ret=KErrNone; + ret=aLs.GetAppIconSizes(KUidTestApp,*array); + if(ret==KErrNoMemory) + User::Leave(KErrNoMemory); + TEST(ret==KErrNone); + TEST(array->Count()); + for(TInt i=0;iCount();i++) + { + CApaMaskedBitmap* iconBySize=CApaMaskedBitmap::NewLC(); + ret=aLs.GetAppIcon(KUidTestApp,(*array)[i],*iconBySize); //by Size + if(ret==KErrNoMemory) + User::Leave(KErrNoMemory); + TEST(ret==KErrNone); + TEST(iconBySize->SizeInPixels()==(*array)[i]); + CleanupStack::PopAndDestroy(); //iconBySize + } + + // now try non exact sizes + CApaMaskedBitmap* iconBySize=CApaMaskedBitmap::NewLC(); + ret=aLs.GetAppIcon(KUidTestApp,((*array)[0])+TSize(-5,-5),*iconBySize); //by Size + if(ret==KErrNoMemory) + User::Leave(KErrNoMemory); + TEST(ret==KErrNotFound); + CleanupStack::PopAndDestroy(); //iconBySize + + for(TInt ii=0;iiCount();ii++) + { + CApaMaskedBitmap* iconBySize=CApaMaskedBitmap::NewLC(); + ret=aLs.GetAppIcon(KUidTestApp,((*array)[ii])+TSize(5,5),*iconBySize); //by Size + if(ret==KErrNoMemory) + User::Leave(KErrNoMemory); + TEST(ret==KErrNone); + TEST(iconBySize->SizeInPixels()==(*array)[ii]); // should get size below always!!! + CleanupStack::PopAndDestroy(); //iconBySize + } + CleanupStack::PopAndDestroy(); //array + } + + +/** + @SYMTestCaseID T-Serv2Step-AppInfoTest3 + + @SYMPREQ + + @SYMTestCaseDesc Test RApaLsSession::GetNextApp() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAllApps() to initialize the process of + getting all applications in the cached list. Traverse the application list + by calling RApaLsSession::GetNextApp() to search for application tstapp. + Test the application information obtained from GetNextApp() to ensure that + information retrieved is of tstapp.\n + API Calls:\n + RApaLsSession::GetAllApps() const\n + RApaLsSession::GetNextApp(TApaAppInfo& aInfo) const\n + + @SYMTestExpectedResults The test compares the results obtained with expected values. + + */ +void CT_Serv2Step::AppInfoTest3(RApaLsSession& aLs) + { + _LIT(KLitAppPath,"z:\\sys\\bin\\tstapp.exe"); + TFullName appPath(KLitAppPath); + // get the first app... + TApaAppInfo info; + TInt ret = aLs.GetAllApps(); + TEST(ret==KErrNone); + + do + { + aLs.GetNextApp(info); + } + while (info.iUid!=KUidTestApp); + + TEST(ret==KErrNone); + TEST(info.iUid==KUidTestApp); + info.iFullName.LowerCase(); + TEST(info.iFullName.Compare(appPath) == 0); + } + + +/** + @SYMTestCaseID T-Serv2Step-AppInfoTest4 + + @SYMPREQ + + @SYMTestCaseDesc Test RApaLsSession::GetAppInfo(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAppInfo() by passing the Uid of test + application tstapp and test the application info obtained from GetAppInfo() + to ensure the obtained information is of test application tstapp.\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms that RApaLsSession::GetAppInfo() + returns the expected application info. + + */ +void CT_Serv2Step::AppInfoTest4(RApaLsSession& aLs) + { + _LIT(KLitAppPath,"z:\\sys\\bin\\tstapp.exe"); + TFullName appPath(KLitAppPath); + // Get info for an app that exists + TApaAppInfo info; + TInt ret = aLs.GetAppInfo(info,KUidTestApp); + TEST(ret==KErrNone); + TEST(info.iUid==KUidTestApp); + info.iFullName.LowerCase(); + TEST(info.iFullName.Compare(appPath) == 0); + } + + +/** + @SYMTestCaseID T-Serv2Step-AppInfoTest5 + + @SYMPREQ + + @SYMTestCaseDesc Test if RApaLsSession::GetAppInfo() return KErrNotFound. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The method calls RApaLsSession::GetAppInfo() by passing the null Uid + KNullUid. Observe whether KErrNotFound is returned when Uid that doesn't match + is passed to GetAppInfo().\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms RApaLsSession::GetAppInfo() returns + KErrNotFound when no match is found for the Uid passed.\n + + */ +void CT_Serv2Step::AppInfoTest5(RApaLsSession& aLs) + { + // get info for a non-existant app + TApaAppInfo info; + TInt ret = aLs.GetAppInfo(info,KNullUid); + TEST(ret==KErrNotFound); + } + + +/** + Auxiliary Fn for Test Case ID T-Serv2Step-AppInfoTest1, T-Serv2Step-AppInfoTest3, T-Serv2Step-AppInfoTest4, T-Serv2Step-AppInfoTest5 + + This function initiates test for retrieving Application Information. + +*/ +void CT_Serv2Step::DoAppInfoTests(RApaLsSession& aLs) + { + AppInfoTest1(aLs); + AppInfoTest3(aLs); + AppInfoTest4(aLs); + AppInfoTest5(aLs); + } + + +/** + @SYMTestCaseID T-Serv2Step-StartAppTests1L + + @SYMPREQ + + @SYMTestCaseDesc Test Launching of an application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Prepare command line information to start an application using + CApaCommandLine Apis.Call RApaLsSession::StartApp() to start an + application defined by the command line information.\n + Test the launching of application for following scenarios:\n + (1) When Application specified by command line exists.\n + (2) When Application specified by command line does not exist.\n + API Calls:\n + RApaLsSession::StartApp(const CApaCommandLine& aCommandLine)\n + + @SYMTestExpectedResults The test observes that StartApp() returns KErrNone and + starts the app in the first scenario. In the second case KErrNotFound is + returned. + + */ +void CT_Serv2Step::StartAppTests1L(RApaLsSession& aLs) +{ + CApaCommandLine* cmdLn=CApaCommandLine::NewLC(); + TFileName filename; + _LIT(KLitExePath,"\\sys\\bin\\texe.exe"); + TFullName exePath(KLitExePath); + filename = SearchAndReturnCompleteFileName(exePath); + + _LIT8(KLitDogfish,"dogfish"); + _LIT(KLitWibble,"wibble"); + cmdLn->SetExecutableNameL(filename); + cmdLn->SetTailEndL(KLitDogfish); + TInt ret = aLs.StartApp(*cmdLn); // explicit + TEST(ret==KErrNone); + + // start a non-existant app + cmdLn->SetExecutableNameL(KLitWibble); + ret = aLs.StartApp(*cmdLn); + TEST(ret==KErrNotFound); + // + // + CleanupStack::PopAndDestroy(); // cmdLn + +} + +/** + * @SYMTestCaseID T_Serv2Step_StartAppTests4L + * + * @SYMPREQ + * + * @SYMTestCaseDesc Test Launching of an application. + * + * @SYMTestActions Call RApaLsSession::StartDocument() to start an + * application defined by the command line information.\n + * Test the launching of application for following scenarios:\n + * (1) When Application specified by command line is EmbeddableOnly.\n + * (2) When Application specified by command line is EmbeddableUiNotStandAlone.\n + * (3) When Application specified by command line is Embeddable or StandAlone.\n + * API Calls:\n + * RApaLsSession::StartDocument(const TDesC &aFileName, TUid aAppUid, TThreadId &aId, TLaunchType aLaunchType=ELaunchNewApp)\n + * + * @SYMTestExpectedResults The test observes that StartDocument() returns KErrNone and + * starts the app in the third scenario. In the first and second case KErrNotSupported is + * returned. + * + */ + +void CT_Serv2Step::StartAppTests4L(RApaLsSession& aLs) + { + TInt ret; + TThreadId id; + + _LIT(KLitSdkDocPath,"\\system\\data\\sdk.txt"); + TFileName filename = SearchAndReturnCompleteFileName(KLitSdkDocPath); + + // Test starting a file using an app which can be embeddable only. + ret=aLs.StartDocument(filename,KUidAppEmbeddableUiNotStandAlone,id); + TEST(ret==KErrNotSupported); + + // Test starting a file using an app which can be embeddable only. + ret=aLs.StartDocument(filename,KUidAppEmbeddableOnly,id); + TEST(ret==KErrNotSupported); + + // Test starting a file using an app which can be embeddable or standalone. + ret=aLs.StartDocument(filename,KUidAppEmbeddable,id); + TEST(ret==KErrNone); + } + +/** +* Auxiliary Fn for Test Case ID T_Serv2Step_StartAppTests1L, T_Serv2Step_StartAppTests3L,StartAppTests4L(aLs) +* +* This method tests launching of an application from command line by calling +* CT_Serv2Step::StartAppTests1L(). +* +*/ +void CT_Serv2Step::DoStartAppTestsL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Checking application launching")); + + // start the test exe + StartAppTests1L(aLs); + StartAppTests4L(aLs); + } + +/** + @SYMTestCaseID T-Serv2Step-DoEnquiryTestsL + + @SYMPREQ + + @SYMTestCaseDesc Tests querying of data (MIME) type information. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test setting and getting the confidence threshold for + successful data recognition by calling RApaLsSession::SetAcceptedConfidence() + and RApaLsSession::GetAcceptedConfidence().\n + Test setting and getting maximum size of the data that can be read + from a file for the purpose of recognizing the data type by calling + RApaLsSession::SetMaxDataBufSize() and RApaLsSession::GetMaxDataBufSize(). + Finally test retrieval of all supported data (MIME) types.\n + API Calls:\n + RApaLsSession::SetAcceptedConfidence(TInt aConfidence)\n + RApaLsSession::GetAcceptedConfidence(TInt& aConfidence) const\n + RApaLsSession::SetMaxDataBufSize(TInt aBufSize)\n + RApaLsSession::GetMaxDataBufSize(TInt& aBufSize) const\n + RApaLsSession::GetSupportedDataTypesL(CDataTypeArray& aDataTypes) const\n + + @SYMTestExpectedResults Test results against expected values. + + */ +void CT_Serv2Step::DoEnquiryTestsL(RApaLsSession& aLs) + { + TInt temp=1234; + TInt ret; + TSecurityInfo info; + info.Set(RProcess()); + + TBool hasCapability=info.iCaps.HasCapability(ECapabilityWriteDeviceData); + + if(hasCapability) + { + ret=aLs.SetAcceptedConfidence(temp); + INFO_PRINTF2(_L(" Error= %d \n"),ret); + TEST(ret==KErrNone); + } + else + { + ret=aLs.SetAcceptedConfidence(temp); + INFO_PRINTF2(_L(" Error= %d \n"),ret); + TEST(ret==KErrPermissionDenied); + } + temp=0; + ret=aLs.GetAcceptedConfidence(temp); + TEST(ret==KErrNone); + TEST(temp==1234); + ret=aLs.SetMaxDataBufSize(temp); + TEST(ret==KErrNone); + temp=0; + ret=aLs.GetMaxDataBufSize(temp); + CDataTypeArray* dataTypes=new(ELeave) CDataTypeArray(5); + CleanupStack::PushL(dataTypes); + TInt err=0; + TInt failRate=0; + for (failRate=1;failRate<=KMaxTInt;failRate++) + { + __UHEAP_RESET; + __UHEAP_SETFAIL(RHeap::EFailNext,failRate); + TRAP(err, ret=aLs.GetSupportedDataTypesL(*dataTypes)); + if (err!=KErrNoMemory) + { + if (err==KErrNone) + { + err=ret; + } + break; + } + } + __UHEAP_RESET; + TEST(ret==KErrNone); + TEST(err==KErrNone); + TEST(dataTypes->Count()>=4); + CleanupStack::PopAndDestroy(); // dataTypes + } + +/** + @SYMTestCaseID T-Serv2-DoGetAllApps + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Check that RApaLsSession::GetAllApps() hasn't been + affected by the new code to filter the app list + based on embeddability (implemented for CR PHAR-5Q4FX8) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetAllApps() once, followed by repeated calls + to GetNextApp until something other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for the following test apps: + TAppNotEmbeddable.app + TAppEmbeddable.app + TAppEmbeddableOnly.app + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetAllApps(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetAllApps")); + + TInt ret = aLs.GetAllApps(); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x1F); + } + + +/* + @SYMTestCaseID T-Serv2-LaunchAppThruCreateDocL + + @SYMTestCaseDesc + Check for the functionality of RApaLsSession::CreateDocument(). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId) + + @SYMTestExpectedResults + Verify whether the Application is launched and Document is created for the respective + Application UID passed. +*/ + +void CT_Serv2Step::LaunchAppThruCreateDocL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("LaunchAppThruCreateDocL")); + _LIT(KFileName, "c:\\nofile.txt"); + TThreadId startAppThreadID; + TInt errCreate=aLs.CreateDocument(KFileName,KUidAppEmbeddable,startAppThreadID); + TEST(errCreate == KErrNone); + + //we need to close the started thread, if appropiate + if (errCreate==KErrNone) + { + RThread thread; + User::LeaveIfError(thread.Open(startAppThreadID)); + CleanupClosePushL(thread); + + RProcess process; + User::LeaveIfError(thread.Process(process)); + CleanupClosePushL(process); + + process.Kill(0); + + CleanupStack::PopAndDestroy(&process); + CleanupStack::PopAndDestroy(&thread); + } + + } + +/** + @SYMTestCaseID T-Serv2-DoGetEmbeddableApps + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Check that RApaLsSession::GetEmbeddableApps() hasn't been + affected by the new code to filter the app list + based on embeddability (implemented for CR PHAR-5Q4FX8) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetEmbeddableApps() once, followed by repeated calls + to GetNextApp until something other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for the following test apps: + TAppEmbeddable.app + TAppEmbeddableOnly.app + and should not return app info for: + TAppNotEmbeddable.app + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetEmbeddableApps(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetEmbeddableApps")); + + TInt ret = aLs.GetEmbeddableApps(); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x06); + } + +/** + @SYMTestCaseID T-Serv2-DoEmbeddableAppCount + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + The number of apps returned by GetEmbeddableApps should be the + same as EmbeddableAppCount returns. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Count the number of apps returned by calling GetEmbeddableApps + followed by repeated calls to GetNextApp. + Count the number of apps returned by EmbeddableAppCount. + + @SYMTestExpectedResults + The counts should be equal. + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoEmbeddableAppCount(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoEmbeddableAppCount")); + + TInt ret = aLs.GetEmbeddableApps(); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TInt count1 = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + count1 ++; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + TInt count2 = 0; + ret = aLs.EmbeddableAppCount(count2); + TEST(ret==KErrNone); + + TEST(count1 == count2); + } + +/** + @SYMTestCaseID T-Serv2-DoGetAppCapability + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Confirm that the application embeddability value that a specific app + defines in it's AIF file, matches the value returned by + RApaLsSession::GetAppCapability. + Check that this is true for all supported embeddability values + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetAppCapability for each of the following test apps: + TAppNotEmbeddable.app + TAppEmbeddable.app + TAppEmbeddableOnly.app + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + + @SYMTestExpectedResults + For each app, GetAppCapability should return the embeddability value + defined in the application's AIF file. + + */ +void CT_Serv2Step::DoGetAppCapability(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetAppCapability")); + + TApaAppCapabilityBuf capabilityBuf; + TInt ret; + const TInt numberOfCapabilities = 5; + TUid uidArray[numberOfCapabilities]; + uidArray[0] = KUidAppNotEmbeddable; + uidArray[1] = KUidAppEmbeddable; + uidArray[2] = KUidAppEmbeddableOnly; + uidArray[3] = KUidAppEmbeddableUiOrStandAlone; + uidArray[4] = KUidAppEmbeddableUiNotStandAlone; + + const TApaAppCapability::TEmbeddability embeddabilityArray[numberOfCapabilities] + = { TApaAppCapability::ENotEmbeddable, + TApaAppCapability::EEmbeddable, + TApaAppCapability::EEmbeddableOnly, + TApaAppCapability::EEmbeddableUiOrStandAlone, + TApaAppCapability::EEmbeddableUiNotStandAlone }; + + for (TInt ii = 0; ii < numberOfCapabilities; ii++) + { + ret = aLs.GetAppCapability(capabilityBuf, uidArray[ii]); + TEST(ret==KErrNone); + TEST(capabilityBuf().iEmbeddability == embeddabilityArray[ii]); + } + } + +/** + @SYMTestCaseID T-Serv2-DoGetFilteredApps1 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Passing an empty filter to RApaLsSession::GetFilteredApps + should cause no apps to be returned by subsequent calls + to RApaLsSession::GetNextApp + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a default constructed filter, + followed by a single call to GetNextApp + + @SYMTestExpectedResults + GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetFilteredApps1(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetFilteredApps1")); + + TApaEmbeddabilityFilter filter; + TInt ret = aLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TEST(aLs.GetNextApp(appInfo) == RApaLsSession::ENoMoreAppsInList); + } + +/** + @SYMTestCaseID T-Serv2-DoGetFilteredApps2 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Passing a filter specifying only ENotEmbeddable + to RApaLsSession::GetFilteredApps should cause subsequent + calls to RApaLsSession::GetNextApp to return only + applications which cannot be embedded + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing ENotEmbeddable, + followed by repeated calls to GetNextApp until something other than + KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for only the following test app: + TAppNotEmbeddable.app + and should not return app info for: + TAppEmbeddable.app + TAppEmbeddableOnly.app + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetFilteredApps2(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetFilteredApps2")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + TInt ret = aLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x01); + } + +/** + @SYMTestCaseID T-Serv2-DoGetFilteredApps3 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + EEmbeddableUiOrStandAlone (value 5) shares a bit flag (bit 1) + with EEmbeddable (value 1). + Confirm that a filter of EEmbeddableUiOrStandAlone only returns + apps that define EEmbeddableUiOrStandAlone + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing EEmbeddableUiOrStandAlone, + followed by repeated calls to GetNextApp until something other than + KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for only the following test app: + TAppEmbeddableUiOrStandAlone.app + and should not return app info for: + TAppEmbeddable.app + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetFilteredApps3(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetFilteredApps3")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + TInt ret = aLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x08); + } + +/** + @SYMTestCaseID T-Serv2-DoGetFilteredApps4 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + A filter specifying two embeddability values should + include apps of either embeddability + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing EEmbeddableUiOrStandAlone + and EEmbeddableUiNotStandAlone followed by repeated calls to GetNextApp + until something other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should return app info for only the following test apps: + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + and should not return app info for: + TAppNotEmbeddable.app + TAppEmbeddable.app + TAppEmbeddableOnly.app + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetFilteredApps4(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetFilteredApps4")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + TInt ret = aLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0x18); + } + +/** + @SYMTestCaseID T-Serv2-DoGetFilteredApps5 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Getting apps using a filter specifying all embeddability values + should return the same number of apps as RApaLsSession::GetAllApps() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing all embeddability values, + and count the number of calls to GetNextApp until something other than + KErrNone is returned. + Then call GetAllApps and count the number of calls to GetNextApp until + something other than KErrNone is returned. + + @SYMTestExpectedResults + The two counts should be equal. + The last call in each sequence of calls to GetNextApp should return + RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetFilteredApps5(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetFilteredApps5")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + TInt ret = aLs.GetFilteredApps(filter); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TInt filteredCount = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + filteredCount++; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + ret = aLs.GetAllApps(); + TEST(ret==KErrNone); + + TInt allAppsCount = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + allAppsCount++; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + + TEST(filteredCount == allAppsCount); + } + +/** + @SYMTestCaseID T-Serv2-DoGetFilteredApps6 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + None of the following embeddability test apps support + screen mode 1, so none of them should be returned even + if the filter specifies all embeddability types. + TAppNotEmbeddable.app + TAppEmbeddable.app + TAppEmbeddableOnly.app + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Call GetFilteredApps passing a filter containing all embeddability values + and screen mode 1, followed by repeated calls to GetNextApp until something + other than KErrNone is returned + + @SYMTestExpectedResults + GetNextApp should not return app info for any of the following test apps: + TAppNotEmbeddable.app + TAppEmbeddable.app + TAppEmbeddableOnly.app + TAppEmbeddableUiOrStandAlone.app + TAppEmbeddableUiNotStandAlone.app + The last call to GetNextApp should return RApaLsSession::ENoMoreAppsInList + + */ +void CT_Serv2Step::DoGetFilteredApps6(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("DoGetFilteredApps6")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone); + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + const TInt screenMode1 = 1; + TInt ret = aLs.GetFilteredApps(filter, screenMode1); + TEST(ret==KErrNone); + + TApaAppInfo appInfo; + TUint bitFlags = 0; + while ((ret = aLs.GetNextApp(appInfo)) == KErrNone) + { + if (appInfo.iUid == KUidAppNotEmbeddable) + bitFlags |= 0x01; + else if (appInfo.iUid == KUidAppEmbeddable) + bitFlags |= 0x02; + else if (appInfo.iUid == KUidAppEmbeddableOnly) + bitFlags |= 0x04; + else if (appInfo.iUid == KUidAppEmbeddableUiOrStandAlone) + bitFlags |= 0x08; + else if (appInfo.iUid == KUidAppEmbeddableUiNotStandAlone) + bitFlags |= 0x10; + } + TEST(ret==RApaLsSession::ENoMoreAppsInList); + TEST(bitFlags == 0); + } + +/** + @SYMTestCaseID T-Serv2-DoTestEmbeddabilityFilter1 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Ensure default constructed TApaEmbeddabilityFilter object is + initialized correctly. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object and call + MatchesEmbeddability using each of the following embeddability values: + TApaAppCapability::ENotEmbeddable + TApaAppCapability::EEmbeddable + TApaAppCapability::EEmbeddableOnly + TApaAppCapability::EEmbeddableUiOrStandAlone + TApaAppCapability::EEmbeddableUiNotStandAlone + + @SYMTestExpectedResults + All calls to MatchesEmbeddability should return false. + + */ +void CT_Serv2Step::DoTestEmbeddabilityFilter1() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter1")); + + TApaEmbeddabilityFilter filter; + TEST(!filter.MatchesEmbeddability(TApaAppCapability::ENotEmbeddable)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddable)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableOnly)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableUiOrStandAlone)); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone)); + } + +/** + @SYMTestCaseID T-Serv2-DoTestEmbeddabilityFilter2 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Bit 2 is used by both EEmbeddableUiNotStandAlone and EEmbeddableOnly. + Make sure that setting the filter to only EEmbeddableUiNotStandAlone + doesn't match EEmbeddableOnly. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to only EEmbeddableUiNotStandAloneand + and call MatchesEmbeddability passing EEmbeddableOnly + + @SYMTestExpectedResults + MatchesEmbeddability should return false. + + */ +void CT_Serv2Step::DoTestEmbeddabilityFilter2() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter2")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableOnly)); + } + +/** + @SYMTestCaseID T-Serv2-DoTestEmbeddabilityFilter3 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Bit 2 is used by both EEmbeddableUiNotStandAlone and EEmbeddableOnly. + Make sure that setting the filter to only EEmbeddableOnly + doesn't match EEmbeddableUiNotStandAlone. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to only EEmbeddableOnly + and call MatchesEmbeddability passing EEmbeddableUiNotStandAlone + + @SYMTestExpectedResults + MatchesEmbeddability should return false. + + */ +void CT_Serv2Step::DoTestEmbeddabilityFilter3() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter3")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddableOnly); + TEST(!filter.MatchesEmbeddability(TApaAppCapability::EEmbeddableUiNotStandAlone)); + } + +/** + @SYMTestCaseID T-Serv2-DoTestEmbeddabilityFilter4 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Ensure MatchesEmbeddability returns true when the filter only contains + the embeddability being matched. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to only EEmbeddable + and call MatchesEmbeddability passing EEmbeddable + + @SYMTestExpectedResults + MatchesEmbeddability should return true. + + */ +void CT_Serv2Step::DoTestEmbeddabilityFilter4() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter4")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + TEST(filter.MatchesEmbeddability(TApaAppCapability::EEmbeddable)); + } + +/** + @SYMTestCaseID T-Serv2-DoTestEmbeddabilityFilter5 + + @SYMPREQ PHAR-5Q4FX8 + + @SYMTestCaseDesc + Ensure MatchesEmbeddability returns true when the filter contains + a superset of the embeddability being matched. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + Construct a TApaEmbeddabilityFilter object, + set the filter to both ENotEmbeddable and EEmbeddable + and call MatchesEmbeddability passing EEmbeddable + + @SYMTestExpectedResults + MatchesEmbeddability should return true. + + */ +void CT_Serv2Step::DoTestEmbeddabilityFilter5() + { + INFO_PRINTF1(_L("DoTestEmbeddabilityFilter5")); + + TApaEmbeddabilityFilter filter; + filter.AddEmbeddability(TApaAppCapability::ENotEmbeddable); + filter.AddEmbeddability(TApaAppCapability::EEmbeddable); + TEST(filter.MatchesEmbeddability(TApaAppCapability::EEmbeddable)); + } + + +/** + @SYMTestCaseID T-Serv2Step-DoInterrogationTestsL + + @SYMPREQ + + @SYMTestCaseDesc Test interrogates the Application Architecture Server. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test Application Architecture Server's ability to:\n + (1) Retrieve list of all applications in the cache list by calling + RApaLsSession::GetAllApps().The test also calls RApaLsSession::AppCount() + to retrieve the number of applications in the list.\n + (2) Retrieve list of all embeddable applications from the cache list + by calling RApaLsSession::GetEmbeddableApps().The test also calls + RApaLsSession::EmbeddableAppCount() to retrieve the number of + embeddable applications in the list.\n + (3) Retrieve application information.\n + (4) Retrieve capability of an existing & non-existing application by + calling RApaLsSession::GetAppCapability().\n + (5) Check and retrieve Data (MIME) type information of data taken from a + specified file by calling RApaLsSession::RecognizeSpecificData(). + This is confirmed by taking data from the same file and checking + the data type information by calling RApaLsSession::RecognizeData().\n + (6) Retrieve application icon by calling RApaLsSession::GetAppIcon().\n + API Calls:\n + RApaLsSession::GetAllApps() const\n + RApaLsSession::AppCount(TInt& aCount) const\n + RApaLsSession::EmbeddableAppCount(TInt& aCount) const\n + RApaLsSession::GetEmbeddableApps() const\n + RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const\n + RApaLsSession::RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const\n + RApaLsSession::RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const\n + RApaLsSession::GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const\n + + @SYMTestExpectedResults All tests compare the results obtained with the desired result. + + */ +void CT_Serv2Step::DoInterrogationTestsL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Interogating the server")); + + TInt ret = aLs.GetAllApps(); // SC - test + TEST(ret==KErrNone); + + // get the full app count + TInt count=0; + ret = aLs.AppCount(count); + TEST(ret==KErrNone); + TEST(count>=1); + + // get the embedded app count + count=0; + ret = aLs.EmbeddableAppCount(count); + TEST(ret==KErrNone); + TEST(count>=1); + + // prepare to get a list of embeddable apps + ret = aLs.GetEmbeddableApps(); + TEST(ret==KErrNone); + DoAppInfoTests(aLs); + + // Get the capability of an app that exists + TApaAppCapabilityBuf buf; + ret = aLs.GetAppCapability(buf, KUidTestApp); + TEST(ret==KErrNone); + TApaAppCapability cap=buf(); + TEST(cap.iEmbeddability==TApaAppCapability::EEmbeddable); + TEST(!cap.iSupportsNewFile); + TEST(!cap.iAppIsHidden); + + // get the capability of a non-existant app + ret = aLs.GetAppCapability(buf, KNullUid); + TEST(ret==KErrNotFound); + + INFO_PRINTF1(_L("Checking data type information")); + TBool isText; + ret=aLs.RecognizeSpecificData(_L("a file name.txt"),_L8("Some plain text"),TDataType(_L8("text/plain")),isText); + TEST(ret==KErrNone); + TEST(isText); + TDataRecognitionResult result; + ret=aLs.RecognizeData(_L("a file name.txt"),_L8("Some plain text"),result); + TEST(ret==KErrNone); + TEST(result.iDataType==TDataType(_L8("text/plain"))); + TEST(result.iConfidence==CApaDataRecognizerType::EProbable); + isText=EFalse; + ret=aLs.RecognizeSpecificData(_L("a file name.txt"),_L8("Some plain text"),TDataType(_L8("foo/bar")),isText); + TEST(!isText); + + INFO_PRINTF1(_L("Checking icon loading by index")); + CApaMaskedBitmap* icon=CApaMaskedBitmap::NewLC(); + + TSize lastSize(0,0); + ret=aLs.GetAppIcon(KUidTestApp,0,*icon); + TEST(ret==KErrNone); + TEST(icon->SizeInPixels().iWidth*icon->SizeInPixels().iHeight > lastSize.iWidth*lastSize.iHeight); + lastSize=icon->SizeInPixels(); + + ret=aLs.GetAppIcon(KUidTestApp,1,*icon); + TEST(ret==KErrNone); + + TEST(icon->SizeInPixels().iWidth*icon->SizeInPixels().iHeight == lastSize.iWidth*lastSize.iHeight); + lastSize=icon->SizeInPixels(); + + ret=aLs.GetAppIcon(KUidTestApp,2,*icon); + TEST(ret==KErrNone); + TEST((icon->SizeInPixels().iWidth*icon->SizeInPixels().iHeight) > (lastSize.iWidth*lastSize.iHeight)); + lastSize=icon->SizeInPixels(); + + + TUid uid={9999}; + ret=aLs.GetAppIcon(uid,0,*icon); + TEST(ret==KErrNotFound); + CleanupStack::PopAndDestroy(icon); + } + + +/** + @SYMTestCaseID T-Serv2Step-DoInstallationTestL + + @SYMPREQ + + @SYMTestCaseDesc Test updating of Application list on installation of a new application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Test updating of application list on installation of a new + application. Copy the tstapp from z: drive to c: drive. Call RApaLsSession::GetAppInfo() + and test the application information obtained to verify whether the + application architecture server updates the application to reside in c: drive. + Delete the copied application and call RApaLsSession::GetAppInfo(). + Verify that the application list updates the tstapp application to reside + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults The test confirms that the application architecture + server updates the application list on installation of a new application. + + */ +void CT_Serv2Step::DoInstallationTestL (RApaLsSession ls) + { + _LIT(KTestAppDestDir, "C:\\private\\10003a3f\\import\\apps\\" ); + _LIT(KTestAppSource, "Z:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc" ); + _LIT(KTestAppDest, "C:\\private\\10003a3f\\import\\apps\\tstapp_reg.rsc" ); + + _LIT(KTestWaitingForApplistUpdate,"\nWaiting %d microseconds for applist to be updated"); + const TInt KApplistUpdateTime = 8000000; + + // Copy App files around and delete them to check whether + // the app list updates and stores the cache correctly. + RFs theFs; + theFs.Connect(); + + // Remove Test app from the file system + CFileMan* fileManager = CFileMan::NewL (theFs); + + INFO_PRINTF1(_L("Copying the app to C")); + TEST(KErrNone == fileManager->Copy (KTestAppSource, KTestAppDest, CFileMan::ERecurse)); + + INFO_PRINTF2(KTestWaitingForApplistUpdate, KApplistUpdateTime); + User::After(KApplistUpdateTime); + + TApaAppInfo aInfo; + TEST(KErrNone == ls.GetAppInfo (aInfo, KUidTestApp)); + + TParsePtrC parse (aInfo.iFullName); + _LIT (KCdrive, "C:"); + INFO_PRINTF1(_L("Comparing App drive location is C:... ")); + TEST(parse.Drive ().CompareF (KCdrive) == 0); + + INFO_PRINTF1(_L("Removing the app from C")); + TTime tempTime(0); + fileManager->Attribs(KTestAppDest,0,KEntryAttReadOnly, tempTime, CFileMan::ERecurse); + TEST(KErrNone == fileManager->Delete (KTestAppDest, CFileMan::ERecurse)); + INFO_PRINTF1(_L("Removing the app dir from C")); + TEST(fileManager->RmDir(KTestAppDestDir)==KErrNone); + + INFO_PRINTF2(KTestWaitingForApplistUpdate, KApplistUpdateTime); + User::After(KApplistUpdateTime); + + // That should put the file in the right place + TEST(KErrNone == ls.GetAppInfo( aInfo, KUidTestApp)); + + TParsePtrC parse1 (aInfo.iFullName); + _LIT (KZdrive, "Z:"); + INFO_PRINTF1(_L("Comparing App drive location is Z:... ")); + TEST((parse1.Drive().CompareF(KZdrive)) == 0); + + delete fileManager; + theFs.Close(); + } + +// +// Tests the new RApaLsSession::NumberOfOwnDefinedIcons function +// See TeamTrack 'DEF037571 - Provide a better alternative to CApaAppInfoFileReader::NumberOfBitmaps' +// +void CT_Serv2Step::DoNumDefIconsTestL(RApaLsSession& aSession) + { + INFO_PRINTF1(_L("Testing RApaLsSession::NumberOfOwnDefinedIcons")); + TInt err = KErrNone; + + CArrayFixFlat* array = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(array); + + // Test the GetAppIconSizes function, check 3 icons are returned (default icons) + INFO_PRINTF1(_L("Testing GetAppIconSizes")); + TUid appUid; + appUid.iUid = 0x12008ACE; // SimpleApparcTestApp UID + err = aSession.GetAppIconSizes(appUid, *array); + TEST(err == KErrNone); + TEST(array->Count() == 3); + + // Test the NumberOfOwnDefinedIcons function, check count is zero (no own defined icons) + INFO_PRINTF1(_L("Testing NumberOfOwnDefinedIcons (SimpleApparcTestApp)")); + TInt iconCount = -1; + err = aSession.NumberOfOwnDefinedIcons(appUid, iconCount); + TEST(err == KErrNone); + TEST(iconCount == 0); + + // Test NumberOfOwnDefinedIcons again, this time with Contacts app UID (icons defined) + INFO_PRINTF1(_L("Testing NumberOfOwnDefinedIcons (Contacts app)")); + iconCount = -1; + appUid.iUid = 0x10003a74; // Contacts app UID + + err = aSession.NumberOfOwnDefinedIcons(appUid, iconCount); + TEST(err == KErrNone); + TEST(iconCount == 3); + + INFO_PRINTF1(_L("NumberOfOwnDefinedIcons test complete")); + + CleanupStack::PopAndDestroy(array); + } + +/** Test RecognizeData() */ +void CT_Serv2Step::DoRecognizeDataL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Testing RApaLsSession::RecognizeData")); + + _LIT(KExistingFile, "Z:\\ApparcTest\\apparctest_t_Serv2.script"); + _LIT(KNonExistingFile, "x:\\non-existing directory\\non-existing file.any"); + _LIT(KWeirdFileName, "\\c:\\ : weird...txt"); + _LIT8(KFileContents, "just some random noice, we don't really care about the result"); + _LIT8(KTextPlainMimeType, "text/plain"); + + RFs fs; + TEST(KErrNone == fs.Connect()); + CleanupClosePushL(fs); + + // make sure KExistingFile really exists and that KNonExistingFile doesn't + TTime modificationTime; + TEST(KErrNone == fs.Modified(KExistingFile, modificationTime)); + TEST(KErrNone != fs.Modified(KNonExistingFile, modificationTime)); + + // test with existing file (result will be cached) + TDataRecognitionResult recData; + TEST(KErrNone == aLs.RecognizeData(KExistingFile, KFileContents, recData)); + TEST(0 == recData.iDataType.Des8().Compare(KTextPlainMimeType)); + + // test to get result from the cache (not possible to know if we succeed though) + TEST(KErrNone == aLs.RecognizeData(KExistingFile, KFileContents, recData)); + TEST(0 == recData.iDataType.Des8().Compare(KTextPlainMimeType)); + + //test with non-existing file (result won't be cached) + TEST(KErrNone == aLs.RecognizeData(KNonExistingFile, KFileContents, recData)); + TEST(0 == recData.iDataType.Des8().Compare(KTextPlainMimeType)); + + //test with empty file name (result won't be cached) + TEST(KErrNone == aLs.RecognizeData(KNullDesC, KFileContents, recData)); + TEST(0 == recData.iDataType.Des8().Compare(KTextPlainMimeType)); + + //test with weird file name (result won't be cached) + TEST(KErrNone == aLs.RecognizeData(KWeirdFileName, KFileContents, recData)); + TEST(0 == recData.iDataType.Des8().Compare(KTextPlainMimeType)); + + CleanupStack::PopAndDestroy(&fs); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0074 + + @SYMDEF DEF099084: Apparc server's MIME type recognition cache can become out of date + + @SYMTestCaseDesc Test checks whether the MIME type recognition cache maintained by apparc server is + flushed when it receives the ECom change notification., i.e., either when a new ecom plugin is installed + or an existing ecom plugin is uninstalled. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Calls RecognizeData() to test the MIME type returned, + when + 1. When there is no existing "mime/mmr1" recognizer installed. + 2. "mime/mmr1" recognizer with EPossible confidence is installed. + 3. "mime/mmr1" recognizer is uninstalled. + It tests whether the mime type recognition cache maintained by the apparc server gets flushed + when any new ecom plugin is installed or when an existing ecom plugin is uninstalled. + + @SYMTestExpectedResults RecognizeData() returns CApaDataRecognizerType::ENotRecognized when "mime/mmr1" recognizer is not + installed. RecognizeData() returns CApaDataRecognizerType::EPossible when "mime/mmr1" recognizer with EPossible confidence is installed. + RecognizeData() returns CApaDataRecognizerType::ENotRecognized when "mime/mmr1" recognizer with EPossible confidence is uninstalled. + */ + +void CT_Serv2Step::TestRecognitionCacheL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("Testing fix for DEF099084: Apparc server's MIME type recognition cache can become out of date ")); + INFO_PRINTF1(_L("Testing MIME type recognition cache ...")); + + _LIT(KLitDocPath, "Z:\\system\\data\\TApsRecogAppTest.mmr"); + _LIT8(KMimeMmrType,"mime/mmr1"); + + TDataRecognitionResult recogResult; + TBuf8<255> buffer; + buffer.FillZ(255); + recogResult.Reset(); + + // Since recognizer for "mime\mmr1" mime type is not yet installed, call to RecognizeData() + // returns CApaDataRecognizerType::ENotRecognized. + INFO_PRINTF1(_L("MIME type recognition cache is not used...")); + User::LeaveIfError(aLs.RecognizeData(KLitDocPath, buffer, recogResult)); + TEST(recogResult.iConfidence == CApaDataRecognizerType::ENotRecognized); + + INFO_PRINTF1(_L("Installs new mime/mmr1 recognizer plugin file ")); + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + // Ensure c:\\resource\\plugins is created, otherwise leave from this teststep + _LIT(KRecogRscTargetDir,"C:\\resource\\plugins\\"); + TInt err = fs.CreateDirectoryL(KRecogRscTargetDir); + TESTEL((err == KErrNone || err == KErrAlreadyExists), err); + + // Ensure c:\\sys\\bin is created, otherwise leave from this teststep + _LIT(KDllRecogTargetDir,"C:\\sys\\bin\\"); + err = fs.CreateDirectoryL(KDllRecogTargetDir); + TESTEL((err == KErrNone || err == KErrAlreadyExists), err); + + // Copy recmime_1.rsc from z:\\ to c:\\resource\\plugins, to trigger the rescan for plugins. + _LIT(KRecogRscSourcePath, "Z:\\system\\data\\recmime_1.rsc"); + _LIT(KRecogRscTargetPath,"C:\\resource\\plugins\\recmime_1.rsc"); + + err = fs.CopyFileL(KRecogRscSourcePath, KRecogRscTargetPath); + TEST(err == KErrNone); + + // Copy recmime_*.dll from z:\\ to c:\\sys\\bin. + _LIT(KRecogDllTargetPath, "C:\\sys\\bin\\recmime_1.dll"); + + #ifdef __WINS__ + _LIT(KRecogDllSourcePathWinscw, "Z:\\system\\data\\recmime_winscw.dll"); + err = fs.CopyFileL(KRecogDllSourcePathWinscw, KRecogDllTargetPath); + #else + _LIT(KRecogDllSourcePathArmv5, "Z:\\system\\data\\recmime_armv5.dll"); + err = fs.CopyFileL(KRecogDllSourcePathArmv5, KRecogDllTargetPath); + #endif + TEST(err == KErrNone); + + INFO_PRINTF2(_L("Waits %d seconds for new mime/mmr1 recognizer with EPossible confidence to be installed."), (4 * KOneSecondDelay)/1000000); + User::After(4 * KOneSecondDelay); + + // Without fix for DEF099084: Apparc server's MIME type recognition cache can become out of date + // RApaLsSession::RecognizeData() would return CApaDataRecognizerType::ENotRecognized (ie., Mime Recognition cache + // would not have been flushed when new recognizer is installed). + INFO_PRINTF1(_L("MIME type recognition cache is flushed when a new recogizer is installed")); + recogResult.Reset(); + User::LeaveIfError(aLs.RecognizeData(KLitDocPath, buffer, recogResult)); + TEST(recogResult.iDataType.Des8().CompareF(KMimeMmrType) == 0); + TEST(recogResult.iConfidence == CApaDataRecognizerType::EPossible); + + // Second call to RecognizeData() utilizes the Mime type Recognition cache. + INFO_PRINTF1(_L("MIME type recognition cache is used...")); + recogResult.Reset(); + User::LeaveIfError(aLs.RecognizeData(KLitDocPath, buffer, recogResult)); + TEST(recogResult.iDataType.Des8().CompareF(KMimeMmrType) == 0); + TEST(recogResult.iConfidence == CApaDataRecognizerType::EPossible); + + // Delete the plugin resource file of the recognizer with EPossible confidence which was installed during the test from z:. + TInt fileExists = EFalse; + fs.IsFilePresent(KRecogRscTargetPath, fileExists); + if (fileExists) + { + fs.ChangeFilePermissionL(KRecogRscTargetPath); // clear readonly attribute inherited from z: + err = fs.DeleteFileL(KRecogRscTargetPath); + if(err == KErrNone) + INFO_PRINTF1(_L("Removed temporary file recmime_1.rsc")); + else + INFO_PRINTF1(_L("Failed to remove temporary file recmime_1.rsc")); + } + + INFO_PRINTF2(_L("Waits %d seconds for the data recognizer list maintained by EMIME to be updated"), (10 * KOneSecondDelay)/1000000); + User::After(10 * KOneSecondDelay); + + // Since "mime/mmr1" recognizer is uninstalled, mime/mmr1 mime type is not recognized. + INFO_PRINTF1(_L("MIME type recognition cache is flushed when a existing recogizer is uninstalled")); + recogResult.Reset(); + User::LeaveIfError(aLs.RecognizeData(KLitDocPath, buffer, recogResult)); + TEST(recogResult.iConfidence == CApaDataRecognizerType::ENotRecognized); + + CleanupStack::PopAndDestroy(&fs); + } + +/** + Auxiliary Fn for the entire Test Step + + This method initiates all the tests. +*/ +TInt CT_Serv2Step::DoServComTestL() + { + INFO_PRINTF1(_L("Testing Server Com")); + + + RFs theServFs; + TInt ret = theServFs.Connect(); + TEST(ret==KErrNone); + CleanupClosePushL(theServFs); + + // Connect to the server + RTestableApaLsSession ls; + ret = ls.ConnectWithoutWaitingForListPopulation(); + TEST(ret==KErrNone); + CleanupClosePushL(ls); + + + INFO_PRINTF1(_L("Waiting applist to be generated.\n")); + TRequestStatus requeststatus; + ls.RegisterListPopulationCompleteObserver(requeststatus); + + //Testing the CancelListPopulationCompleteObserver + TEST(ls.CancelListPopulationCompleteObserver() == KErrNone); + User::WaitForRequest(requeststatus); + + ls.RegisterListPopulationCompleteObserver(requeststatus); + User::WaitForRequest(requeststatus); + TEST(requeststatus == KErrNone); + + //make sure the RFbsSession doesn't have to allocate buffer since it would change the heap + CFbsBitmap* bufferAllocator = new(ELeave) CFbsBitmap; + CleanupStack::PushL(bufferAllocator); + TEST(bufferAllocator->Create(TSize(200,1), EColor16M) == KErrNone); + CleanupStack::PopAndDestroy(bufferAllocator); + + // + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, DoInterrogationTestsL(ls), ls.ClearAppInfoArray(); ls.FlushRecognitionCache(); ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetAllApps(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetEmbeddableApps(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoEmbeddableAppCount(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetAppCapability(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetFilteredApps1(ls), NO_CLEANUP); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetFilteredApps2(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetFilteredApps3(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetFilteredApps4(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetFilteredApps5(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoGetFilteredApps6(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestEmbeddabilityFilter1(), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestEmbeddabilityFilter2(), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestEmbeddabilityFilter3(), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestEmbeddabilityFilter4(), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestEmbeddabilityFilter5(), ls.ClearAppInfoArray() ); + //DONT_CHECK due to file system changes + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, TestRecognitionCacheL(ls), ls.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoRecognizeDataL(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, LaunchAppThruCreateDocL(ls), ls.FlushRecognitionCache() ); + + + INFO_PRINTF1(_L("Checking icon loading by size - including OOM tests\n")); + ret = KErrNoMemory; + for(TInt fail=0; ret == KErrNoMemory; fail++) + { + __UHEAP_FAILNEXT(fail); + __UHEAP_MARK; + TRAP(ret, DoCheckServerIconLoadingBySizeL(ls)); + __UHEAP_SETFAIL(RHeap::ENone,0);// turn failure off + __UHEAP_MARKEND; + TEST((ret==KErrNoMemory || ret==KErrNone)); + } + + //DONT_CHECK due to app is started and that app opens up another RApaLsSession (which changes the server's heap) + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, DoStartAppTestsL(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoEnquiryTestsL(ls), NO_CLEANUP); + //DONT_CHECK due to changes to file system + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, DoInstallationTestL(ls), ls.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, DoNumDefIconsTestL(ls), ls.ClearAppInfoArray() ); + + // + // close the server session and we have done some type store reloading + CleanupStack::PopAndDestroy(2, &theServFs); + + return KErrNone; + } + +CT_Serv2Step::~CT_Serv2Step() +/** + Destructor + */ + { + } + +CT_Serv2Step::CT_Serv2Step() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_Serv2Step); + } + +TVerdict CT_Serv2Step::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_Serv2Step::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + +TVerdict CT_Serv2Step::doTestStepL() +/** + Override of base class virtual. + @return - TVerdict code + */ +{ + FbsStartup(); + TInt ret = RFbsSession::Connect(); + TEST(ret==KErrNone); + + // set up the directory structure + RFs theFs; + ret = theFs.Connect(); + TEST(ret==KErrNone); + CleanupClosePushL(theFs); + + // run the testcode (inside an alloc heaven harness) + INFO_PRINTF1(_L("About to test server in process")); + TRAP(ret,DoServComTestL()); + INFO_PRINTF2(_L(" DoServComTestL completes with %d"), ret); + TEST(ret==KErrNone); + + // Cleanup + CleanupStack::PopAndDestroy(&theFs); + + INFO_PRINTF1(_L("Test Completed!")); + return TestStepResult(); + +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv2Step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv2Step.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,79 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SERV2_STEP_H__) +#define __T_SERV2_STEP_H__ + +#include "ApparcTestServer.h" + +//! A CT_Serv2Step test class. + +/** This class tests wrapper to Application Architecture Server. */ + +class CT_Serv2Step :public CTestStep + { +public: + CT_Serv2Step(); + ~CT_Serv2Step(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); +//private: + void DoInterrogationTestsL(RApaLsSession& aLs); + void DoEnquiryTestsL(RApaLsSession& aLs); + void DoStartAppTestsL(RApaLsSession& aLs); + void StartAppTests1L(RApaLsSession& aLs); + void StartAppTests4L(RApaLsSession& aLs); + void DoAppInfoTests(RApaLsSession& aLs); + void AppInfoTest1(RApaLsSession& aLs); + void AppInfoTest3(RApaLsSession& aLs); + void AppInfoTest4(RApaLsSession& aLs); + void AppInfoTest5(RApaLsSession& aLs); + void DoInstallationTestL (RApaLsSession ls); + void DoNumDefIconsTestL(RApaLsSession& aSession); + void DoCheckServerIconLoadingBySizeL(RApaLsSession& aLs); + void LaunchAppThruCreateDocL(RApaLsSession& aLs); + TFileName SearchAndReturnCompleteFileName(const TDesC& aFileName); + TBool ComparePaths(const TDesC& aFilename, const TDesC& aPath); + TInt DoServComTestL(); + + void DoGetAllApps(RApaLsSession& aLs); + void DoGetEmbeddableApps(RApaLsSession& aLs); + void DoEmbeddableAppCount(RApaLsSession& aLs); + void DoGetAppCapability(RApaLsSession& aLs); + void DoGetFilteredApps1(RApaLsSession& aLs); + void DoGetFilteredApps2(RApaLsSession& aLs); + void DoGetFilteredApps3(RApaLsSession& aLs); + void DoGetFilteredApps4(RApaLsSession& aLs); + void DoGetFilteredApps5(RApaLsSession& aLs); + void DoGetFilteredApps6(RApaLsSession& aLs); + void DoTestEmbeddabilityFilter1(); + void DoTestEmbeddabilityFilter2(); + void DoTestEmbeddabilityFilter3(); + void DoTestEmbeddabilityFilter4(); + void DoTestEmbeddabilityFilter5(); + void DoRecognizeDataL(RApaLsSession& aLs); + void TestRecognitionCacheL(RApaLsSession& aLs); + }; + +_LIT(KT_Serv2Step,"T_Serv2"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv3Step.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv3Step.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1949 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test wrapper to Application Architecture Server. +// Tests Application information, Data recognition and application +// launching capabilities of the application architecture server.\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include "testableapalssession.h" +#include +#include +#include +#include +#include +#include +#include "tstapp.h" +// +#include +#include "T_Serv3Step.h" + +#include +#include +#include "TAppEmbedUids.h" +#include "appfwk_test_utils.h" + + +//Literals for directory and file naming +_LIT(KMimeDir,"c:\\system\\data\\Mimepath\\"); +_LIT(KMimeFile,"c:\\system\\data\\Mimepath\\mime_content"); +_LIT(KEmptyDir,"c:\\system\\data\\Testpath\\Empty\\"); +_LIT8(KTextContent, "Never hit your mother with a shovel.\ + It leaves a dark impression on her mind."); +_LIT(KSuffixText, ".txt"); +_LIT(KSuffixHtml, ".html"); +_LIT8(KHtmlContent, "SYMBIAN Centre\ + - 5 Day Forecast for London, United Kingdom\ + "); +_LIT(KSuffixUnknown, ".canyoutell"); + +const TInt KFixedNumWidth = 3; + +CT_Serv3Step::~CT_Serv3Step() +/** + * Destructor + */ + { + delete iActiveScheduler; + } + +CT_Serv3Step::CT_Serv3Step() +/** + * Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_Serv3Step); + + //Set up active scheduler + iActiveScheduler= new(ELeave) CActiveScheduler; + CActiveScheduler::Install(iActiveScheduler); + } + +/** + @SYMTestCaseID T_Serv3Step_DoSyncRecognizerTest1L + + @SYMPREQ 699 + + @SYMREQ 3897 + + @SYMTestCaseDesc Test PREQ699.1.0 Validate Synchronous RecognizeFilesL function and CDataRecognitionResultArray\n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Calls RecognizeFilesL() with a folder containing two files of zero and one byte sizes. Validates + the returned number of files and file types. Tests CDataRecognitionResultArray by using the object. + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + CDataRecognitionResultArray::const TFileName& Path() const\n + CDataRecognitionResultArray::GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const;\n + CDataRecognitionResultArray::GetFileNameL(TFileName& aFileName, const TUint aIndex) const\n + + @SYMTestExpectedResults KErrNone and CDataRecognitionResultArray returned containing two entries, of MIME type "text/plain" \n + + */ +void CT_Serv3Step::DoSyncFolderRecognizerTest1L(RApaLsSession& aLs) + { + //Synchronous Folder File Recognition Test Group 1 + + _LIT(KStandardDir,"z:\\system\\data\\Testpath\\"); + + // Copy App files around and delete them to check whether + // the app list updates and stores the cache correctly. + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + INFO_PRINTF1(_L("Synchronous Folder File Recognition Test PREQ699.1.0")); + TInt ret=aLs.RecognizeFilesL(KStandardDir,*result); + TEST(ret==KErrNone); + User::LeaveIfError(ret); + + // Test the CDataRecognitionResultArray object + TFileName path = result->Path(); //test: CDataRecognitionResultArray::Path() + TFullName standardDir(KStandardDir); + //Test the path created is correct + TEST(path==standardDir); + + TUint count = result->Count(); //test: CDataRecognitionResultArray::Count() + TEST(count==2); //two files in directory + + //get each result from the test directory. Check the MIME values against their known types + for(TUint i=0; iGetDataRecognitionResultL(res, i); + //test: correct MIME type is returned - "text/plain" + TEST(res.iDataType.Des8().Compare(TDataType(_L8("text/plain")).Des8()) == 0); + + //test: CDataRecognitionResultArray::GetFileNameL + TFileName fileName; + result->GetFileNameL(fileName, i); + TEST(fileName.Compare( (i==0 ? _L("file1.txt") : _L("file2.txt")) ) == 0); + } + + // Cleanup + CleanupStack::PopAndDestroy(result);//result + } + + /** + @SYMTestCaseID T_Serv3Step_DoSyncRecognizerTest2L + + @SYMPREQ 699 + + @SYMREQ 3899 + + @SYMTestCaseDesc Test PREQ699.2.0 and PREQ699.2.1 Validate Synchronous RecognizeFilesL function for error handling.\n + + @SYMTestStatus Implemented + + @SYMTestPriority High + + @SYMTestActions. Test 2.0 Calls RecognizeFilesL() (without a data filter then with a data filter) using an unknown folder path. + Checks returned value is KErrPathNotFound. + Test 2.1 Calls RecognizeFilesL() (without a data filter then with a data filter) using an empty folder path. + Checks returned value is KErrNone and that returned array is empty. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult);\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + + @SYMTestExpectedResults Test 2.0 returned value is KErrPathNotFound.\n + Test 2.1 returned value is KErrNone and that returned array is empty.\n + */ + void CT_Serv3Step::DoSyncFolderRecognizerTest2L(RApaLsSession& aLs) + { + TBufC<50> emptyDir(KEmptyDir); + TPtr ptrEmptyDir(emptyDir.Des()); + + //Synchronous Folder File Recognition Test Group + + //************** + // Test Case 2.0 - Test Recognizer for incorrect folder path.Test both versions of synchronous RecognizeFiles + //************** + INFO_PRINTF1(_L("Synchronous Folder File Recognition Test PREQ699.2.0")); + _LIT(KNotKnownDir,"z:\\system\\data\\Testpath\\NotKnown\\"); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result1); + + TInt ret=aLs.RecognizeFilesL(KNotKnownDir,*result1); + TEST(ret==KErrPathNotFound); + + ret=aLs.RecognizeFilesL(KNotKnownDir,_L8("text/plain"),*result1); + TEST(ret==KErrPathNotFound); + + // Cleanup + CleanupStack::PopAndDestroy(result1);//result1 + + // Create a directory with no files + RSmlTestUtils utils; + CleanupClosePushL(utils); + + CreateDirL(&utils, ptrEmptyDir); + + //************** + // Test Case 2.1 -Test Recognizer for empty folder. Test both versions of synchronous RecognizeFiles + //************** + INFO_PRINTF1(_L("Synchronous Folder File Recognition Test PREQ699.2.1")); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result2); + + ret=aLs.RecognizeFilesL(KEmptyDir,*result2); + TEST(ret==KErrNone); + + TUint count = result2->Count(); + TEST(count==0); + + INFO_PRINTF1(_L("Test empty folder for filter version parameter")); + ret=aLs.RecognizeFilesL(KEmptyDir,_L8("text/plain"),*result2); + TEST(ret==KErrNone); + + count = result2->Count(); + TEST(count==0); + + //Delete empty directory + DeleteDirL(&utils, ptrEmptyDir); + + // Cleanup + CleanupStack::PopAndDestroy(result2);//result2 + CleanupStack::PopAndDestroy(&utils);//utils + } + + /** + @SYMTestCaseID T_Serv3Step_DoSyncRecognizerTest3L + + @SYMPREQ 699 + + @SYMREQ 3899 + + @SYMTestCaseDesc Validate Synchronous RecognizeFilesL data filter function using various filters.\n + Test 3.0 Validate Synchronous RecognizeFilesL data filter function and CDataRecognitionResultArray\n + Test 3.1 Validate Synchronous RecognizeFilesL functions with wildcard/MIME type validity.\n + Test 3.2 Validate Synchronous RecognizeFilesL functions with irregular strings.\n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Call RecognizeFilesL with three different data filters: i) standard= "text/plain"; ii) wildcard: "text*"; iii) non-valid \n + For each call, check the results are correct: number of files identified and the MIME types. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult);\n + CDataRecognitionResultArray::CDataRecognitionResultArray();\n + CDataRecognitionResultArray::Count() const;\n + CDataRecognitionResultArray::const TFileName& Path() const\n + CDataRecognitionResultArray::GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const;\n + CDataRecognitionResultArray::GetFileNameL(TFileName& aFileName, const TUint aIndex) const\n + + @SYMTestExpectedResults\n + Test 3.0 KErrNone and CDataRecognitionResultArray returned containing four entries, of MIME type "text/plain" \n + Test 3.1 KErrNone and CDataRecognitionResultArray returned containing four entries, of MIME type "text/plain" \n + Test 3.2 KErrNone and CDataRecognitionResultArray returned containing zero entries\n + + */ + void CT_Serv3Step::DoSyncFolderRecognizerTest3L(RApaLsSession& aLs) + { + + //************** + // Test Case 3.0 - Test Recognizer filter version with datatype filter type validity. + // Also test CDataRecognitionResultArray::GetDataRecognitionResultL(); + // CDataRecognitionResultArray:: + //*************** + //Synchronous Folder File Recognition Test Group 3; + _LIT(KFilterTestDir,"z:\\system\\data\\Testpath\\FilterTests\\"); + + CDataRecognitionResultArray* result3 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result3); + + INFO_PRINTF1(_L("Synchronous Folder File Recognition Test PREQ699.3.0")); + TInt ret=aLs.RecognizeFilesL(KFilterTestDir,_L8("text/plain"),*result3); + TEST(ret==KErrNone); + TUint count = result3->Count(); + TEST(count==4); + + //get each result from the test directory. Check the MIME values against known types + for(TUint i=0; iGetDataRecognitionResultL(res, i); //the result + TFileName fileName; + result3->GetFileNameL(fileName, i); //the file we are looking at + + //test for correct MIME type result + TEST(res.iDataType.Des8().Compare(TDataType(_L8("text/plain")).Des8())==0);//report an error if not text/plain + } + + // Cleanup + CleanupStack::PopAndDestroy(result3);//result + + //***************** + // Test Case 3.1 - Test Recognizer filter version for wildcard/MIME type validity. + // Also test CDataRecognitionResultArray + //********* + INFO_PRINTF1(_L("Synchronous Folder File Recognition Test PREQ699.3.1")); + CDataRecognitionResultArray* result4 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result4); + ret=aLs.RecognizeFilesL(KFilterTestDir,_L8("text*"),*result4); + TEST(ret==KErrNone); + count = result3->Count(); + TEST(count==4); + + //get each result from the test directory. Check the MIME values against some known types + for(TUint j=0; jGetDataRecognitionResultL(res, j); //the result + TFileName fileName; + result4->GetFileNameL(fileName, j); //the file we are looking at + + //test for correct MIME type result + TEST(res.iDataType.Des8().Compare(TDataType(_L8("text/plain")).Des8())==0);//report an error if not text + } + + // Cleanup + CleanupStack::PopAndDestroy(result4);//result + + //***************** + // Test Case 3.2 -Test Recognizer filter version for with irregular strings. + //********* + INFO_PRINTF1(_L("Synchronous Folder File Recognition Test PREQ699.3.2")); + CDataRecognitionResultArray* result5 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result5); + ret=aLs.RecognizeFilesL(KFilterTestDir,_L8("&*/?|=+-"),*result5); + TEST(ret==KErrNone); + count = result5->Count(); + TEST(count==0); + + ret=aLs.RecognizeFilesL(KFilterTestDir,_L8("'/"),*result5); + TEST(ret==KErrNone); + count = result5->Count(); + TEST(count==0); + + // Cleanup + CleanupStack::PopAndDestroy(result5);//result + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest1L + + @SYMPREQ 699 + + @SYMREQ Non-Specific + + @SYMTestCaseDesc Test PREQ699.4.0 Validate Asynchronous RecognizeFilesL (non-filtered) function and CDataRecognitionResultArray\n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Calls RecognizeFilesL() with a folder containing two files of zero and one byte sizes. Uses a Test Active Object + within the request. Validates the returned number of files and file types. Tests CDataRecognitionResultArray by using the object.\n + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + CDataRecognitionResultArray::const TFileName& Path() const\n + CDataRecognitionResultArray::GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const;\n + CDataRecognitionResultArray::GetFileNameL(TFileName& aFileName, const TUint aIndex) const\n + + @SYMTestExpectedResults status= KErrNone and CDataRecognitionResultArray returned containing two entries, of MIME type "text/plain" \n + + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest1L(RApaLsSession& aLs) + { + + //Asynchronous folder file recognition Test Group 4 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + //Check results and Stop AS + _LIT(KStandardDir,"z:\\system\\data\\Testpath\\"); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.4.0")); + aLs.RecognizeFilesL(KStandardDir,*result,active->iStatus); + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result->Count(); + + TEST(count==2); //two files in directory + + //get each result from the test directory. Check the MIME values against some known types + for(TUint i=0; iGetDataRecognitionResultL(res, i); // the result + //test MIME type result = "text/plain" + TEST(res.iDataType.Des8().Compare(TDataType(_L8("text/plain")).Des8())==0); + + TFileName fileName; + result->GetFileNameL(fileName, i); //the file we are looking at + TEST(fileName.Compare( (i==0 ? _L("file1.txt") : _L("file2.txt")) ) == 0); + } + } + + // Cleanup + CleanupStack::PopAndDestroy(result);//result + CleanupStack::PopAndDestroy(active);//active + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest2L + + @SYMPREQ 699 + + @SYMREQ 3899 + + @SYMTestCaseDesc Test PREQ699.5.0 Validate Asynchronous RecognizeFilesL (filtered) function and CDataRecognitionResultArray\n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Call RecognizeFilesL() with a Data Type Filter (aDataType ="Text/Plain") and a Test Active Object. + Test that the number and data type of files returned is correct. + Tests CDataRecognitionResultArray by using the object.\n + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + CDataRecognitionResultArray::GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const;\n + CDataRecognitionResultArray::GetFileNameL(TFileName& aFileName, const TUint aIndex) const\n + + @SYMTestExpectedResults status= KErrNone and CDataRecognitionResultArray returned containing four entries, of MIME type "text/plain" \n + + + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest2L(RApaLsSession& aLs) + { + + //Asynchronous folder file recognition Test Group 5 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + _LIT(KFilterDir,"z:\\system\\data\\Testpath\\FilterTests\\"); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.5.0")); + //Test RecognizeFilesL with a MIME type filter "text/plain" + aLs.RecognizeFilesL(KFilterDir,_L8("text/plain"), *result,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result->Count(); + + TEST(count==4); //four files in directory + + //get each result from the test directory. Check the MIME values against some known types + for(TUint i=0; iGetDataRecognitionResultL(res, i); // the result + TFileName fileName; + result->GetFileNameL(fileName, i); // the file we are looking at + + //test MIME type result = "text/plain" + TEST(res.iDataType.Des8().Compare(TDataType(_L8("text/plain")).Des8())==0); + } + } + + // Cleanup + CleanupStack::PopAndDestroy(result);//result + CleanupStack::PopAndDestroy(active);//active + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest3L + + @SYMPREQ 699 + + @SYMREQ 3899 + + @SYMTestCaseDesc Test PREQ699.6.0 Validate Asynchronous RecognizeFilesL function (with data filter and wildcard) \n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Call RecognizeFilesL() with a Data Type Filter and wildcard (aDataType ="Text/ *") and a Test Active Object. + Test that the number and data type of files returned is correct. + Tests CDataRecognitionResultArray by using the object.\n + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + CDataRecognitionResultArray::GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const;\n + CDataRecognitionResultArray::GetFileNameL(TFileName& aFileName, const TUint aIndex) const\n + + @SYMTestExpectedResults status= KErrNone and CDataRecognitionResultArray returned containing four entries, of MIME type "text/plain" \n + + + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest3L(RApaLsSession& aLs) + { + + // Asynchronous folder file recognition Test Group 6 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + _LIT(KFilterDir,"z:\\system\\data\\Testpath\\FilterTests\\"); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.6.0")); + aLs.RecognizeFilesL(KFilterDir,_L8("text*"), *result,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone);//Test no error returned + if (active->iStatus==KErrNone) + { + TUint count = result->Count(); + + TEST(count==4); //four files in directory + + //get each result from the test directory. Check the MIME values against some known types + for(TUint i=0; iGetDataRecognitionResultL(res, i); // the result + TFileName fileName; + result->GetFileNameL(fileName, i); //the file we are looking at + + //test MIME type result="text/plain" + TEST(res.iDataType.Des8().Compare(TDataType(_L8("text/plain")).Des8())==0); + } + } + + // Cleanup + CleanupStack::PopAndDestroy(result);//result + CleanupStack::PopAndDestroy(active);//active + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest4L + + @SYMPREQ 699 + + @SYMREQ 3899 + + @SYMTestCaseDesc Test PREQ699.7.0 Validate Asynchronous RecognizeFilesL function (with unknown and irregular data filters). + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Call RecognizeFilesL() with Data Type Filters of an irregular nature and a Test Active Object. + Test that no files are returned and status= KErrNone.\n + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + + @SYMTestExpectedResults status= KErrNone and CDataRecognitionResultArray returned containing zero entries \n + + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest4L(RApaLsSession& aLs) + { + + //Asynchronous folder file recognition Test Group 7 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + INFO_PRINTF1(_L("Testing Recognition of folder filtered with irregular strings")); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + _LIT(KFilterDir,"z:\\system\\data\\Testpath\\FilterTests\\"); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.7.0")); + aLs.RecognizeFilesL(KFilterDir,_L8("&* /?|=+-"),*result, active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result->Count(); + TEST(count==0); //no files should be found + } + + // Cleanup + CleanupStack::PopAndDestroy(result);//result + CleanupStack::PopAndDestroy(active);//active + + } + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest5L + + @SYMPREQ 699 + + @SYMREQ Non-Specific + + @SYMTestCaseDesc Test PREQ699.8.0 Validate Asynchronous RecognizeFilesL function with large directory to test Cache upperlimit. \n + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions. Call RecognizeFilesL() with a folder containing a large number of files and a Test Active Object. + Test that the number of files returned is correct. + Tests CDataRecognitionResultArray by using the object.\n + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus);\n + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const;\n + + @SYMTestExpectedResults status= KErrNone and CDataRecognitionResultArray returned containing 550 entries. \n + + */ + +void CT_Serv3Step::DoAsyncFolderRecognizerTest5L(RApaLsSession& aLs) + { + _LIT(KLargeDir,"c:\\system\\data\\Testpath\\largeDir\\"); + _LIT(KLargeDirRoot, "c:\\system\\data\\Testpath\\largeDir\\focus"); + + TBufC<50> bigDir(KLargeDir); + TPtr ptrBigDir (bigDir.Des()); + TBufC<50> bigDirRoot(KLargeDirRoot); + TPtr ptrBigDirRoot (bigDirRoot.Des()); + + // Asynchronous folder file recognition Test Group 8 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + //File server and utils + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + CreateDirL(&utils, ptrBigDir); + + CreateFilesL(theFS, file, ptrBigDirRoot, (TDesC&)KSuffixText, 550, KTextContent, 0); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.8.0")); + //Check results and Stop AS + aLs.RecognizeFilesL(KLargeDir,*result,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result->Count(); + TEST(count==550); //550 files in directory - 500 files is thought to be cache capacity + } + + DeleteFilesL(&utils, ptrBigDirRoot, (TDesC&)KSuffixText, 550); + + DeleteDirL(&utils, ptrBigDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils);//utils + CleanupStack::PopAndDestroy(result);//result + CleanupStack::PopAndDestroy(active);//active + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest6L + + @SYMPREQ 699 + + @SYMREQ 3898 3899 + + @SYMTestCaseDesc Test PREQ699.9.0, PREQ699.9.1, PREQ699.9.2 Validates cache functionality with changed file mime type + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Recognize a directory with a filter and then change the mime type of one file. + Recognize the directory with a filter again and ensure that the file type change has been registered. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for file creation + 9.0 count = 1 CDataRecognitionResultArray::Count returns one entry of MIME type "text/plain" + status = KErrNone for file content changed to html + 9.1 count = 0 CDataRecognitionResultArray::Count returns no entries of MIME type "text/plain" + 9.2 count = 0 CDataRecognitionResultArray::Count returns no entries of MIME type "text/plain" + + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest6L(RApaLsSession& aLs) + { + + TBufC<50> mimeDir(KMimeDir); + TPtr ptrMimeDir(mimeDir.Des()); + + TBufC<50> mimeFile(KMimeFile); + TPtr ptrMimeFile(mimeFile.Des()); + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + //Asynchronous folder file recognition Test Group 9 + + //Declare result arrays for storing seperate recognition results + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result3 = new(ELeave) CDataRecognitionResultArray(); + + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + CleanupStack::PushL(result3); + + //File server and utils + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directory for test files + CreateDirL(&utils, ptrMimeDir); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + TTime aLaterTime(time); + TTimeIntervalMinutes aInterval(1); + + aLaterTime+=(aInterval); + + // Create file mime_content000.txt containing text + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixText, 1, KTextContent, time); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.9.0")); + //Test RecognizeFilesL with a MIME type filter "text/plain" + aLs.RecognizeFilesL(KMimeDir,_L8("text/plain"), *result1 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result1->Count(); + TEST(count==1); + } + + //Change file content to html + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixText, 1, KHtmlContent, aLaterTime); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.9.1")); + //Test RecognizeFilesL with a MIME type filter "text/plain" + aLs.RecognizeFilesL(KMimeDir,_L8("text/plain"), *result2 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result2->Count(); + TEST(count==0); + } + + + //Delete file and recognise again + DeleteFilesL(&utils, ptrMimeFile, (TDesC&)KSuffixText, 1); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.9.2")); + aLs.RecognizeFilesL(KMimeDir, *result3,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result3->Count(); + TEST(count==0); + } + + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils); //utils + CleanupStack::PopAndDestroy(result3);//result1 + CleanupStack::PopAndDestroy(result2);//result2 + CleanupStack::PopAndDestroy(result1);//result3 + CleanupStack::PopAndDestroy(active); //active + + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest7L + + @SYMPREQ 699 + + @SYMREQ 3898 3899 + + @SYMTestCaseDesc Test PREQ699.10.0 Validates cache functionality with changed mime type and filter (1) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Recognize a directory with a filter. Change the mime type of one file in the + directory such that it is now described by the filter. Recognize the + directory again with the same filter and ensure that the file type change has + been registered. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for file creation + count = 3 CDataRecognitionResultArray::Count returns three entries of MIME type "text/html" + status = KErrNone for file content changed to html + count = 4 CDataRecognitionResultArray::Count returns four entries of MIME type "text/html" + */ + void CT_Serv3Step::DoAsyncFolderRecognizerTest7L(RApaLsSession& aLs) + { + TBufC<50> mimeDir(KMimeDir); + TPtr ptrMimeDir (mimeDir.Des()); + + TBufC<50> mimeFile(KMimeFile); + TPtr ptrMimeFile(mimeFile.Des()); + + //Asynchronous folder file recognition Test Group 10 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + + + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directory for test files + CreateDirL(&utils, ptrMimeDir); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + TTime aLaterTime(time); + TTimeIntervalMinutes aInterval(1); + aLaterTime+=(aInterval); + + // Create files mime_content000.canyoutell - mime_content003.canyoutell + // 000 with text content and 001-003 with html content + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 4, KHtmlContent, time); + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KTextContent, time); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.10.0")); + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result1 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result1->Count(); + TEST(count == 3); + } + + + //Change file content to html and update the timestamp + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KHtmlContent, aLaterTime); + + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result2 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result2->Count(); + TEST(count == 4); + } + + + DeleteFilesL(&utils, ptrMimeFile, (TDesC&)KSuffixUnknown, 4); + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils);//utils + CleanupStack::PopAndDestroy(result2);//result1 + CleanupStack::PopAndDestroy(result1);//result2 + CleanupStack::PopAndDestroy(active);//active + + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest8L + + @SYMPREQ 699 + + @SYMREQ 3898 3899 + + @SYMTestCaseDesc Test PREQ699.11.0 Validates cache functionality with changed file mime type and filter (2) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Recognize a directory with a filter. Change the mime type of one file in the + directory such that it is now not described by the filter. Recognize the + directory again with the same filter and ensure that the file type change has + been registered. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for file creation + count = 4 CDataRecognitionResultArray::Count returns four entries of MIME type "text/html" + status = KErrNone for file content changed to html + count = 3 CDataRecognitionResultArray::Count returns three entries of MIME type "text/html" + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest8L(RApaLsSession& aLs) + { + TBufC<50> mimeDir(KMimeDir); + TPtr ptrMimeDir (mimeDir.Des()); + + TBufC<50> mimeFile(KMimeFile); + TPtr ptrMimeFile(mimeFile.Des()); + + //Asynchronous folder file recognition Test Group 11 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + + + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directory for test files + CreateDirL(&utils, ptrMimeDir); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + TTime aLaterTime(time); + TTimeIntervalMinutes aInterval(1); + aLaterTime+=(aInterval); + + // Create files mime_content000.canyoutell - mime_content003.canyoutell with html content + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 4, KHtmlContent, time); + + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result1 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result1->Count(); + TEST(count == 4); + } + + + //Change file content to text + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KTextContent, aLaterTime); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.11.0")); + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result2 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result2->Count(); + TEST(count == 3); + } + + DeleteFilesL(&utils, ptrMimeFile, (TDesC&)KSuffixUnknown, 4); + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils);//utils + CleanupStack::PopAndDestroy(result2);//result1 + CleanupStack::PopAndDestroy(result1);//result2 + CleanupStack::PopAndDestroy(active);//active + + } + + /** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest9L + + @SYMPREQ 699 + + @SYMREQ 3898 3899 + + @SYMTestCaseDesc Test PREQ699.12.0 Validates cache functionality with older timestamp(1) + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Recognize a directory. Change the timestamp on one file to be older and alter + the mime type. Repeat the directory recognition and ensure that the mime type + has been updated.. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for html file creation + count = 1 CDataRecognitionResultArray::Count returns one entry of MIME type "text/html" + status = KErrNone for file content changed to text + count = 0 CDataRecognitionResultArray::Count returns zero entries of MIME type "text/html" + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest9L(RApaLsSession& aLs) + { + TBufC<50> mimeDir(KMimeDir); + TPtr ptrMimeDir (mimeDir.Des()); + + TBufC<50> mimeFile(KMimeFile); + TPtr ptrMimeFile(mimeFile.Des()); + + //Asynchronous folder file recognition Test Group 12 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directory for test files + CreateDirL(&utils, ptrMimeDir); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + TTime aLaterTime(time); + TTimeIntervalMinutes aInterval(1); + aLaterTime+=(aInterval); + + //Set the directory timestamp to be 'new' + theFS.SetModified(ptrMimeDir, aLaterTime); + + // Create file mime_content000.canyoutell with html content and 'new' time + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KHtmlContent, aLaterTime); + + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result1 ,active->iStatus); + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result1->Count(); + TEST(count == 1); + } + + + //Change file content to text and set the timestamp to 'old' + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KTextContent, time); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.12.0")); + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result2 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result2->Count(); + TEST(count == 0); + } + + //Delete file + utils.DeleteFileL(_L("c:\\system\\data\\Mimepath\\mime_content000.canyoutell")); + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils);//utils + CleanupStack::PopAndDestroy(result2);//result1 + CleanupStack::PopAndDestroy(result1);//result2 + CleanupStack::PopAndDestroy(active);//active + + } + +/** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest10L + + @SYMPREQ 699 + + @SYMREQ 3898 3899 + + @SYMTestCaseDesc Test PREQ699.13.0 Validates cache functionality with older timestamp. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Recognize a directory. Change the timestamp on one file to be older and alter + the mime type. Change the timestamp on the directory to be newer. Repeat the + directory recognition and ensure that the mime type has been updated.. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for html file creation + count = 1 CDataRecognitionResultArray::Count returns one entry of MIME type "text/html" + status = KErrNone for file content changed to text + count = 0 CDataRecognitionResultArray::Count returns zero entries of MIME type "text/html" + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest10L(RApaLsSession& aLs) + { + TBufC<50> mimeDir(KMimeDir); + TPtr ptrMimeDir (mimeDir.Des()); + + TBufC<50> mimeFile(KMimeFile); + TPtr ptrMimeFile(mimeFile.Des()); + + //Asynchronous folder file recognition Test Group 13 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directory for test files + CreateDirL(&utils, ptrMimeDir); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + TTime aLaterTime(time); + TTimeIntervalMinutes aInterval(1); + aLaterTime+=(aInterval); + + //Set the directory timestamp to be 'old' + theFS.SetModified(ptrMimeDir, time); + + // Create file mime_content000.canyoutell with html content and 'old' time + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KHtmlContent, time); + + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result1 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result1->Count(); + TEST(count == 1); + } + + + //Change file content to text and set the timestamp to 'new' + //Change dir timestamp to 'old' + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KTextContent, aLaterTime); + + //Set the directory timestamp to be 'new' + theFS.SetModified(ptrMimeDir, aLaterTime); + + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.13.0")); + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result2 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result2->Count(); + TEST(count == 0); + } + + //Delete file + utils.DeleteFileL(_L("c:\\system\\data\\Mimepath\\mime_content000.canyoutell")); + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils);//utils + CleanupStack::PopAndDestroy(result2);//result1 + CleanupStack::PopAndDestroy(result1);//result2 + CleanupStack::PopAndDestroy(active);//active + + } + +/** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest11L + + @SYMPREQ 699 + + @SYMREQ 3989 3899 + + @SYMTestCaseDesc Test PREQ699.14.0 Validates cache functionality with substituted directory + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Recognize a directory. Substitute a directory of the same name with + different contents and repeat the recognition. Ensure that the file + contents are correctly listed. + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for file creation + count = 4 CDataRecognitionResultArray::Count returns four entries of MIME type "text/html" + status = KErrNone for file content changed to text + count = 2 CDataRecognitionResultArray::Count returns two entries of MIME type "text/html" + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest11L(RApaLsSession& aLs) + { + _LIT(KMimeDir1,"c:\\system\\data\\Mimepath1\\"); + _LIT(KMimeDir2,"c:\\system\\data\\Mimepath2\\"); + + _LIT(KMimeDir1Html,"c:\\system\\data\\Mimepath1\\dir1_html"); + _LIT(KMimeDir1Text,"c:\\system\\data\\Mimepath1\\dir1_text"); + _LIT(KMimeDir2Html,"c:\\system\\data\\Mimepath2\\dir2_html"); + _LIT(KMimeDir2Text,"c:\\system\\data\\Mimepath2\\dir2_text"); + + //After directory renaming + _LIT(KRenameHtml,"c:\\system\\data\\Mimepath1\\dir2_html"); + _LIT(KRenameText,"c:\\system\\data\\Mimepath1\\dir2_text"); + + TBufC<50> mimeDir1(KMimeDir1); + TPtr ptrMimeDir1 (mimeDir1.Des()); + + TBufC<50> mimeDir2(KMimeDir2); + TPtr ptrMimeDir2 (mimeDir2.Des()); + + TBufC<50> mimeDir1Html(KMimeDir1Html); + TPtr ptrFile1x4(mimeDir1Html.Des()); + + TBufC<50> mimeDir1Text(KMimeDir1Text); + TPtr ptrFile1x2(mimeDir1Text.Des()); + + TBufC<50> mimeDir2Html(KMimeDir2Html); + TPtr ptrFile2x2(mimeDir2Html.Des()); + + TBufC<50> mimeDir2Text(KMimeDir2Text); + TPtr ptrFile2x4(mimeDir2Text.Des()); + + TBufC<50> renameText(KRenameText); + TPtr ptrRenameText(renameText.Des()); + + TBufC<50> renameHtml(KRenameHtml); + TPtr ptrRenameHtml(renameHtml.Des()); + + //"Asynchronous folder file recognition Test Group 14 + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directories for test files + CreateDirL(&utils, ptrMimeDir1); + CreateDirL(&utils, ptrMimeDir2); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + TTime aLaterTime(time); + TTimeIntervalMinutes aInterval(1); + aLaterTime+=(aInterval); + + // Fill the first directory with files + // Create files dir1_html000.html - dir1_html003.html with html content + // Create files dir1_text000.txt - dir1_text001.txt with text content + CreateFilesL(theFS, file, ptrFile1x4, (TDesC&)KSuffixHtml, 4, KHtmlContent, time); + CreateFilesL(theFS, file, ptrFile1x2, (TDesC&)KSuffixText, 2, KTextContent, time); + + // Fill the second directory with files + // Create files dir2_text000.txt - dir2_text003.txt with text content + // Create files dir2_html001.html - dir2_html002.html with html content + CreateFilesL(theFS, file, ptrFile2x4, (TDesC&)KSuffixText, 4, KTextContent, time); + CreateFilesL(theFS, file, ptrFile2x2, (TDesC&)KSuffixHtml, 2, KHtmlContent, time); + + //Test RecognizeFilesL on first directory with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir1,_L8("text/html"), *result1 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result1->Count(); + TEST(count == 4); + } + + + //Delete first directory (KMimeDir1) and rename second directory to be the + //first (KMimeDir2 -> KMimeDir1) + DeleteFilesL(&utils, ptrFile1x4, (TDesC&)KSuffixHtml, 4); + DeleteFilesL(&utils, ptrFile1x2, (TDesC&)KSuffixText, 2); + DeleteDirL(&utils, ptrMimeDir1); + utils.RenameDirectoryL(mimeDir2, mimeDir1); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.14.0")); + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir1,_L8("text/html"), *result2 ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result2->Count(); + TEST(count == 2); + } + + //Bin out all the remaining created files + DeleteFilesL(&utils, ptrRenameText, (TDesC&)KSuffixText, 4); + DeleteFilesL(&utils, ptrRenameHtml, (TDesC&)KSuffixHtml, 2); + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir1); + + // Cleanup + CleanupStack::PopAndDestroy(4, active); // utils, result2, result1, active + + } + +/** + @SYMTestCaseID T_Serv3Step_DoSyncRecognizerTest4L + + @SYMPREQ 699 + + @SYMREQ 3898 + + @SYMTestCaseDesc Test PREQ699.15.0, PREQ699.15.1 Validates cache performance with a typical directory + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions 1st Recognition - Recognize a directory that has significant file content + with the cache enabled and log the time taken. + 15.0 Repeat the recognition on the directory, it should be faster than + the first recognition. + 15.1 Alter a number of files and repeat, again logging the time. The time + taken should be faster than the 1st recognition, but slower than test 15.0 + + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for file creation + 15.0 Time taken faster than 1st recognition + 15.1 Time taken faster than 1st recognition, but slower than 15.0 + */ +void CT_Serv3Step::DoSyncFolderRecognizerTest4L(RApaLsSession& aLs) +{ + //Synchronous folder file recognition Test Group 15 + _LIT(KTestAppSource, "Z:\\System\\data\\" ); + _LIT(KTestAppDest, "C:\\System\\data\\TestPath\\" ); + _LIT(KEmpty, ""); + + _LIT(KTestWaitingForApplistUpdate,"\nWaiting %d microseconds for applist to be updated"); + const TInt KApplistUpdateTime = 8000000; + + TBufC<128> fileDir(KEmpty); + TPtr ptrFileDir(fileDir.Des()); + + CDataRecognitionResultArray* result1 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result2 = new(ELeave) CDataRecognitionResultArray(); + CDataRecognitionResultArray* result3 = new(ELeave) CDataRecognitionResultArray(); + + CleanupStack::PushL(result1); + CleanupStack::PushL(result2); + CleanupStack::PushL(result3); + + RFs theFS; + theFS.Connect(); + RFile file; + + // Remove Test app from the file system + CFileMan* fileManager = CFileMan::NewL (theFS); + + INFO_PRINTF1(_L("Copying the app to C")); + TEST(KErrNone == fileManager->Copy (KTestAppSource, KTestAppDest, CFileMan::EOverWrite )); + + INFO_PRINTF2(KTestWaitingForApplistUpdate, KApplistUpdateTime); + User::After(KApplistUpdateTime); + + TTime time; + TTime timeLater; + + //1st recognition + time.HomeTime(); + TInt ret=aLs.RecognizeFilesL(KTestAppDest,*result1); + timeLater.HomeTime(); + TEST(ret==KErrNone); + User::LeaveIfError(ret); + + TTimeIntervalMicroSeconds delayNoCache = timeLater.MicroSecondsFrom(time); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.15.0")); + time.HomeTime(); + ret=aLs.RecognizeFilesL(KTestAppDest,*result2); + timeLater.HomeTime(); + TEST(ret==KErrNone); + User::LeaveIfError(ret); + + TTimeIntervalMicroSeconds delayCache = timeLater.MicroSecondsFrom(time); + + //Modify the timestamps on a few files + TInt count = result1->Count(); + for(TInt i=1; i < (count/2); i++) + { + TDataRecognitionResult res; + result1->GetDataRecognitionResultL(res, i); + TFileName fileName; + result1->GetFileNameL(fileName, i); + + ptrFileDir.Copy(KTestAppDest); + ptrFileDir.Append(fileName); + + time.HomeTime(); + theFS.SetModified(ptrFileDir, time); + } + + INFO_PRINTF2(KTestWaitingForApplistUpdate, KApplistUpdateTime); + User::After(KApplistUpdateTime); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.15.1")); + time.HomeTime(); + ret=aLs.RecognizeFilesL(KTestAppDest,*result3); + timeLater.HomeTime(); + TEST(ret==KErrNone); + User::LeaveIfError(ret); + + TTimeIntervalMicroSeconds delayCache2 = timeLater.MicroSecondsFrom(time); +#ifndef __WINS__ + // On Emulator, these time related checks cannot always be ensured. + TEST(delayCache2 > delayCache); + TEST(delayCache2 < delayNoCache); +#endif + + // Cleanup + delete fileManager; + CleanupStack::PopAndDestroy(3, result1); // result3, result2, result1 +} + +/** + @SYMTestCaseID T_Serv3Step_DoAsyncRecognizerTest13L + + @SYMPREQ 699 + + @SYMREQ 3899 + + @SYMTestCaseDesc Test PREQ699.17.0 Validates performance of recognition. + + @SYMTestPriority High + + @SYMTestStatus Not Implemented + + @SYMTestActions Call RecognizeFilesL() without a filter on a directory + containing a text file named text.canyoutell + + API Calls:\n + RApaLsSession::RecognizeFilesL(const TDesC& aPath, + const TDesC8& aDataType, + CDataRecognitionResultArray& aResult, + TRequestStatus& aStatus); + CDataRecognitionResultArray::CDataRecognitionResultArray(); + CDataRecognitionResultArray::Count() const; + + @SYMTestExpectedResults\n + status = KErrNone for file creation + count = 1 returned + */ +void CT_Serv3Step::DoAsyncFolderRecognizerTest13L(RApaLsSession& aLs) +{ + //Asynchronous folder file recognition Test Group 17 + TBufC<50> mimeDir(KMimeDir); + TPtr ptrMimeDir (mimeDir.Des()); + + TBufC<350> mimeFile(KMimeFile); + TPtr ptrMimeFile(mimeFile.Des()); + + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + RFs theFS; + theFS.Connect(); + RFile file; + + RSmlTestUtils utils; + CleanupClosePushL(utils); + + //Create directory for test files + CreateDirL(&utils, ptrMimeDir); + + //Timestamp details for files + TTime time; + time.UniversalTime(); + + // Create file mime_content000.canyoutell with text content + CreateFilesL(theFS, file, ptrMimeFile, (TDesC&)KSuffixUnknown, 1, KHtmlContent, time); + + INFO_PRINTF1(_L("Asynchronous folder file Recognition Test PREQ699.17.0")); + //Test RecognizeFilesL with a MIME type filter "text/html" + aLs.RecognizeFilesL(KMimeDir,_L8("text/html"), *result ,active->iStatus); + + active->StartL();//set active + CActiveScheduler::Start(); + + TEST(active->iStatus==KErrNone); + if (active->iStatus==KErrNone) + { + TUint count = result->Count(); + TEST(count == 1); + } + + DeleteFilesL(&utils, ptrMimeFile, (TDesC&)KSuffixUnknown, 1); + + //Remove test directory + DeleteDirL(&utils, ptrMimeDir); + + // Cleanup + CleanupStack::PopAndDestroy(&utils);//utils + CleanupStack::PopAndDestroy(result);//result2 + CleanupStack::PopAndDestroy(active);//active + +} +/* + +@SYMTestCaseID APPFWK-APPARC-0098 + +@SYMDEF INC125788 + +@SYMTestCaseDesc The test verify that RApaLsSession::CancelRecognizeFiles() complete TRequestStatus with KErrCancel + that was passed to RApaLsSession::RecognizeFilesL() when cancelling the outstanding async recognition request. + +@SYMTestPriority High + +@SYMTestStatus Implemented + +@SYMTestActions +1.RApaLsSession::RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus) +is called to get data (MIME) types for files in a specified directory. +2.Outstanding async recognition request is cancelled using RApaLsSession::CancelRecognizeFiles(). + +@SYMTestExpectedResults +RApaLsSession::CancelRecognizeFiles() complete the TRequestStatus with KErrCancel. + +*/ +void CT_Serv3Step::DoAsyncFolderRecognizerTest14L(RApaLsSession& aLs) + { + //Setup Active Object + CActiveTest2* active = new(ELeave) CActiveTest2(); + CleanupStack::PushL(active); + + CDataRecognitionResultArray* result = new(ELeave) CDataRecognitionResultArray(); + CleanupStack::PushL(result); + + //Check results and Stop AS + _LIT(KStandardDir,"z:\\system\\data\\Testpath\\"); + + INFO_PRINTF1(_L("Asynchronous RecognizeFilesL Test")); + aLs.RecognizeFilesL(KStandardDir,*result,active->iStatus); + active->StartL();//set active + TEST(active->iStatus==KRequestPending); + INFO_PRINTF2(_L("RecognizeFilesL: iStatus = %d\n"), active->iStatus.Int()); + + aLs.CancelRecognizeFiles(); + TEST(active->iStatus==KErrCancel); + INFO_PRINTF2(_L("CancelRecognizeFiles: iStatus = %d\n"), active->iStatus.Int()); + CActiveScheduler::Start(); + + // Cleanup + CleanupStack::PopAndDestroy(result);//result + CleanupStack::PopAndDestroy(active);//active + } +/** +* Auxiliary Fn for the entire Test Step +* +* This method initiates all the tests. +* +*/ +TInt CT_Serv3Step::DoServComTestL() + { + INFO_PRINTF1(_L("Testing Server Com")); + + RFs theServFs; + TInt ret = theServFs.Connect(); + TEST(ret==KErrNone); + CleanupClosePushL(theServFs); + + + RTestableApaLsSession ls; + ret = ls.Connect(); + TEST(ret==KErrNone); + CleanupClosePushL(ls); + + //wait for CExtrasAppKeyLayout to open up a RApaLsSession so it doesn't mess with our result + //unsure why it affects this test but not the others + User::After(10000000); + + HEAP_TEST_LS_SESSION(ls, 0, 0, DoSyncFolderRecognizerTest1L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoSyncFolderRecognizerTest2L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoSyncFolderRecognizerTest3L(ls), ls.FlushRecognitionCache() ); + + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest1L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest2L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest3L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest4L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest5L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest6L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest7L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest8L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest9L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest10L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest11L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoSyncFolderRecognizerTest4L(ls), ls.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(ls, 0, 0, DoAsyncFolderRecognizerTest13L(ls), ls.FlushRecognitionCache() ); + //DONT_CHECK Skips the heap check at server side. This heap imbalance occurs randomly in server side + // while canceling the outstanding async request. + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, DoAsyncFolderRecognizerTest14L(ls), ls.FlushRecognitionCache() ); + + CleanupStack::PopAndDestroy(&ls); + + // close the server session and we have done some type store reloading + CleanupStack::PopAndDestroy(&theServFs); + + return KErrNone; + } + + + +TVerdict CT_Serv3Step::doTestStepPreambleL() +/** + * @return - TVerdict code + * Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_Serv3Step::doTestStepPostambleL() +/** + * @return - TVerdict code + * Override of base class virtual + */ + { + return TestStepResult(); + } + +void CT_Serv3Step::CreateDirL(RSmlTestUtils* aPtrUtils, TPtr aDirName) + { + User::LeaveIfError(aPtrUtils->Connect()); + aPtrUtils->CreateDirectoryL(aDirName); + + //Delay required to prevent armv5 failure + const TInt KApplistUpdateTime = 800000; + User::After(KApplistUpdateTime); + } + +void CT_Serv3Step::CreateFilesL(RFs& aFS, RFile& aFile, TPtr aFileRoot, TDesC& aSuffix, TInt aFileNumber, const TDesC8& aFileContent, TTime aTime = 0) + { + if(aTime == 0) + { + aTime.UniversalTime(); + } + + for(TInt counter=0; counterDeleteDirectoryL(aDirName); + } + +void CT_Serv3Step::DeleteFilesL(RSmlTestUtils* aPtrUtils, TPtr aDirName, TDesC& aSuffix, TInt aFileNumber) + { + for(TInt counter=0; counterDeleteFileL(aDirName); + TInt Length = aDirName.Length(); + TInt DeleteLength = aSuffix.Length() + KFixedNumWidth; + aDirName.Delete( (Length - DeleteLength) , DeleteLength); + } + } + +TVerdict CT_Serv3Step::doTestStepL() +/** + * Override of base class virtual. + * @return - TVerdict code + */ +{ + FbsStartup(); + TInt ret = RFbsSession::Connect(); + TEST(ret==KErrNone); + + // run the testcode (inside an alloc heaven harness) + INFO_PRINTF1(_L("About to start tests:")); + TRAP(ret,DoServComTestL()); + INFO_PRINTF2(_L(" DoServComTestL completes with %d"), ret); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("Test Completed!")); + return TestStepResult(); + +} + + +/** +* +* Methods for Active Object Test +* +* Used in for Asynchronous Data Recognizer tests +* +*/ + +CActiveTest2::CActiveTest2() + :CActive(0) + { + CActiveScheduler::Add(this); + } + +CActiveTest2::~CActiveTest2() + { + Cancel(); + } + +void CActiveTest2::DoCancel() + { + TRequestStatus* s=&iStatus; + User::RequestComplete(s, KErrNone); + } + +void CActiveTest2::StartL() + { + SetActive(); + } + +void CActiveTest2::RunL() + { + //Stop AS + CActiveScheduler::Stop(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv3Step.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_Serv3Step.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,87 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SERV3_STEP_H__) +#define __T_SERV3_STEP_H__ + +#include "ApparcTestServer.h" +#include "appfwk_test_utils.h" + +//! A CT_Serv3Step test class. +/*! + This class tests wrapper to Application Architecture Server. +*/ +class CT_Serv3Step :public CTestStep + { +public: + CT_Serv3Step(); + ~CT_Serv3Step(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); +private: + void DoSyncFolderRecognizerTest1L(RApaLsSession& aLs); + void DoSyncFolderRecognizerTest2L(RApaLsSession& aLs); + void DoSyncFolderRecognizerTest3L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest1L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest2L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest3L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest4L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest5L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest6L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest7L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest8L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest9L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest10L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest11L(RApaLsSession& aLs); + void DoSyncFolderRecognizerTest4L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest13L(RApaLsSession& aLs); + void DoAsyncFolderRecognizerTest14L(RApaLsSession& aLs); + TInt DoServComTestL(); + void testBooleanTruer(TBool aCondition, const TText8* aFile, TInt aLine); + +private: + void CreateDirL(RSmlTestUtils* aPtrUtils, TPtr aDirName); + void DeleteDirL(RSmlTestUtils* aPtrUtils, TPtr aDirName); + void DeleteFilesL(RSmlTestUtils* aPtrUtils, TPtr aDirName, TDesC& aSuffix, TInt aFileNumber); + void CreateFilesL(RFs& aFS, RFile& aFile, TPtr aDirName, TDesC& aSuffix, TInt aFileNumber, const TDesC8& aFileContent, TTime aTime); + CActiveScheduler* iActiveScheduler; + }; + +////////////////////////////////////////////////////////////////////////////// +// CActiveTest2::ActiveTest class definition +// +class CActiveTest2 : public CActive + { + public: + CActiveTest2(); + ~CActiveTest2(); + void StartL(); + + protected: + void DoCancel(); + void RunL(); + }; + +_LIT(KT_Serv3Step,"T_Serv3"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServiceRegistryStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServiceRegistryStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,346 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include "T_ServiceRegistryStep.h" +#include +#include "testableapalssession.h" +#include "appfwk_test_utils.h" + +/** + * Constructor + */ +CT_ServiceRegistryTestStep::CT_ServiceRegistryTestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_ServiceRegistryStep); + } + +/** + * Destructor + */ +CT_ServiceRegistryTestStep::~CT_ServiceRegistryTestStep() + { + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_ServiceRegistryTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +/** + * @return - TVerdict code + * Override of base class virtual + */ +TVerdict CT_ServiceRegistryTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_ServiceRegistryTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_ServiceRegistry Test Cases Running...")); + + // start an active scheduler + iScheduler=new(ELeave) CActiveScheduler(); + CActiveScheduler::Install(iScheduler); + + __UHEAP_MARK; + TInt ret; + TRAP(ret,RunTestCasesL()) + TEST(ret==KErrNone); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("...T_ServiceRegistry Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_ServiceRegistryTestStep::RunTestCasesL() + { + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + + // Use DONT_CHECK because it complaints of heap unbalance (a CTypeStoreManager object, althought it is not actually leaked, + // but reallocated in CApaAppListServer::DoUpdateTypeStoreL(void)). + // This unbalance happens 'randonmly', possibly a timing issue, as the TypeStore refresh is performed in response to a callback from + // a CApaFsMonitor object, which introduces an extra 0.25 second delay before invoking the callback. + // *** See DEF101056 **** + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, TestAssociation1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, TestAppForDataTypeAndServiceL(ls), NO_CLEANUP); + HEAP_TEST_LS_SESSION(ls, 0, DONT_CHECK, TestUpdateOfServiceRegistryOnAppUninstallationL(ls), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&ls); + return KErrNone; + } + +/** + @SYMTestCaseID T-ServiceRegistryTestStep-TestAssociation1L + + @SYMPREQ + + @SYMTestCaseDesc Test the functionality of ServiceRegistry + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests the addition, retrieval and deletions of + associations + + @SYMTestExpectedResults The association are added, retrieved and deleted + from the registry + */ +void CT_ServiceRegistryTestStep::TestAssociation1L() + { + INFO_PRINTF1(_L("TestAssociation1L")); + CServiceRegistry* registry = CServiceRegistry::NewL(); + CleanupStack::PushL(registry); + + const TUid uid1 = { 0x11111111 }; + const TUid uid2 = { 0x22222222 }; + + const TUid serviceUid1 = { 0x00001111 }; + const TUid serviceUid2 = { 0x00002222 }; + + const TDataType data1(uid1); + const TDataType data2(uid2); + + TUid result; + + TInt err = registry->GetDefault(serviceUid1, data1, result); + TEST(err == KErrNotFound); + TEST(result == KNullUid); + + err = registry->SetDefault(serviceUid1, data1, uid1); + TEST(err == KErrNone); + err = registry->SetDefault(serviceUid2, data2, uid2); + TEST(err == KErrNone); + + err = registry->GetDefault(serviceUid1, data1, result); + TEST(err == KErrNone); + TEST(result == uid1); + + err = registry->GetDefault(serviceUid2, data2, result); + TEST(err == KErrNone); + TEST(result == uid2); + + err = registry->RemoveEntry(serviceUid1, data1); + TEST(err == KErrNone); + + err = registry->RemoveEntry(serviceUid1, data1); + TEST(err == KErrNotFound); + + err = registry->GetDefault(serviceUid1, data1, result); + TEST(err == KErrNotFound); + TEST(result == KNullUid); + + err = registry->GetDefault(serviceUid2, data2, result); + TEST(err == KErrNone); + TEST(result == uid2); + + err = registry->RemoveEntry(serviceUid2, data2); + TEST(err == KErrNone); + + err = registry->GetDefault(serviceUid2, data2, result); + TEST(err == KErrNotFound); + TEST(result == KNullUid); + + CleanupStack::PopAndDestroy(registry); + } + +/** + @SYMTestCaseID T-ServiceRegistryTestStep-TestAppForDataTypeAndServiceL + + @SYMPREQ + + @SYMTestCaseDesc Test the functionality of ServiceRegistry + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Tests that the RApaLsSession::AppForDataTypeAndService + function behaves correctly when associations are added to the registry + + @SYMTestExpectedResults The correct application is returned + */ +void CT_ServiceRegistryTestStep::TestAppForDataTypeAndServiceL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("TestAppForDataTypeAndServiceL")); + + const TUid KUidServerApp = {0x10004c56}; + const TUid KUidServerApp2 = {0x10004c58}; + const TUid KUidServerAppDummy = {0x12344268}; + const TUid KUidService01020333 = {0x01020333}; + _LIT8(KLitMimeTypePriority,"text/priority"); + + CServiceRegistry* registry = CServiceRegistry::NewL(); + CleanupStack::PushL(registry); + + // Check first the default association (no association in registry) + TUid appUid; + TInt err = aLs.AppForDataTypeAndService(TDataType(KLitMimeTypePriority), KUidService01020333,appUid); + TEST(err == KErrNone); + TEST(appUid == KUidServerApp); + + // Check after having added an association in the registry + err = registry->SetDefault(KUidService01020333, TDataType(KLitMimeTypePriority), KUidServerApp2); + TEST(err == KErrNone); + + err = aLs.AppForDataTypeAndService(TDataType(KLitMimeTypePriority), KUidService01020333,appUid); + TEST(err == KErrNone); + TEST(appUid == KUidServerApp2); + + err = registry->RemoveEntry(KUidService01020333, TDataType(KLitMimeTypePriority)); + TEST(err == KErrNone); + + err = aLs.AppForDataTypeAndService(TDataType(KLitMimeTypePriority), KUidService01020333,appUid); + TEST(err == KErrNone); + TEST(appUid == KUidServerApp); + + // Check association with app that doesn't exist + err = registry->SetDefault(KUidService01020333, TDataType(KLitMimeTypePriority), KUidServerAppDummy); + TEST(err == KErrNone); + + err = aLs.AppForDataTypeAndService(TDataType(KLitMimeTypePriority), KUidService01020333,appUid); + TEST(err == KErrNone); + TEST(appUid == KUidServerApp); + + err = registry->RemoveEntry(KUidService01020333, TDataType(KLitMimeTypePriority)); + TEST(err == KErrNone); + + err = aLs.AppForDataTypeAndService(TDataType(KLitMimeTypePriority), KUidService01020333,appUid); + TEST(err == KErrNone); + TEST(appUid == KUidServerApp); + + CleanupStack::PopAndDestroy(registry); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0104 + + @SYMDEF INC138417 + + @SYMTestCaseDesc Tests whether a data mapping of an applicaiton is removed from + service registry if that applicaiton is uninstalled. + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Inserts data mapping for an applicaion and uninstalls that application. + Tests whether the inserted data mapping is removed from the service registry. + + @SYMTestExpectedResults The inserted data mapping is removed from the service registry. + */ + +void CT_ServiceRegistryTestStep::TestUpdateOfServiceRegistryOnAppUninstallationL(RApaLsSession& aLs) + { + INFO_PRINTF1(_L("TestUpdateOfServiceRegistryOnAppUninstallationL")); + RSmlTestUtils fs; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + + _LIT(KImportAppsDir,"c:\\private\\10003a3f\\import\\apps\\"); + + TInt err = fs.CreateDirectoryL(KImportAppsDir); + TESTEL((err == KErrNone || err == KErrAlreadyExists), err); + INFO_PRINTF1(_L("c:\\private\\10003a3f\\import\\apps is created successfully or already exists")); + + + // Copy TestUpdRegAppUninstallation_reg.rsc from z:\ to c:\private\10003a3f\import\apps\. + _LIT(KAppRscSourcePath,"z:\\system\\data\\TestUpdRegAppUninstallation_reg.rsc"); + _LIT(KAppRscTargetPath,"c:\\private\\10003a3f\\import\\apps\\TestUpdRegAppUninstallation_reg.rsc"); + + err = fs.CopyFileL(KAppRscSourcePath, KAppRscTargetPath); + TEST(err == KErrNone); + INFO_PRINTF1(_L("Successfully copied TestUpdRegAppUninstallati on_reg.rsc from Z:\\system\\data to c:\\private\\10003a3f\\import\\apps")); + + CServiceRegistry* registry = CServiceRegistry::NewL(); + CleanupStack::PushL(registry); + + //Wait till the application scanning is completed. + CTestApplistChangeObserver* obs = new(ELeave) CTestApplistChangeObserver(); + CleanupStack::PushL(obs); + CApaAppListNotifier* notif = CApaAppListNotifier::NewL(obs, CActive::EPriorityHigh); + CleanupStack::PushL(notif); + obs->iNotifier = notif; + CActiveScheduler::Start(); + INFO_PRINTF1(_L("Applicaiton scanning is completed.")); + CleanupStack::PopAndDestroy(notif); + + TUid uid1 = {0x10207f80}; + TUid resultUid={KNullUidValue}; + _LIT8(KLitMimeType,"mime/updregappuninstall"); + TDataType dataType (KLitMimeType); + + //Test whether 0x10207f80 application is in application list. + TApaAppInfo appInfo; + TEST(aLs.GetAppInfo(appInfo,uid1)==KErrNone); + + //Set 0x10207f80 as default application for "mime/updregappuninstall" MIME type. + registry->SetDefault(KOpenServiceUid,dataType, uid1); + registry->GetDefault(KOpenServiceUid,dataType, resultUid); + TEST(uid1==resultUid); + + TInt fileExists = EFalse; + fs.IsFilePresent(KAppRscTargetPath, fileExists); + if (fileExists) + { + fs.ChangeFilePermissionL(KAppRscTargetPath); // clear readonly attribute inherited from z: + err = fs.DeleteFileL(KAppRscTargetPath); + if(err == KErrNone) + INFO_PRINTF1(_L("Removed file TestUpdRegAppUninstallation_reg.rsc")); + else + INFO_PRINTF1(_L("Failed to remove TestUpdRegAppUninstallation_reg.rsc")); + } + + //Wait till the application scanning is completed + notif = CApaAppListNotifier::NewL(obs, CActive::EPriorityHigh); + CleanupStack::PushL(notif); + obs->iNotifier = notif; + CActiveScheduler::Start(); + INFO_PRINTF1(_L("Applicaiton scanning is completed.")); + CleanupStack::PopAndDestroy(notif); + CleanupStack::PopAndDestroy(obs); + + //Check the application is removed form the application list + TEST(aLs.GetAppInfo(appInfo,uid1)==KErrNotFound); + + //Check data mappings related to uninstalled applicaiton is also removed. + TEST(registry->GetDefault(KOpenServiceUid,dataType, resultUid)==KErrNotFound); + + CleanupStack::PopAndDestroy(registry); + CleanupStack::PopAndDestroy(&fs); + } + +void CTestApplistChangeObserver::HandleAppListEvent(TInt /*aEvent*/) + { + CActiveScheduler::Stop(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServiceRegistryStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServiceRegistryStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,59 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SERVICEREGISTRY_STEP_H__) +#define __T_SERVICEREGISTRY_STEP_H__ + +#include "appfwk_test_AppUi.h" +#include + +class RApaLsSession; + +_LIT(KT_ServiceRegistryStep,"T_ServiceRegistry"); + +class CT_ServiceRegistryTestStep : public CTestStep + { +public: + CT_ServiceRegistryTestStep(); + ~CT_ServiceRegistryTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestAssociation1L(); + void TestAppForDataTypeAndServiceL(RApaLsSession& aLs); + void TestUpdateOfServiceRegistryOnAppUninstallationL(RApaLsSession& aLs); + CActiveScheduler* iScheduler; + }; + +class CTestApplistChangeObserver : public CBase, public MApaAppListServObserver + { +public: // from MApaAppListServObserver + void HandleAppListEvent(TInt aEvent); +public: + CApaAppListNotifier* iNotifier; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServicesStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServicesStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,1360 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include "T_ServicesStep.h" + +_LIT(KCompleted, "Completed."); +_LIT8(KLitPlainText,"text/plain"); +_LIT8(KLitPriorityText,"text/priority"); +_LIT8(KLitCustom1Text, "text/custom1"); + +/** + Constructor + */ +CT_ServicesTestStep::CT_ServicesTestStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_ServicesStep); + } + +/** + Destructor + */ +CT_ServicesTestStep::~CT_ServicesTestStep() + { + iApaLsSession.Close(); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_ServicesTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + TInt error = iApaLsSession.Connect(); + TEST(error==KErrNone); + return TestStepResult(); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_ServicesTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + + +TVerdict CT_ServicesTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_Services Test Cases Running...")); + + TInt ret; + TRAP(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_Services Test Cases Completed.")); + + return TestStepResult(); + } + +TInt CT_ServicesTestStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery1L(), iApaLsSession.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery2L(), iApaLsSession.ClearAppInfoArray() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery3L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery4L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery5L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery6(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery7L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery8L(), NO_CLEANUP); + // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. + // This update takes place on the server side while the test case is still running, which causes the heap check to fail. + // To avoid the heap check on the server side, DONT_CHECK macro is used. + HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestServiceDiscovery9(), NO_CLEANUP ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery10L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery11L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery12L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery13L(), NO_CLEANUP); + +/** + #ifndef __SECURE_BIN__ + __UHEAP_MARK; + TRAP(r,TestServiceDiscovery14L()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + #endif + + + #ifndef __SECURE_BIN__ + __UHEAP_MARK; + TRAP(r,TestServiceDiscovery15L()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + #endif + + #ifndef __SECURE_BIN__ + __UHEAP_MARK; + TRAP(r,TestServiceDiscovery16L()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + #endif +*/ + + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery17L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery18L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery19(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery20L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery21L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery22(), iApaLsSession.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery23(), iApaLsSession.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery24(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery25(), iApaLsSession.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery27(), iApaLsSession.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestServiceDiscovery28L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestOpenService1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestCtrlPnlAppL(), NO_CLEANUP); + // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. + // This update takes place on the server side while the test case is still running, which causes the heap check to fail. + // To avoid the heap check on the server side, DONT_CHECK macro is used. + HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestPrioritySystemL(), NO_CLEANUP ); + return (KErrNone); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery1L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetServerApps with a service uid that is not provided by any application + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetServerApps with the service uid as parameter. + on z: drive.\n + API Calls:\n + RApaLsSession::GetServerApps(TUid aServiceUid) const + + @SYMTestExpectedResults Returns ENoMoreAppsInList since no application provides a service represented by the uid + + */ +void CT_ServicesTestStep::TestServiceDiscovery1L() + { + INFO_PRINTF1(_L("TestServiceDiscovery1 about to start...")); + const TUid KUidService = {0x01020300}; // service Uid + TInt ret = iApaLsSession.GetServerApps(KUidService);//initialize the list of apps offering service + TEST(ret==KErrNone);// test if initalized properly + TApaAppInfo appInfo; + // populate the list with all the apps and return the first apps + ret = iApaLsSession.GetNextApp(appInfo); + TEST(ret == RApaLsSession::ENoMoreAppsInList);// since no apps implements this service, ENoMoreAppsInList is returned + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery2L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetServerApps with uid that represents a service provided by more that one application + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions GetServerApps with a particular service uid as parameter, + making sure that this service uid is used in at least one application + on z: drive.\n + API Calls:\n + RApaLsSession::GetServerApps(TUid aServiceUid) const + + @SYMTestExpectedResults Returns a list of all applications that offers this service + + */ +void CT_ServicesTestStep::TestServiceDiscovery2L() + { + INFO_PRINTF1(_L("TestServiceDiscovery2 about to start...")); + const TUid KUidService1234 = {0x01020304};//uid of service + const TUid KUidServerApp1 = {0x10004c56}; //uid of one server app + const TUid KUidServerApp2 = {0x10004c57};//uid of second server app + TInt ret = iApaLsSession.GetServerApps(KUidService1234); + + TEST(ret==KErrNone); + TApaAppInfo appInfo; + ret = iApaLsSession.GetNextApp(appInfo); + TEST(ret==KErrNone); + TEST((appInfo.iUid==KUidServerApp2) || (appInfo.iUid==KUidServerApp1)); + ret = iApaLsSession.GetNextApp(appInfo); + TEST((appInfo.iUid==KUidServerApp2) || (appInfo.iUid==KUidServerApp1)); + ret = iApaLsSession.GetNextApp(appInfo); + TEST(ret == RApaLsSession::ENoMoreAppsInList);//only one app implements the service, ENoMoreAppsInList is returned + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery3L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServicesLC to get all the services provided by an application + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesLC with the app uid as parameter + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesLC(TUid aAppUid) const + + @SYMTestExpectedResults Returns an array of TApaAppServiceInfo objects. Each TApaAppServiceInfo contains details about a service uid and corresponding opaque data. + The returned data should be the same as that defined in the registration files. + In the case where the app provides the same services but with different opaque data, it can be checked that the opaque data is different for each service. + In the case where a service does not have any defined opaque data, it can be checked that the length of the returned descriptor for the opaque data is zero. + + */ +void CT_ServicesTestStep::TestServiceDiscovery3L() + { + INFO_PRINTF1(_L("TestServiceDiscovery3 about to start...")); + const TUid KUidService1234 = {0x01020304}; + const TUid KUidService2345 = {0x02030405}; + const TUid KUidServerApp = {0x10004c56}; + const TUid KUidService5678 = {0x05060708}; + const TUid KUidService = {0x01020333}; + + // get all services for a particular app + CApaAppServiceInfoArray* array = iApaLsSession.GetAppServicesLC(KUidServerApp); + TArray serviceArray(array->Array()); + TInt count = serviceArray.Count(); + TEST(count == 6); // app provides 5 services + 1 legacy open; just to make sure that app provides more than one service + + TPtrC8 opaqueData; + TResourceReader reader; + TPtrC16 theText; + TInt val(0); + + _LIT(KFirstService,"Non-localised text for service uid 0x01020304"); + _LIT(KSecondService,"Non-localised text for service uid 0x02030405"); + _LIT(KThirdService,"Non-localised resource A"); + _LIT(KFourthService,"Non-localised resource B"); + + TEST(serviceArray[0].Uid()==KOpenServiceUid); + const CArrayFixFlat& datatypes = serviceArray[0].DataTypes(); + TEST(datatypes.Count()==2); + TEST(0 == datatypes[0].iDataType.Des8().CompareF(KLitPlainText)); + TEST(0 == datatypes[1].iDataType.Des8().CompareF(KLitPriorityText)); + + + TEST(serviceArray[1].Uid()==KUidService1234); + opaqueData.Set(serviceArray[1].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val = theText.Compare(KFirstService)); + TEST(val==KErrNone); + TEST(serviceArray[1].DataTypes().Count()==0); + + TEST(serviceArray[2].Uid()==KUidService2345); + opaqueData.Set(serviceArray[2].OpaqueData()); + reader.SetBuffer(&opaqueData); + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val=theText.Compare(KSecondService)); + TEST(val==KErrNone); + const CArrayFixFlat& datatypes2 = + serviceArray[2].DataTypes(); + TEST(datatypes2.Count()==1); + TEST(0 == datatypes2[0].iDataType.Des8().CompareF(KLitCustom1Text)); + + TEST(serviceArray[3].Uid()==KUidService5678); + opaqueData.Set(serviceArray[3].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val = theText.Compare(KThirdService)); + TEST(val==KErrNone); + TEST(serviceArray[3].DataTypes().Count()==0); + + TEST(serviceArray[4].Uid()==KUidService5678); + opaqueData.Set(serviceArray[4].OpaqueData()); + reader.SetBuffer(&opaqueData); + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val=theText.Compare(KFourthService)); + TEST(val==KErrNone); + TEST(serviceArray[4].DataTypes().Count()==0); + + TUid myuid = serviceArray[5].Uid(); + TEST(myuid==KUidService); + opaqueData.Set(serviceArray[5].OpaqueData()); + TEST(opaqueData.Length()==0); + TEST(serviceArray[5].DataTypes().Count()==0); + + CleanupStack::PopAndDestroy(array); // the servicearray + array = NULL; + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery4L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetServiceImplementationsLC + which gets all the implementation details about a specific service + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call GetServiceImplementationsLC with the service uid as parameter + on z: drive.\n + API Calls:\n + RApaLsSession::GetServiceImplementationsLC(TUid aServiceUid) const + + @SYMTestExpectedResults Returns an array of TApaAppServiceInfo objects. + The size of the array is equal to the number of apps offering this service. + Each TApaAppServiceInfo contain an app uid and the respective opaquedata. + The returned data should be the same as that defined in the registration files. + + */ +void CT_ServicesTestStep::TestServiceDiscovery4L() + { + INFO_PRINTF1(_L("TestServiceDiscovery4 about to start...")); + const TUid KUidService1234 = {0x01020304}; + const TUid KUidServerApp1 = {0x10004c56}; + const TUid KUidServerApp2 = {0x10004c57}; + CApaAppServiceInfoArray* array = iApaLsSession.GetServiceImplementationsLC(KUidService1234); + TArray implArray(array->Array()); + TInt count = implArray.Count(); + TEST(count==2); + _LIT(KService,"Non-localised text for service uid 0x01020304"); + TPtrC8 opaqueData; + TResourceReader reader; + TPtrC16 theText; + TInt val(0); + + TUid myuid = implArray[0].Uid(); + // The services can appear in any order + if (myuid==KUidServerApp1) + { + TEST(myuid==KUidServerApp1); + myuid = implArray[1].Uid(); + TEST(myuid==KUidServerApp2); + const CArrayFixFlat& datatypes = implArray[1].DataTypes(); + TEST(datatypes.Count()==1); + TEST(0 == datatypes[0].iDataType.Des8().CompareF(KLitCustom1Text)); + } + else if (myuid==KUidServerApp2) + { + TEST(myuid==KUidServerApp2); + myuid = implArray[1].Uid(); + TEST(myuid==KUidServerApp1); + const CArrayFixFlat& datatypes = implArray[0].DataTypes(); + TEST(datatypes.Count()==1); + TEST(0 == datatypes[0].iDataType.Des8().CompareF(KLitCustom1Text)); + } + + opaqueData.Set(implArray[0].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val = theText.Compare(KService)); + TEST(val==KErrNone); + + opaqueData.Set(implArray[1].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val = theText.Compare(KService)); + TEST(val==KErrNone); + + CleanupStack::PopAndDestroy(array); + array = NULL; + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery5L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServicesL which gets all the service uids of a particular app + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesL with two parameters: the app uid and an array to put in the uid of the services + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesL(TUid aAppUid, CArrayFixFlat& aServiceUids) const + + @SYMTestExpectedResults Populates the array with the uids of the services offered by this particular app. + The returned data should be the same as that defined in the registration files. + + */ +void CT_ServicesTestStep::TestServiceDiscovery5L() + { + INFO_PRINTF1(_L("TestServiceDiscovery5 about to start...")); + const TUid KUidServerApp = {0x10004c56}; + const TUid KUidService1234 = {0x01020304}; + const TUid KUidService2345 = {0x02030405}; + const TUid KUidService5678 = {0x05060708}; + const TUid KUidService = {0x01020333}; + // get UIDs of all services implemented by an app + CArrayFixFlat* uidArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(uidArray); + iApaLsSession.GetAppServicesL(KUidServerApp,*uidArray); + TInt count = uidArray->Count(); + TUid uid; + if(count>0) + { + TEST(count==6); // Takes into account the open service + uid = (*uidArray)[0]; + TEST(uid==KUidService); + uid = (*uidArray)[1]; + TEST(uid==KUidService5678); + uid = (*uidArray)[2]; + TEST(uid==KUidService5678); + uid = (*uidArray)[3]; + TEST(uid==KUidService2345); + uid = (*uidArray)[4]; + TEST(uid==KUidService1234); + } + CleanupStack::PopAndDestroy(uidArray); + uidArray = NULL; + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery6 + + @SYMPREQ 538 + + @SYMTestCaseDesc Test for the functionality AppForDataTypeAndService in the case where two apps + provides have the same datatype definition in their registration file. One app offers the requested + service but has its priority assigned to normal while the other app does not offer the requested + service and has its priority assigned to high + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call AppForDataTypeAndService with three parameters: the datatype, the service uid + and an unitialised app uid + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const + + @SYMTestExpectedResults Sets the app uid to that of the app with lower priority since the one with higher + priority does not offer this service + + */ +void CT_ServicesTestStep::TestServiceDiscovery6() + { + INFO_PRINTF1(_L("TestServiceDiscovery6 about to start...")); + const TUid KUidServerAppHigh = {0x10004c57}; + const TUid KUidService = {0x02030405}; + const TUid KUidServerAppNormal = {0x10004c56}; + _LIT8(KLitMimeTypeServerAppData,"text/priority"); + TUid appUid; + TInt ret(0); + ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerAppData), KUidService,appUid); + TEST(ret==KErrNone); + TEST(appUid != KUidServerAppHigh); + TEST(appUid == KUidServerAppNormal); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery7L + + @SYMPREQ 538 + + @SYMTestCaseDesc Given the size of data that is returned from the server is greater than the default + 1024 bytes of the buffer, test if a larger buffer is assigned in such cases + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesLC with the app uid as parameter. The size of the resource data in + the registration file should be greater than the default size. + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesLC(TUid aAppUid) const + + @SYMTestExpectedResults A larger buffer is allocated. The size of the buffer can be tested by checking + the size of the returned data. + + */ +void CT_ServicesTestStep::TestServiceDiscovery7L() + { + INFO_PRINTF1(_L("TestServiceDiscovery7 about to start...")); + const TUid KUidServerApp = {0x10004c57}; + // get all services for a particular app + CApaAppServiceInfoArray* array = iApaLsSession.GetAppServicesLC(KUidServerApp); + TArray serviceArray(array->Array()); + TInt count = serviceArray.Count(); + TEST(count == 16); + TPtrC8 opaqueData; + TInt size(0); + for(TInt i=0;i=1024); + CleanupStack::PopAndDestroy(array); // the servicearray + array = NULL; + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery8L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test for the functionality of GetAppServiceOpaqueDataLC, particularly in the case + where an app offers two services with the same uid but different opaque data + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServiceOpaqueDataLC with two parameters: an app uid and a service uid + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const + + @SYMTestExpectedResults Returns an array of TApaAppServiceInfo objects. Each TApaAppServiceInfo object + contains the same service uid but different opaque data. The returned data should be the same as that + defined in the registration files. + + */ +void CT_ServicesTestStep::TestServiceDiscovery8L() + { + INFO_PRINTF1(_L("TestServiceDiscovery8 about to start...")); + const TUid KUidServerApp = {0x10004c56}; + const TUid KUidService = {0x05060708}; + CApaAppServiceInfoArray* array = iApaLsSession.GetAppServiceOpaqueDataLC(KUidServerApp, KUidService); + TArray implArray(array->Array()); + TInt count = implArray.Count(); + _LIT(KFirstService,"Non-localised resource A"); + _LIT(KSecondService,"Non-localised resource B"); + TPtrC8 opaqueData; + TResourceReader reader; + TPtrC16 theText; + if(count>0) + { + TEST(count==2); + + TEST(implArray[0].Uid()==KUidService); + opaqueData.Set(implArray[0].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + TInt val(0); + User::LeaveIfError(val=theText.Compare(KSecondService)); + TEST(val==KErrNone); + TEST(implArray[1].Uid()==KUidService); + opaqueData.Set(implArray[1].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val=theText.Compare(KFirstService)); + TEST(val==KErrNone); + } + + CleanupStack::PopAndDestroy(array); + array = NULL; + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery9 + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of AppForDataTypeAndService in the cases where + (a) the datatype is not defined in the registration file + (b) the data type is defined in the registration file + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions (a)Call InsertDataMapping to make a mapping between the datatype and app. The parameters + used are: the datatype object, the priority assigned and the app uid Call AppForDataTypeAndService with + the three parameters: the data type, the service uid and an unitialised uid for the returning value. + Call DeleteDataMapping with the datatype object as parameter to delete this mapping + (b) Call AppForDataTypeAndService with the three parameters: the data type, the service uid and an + unitialised uid for the returning value. + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const + + @SYMTestExpectedResults (a) Returns the app uid of the app that has this datatype and service requested. + It can be checked that the app uid corresponds to the app to which the mapping has been inserted. + (b) Returns the uid of the app that has this datatype and service uid defined in its registration file. + + */ +void CT_ServicesTestStep::TestServiceDiscovery9() + { + INFO_PRINTF1(_L("TestServiceDiscovery9 about to start...")); + const TUid KUidService1234 = {0x01020304}; + const TUid KUidServerApp = {0x10004c56}; + + TInt ret(0); + // Start AppForDataTypeAndService test cases + // make sure our data mapping is removed before executing the following test cases + _LIT8(KLitMimeTypeServerApp,"serverapp/data"); + _LIT8(KLitMimeTypeServerAppData,"text/plain"); + ret = iApaLsSession.InsertDataMapping(TDataType(KLitMimeTypeServerApp), + 1, KUidServerApp, KUidService1234); // need to remove magic number + TEST(ret==KErrNone); + // Waits till the data type mappings are restored from the data store ini file + iApaLsSession.WaitForTypeStoreUpdate(); + TUid appUid; + ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerApp), KUidService1234,appUid); + TEST(ret==KErrNone); + // KUidServerApp2 handles KLitMimeTypeJpeg with a higher priority than KUidServerApp, + // but doesn't implement service KUidService1234, so KUidServerApp should be returned + TEST(appUid == KUidServerApp); + ret = iApaLsSession.DeleteDataMapping(TDataType(KLitMimeTypeServerApp),KUidService1234); + TEST(ret==KErrNone); + // Waits till the data type mappings are restored from the data store ini file + iApaLsSession.WaitForTypeStoreUpdate(); + ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerAppData), KUidService1234,appUid); + TEST(ret==KErrNone); + TEST(appUid == KUidServerApp); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery10L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServicesLC on an app that does not provide any service + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesLC with the app uid as parameter + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesLC(TUid aAppUid) const + + @SYMTestExpectedResults Returns KErrNotFound + + */ +void CT_ServicesTestStep::TestServiceDiscovery10L() + { + INFO_PRINTF1(_L("TestServiceDiscovery10 about to start...")); + const TUid KUidServerApp = {0x01023450}; + TRAPD(r, iApaLsSession.GetAppServicesLC(KUidServerApp)); + TEST(r==KErrNotFound); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery11L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetServiceImplementationsLC using a service uid that is + not defined in any registration file + + @SYMTestPriority high + + @SYMTestStatus Implemented + + @SYMTestActions Call GetServiceImplementationsLC using a service uid not defined in any registration file + on z: drive.\n + API Calls:\n + RApaLsSession::GetServiceImplementationsLC(TUid aServiceUid) const + + @SYMTestExpectedResults Returns KErrNotFound + + */ +void CT_ServicesTestStep::TestServiceDiscovery11L() + { + INFO_PRINTF1(_L("TestServiceDiscovery11 about to start...")); + const TUid KUidService1230 = {0x01020300}; + TRAPD(r, iApaLsSession.GetServiceImplementationsLC(KUidService1230)); + TEST(r==KErrNotFound); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery12L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServicesL for an app that does not exist + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesL using an app uid that is not used by any app + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesL(TUid aAppUid, CArrayFixFlat& aServiceUids) const + + @SYMTestExpectedResults Returns KErrNotFound + + */ +void CT_ServicesTestStep::TestServiceDiscovery12L() + { + INFO_PRINTF1(_L("TestServiceDiscovery12 about to start...")); + const TUid KUidServerApp = {0x01020300}; + CArrayFixFlat* uidArray = new(ELeave) CArrayFixFlat(4); + CleanupStack::PushL(uidArray); + TRAPD(r,iApaLsSession.GetAppServicesL(KUidServerApp,*uidArray)); + CleanupStack::PopAndDestroy(uidArray); + TEST(r==KErrNotFound); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery13L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServiceOpaqueDataLC on an app that does + not provide a particular service + + @SYMTestPriority + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesL using an existing app uid and service uid that is not + defined in its registration file + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const + + @SYMTestExpectedResults Returns KErrNotFound + + */ + void CT_ServicesTestStep::TestServiceDiscovery13L() + { + INFO_PRINTF1(_L("TestServiceDiscovery13 about to start...")); + const TUid KUidServerApp = {0x01023456}; + const TUid KUidService = {0x05060708}; + TRAPD(r,iApaLsSession.GetAppServiceOpaqueDataLC(KUidServerApp, KUidService)); + TEST(r==KErrNotFound); + } + + + + + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery17L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServicesLC on a app that has a localised + resource defined in the registration file + + @SYMTestStatus Implemented + + @SYMTestPriority High + + @SYMTestActions Call GetAppServicesLC with the app uid as parameter + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesLC(TUid aAppUid) const + + @SYMTestExpectedResults Returns an array of TApaAppServiceInfo objects. + Each TApaAppServiceInfo contains details about a service uid and corresponding opaque data. + The returned data should be the same as that defined in the registration files. + + */ +void CT_ServicesTestStep::TestServiceDiscovery17L() + { + INFO_PRINTF1(_L("TestServiceDiscovery17 about to start...")); + const TUid KUidService1235 = {0x01020305}; + const TUid KUidServerApp = {0x10004c55}; + CApaAppServiceInfoArray* array = iApaLsSession.GetAppServicesLC(KUidServerApp); + TArray serviceArray(array->Array()); + TInt count = serviceArray.Count(); + TEST(count == 1); + TPtrC8 opaqueData; + TResourceReader reader; + TPtrC16 theText; + TInt val(0); + _LIT(KSecondService,"Localised text for service UID 0x01020305"); + TEST(serviceArray[0].Uid()==KUidService1235); + opaqueData.Set(serviceArray[0].OpaqueData()); + reader.SetBuffer(&opaqueData); + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val=theText.Compare(KSecondService)); + TEST(val==KErrNone); + CleanupStack::PopAndDestroy(array); // the servicearray + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery18L + + @SYMPREQ 538 + + @SYMTestCaseDesc Test the functionality of GetAppServicesLC on a app that has a localised resource + defined but the link to the resource file not specified in the registration file + + @SYMTestStatus Implemented + + @SYMTestPriority High + + @SYMTestActions Call GetAppServicesLC with the app uid as parameter + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesLC(TUid aAppUid) const + + @SYMTestExpectedResults Returns KErrNone + + */ +void CT_ServicesTestStep::TestServiceDiscovery18L() + { + INFO_PRINTF1(_L("TestServiceDiscovery18 about to start...")); + const TUid KUidServerApp = {0x10004c54}; + TRAPD(r, CleanupStack::PopAndDestroy(iApaLsSession.GetAppServicesLC(KUidServerApp))); + TEST(r==KErrNone); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery19 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestCaseDesc Test the functionality of AppForDataTypeAndService in the cases where + (a) the datatype requested is undefined for a particular service uid + (b) the service uid is not defined for any app + + @SYMTestStatus Implemented + + @SYMTestActions Call AppForDataTypeAndService with the three parameters: the data type, + the service uid and an unitialised uid for the returning value. + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const + + @SYMTestExpectedResults In both cases, the app uid value is set to null + + */ +void CT_ServicesTestStep::TestServiceDiscovery19() + { + INFO_PRINTF1(_L("TestServiceDiscovery19 about to start...")); + _LIT8(KLitMimeTypeServerAppData,"text/rubbish"); + _LIT8(KLitMimeTypeServerApp,"serverapp/data"); + TUid appUid=KNullUid; + TInt ret(0); + const TUid KUidService = {0x01020304}; + const TUid KUidServiceUnused = {0x01020300}; + ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerAppData), KUidService,appUid); + TEST(ret==KErrNone); + TEST(appUid == KNullUid); + ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerApp), KUidServiceUnused,appUid); + TEST(ret==KErrNone); + TEST(appUid == KNullUid); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery20L + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestCaseDesc Test the functionality of GetAppServicesLC to get all the services + provided by an application that does not exist + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServicesLC with the app uid as parameter + + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServicesLC(TUid aAppUid) const + + @SYMTestExpectedResults Returns KErrNotFound + + */ +void CT_ServicesTestStep::TestServiceDiscovery20L() + { + INFO_PRINTF1(_L("TestServiceDiscovery20 about to start...")); + const TUid KUidServerApp = {0x10001111}; + // get all services for a particular app + TRAPD(r,iApaLsSession.GetAppServicesLC(KUidServerApp)); + TEST(r==KErrNotFound); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery21L + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestCaseDesc Test the functionality of GetAppServiceOpaqueDataLC on an app that does not exist + + @SYMTestStatus Implemented + + @SYMTestActions Call GetAppServiceOpaqueDataLC with two parameters: an app uid and a service uid + + on z: drive.\n + API Calls:\n + RApaLsSession::GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const + + @SYMTestExpectedResults Returns KErrNotFound + + */ +void CT_ServicesTestStep::TestServiceDiscovery21L() + { + INFO_PRINTF1(_L("TestServiceDiscovery21L about to start...")); + const TUid KUidServerApp = {0x10004c58}; + const TUid KUidService = {0x01020304}; + // get all services for a particular app + TRAPD(r,iApaLsSession.GetAppServiceOpaqueDataLC(KUidServerApp,KUidService)); + TEST(r==KErrNotFound); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery22 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc Test the functionality ofAppForDocumentAndService given an existing file name and service uid + + @SYMTestActions Call AppForDocumentAndService with two parameters: a filename, a service uid, an + app uid and the datatype requested + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults Returns KErrNone.It returns the first app that can offer this service and initialise the + datatype that describes the datatype in the document + + */ +void CT_ServicesTestStep::TestServiceDiscovery22() + { + // AppForDocumentAndService test cases + INFO_PRINTF1(_L("TestServiceDiscovery22 about to start...")); + TInt ret(0); + TUid appUid=KNullUid; + const TUid KUidService = {0x01020303}; + TDataType dataType; + const TUid TUidExpected = {0x10004c54}; + _LIT8(KLitMimeTypeServerData,"text/plain"); + ret = iApaLsSession.AppForDocumentAndService(_L("z:\\system\\data\\one_byte.txt"), KUidService, appUid, dataType); + TEST(ret==KErrNone); + TEST(dataType==TDataType(KLitMimeTypeServerData)); + TEST(appUid==TUidExpected); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery23 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc Test the functionality ofAppForDocumentAndService given an existing file name and undefined service uid + + @SYMTestActions Call AppForDocumentAndService with two parameters: a filename, a service uid, an + app uid and the datatype requested + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults Returns KErrNone.The value returned for appuid is null.The datatype is set to the one that can desribe the + datatype in the document + + */ +void CT_ServicesTestStep::TestServiceDiscovery23() + { + // AppForDocumentAndService test cases + INFO_PRINTF1(_L("TestServiceDiscovery23 about to start...")); + TInt ret(0); + TUid appUid=KNullUid; + const TUid KUidService = {0x01120304}; + TDataType dataType; + _LIT8(KLitMimeTypeServerData,"text/plain"); + ret = iApaLsSession.AppForDocumentAndService(_L("z:\\system\\data\\one_byte.txt"), KUidService, appUid, dataType); + TEST(ret==KErrNone); + TEST(appUid==KNullUid); + TEST(dataType==TDataType(KLitMimeTypeServerData)); + } + + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery24 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc Test the functionality ofAppForDocumentAndService given an undefined file name + + @SYMTestActions Call AppForDocumentAndService with two parameters: a filename, a service uid, an + app uid and the datatype requested + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults Returns KErrNone.The value returned for appuid is null.The returned value for the datatpe + is null. + + */ +void CT_ServicesTestStep::TestServiceDiscovery24() + { + // AppForDocumentAndService test cases + INFO_PRINTF1(_L("TestServiceDiscovery24 about to start...")); + TInt ret(0); + TUid appUid=KNullUid; + const TUid KUidService = {0x01020304}; + TDataType dataType; + ret = iApaLsSession.AppForDocumentAndService(_L(""), KUidService, appUid, dataType); + TEST(ret==KErrNone); + TEST(appUid==KNullUid); + TEST(dataType.Uid()==KNullUid); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery25 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc Test the functionality ofAppForDocumentAndService given a file name, a file, service uid and file server + + @SYMTestActions Call AppForDocumentAndService with two parameters: a filename, a service uid, an + app uid and the datatype requested + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults Returns KErrNone.The value returned for appuid is that of the app that provides this services.If more than + one app provides this service, it returns the first app in the list. The returned value for the datatype is that + that describes the datatype in the document + + */ + +void CT_ServicesTestStep::TestServiceDiscovery25() + { + INFO_PRINTF1(_L("TestServiceDiscovery25 about to start...")); + const TUid KUidService = {0x01020303}; + TInt ret(0); + TUid appUid=KNullUid; + const TUid TUidExpected = {0x10004c54}; + _LIT8(KLitMimeTypeServerData,"text/plain"); + TDataType dataType; + RFile file; + _LIT(KOneByteFileName, "z:\\system\\data\\one_byte.txt"); + RFs fs; + ret = fs.Connect(); + ret = fs.ShareProtected(); + ret = file.Open(fs, KOneByteFileName, EFileRead|EFileShareAny); + TEST(ret==KErrNone); + ret = iApaLsSession.AppForDocumentAndService(file, KUidService, appUid, dataType); + TEST(appUid==TUidExpected); + TEST(dataType==TDataType(KLitMimeTypeServerData)); + TEST(ret==KErrNone); + fs.Close(); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery26 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc Test the functionality ofAppForDocumentAndService given a file, service uid,file server and undefined file name + + @SYMTestActions Call AppForDocumentAndService with two parameters: a filename, a service uid, an + app uid and the datatype requested + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults Returns KErrBadHandle. The app uid is set to null, the uid of datatype is set to null + + */ +void CT_ServicesTestStep::TestServiceDiscovery26() + { + INFO_PRINTF1(_L("TestServiceDiscovery26 about to start...")); + const TUid KUidService = {0x01020304}; + TInt ret(0); + TUid appUid=KNullUid; + TDataType dataType; + RFile file; + _LIT(KOneByteFileName, "z:\\system\\data\\imaginary_byte.txt"); + RFs fs; + ret = fs.Connect(); + ret = fs.ShareProtected(); + ret = file.Open(fs, KOneByteFileName, EFileRead|EFileShareAny); + TEST(ret==KErrNotFound); + ret = iApaLsSession.AppForDocumentAndService(file, KUidService, appUid, dataType); + TEST(appUid==KNullUid); + TEST(dataType.Des8().Length()==0); + TEST(ret==KErrBadHandle); + fs.Close(); + + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestServiceDiscovery27 + + @SYMPREQ 538 + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc Test the functionality ofAppForDocumentAndService given a file name, a file, file server and a service uid that the app + does not provide * + + @SYMTestActions Call AppForDocumentAndService with two parameters: a filename, a service uid, an + app uid and the datatype requested + on z: drive.\n + API Calls:\n + RApaLsSession::AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults Returns KErrNone.The value returned for app uid is null.The datatype is set to that that + describes the datatype in the document + + */ +void CT_ServicesTestStep::TestServiceDiscovery27() + { + INFO_PRINTF1(_L("TestServiceDiscovery27 about to start...")); + const TUid KUidService = {0x01000300}; + TInt ret(0); + TUid appUid=KNullUid; + TDataType dataType; + RFile file; + _LIT(KOneByteFileName, "z:\\system\\data\\one_byte.txt"); + RFs fs; + ret = fs.Connect(); + ret = fs.ShareProtected(); + ret = file.Open(fs, KOneByteFileName, EFileRead|EFileShareAny); + TEST(ret==KErrNone); + ret = iApaLsSession.AppForDocumentAndService(file, KUidService, appUid, dataType); + TEST(appUid==KNullUid); + _LIT8(KLitMimeTypeServerData,"text/plain"); + TEST(dataType==TDataType(KLitMimeTypeServerData)); + TEST(ret==KErrNone); + fs.Close(); + } + +/** + * @SYMTestCaseID T_ServicesTestStep_TestServiceDiscovery28L + * + * @SYMPREQ 538 + * + * @SYMTestCaseDesc Test the functionality of GetServiceImplementationsLC + * which gets all the implementation details about a specific service + * @SYMTestPriority + * + * @SYMTestStatus Implemented + * + * @SYMTestActions Call GetServiceImplementationsLC with the service uid as parameter + * on z: drive.\n + * API Calls:\n + * RApaLsSession::GetServiceImplementationsLC(TUid aServiceUid, const TDataType& aDataType) const + * + * @SYMTestExpectedResults Returns an array of TApaAppServiceInfo objects. + * The size of the array is equal to the number of apps offering the specified service that + * also handles the speficied datatype. + * Each TApaAppServiceInfo contain an app uid and the respective opaquedata. + * The returned data should be the same as that defined in the registration files. + * + */ +void CT_ServicesTestStep::TestServiceDiscovery28L() + { + INFO_PRINTF1(_L("TestServiceDiscovery28 about to start...")); + const TUid KUidService1234 = {0x01020304}; + //const TUid KUidServerApp1 = {0x10004c56}; + const TUid KUidServerApp2 = {0x10004c57}; + + TDataType datatype(KLitCustom1Text); + CApaAppServiceInfoArray* array = iApaLsSession.GetServiceImplementationsLC(KUidService1234, datatype); + TArray implArray(array->Array()); + TInt count = implArray.Count(); + TEST(count==1); + _LIT(KService,"Non-localised text for service uid 0x01020304"); + TPtrC8 opaqueData; + TResourceReader reader; + TPtrC16 theText; + TInt val(0); + TUid myuid = implArray[0].Uid(); + TEST(myuid==KUidServerApp2); + const CArrayFixFlat& datatypes = implArray[0].DataTypes(); + TEST(datatypes.Count()==1); + TEST(0 == datatypes[0].iDataType.Des8().CompareF(KLitCustom1Text)); + opaqueData.Set(implArray[0].OpaqueData()); + reader.SetBuffer(&opaqueData); // opaqueData is an LTEXT resource + theText.Set(reader.ReadTPtrC16()); + User::LeaveIfError(val = theText.Compare(KService)); + TEST(val==KErrNone); + CleanupStack::PopAndDestroy(array); + array = NULL; + } + +/** + * @SYMTestCaseID T_ServicesTestStep_TestOpenService1 + * + * @SYMPREQ + * + * @SYMTestCaseDesc This test checks that the Open service and legacy datatypes + * functions return the same results. See defect INC053978 as well. + * + * @SYMTestPriority High + * + * @SYMTestStatus Implemented + * + * @SYMTestActions \n + * API Calls:\n + * + * @SYMTestExpectedResults + * + */ +void CT_ServicesTestStep::TestOpenService1L() + { + INFO_PRINTF1(_L("TestOpenService1L about to start...")); + + // First try using the legacy method + _LIT8(KLitDummyopen1,"text/dummyopen1"); + TUid expectedAppUid1={0x10208200}; + TUid uid1; + TInt error1 = iApaLsSession.AppForDataType(TDataType(KLitDummyopen1), uid1); + TEST(error1==KErrNone); + TEST(uid1==expectedAppUid1); + + // Then try with legacy API but new Open service in reg file + _LIT8(KLitDummyopen2,"text/dummyopen2"); + TUid expectedAppUid2={0x10208201}; + TUid uid2; + TInt error2 = iApaLsSession.AppForDataType(TDataType(KLitDummyopen2), uid2); + TEST(error2==KErrNone); + TEST(uid2==expectedAppUid2); + + // Try with new API and old registration file format + TUid uid3; + TInt error3 = iApaLsSession.AppForDataTypeAndService(TDataType(KLitDummyopen1), + KOpenServiceUid, uid3); + TEST(error3==KErrNone); + TEST(uid3==expectedAppUid1); + + // Try with new API and new registration file format + TUid uid4; + TInt error4 = iApaLsSession.AppForDataTypeAndService(TDataType(KLitDummyopen2), + KOpenServiceUid, uid4); + TEST(error4==KErrNone); + TEST(uid4==expectedAppUid2); + + INFO_PRINTF1(KCompleted); + } + +//Test that the datatype list in the registration file is skipped +void CT_ServicesTestStep::TestCtrlPnlAppL() + { + INFO_PRINTF1(_L("TestCtrlPnlAppL about to start...")); + TUid appUid={0x10207f79}; + TUid serviceUid = {0x10101010}; + CDesCArray* filesArray = new(ELeave) CDesCArraySeg(1); + CleanupStack::PushL(filesArray); + TInt ret = iApaLsSession.GetAppOwnedFiles(*filesArray,appUid); + TEST(ret==KErrNone); + TInt count(0); + count = filesArray->Count(); + TEST(count == 1); + CApaAppServiceInfoArray* array = iApaLsSession.GetAppServicesLC(appUid); + TArray serviceArray(array->Array()); + count = serviceArray.Count(); + TEST(count == 1); + TEST(serviceArray[0].Uid()==serviceUid); + CleanupStack::PopAndDestroy(2); + filesArray = NULL; + array = NULL; + } + +/** + * @SYMTestCaseID T_ServicesTestStep_TestPrioritySystemL + * + * @SYMPREQ + * + * @SYMTestCaseDesc Checks that the system priority for data handlers requires + * WriteDeviceData capability + * + * @SYMTestPriority High + * + * @SYMTestStatus Implemented + * + * @SYMTestActions \n + * API Calls:\n + * + * @SYMTestExpectedResults + * + */ +void CT_ServicesTestStep::TestPrioritySystemL() + { + INFO_PRINTF1(_L("TestPrioritySystemL about to start...")); + // App 0x10207f7b has system priority and WriteDeviceData so it should + // be returned and not 0x10207f7f which has only high priority + const TUid KUidService1 = {0x10207f7d}; + TUid appUid=KNullUid; + const TUid TUidExpected1 = {0x10207f7b}; + _LIT8(KLitMimeTypeServerData,"text/custom1"); + TInt ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerData), KUidService1,appUid); + TEST(ret==KErrNone); + TEST(appUid == TUidExpected1); + + // App 0x10207f7e has system priority but not WriteDeviceData so it should + // be 0x10207f7f that is returned that has high priority + const TUid KUidService2 = {0x10207f7e}; + const TUid TUidExpected2 = {0x10207f7f}; + ret=iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerData), KUidService2,appUid); + TEST(ret==KErrNone); + TEST(appUid == TUidExpected2); + + // System priority handler take precedence over user mappings + const TUid KUidServerApp = {0x10004c56}; + ret = iApaLsSession.InsertDataMapping(TDataType(KLitMimeTypeServerData), + 1, KUidServerApp, KUidService1); + TEST(ret==KErrNone); + // Waits till the data type mappings are restored from the data store ini file + iApaLsSession.WaitForTypeStoreUpdate(); + ret = iApaLsSession.AppForDataTypeAndService(TDataType(KLitMimeTypeServerData), KUidService1,appUid); + TEST(ret==KErrNone); + TEST(appUid == TUidExpected1); + ret = iApaLsSession.DeleteDataMapping(TDataType(KLitMimeTypeServerData),KUidService1); + TEST(ret==KErrNone); + // Waits till the data type mappings are restored from the data store ini file + iApaLsSession.WaitForTypeStoreUpdate(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServicesStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_ServicesStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,76 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SERVICES_STEP_H__) +#define __T_SERVICES_STEP_H__ + +#include "testableapalssession.h" +#include "appfwk_test_AppUi.h" + +_LIT(KT_ServicesStep,"T_Services"); + +class CT_ServicesTestStep : public CTestStep + { +public: + CT_ServicesTestStep(); + ~CT_ServicesTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + TInt RunTestCasesL(); + void TestServiceDiscovery1L(); + void TestServiceDiscovery2L(); + void TestServiceDiscovery3L(); + void TestServiceDiscovery4L(); + void TestServiceDiscovery5L(); + void TestServiceDiscovery6(); + void TestServiceDiscovery7L(); + void TestServiceDiscovery8L(); + void TestServiceDiscovery9(); + void TestServiceDiscovery10L(); + void TestServiceDiscovery11L(); + void TestServiceDiscovery12L(); + void TestServiceDiscovery13L(); + + void TestServiceDiscovery17L(); + void TestServiceDiscovery18L(); + void TestServiceDiscovery19(); + void TestServiceDiscovery20L(); + void TestServiceDiscovery21L(); + void TestServiceDiscovery22(); + void TestServiceDiscovery23(); + void TestServiceDiscovery24(); + void TestServiceDiscovery25(); + void TestServiceDiscovery26(); + void TestServiceDiscovery27(); + void TestServiceDiscovery28L(); + void TestOpenService1L(); + void TestCtrlPnlAppL(); + void TestPrioritySystemL(); + +private: + RTestableApaLsSession iApaLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartAppStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartAppStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,698 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include "T_StartAppStep.h" +#include "tstapp.h" +#include "TRApaLsSessionStartAppTest.h" +#include + +_LIT(KCompleted, "Completed."); +_LIT8(KLitPlainText,"text/plain"); + +const TInt KTUnProtectedAppTestPassed = 1234; + +class RIpcApparcFuzzTest : public RSessionBase + { +public: + RIpcApparcFuzzTest(CTestStep& aTestFuzz);// Constructor + ~RIpcApparcFuzzTest();//Destructor + void RunFuzzTestL(); +private: + CTestStep& iTestFuzz; + }; + +RIpcApparcFuzzTest::RIpcApparcFuzzTest(CTestStep& aTestFuzz):iTestFuzz(aTestFuzz) + { + } + +RIpcApparcFuzzTest::~RIpcApparcFuzzTest() + { + Close(); + } +/** + @SYMTestCaseID APPFWK-APPARC-0086 + + @SYMDEF DEF116002 IpcFuzz Test on CApaAppListServSession::GetExecutableNameGivenDataTypeL and AppForDataTypeL + + @SYMTestPriority Medium + + @SYMTestStatus Implemented + + @SYMTestActions Create AppListServer server session and pass the HBufC descriptor to the + apparc server APIs GetExecutableNameGivenDataTypeL() and AppForDataTypeL(). + + @SYMTestExpectedResults Test should return KErrArgument if client passes other than TDataType. + */ + +void RIpcApparcFuzzTest::RunFuzzTestL() + { + iTestFuzz.INFO_PRINTF1(_L("Testing appserv APIs GetExecutableNameGivenDataTypeL and AppForDataTypeL ")); + TInt ret; + TVersion version(1,1,1); + ret = CreateSession(_L("!AppListServer"),version,4); + iTestFuzz.TEST(ret ==KErrNone); + HBufC* buf = HBufC::NewLC(268); + TPtr ptr = buf->Des(); + TIpcArgs args; + args.Set(0, &ptr); + ret = SendReceive(14, args); // Send bad args to CApaAppListServSession::AppForDataTypeL using enum value of EAppListServAppForDataType + iTestFuzz.TEST(ret ==KErrArgument); + iTestFuzz.INFO_PRINTF1(_L("Testing CApaAppListServSession::AppForDataTypeL() is completed ")); + args.Set(2, &ptr); + ret = SendReceive(21, args);// Send bad args to CApaAppListServSession::GetExecutableNameGivenDataTypeL using enum value EAppListServGetExecutableNameGivenDocument + iTestFuzz.TEST(ret ==KErrArgument); + iTestFuzz.INFO_PRINTF1(_L("Tesing CApaAppListServSession::GetExecutableNameGivenDataTypeL() is completed ")); + iTestFuzz.INFO_PRINTF2(_L("Test successfully returns KErrArgument %d"),ret); + CleanupStack::PopAndDestroy(buf); + } + +/** + Constructor + */ +CT_StartAppTestStep::CT_StartAppTestStep() + { + // Call base class method to set up the human readable name for logging*/ + SetTestStepName(KT_StartAppStep); + } + +/** + Destructor + */ +CT_StartAppTestStep::~CT_StartAppTestStep() + { + iApaLsSession.Close(); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_StartAppTestStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + TInt error = iApaLsSession.Connect(); + TEST(error==KErrNone); + return TestStepResult(); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_StartAppTestStep::doTestStepPostambleL() + { + return TestStepResult(); + } + + +TVerdict CT_StartAppTestStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_StartApp Test Cases Running...")); + TRAPD(ret,RunTestCasesL()); + TEST(ret==KErrNone); + + TRAP(ret,TestIpcFuzzL()); + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_StartApp Test Cases Completed.")); + return TestStepResult(); + } + +void CT_StartAppTestStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp1L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp2L(), iApaLsSession.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp3L(), iApaLsSession.FlushRecognitionCache() ); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp4L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp5L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp6L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp7L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp8L(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestStartApp9L(), NO_CLEANUP); + // The following two APIs InsertDataMappingL() & DeleteDataMappingL(), update the type store on the server side. + // This update takes place on the server side while the test case is still running, which causes the heap check to fail. + // To avoid the heap check on the server side, DONT_CHECK macro is used. + + HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestInsertDataTypeL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, TestAppForDataTypeL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, DONT_CHECK, TestDeleteDataTypeL(), NO_CLEANUP); + } + +/** + @SYMTestCaseID T-Serv2Step-StartAppTests1L + + @SYMPREQ + + @SYMTestCaseDesc Test Launching of an application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Prepare command line information to start an application using + CApaCommandLine Apis.Call RApaLsSession::StartApp() to start an + application defined by the command line information.\n + Test the launching of application for following scenarios:\n + (1) When Application specified by command line exists.\n + (2) When Application specified by command line does not exist.\n + API Calls:\n + RApaLsSession::StartApp(const CApaCommandLine& aCommandLine)\n + + @SYMTestExpectedResults The test observes that StartApp() returns KErrNone and + starts the app in the first scenario. In the second case KErrNotFound is + returned. + + */ +void CT_StartAppTestStep::TestStartApp1L() + { + INFO_PRINTF1(_L("Test RApaLsSession::StartApp using CApaCommandLine.....")); + CApaCommandLine* cmdLn=CApaCommandLine::NewLC(); + TFileName filename; + _LIT(KLitExePath,"\\sys\\bin\\texe.exe"); + TFullName exePath(KLitExePath); + filename = SearchAndReturnCompleteFileName(exePath); + + _LIT8(KLitDogfish,"dogfish"); + _LIT(KLitWibble,"wibble"); + cmdLn->SetExecutableNameL(filename); + cmdLn->SetTailEndL(KLitDogfish); + TInt ret = iApaLsSession.StartApp(*cmdLn); // explicit + TEST(ret==KErrNone); + + // start a non-existant app + cmdLn->SetExecutableNameL(KLitWibble); + + ret = iApaLsSession.StartApp(*cmdLn); + TEST(ret==KErrNotFound); + + CleanupStack::PopAndDestroy(cmdLn); // cmdLn + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestStartApp2L + + @SYMPREQ + + @SYMTestCaseDesc. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + \n + + @SYMTestExpectedResults . + + */ +void CT_StartAppTestStep::TestStartApp2L() + { + INFO_PRINTF1(_L("Test RApaLsSession::AppForDocument using filename and app uid....")); + TUid testUid={0x10004c4f}; + iStartAppTestsUid.iUid=0; + TDataType data; + _LIT(KLitDocPath,"\\system\\data\\TRApaLsSessionStartAppTest.tst"); + iStartAppTestsFilename = SearchAndReturnCompleteFileName(KLitDocPath); + TInt ret=iApaLsSession.AppForDocument(iStartAppTestsFilename,iStartAppTestsUid,data); + TEST(ret==KErrNone); + TEST(iStartAppTestsUid==testUid); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestStartApp3L + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + \n + + @SYMTestExpectedResults + + */ +void CT_StartAppTestStep::TestStartApp3L() + { + INFO_PRINTF1(_L("Test RApaLsSession::StartDocument.....start the app from the recognized doc given.")); + + TThreadId startAppThreadID; + TPtrC startAppTestsDoc(KLitTRApaLsSessionStartAppTest); + TInt ret=iApaLsSession.StartDocument(startAppTestsDoc,startAppThreadID); + TEST(ret==KErrNone); + + //we need to close the started thread, if appropiate + if (ret==KErrNone) + { + RThread thread; + User::LeaveIfError(thread.Open(startAppThreadID)); + CleanupClosePushL(thread); + + RProcess process; + User::LeaveIfError(thread.Process(process)); + CleanupClosePushL(process); + + process.Kill(0); + + CleanupStack::PopAndDestroy(&process); + CleanupStack::PopAndDestroy(&thread); + } + + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T-RApaLsSessionTestStep-TestStartApp4L + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + \n + + @SYMTestExpectedResults + + */ +void CT_StartAppTestStep::TestStartApp4L() + { + INFO_PRINTF1(_L("Test RApaLsSession::StartDocument....known data type")); + TThreadId startAppThreadID; + TInt ret=iApaLsSession.StartDocument(iStartAppTestsFilename, TDataType(KLitMimeType_TRApaLsSessionStartAppTest),startAppThreadID); + TEST(ret==KErrNone); + + //we need to close the started thread, if appropiate + if (ret==KErrNone) + { + RThread thread; + User::LeaveIfError(thread.Open(startAppThreadID)); + CleanupClosePushL(thread); + + RProcess process; + User::LeaveIfError(thread.Process(process)); + CleanupClosePushL(process); + + process.Kill(0); + + CleanupStack::PopAndDestroy(&process); + CleanupStack::PopAndDestroy(&thread); + } + + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestStartApp5L + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + \n + + @SYMTestExpectedResults + + */ +void CT_StartAppTestStep::TestStartApp5L() + { + INFO_PRINTF1(_L("Test RApaLsSession::StartDocument....unknown data type")); + + TThreadId startAppThreadID; + TInt ret=iApaLsSession.StartDocument(iStartAppTestsFilename, TDataType(_L8("text/plain/no thanks")),startAppThreadID); + TEST(ret==KErrNotFound); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestStartApp6L + + @SYMPREQ + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + \n + + @SYMTestExpectedResults + + */ +void CT_StartAppTestStep::TestStartApp6L() + { + INFO_PRINTF1(_L("Test RApaLsSession::StartDocument....known App Uid")); + + TThreadId startAppThreadID; + TInt ret=iApaLsSession.StartDocument(iStartAppTestsFilename,iStartAppTestsUid,startAppThreadID); + TEST(ret==KErrNone); + + //we need to close the started thread, if appropiate + if (ret==KErrNone) + { + RThread thread; + User::LeaveIfError(thread.Open(startAppThreadID)); + CleanupClosePushL(thread); + + RProcess process; + User::LeaveIfError(thread.Process(process)); + CleanupClosePushL(process); + + process.Kill(0); + + CleanupStack::PopAndDestroy(&process); + CleanupStack::PopAndDestroy(&thread); + } + + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestStartApp7L + + @SYMPREQ + + @SYMTestCaseDesc Test mapping of a MIME type to an application. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + \n + + @SYMTestExpectedResults Checks mapping of a MIME type to an application. + + */ +void CT_StartAppTestStep::TestStartApp7L() + { + INFO_PRINTF1(_L("Test RApaLsSession::StartDocument....non existent file.")); + + TThreadId startAppThreadID; + iStartAppTestsFilename = SearchAndReturnCompleteFileName(_L("\\system\\data\\not_here_thanks.foo")); + TInt ret=iApaLsSession.StartDocument(iStartAppTestsFilename, startAppThreadID); + TEST(ret==KErrNotFound); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0071 + + @SYMDEF PDEF100072 -- CApaWindowGroupName::SetAppUid() and FindByAppUid panic + + @SYMTestCaseDesc Test Launching of an application with unprotected application UID + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Prepare command line information to start an application using + CApaCommandLine Apis.Call RApaLsSession::StartApp() to start an + application defined by the command line information.\n + Test the launching of application for following scenario:\n + When Application specified by command line has unprotected application UID(negative uid).\n + API Calls:\n + RApaLsSession::StartApp(const CApaCommandLine &aCommandLine, TThreadId &aThreadId);\n + + @SYMTestExpectedResults The test checks whether the thread has terminated with the exit reason KTUnProtectedAppTestPassed + */ +void CT_StartAppTestStep::TestStartApp8L() + { + INFO_PRINTF1(_L("Checking launching of an application which has unprotected UID")); + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); + TFileName filename; + _LIT(KAppFileName, "z:\\sys\\bin\\UnProctectedUidApp.exe"); + TFullName exePath(KAppFileName); + filename = SearchAndReturnCompleteFileName(exePath); + cmdLine->SetExecutableNameL(filename); + + TThreadId appThreadId(0U); + TInt ret = iApaLsSession.StartApp(*cmdLine, appThreadId); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupStack::PopAndDestroy(cmdLine); // cmdLine + + RThread appThread; + User::LeaveIfError(appThread.Open(appThreadId)); + + TRequestStatus logonRequestStatus; + appThread.Logon(logonRequestStatus); + + // wait for UnProctectedUidApp.exe to terminate + INFO_PRINTF1(_L("Waiting for application to terminate...")); + User::WaitForRequest(logonRequestStatus); + + const TExitType exitType = appThread.ExitType(); + const TInt exitReason = appThread.ExitReason(); + TExitCategoryName categoryName = appThread.ExitCategory(); + appThread.Close(); + + TBuf<50> msg; + if (exitType == EExitPanic) + { + _LIT(KAppPanicInfo, "Application panic: %S %d"); + msg.Format(KAppPanicInfo, &categoryName, exitReason); + } + else + { + _LIT(KAppExitInfo, "Application exited with code %d"); + msg.Format(KAppExitInfo, exitReason); + } + INFO_PRINTF1(msg); + + TEST(logonRequestStatus == KTUnProtectedAppTestPassed); + TEST(exitType == EExitKill); + TEST(exitReason == KTUnProtectedAppTestPassed); + INFO_PRINTF1(KCompleted); + } +/** + @SYMTestCaseID APPFWK-APPARC-0076 + + @SYMDEF INC104463 + + @SYMTestCaseDesc Testing StartApp API by forcing memory leak. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Apparc should kill the child process if a leave occurs in StartApp API. + API Calls:\n + RApaLsSession::StartApp \n + + @SYMTestExpectedResults Test should complete without any panic. + + */ + +void CT_StartAppTestStep::TestStartApp9L() + { + INFO_PRINTF1(_L("Test to check the StartApp API with forced memory failures...")); + CApaCommandLine* cmdLn=CApaCommandLine::NewLC(); + TFileName filename; + TThreadId threadId(0); + TInt fail; + _LIT(KLitExePath,"\\sys\\bin\\texe.exe"); + TFullName exePath(KLitExePath); + filename = SearchAndReturnCompleteFileName(exePath); + cmdLn->SetExecutableNameL(filename); + TInt ret = KErrNoMemory; + //Without the fix for the Incident INC104463, the OOM test causes panic + //KERN-EXEC 56. + for(fail=1; ret == KErrNoMemory; fail++) + { + __UHEAP_SETFAIL(RHeap::EDeterministic, fail); + __UHEAP_MARK; + ret = iApaLsSession.StartApp(*cmdLn, threadId); + __UHEAP_MARKEND; + __UHEAP_RESET; + TEST((ret==KErrNoMemory || ret==KErrNone)); + if(ret == KErrNone) + { + TEST(threadId.Id() != 0); + } + } + INFO_PRINTF3(_L("Iteration count is %d and the value of return is %d "),fail-1 ,ret); + CleanupStack::PopAndDestroy(cmdLn); + INFO_PRINTF1(KCompleted); + } + + + +/** + @SYMTestCaseID CT_RApaLsSessionTestStep_TestInsertDataTypeL + + @SYMPREQ Data caging + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + API Calls:\n + RApaLsSession::InsertDataMapping \n + RApaLsSession::InsertDataMappingIfHigher \n + @SYMTestExpectedResults + * + */ +void CT_StartAppTestStep::TestInsertDataTypeL() + { + INFO_PRINTF1(_L("Test RApaLsSession::InsertDataMapping....Check data type mapping addition")); + const TDataTypePriority KPriLow = 1; + const TDataTypePriority KPriHigh = 2; + TBool added=EFalse; + + TInt err=iApaLsSession.InsertDataMapping(TDataType(KLitPlainText), KPriLow, KUidTestApp); + INFO_PRINTF2(_L("returned, %d"), err); + TSecurityInfo info; + info.Set(RProcess()); + + info.iCaps.HasCapability(ECapabilityWriteDeviceData) ? TEST(err==KErrNone) : TEST(err==KErrPermissionDenied); + + err=iApaLsSession.InsertDataMappingIfHigher(TDataType(KLitPlainText), KPriHigh, KUidTestApp, added); + INFO_PRINTF2(_L("returned, %d"), err); + info.iCaps.HasCapability(ECapabilityWriteDeviceData) ? TEST(err==KErrNone && added) : TEST(err==KErrPermissionDenied); + if (err==KErrNone) + { + // Waits till the data type mappings are restored from the data store ini file + iApaLsSession.WaitForTypeStoreUpdate(); + } + INFO_PRINTF1(_L("Test RApaLsSession::InsertDataMapping....Check data type mapping addition....Done")); + } + +/** + @SYMTestCaseID T_RApaLsSessionTestStep_TestAppForDataTypeL + + @SYMPREQ + + @SYMTestCaseDesc . + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions \n + API Calls:\n + + @SYMTestExpectedResults + + */ +void CT_StartAppTestStep::TestAppForDataTypeL() + { + INFO_PRINTF1(_L("Test RApaLsSession::AppForDataType....Check an app binding")); + _LIT8(KLitPlainText,"text/plain"); + TUid testUid={KTestAppUidValue}; + + TInt ret=iApaLsSession.AppForDataType(TDataType(KLitPlainText),iStartAppTestsUid); + TEST(ret==KErrNone); + TEST(iStartAppTestsUid==testUid); + INFO_PRINTF1(KCompleted); + } + +/** + @SYMTestCaseID CT_RApaLsSessionTestStep::TestDeleteDataTypeL + + @SYMPREQ Data caging + + @SYMTestCaseDesc + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + API Calls:\n + RApaLsSession::DeleteDataMapping \n + @SYMTestExpectedResults + + */ + +void CT_StartAppTestStep::TestDeleteDataTypeL() + { + INFO_PRINTF1(_L("Test RApaLsSession::DeleteDataMapping....Check data type mapping deletion")); + + TInt err=iApaLsSession.DeleteDataMapping(TDataType(KLitPlainText)); + INFO_PRINTF2(_L("returned, %d"), err); + TSecurityInfo info; + info.Set(RProcess()); + + info.iCaps.HasCapability(ECapabilityWriteDeviceData) ? TEST(err==KErrNone) : TEST(err==KErrPermissionDenied); + if(err==KErrNone) + { + // Waits till the data type mappings are restored from the data store ini file + iApaLsSession.WaitForTypeStoreUpdate(); + } + INFO_PRINTF1(_L("Test RApaLsSession::DeleteDataMapping....Check data type mapping deletion....Done")); + } + +TFileName CT_StartAppTestStep::SearchAndReturnCompleteFileName(const TDesC& aFileName) + { + RFs fs; + TInt ret = fs.Connect(); + TEST(ret==KErrNone); + + TParsePtrC parse(aFileName); + TFindFile findFile(fs); + ret = findFile.FindByDir(parse.NameAndExt(), parse.Path()); + if (ret!=KErrNone) + { + TBuf<64> buffer; + buffer.Format(_L("Error while finding the file, %d"), ret); + } + fs.Close(); + return findFile.File(); + } + +void CT_StartAppTestStep::TestIpcFuzzL() + { + INFO_PRINTF1(_L("Test IpcFuzz DEF116002 Started")); + RIpcApparcFuzzTest testIpc(*this); + CleanupClosePushL(testIpc); + TRAPD(err,testIpc.RunFuzzTestL()); + TEST(err==KErrNone); + CleanupStack::PopAndDestroy(&testIpc); + INFO_PRINTF1(_L("Test IpcFuzz DEF116002 Completed")); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartAppStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartAppStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,66 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_DATATYPEMAPPINGS_STEP_H__) +#define __T_DATATYPEMAPPINGS_STEP_H__ + +#include "testableapalssession.h" +#include "appfwk_test_AppUi.h" + +_LIT(KT_StartAppStep,"T_StartApp"); + +class CT_StartAppTestStep : public CTestStep + { +public: + CT_StartAppTestStep(); + ~CT_StartAppTestStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + void RunTestCasesL(); + void TestStartApp1L(); + void TestStartApp2L(); + void TestStartApp3L(); + void TestStartApp4L(); + void TestStartApp5L(); + void TestStartApp6L(); + void TestStartApp7L(); + void TestStartApp8L(); + void TestStartApp9L(); + void TestInsertDataTypeL(); + void TestAppForDataTypeL(); + void TestDeleteDataTypeL(); + void TestIpcFuzzL(); + +private: + TFileName SearchAndReturnCompleteFileName(const TDesC& aFileName); + +private: + RTestableApaLsSession iApaLsSession; + TFileName iStartAppTestsFilename; + TUid iStartAppTestsUid; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartDocStep.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartDocStep.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,143 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include "testableapalssession.h" +#include "T_StartDocStep.h" +#include "TStartDoc.h" + +/** + @SYMTestCaseID T-StartDocStep-TestStartDocL + + @SYMPREQ PHAR-5NTCWY + + @SYMTestCaseDesc + Checks that document names longer than 256 characters can be started. + The test starts a document and checks that the application launched + to handle that document is passed the full document name. + The test uses the StartDocument overload which does not provide an + application UID or mime type, because we want the test to check that + the long document name is supported by the data recognizer framework. + The test also checks that the data recognizer framework doesn't return + an error because it incorrectly assumes the document name is a file name + and tries to open the document to read its contents before performing + data recognition. + In this case, the document name isn't a file name, it's a pretend URL + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + 1. Call RApaLsSession::StartDocument passing a long document name (KLitLongURL). + 2. StartDocument should cause TStartDocApp.app to be launched, so wait + for the application thread to terminate. + 3. Check the thread has terminated in the way we expected + + @SYMTestExpectedResults + Calling RApaLsSession::StartDocument should cause the apparc server to + call CLongUrlRec::DoRecognizeL as part of trying to find the mime type + of the document. CLongUrlRec returns a mime type which is associated with + TStartDocApp.app, so apparc server starts TStartDocApp.app passing the + long document name on the command line. + The long document name should eventually be passed through to + CStartDocAppUi::ProcessCommandParametersL which will panic with + EPanicDocNameCheck1Failed if the document name isn't KLitLongURL. + CStartDocDocument::OpenFileL panics with EPanicDocNameCheck1NotExecuted if + the document name check in CStartDocAppUi::ProcessCommandParametersL wasn't + executed. + CStartDocDocument::OpenFileL panics with EPanicDocNameCheck2Failed if + the document name returned by CApaProcess::MainDocFileName isn't KLitLongURL. + + TStartDocApp.app should exit with KTStartDocTestPassed. + + */ +void CT_StartDocStep::TestStartDocL(RApaLsSession& aLs) + { + TPtrC longURL(KLitLongURL); + // sanity check to ensure the document name we're going to pass to + // RApaLsSession::StartDocument is longer than the maximum length + // of a file name + TEST(longURL.Length() > KMaxFileName); + + TThreadId appThreadId(0U); + // start document, causing TStartDocApp.app to be launched + INFO_PRINTF1(_L("Starting document...")); + TInt ret = aLs.StartDocument(longURL, appThreadId); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + + RThread appThread; + User::LeaveIfError(appThread.Open(appThreadId)); + TRequestStatus logonRequestStatus; + appThread.Logon(logonRequestStatus); + + // wait for TStartDocApp.app to terminate + INFO_PRINTF1(_L("Waiting for application to terminate...")); + User::WaitForRequest(logonRequestStatus); + + const TExitType exitType = appThread.ExitType(); + const TInt exitReason = appThread.ExitReason(); + TExitCategoryName categoryName = appThread.ExitCategory(); + appThread.Close(); + + TBuf<50> msg; + if (exitType == EExitPanic) + { + _LIT(KAppPanicInfo, "Application panic: %S %d"); + msg.Format(KAppPanicInfo, &categoryName, exitReason); + } + else + { + _LIT(KAppExitInfo, "Application exited with code %d"); + msg.Format(KAppExitInfo, exitReason); + } + INFO_PRINTF1(msg); + + TEST(logonRequestStatus == KTStartDocTestPassed); + TEST(exitType == EExitKill); + TEST(exitReason == KTStartDocTestPassed); + + //avoid race conditions + User::After(1500000); + } + +TVerdict CT_StartDocStep::doTestStepL() +{ + INFO_PRINTF1(_L("Test Started")); + + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + + //avoid race conditions + User::After(1500000); + + // run the test + HEAP_TEST_LS_SESSION(ls, 0, 0, TestStartDocL(ls), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&ls); + + INFO_PRINTF1(_L("Test Finished")); + + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartDocStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_StartDocStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,38 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_STARTDOCSTEP_H__) +#define __T_STARTDOCSTEP_H__ + +#include + +class CT_StartDocStep : public CTestStep + { +public: + virtual TVerdict doTestStepL(); +private: + void TestStartDocL(RApaLsSession& aLs); + }; + +_LIT(KT_StartDocStep, "T_StartDoc"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_SysStartApparcStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_SysStartApparcStep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,231 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include + +#include "T_SysStartApparcStep.h" +#include "tssaac\tssaac.h" + +_LIT(KApparcPanicFile,"c:\\T_SSAAC_PanicResultFile.txt"); + + +const TChar KDelimChar = '='; + +/** + The expected results are hard coded from the test specification. +*/ +//Test case 1 +const TInt KExpectedStartApp1LRes1 = KErrNone; +const TInt KExpectedStartApp1LRes2 = KErrNotFound; + +//Test case 99 +const TInt KExpectedLocalisedCaptionLRes1 = 0; +const TInt KExpectedLocalisedCaptionLRes2 = 0; + +/** + Read the results of the individual tests. The test number is determined by + reading the configuration file z:\\apparctest\\TestCaseConfig.txt and then one + of two functions is called, one which handles tests which panic and one which + handles tests which don't. + + Non-paniccing test results are read from file c:\\SysStartApparc_TestStartApp1L.txt + The order in which these results are written in CSysStartApparcTestCase::WriteResultFileL() + MUST match the order in which they are read and tested in CheckApparcResultsL() + The expected results are hard coded from the test specification.(see above) + + Paniccing test results are read from file c:\\T_SSAAC_PanicResultFile.txt + The result is a '1 or 0' to represent a PASS or a FAIL The actual pass critria + are found in file sysstart_apparc_checkEpocWind.bat where the test is performed and + the T_SSAAC_PanicResultFile file created with the appropriate result + +*/ + +/** + Read the results of the individual tests that do not panic. Currently, there is + only one test that does not panic. Results are read in from file SysStartApparc_TestStartApp1L.txt + and compared with the expected results + +*/ +void CT_SysStartApparcStep::CheckApparcResultsL() + { + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + + RFileReadStream reader; + User::LeaveIfError(reader.Open(fs, KSsaacResultFile, EFileRead)); + CleanupClosePushL(reader); + + TBuf8<64> myDes; + TInt ret = 0; + + // Read 16 bits - StartApp1LRes1 + reader.ReadL(myDes, KDelimChar); + ret = reader.ReadInt16L(); + + if(iTestcase == 1) + { + INFO_PRINTF3(_L("Test StartApp1LRes1 Count - Expected: %d, Actual: %d"), KExpectedStartApp1LRes1, ret); + TEST(ret==KExpectedStartApp1LRes1); + } + else + { // test case is 99 + INFO_PRINTF3(_L("Test LocalisedCaptionLRes1 Count - Expected: %d, Actual: %d"), KExpectedLocalisedCaptionLRes1, ret); + TEST(ret==KExpectedLocalisedCaptionLRes1); + } + + // Read 16 bits - StartApp1LRes2 + reader.ReadL(myDes, KDelimChar); + ret = reader.ReadInt16L(); + + if(iTestcase == 1) + { + INFO_PRINTF3(_L("Test StartApp1LRes2 Count - Expected: %d, Actual: %d"), KExpectedStartApp1LRes2, ret); + TEST(ret==KExpectedStartApp1LRes2); + } + else // test cass is 99 + { + INFO_PRINTF3(_L("Test LocalisedCaptionLRes2 Count - Expected: %d, Actual: %d"), KExpectedLocalisedCaptionLRes2, ret); + TEST(ret==KExpectedLocalisedCaptionLRes2); + } + + // clean-up + CleanupStack::PopAndDestroy(2, &fs); + } + +/** + Read the results of the individual tests that panic. After a panic, the + batch file sysstartapparc_checkEpocWind.bat searched the EpocWind.out file + for lines of text that verify that a panic has occurred with the correct + KERN-EXEC number and then writes the result to a text file (pass=1, fail=0) + for processing here. + +*/ +void CT_SysStartApparcStep::CheckApparcPanicResultsL() + { + RFs fs; + User::LeaveIfError(fs.Connect()); + INFO_PRINTF1(_L("File server connected")); + + CleanupClosePushL(fs); + + RFileReadStream reader; + User::LeaveIfError(reader.Open(fs, KApparcPanicFile, EFileRead)); + + CleanupClosePushL(reader); + + TBuf8<64> myDes; + + TInt expected = 1; //a PASS + + //File containd a test name and a test result, Move past the test name + reader.ReadL(myDes, KDelimChar); + + //Read the test result + reader.ReadL(myDes, KDelimChar); + + // Read 16 bits - StartApp1LRes1 + TChar result(reader.ReadUint8L()); + TInt ret = result.GetNumericValue(); + INFO_PRINTF3(_L("Test StartApp1LRes1 Count - Expected: %d, Actual: %d"), KTestResultPass, ret); + TEST(ret==expected); + + // clean-up + CleanupStack::PopAndDestroy(2, &fs); + } + + +/** + Destructor +*/ +CT_SysStartApparcStep::~CT_SysStartApparcStep() + { + } + +/** + Constructor +*/ +CT_SysStartApparcStep::CT_SysStartApparcStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_SysStartApparcStep); + } + +/** + Override of base class virtual. + @return - TVerdict code +*/ + +TVerdict CT_SysStartApparcStep::doTestStepL() + { + INFO_PRINTF1(_L("Test T_SysStartApparcStep: Started")); + + __UHEAP_MARK; + TInt ret=KErrGeneral; + iTestcase=ReadConfigFileL(); + + //Test case 1 and 99 are the only tests that do not panic + if( (iTestcase==1) || (iTestcase==29) ) + { + TRAP(ret, CheckApparcResultsL()); + } + else + { + TRAP(ret, CheckApparcPanicResultsL()); + } + INFO_PRINTF2(_L("CheckApparcResultsL ends with code %d"), ret); + TEST(ret==KErrNone); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test T_SysStartApparcStep: Finished")); + return TestStepResult(); + } + +/** +Reads the input config file and returns the test case number +Defined in sysstart_apparc_run.bat +@return TInt - the test case number +*/ +TInt CT_SysStartApparcStep::ReadConfigFileL() + { + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + + RFileReadStream reader; + User::LeaveIfError(reader.Open(fs, KApparcConfigFile, EFileRead)); + CleanupClosePushL(reader); + + TBuf8<255> aDes; + reader.ReadL(aDes, KDelimChar); + + //Read in a two character representation of a number and convert to an integer + TChar result1(reader.ReadInt8L()); + TChar result0(reader.ReadInt8L()); + TInt aTestCase = result1.GetNumericValue()*10 + result0.GetNumericValue(); + + // clean-up + CleanupStack::PopAndDestroy(2, &fs); + + return aTestCase; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_SysStartApparcStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_SysStartApparcStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,69 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SYSSTARTAPPARCSTEP_H__) +#define __T_SYSSTARTAPPARCSTEP_H__ + +#include "ApparcTestServer.h" +#include "tssaac\SysStartApparcTestCases.h" // KApparcResultFile + +#define KTestResultPass 1 + + +/** + Literal used as name for test case. +*/ +_LIT(KT_SysStartApparcStep,"T_SysStartApparc"); +_LIT(KApparcStartupT_TestStartApp1L,"T_TestStartApp1L"); +_LIT(KApparcStartupT_TestStartApp2L,"T_TestStartApp2L"); +_LIT(KApparcStartupT_TestStartApp3L,"T_TestStartApp3L"); +_LIT(KApparcStartupT_TestStartApp4L,"T_TestStartApp4L"); +_LIT(KApparcStartupT_TestStartApp5L,"T_TestStartApp5L"); +_LIT(KApparcStartupT_TestStartApp6L,"T_TestStartApp6L"); +_LIT(KApparcStartupT_TestGetAllApps,"T_TestGetAllApps"); +_LIT(KApparcStartupT_TestInsertDataTypeL,"T_TestInsertDataTypeL"); +_LIT(KApparcStartupT_TestAppForDataTypeL,"T_TestAppForDataTypeL"); +_LIT(KApparcStartupT_TestDeleteDataTypeL,"T_TestDeleteDataTypeL"); +_LIT(KApparcStartupT_TestServiceDiscovery,"T_TestServiceDiscovery"); +_LIT(KApparcStartupT_TestGetAppInfo,"T_TestGetAppInfo"); +_LIT(KApparcStartupT_TestAppCount,"T_TestAppCount"); +_LIT(KApparcStartupT_TestCreateDoc,"T_TestCreateDoc"); +_LIT(KApparcStartupT_TestLocalisedCaptionL,"T_TestLocalisedCaptionL"); + + +/** + CT_SysStartApparcStep encapsulates the functionality required + for the T_SysStartApparcTest SysStart test case. +*/ +class CT_SysStartApparcStep : public CTestStep + { +public: + CT_SysStartApparcStep(); + ~CT_SysStartApparcStep(); + virtual TVerdict doTestStepL(); + void CheckApparcPanicResultsL(); + void CheckApparcResultsL(); + TInt ReadConfigFileL(); + TInt iTestcase; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WgnamStep.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WgnamStep.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,330 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Test accessing window group name.\n +// Tests accessing & modifier functionality of CApaWindowGroupName API.\n +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include "T_WgnamStep.h" + +/** + Auxiliary Fn for Test Case ID T-WgnamStep-testWgNamesL + + This function accepts current window group name as descriptor and prints it.\n + +*/ +void CT_WgnamStep::PrintWindowGroupName(const TPtrC& aWndGroupName) + { + _LIT(KWindowGroupName, "Current name=\"%S\"\n"); + TFileName buffer; + buffer.Format(KWindowGroupName, &aWndGroupName); + INFO_PRINTF1(buffer); + } + + +/** + @SYMTestCaseID T-WgnamStep-testWgNamesL + + @SYMPREQ + + @SYMTestCaseDesc Test setting and accessing functionality of Window group name. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions The test checks the following functionality of CApaWindowGroupName\n + (1) Creation of window group name object.\n + (2) Setting the task to be a System task.\n + (3) Setting the task to be Busy.\n + (4) Setting document name as filename.\n + (5) Setting the task's capability to shutdown.\n + (6) Setting the task's capability to switch between files.\n + (7) Setting the tasks Uid.\n + (8) Setting the tasks caption.\n + (9) Setting the tasks Document name.\n + (10) Setting the task to be ready.\n + (11) Setting a name to a window group name.\n + \n + In each of the cases the setter function is called to set a particular + attribute. The attribute is cross checked by verifying with its + corresponding getter / accessor function. After setting each of the attributes + the test tries to analyze the impact of the attribute changed, on the windows + group name.\n + API Calls:\n + CApaWindowGroupName::NewL(const RWsSession& aWsSession)\n + CApaWindowGroupName::SetSystem(TBool aSystem)\n + CApaWindowGroupName::IsSystem() const\n + CApaWindowGroupName::SetBusy(TBool aBusy)\n + CApaWindowGroupName::IsBusy() const\n + CApaWindowGroupName::SetDocNameIsAFile(TBool aDocNameIsAFile)\n + CApaWindowGroupName::DocNameIsAFile() const\n + CApaWindowGroupName::SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent)\n + CApaWindowGroupName::RespondsToShutdownEvent() const\n + CApaWindowGroupName::SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent)\n + CApaWindowGroupName::RespondsToSwitchFilesEvent() const\n + CApaWindowGroupName::SetAppUid(TUid aAppUid);\n + CApaWindowGroupName::AppUid() const\n + CApaWindowGroupName::SetCaptionL(const TDesC& aCaption)\n + CApaWindowGroupName::Caption() const\n + CApaWindowGroupName::SetDocNameL(const TDesC& aDocName);\n + CApaWindowGroupName::DocName() const\n + CApaWindowGroupName::SetAppReady(TBool aIsReady)\n + CApaWindowGroupName::IsAppReady()\n + CApaWindowGroupName::SetWindowGroupName(HBufC* aWgName)\n + CApaWindowGroupName::WindowGroupName() const\n + CApaWindowGroupName::FindByCaption(const TDesC& aCaption, RWsSession& aWsSession, TInt& aPrevWgId) const\n + + @SYMTestExpectedResults Test checks results against expected values. + + */ +void CT_WgnamStep::testWgNamesL() + { + _LIT(KWindowGroupName1, "WindowGroupName 1"); + _LIT(KWindowGroupName2, "WindowGroupName 2"); + _LIT(KBadName,"00\x00\x31\x31\x31\x31\x31\x31\x31\x31x31\x0\x0"); + + INFO_PRINTF1(_L("Starting testWgNamesL()")); + // + // Instantiate a blank name + CApaWindowGroupName* apaWindowGroupName=NULL; + TRAPD(ret, apaWindowGroupName=CApaWindowGroupName::NewL(iWsSession)); + TEST(ret==KErrNone); + User::LeaveIfError(iWsSession.Connect()); + TEST(apaWindowGroupName!=NULL); + + // test setting system + INFO_PRINTF1(_L("Block 1")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->IsSystem()); + INFO_PRINTF1(_L("Setting system\n")); + apaWindowGroupName->SetSystem(ETrue); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->IsSystem()); + INFO_PRINTF1(_L("Setting not system\n")); + apaWindowGroupName->SetSystem(EFalse); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->IsSystem()); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // test setting busy + INFO_PRINTF1(_L("Block 2")); + INFO_PRINTF1(_L("Test setting busy")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->IsBusy()); + INFO_PRINTF1(_L("Setting busy\n")); + apaWindowGroupName->SetBusy(ETrue); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->IsBusy()); + INFO_PRINTF1(_L("Setting not busy\n")); + apaWindowGroupName->SetBusy(EFalse); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->IsBusy()); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // test setting docname not a file + INFO_PRINTF1(_L("Block 3")); + INFO_PRINTF1(_L("Test setting doc name is not a file")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->DocNameIsAFile()); + INFO_PRINTF1(_L("Setting doc name not a file\n")); + apaWindowGroupName->SetDocNameIsAFile(EFalse); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->DocNameIsAFile()); + INFO_PRINTF1(_L("Setting doc name is a file\n")); + apaWindowGroupName->SetDocNameIsAFile(ETrue); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->DocNameIsAFile()); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // RDebug::Print(_L("Block 3")); + INFO_PRINTF1(_L("Test setting does not respond to shutdown event")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->RespondsToShutdownEvent()); + INFO_PRINTF1(_L("Setting does not respond to shutdown event\n")); + apaWindowGroupName->SetRespondsToShutdownEvent(EFalse); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->RespondsToShutdownEvent()); + INFO_PRINTF1(_L("Setting does respond to shutdown event\n")); + apaWindowGroupName->SetRespondsToShutdownEvent(ETrue); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->RespondsToShutdownEvent()); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // test setting does not respond to switch files event + // RDebug::Print(_L("Block 3")); + INFO_PRINTF1(_L("Test setting does not respond to switch files event")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->RespondsToSwitchFilesEvent()); + INFO_PRINTF1(_L("Setting does not respond to switch files event\n")); + apaWindowGroupName->SetRespondsToSwitchFilesEvent(EFalse); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!apaWindowGroupName->RespondsToSwitchFilesEvent()); + INFO_PRINTF1(_L("Setting does respond to switch files event\n")); + apaWindowGroupName->SetRespondsToSwitchFilesEvent(ETrue); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->RespondsToSwitchFilesEvent()); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // test setting app uid + // RDebug::Print(_L("Block 5")); + INFO_PRINTF1(_L("Test setting appUid")); + const TUid uid={ 0x10000111 }; + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + INFO_PRINTF2(_L("Setting app uid to %x\n"), uid.iUid); + apaWindowGroupName->SetAppUid(uid); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(apaWindowGroupName->AppUid()==uid); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // test setting caption + // RDebug::Print(_L("Block 6")); + INFO_PRINTF1(_L("Test setting caption")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TPtrC caption=_L("App caption"); + INFO_PRINTF2(_L("Setting app caption to %S\n"), &caption); + apaWindowGroupName->SetCaptionL(caption); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!(apaWindowGroupName->Caption().Compare(caption))); + INFO_PRINTF1(_L("\n")); + // User::After(2000000); + + // testing FindByCaption + INFO_PRINTF1(_L("Test Window group ID")); + _LIT(KCaption, "App caption"); + TInt aWgId=0; + apaWindowGroupName->FindByCaption(KCaption, iWsSession, aWgId); + TEST(aWgId==KErrNotFound); + INFO_PRINTF3(_L("Expected value is KErrNotfound : %d ,Value Obtained is : %d \n"),KErrNotFound, aWgId); + + // test setting document name + // RDebug::Print(_L("Block 7")); + INFO_PRINTF1(_L("Test setting document name")); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TPtrC docName=_L("Doc name"); + INFO_PRINTF2(_L("Setting doc name to %S\n"), &docName); + apaWindowGroupName->SetDocNameL(docName); + PrintWindowGroupName(apaWindowGroupName->WindowGroupName()); + TEST(!(apaWindowGroupName->DocName().Compare(docName))); + INFO_PRINTF1(_L("\n")); + + // test AppReady flag + INFO_PRINTF1(_L("Testing AppReady flag")); + INFO_PRINTF1(_L("Setting AppReady flag to false")); + apaWindowGroupName->SetAppReady(EFalse); + TEST(apaWindowGroupName->IsAppReady()==EFalse); + INFO_PRINTF1(_L("Setting AppReady flag to true")); + apaWindowGroupName->SetAppReady(ETrue); + TEST(!apaWindowGroupName->IsAppReady()==EFalse); + INFO_PRINTF1(_L("\n")); + + + // Testing SetWindowGroup Name + INFO_PRINTF1(_L("Testing SetWindowGroupName")); + CApaWindowGroupName* apaWindGroupName = NULL; + + TRAP(ret, apaWindGroupName=CApaWindowGroupName::NewL(iWsSession, apaWindowGroupName->WindowGroupName())); + TEST(ret==KErrNone); + apaWindGroupName->SetWindowGroupNameL(KWindowGroupName1); + TEST(apaWindGroupName->WindowGroupName().Compare(KWindowGroupName1)==0); + HBufC* windGroupName = KWindowGroupName2().AllocLC(); + apaWindGroupName->SetWindowGroupName(windGroupName); + TEST(apaWindGroupName->WindowGroupName().Compare(KWindowGroupName2)==0); + + apaWindGroupName->SetWindowGroupNameL(KBadName); + const TUid retUid = apaWindGroupName->AppUid(); + TEST(retUid == KNullUid); + INFO_PRINTF2(_L("Expected Uid: 0, Actual uid = %d\n"), retUid); + delete apaWindGroupName; + + INFO_PRINTF1(_L("Cleaning up")); + delete apaWindowGroupName; // apaWindowGroupName + + CleanupStack::Pop(); // windGroupName + iWsSession.Close(); + + INFO_PRINTF1(_L("Finished testWgNamesL()")); + } + + + +CT_WgnamStep::~CT_WgnamStep() +/** + Destructor + */ + { + } + +CT_WgnamStep::CT_WgnamStep() +/** + Constructor + */ + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_WgnamStep); + } + +TVerdict CT_WgnamStep::doTestStepPreambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_WgnamStep::doTestStepPostambleL() +/** + @return - TVerdict code + Override of base class virtual + */ + { + return TestStepResult(); + } + + +TVerdict CT_WgnamStep::doTestStepL() +/** + @return - TVerdict code + Override of base class virtual + */ +{ + INFO_PRINTF1(_L("Testing window group names")); + // + // run the testcode (inside an alloc heaven harness) + + __UHEAP_MARK; + TRAPD(r,testWgNamesL()); + TEST(r==KErrNone); + __UHEAP_MARKEND; + + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WgnamStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WgnamStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,49 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_WGNAM_STEP_H__) +#define __T_WGNAM_STEP_H__ +#include +#include "ApparcTestServer.h" + +//! A CT_WgnamStep test class. +/*! + Test accessing window group name. +*/ +class CT_WgnamStep : public CTestStep + { +public: + CT_WgnamStep(); + ~CT_WgnamStep(); + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); +//private: + void testWgNamesL(); + void PrintWindowGroupName(const TPtrC& aWndGroupName); +private: + RWsSession iWsSession; + }; + +_LIT(KT_WgnamStep,"T_Wgnam"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WindowChainingStep.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WindowChainingStep.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,132 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include +#include "T_WindowChainingStep.h" +#include "TWindowChaining.h" +#include + +/** + @SYMTestCaseID TODO + + @SYMPREQ DEFECT 053778 - Window Chaining + + @SYMTestCaseDesc + Stuff + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + 1. Create a child ui application (t_winchainlaunch.exe) + 2. From t_winchainlaunch.exe, connect a child application (t_winchainchild.exe) with + a specific ordinal + 3. Send message to child application from launching application + 4. When message is received by child application, check they share the same ordinal + 5. Child application reports back to launch application the result of the test + 6. Launch application quits with the test result as an exit code + + @SYMTestExpectedResults + Window group ordinals should be the same. + t_winchainlaunch.exe should exit with KTWindowChainingTestPassed. + + */ +void CT_WindowChainingStep::TestWindowChainingL() + { + + TThreadId appThreadId(0U); + + RApaLsSession ls; + CleanupClosePushL(ls); + TInt ret = ls.Connect(); + TEST(ret == KErrNone); + + CApaCommandLine* cmdLine=CApaCommandLine::NewLC(); + + cmdLine->SetExecutableNameL(KWinChainChildAppFileName); + cmdLine->SetCommandL(EApaCommandOpen); + + // start document, causing GuiBaseChildApp.exe to be launched + INFO_PRINTF1(_L("Launching Child Application")); + + // start child application + ret = ls.StartApp(*cmdLine, appThreadId); + TEST(ret == KErrNone); + User::LeaveIfError(ret); + CleanupStack::PopAndDestroy(2); // ls and cmdLine + + RThread appThread; + User::LeaveIfError(appThread.Open(appThreadId)); + + TRequestStatus logonRequestStatus; + appThread.Logon(logonRequestStatus); + + // wait for t_windowchainLaunch.exe to terminate + INFO_PRINTF1(_L("Waiting for application to terminate...")); + User::WaitForRequest(logonRequestStatus); + + const TExitType exitType = appThread.ExitType(); + const TInt exitReason = appThread.ExitReason(); + TExitCategoryName categoryName = appThread.ExitCategory(); + appThread.Close(); + + TBuf<50> msg; + if (exitType == EExitPanic) + { + _LIT(KAppPanicInfo, "Application panic: %S %d"); + msg.Format(KAppPanicInfo, &categoryName, exitReason); + } + else + { + _LIT(KAppExitInfo, "Application exited with code %d"); + msg.Format(KAppExitInfo, exitReason); + } + INFO_PRINTF1(msg); + + TEST(logonRequestStatus == KTWindowChainingTestPassed); + TEST(exitType == EExitKill); + TEST(exitReason == KTWindowChainingTestPassed); + + if (exitReason == KTWindowChainingTestPassed) + SetTestStepResult(EPass); + else + SetTestStepResult(EFail); + } + +TVerdict CT_WindowChainingStep::doTestStepL() +{ + __UHEAP_MARK; + + INFO_PRINTF1(_L("Test Started")); + + // run the test + TRAPD(err, TestWindowChainingL()); + INFO_PRINTF2(_L(" test completes with %d"), err); + TEST(err == KErrNone); + + INFO_PRINTF1(_L("Test Finished")); + + __UHEAP_MARKEND; + return TestStepResult(); +} diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WindowChainingStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_WindowChainingStep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_WINDOWCHAININGSTEP_H__) +#define __T_WINDOWCHAININGSTEP_H__ + +#include + +class CT_WindowChainingStep : public CTestStep + { +public: + virtual TVerdict doTestStepL(); +private: + void TestWindowChainingL(); + + }; + +_LIT(KT_WindowChainingStep, "T_WindowChaining"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,124 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether the group name specified in the registration file +// is "overridden" by the group name specified in the localisable resource file +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include "testableapalssession.h" +#include +#include "T_groupNametest.h" +#include "ApparcTestServer.h" +#include "TestExecuteStepBase.h" + +// CT_GroupNameStep + +const TUid KUidTGroupName={0x10208185}; + +/** + Constructor +*/ +CT_GroupNameStep::CT_GroupNameStep() + { + } + + +/** + Destructor +*/ +CT_GroupNameStep::~CT_GroupNameStep() + { + } + + +/** + @SYMTestCaseID T-GroupNameStep-DoTestGroupNameL + + @SYMPREQ + + @SYMTestCaseDesc T_groupname to test the Groupname in localisable resource file + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + It connects to the Application Architecture server to perform the + following: + To test whether the group name specified in the registration file + is "overridden" by the group name specified in the localisable resource file + It calls the following function to get information about the groupname. + RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const\n + After the call Succeeds call the RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const\n + with the KNullUid . The Retrun value is KErrNotFound. + + + @SYMTestExpectedResults + GetAppCapability should return the groupname + defined in the application's localisable resource file. + + */ +void CT_GroupNameStep::DoTestGroupNameL(RApaLsSession& aLs) + { + TApaAppCapabilityBuf cbuf; + TApaAppCapability capability; + + // To read the groupname defined in localisable resource file + + TInt err = aLs.GetAppCapability(cbuf,KUidTGroupName); + TEST(err == KErrNone); + + + TEST(aLs.GetAppCapability(cbuf,KNullUid) == KErrNotFound); + + //since the value was kErrNotFound, the value of cbuf is unaltered + capability = cbuf(); + _LIT(KGroupname,"Loc_groupname"); + + TEST(capability.iGroupName == KGroupname); + + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_GroupNameStep::doTestStepL() + { + INFO_PRINTF1(_L(" Test Started")); + + //To test whether the group name specified in the registration file + //is "overridden" by the group name specified in the localisable resource file + + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestGroupNameL(ls), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&ls); + + INFO_PRINTF1(_L(" TEST Finished")); + + return TestStepResult(); + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_groupNametest_H__) +#define __T_groupNametest_H__ + +#include "ApparcTestServer.h" + +// A CT_GroupNameStep test class. + +class CT_GroupNameStep : public CTestStep + { +public: + CT_GroupNameStep(); + ~CT_GroupNameStep(); + virtual TVerdict doTestStepL(); + void DoTestGroupNameL(RApaLsSession& aLs); + +private: + }; + + +_LIT(KT_GroupNameStep, "T_GroupName"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver1.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,115 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether the groupname specified in the +// registration file is read if its not defined in the localisable resource file +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#include "testableapalssession.h" +#include +#include "T_groupNametest_ver1.h" +#include "ApparcTestServer.h" +#include "TestExecuteStepBase.h" + +// CT_GroupNameStep_ver1 + +const TUid KUidTGroupName={0x10208183}; + +/** + Constructor +*/ +CT_GroupNameStep_ver1::CT_GroupNameStep_ver1() + { + } + + +/** + Destructor +*/ +CT_GroupNameStep_ver1::~CT_GroupNameStep_ver1() + { + } + + +/** + @SYMTestCaseID T-GroupNameStep-ver1-DoTestGroupNameL + + @SYMPREQ + + @SYMTestCaseDesc + T_groupname to test the Groupname in localisable resource file + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + It connects to the Application Architecture server to perform the following: + To test whether the groupname defined in registration file is read if its + not defined in the localisable resource file + It calls the following function to get the information about the groupname. + RApaLsSession::GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const\n + + @SYMTestExpectedResults + GetAppCapability should return the groupname + defined in the application's registration file. + + */ +void CT_GroupNameStep_ver1::DoTestGroupNameL(RApaLsSession& aLs) + { + TApaAppCapabilityBuf cbuf; + TApaAppCapability capability; + + // To read the groupname defined in registration resource file + + TInt err = aLs.GetAppCapability(cbuf,KUidTGroupName); + TEST(err == KErrNone); + capability = cbuf(); + _LIT(KGroupname,"Reg_groupname"); + + TEST(capability.iGroupName == KGroupname); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_GroupNameStep_ver1::doTestStepL() + { + INFO_PRINTF1(_L(" Test Started")); + + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + + //To test whether the groupname defined in the + //registration file is read if its not defined in localisable resource file + + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestGroupNameL(ls), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&ls); + + INFO_PRINTF1(_L(" Test Finished")); + + return TestStepResult(); + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver1.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver1.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __T_groupNametest_ver1_H__) +#define __T_groupNametest_ver1_H__ + +#include "ApparcTestServer.h" + +// A CT_GroupNameStep_ver1 test class. + +class CT_GroupNameStep_ver1 : public CTestStep + { +public: + CT_GroupNameStep_ver1(); + ~CT_GroupNameStep_ver1(); + virtual TVerdict doTestStepL(); + void DoTestGroupNameL(RApaLsSession& aLs); + +private: + }; + +_LIT(KT_GroupNameStep_ver1, "T_GroupName_ver1"); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver2.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,109 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test that the information read from "old format" resource files +// isn't thrown away because of an error while trying to read the group name member that +// isn't present in localisable resource file. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "testableapalssession.h" +#include "APAID.H" +#include "T_groupNametest_ver2.h" +#include "ApparcTestServer.h" +#include "TestExecuteStepBase.h" + +// CT_GroupNameStep_ver2 + + +const TUid KUidTGroupName={0x10208184}; + +/** + Constructor +*/ +CT_GroupNameStep_ver2::CT_GroupNameStep_ver2() + { + } + + +/** + Destructor +*/ +CT_GroupNameStep_ver2::~CT_GroupNameStep_ver2() + { + } + +/** + @SYMTestCaseID T-GroupNameStep-Ver2-DoTestCaptionNameL + + @SYMPREQ + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestCaseDesc + T-groupname to test localisable resource file + + @SYMTestActions + It connects to the Application Architecture server to perform the following: + To test that information read from "old format" resource files isn't thrown away because + of an error while trying to read the group name member that isn't present in localisable resource file.. + It calls following function to get the information about the groupname. + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const\n + + @SYMTestExpectedResults + GetAppInfo should return the caption name and ShortCaption Name + defined in the localisable resource file. + + */ +void CT_GroupNameStep_ver2::DoTestCaptionNameL(RApaLsSession& aLs) + { + TApaAppInfo info; + TInt err = aLs.GetAppInfo(info,KUidTGroupName); + TEST(err == KErrNone); + _LIT(KCaption,"T_groupname_ver2"); + _LIT(KShortCaption,"TGrpNameV2"); + + TEST(info.iCaption == KCaption); + TEST(info.iShortCaption == KShortCaption); + } + +/** + @return - TVerdict code + Override of base class virtual + */ +TVerdict CT_GroupNameStep_ver2::doTestStepL() + { + INFO_PRINTF1(_L("Test Started")); + + RTestableApaLsSession ls; + TEST(KErrNone == ls.Connect()); + CleanupClosePushL(ls); + + HEAP_TEST_LS_SESSION(ls, 0, 0, DoTestCaptionNameL(ls), NO_CLEANUP); + + CleanupStack::PopAndDestroy(&ls); + + INFO_PRINTF1(_L("Test Finished")); + + return TestStepResult(); + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupNametest_ver2.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,44 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_groupNametest_ver2_H__) +#define __T_groupNametest_ver2_H__ + +#include "ApparcTestServer.h" + +// A CT_GroupNameStep_ver2 test class. + +class CT_GroupNameStep_ver2 : public CTestStep + { +public: + CT_GroupNameStep_ver2(); + ~CT_GroupNameStep_ver2(); + virtual TVerdict doTestStepL(); + void DoTestCaptionNameL(RApaLsSession& aLs); + +private: + }; + +_LIT(KT_GroupNameStep_ver2, "T_GroupName_ver2"); + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupname_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupname_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file T_groupname_loc.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + group_name = "Loc_groupname"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_groupname"; + number_of_icons = 0; + } + }; + view_list = + { + VIEW_DATA + { + uid = 0xA0004361; + screen_mode = 0x00; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_groupname"; + number_of_icons = 1; + icon_file = "file:///c/resource/apps/tcheckiconapp.xyz"; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupname_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupname_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file T_groupname_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10208185 // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "T_groupname"; + group_name = "Reg_groupname"; + localisable_resource_file="\\Resource\\Apps\\T_groupname_loc"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever1_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever1_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file T_groupname1_loc.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + group_name = ""; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_groupname_ver1"; + number_of_icons = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever1_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever1_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file T_groupname1_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10208183 // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "T_groupname_ver1"; + group_name = "Reg_groupname"; + localisable_resource_file="\\Resource\\Apps\\T_groupnamever1_loc"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever2_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever2_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file T_groupname2_loc.rss + @internalComponent - Internal Symbian test code +*/ + + +#include + +RESOURCE LOCALISABLE_APP_INFO__NO_GROUP_NAME // use this STRUCT rather than LOCALISABLE_APP_INFO, to test whether Apparc copes with the group-name being missing + { + short_caption = "TGrpNameV2"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "T_groupname_ver2"; + number_of_icons = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/T_groupnamever2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file T_groupname2_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10208184 // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "T_groupname_ver2"; + localisable_resource_file="\\Resource\\Apps\\T_groupnamever2_loc"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TestTrustedPriorityApp1_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TestTrustedPriorityApp1_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TestTrustedPriorityApp1_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f8D + +RESOURCE APP_REGISTRATION_INFO + { + app_file="TestTrustedPriorityApp1"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TestTrustedPriorityApp2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TestTrustedPriorityApp2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TestTrustedPriorityApp2_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f8F + +RESOURCE APP_REGISTRATION_INFO + { + app_file="TestTrustedPriorityApp2"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + datatype_list= + { + DATATYPE { priority=0xfeee; type="text/html"; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TestUnTrustedPriorityApp1_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TestUnTrustedPriorityApp1_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TestUnTrustedPriorityApp1_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f8C + +RESOURCE APP_REGISTRATION_INFO + { + app_file="TestUnTrustedPriorityApp1"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/TestUnTrustedPriorityApp2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/TestUnTrustedPriorityApp2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TestUnTrustedPriorityApp2_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile + +// uid in unprotected range +UID3 0xA3010010 //This UID is used for T_RApaLsSessionTestStep_TestDataPriorityForUnTrustedAppsRegFile + //test case to the test datapriority threshold for UnTrusted Apps + +RESOURCE APP_REGISTRATION_INFO + { + app_file="TestUnTrustedPriorityApp2"; + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + launch=KAppLaunchInForeground; + datatype_list= + { + DATATYPE { priority=0xffff; type="text/html"; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,119 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include + +/** KTUnProtectedAppTestPassed is a number chosen at random to be used as an exit reason + for UnProtectedApp.exe's application thread to signify that the test passed */ +const TInt KTUnProtectedAppTestPassed = 1234; + +/////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + User::Exit(KTUnProtectedAppTestPassed); + } + +CExampleAppUi::~CExampleAppUi() + { + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + }; + +const TUid KUidUnProctectedUidApp = { 0xA0001C5E }; + +TUid CExampleApplication::AppDllUid() const + { + return KUidUnProctectedUidApp; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + +EXPORT_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,59 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +// using relative paths for sourcepath and user includes +TARGET unproctecteduidapp.exe +TARGETTYPE exe +TARGETPATH /sys/bin + +CAPABILITY All -Tcb + +UID 0x100039CE 0xA0001C5E +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE unproctecteduidapp.cpp + +SOURCEPATH . + +start resource unproctecteduidapp.rss +HEADER +targetpath /resource/apps +end + +// Application exe registration resource file +resource unproctecteduidapp_reg.rss +start resource unproctecteduidapp_reg.rss +targetpath /private/10003a3f/apps +lang sc +end + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib eikcore.lib cone.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,61 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +NAME UNPR + +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="UnProctectedUidApp"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/UnProctectedUidApp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0xA0001C5E +RESOURCE APP_REGISTRATION_INFO + { + app_file = unproctecteduidapp; + + hidden=KAppNotHidden; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,235 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "App_CTRL.hrh" + +#include + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_TITLE); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + + // From CCoeAppUi + void HandleSystemEventL(const TWsEvent& aEvent); + +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + case EEikCmdExit: + Exit(); + break; + } + } + + +void CExampleAppUi::HandleSystemEventL(const TWsEvent& /*aEvent*/) + { + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +const TUid KUidSimpleApp = { 0X13008ACE }; + +TUid CExampleApplication::AppDllUid() const + { + return KUidSimpleApp; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,68 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// App_CTRL.MMP for test component App_CTRL (released in APPARC) +// + +#include + +target APP_CTRL.EXE +TARGETTYPE exe + +UID 0x100039CE 0x13008ACE +targetpath /sys/bin +CAPABILITY All -Tcb +VENDORID 0x70000001 + +SOURCEPATH . + +// your public include directory should be here +systeminclude ../inc +systeminclude /epoc32/include +systeminclude /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +// Application exe specific resource which is localised to the application +resource App_CTRL.rss +start resource App_CTRL.rss +targetpath /Resource/apps +lang sc +end + +// Application exe registration resource file +resource App_CTRL_reg.rss +start resource App_CTRL_reg.rss +targetpath /private/10003a3f/apps +lang sc +end + +// Application localisable resource file +resource App_CTRL_loc.rss +start resource App_CTRL_loc.rss +targetpath /Resource/apps +lang sc +end + +SOURCE App_CTRL.CPP + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL2.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL2.CPP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,233 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "App_CTRL2.hrh" +#include + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + iExampleText = iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_TITLE); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + + // From CCoeAppUi + void HandleSystemEventL(const TWsEvent& aEvent); + +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + // Just issue simple info messages to show that + // the menu items have been selected + case EExampleItem0: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM0); + break; + + case EExampleItem1: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM1); + break; + + case EExampleItem2: + iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_ITEM2); + break; + case EEikCmdExit: + Exit(); + break; + } + } + + +void CExampleAppUi::HandleSystemEventL(const TWsEvent& /*aEvent*/) + { + } + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; +private: + CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } + // + }; + +const TUid KUidSimpleApp = { 0x13008ADE }; + +TUid CExampleApplication::AppDllUid() const + { + return KUidSimpleApp; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL2.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/app_CTRL2.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,62 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// App_CTRL2.MMP for test component App_CTRL2 (released in APPARC) +// + +#include + +target APP_CTRL2.EXE +TARGETTYPE exe + +CAPABILITY All -Tcb +VENDORID 0x70000001 + +UID 0x100039CE 0x13008ADE +targetpath /sys/bin +SOURCEPATH . + +// your public include directory should be here +systeminclude ../inc +systeminclude /epoc32/include +systeminclude /epoc32/include/techview +systeminclude /epoc32/include/kernel + +MW_LAYER_SYSTEMINCLUDE + +source App_CTRL2.CPP + +// Application exe specific resource which is localised to the application +resource App_CTRL2.rss +start resource App_CTRL2.rss +targetpath /Resource/apps +lang sc +end + +// Application exe registration resource file +resource App_CTRL2_reg.rss +start resource App_CTRL2_reg.rss +targetpath /private/10003a3f/import/apps +lang sc +end + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/apparctestserver.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/apparctestserver.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,235 @@ +// Copyright (c) 1997-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +target apparctestserver.EXE +targettype exe +UID 0x1000007A 0x101F289C +CAPABILITY AllFiles WriteDeviceData PowerMgmt Protserv SwEvent + + +SYSTEMINCLUDE /EPOC32/INCLUDE /EPOC32/INCLUDE/TECHVIEW /EPOC32/INCLUDE/TEST +systeminclude /epoc32/include/ecom +systeminclude ../tef + +MW_LAYER_SYSTEMINCLUDE + +SOURCEPATH ../tef +SOURCE apparctestserver.cpp + +//-------START + +SOURCE T_Foreground.cpp +SOURCE T_ProStep.cpp T_OOMStep.cpp T_File1Step.cpp T_File2Step.cpp T_File3Step.cpp +SOURCE T_BackupStep.cpp T_MdrStep.cpp +SOURCE T_Serv2Step.cpp T_Serv3Step.cpp +SOURCE T_MRUStep.cpp T_WgnamStep.cpp +SOURCE T_CmdlnStep.cpp T_RApaLsSessionStep.cpp +SOURCE T_ExeStep.cpp T_NotifStep.cpp +SOURCE T_CaptionStep.cpp T_LocaleStep.cpp +SOURCE T_AutoMMCReaderOpen.cpp + +SOURCE T_ServicesStep.cpp +SOURCE T_StartAppStep.cpp +SOURCE T_ServiceRegistryStep.cpp +SOURCE T_StartDocStep.CPP +SOURCE T_ControlPanelTest.cpp +SOURCE T_RuleBasedLaunchingStep.cpp +SOURCE T_Capability1.cpp +SOURCE T_Capability2.cpp +SOURCE T_groupNametest.cpp +SOURCE T_groupNametest_ver1.cpp +SOURCE T_groupNametest_ver2.cpp +SOURCE T_windowchainingstep.cpp +SOURCE T_AppList.CPP +SOURCE T_SysStartApparcStep.cpp +SOURCE T_ProcStep.cpp +SOURCE T_DataMappingPersistenceA.cpp +SOURCE T_DataMappingPersistenceB.cpp +SOURCE T_DataMappingPersistenceC.cpp +SOURCE T_NonNativeAppsStep.cpp +SOURCE T_IntegritySupportStep.cpp +SOURCE T_IntegritySupportRebootStep.cpp +SOURCE T_ApsScan.CPP +SOURCE T_EndTaskStep.cpp +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +SOURCE T_AppListFileUpdateStep.cpp +SOURCE T_AppListFileBootStep.cpp +#endif +SOURCE testableapalssession.cpp +SOURCE t_largestackstep.cpp +SOURCE T_DataTypeMappingWithSid1.cpp +SOURCE t_abstractnonnativeappsstep.cpp +SOURCE t_drivenotification.cpp +SOURCE t_mimecontentpolicystep.cpp +SOURCE t_servicebasestep.cpp +SOURCE T_RecUpgrade.cpp + +resource t_rapalssessionstep.rss +start resource t_rapalssessionstep.rss +TARGETPATH /system/test/t_rapalssessionstep +lang SC +end + +// START resource files for service registration and discovery tests +start resource serverapp_loc.RSS +HEADER +targetpath /resource/apps +lang sc +end + +start resource serverapp_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource serverapp3_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource serverapp6_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource serverapp7_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource serverapp2_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource serverapp4_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource openservice1a.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource openservice1b.RSS +targetpath /private/10003a3f/apps +lang sc +end + +start resource T_DataPrioritySystem3_reg.rss +targetpath /private/10003a3f/apps +lang sc +end + +// END resource files for service registration and discovery tests + + +start resource TCtrlPnlApp_reg.RSS +targetpath /private/10003a3f/apps +lang sc +end + +// START resource files for customising the default icon wrt locale + +start resource CustomiseDefaultIconApp_loc.RSS +HEADER +targetpath /resource/apps +lang SC +end + +start resource CustomiseDefaultIconApp_reg.RSS +targetpath /private/10003a3f/import/apps +lang SC +end + +start bitmap default_app_icon.m02 +targetpath /resource/apps +SOURCEPATH ../tdatasrc +source c8,1 def25.bmp def25m.bmp def35.bmp def35m.bmp def50.bmp def50m.bmp +end +//END resource files for customising the default icon wrt locale + + +start resource TestUnTrustedPriorityApp1_reg.rss +targetpath /private/10003a3f/import/apps +lang sc +end + +start resource TestTrustedPriorityApp1_reg.rss +targetpath /private/10003a3f/apps +lang sc +end + +start resource TestUnTrustedPriorityApp2_reg.rss +targetpath /private/10003a3f/import/apps +lang sc +end + +start resource TestTrustedPriorityApp2_reg.rss +targetpath /private/10003a3f/apps +lang sc +end + +start resource T_groupname_loc.rss +HEADER +targetpath /resource/apps +lang sc +end + +start resource T_groupnamever1_loc.rss +HEADER +targetpath /resource/apps +lang sc +end + +start resource T_groupnamever2_loc.rss +HEADER +targetpath /resource/apps +lang sc +end + +resource T_groupname_reg.rss +start resource T_groupname_reg.rss +targetpath /private/10003a3f/apps +end + +resource T_groupnamever1_reg.rss +start resource T_groupnamever1_reg.rss +targetpath /private/10003a3f/apps +end + +resource T_groupnamever2_reg.rss +start resource T_groupnamever2_reg.rss +targetpath /private/10003a3f/apps +end + +//-------END + +USERINCLUDE ../tef +userinclude ../../uiftestfw/inc + +LIBRARY CONE.LIB WS32.LIB APPFWK_TEST_APPUI.LIB EUSER.LIB ECOM.LIB +LIBRARY TESTEXECUTEUTILS.LIB TestExecuteLogClient.LIB +LIBRARY APPARC.LIB EFSRV.LIB ESTOR.LIB GDI.LIB FBSCLI.LIB +LIBRARY APFILE.LIB APGRFX.LIB BAFL.LIB APMIME.LIB APSERV.LIB +LIBRARY EIKCORE.LIB APPFWK_TEST_UTILS.LIB SERVICEREGISTRY.LIB +LIBRARY ticonloaderandiconarrayforleaks.lib centralrepository.lib +// We're quite heavy on the stack... 4k in WinS isn't enough... +EPOCSTACKSIZE 0xf000 + +VENDORID 0x70000001 diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/apparctestserver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/apparctestserver.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,390 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "appfwk_test_AppUi.h" +#include "ApparcTestServer.h" +#include "t_foreground.h" +#include "T_ProStep.h" +#include "T_OOMStep.h" +#include "T_File1Step.h" +#include "T_File2Step.h" +#include "T_File3Step.h" +#include "T_BackupStep.h" +#include "T_MdrStep.h" +#include "T_Serv2Step.h" +#include "T_Serv3Step.h" +#include "T_MruStep.h" +#include "T_CmdlnStep.h" +#include "T_WgnamStep.h" +#include "T_ExeStep.h" +#include "T_NotifStep.h" +#include "T_CaptionStep.h" +#include "T_LocaleStep.h" +#include "T_RApaLsSessionStep.h" +#include "T_ServicesStep.h" +#include "T_ServiceRegistryStep.h" +#include "T_StartAppStep.h" +#include "T_StartDocStep.h" +#include "T_AutoMMCReaderOpen.h" +#include "T_ControlPanelTest.h" +#include "T_RuleBasedLaunchingStep.h" +#include "T_Capability1.h" +#include "T_Capability2.h" +#include "T_DataTypeMappingWithSid1.h" +#include "T_groupNametest.h" +#include "T_groupNametest_ver1.h" +#include "T_groupNametest_ver2.h" +#include "T_WindowChainingStep.h" +#include "T_AppList.h" +#include "T_SysStartApparcStep.h" +#include "T_ProcStep.h" +#include "T_DataMappingPersistenceA.h" +#include "T_DataMappingPersistenceB.h" +#include "T_DataMappingPersistenceC.h" +#include "T_NonNativeAppsStep.h" +#include "T_IntegritySupportStep.h" +#include "T_IntegritySupportRebootStep.h" +#include "T_ApsScan.h" +#include "T_EndTaskStep.h" +#include "T_RecUpgrade.h" +#ifdef SYMBIAN_APPARC_APPINFO_CACHE +#include "T_AppListFileBootStep.h" +#include "T_AppListFileUpdateStep.h" +#endif //SYMBIAN_APPARC_APPINFO_CACHE +#include "t_largestackstep.h" +#include "t_drivenotification.h" +#include "t_mimecontentpolicystep.h" +#include "t_servicebasestep.h" + +CApparctestServer* CApparctestServer::NewL() +/** + @return - Instance of the test server + Same code for Secure and non-secure variants + Called inside the MainL() function to create and start the + CTestServer derived server. + */ + { + CApparctestServer * server = new (ELeave) CApparctestServer(); + CleanupStack::PushL(server); + // CServer base class call + TParsePtrC serverName(RProcess().FileName()); + server->StartL(serverName.Name()); + CleanupStack::Pop(server); + return server; + } + + + +CTestStep* CApparctestServer::CreateTestStep(const TDesC& aStepName) +/** + @return - A CTestStep derived instance + Secure and non-secure variants + Implementation of CTestServer pure virtual + */ + { + CTestStep* testStep = NULL; + // User::After(TTimeIntervalMicroSeconds32(5000000)); + // This server creates just one step but create as many as you want + // They are created "just in time" when the worker thread is created + if(aStepName == KTestAppListStep) + { + testStep = new CTestAppListStep(); + } + else if(aStepName == KTestForegroundStep) + { + testStep = new CTestForegroundStep(); + } + else if(aStepName == KT_ProStep) + { + testStep = new CT_ProStep(); + } + else if(aStepName == KT_OOMStep) + { + testStep = new CT_OOMStep(); + } + else if(aStepName == KT_File1Step) + { + testStep = new CT_File1Step(); + } + else if(aStepName == KT_File2Step) + { + testStep = new CT_File2Step(); + } + else if(aStepName == KT_File3Step) + { + testStep = new CT_File3Step(); + } + else if(aStepName == KT_BackupStep) + { + testStep = new CT_BackupStep(); + } + else if(aStepName == KT_MdrStep) + { + testStep = new CT_MdrStep(); + } + else if(aStepName == KT_Serv2Step) + { + testStep = new CT_Serv2Step(); + } + else if(aStepName == KT_Serv3Step) + { + testStep = new CT_Serv3Step(); + } + else if(aStepName == KT_MruStep) + { + testStep = new CT_MruStep(); + } + else if(aStepName == KT_CmdlnStep) + { + testStep = new CT_CmdlnStep(); + } + else if(aStepName == KT_RApaLsSessionStep) + { + testStep = new CT_RApaLsSessionTestStep(); + } + else if(aStepName == KT_NotifStep) + { + testStep = new CT_NotifStep(); + } + else if(aStepName == KT_WgnamStep) + { + testStep = new CT_WgnamStep(); + } + else if(aStepName == KT_ExeStep) + { + testStep = new CT_ExeStep(); + } + else if(aStepName == KT_CaptionStep) + { + testStep = new CT_CaptionStep(); + } + else if(aStepName == KT_LocaleStep) + { + testStep = new CT_LocaleStep(); + } + else if(aStepName == KT_ServicesStep) + { + testStep = new CT_ServicesTestStep(); + } + else if(aStepName == KT_StartAppStep) + { + testStep = new CT_StartAppTestStep(); + } + else if(aStepName == KT_ServiceRegistryStep) + { + testStep = new CT_ServiceRegistryTestStep(); + } + else if(aStepName == KT_StartDocStep) + { + testStep = new CT_StartDocStep(); + } + else if(aStepName == KTestAutoMMCReaderOpenStep) + { + testStep = new CTestAutoMMCReaderStep(); + } + else if(aStepName == KT_ControlPanelTest) + { + testStep = new CT_ControlPanelTestStep(); + } + else if(aStepName == KT_RuleBasedLaunchingStep) + { + testStep = new CTRuleBasedLaunchingStep(); + } + else if(aStepName == KT_GroupNameStep) + { + testStep = new CT_GroupNameStep(); + } + else if(aStepName == KT_GroupNameStep_ver1) + { + testStep = new CT_GroupNameStep_ver1(); + } + else if(aStepName == KT_GroupNameStep_ver2) + { + testStep = new CT_GroupNameStep_ver2(); + } + else if(aStepName == KT_Capability1) + { + testStep = new CT_Capability1(); + } + else if(aStepName == KT_Capability2) + { + testStep = new CT_Capability2(); + } + else if(aStepName == KT_DataTypeMappingWithSid1) + { + testStep = new CT_DataTypeMappingWithSid1(); + } + else if (aStepName == KT_WindowChainingStep) + { + testStep = new CT_WindowChainingStep(); + } + else if( (aStepName == KT_SysStartApparcStep) || + (aStepName == KApparcStartupT_TestStartApp1L) || + (aStepName == KApparcStartupT_TestStartApp2L) || + (aStepName == KApparcStartupT_TestStartApp3L) || + (aStepName == KApparcStartupT_TestStartApp4L) || + (aStepName == KApparcStartupT_TestStartApp5L) || + (aStepName == KApparcStartupT_TestStartApp6L) || + (aStepName == KApparcStartupT_TestGetAllApps) || + (aStepName == KApparcStartupT_TestInsertDataTypeL) || + (aStepName == KApparcStartupT_TestAppForDataTypeL) || + (aStepName == KApparcStartupT_TestDeleteDataTypeL) || + (aStepName == KApparcStartupT_TestServiceDiscovery) || + (aStepName == KApparcStartupT_TestGetAppInfo) || + (aStepName == KApparcStartupT_TestAppCount) || + (aStepName == KApparcStartupT_TestCreateDoc) || + (aStepName == KApparcStartupT_TestLocalisedCaptionL) ) + { + testStep = new CT_SysStartApparcStep(); + } + else if (aStepName == KT_ProcStep) + { + testStep = new CT_ProcStep(); + } + else if (aStepName == KT_DataMappingPersistenceAStep) + { + testStep = new CT_DataMappingPersistenceATestStep(); + } + else if (aStepName == KT_DataMappingPersistenceBStep) + { + testStep = new CT_DataMappingPersistenceBTestStep(); + } + else if (aStepName == _L("T_DataMappingPersistenceC")) + { + testStep = new CT_DataMappingPersistenceCTestStep(); + } + else if (aStepName == _L("T_NonNativeApps")) + { + testStep = new CT_NonNativeAppsStep(); + } + else if (aStepName == KT_IntegritySupportStep) + { + testStep = new CT_IntegritySupportTestStep(); + } + else if (aStepName == KT_IntegritySupportReboot1Step) + { + testStep = new CT_IntegritySupportReboot1TestStep(); + } + else if (aStepName == KT_IntegritySupportReboot2Step) + { + testStep = new CT_IntegritySupportReboot2TestStep(); + } + else if (aStepName == KT_ApsScanStep) + { + testStep = new CT_ApsScanStep(); + } + else if (aStepName == KT_EndTaskStep) + { + testStep = new CTEndTaskStep(); + } + #ifdef SYMBIAN_APPARC_APPINFO_CACHE + else if (aStepName == KT_AppListFileUpdate) + { + testStep = new CT_AppListFileUpdateStep(); + } + else if (aStepName == KT_AppListFile_Boot1) + { + testStep = new CT_AppListFileBootStep(1); + } + else if (aStepName == KT_AppListFile_Boot2) + { + testStep = new CT_AppListFileBootStep(2); + } + else if (aStepName == KT_AppListFile_Boot3) + { + testStep = new CT_AppListFileBootStep(3); + } + #endif //SYMBIAN_APPARC_APPINFO_CACHE + else if (aStepName == KT_LargeStackStep) + { + testStep = new CT_LargeStackStep(); + } + else if (aStepName == KT_DriveNotificationStep) + { + testStep = new CT_DriveNotificationStep(); + } + else if (aStepName == KT_MimeContentPolicyStep) + { + testStep = new CT_MimeContentPolicyStep(); + } + else if (aStepName == KT_ServiceBaseStep) + { + testStep = new CT_ServiceBaseStep(); + } + else if (aStepName == KT_RecUpgradeStep) + { + testStep = new CT_RecUpgradeStep(); + } + + return testStep; + } + + +LOCAL_C void MainL() + { + // Leave the hooks in for platform security + RProcess().DataCaging(RProcess::EDataCagingOn); + RProcess().SecureApi(RProcess::ESecureApiOn); + + CActiveScheduler* sched=NULL; + sched=new(ELeave) CActiveScheduler; + CActiveScheduler::Install(sched); + CApparctestServer* server = NULL; + // Create the CTestServer derived server + TRAPD(err,server = CApparctestServer::NewL());; + + if(!err) + { + // Sync with the client and enter the active scheduler + RProcess::Rendezvous(KErrNone); + sched->Start(); + } + delete server; + delete sched; + } + + +GLDEF_C TInt E32Main() + { + CTrapCleanup* cleanup = CTrapCleanup::New(); + if(cleanup == NULL) + { + return KErrNoMemory; + } + TRAP_IGNORE(MainL()); + delete cleanup; + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/apparctestserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/apparctestserver.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#if (!defined __APPARTESTSERVER_H__) +#define __APPARTESTSERVER_H__ + +#include +#include +#include + +class CApparctestServer : public CTestServer + { +public: + static CApparctestServer* NewL(); + virtual CTestStep* CreateTestStep(const TDesC& aStepName); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/m_ctrl_v2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/m_ctrl_v2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,73 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// M_CTRL.MMP for test component M_CTRL (released in APPARC) +// New style APP/EXE built for a secure environment +// + +#include + +target M_CTRL.EXE +TARGETTYPE exe + +targetpath /sys/bin +UID 0x100039CE 0x13008AEE +CAPABILITY All -Tcb +VENDORID 0x70000001 + +epocstacksize 0x5000 + +SOURCEPATH . + + +systeminclude ../INC +systeminclude /EPOC32/INCLUDE +systeminclude /EPOC32/INCLUDE/techview + +MW_LAYER_SYSTEMINCLUDE + +userinclude . + +// Application exe specific resource which is localised to the application +resource M_CTRL.rss +start resource M_CTRL.rss +targetpath /Resource/apps +lang sc +end + +// Application exe registration resource file +start resource M_CTRL_reg.rss +targetpath /private/10003a3f/import/apps +lang sc +end + +// Application localisable resource file +start resource M_CTRL_loc.rss +targetpath /Resource/apps +lang sc +end + +SOURCE M_CTRL_V2.CPP + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EFSRV.LIB +LIBRARY EIKCORE.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB +LIBRARY APPFWK_TEST_APPUI.LIB + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/openservice1a.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/openservice1a.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file operservice1a.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10208200 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="openservice1app"; + + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/dummyopen1"; } + }; + + service_list = + { + SERVICE_INFO { uid = 0x09020303; opaque_data = 0; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/openservice1b.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/openservice1b.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,44 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file operservice1b.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10208201 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="openservice2app"; + + service_list = + { + SERVICE_INFO + { + uid = 0x10208DCA; + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/dummyopen2"; } + }; + opaque_data = 0; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/scripts/setup_smoketest_language.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/scripts/setup_smoketest_language.script Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,20 @@ +// +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +RUN_UTILS MkDir c:\smoketest\ + +RUN_UTILS CopyFile z:\smoketest\smoketest_language.script c:\smoketest\smoketest_language.script +RUN_UTILS MakeReadWrite c:\smoketest\smoketest_language.script diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/scripts/smoketest_language.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/scripts/smoketest_language.script Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// +// + +PRINT Run Language smoketest + +LOAD_SUITE ApparcTestServer +DELAY 1000 + +START_TESTCASE SMOKE_LANGUAGE_0001 +//! @SYMTestCaseID SMOKE_LANGUAGE_0001 +//! @SYMTestCaseDesc Set a new language (English, French, German, Spanish, Italian, American) + +RUN_TEST_STEP 100 ApparcTestServer T_Caption + +END_TESTCASE SMOKE_LANGUAGE_0001 \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp2_reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp2_reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp2_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c58 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="serverapp2"; + + service_list = + { + SERVICE_INFO { uid = 0x01020333;} + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp3_reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp3_reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,104 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp3_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c57 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="serverapp3"; + // + datatype_list = + { + DATATYPE { priority=EDataTypePriorityHigh; type="text/priority"; } + }; + + service_list = + { + SERVICE_INFO + { + uid = 0x01020304; + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/custom1"; } + }; + opaque_data = r_first_service_specific_data; + }, + SERVICE_INFO { uid = 0x02345000; opaque_data = r_second_service_specific_data;}, + SERVICE_INFO { uid = 0x03456000; opaque_data = r_third_service_specific_data;}, + SERVICE_INFO { uid = 0x04567000; opaque_data = r_fourth_service_specific_data;}, + SERVICE_INFO { uid = 0x05678000; opaque_data = r_fifth_service_specific_data;}, + SERVICE_INFO { uid = 0x01234000; opaque_data = r_fifth_service_specific_data;}, + SERVICE_INFO { uid = 0x02345000; opaque_data = r_fourth_service_specific_data;}, + SERVICE_INFO { uid = 0x03456000; opaque_data = r_third_service_specific_data;}, + SERVICE_INFO { uid = 0x04567000; opaque_data = r_second_service_specific_data;}, + SERVICE_INFO { uid = 0x05678000; opaque_data = r_first_service_specific_data;}, + SERVICE_INFO { uid = 0x01234000; opaque_data = r_fifth_service_specific_data;}, + SERVICE_INFO { uid = 0x02345000; opaque_data = r_fourth_service_specific_data;}, + SERVICE_INFO { uid = 0x03456000; opaque_data = r_third_service_specific_data;}, + SERVICE_INFO { uid = 0x04567000; opaque_data = r_second_service_specific_data;}, + SERVICE_INFO { uid = 0x05678000; opaque_data = r_first_service_specific_data;} + //SERVICE_INFO { uid = 0x05678001; opaque_data = the_large_struct;} + }; + } + +STRUCT SERVICE_NAME + { + LTEXT name = ""; + } + +STRUCT LARGE_STRUCT + { + LONG arrays[256]; + } + +RESOURCE LARGE_STRUCT the_large_struct + { + + } + +RESOURCE SERVICE_NAME r_first_service_specific_data + { + name = "Non-localised text for service uid 0x01020304"; + } + +RESOURCE SERVICE_NAME r_second_service_specific_data + { + name = "Non-localised text for service uid 0x02345000"; + } + +RESOURCE SERVICE_NAME r_third_service_specific_data + { + name = "Non-localised text for service uid 0x03456000"; + } + +RESOURCE SERVICE_NAME r_fourth_service_specific_data + { + name = "Non-localised text for service uid 0x04567000"; + } + +RESOURCE SERVICE_NAME r_fifth_service_specific_data + { + name = "Non-localised text for service uid 0x05678000"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp4_reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp4_reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp4_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c76 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="serverapp4"; + + service_list = + { + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp6_reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp6_reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp6_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c55 // UID of the application this registration file represents + + +RESOURCE APP_REGISTRATION_INFO + { + app_file="serverapp6"; + // + localisable_resource_file="\\resource\\apps\\serverapp_loc"; + localisable_resource_id=R_LAI; + // + + service_list = + { + //SERVICE_INFO { uid = 0x01020399; opaque_data = r_first_service_specific_data;} + SERVICE_INFO { uid = 0x01020305; opaque_data = R_SERVICE_SPECIFIC_DATA_LOC; } + }; + } + +STRUCT SERVICE_NAME + { + LTEXT name = ""; + } + +RESOURCE SERVICE_NAME r_first_service_specific_data + { + name = "Non-localised text for service uid"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp7_reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp7_reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp7_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c54 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="serverapp7"; + + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/plain"; } + }; + // + service_list = + { + SERVICE_INFO { uid = 0x01020303; opaque_data = r_service_specific_data; }, + SERVICE_INFO { uid = 0x01020305; opaque_data = R_SERVICE_SPECIFIC_DATA_LOC; } + }; + } + +STRUCT SERVICE_NAME + { + LTEXT name = ""; + } + +RESOURCE SERVICE_NAME r_service_specific_data + { + name = "Non-localised text for service uid 0x01020304"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp_loc.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp_loc.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,55 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp_loc.rss + @internalComponent - Internal Symbian test code +*/ + +NAME SER1 + +#include +#include + +RESOURCE RSS_SIGNATURE { } +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption = "AppName"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "AppNameLong"; + number_of_icons = 0; // each icon must be a bitmap/mask pair + icon_file = "z:\resource\apps\myicons.mbm"; + } + }; + + + + + } + +STRUCT SERVICE_NAME + { + LTEXT name = ""; + } + +RESOURCE SERVICE_NAME r_service_specific_data_loc + { + name = "Localised text for service UID 0x01020305"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/serverapp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,79 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file serverapp_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10004c56 // UID of the application this registration file represents + +RESOURCE APP_REGISTRATION_INFO + { + app_file="serverapp"; + // + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/plain"; }, + DATATYPE { priority=EDataTypePriorityNormal; type="text/priority"; } + }; + + service_list = + { + SERVICE_INFO { uid = 0x01020304; opaque_data = r_first_service_specific_data;}, + SERVICE_INFO + { + uid = 0x02030405; + datatype_list = + { + DATATYPE { priority=EDataTypePriorityNormal; type="text/custom1"; } + }; + opaque_data = r_second_service_specific_data; + }, + SERVICE_INFO { uid = 0x05060708; opaque_data = r_third_service_specific_data;}, + SERVICE_INFO { uid = 0x05060708; opaque_data = r_fourth_service_specific_data;}, + SERVICE_INFO { uid = 0x01020333;} + }; + } + +STRUCT SERVICE_NAME + { + LTEXT name = ""; + } + +RESOURCE SERVICE_NAME r_first_service_specific_data + { + name = "Non-localised text for service uid 0x01020304"; + } + +RESOURCE SERVICE_NAME r_second_service_specific_data + { + name = "Non-localised text for service uid 0x02030405"; + } + +RESOURCE SERVICE_NAME r_third_service_specific_data + { + name = "Non-localised resource A"; + } + +RESOURCE SERVICE_NAME r_fourth_service_specific_data + { + name = "Non-localised resource B"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/svg_icon.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/svg_icon.svg Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,125 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting ECOM plugin for use by test programs that excercise +// rule based launching of applications. +// The classes CTAppLaunchChecker and CTAppLaunchChecker1 each implement an +// ECOM RuleBased plugin interface. +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include "tAppLaunchChecker.h" +#include +#include +#include +#include +#include +#include +#include "..\tef\tRuleBasedApps\RuleBasedUID.H" + + +// Define the interface UIDs +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x1020d467, CTAppLaunchChecker::NewL), + IMPLEMENTATION_PROXY_ENTRY(0x1020d468, CTAppLaunchChecker1::NewL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +CTAppLaunchChecker* CTAppLaunchChecker::NewL() + { + CTAppLaunchChecker* theAppLaunchChecker = new (ELeave) CTAppLaunchChecker(); + return theAppLaunchChecker; + } + +CTAppLaunchChecker::~CTAppLaunchChecker() + { + } + +/** +The function CAppLaunchChecker::TAppLaunchCode recieves the UID of the application to be launched. +The function implements a rule for launching the application whose UID is supplied as the first parameter. +The function returns CAppLaunchChecker::EAppLaunchIndifferent if the rule is executed completly. +*/ +CAppLaunchChecker::TAppLaunchCode CTAppLaunchChecker::OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList) + { + if(KUidApp4== aAppToLaunch) + { + TApaTask task = aTaskList.FindApp(KUidApp2); + if (task.Exists()) + { + task.SendSystemEvent(EApaSystemEventShutdown); + } + } + return CAppLaunchChecker::EAppLaunchIndifferent; + } + +//second plug-in implementation +CTAppLaunchChecker1* CTAppLaunchChecker1::NewL() + { + CTAppLaunchChecker1* theAppLaunchChecker = new (ELeave) CTAppLaunchChecker1(); + return theAppLaunchChecker; + } + +CTAppLaunchChecker1::~CTAppLaunchChecker1() + { + } +/** +The function CAppLaunchChecker1::TAppLaunchCode recieves the UID of the application to be launched. +The function implements a rule for launching the application whose UID is supplied as the first parameter. +The function returns CAppLaunchChecker::EAppLaunchIndifferent if the rule is executed completly. +*/ +CAppLaunchChecker::TAppLaunchCode CTAppLaunchChecker1::OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList) + { + + if(KUidApp3 == aAppToLaunch) + { + TApaTask task = aTaskList.FindApp(KUidApp1); + if (task.Exists()) + { + task.SendSystemEvent(EApaSystemEventShutdown); + } + } + else if (KUidApp1 == aAppToLaunch) + { + TApaTask task = aTaskList.FindApp(KUidApp3); + if (task.Exists()) + { + return CAppLaunchChecker::EAppLaunchDecline; + } + } + + return CAppLaunchChecker::EAppLaunchIndifferent; + } + +GLDEF_C TInt E32Dll() +// +// DLL entry point +// + { + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __TAPPLUNCHCHEKER_H__ +#define __TAPPLUNCHCHEKER_H__ + +#include "..\inc\ApLaunchChecker.h" + +class CTAppLaunchChecker : public CAppLaunchChecker + { +public: + // Two-phase constructor + static CTAppLaunchChecker* NewL(); + ~CTAppLaunchChecker(); + //Inherited from CApplaunchChecker + TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList); + }; + +class CTAppLaunchChecker1 : public CAppLaunchChecker + { +public: + // Two-phase constructor + static CTAppLaunchChecker1* NewL(); + ~CTAppLaunchChecker1(); + //Inherited from CApplaunchChecker + TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker2.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,79 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Supporting ECOM plugin for use by test programs that excercise +// rule based launching of applications. +// The class CTAppLaunchChecker implements an +// ECOM RuleBased plugin interface. +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include "tAppLaunchChecker2.h" +#include "..\tef\tRuleBasedApps\RuleBasedUID.H" + + +// Define the interface UIDs +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(0x102722bb, CTAppLaunchChecker2::NewL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } + +CTAppLaunchChecker2* CTAppLaunchChecker2::NewL() + { + CTAppLaunchChecker2* theAppLaunchChecker = new (ELeave) CTAppLaunchChecker2(); + return theAppLaunchChecker; + } + +CTAppLaunchChecker2::~CTAppLaunchChecker2() + { + } + +/** +The function CAppLaunchChecker2::TAppLaunchCode recieves the UID of the application to be launched. +The function implements a rule for launching the application whose UID is supplied as the first parameter. +The function returns CAppLaunchChecker::EAppLaunchIndifferent if the rule is executed completly. +*/ +CAppLaunchChecker::TAppLaunchCode CTAppLaunchChecker2::OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList) + { + if(KUidApp4.iUid == aAppToLaunch.iUid ) + { + TApaTask task = aTaskList.FindApp(KUidApp3); + if (task.Exists()) + { + task.SendSystemEvent(EApaSystemEventShutdown); + } + } + return CAppLaunchChecker::EAppLaunchIndifferent; + } + +// DLL entry point +GLDEF_C TInt E32Dll() + + { + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tAppLaunchChecker2.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,40 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __TAPPLUNCHCHEKER2_H__ +#define __TAPPLUNCHCHEKER2_H__ + + +#include "..\inc\ApLaunchChecker.h" +#include + +class CTAppLaunchChecker2 : public CAppLaunchChecker + { +public: + // Two-phase constructor + static CTAppLaunchChecker2* NewL(); + ~CTAppLaunchChecker2(); + //Inherited from CApplaunchChecker + TAppLaunchCode virtual OkayToLaunchL(const TUid aAppToLaunch, TApaTaskList& aTaskList); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/RuleBasedUID.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/RuleBasedUID.H Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,31 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__RULEBASEDUID_H__) +#define __RULEBASEDUID_H__ + +const TUid KUidApp1 = {0x1020D6FC}; +const TUid KUidApp2 = {0x1020D6FD}; +const TUid KUidApp3 = {0x1020D6FE}; +const TUid KUidApp4 = {0X10210F77}; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +enum TRuleBasedMenuCommands + { + ERuleBasedItem0 = 200, + ERuleBasedItem1, + ERuleBasedItem2 + }; + +#define ECidFileNameLabel 0x11c6 + + +#define ERuleBasedDo0 0x1150 +#define ERuleBasedDo1 0x1151 +#define ERuleBasedDo2 0x1152 +#define ERuleBasedDo3 0x1153 +#define ERuleBasedDo4 0x1124 +#define ERuleBasedDo5 0x1155 +#define ERuleBasedDo6 0x1156 +#define ERuleBasedDo7 0x1157 +#define ERuleBasedDo8 0x1158 + + +// +// Common view controls +// + +#define ETimewCidToolLabel 0x1301 +#define ETimewCidToolSpacer 0x1302 diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,392 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a simple Application containing a single view with +// text drawn on it. +// The app includes code for displaying a very simple menu. +// This source file contains the single exported function required by +// all UI Applications and the E32Dll function which is also required +// but is not used here. +// The class definitions are: +// CTRuleBasedApplication +// CTRuleBasedAppUi +// CTRuleBasedAppView +// CTRuleBasedDocument +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "tRuleBasedApp.hrh" + +const TInt KLeft = 0; // Display app window on the left +const TInt KCentre = 1; // Display app window in the centre +const TInt KRight = 2; // Display app window on the right + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +class CTRuleBasedApplication : public CEikApplication + { +private: + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppView : public CCoeControl + { +public: + static CTRuleBasedAppView* NewL(const TRect& aRect); + CTRuleBasedAppView(); + ~CTRuleBasedAppView(); + void ConstructL(const TRect& aRect); +public: + TInt iAppType; + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + const CFont* CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const; + +private: + HBufC* iRuleBasedText; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CTRuleBasedAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CTRuleBasedAppView* iAppView; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedDocument +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedDocument : public CEikDocument + { +public: + static CTRuleBasedDocument* NewL(CEikApplication& aApp); + CTRuleBasedDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +////////////////////////////////////////////////////////////////////// +// +// Application Document class - CTRuleBasedAppDocument +// +////////////////////////////////////////////////////////////////////// + +/** +The constructor of the document class just passes the +supplied reference to the constructor initialisation list. +The document has no real work to do in this Application. +*/ + +CTRuleBasedDocument::CTRuleBasedDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +/** +This is called by the UI framework as soon as the +document has been created. It creates an instance +of the ApplicationUI. The Application UI class is +an instance of a CEikAppUi derived class. +*/ + +CEikAppUi* CTRuleBasedDocument::CreateAppUiL() + { + return new(ELeave) CTRuleBasedAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// Source for the implementation of the +// Application view class - CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// + + +// Constructor for the view. + +CTRuleBasedAppView::CTRuleBasedAppView():iAppType(KLeft) + { + } +/** +Static NewL() function to start the standard two +phase construction. +*/ + +CTRuleBasedAppView* CTRuleBasedAppView::NewL(const TRect& aRect) + { + CTRuleBasedAppView* self = new(ELeave) CTRuleBasedAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// +// Destructor for the view. + +CTRuleBasedAppView::~CTRuleBasedAppView() + { + delete iRuleBasedText; + } + +/** +Second phase construction. +*/ + +void CTRuleBasedAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iRuleBasedText = iEikonEnv->AllocReadResourceL(R_RULEBASED_TEXT); + // Control is a window owning control + + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to Application. + // The rectangle is passed to us from the Application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + +/** +Drawing the view - in this example, +consists of drawing a simple outline rectangle +and then drawing the text in the middle. + +In this example, we don't use the redraw +region because it's easier to redraw to +the whole client area. +*/ + +const CFont* CTRuleBasedAppView::CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const + { + // Create a Symbian font spec + TFontSpec fontSpec; + + // Enable antialising + TOpenFontSpec openSpec; + + openSpec.SetBitmapType(EAntiAliasedGlyphBitmap); + + openSpec.GetTFontSpec(fontSpec); // sets the antialiasing into the TFontSpec + fontSpec.iTypeface.iName = aFontName; + fontSpec.iHeight = aHeightInPixels; + + if (aBold) + { + fontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold ); + } + CFbsFont* font; + CWsScreenDevice& screenDev=*(CEikonEnv::Static()->ScreenDevice()); + User::LeaveIfError(screenDev.GetNearestFontInPixels((CFont*&)font,fontSpec)); + return font; + } + +void CTRuleBasedAppView::Draw(const TRect& aRect) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + + // Font used for drawing text + const CFont* fontUsed = NULL; + + // Start with a clear screen + gc.Clear(); + + gc.DrawRect(drawRect); + + TRAPD(err, fontUsed = CreateCustomFontL(_L("Times New Roman"),20,1)); + if (err!=KErrNone) + { + return; + } + + gc.SetPenColor(KRgbGreen); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(aRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iRuleBasedText,aRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// Application UI class - CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// + +/** +The second phase constructor of the Application UI class. +The Application UI creates and owns the one and only view. +*/ + +void CTRuleBasedAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single Application view in which to + // draw the text to display the name of the Application that has been launched, passing into it + // the rectangle available to it. + + TRect cliRect = ClientRect(); + const TInt width = 580/3; + + cliRect.SetWidth(width); + + iAppView = CTRuleBasedAppView::NewL(cliRect); + + // The application window occupies 1/3 of the screen. + if (iAppView->iAppType == KCentre) + { + TPoint Origin( width,0); + iAppView->SetPosition(Origin); + } + else if (iAppView->iAppType == KRight) + { + TPoint Origin( (2*width),0); + iAppView->SetPosition(Origin); + } + } + +/** +The App Ui owns the two views and is. +therefore, responsible for destroying them +*/ + +CTRuleBasedAppUi::~CTRuleBasedAppUi() + { + delete iAppView; + } + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the +// Application class - CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +const TUid KUidRuleBasedApp = { 0x1020D6FC}; + +/** +The function is called by the UI framework to ask for the +Application's UID. The returned value is defined by the +constant KUidRuleBasedAppe and must match the second value +defined in the project definition file. +*/ + +TUid CTRuleBasedApplication::AppDllUid() const + { + return KUidRuleBasedApp; + } + +/** +This function is called by the UI framework at +Application start-up. It creates an instance of the +document class. +*/ + +CApaDocument* CTRuleBasedApplication::CreateDocumentL() + { + return new (ELeave) CTRuleBasedDocument(*this); + } + +void CTRuleBasedAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + +/** +The entry point for the Application code. It creates +an instance of the CApaApplication derived +class, CTRuleBasedApplication. +*/ + +LOCAL_C CApaApplication* NewApplication() + { + return new CTRuleBasedApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + +#if defined( __WINS__ ) && !defined(EKA2) +GLDEF_C TInt E32Dll(TDllReason) + { + return KErrNone; + } + +EXPORT_C TInt WinsMain( TDesC* aCommandLine ) + { + return EikStart::RunApplication( NewApplication, aCommandLine ); + } +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// t_RuleBasedApp1.mmp +// +// + +#include + +// using relative paths for sourcepath and user includes +CAPABILITY NONE +epocstacksize 0x5000 + +TARGETPATH /sys/bin + + +TARGET tRuleBasedApp1.exe +TARGETTYPE exe + + +UID 0x100039CE 0X1020D6FC + +VENDORID 0x70000001 + +SOURCEPATH . + +SOURCE tRuleBasedApp1.cpp + + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib bitgdi.lib fntstr.lib fbscli.lib gdi.lib + + +START RESOURCE tRuleBasedApp1.rss +HEADER +TARGETPATH /resource/apps +END + +START RESOURCE tRuleBasedApp1_reg.rss +TARGETPATH /private/10003a3f/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,92 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +NAME GUBA + +#include +#include +#include +#include +#include +#include + +#include "tRuleBasedApp.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_rulebased_hotkeys; + menubar=r_rulebased_menubar; + } + + + +RESOURCE HOTKEYS r_rulebased_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_rulebased_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_rulebased_first_menu; txt="RuleBasedApp1"; } + }; + } + +RESOURCE MENU_PANE r_rulebased_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +/////TKAS +RESOURCE TBUF r_appname_default_file + { + buf="tRuleBasedApp1"; + } + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption="tRuleBasedApp1"; + + caption_and_icon= + { + CAPTION_AND_ICON_INFO + { + caption="tRuleBasedApp1"; + } + }; + + } + + + +RESOURCE TBUF r_rulebased_text { buf="RuleBasedApp1"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp1_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,29 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x1020D6FC // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tRuleBasedApp1"; + localisable_resource_file="\\resource\\apps\\tRuleBasedApp1"; + localisable_resource_id=R_LAI; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,392 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a simple Application containing a single view with +// text drawn on it. +// The app includes code for displaying a very simple menu. +// This source file contains the single exported function required by +// all UI Applications and the E32Dll function which is also required +// but is not used here. +// The class definitions are: +// CTRuleBasedApplication +// CTRuleBasedAppUi +// CTRuleBasedAppView +// CTRuleBasedDocument +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "tRuleBasedApp.hrh" + +//const TInt KLeft = 0; // Display app window on the left +const TInt KCentre = 1; // Display app window in the centre +const TInt KRight = 2; // Display app window on the right + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +class CTRuleBasedApplication : public CEikApplication + { +private: + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppView : public CCoeControl + { +public: + static CTRuleBasedAppView* NewL(const TRect& aRect); + CTRuleBasedAppView(); + ~CTRuleBasedAppView(); + void ConstructL(const TRect& aRect); +public: + TInt iAppType; + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + const CFont* CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const; + +private: + HBufC* iRuleBasedText; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CTRuleBasedAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CTRuleBasedAppView* iAppView; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedDocument +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedDocument : public CEikDocument + { +public: + static CTRuleBasedDocument* NewL(CEikApplication& aApp); + CTRuleBasedDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +////////////////////////////////////////////////////////////////////// +// +// Application Document class - CTRuleBasedAppDocument +// +////////////////////////////////////////////////////////////////////// + +/** +The constructor of the document class just passes the +supplied reference to the constructor initialisation list. +The document has no real work to do in this Application. +*/ + +CTRuleBasedDocument::CTRuleBasedDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +/** +This is called by the UI framework as soon as the +document has been created. It creates an instance +of the ApplicationUI. The Application UI class is +an instance of a CEikAppUi derived class. +*/ + +CEikAppUi* CTRuleBasedDocument::CreateAppUiL() + { + return new(ELeave) CTRuleBasedAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// Source for the implementation of the +// Application view class - CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// + + +// Constructor for the view. + +CTRuleBasedAppView::CTRuleBasedAppView():iAppType(KCentre) + { + } +/** +Static NewL() function to start the standard two +phase construction. +*/ + +CTRuleBasedAppView* CTRuleBasedAppView::NewL(const TRect& aRect) + { + CTRuleBasedAppView* self = new(ELeave) CTRuleBasedAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// +// Destructor for the view. + +CTRuleBasedAppView::~CTRuleBasedAppView() + { + delete iRuleBasedText; + } + +/** +Second phase construction. +*/ + +void CTRuleBasedAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iRuleBasedText = iEikonEnv->AllocReadResourceL(R_RULEBASED_TEXT); + // Control is a window owning control + + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to Application. + // The rectangle is passed to us from the Application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + +/** +Drawing the view - in this example, +consists of drawing a simple outline rectangle +and then drawing the text in the middle. + +In this example, we don't use the redraw +region because it's easier to redraw to +the whole client area. +*/ + +const CFont* CTRuleBasedAppView::CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const + { + // Create a Symbian font spec + TFontSpec fontSpec; + + // Enable antialising + TOpenFontSpec openSpec; + + openSpec.SetBitmapType(EAntiAliasedGlyphBitmap); + + openSpec.GetTFontSpec(fontSpec); // sets the antialiasing into the TFontSpec + fontSpec.iTypeface.iName = aFontName; + fontSpec.iHeight = aHeightInPixels; + + if (aBold) + { + fontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold ); + } + CFbsFont* font; + CWsScreenDevice& screenDev=*(CEikonEnv::Static()->ScreenDevice()); + User::LeaveIfError(screenDev.GetNearestFontInPixels((CFont*&)font,fontSpec)); + return font; + } + +void CTRuleBasedAppView::Draw(const TRect& aRect) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + + // Font used for drawing text + const CFont* fontUsed = NULL; + + // Start with a clear screen + gc.Clear(); + + gc.DrawRect(drawRect); + + TRAPD(err, fontUsed = CreateCustomFontL(_L("Times New Roman"),20,1)); + if (err!=KErrNone) + { + return; + } + + gc.SetPenColor(KRgbBlue); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(aRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iRuleBasedText,aRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// Application UI class - CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// + +/** +The second phase constructor of the Application UI class. +The Application UI creates and owns the one and only view. +*/ + +void CTRuleBasedAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single Application view in which to + // draw the text to display the name of the Application that has been launched, passing into it + // the rectangle available to it. + + TRect cliRect = ClientRect(); + const TInt width = 580/3; + + cliRect.SetWidth(width); + + iAppView = CTRuleBasedAppView::NewL(cliRect); + + // The application window occupies 1/3 of the screen. + if (iAppView->iAppType == KCentre) + { + TPoint Origin( width,0); + iAppView->SetPosition(Origin); + } + else if (iAppView->iAppType == KRight) + { + TPoint Origin( (2*width),0); + iAppView->SetPosition(Origin); + } + } + +/** +The App Ui owns the two views and is. +therefore, responsible for destroying them +*/ + +CTRuleBasedAppUi::~CTRuleBasedAppUi() + { + delete iAppView; + } + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the +// Application class - CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +const TUid KUidRuleBasedApp = { 0X1020D6FD }; + +/** +The function is called by the UI framework to ask for the +Application's UID. The returned value is defined by the +constant KUidRuleBasedAppe and must match the second value +defined in the project definition file. +*/ + +TUid CTRuleBasedApplication::AppDllUid() const + { + return KUidRuleBasedApp; + } + +/** +This function is called by the UI framework at +Application start-up. It creates an instance of the +document class. +*/ + +CApaDocument* CTRuleBasedApplication::CreateDocumentL() + { + return new (ELeave) CTRuleBasedDocument(*this); + } + +void CTRuleBasedAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + +/** +The entry point for the Application code. It creates +an instance of the CApaApplication derived +class, CTRuleBasedApplication. +*/ + +LOCAL_C CApaApplication* NewApplication() + { + return new CTRuleBasedApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + +#if defined( __WINS__ ) && !defined(EKA2) +GLDEF_C TInt E32Dll(TDllReason) + { + return KErrNone; + } + +EXPORT_C TInt WinsMain( TDesC* aCommandLine ) + { + return EikStart::RunApplication( NewApplication, aCommandLine ); + } +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// t_RuleBasedApp.mmp +// +// + +#include + +// using relative paths for sourcepath and user includes +CAPABILITY NONE +epocstacksize 0x5000 + +TARGETPATH /sys/bin + + +TARGET tRuleBasedApp2.exe +TARGETTYPE exe + + +UID 0x100039CE 0X1020D6FD + +VENDORID 0x70000001 + +SOURCEPATH . + +SOURCE tRuleBasedApp2.cpp + + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib bitgdi.lib fntstr.lib fbscli.lib gdi.lib + + +START RESOURCE tRuleBasedApp2.rss +HEADER +TARGETPATH /resource/apps +END + +START RESOURCE tRuleBasedApp2_reg.rss +TARGETPATH /private/10003a3f/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,96 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +NAME GUBA + +#include +#include +#include +#include +#include +#include + +#include "tRuleBasedApp.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_rulebased_hotkeys; + menubar=r_rulebased_menubar; + } + + + +RESOURCE HOTKEYS r_rulebased_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_rulebased_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_rulebased_first_menu; txt="RuleBasedApp2"; } + }; + } + +RESOURCE MENU_PANE r_rulebased_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +/////TKAS +RESOURCE TBUF r_appname_default_file + { + buf="tRuleBasedApp2"; + } + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption="tRuleBasedApp2"; + + caption_and_icon= + { + CAPTION_AND_ICON_INFO + { + caption="tRuleBasedApp2"; + } + }; + + } + +RESOURCE EIK_APP_INFO + { + + } + + +RESOURCE TBUF r_rulebased_text { buf="RuleBasedApp2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp2_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,31 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// tRuleBasedApp2.rss +// +// + +#include +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x1020D6FD // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tRuleBasedApp2"; + localisable_resource_file="\\resource\\apps\\tRuleBasedApp2"; + localisable_resource_id=R_LAI; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,392 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a simple Application containing a single view with +// text drawn on it. +// The app includes code for displaying a very simple menu. +// This source file contains the single exported function required by +// all UI Applications and the E32Dll function which is also required +// but is not used here. +// The class definitions are: +// CTRuleBasedApplication +// CTRuleBasedAppUi +// CTRuleBasedAppView +// CTRuleBasedDocument +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "tRuleBasedApp.hrh" + +//const TInt KLeft = 0; // Display app window on the left +const TInt KCentre = 1; // Display app window in the centre +const TInt KRight = 2; // Display app window on the right + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +class CTRuleBasedApplication : public CEikApplication + { +private: + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppView : public CCoeControl + { +public: + static CTRuleBasedAppView* NewL(const TRect& aRect); + CTRuleBasedAppView(); + ~CTRuleBasedAppView(); + void ConstructL(const TRect& aRect); +public: + TInt iAppType; + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + const CFont* CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const; + +private: + HBufC* iRuleBasedText; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CTRuleBasedAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CTRuleBasedAppView* iAppView; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedDocument +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedDocument : public CEikDocument + { +public: + static CTRuleBasedDocument* NewL(CEikApplication& aApp); + CTRuleBasedDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +////////////////////////////////////////////////////////////////////// +// +// Application Document class - CTRuleBasedAppDocument +// +////////////////////////////////////////////////////////////////////// + +/** +The constructor of the document class just passes the +supplied reference to the constructor initialisation list. +The document has no real work to do in this Application. +*/ + +CTRuleBasedDocument::CTRuleBasedDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +/** +This is called by the UI framework as soon as the +document has been created. It creates an instance +of the ApplicationUI. The Application UI class is +an instance of a CEikAppUi derived class. +*/ + +CEikAppUi* CTRuleBasedDocument::CreateAppUiL() + { + return new(ELeave) CTRuleBasedAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// Source file for the implementation of the +// Application view class - CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// + + +// Constructor for the view. + +CTRuleBasedAppView::CTRuleBasedAppView():iAppType(KRight) + { + } +/** +Static NewL() function to start the standard two +phase construction. +*/ + +CTRuleBasedAppView* CTRuleBasedAppView::NewL(const TRect& aRect) + { + CTRuleBasedAppView* self = new(ELeave) CTRuleBasedAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// +// Destructor for the view. + +CTRuleBasedAppView::~CTRuleBasedAppView() + { + delete iRuleBasedText; + } + +/** +Second phase construction. +*/ + +void CTRuleBasedAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iRuleBasedText = iEikonEnv->AllocReadResourceL(R_RULEBASED_TEXT); + // Control is a window owning control + + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to Application. + // The rectangle is passed to us from the Application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + +/** +Drawing the view - in this example, +consists of drawing a simple outline rectangle +and then drawing the text in the middle. + +In this example, we don't use the redraw +region because it's easier to redraw to +the whole client area. +*/ + +const CFont* CTRuleBasedAppView::CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const + { + // Create a Symbian font spec + TFontSpec fontSpec; + + // Enable antialising + TOpenFontSpec openSpec; + + openSpec.SetBitmapType(EAntiAliasedGlyphBitmap); + + openSpec.GetTFontSpec(fontSpec); // sets the antialiasing into the TFontSpec + fontSpec.iTypeface.iName = aFontName; + fontSpec.iHeight = aHeightInPixels; + + if (aBold) + { + fontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold ); + } + CFbsFont* font; + CWsScreenDevice& screenDev=*(CEikonEnv::Static()->ScreenDevice()); + User::LeaveIfError(screenDev.GetNearestFontInPixels((CFont*&)font,fontSpec)); + return font; + } + +void CTRuleBasedAppView::Draw(const TRect& aRect) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + + // Font used for drawing text + const CFont* fontUsed = NULL; + + // Start with a clear screen + gc.Clear(); + + gc.DrawRect(drawRect); + + TRAPD(err, fontUsed = CreateCustomFontL(_L("Times New Roman"),20,1)); + if (err!=KErrNone) + { + return; + } + + gc.SetPenColor(KRgbRed); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(aRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iRuleBasedText,aRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// Application UI class - CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// + +/** +The second phase constructor of the Application UI class. +The Application UI creates and owns the one and only view. +*/ + +void CTRuleBasedAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single Application view in which to + // draw the text to display the name of the Application that has been launched, passing into it + // the rectangle available to it. + + TRect cliRect = ClientRect(); + const TInt width = 580/3; + + cliRect.SetWidth(width); + + iAppView = CTRuleBasedAppView::NewL(cliRect); + + // The application window occupies 1/3 of the screen. + if (iAppView->iAppType == KCentre) + { + TPoint Origin( width,0); + iAppView->SetPosition(Origin); + } + else if (iAppView->iAppType == KRight) + { + TPoint Origin( (2*width),0); + iAppView->SetPosition(Origin); + } + } + +/** +The App Ui owns the two views and is. +therefore, responsible for destroying them +*/ + +CTRuleBasedAppUi::~CTRuleBasedAppUi() + { + delete iAppView; + } + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the +// Application class - CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +const TUid KUidRuleBasedApp = { 0X1020D6FE }; + +/** +The function is called by the UI framework to ask for the +Application's UID. The returned value is defined by the +constant KUidRuleBasedAppe and must match the second value +defined in the project definition file. +*/ + +TUid CTRuleBasedApplication::AppDllUid() const + { + return KUidRuleBasedApp; + } + +/** +This function is called by the UI framework at +Application start-up. It creates an instance of the +document class. +*/ + +CApaDocument* CTRuleBasedApplication::CreateDocumentL() + { + return new (ELeave) CTRuleBasedDocument(*this); + } + +void CTRuleBasedAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + +/** +The entry point for the Application code. It creates +an instance of the CApaApplication derived +class, CTRuleBasedApplication. +*/ + +LOCAL_C CApaApplication* NewApplication() + { + return new CTRuleBasedApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + +#if defined( __WINS__ ) && !defined(EKA2) +GLDEF_C TInt E32Dll(TDllReason) + { + return KErrNone; + } + +EXPORT_C TInt WinsMain( TDesC* aCommandLine ) + { + return EikStart::RunApplication( NewApplication, aCommandLine ); + } +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// t_RuleBasedApp.mmp +// +// + +#include + +// using relative paths for sourcepath and user includes +CAPABILITY NONE +epocstacksize 0x5000 + +TARGETPATH /sys/bin + + +TARGET tRuleBasedApp3.exe +TARGETTYPE exe + + +UID 0x100039CE 0X1020D6FE + +VENDORID 0x70000001 + +SOURCEPATH . + +SOURCE tRuleBasedApp3.cpp + + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib bitgdi.lib fntstr.lib fbscli.lib gdi.lib + + +START RESOURCE tRuleBasedApp3.rss +HEADER +TARGETPATH /resource/apps +END + +START RESOURCE tRuleBasedApp3_reg.rss +TARGETPATH /private/10003a3f/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,98 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// t_RuleBasedApp3.rss +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +NAME GUBA + +#include +#include +#include +#include +#include +#include + +#include "tRuleBasedApp.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_rulebased_hotkeys; + menubar=r_rulebased_menubar; + } + + + +RESOURCE HOTKEYS r_rulebased_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_rulebased_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_rulebased_first_menu; txt="RuleBasedApp3"; } + }; + } + +RESOURCE MENU_PANE r_rulebased_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +/////TKAS +RESOURCE TBUF r_appname_default_file + { + buf="tRuleBasedApp3"; + } + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption="RuleBased3"; + + caption_and_icon= + { + CAPTION_AND_ICON_INFO + { + caption="tRuleBasedApp3"; + } + }; + + } + +RESOURCE EIK_APP_INFO + { + + } + + +RESOURCE TBUF r_rulebased_text { buf="RuleBasedApp3"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp3_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// t_RuleBasedApp3.reg +// +// + + +#include +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x1020D6FE // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tRuleBasedApp3"; + localisable_resource_file="\\resource\\apps\\tRuleBasedApp3"; + localisable_resource_id=R_LAI; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,392 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a simple Application containing a single view with +// text drawn on it. +// The app includes code for displaying a very simple menu. +// This source file contains the single exported function required by +// all UI Applications and the E32Dll function which is also required +// but is not used here. +// The class definitions are: +// CTRuleBasedApplication +// CTRuleBasedAppUi +// CTRuleBasedAppView +// CTRuleBasedDocument +// +// + + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "tRuleBasedApp.hrh" + +//const TInt KLeft = 0; // Display app window on the left +const TInt KCentre = 1; // Display app window in the centre +const TInt KRight = 2; // Display app window on the right + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +class CTRuleBasedApplication : public CEikApplication + { +private: + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppView : public CCoeControl + { +public: + static CTRuleBasedAppView* NewL(const TRect& aRect); + CTRuleBasedAppView(); + ~CTRuleBasedAppView(); + void ConstructL(const TRect& aRect); +public: + TInt iAppType; + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + const CFont* CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const; + +private: + HBufC* iRuleBasedText; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CTRuleBasedAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CTRuleBasedAppView* iAppView; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CTRuleBasedDocument +// +//////////////////////////////////////////////////////////////////////// +class CTRuleBasedDocument : public CEikDocument + { +public: + static CTRuleBasedDocument* NewL(CEikApplication& aApp); + CTRuleBasedDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + +////////////////////////////////////////////////////////////////////// +// +// Application Document class - CTRuleBasedAppDocument +// +////////////////////////////////////////////////////////////////////// + +/** +The constructor of the document class just passes the +supplied reference to the constructor initialisation list. +The document has no real work to do in this Application. +*/ + +CTRuleBasedDocument::CTRuleBasedDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +/** +This is called by the UI framework as soon as the +document has been created. It creates an instance +of the ApplicationUI. The Application UI class is +an instance of a CEikAppUi derived class. +*/ + +CEikAppUi* CTRuleBasedDocument::CreateAppUiL() + { + return new(ELeave) CTRuleBasedAppUi; + } + +//////////////////////////////////////////////////////////////////////// +// +// Source for the implementation of the +// Application view class - CTRuleBasedAppView +// +//////////////////////////////////////////////////////////////////////// + + +// Constructor for the view. + +CTRuleBasedAppView::CTRuleBasedAppView():iAppType(KCentre) + { + } +/** +Static NewL() function to start the standard two +phase construction. +*/ + +CTRuleBasedAppView* CTRuleBasedAppView::NewL(const TRect& aRect) + { + CTRuleBasedAppView* self = new(ELeave) CTRuleBasedAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +// +// Destructor for the view. + +CTRuleBasedAppView::~CTRuleBasedAppView() + { + delete iRuleBasedText; + } + +/** +Second phase construction. +*/ + +void CTRuleBasedAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iRuleBasedText = iEikonEnv->AllocReadResourceL(R_RULEBASED_TEXT); + // Control is a window owning control + + CreateWindowL(); + // Extent of the control. This is + // the whole rectangle available to Application. + // The rectangle is passed to us from the Application UI. + SetRect(aRect); + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + +/** +Drawing the view - in this example, +consists of drawing a simple outline rectangle +and then drawing the text in the middle. + +In this example, we don't use the redraw +region because it's easier to redraw to +the whole client area. +*/ + +const CFont* CTRuleBasedAppView::CreateCustomFontL( const TDesC& aFontName, TInt aHeightInPixels, TBool aBold ) const + { + // Create a Symbian font spec + TFontSpec fontSpec; + + // Enable antialising + TOpenFontSpec openSpec; + + openSpec.SetBitmapType(EAntiAliasedGlyphBitmap); + + openSpec.GetTFontSpec(fontSpec); // sets the antialiasing into the TFontSpec + fontSpec.iTypeface.iName = aFontName; + fontSpec.iHeight = aHeightInPixels; + + if (aBold) + { + fontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold ); + } + CFbsFont* font; + CWsScreenDevice& screenDev=*(CEikonEnv::Static()->ScreenDevice()); + User::LeaveIfError(screenDev.GetNearestFontInPixels((CFont*&)font,fontSpec)); + return font; + } + +void CTRuleBasedAppView::Draw(const TRect& aRect) const + { + // Window graphics context + CWindowGc& gc = SystemGc(); + // Area in which we shall draw + TRect drawRect = Rect(); + + // Font used for drawing text + const CFont* fontUsed = NULL; + + // Start with a clear screen + gc.Clear(); + + gc.DrawRect(drawRect); + + TRAPD(err, fontUsed = CreateCustomFontL(_L("Times New Roman"),20,1)); + if (err!=KErrNone) + { + return; + } + + gc.SetPenColor(KRgbYellow); + gc.UseFont(fontUsed); + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(aRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iRuleBasedText,aRect,baselineOffset,CGraphicsContext::ECenter, 0); + // Finished using the font + gc.DiscardFont(); + } + +//////////////////////////////////////////////////////////////////////// +// +// Application UI class - CTRuleBasedAppUi +// +//////////////////////////////////////////////////////////////////////// + +/** +The second phase constructor of the Application UI class. +The Application UI creates and owns the one and only view. +*/ + +void CTRuleBasedAppUi::ConstructL() + { + // BaseConstructL() completes the UI framework's + // construction of the App UI. + BaseConstructL(); + // Create the single Application view in which to + // draw the text to display the name of the Application that has been launched, passing into it + // the rectangle available to it. + + TRect cliRect = ClientRect(); + const TInt width = 580/3; + + cliRect.SetWidth(width); + + iAppView = CTRuleBasedAppView::NewL(cliRect); + + // The application window occupies 1/3 of the screen. + if (iAppView->iAppType == KCentre) + { + TPoint Origin( width,0); + iAppView->SetPosition(Origin); + } + else if (iAppView->iAppType == KRight) + { + TPoint Origin( (2*width),0); + iAppView->SetPosition(Origin); + } + } + +/** +The App Ui owns the two views and is. +therefore, responsible for destroying them +*/ + +CTRuleBasedAppUi::~CTRuleBasedAppUi() + { + delete iAppView; + } + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the +// Application class - CTRuleBasedApplication +// +//////////////////////////////////////////////////////////////////////// + +const TUid KUidRuleBasedApp = { 0X10210F77 }; + +/** +The function is called by the UI framework to ask for the +Application's UID. The returned value is defined by the +constant KUidRuleBasedAppe and must match the second value +defined in the project definition file. +*/ + +TUid CTRuleBasedApplication::AppDllUid() const + { + return KUidRuleBasedApp; + } + +/** +This function is called by the UI framework at +Application start-up. It creates an instance of the +document class. +*/ + +CApaDocument* CTRuleBasedApplication::CreateDocumentL() + { + return new (ELeave) CTRuleBasedDocument(*this); + } + +void CTRuleBasedAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + +/** +The entry point for the Application code. It creates +an instance of the CApaApplication derived +class, CTRuleBasedApplication. +*/ + +LOCAL_C CApaApplication* NewApplication() + { + return new CTRuleBasedApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + +#if defined( __WINS__ ) && !defined(EKA2) +GLDEF_C TInt E32Dll(TDllReason) + { + return KErrNone; + } + +EXPORT_C TInt WinsMain( TDesC* aCommandLine ) + { + return EikStart::RunApplication( NewApplication, aCommandLine ); + } +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// t_RuleBasedApp4.mmp +// +// + +#include + +// using relative paths for sourcepath and user includes +CAPABILITY NONE +epocstacksize 0x5000 + +TARGETPATH /sys/bin + + +TARGET tRuleBasedApp4.exe +TARGETTYPE exe + + +UID 0x100039CE 0x10210F77 + +VENDORID 0x70000001 + +SOURCEPATH . + +SOURCE tRuleBasedApp4.cpp + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib bitgdi.lib fntstr.lib fbscli.lib gdi.lib + + +START RESOURCE tRuleBasedApp4.rss +HEADER +TARGETPATH /resource/apps +END + +START RESOURCE tRuleBasedApp4_reg.rss +TARGETPATH /private/10003a3f/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,94 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +NAME GUBA + +#include +#include +#include +#include +#include +#include + +#include "tRuleBasedApp.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_rulebased_hotkeys; + menubar=r_rulebased_menubar; + } + + + +RESOURCE HOTKEYS r_rulebased_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_rulebased_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_rulebased_first_menu; txt="RuleBasedApp4"; } + }; + } + +RESOURCE MENU_PANE r_rulebased_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +/////TKAS +RESOURCE TBUF r_appname_default_file + { + buf="tRuleBasedApp4"; + } + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption="RuleBased4"; + + caption_and_icon= + { + CAPTION_AND_ICON_INFO + { + caption="tRuleBasedApp4"; + } + }; + + } + + + + +RESOURCE TBUF r_rulebased_text { buf="RuleBasedApp4"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tRuleBasedApps/tRuleBasedApp4_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// tRuleBasedApp4.mmp +// +// + + + + +#include +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10210F77 // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tRuleBasedApp4"; + localisable_resource_file="\\resource\\apps\\tRuleBasedApp4"; + localisable_resource_id=R_LAI; + + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_abstractnonnativeappsstep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_abstractnonnativeappsstep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,118 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "t_abstractnonnativeappsstep.h" + +#include + +CT_AbstractNonNativeAppsTestStep::CT_AbstractNonNativeAppsTestStep() + { + } + +CT_AbstractNonNativeAppsTestStep::~CT_AbstractNonNativeAppsTestStep() + { + } + +void CT_AbstractNonNativeAppsTestStep::doAbstractNonNativeAppsTestStepPreambleL() + { + TInt error = iSession.Connect(); + TEST(error==KErrNone); + error = iUtils.Connect(); + TEST(error==KErrNone); + } + +void CT_AbstractNonNativeAppsTestStep::CleanupAndReset(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + // make sure we're starting from a clean sheet + CompleteDeregisterL(aSession, aApp); + aSession.DeregisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType)); + aSession.RegisterNonNativeApplicationTypeL(TUid::Uid(KApplicationType), KLitNativeExecutable); + } + +void CT_AbstractNonNativeAppsTestStep::CallRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + CApaRegistrationResourceFileWriter* const registrationResourceFileWriter = + CApaRegistrationResourceFileWriter::NewL(TUid::Uid(aApp.iAppUid), aApp.iLogicalExecutable, TApaAppCapability::ENonNative); + CleanupStack::PushL(registrationResourceFileWriter); + aSession.RegisterNonNativeApplicationL(TUid::Uid(KApplicationType), EDriveC, *registrationResourceFileWriter, NULL, NULL); + CleanupStack::PopAndDestroy(); + } + +void CT_AbstractNonNativeAppsTestStep::CompleteRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + aSession.PrepareNonNativeApplicationsUpdatesL(); + CallRegisterL(aSession, aApp); + aSession.CommitNonNativeApplicationsUpdatesL(); + } + +void CT_AbstractNonNativeAppsTestStep::CallDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + aSession.DeregisterNonNativeApplicationL(TUid::Uid(aApp.iAppUid)); + } + +void CT_AbstractNonNativeAppsTestStep::CompleteDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + aSession.PrepareNonNativeApplicationsUpdatesL(); + CallDeregisterL(aSession, aApp); + aSession.CommitNonNativeApplicationsUpdatesL(); + } + +TBool CT_AbstractNonNativeAppsTestStep::FilePresent(const TDesC& aFile) + { + TBool present = EFalse; + TInt err = iUtils.IsFilePresent(aFile, present); + TEST(err == KErrNone); + return present; + } + +TBool CT_AbstractNonNativeAppsTestStep::FileAbsent(const TDesC& aFile) + { + TBool present = ETrue; + TInt err = iUtils.IsFilePresent(aFile, present); + TEST(err == KErrNone); + return !present; + } + +TBool CT_AbstractNonNativeAppsTestStep::AppPresent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + TApaAppInfo info; + TInt err = aSession.GetAppInfo(info,TUid::Uid(aApp.iAppUid)); + TEST(err == KErrNone); + TUid typeUid; + err = aSession.GetAppType(typeUid, TUid::Uid(aApp.iAppUid)); + TEST(err == KErrNone); + + TBool test1 = (info.iUid.iUid == aApp.iAppUid) && (typeUid == TUid::Uid(KApplicationType)); + TBool test2 = FilePresent(aApp.iRegistrationFile); + TBool test3 = FileAbsent(KLitUpdatedAppsList); + return test1 && test2 && test3; + } + +TBool CT_AbstractNonNativeAppsTestStep::AppAbsent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp) + { + TApaAppInfo info; + TInt err = aSession.GetAppInfo(info,TUid::Uid(aApp.iAppUid)); + TBool test1 = (err == KErrNotFound); + TBool test2 = FileAbsent(aApp.iRegistrationFile); + TBool test3 = FileAbsent(KLitUpdatedAppsList); + return test1 && test2 && test3; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_abstractnonnativeappsstep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_abstractnonnativeappsstep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,72 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + +#ifndef T_ABSTRACT_NONNATIVEAPPS_STEP_H +#define T_ABSTRACT_NONNATIVEAPPS_STEP_H + +#include +#include +#include "testableapalssession.h" + +const TInt KApplicationType = 0x102081A0; +_LIT(KLitNativeExecutable, "z:\\sys\\bin\\dummy.exe"); +_LIT(KLitUpdatedAppsList, "c:\\private\\10003a3f\\UpdatedAppsList.bin"); + +class CT_AbstractNonNativeAppsTestStep : public CTestStep + { +public: + CT_AbstractNonNativeAppsTestStep(); + ~CT_AbstractNonNativeAppsTestStep(); + +public: + struct TTestAppDetails + { + inline TTestAppDetails(TInt aAppUid, const TDesC& aLogicalExecutable, const TDesC& aRegistrationFile) : + iAppUid(aAppUid), + iLogicalExecutable(aLogicalExecutable), + iRegistrationFile(aRegistrationFile) + { + } + TInt iAppUid; + const TDesC& iLogicalExecutable; + const TDesC& iRegistrationFile; + }; + +protected: + void doAbstractNonNativeAppsTestStepPreambleL(); + static void CleanupAndReset(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + static void CallRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + static void CompleteRegisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + static void CallDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + static void CompleteDeregisterL(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + TBool FilePresent(const TDesC& aFile); + TBool FileAbsent(const TDesC& aFile); + TBool AppPresent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + TBool AppAbsent(RTestableApaLsSession& aSession, const TTestAppDetails& aApp); + +protected: + RTestableApaLsSession iSession; + RSmlTestUtils iUtils; + }; + +#endif // T_ABSTRACT_NONNATIVEAPPS_STEP_H diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_drivenotification.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_drivenotification.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,276 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Only in Armv5 platform, +// C: Drive is set to be monitored using KApaDrivesToMonitor. The value of +// KApaDrivesToMonitor is set to 4. It is computed in the following way. +// ZY XWVU TSRQ PONM LKJI HGFE DCBA +// 00 0000 0000 0000 0000 0000 0100. +// If the value is Set then the corresponding drive has to be monitored. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include "appfwk_test_utils.h" +#include "t_drivenotification.h" + +_LIT(KResourceFileSourceZ, "z:\\system\\data\\tnotifydrivesapp_reg.rsc"); + +void CDriveTestObserver::HandleAppListEvent(TInt /*aEvent*/) + { + iNotified++; + if (iNotifier) + iNotifier->Cancel(); + CActiveScheduler::Stop(); + } + +CT_DriveNotificationStep::~CT_DriveNotificationStep() + { + } + +CT_DriveNotificationStep::CT_DriveNotificationStep() + { + // Call base class method to set up the human readable name for logging + SetTestStepName(KT_DriveNotificationStep); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0083 + + @SYMCR CR1035 + + @SYMTestCaseDesc Test for the drive's notification. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions In armv5 platform, the patchable constant KApaDrivesToMonitor is set to monitor C: drive. + Hence the notifications from other drives are ignored. The test copies the tnotifydrivesapp_reg.rsc to either + D: or E: drive and also to C:. There will be no notification from D: or E: drives and the applist wont be + updated whereas from C: notifications will be issued and applist will be updated. + In Winscw platform, all the drives will be monitored by default and notifications will be issued when the test + copies tnotifydrivesapp_reg.rsc to C: drive and W: drive and the applist will be updated. + + @SYMTestExpectedResults The app is not added to the applist when no notification is issued and applist is + updated when notifications are issued. +*/ +void CT_DriveNotificationStep::TestDrivesNotificationL() + { + INFO_PRINTF1(_L("Start TestDriveNotification()")); + + TApaAppInfo appInfo; + TUid appUid = {0xA0003376}; + RApaLsSession theLs; + User::LeaveIfError(theLs.Connect()); + CleanupClosePushL(theLs); + + // Wait for applist to be updated.... + RPointerArray dummy; + User::LeaveIfError(theLs.ForceRegistration(dummy)); + + //Check whether app is not present in the applist + TInt ret = theLs.GetAppInfo(appInfo,appUid); + INFO_PRINTF3(_L(" Expected value is %d, Call to GetAppInfo returned : %d "), KErrNotFound, ret); + TEST(ret==KErrNotFound); + + //Copy the registration file to C: drive. + CopyRegFileL(EDriveC); + + CDriveTestObserver* obs = new(ELeave) CDriveTestObserver(); + CleanupStack::PushL(obs); + CApaAppListNotifier* notif = CApaAppListNotifier::NewL(obs, CActive::EPriorityHigh); + CleanupStack::PushL(notif); + + obs->iNotifier = notif; + + CActiveScheduler::Start(); + //Since c:\\private\\10003a3f\\Import\\apps\\ path is Monitored, a notification is issued and applist is updated. + TEST(obs->iNotified > 0); + INFO_PRINTF2(_L("Received %d notifications"),obs->iNotified); + + //Check whether applist is updated and app is present in the applist. + ret = theLs.GetAppInfo(appInfo,appUid); + INFO_PRINTF3(_L(" Expected value is %d, Call to GetAppInfo returned : %d "), KErrNone, ret); + TEST(ret==KErrNone); + + //Deleting the rsc file that is present in c:\\private\\10003a3f\\Import\\apps\\ path. + DeleteRegFileL(EDriveC); + + // Wait for applist to be updated.... + User::LeaveIfError(theLs.ForceRegistration(dummy)); + + //Check whether applist is updated and app is absent in the applist. + ret = theLs.GetAppInfo(appInfo,appUid); + INFO_PRINTF3(_L(" Expected value is %d, Call to GetAppInfo returned : %d "), KErrNotFound, ret); + TEST(ret==KErrNotFound); + + //Armv5 platform, GetMMCDriveL() returns either the D: (in case of NAND rom) or E: (in case of Normal rom). + //Winscw platform, GetMMCDriveL() returns W:. + TDriveNumber drive = GetMMCDriveL(); + + //Copy the registration file to drive specified. + CopyRegFileL(drive); + + // Wait for applist to be updated.... + User::LeaveIfError(theLs.ForceRegistration(dummy)); + + //Check whether applist is updated and app is present in the applist. +#ifdef __EABI__ + ret = theLs.GetAppInfo(appInfo,appUid); + TEST (ret == KErrNotFound); + INFO_PRINTF3(_L(" Expected value is %d, Call to GetAppInfo returned : %d "), KErrNotFound, ret); + //Deleting the rsc file. + DeleteRegFileL(drive); +#else + ret = theLs.GetAppInfo(appInfo,appUid); + TEST(ret==KErrNone); + INFO_PRINTF3(_L(" Expected value is %d, Call to GetAppInfo returned : %d "),KErrNone, ret); + //Deleting the rsc file. + DeleteRegFileL(drive); +#endif + CleanupStack::PopAndDestroy(3, &theLs); + + INFO_PRINTF1(_L("End TestDrivesNotificationL()")); + } +/* +Copy the tnotifydrivesapp_reg.rsc file from source to destination. +In Winscw platform, the registration file is copied to C: and W: drive. +In Armv5 platform, the registration file is copied to C: and D: or E: drive. +*/ + +void CT_DriveNotificationStep::CopyRegFileL(TDriveNumber aDriveNumber) + { + _LIT(KResourceFileTarget, ":\\private\\10003a3f\\Import\\apps\\tnotifydrivesapp_reg.rsc"); + _LIT(KResourceAppFolder, ":\\private\\10003a3f\\Import\\apps\\"); + RBuf tempPathToBeCopied, tempFolderToBeCreated; + RFs fs; + TChar driveLetter; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + TInt maxSizeofFileName = KResourceFileTarget().Length() + 1; + TInt maxSizeofFolderName = KResourceAppFolder().Length() + 1; + tempPathToBeCopied.CreateL(maxSizeofFileName); + CleanupClosePushL(tempPathToBeCopied); + tempFolderToBeCreated.CreateL(maxSizeofFolderName); + CleanupClosePushL(tempFolderToBeCreated); + fs.DriveToChar(aDriveNumber,driveLetter); + tempPathToBeCopied.Append(driveLetter); + tempPathToBeCopied.Append(KResourceFileTarget); + tempFolderToBeCreated.Append(driveLetter); + tempFolderToBeCreated.Append(KResourceAppFolder); + RSmlTestUtils smlServer; + CleanupClosePushL(smlServer); + TInt ret = smlServer.Connect(); + TEST(ret == KErrNone); + ret = smlServer.CreateDirectoryL(tempFolderToBeCreated); + if (ret != KErrNone && ret != KErrAlreadyExists) + { + User::LeaveIfError(ret); + } + ret = smlServer.CopyFileL(KResourceFileSourceZ, tempPathToBeCopied); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("Copied Registration file. Finished with the value : %d "), ret); + CleanupStack::PopAndDestroy(4, &fs); + } + + + +void CT_DriveNotificationStep::DeleteRegFileL(TDriveNumber aDriveNumber) + { + _LIT(KResourceFileTarget, ":\\private\\10003a3f\\Import\\apps\\tnotifydrivesapp_reg.rsc"); + RBuf tempPathToBeDeleted; + RFs fs; + TChar driveLetter; + CleanupClosePushL(fs); + User::LeaveIfError(fs.Connect()); + TInt maxSizeofFileName = KResourceFileTarget().Length() + 1; + tempPathToBeDeleted.CreateL(maxSizeofFileName); + CleanupClosePushL(tempPathToBeDeleted); + fs.DriveToChar(aDriveNumber,driveLetter); + tempPathToBeDeleted.Append(driveLetter); + tempPathToBeDeleted.Append(KResourceFileTarget); + RSmlTestUtils smlServer; + CleanupClosePushL(smlServer); + TInt ret = smlServer.Connect(); + TEST(ret == KErrNone); + ret = smlServer.SetReadOnly(tempPathToBeDeleted, 0) ; + TEST(ret == KErrNone); + //delete the file + ret = smlServer.DeleteFileL(tempPathToBeDeleted); + TEST(ret == KErrNone); + INFO_PRINTF2(_L("Deleted Registration file. Finished with value : %d"), ret); + CleanupStack::PopAndDestroy(3,&fs); + } + + +TDriveNumber CT_DriveNotificationStep::GetMMCDriveL() + { + TDriveNumber drive = EDriveW; +#ifdef __EABI__ + RFs fs; + User::LeaveIfError(fs.Connect()); + // The removable media is expected at D: on NAND ROM and at E: on normal ROMs. + //The following code works on techview but not guaranteed to work on all platforms. + TDriveInfo driveInfo; + TInt err = fs.Drive(driveInfo, EDriveD); + if(err == KErrNone && ((driveInfo.iDriveAtt & KDriveAttRemovable) != 0)) + { + // Use drive D + drive = EDriveD; + } + else + { + err = fs.Drive(driveInfo, EDriveE); + if(err == KErrNone && ((driveInfo.iDriveAtt & KDriveAttRemovable) != 0)) + { + // Use drive E + drive = EDriveE; + } + } + fs.Close(); +#else + drive = EDriveW; +#endif + return drive; + } + + +TVerdict CT_DriveNotificationStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing the Notifications ... T_DriveNotification")); + + // start an active scheduler + iScheduler=new(ELeave) CActiveScheduler(); + CActiveScheduler::Install(iScheduler); + + // run the testcode (inside an alloc heaven harness) + __UHEAP_MARK; + + TRAPD(ret,TestDrivesNotificationL()); + TEST(ret==KErrNone); + INFO_PRINTF2(_L("TestDrivesNotificationL finished with code '%d'\n"), ret); + + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("T_DriveNotification Completed.")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_drivenotification.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_drivenotification.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_DRIVENOTIFICATION_H__) +#define __T_DRIVENOTIFICATION_H__ +#include "ApparcTestServer.h" +#include +#include +#include + +/** Checks for notifications when application list changes. */ + +class CT_DriveNotificationStep :public CTestStep + { +public: + CT_DriveNotificationStep(); + ~CT_DriveNotificationStep(); + virtual TVerdict doTestStepL(); + void TestDrivesNotificationL(); +private: + TDriveNumber GetMMCDriveL(); + void DeleteRegFileL(TDriveNumber aDriveNumber); + void CopyRegFileL(TDriveNumber aDriveNumber); + CActiveScheduler* iScheduler; + }; + +class CDriveTestObserver : public CBase, public MApaAppListServObserver + { +public: // from MApaAppListServObserver + void HandleAppListEvent(TInt aEvent); +public: + TInt iNotified; + CApaAppListNotifier* iNotifier; + }; + +_LIT(KT_DriveNotificationStep,"T_DriveNotification"); +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_largestackstep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_largestackstep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,113 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The following test case is used to test whether or not Apparc can handle loading applications with excessively large stack frames. +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include +#include +#include +#include "../apserv/APSCLSV.H" +#include "T_LargeStackStep.h" + +const TUid KLargeStackAppUid = {0x10282B27}; + +TInt RTestApaLsSession::TestExeRecognizerL(const CApaCommandLine& aCommandLine) + { + TThreadId dummyThreadId; + TPckg threadId(dummyThreadId); + const TInt opcode=EAppListServStartAppWithoutReturningThreadId; + TIpcArgs ipcArgs; + aCommandLine.GetIpcArgsLC(ipcArgs); + ipcArgs.Set(CApaCommandLine::EIpcFirstFreeSlot, &threadId); + User::LeaveIfError(SendReceive(opcode, ipcArgs)); + CleanupStack::PopAndDestroy(); // the TIpcArgs + return KErrNone; + } + +CT_LargeStackStep::CT_LargeStackStep() + { + } + +CT_LargeStackStep::~CT_LargeStackStep() + { + iApaLsSession.Close(); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0060 + + @SYMPREQ CR0885 + + @SYMTestCaseDesc + Test apparc's use of RProcess::CreateWithStackOverride + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions + 1. Load an application with an overly large stack requirement via RApaLsSession::StartApp. + 2. Load the application via RApaLsSession::StartDocument + + @SYMTestExpectedResults + Application should start normally both times. + +*/ +void CT_LargeStackStep::TestLargeStackL() + { + TApaAppInfo info; + INFO_PRINTF1(_L("Test that the large stack example application can be found")); + TEST(iApaLsSession.GetAppInfo(info,KLargeStackAppUid)==KErrNone); + + INFO_PRINTF1(_L("Test that the application executes without error")); + CApaCommandLine* commandline = CApaCommandLine::NewLC(); + commandline->SetExecutableNameL(info.iFullName); + commandline->SetCommandL(EApaCommandRunWithoutViews); + TEST(iApaLsSession.StartApp(*commandline)==KErrNone); + + INFO_PRINTF1(_L("Test running the application via the legacy recogniser code.")); + TEST(iApaLsSession.TestExeRecognizerL(*commandline)==KErrNone); + + INFO_PRINTF1(_L("Test running the application via StartDocument.")); + TThreadId threadId; + TEST(iApaLsSession.StartDocument(_L("z:\fakename.doc"), KLargeStackAppUid, threadId, RApaLsSession::ELaunchNewApp)==KErrNone); + + // Cleanup + CleanupStack::PopAndDestroy(commandline); + } + +TVerdict CT_LargeStackStep::doTestStepL() + { + INFO_PRINTF1(_L("Test T_LargeStack Started")); + + __UHEAP_MARK; + // Connect to RApaLsSession + TEST(iApaLsSession.Connect()==KErrNone); + + // Run the test + TRAPD(err,TestLargeStackL()); + TEST(err==KErrNone); + __UHEAP_MARKEND; + + INFO_PRINTF1(_L("Test Finished")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_largestackstep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_largestackstep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,53 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_LARGESTACK_H +#define __T_LARGESTACK_H + +#include "appfwk_test_AppUi.h" + +_LIT(KT_LargeStackStep, "T_LargeStack"); + +class RTestApaLsSession : public RApaLsSession + { +public: + TInt TestExeRecognizerL(const CApaCommandLine& aCommandLine); + }; + +class CT_LargeStackStep : public CTestStep + { +public: + CT_LargeStackStep(); + ~CT_LargeStackStep(); + + //from CTestStep + TVerdict doTestStepL(); + +private: + void TestLargeStackL(); + +private: + RTestApaLsSession iApaLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_mimecontentpolicystep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_mimecontentpolicystep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,512 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include "t_mimecontentpolicystep.h" + +_LIT(KPathjpg1, "z:\\system\\data\\type-r.jpg"); +_LIT(KPathjpg2, "z:\\system\\data\\propelli.jpg"); +_LIT(KPathdcf, "z:\\system\\data\\sd_goo.dcf"); +_LIT(KPathdm1, "z:\\system\\data\\fl_goo.dm"); +_LIT(KPathgif, "z:\\system\\data\\gif_wallpaper.gif"); +_LIT(KPathdm2, "z:\\system\\data\\jpeg_wes.dm"); + +/** + Constructor + */ +CT_MimeContentPolicyStep::CT_MimeContentPolicyStep() + { + // Call base class method to set up the human readable name for logging*/ + SetTestStepName(KT_MimeContentPolicyStep); + } + +/** + Destructor + */ +CT_MimeContentPolicyStep::~CT_MimeContentPolicyStep() + { + delete iCcp; + iApaLsSession.Close(); + iFs.Close(); + } + +TVerdict CT_MimeContentPolicyStep::doTestStepL() + { + INFO_PRINTF1(_L("Testing Apparc...T_MimeContentPolicyStep Test Cases Running...")); + TInt error = iApaLsSession.Connect(); + TEST(error == KErrNone); + + error = iFs.Connect(); + TEST(error == KErrNone); + + iCcp = CApfMimeContentPolicy::NewL(); + + User::LeaveIfError(iFs.ShareProtected()); + + TRAPD(ret,RunTestCasesL()) + TEST(ret==KErrNone); + + INFO_PRINTF1(_L("...T_MimeContentPolicyStep Test Cases Completed.")); + return TestStepResult(); + } + +void CT_MimeContentPolicyStep::RunTestCasesL() + { + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsClosedType(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsClosedExtension(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsDRMEnvelopeFileNameL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsClosedFileFileNameL(), iApaLsSession.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsDRMEnvelopeFileHandleL(), NO_CLEANUP); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsClosedFileFileHandleL(), iApaLsSession.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPOOMTestL(), iApaLsSession.FlushRecognitionCache()); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0077 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc Tests IsClosedType() method for different mime types + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Closed types are the mime types which are listed in the ApfMimeContentPolicy.rss file. + Calls CApfMimeContentPolicy::IsClosedType(const TDesC& aMimeType); for different closed and non-closed mime types. + + @SYMTestExpectedResults The test checks whether IsClosedType returns ETrue for the Closed Mime types and EFalse for non-closed Mime types + */ +void CT_MimeContentPolicyStep::CCPTestIsClosedType() + { + _LIT(KMimeType0, "application/vnd.oma.drm.message"); + _LIT(KMimeType1, "application/vnd.oma.drm.rights+xml"); + _LIT(KMimeType2, "application/vnd.oma.drm.rights+wbxml"); + _LIT(KMimeType3, "application/vnd.nokia.ringing-tone"); + _LIT(KMimeType4, "audio/amr-wb"); + _LIT(KMimeType5, "audio/sp-midi"); + _LIT(KMimeType6, "image/vnd.nok.3Dscreensaver"); + _LIT(KMimeType7, "image/vnd.nok-wallpaper"); + _LIT(KMimeType8, "image/vnd.nok-oplogo"); + _LIT(KMimeType9, "image/vnd.nok-oplogo-color"); + _LIT(KMimeType10, "application/java"); + _LIT(KMimeType11, "application/java-archive"); + _LIT(KMimeType12, "application/x-java-archive"); + _LIT(KMimeType13, "text/vnd.sun.j2me.app-descriptor"); + _LIT(KMimeType14, "application/x-NokiaGameData"); + _LIT(KMimeType15, "application/vnd.symbian.install"); + _LIT(KMimeType16, "x-epoc/x-sisx-app"); + + _LIT(KMimeType17, "image/tiff"); + _LIT(KMimeType18, "application/javascript"); + _LIT(KMimeType19, "video/3gpp"); + _LIT(KMimeType20, "video/mpeg"); + _LIT(KMimeType21, "video/quicktime"); + _LIT(KMimeType22, "video/mpeg4-generic"); + + + INFO_PRINTF1(_L("Tests the MIME types found on closed content list")); + + TEST(iCcp->IsClosedType(KMimeType0)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType0); + + TEST(iCcp->IsClosedType(KMimeType1)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType1); + + TEST(iCcp->IsClosedType(KMimeType2)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType2); + + TEST(iCcp->IsClosedType(KMimeType3)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType3); + + TEST(iCcp->IsClosedType(KMimeType4)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType4); + + TEST(iCcp->IsClosedType(KMimeType5)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType5); + + TEST(iCcp->IsClosedType(KMimeType6)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType6); + + TEST(iCcp->IsClosedType(KMimeType7)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType7); + + TEST(iCcp->IsClosedType(KMimeType8)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType8); + + TEST(iCcp->IsClosedType(KMimeType9)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType9); + + TEST(iCcp->IsClosedType(KMimeType10)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType10); + + TEST(iCcp->IsClosedType(KMimeType11)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType11); + + TEST(iCcp->IsClosedType(KMimeType12)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType12); + + TEST(iCcp->IsClosedType(KMimeType13)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType13); + + TEST(iCcp->IsClosedType(KMimeType14)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType14); + + TEST(iCcp->IsClosedType(KMimeType15)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType15); + + TEST(iCcp->IsClosedType(KMimeType16)); + INFO_PRINTF2(_L("%S is Closed Type"), &KMimeType16); + + TEST(!iCcp->IsClosedType(KMimeType17)); + INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType17); + + TEST(!iCcp->IsClosedType(KMimeType18)); + INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType18); + + TEST(!iCcp->IsClosedType(KMimeType19)); + INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType19); + + TEST(!iCcp->IsClosedType(KMimeType20)); + INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType20); + + TEST(!iCcp->IsClosedType(KMimeType21)); + INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType21); + + TEST(!iCcp->IsClosedType(KMimeType22)); + INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType22); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0078 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc Tests IsClosedExtension() method for various File Extensions + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Closed file extensions are the file extensions which are listed in the ApfMimeContentPolicy.rss file. + Calls CApfMimeContentPolicy::IsClosedExtension(const TDesC& aFileExtension); for different closed and non-closed File Extensions. + + @SYMTestExpectedResults The test checks whether IsClosedExtension returns ETrue for the Closed File Extensions and EFalse for non-closed File Extensions. + */ +void CT_MimeContentPolicyStep::CCPTestIsClosedExtension() + { + _LIT(KExtension0, ".dm"); + _LIT(KExtension1, ".dr"); + _LIT(KExtension2, ".drc"); + _LIT(KExtension3, ".ott"); + _LIT(KExtension4, ".awb"); + _LIT(KExtension5, ".mid"); + _LIT(KExtension6, ".c3d"); + _LIT(KExtension7, ".jar"); + _LIT(KExtension8, ".ngd"); + _LIT(KExtension9, ".sis"); + _LIT(KExtension10, ".sisx"); + _LIT(KExtension11, ".jpg"); + _LIT(KExtension12, "jar.mp3"); + _LIT(KExtension13, ".siss"); + _LIT(KExtension14, ".sis7"); + _LIT(KExtension15, ".0sis"); + _LIT(KExtension16, ".gif"); + + INFO_PRINTF1(_L("Tests the extensions found on closed content list")); + + TEST(iCcp->IsClosedExtension(KExtension0)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension0); + + TEST(iCcp->IsClosedExtension(KExtension1)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension1); + + TEST(iCcp->IsClosedExtension(KExtension2)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension2); + + TEST(iCcp->IsClosedExtension(KExtension3)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension3); + + TEST(iCcp->IsClosedExtension(KExtension4)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension4); + + TEST(iCcp->IsClosedExtension(KExtension5)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension5); + + TEST(iCcp->IsClosedExtension(KExtension6)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension6); + + TEST(iCcp->IsClosedExtension(KExtension7)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension7); + + TEST(iCcp->IsClosedExtension(KExtension8)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension8); + + TEST(iCcp->IsClosedExtension(KExtension9)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension9); + + TEST(iCcp->IsClosedExtension(KExtension10)); + INFO_PRINTF2(_L("%S is Closed Extension"), &KExtension10); + + TEST(!iCcp->IsClosedExtension(KExtension11)); + INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension11); + + TEST(!iCcp->IsClosedExtension(KExtension12)); + INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension12); + + TEST(!iCcp->IsClosedExtension(KExtension13)); + INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension13); + + TEST(!iCcp->IsClosedExtension(KExtension14)); + INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension14); + + TEST(!iCcp->IsClosedExtension(KExtension15)); + INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension15); + + TEST(!iCcp->IsClosedExtension(KExtension16)); + INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension16); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0079 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc Tests IsDRMEnvelopeL() method for various files. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Calls CApfMimeContentPolicy::IsDRMEnvelopeL(const TDesC& aFileName); for different not DRM Envelopes files. + + @SYMTestExpectedResults The test checks whether IsDRMEnvelopeL() returns EFalse for non-DRM protected Files. + */ +void CT_MimeContentPolicyStep::CCPTestIsDRMEnvelopeFileNameL() + { + INFO_PRINTF1(_L("Tests given files are DRM envelopes given the file name")); + + TEST(!iCcp->IsDRMEnvelopeL(KPathjpg1)); + TEST(!iCcp->IsDRMEnvelopeL(KPathjpg2)); + TEST(!iCcp->IsDRMEnvelopeL(KPathdcf)); + TEST(!iCcp->IsDRMEnvelopeL(KPathdm1)); + TEST(!iCcp->IsDRMEnvelopeL(KPathgif)); + TEST(!iCcp->IsDRMEnvelopeL(KPathdm2)); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0080 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc Tests IsClosedFileL() method for various files. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Closed files are files whose file extensions are listed in the ApfMimeContentPolicy.rss file. + Calls CApfMimeContentPolicy::IsClosedFileL(const TDesC& aFileName); for different Closed and non-closed files. + Calls CApfMimeContentPolicy::IsClosedFileL(const TDesC& aFileName); with file which is already open and checks whether \n + call succeeds. + Calls CApfMimeContentPolicy::IsClosedFileL(const TDesC& aFileName); with Null file handle\n + + @SYMTestExpectedResults The test checks whether + 1. IsClosedFileL() returns EFalse for Files which are not closed and ETrue for files which are closed. + 2. IsClosedFileL() call succeeds even if we pass a open file handle. + 3. IsClosedFileL() leaves with KErrBadHandle if a null file handle is passed. + */ +void CT_MimeContentPolicyStep::CCPTestIsClosedFileFileNameL() + { + INFO_PRINTF1(_L("Tests given files are Closed Files using the FileName")); + + TEST(!iCcp->IsClosedFileL(KPathjpg1)); + + // File passed to IsClosedFileL is already open. + RFile fileHandle; + TEST((fileHandle.Open(iFs, KPathjpg2, EFileShareAny)) == KErrNone); + CleanupClosePushL(fileHandle); + TEST(!iCcp->IsClosedFileL(KPathjpg2)); + CleanupStack::PopAndDestroy(&fileHandle); + + // Bad File Handle is passed to IsClosedFileL API + RFile nullFileHandle; + INFO_PRINTF1(_L("Tests IsClosedFileL method passing null file handle")); + TRAPD(err, iCcp->IsClosedFileL(nullFileHandle)); + TEST(err == KErrBadHandle); + + // Check file extension. + TParse parser; + parser.Set(KPathdm2, NULL, NULL); + TEST(iCcp->IsClosedExtension(parser.Ext())); + INFO_PRINTF2(_L("%S is Closed File"), &KPathdm2); + + CApfMimeContentPolicy* mimeContentPolicy = CApfMimeContentPolicy::NewL(iFs); + CleanupStack::PushL(mimeContentPolicy); + TEST(!mimeContentPolicy->IsClosedFileL(KPathdcf)); + INFO_PRINTF2(_L("%S is not Closed File"), &KPathdcf); + CleanupStack::PopAndDestroy(mimeContentPolicy); + + mimeContentPolicy = CApfMimeContentPolicy::NewLC(iFs); + TEST(!mimeContentPolicy->IsClosedFileL(KPathgif)); + INFO_PRINTF2(_L("%S is not Closed File"), &KPathgif); + CleanupStack::PopAndDestroy(mimeContentPolicy); + } + +TBool CT_MimeContentPolicyStep::DoCCPTestUsingFileHandleL(const TDesC &aName, TBool aIsDRMEnvelope) + { + TBool ret = EFalse; + RFile fileHandle; + + TInt err; + err = fileHandle.Open(iFs, aName, EFileShareReadersOrWriters); + TEST(err == KErrNone); + CleanupClosePushL(fileHandle); + + if (aIsDRMEnvelope) + ret = iCcp->IsDRMEnvelopeL(fileHandle); + else + ret = iCcp->IsClosedFileL(fileHandle); + + CleanupStack::PopAndDestroy(&fileHandle); + return ret; + } + +/** + @SYMTestCaseID APPFWK-APPARC-0081 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc Tests IsDRMEnvelopeL() method for various files. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Calls CApfMimeContentPolicy::IsDRMEnvelopeL(RFile& aFileHandle); for different non-DRM Envelopes files. + + @SYMTestExpectedResults The test checks whether IsDRMEnvelopeL() returns EFalse for Files which are not DRM protected. + */ +void CT_MimeContentPolicyStep::CCPTestIsDRMEnvelopeFileHandleL() + { + INFO_PRINTF1(_L("Tests given files are DRM envelopes given the file handle")); + + TEST(!DoCCPTestUsingFileHandleL(KPathjpg1, ETrue)); + TEST(!DoCCPTestUsingFileHandleL(KPathjpg2, ETrue)); + TEST(!DoCCPTestUsingFileHandleL(KPathdcf, ETrue)); + TEST(!DoCCPTestUsingFileHandleL(KPathdm1, ETrue)); + TEST(!DoCCPTestUsingFileHandleL(KPathgif, ETrue)); + TEST(!DoCCPTestUsingFileHandleL(KPathdm2, ETrue)); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0082 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc Tests IsClosedFileL() method for various files. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Closed files are files whose file extensions are listed in the ApfMimeContentPolicy.rss file. + Calls CApfMimeContentPolicy::IsClosedFileL(RFile& aFileHandle); for different Closed and non-closed files. + + @SYMTestExpectedResults The test checks whether IsClosedFileL() returns EFalse for Files which are not closed and\n + ETrue for files which are closed. + */ +void CT_MimeContentPolicyStep::CCPTestIsClosedFileFileHandleL() + { + INFO_PRINTF1(_L("Tests given files are Closed Files using File Handle")); + + TEST(!DoCCPTestUsingFileHandleL(KPathjpg1, EFalse)); + TEST(!DoCCPTestUsingFileHandleL(KPathjpg2, EFalse)); + TEST(!DoCCPTestUsingFileHandleL(KPathdcf, EFalse)); + TEST(DoCCPTestUsingFileHandleL(KPathdm1, EFalse)); + TEST(!DoCCPTestUsingFileHandleL(KPathgif, EFalse)); + TEST(DoCCPTestUsingFileHandleL(KPathdm2, EFalse)); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0084 + + @SYMREQ REQ7736 + + @SYMTestCaseDesc OOM test for CApfMimeContentPolicy's NewL() and IsClosedFileL() methods. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Calls CApfMimeContentPolicy's NewL() and IsClosedFileL() methods under OOM conditions. + + @SYMTestExpectedResults Tests should complete without any memory leaks. + */ +void CT_MimeContentPolicyStep::CCPOOMTestL() + { + INFO_PRINTF1(_L("OOM test for CApfMimeContentPolicy")); + CApfMimeContentPolicy* mimeContentPolicy = NULL; + + TInt fail = 0; + for (fail = 1; ; fail++) + { + __UHEAP_SETFAIL(RHeap::EDeterministic, fail); + __UHEAP_MARK; + TRAPD(err, mimeContentPolicy = CApfMimeContentPolicy::NewLC(); CleanupStack::Pop(mimeContentPolicy)); + TEST(err == KErrNone || err == KErrNoMemory); + if (err == KErrNone) + { + delete mimeContentPolicy; + __UHEAP_MARKEND; + break; + } + __UHEAP_MARKEND; + } + + __UHEAP_RESET; + TRAPD(err, mimeContentPolicy = CApfMimeContentPolicy::NewL()); + CleanupStack::PushL(mimeContentPolicy); + TEST(err == KErrNone); + + TInt ret = KErrNone; + for (fail = 1; ; fail++) + { + __UHEAP_SETFAIL(RHeap::EDeterministic, fail); + __UHEAP_MARK; + TRAP(err, ret = mimeContentPolicy->IsClosedFileL(KPathdm1)); + TEST(err == KErrNone || err == KErrNoMemory); + if (err == KErrNone) + { + INFO_PRINTF1(_L("OOM Test for IsClosedFileL Method")); + TEST(ret); + INFO_PRINTF2(_L("%S is Closed File"), &KPathdm1); + CleanupStack::PopAndDestroy(mimeContentPolicy); + __UHEAP_MARKEND; + break; + } + __UHEAP_MARKEND; + } + + __UHEAP_RESET; + INFO_PRINTF1(_L("OOM test Completed")); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_mimecontentpolicystep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_mimecontentpolicystep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,58 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_MIMECONTENTPOLICY_STEP_H__) +#define __T_MIMECONTENTPOLICY_STEP_H__ + +#include "testableapalssession.h" +#include "appfwk_test_AppUi.h" +#include + +_LIT(KT_MimeContentPolicyStep,"t_mimecontentpolicy"); + +class CT_MimeContentPolicyStep : public CTestStep + { +public: + CT_MimeContentPolicyStep(); + ~CT_MimeContentPolicyStep(); + virtual TVerdict doTestStepL(); + +private: + void RunTestCasesL(); + void CCPTestIsClosedType(); + void CCPTestIsClosedExtension(); + void CCPTestIsDRMEnvelopeFileNameL(); + void CCPTestIsClosedFileFileNameL(); + void CCPTestIsDRMEnvelopeFileHandleL(); + void CCPTestIsClosedFileFileHandleL(); + // aIsDRMEnvelope is ETrue for DRM Envelope and EFalse for ClosedFile + TBool DoCCPTestUsingFileHandleL(const TDesC &aName, TBool aIsDRMEnvelope); + void CCPOOMTestL(); + +private: + CApfMimeContentPolicy* iCcp; + RTestableApaLsSession iApaLsSession; + RFs iFs; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_rapalssessionstep.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_rapalssessionstep.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,31 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file r_rapalssessionstep.rss + @internalComponent - Internal Symbian test code +*/ + + +#include "uikon.rh" + +NAME TEST +RESOURCE VIEW_ID view1 + { + appuid=1234; + viewuid=5678; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_servicebasestep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_servicebasestep.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,502 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include "t_servicebasestep.h" +#include +#include +#include +#include "testableapalssession.h" +#include "../tef/TNonNative/TNNApp1.h" + +TInt PanicTest(TAny* aOption); + +// RTstServiceApp + +TInt RTstServiceApp::DoTestTransferSessionL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath) + { // static + //create the first session object + RTstServiceApp appServiceFirst(aServiceUid); + CleanupClosePushL(appServiceFirst); + //connecting first session object + appServiceFirst.ConnectL(); + + //create the second session object + RTstServiceApp appServiceSecond(aServiceUid); + //transfer session for first session object to the second session object + appServiceSecond.TransferExistingSessionL(appServiceFirst); + CleanupClosePushL(appServiceSecond); + + TRequestStatus requestStatus; + //request for a service from the second session object + appServiceSecond.ReceiveTestResult(requestStatus, aPassingFileByHandle, aFileNameWithoutDriveOrPath); + User::WaitForRequest(requestStatus); + const TInt result=User::LeaveIfError(requestStatus.Int()); + + CleanupStack::PopAndDestroy(&appServiceSecond); + CleanupStack::PopAndDestroy(&appServiceFirst); + User::After(5 * 1000000); //Wait 5sec for Apparc update due to paging + + return result; + } + +TInt RTstServiceApp::DoTestTransferSessionAndBackL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath) + { // static + //create the first session object + RTstServiceApp appServiceFirst(aServiceUid); + CleanupClosePushL(appServiceFirst); + //connecting first session object + appServiceFirst.ConnectL(); + + //create the second session object + RTstServiceApp appServiceSecond(aServiceUid); + //transfer session from first session object to the second session object + appServiceSecond.TransferExistingSessionL(appServiceFirst); + CleanupClosePushL(appServiceSecond); + + //transfer session back to first session object from the second session object + appServiceFirst.TransferExistingSessionL(appServiceSecond); + TRequestStatus requestStatus; + //request for a service from the first session object + appServiceFirst.ReceiveTestResult(requestStatus, aPassingFileByHandle, aFileNameWithoutDriveOrPath); + User::WaitForRequest(requestStatus); + const TInt result=User::LeaveIfError(requestStatus.Int()); + + CleanupStack::PopAndDestroy(&appServiceSecond); + CleanupStack::PopAndDestroy(&appServiceFirst); + User::After(5 * 1000000); //Wait 5sec for Apparc update due to paging + + return result; + } + +TInt RTstServiceApp::DoTestTransferWithUnconnectedSessionL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath) + { // static + //create the first session object + RTstServiceApp appServiceFirst(aServiceUid); + CleanupClosePushL(appServiceFirst); + + //create the second session object + RTstServiceApp appServiceSecond(aServiceUid); + //transfer session for first session object to the second session object + appServiceSecond.TransferExistingSessionL(appServiceFirst); + CleanupClosePushL(appServiceSecond); + + TRequestStatus requestStatus; + //request for a service from the second session object + appServiceSecond.ReceiveTestResult(requestStatus, aPassingFileByHandle, aFileNameWithoutDriveOrPath); + User::WaitForRequest(requestStatus); + const TInt result=User::LeaveIfError(requestStatus.Int()); + + CleanupStack::PopAndDestroy(&appServiceSecond); + CleanupStack::PopAndDestroy(&appServiceFirst); + User::After(5 * 1000000); //Wait 5sec for Apparc update due to paging + + return result; + } + +RTstServiceApp::RTstServiceApp(TUid aServiceUid) + :iServiceUid(aServiceUid) + { + } + +void RTstServiceApp::ConnectL() + { + ConnectExistingByNameL(KLitServerName); + } + +void RTstServiceApp::ReceiveTestResult(TRequestStatus& aRequestStatus, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath) + { + SendReceive(EOpcode_receiveTestResult, TIpcArgs(aPassingFileByHandle, &aFileNameWithoutDriveOrPath), aRequestStatus); + } + +TUid RTstServiceApp::ServiceUid() const + { + return iServiceUid; + } + +//CT_ServiceBaseStep + +void CT_ServiceBaseStep::ClosePanicWindowL() + { + RWsSession ws; + User::LeaveIfError(ws.Connect()); + + TInt wgFocus = ws.GetFocusWindowGroup(); + + const TUint32 KClientHandle = 0xFFFFFFFF; // Events delivered to this handle are thrown away + RWindowGroup wg = RWindowGroup(ws); + + wg.Construct(KClientHandle); + TInt wgId = wg.Identifier(); + + TWsEvent event; + event.SetType(EEventKey); + TKeyEvent *keyEvent = event.Key(); + keyEvent->iCode = EKeyEscape; + keyEvent->iScanCode = EStdKeyEscape; + keyEvent->iModifiers = 0; + + TInt limit = 0; + for(limit = 0; wgFocus != wgId && (limit < 50); limit++) + { + ws.SendEventToAllWindowGroups(event); + wgFocus = ws.GetFocusWindowGroup(); + RDebug::Print(_L("ClosePanicWindowL() - EKeyEscape sent to Windows Group")); + } + + // close everything + wg.Close(); + ws.Close(); + } + +void PanicFirstInstanceAfterTransferL() + { + TPtrC fullFileName = _L("z:\\private\\101F289C\\GIF.NNA1"); + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + const TUid serviceUid = {0x10207f97}; + + RTestableApaLsSession apparcServer; + CleanupClosePushL(apparcServer); + User::LeaveIfError(apparcServer.Connect()); + + RFs fileServer; + CleanupClosePushL(fileServer); + User::LeaveIfError(fileServer.Connect()); + User::LeaveIfError(fileServer.ShareProtected()); + + apparcServer.FlushRecognitionCache(); + + RFile file; + CleanupClosePushL(file); + User::LeaveIfError(file.Open(fileServer, fullFileName, EFileShareReadersOnly|EFileStream|EFileRead)); + + TThreadId threadId2; + TRequestStatus requestStatusForRendezvous2; + User::LeaveIfError(apparcServer.StartDocument(file, threadId2, &requestStatusForRendezvous2)); + User::WaitForRequest(requestStatusForRendezvous2); + + //create the first session object + RTstServiceApp appServiceFirst(serviceUid); + CleanupClosePushL(appServiceFirst); + appServiceFirst.ConnectL(); + + //create the second session object + RTstServiceApp appServiceSecond(serviceUid); + //transfer session from first session object to the second session object + appServiceSecond.TransferExistingSessionL(appServiceFirst); + CleanupClosePushL(appServiceSecond); + TRequestStatus requestStatus; + //request for a service from the first session object + appServiceFirst.ReceiveTestResult(requestStatus, ETrue, fileNameWithoutDriveOrPath); + //code should have panicked by now + User::WaitForRequest(requestStatus); + const TInt result=User::LeaveIfError(requestStatus.Int()); + + CleanupStack::PopAndDestroy(&appServiceSecond); + CleanupStack::PopAndDestroy(&appServiceFirst); + } + +void PanicSecondInstanceAfterTransferBackL() + { + TPtrC fullFileName = _L("z:\\private\\101F289C\\GIF.NNA1"); + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + const TUid serviceUid = {0x10207f97}; + + RTstServiceApp appServiceFirst(serviceUid); + CleanupClosePushL(appServiceFirst); + appServiceFirst.ConnectL(); + + RTstServiceApp appServiceSecond(serviceUid); + //transfer session from first session object to the second session object + appServiceSecond.TransferExistingSessionL(appServiceFirst); + CleanupClosePushL(appServiceSecond); + + //Transfer ownership back to first instance + appServiceFirst.TransferExistingSessionL(appServiceSecond); + + TRequestStatus requestStatus; + //request for a service from the first session object + appServiceSecond.ReceiveTestResult(requestStatus, ETrue, fileNameWithoutDriveOrPath); + //code should have panicked by now + User::WaitForRequest(requestStatus); + const TInt result=User::LeaveIfError(requestStatus.Int()); + + CleanupStack::PopAndDestroy(&appServiceSecond); + CleanupStack::PopAndDestroy(&appServiceFirst); + } + +TInt PanicTest(TAny* aOption) + { + CTrapCleanup* trapCleanup = CTrapCleanup::New(); + if (!trapCleanup) + { + return KErrNoMemory; + } + TInt option = (TInt)aOption; + TInt err = KErrNone; + if (option == 1) + { + TRAP(err, PanicFirstInstanceAfterTransferL()); + } + else + { + TRAP(err, PanicSecondInstanceAfterTransferBackL()); + } + + delete trapCleanup; + return err; + } + +void CT_ServiceBaseStep::OpenFileLC(RFile& aFile, RFs& aFileServer, const TDesC& aFullFileName) + { + CleanupClosePushL(aFile); + User::LeaveIfError(aFile.Open(aFileServer, aFullFileName, EFileShareReadersOnly|EFileStream|EFileRead)); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0092 + + @SYMCR CR1555 + + @SYMTestCaseDesc Transfer ownership of session from one instance of RApaAppServiceBase to another + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Start the server application. + Create an instance of RApaAppServiceBase and connect to server. + Create another instance of RApaAppServiceBase and take the ownership of the connected session. + Request a service from the second instance. + + @SYMTestExpectedResults Check if request has been serviced correctly. + */ +void CT_ServiceBaseStep::TestServiceAppL(RApaLsSession& aApparcServer, RFs& aFileServer) + { + TPtrC fullFileName = _L("z:\\private\\101F289C\\GIF.NNA1"); + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + const TUid serviceUid = {0x10207f97}; + + //Transfer session from one RApaAppServiceBase instance to another and request for service from the latter + __UHEAP_MARK; + RFile file; + OpenFileLC(file, aFileServer, fullFileName); + TThreadId threadId; + TRequestStatus requestStatusForRendezvous; + User::LeaveIfError(aApparcServer.StartDocument(file, threadId, &requestStatusForRendezvous)); + User::WaitForRequest(requestStatusForRendezvous); + INFO_PRINTF1(_L("App started....\n")); + TEST(RTstServiceApp::DoTestTransferSessionL(serviceUid, ETrue, fileNameWithoutDriveOrPath) == KCheckPass); + INFO_PRINTF1(_L("Requested service completed successfully....\n")); + CleanupStack::PopAndDestroy(&file); + __UHEAP_MARKEND; + } + +/** + @SYMTestCaseID APPFWK-APPARC-0093 APPFWK-APPARC-0095 + + @SYMCR CR1555 + + @SYMTestCaseDesc Testing if requesting service with the wrong instance will panic + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Start the server application. + Create two instances of RApaAppServiceBase and connect to server. + Request service with the wrong instance(which does not have the session). + + @SYMTestExpectedResults Requesting service with the wrong instance should raise a KERN-EXEC 0 panic. + */ +void CT_ServiceBaseStep::TestPanicWithWrongInstanceL() + { + RThread thread; + TRequestStatus stat; + TBuf<32> threadNameBuf; + // Give each thread a unique name to avoid KErrAlreadyExists error on thread creation + _LIT(KThreadNameFormat, "CT_ServiceBaseStep%d"); + threadNameBuf.Format(KThreadNameFormat, 1); + + //Transfer session from one RApaAppServiceBase instance to another and request for service from the first, this should panic with KERN-EXEC 0 + TInt threadCreationVal = thread.Create(threadNameBuf,PanicTest,KDefaultStackSize,0x2000,0x20000,(TAny*)1); + TEST(threadCreationVal==KErrNone); + + TRequestStatus status; + thread.Logon(status); + TBool jit = User::JustInTime(); + User::SetJustInTime(EFalse); + thread.Resume(); + User::WaitForRequest(status); + + // we are always expecting the same panic category + TExitCategoryName category = thread.ExitCategory(); + TEST(category.Compare(_L("KERN-EXEC")) == 0); + INFO_PRINTF2(_L("Expected exit category:KERN-EXEC, Actual exit category: '%S'..."), &category); + + TInt exitReason = thread.ExitReason(); + TEST(exitReason == 0); + INFO_PRINTF2(_L("Expected exit reason: 0, Actual exit reason:, %d \n"), exitReason); + + thread.Close(); + + threadNameBuf.Format(KThreadNameFormat, 2); + //Transfer session from one RApaAppServiceBase instance to another and back, request for service from the second instance, this should panic with KERN-EXEC 0 + threadCreationVal = thread.Create(threadNameBuf,PanicTest,KDefaultStackSize,0x2000,0x20000,(TAny*)2); + TEST(threadCreationVal==KErrNone); + + thread.Logon(status); + User::SetJustInTime(EFalse); + thread.Resume(); + User::WaitForRequest(status); + + // we are always expecting the same panic category + category = thread.ExitCategory(); + TEST(category.Compare(_L("KERN-EXEC")) == 0); + INFO_PRINTF2(_L("Expected exit category:KERN-EXEC, Actual exit category: '%S'..."), &category); + + exitReason = thread.ExitReason(); + TEST(exitReason == 0); + INFO_PRINTF2(_L("Expected exit reason: 0, Actual exit reason:, %d \n"), exitReason); + + thread.Close(); + User::SetJustInTime(jit); + ClosePanicWindowL(); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0094 + + @SYMCR CR1555 + + @SYMTestCaseDesc Transfer ownership of session from one instance of RApaAppServiceBase to another and transfer back to first instance + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Start the server application. + Create an instance of RApaAppServiceBase and connect to server. + Create another instance of RApaAppServiceBase and take the ownership of the connected session. + Transfer back the ownership to the first instance. + Request a service from the first instance. + + @SYMTestExpectedResults Check if request has been serviced correctly. + */ +void CT_ServiceBaseStep::TestTransferBackL(RApaLsSession& aApparcServer, RFs& aFileServer) + { + TPtrC fullFileName = _L("z:\\private\\101F289C\\GIF.NNA1"); + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + const TUid serviceUid = {0x10207f97}; + + __UHEAP_MARK; + RFile file; + OpenFileLC(file, aFileServer, fullFileName); + TThreadId threadId; + TRequestStatus requestStatusForRendezvous; + User::LeaveIfError(aApparcServer.StartDocument(file, threadId, &requestStatusForRendezvous)); + User::WaitForRequest(requestStatusForRendezvous); + INFO_PRINTF1(_L("App started....\n")); + TEST(RTstServiceApp::DoTestTransferSessionAndBackL(serviceUid, ETrue, fileNameWithoutDriveOrPath) == KCheckPass); + INFO_PRINTF1(_L("Requested service completed successfully....\n")); + CleanupStack::PopAndDestroy(&file); + __UHEAP_MARKEND; + } + +/** + @SYMTestCaseID APPFWK-APPARC-0097 + + @SYMCR CR1555 + + @SYMTestCaseDesc Transfer ownership of session from one instance of RApaAppServiceBase which is not connected to another + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Start the server application. + Create an instance of RApaAppServiceBase. + Create another instance of RApaAppServiceBase and take the ownership of unconnected session. + + @SYMTestExpectedResults Check if function leaves with KErrArgument. + */ +void CT_ServiceBaseStep::TestTransferWithUnconnectedSessionL() + { + TPtrC fullFileName = _L("z:\\private\\101F289C\\GIF.NNA1"); + TPtrC fileNameWithoutDriveOrPath(TParsePtrC(fullFileName).NameAndExt()); + const TUid serviceUid = {0x10207f97}; + + __UHEAP_MARK; + TInt err; + TRAP(err, RTstServiceApp::DoTestTransferWithUnconnectedSessionL(serviceUid, ETrue, fileNameWithoutDriveOrPath)); + TEST(err == KErrArgument); + INFO_PRINTF2(_L("Expected error code: -6, Actual error code:, %d \n"), err); + __UHEAP_MARKEND; + } + +// CTestStep derived functions + +CT_ServiceBaseStep::~CT_ServiceBaseStep() + { + } + +CT_ServiceBaseStep::CT_ServiceBaseStep() + { + SetTestStepName(KT_ServiceBaseStep); + } + +TVerdict CT_ServiceBaseStep::doTestStepPreambleL() + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CT_ServiceBaseStep::doTestStepPostambleL() + { + return TestStepResult(); + } + +TVerdict CT_ServiceBaseStep::doTestStepL() + { + INFO_PRINTF1(_L("Test ServiceBase starting....\n")); + + RTestableApaLsSession apparcServer; + CleanupClosePushL(apparcServer); + User::LeaveIfError(apparcServer.Connect()); + + RFs fileServer; + CleanupClosePushL(fileServer); + User::LeaveIfError(fileServer.Connect()); + User::LeaveIfError(fileServer.ShareProtected()); + + apparcServer.FlushRecognitionCache(); + + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestServiceAppL(apparcServer, fileServer), apparcServer.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(apparcServer, 0, 0, TestPanicWithWrongInstanceL(), apparcServer.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(apparcServer, 0, DONT_CHECK, TestTransferBackL(apparcServer, fileServer), apparcServer.FlushRecognitionCache()); + HEAP_TEST_LS_SESSION(apparcServer, 0, 0, TestTransferWithUnconnectedSessionL(), apparcServer.FlushRecognitionCache()); + + CleanupStack::PopAndDestroy(2, &apparcServer); + + INFO_PRINTF1(_L("....Test ServiceBase completed!")); + return TestStepResult(); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_servicebasestep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_servicebasestep.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,74 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SERVICEBASESTEP_H__) +#define __T_SERVICEBASESTEP_H__ + +#include +#include +#include "apparctestserver.h" + + +// RTstServiceApp + +class RTstServiceApp : public RApaAppServiceBase + { +public: + static TInt DoTestTransferSessionL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath); + static TInt DoTestTransferSessionAndBackL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath); + static TInt DoTestTransferWithUnconnectedSessionL(TUid aServiceUid, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath); + RTstServiceApp(TUid aServiceUid); + void ConnectL(); + void ReceiveTestResult(TRequestStatus& aRequestStatus, TBool aPassingFileByHandle, const TDesC& aFileNameWithoutDriveOrPath); + // from RApaAppServiceBase + virtual TUid ServiceUid() const; +private: + const TUid iServiceUid; + }; + + + +// CT_ServiceBaseStep test class. + +class CT_ServiceBaseStep : public CTestStep + { +public: + CT_ServiceBaseStep(); + ~CT_ServiceBaseStep(); + + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + virtual TVerdict doTestStepL(); + +private: + void TestServiceAppL(RApaLsSession& aApparcServer, RFs& aFileServer); + void TestPanicWithWrongInstanceL(); + void OpenFileLC(RFile& aFile, RFs& aFileServer, const TDesC& aFullFileName); + void ClosePanicWindowL(); + void TestTransferBackL(RApaLsSession& aApparcServer, RFs& aFileServer); + void TestTransferWithUnconnectedSessionL(); + }; + +_LIT(KT_ServiceBaseStep,"T_ServiceBase"); + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainChild.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainChild.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,143 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The class definitions for the simple test application +// which is launched by t_winchainLaunch. The application +// checks that the window group id matches the parent app +// and returns a message based on the result. +// The class definitions are: +// CMyAppService +// CMyEikAppServer +// CChainChildApplication +// CChainChildAppUi +// CChainChildDocument +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_WINCHAINCHILD_H +#define __T_WINCHAINCHILD_H + +#include + +#include +#include +#include +#include +#include +#include ////TKAS added for exe-app + +#include // REikAppServiceBase +#include + +// Test stuff +#include "twindowchaining.h" + +class CPackagerAppUi; + + +//////////////////////////////////////////////////////////////////////// +// CMyAppService +//////////////////////////////////////////////////////////////////////// +class CMyAppService : public CApaAppServiceBase + { +private: + void ServiceL(const RMessage2& aMessage); + TInt TestL(TInt aParentWindowGroupID); + }; + + +//////////////////////////////////////////////////////////////////////// +// CMyEikAppServer +//////////////////////////////////////////////////////////////////////// +class CMyEikAppServer : public CEikAppServer + { +private: + CApaAppServiceBase* CreateServiceL(TUid aServiceType) const; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CChainChildApplication +// +//////////////////////////////////////////////////////////////////////// +class CChainChildApplication : public CEikApplication + { +public: + void NewAppServerL(CApaAppServer*& aAppServer) + { + aAppServer=new(ELeave) CMyEikAppServer; + }; + + TFileName BitmapStoreName() const; + TFileName ResourceFileName() const; + +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CChainChildAppUi +// +//////////////////////////////////////////////////////////////////////// +class CChainChildAppUi : public CEikAppUi + { +public: + CChainChildAppUi() : + CEikAppUi() + { + } + void ConstructL(); + ~CChainChildAppUi(); + virtual void RunTestStepL(TInt aNextStep); + +private: + // Inherited from class CEikAppUi + void HandleCommandL(TInt aCommand); + + +private: + + CCoeControl* iAppView; + + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CChainChildDocument +// +//////////////////////////////////////////////////////////////////////// +class CChainChildDocument : public CEikDocument + { +public: + static CChainChildDocument* NewL(CEikApplication& aApp); + CChainChildDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + + +#endif // T_WINCHAINCHILD diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainChild.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainChild.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + +#include + +epocstacksize 0x5000 + +TARGETPATH /sys/bin + +TARGET t_winchainChild.exe +TARGETTYPE exe + +UID 0x100039CE 0X10009e9f + +VENDORID 0x70000001 + +SOURCEPATH . + +SOURCE t_winchainChild_Application.cpp + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE ../tef + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib ws32.lib APPFWK_TEST_APPUI.LIB + +START RESOURCE t_winchainChild_reg.rss +TARGETPATH /private/10003a3f/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainChild_Application.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainChild_Application.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,207 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Source file for the implementation of the +// application class - CChainChildApplication +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#include "t_winChainChild.h" + + +/** The function is called by the UI framework to ask for the + application's UID. The returned value is defined by the + constant KUidTChainChildApp and must match the second value + defined in the project definition file. +*/ +TUid CChainChildApplication::AppDllUid() const + { + return KUidTChainChildApp; + } + +/** This function is called by the UI framework at + application start-up. It creates an instance of the + document class. +*/ +CApaDocument* CChainChildApplication::CreateDocumentL() + { + return new (ELeave) CChainChildDocument(*this); + } + + LOCAL_C CApaApplication* NewApplication() + { + return new CChainChildApplication; + } + +TFileName CChainChildApplication::BitmapStoreName() const + { + return KNullDesC(); + } + +TFileName CChainChildApplication::ResourceFileName() const + { + return KNullDesC(); + } + + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + + +/** The constructor of the document class just passes the + supplied reference to the constructor initialisation list. + The document has no real work to do in this application. +*/ +CChainChildDocument::CChainChildDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + + +/** This is called by the UI framework as soon as the + document has been created. It creates an instance + of the ApplicationUI. The Application UI class is + an instance of a CEikAppUi derived class. +*/ +CEikAppUi* CChainChildDocument::CreateAppUiL() + { + return new(ELeave) CChainChildAppUi; + } + +#include +/** The second phase constructor of the application UI class. + The application UI creates and owns the one and only view. +*/ +void CChainChildAppUi::ConstructL() + { + //CEikAppUi::ConstructL(); + CEikAppUi::BaseConstructL(ENoAppResourceFile|ENoScreenFurniture); + } + +// Check if parent ID is the KExoticOrdinalPriority +TInt CMyAppService::TestL(TInt aParentWindowGroupID) + { + CCoeEnv* coeEnv = CCoeEnv::Static(); + + + TInt wgCount=coeEnv->WsSession().NumWindowGroups(KExoticOrdinalPriority); + + RDebug::Print(_L("Child - TestL: wgCount = %d"), wgCount); + + RArray* wgIds=new(ELeave) RArray(wgCount); + CleanupStack::PushL(wgIds); + User::LeaveIfError(coeEnv->WsSession().WindowGroupList(KExoticOrdinalPriority,wgIds)); + + TBool testPassed=EFalse; + + // The root identifier of this window + TInt rootIdentifier = coeEnv->RootWin().Identifier(); + + RDebug::Print(_L("Child - TestL: rootIdentifier = %d"), rootIdentifier); + + RDebug::Print(_L("Child - TestL: Entering loop..")); + // Go through all window group IDs looking for the current one + for (TInt i=0;i +//#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10009e9f // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="t_winchainChild"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,111 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// The class definitions for the simple test application +// which launches the child application with window chaining +// The class definitions are: +// CChainLaunchApplication +// CChainLaunchAppUi +// CChainLaunchDocument +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __T_WINCHAINLAUNCH_H +#define __T_WINCHAINLAUNCH_H + +#include + +#include +#include +#include +#include +#include +#include ////TKAS added for exe-app + +#include // REikAppServiceBase +#include + +// Test stuff +#include "twindowchaining.h" + +class CPackagerAppUi; + +//////////////////////////////////////////////////////////////////////// +// +// CChainLaunchApplication +// +//////////////////////////////////////////////////////////////////////// + +class CChainLaunchApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + TFileName BitmapStoreName() const; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CChainLaunchAppUi +// +//////////////////////////////////////////////////////////////////////// +class CChainLaunchAppUi : public CEikAppUi, REikAppServiceBase + { +public: + CChainLaunchAppUi() : + CEikAppUi() + { + } + void ConstructL(); + ~CChainLaunchAppUi(); + virtual void RunTestStepL(TInt aNextStep); + +private: + // from RApaAppServiceBase + TUid ServiceUid() const; + + +private: + + CCoeControl* iAppView; + + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CChainLaunchDocument +// +//////////////////////////////////////////////////////////////////////// +class CChainLaunchDocument : public CEikDocument + { +public: + static CChainLaunchDocument* NewL(CEikApplication& aApp); + CChainLaunchDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + + +#endif // T_WINCHAINLAUNCH diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + +#include + +epocstacksize 0x5000 + +TARGETPATH /sys/bin + +TARGET t_winchainLaunch.exe +TARGETTYPE exe + +UID 0x100039CE 0X10009f9a + +VENDORID 0x70000001 + +SOURCEPATH . + +SOURCE t_winchainLaunch_Application.cpp + +USERINCLUDE . + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/test +SYSTEMINCLUDE ../tef + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib ws32.lib APPFWK_TEST_APPUI.LIB + +START RESOURCE t_winchainLaunch_reg.rss +TARGETPATH /private/10003a3f/apps +END diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch_Application.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch_Application.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,143 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Source file for the implementation of the +// application class - CChainLaunchApplication +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ +#include "t_winChainLaunch.h" + +/** The function is called by the UI framework to ask for the + application's UID. The returned value is defined by the + constant KUidTChainServerApp and must match the second value + defined in the project definition file. +*/ +TUid CChainLaunchApplication::AppDllUid() const + { + return KUidTChainServerApp; + } + +/** This function is called by the UI framework at + application start-up. It creates an instance of the + document class. +*/ +CApaDocument* CChainLaunchApplication::CreateDocumentL() + { + return new (ELeave) CChainLaunchDocument(*this); + } + + LOCAL_C CApaApplication* NewApplication() + { + return new CChainLaunchApplication; + } + +TFileName CChainLaunchApplication::BitmapStoreName() const + { + return KNullDesC(); + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + + +/** The constructor of the document class just passes the + supplied reference to the constructor initialisation list. + The document has no real work to do in this application. +*/ +CChainLaunchDocument::CChainLaunchDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + + +/** This is called by the UI framework as soon as the + document has been created. It creates an instance + of the ApplicationUI. The Application UI class is + an instance of a CEikAppUi derived class. +*/ +CEikAppUi* CChainLaunchDocument::CreateAppUiL() + { + return new(ELeave) CChainLaunchAppUi; + } + +#include + +/** The second phase constructor of the application UI class. + The application UI creates and owns the one and only view. +*/ +void CChainLaunchAppUi::ConstructL() + { + //CEikAppUi::ConstructL(); + CEikAppUi::BaseConstructL(ENoAppResourceFile|ENoScreenFurniture); + + TInt rootIdentifier = iCoeEnv->RootWin().Identifier(); + + RDebug::Print(_L("Launch - ConstructL: rootIdentifier = %d"), rootIdentifier); + + CEikDocument *doc = Document(); + CApaApplication* app = doc->Application(); + iCoeEnv->RootWin().SetOrdinalPosition(0, KExoticOrdinalPriority); + + //Connnect using ConnectNewChildAppL with a valid TSecurityPolicy + ConnectNewChildAppL(KUidTChainChildApp, iCoeEnv->RootWin(),TSecurityPolicy(TVendorId(0x70000001))); + TInt result1=User::LeaveIfError(SendReceive(KQueryChainChild1, TIpcArgs(iCoeEnv->RootWin().Identifier()))); + Close(); + + //Connnect using ConnectNewAppL with a valid TSecurityPolicy + ConnectNewAppL(KUidTChainChildApp, TSecurityPolicy(TVendorId(0x70000001))); + TInt result2=User::LeaveIfError(SendReceive(KQueryChainChild2, TIpcArgs(iCoeEnv->RootWin().Identifier()))); + Close(); + + RDebug::Print(_L("Launch - ConstructL: result1 = %d, result2 = %d"), result1, result2); + + if (result1 == KChainPass && result2 ==0 ) + { + User::Exit(KTWindowChainingTestPassed); + } + else + { + User::Exit(-1); + } + } + +TUid CChainLaunchAppUi::ServiceUid() const + { + CEikDocument *doc = Document(); + CApaApplication* app = doc->Application(); + + return app->AppDllUid(); + } + + +/** The app Ui owns the two views and is. + therefore, responsible for destroying them +*/ +CChainLaunchAppUi::~CChainLaunchAppUi() + { + } + + +void CChainLaunchAppUi::RunTestStepL(TInt /*aNextStep*/) + { + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/t_winchainLaunch_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file t_winchainLaunch_reg.rss + @internalComponent - Internal Symbian test code +*/ + +#include +//#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x10009f9a // App UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file="t_winchainLaunch"; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tapparctestapp_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tapparctestapp_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,38 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + short_caption = "tapparctestapp"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "tapparctestapp"; + number_of_icons = 1; + icon_file = "z:\\resource\\apps\\svg_icon.svg"; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/testableapalssession.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/testableapalssession.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,180 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// RTestableApaLsSession is used to make it possible to heap test a RApaLsSession +// +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + + + +#include "testableapalssession.h" +#include "../apserv/APSCLSV.H" + + +/** +Connects to the server and makes sure that recognizers are loaded on demand, +for heap check reasons. +Use this only when you don't want to wait for the app list to be populated. +*/ +TInt RTestableApaLsSession::ConnectWithoutWaitingForListPopulation() + { + TInt err = RApaLsSession::Connect(); + if(err == KErrNone) + err = SetLoadRecognizersOnDemand(ETrue); + return err; + } + +/** +Connects to the server and makes sure that recognizers are loaded on demand, +for heap check reasons. +It also makes sure that the app list is populated before continuing. +*/ +TInt RTestableApaLsSession::Connect() + { + const TInt err = ConnectWithoutWaitingForListPopulation(); + if(err != KErrNone) + return err; + + TRequestStatus requeststatus; + RegisterListPopulationCompleteObserver(requeststatus); + User::WaitForRequest(requeststatus); + + return requeststatus.Int(); + } + +/** +Makes a __UHEAP_MARK on the server. +*/ +TInt RTestableApaLsSession::HeapMark() const + { + return SendReceive(EDebugHeapMark, TIpcArgs(TIpcArgs::ENothing)); + } + +/** +Makes a __UHEAP_MARKEND on the server. +*/ +TInt RTestableApaLsSession::HeapMarkEnd() const + { + return HeapMarkEnd(0); + } + +/** +Makes a __UHEAP_MARKENDC(aCount) on the server. +*/ +TInt RTestableApaLsSession::HeapMarkEnd(TInt aCount) const + { + return SendReceive(EDebugHeapMarkEnd, TIpcArgs(aCount)); + } + +/** +Makes a __UHEAP_FAILNEXT on the server. +*/ +TInt RTestableApaLsSession::HeapFailNext(TInt aCount) const + { + return SendReceive(EDebugHeapFailNext, TIpcArgs(aCount)); + } + +/** +Clears the app info array which is created on the server when calling +GetAllApps() and similar methods. +*/ +TInt RTestableApaLsSession::ClearAppInfoArray() const + { + return SendReceive(EDebugClearAppInfoArray, TIpcArgs(TIpcArgs::ENothing)); + } + +/** +Flushes the recognition cache. +*/ +TInt RTestableApaLsSession::FlushRecognitionCache() const + { + return SendReceive(EDebugFlushRecognitionCache, TIpcArgs(TIpcArgs::ENothing)); + } + +/** +Sets whether or not the recognizers should be loaded on demand. +*/ +TInt RTestableApaLsSession::SetLoadRecognizersOnDemand(TBool aLoadRecognizersOnDemand) const + { + return SendReceive(EDebugSetLoadRecognizersOnDemand, TIpcArgs(aLoadRecognizersOnDemand)); + } + +/** +When recognizers are loaded on demand a timer is used to do the actual unloading. +Use this method to perform this unloading synchronously instead of waiting for +the timer to go off. +*/ +TInt RTestableApaLsSession::PerformOutstandingRecognizerUnloading() const + { + return SendReceive(EDebugPerformOutstandingRecognizerUnloading, TIpcArgs(TIpcArgs::ENothing)); + } + +/** +Deletes RApaLsSession's iExtension for heap checking purposes. + +A result is that outstanding asynchronous file recognitions are cancelled. +*/ +void RTestableApaLsSession::DeleteExtension() + { + //this allows us to delete RApaLsSession's iExtension for heap check reasons + //RApaLsSession is able to cope with a missing iExtension and must remain able to do so + //since it's a R-class (i.e. no ConstructL() or equal where it can create it) + //RApaLsSession recreates iExtension when needed + //this assumes that iExtension pointer is at the end of the RApaLsSession object + CBase** RApaLsSession_iExtension = (CBase**)((TInt)this + sizeof(RApaLsSession) - sizeof(CBase*)); + delete *RApaLsSession_iExtension; + *(RApaLsSession_iExtension) = NULL; + } + + /** + Waits for the type store to be updated by calling @c NotifyOnDataMappingChange() + */ + TInt RTestableApaLsSession::WaitForTypeStoreUpdate() + { + TRequestStatus status; + NotifyOnDataMappingChange(status); + User::WaitForRequest(status); + return status.Int(); + } + + /** + Inserts an update object into the list of updates to perform that will fail during the commit stage + */ +TInt RTestableApaLsSession::AddFailingNonNativeApplicationsUpdate() + { + return SendReceive(EDebugAddFailingNonNativeApplicationsUpdate, TIpcArgs()); + } + + /** + Inserts an update object into the list of updates to perform that will Panic during the commit stage + */ +TInt RTestableApaLsSession::AddPanicingNonNativeApplicationsUpdate() + { + return SendReceive(EDebugAddPanicingNonNativeApplicationsUpdate, TIpcArgs()); + } + + /** + Inserts an update object into the list of updates to perform that will Panic if the system tries to + roll it back, e.g. because an update further down the list failed. + */ +TInt RTestableApaLsSession::AddRollbackPanicingNonNativeApplicationsUpdate() + { + return SendReceive(EDebugAddRollbackPanicingNonNativeApplicationsUpdate, TIpcArgs()); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/testableapalssession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/testableapalssession.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,114 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __TESTABLEAPALSSESSION_H__ +#define __TESTABLEAPALSSESSION_H__ + +#include + +class RTestableApaLsSession : public RApaLsSession + { +public: //from RApaLsSession + TInt Connect(); +public: + TInt ConnectWithoutWaitingForListPopulation(); + TInt HeapMark() const; + TInt HeapMarkEnd() const; + TInt HeapMarkEnd(TInt aCount) const; + TInt HeapFailNext(TInt aCount) const; + TInt ClearAppInfoArray() const; + TInt FlushRecognitionCache() const; + TInt SetLoadRecognizersOnDemand(TBool aLoadRecognizersOnDemand) const; + TInt PerformOutstandingRecognizerUnloading() const; + void DeleteExtension(); + TInt WaitForTypeStoreUpdate(); + TInt AddFailingNonNativeApplicationsUpdate(); + TInt AddPanicingNonNativeApplicationsUpdate(); + TInt AddRollbackPanicingNonNativeApplicationsUpdate(); + }; + +/** +Use as @c aCleanup argument to @c HEAP_TEST_LS_SESSION if the test doesn't need +any cleanup in order to be heap checkable. +*/ +#define NO_CLEANUP +/** +Use as @c aClientCount or @c aServerCount arguments to @c HEAP_TEST_LS_SESSION +if you don't want the heap to be checked +*/ +#define DONT_CHECK -1 + +/** +Heap tests a RTestableApaLsSession by calling __UHEAP_MARK before some test code +and __UHEAP_MARKEND after. + +@param aApaLsSession A reference to a RTestableApaLsSession +@param aClientCount The value sent to __UHEAP_MARKENDC() on the client side. + Usually 0. DONT_CHECK if no check shall be made. +@param aServerCount The value sent to __UHEAP_MARKENDC() on the server side. + Usually 0. DONT_CHECK if no check shall be made. +@param aTest The test code +@param aCleanup Any cleanup that is needed before the heap check is made. + NO_CLEANUP if no cleanup is needed. +*/ +#define HEAP_TEST_LS_SESSION(aApaLsSession, aClientCount, aServerCount, aTest, aCleanup) \ + if(aClientCount != DONT_CHECK) \ + { \ + __UHEAP_MARK; \ + } \ + if(aServerCount != DONT_CHECK) \ + { \ + const TInt _error = aApaLsSession.HeapMark(); \ + if(_error != KErrNone) \ + { \ + INFO_PRINTF2(_L("__UHEAP_MARK failed on the server (error=%d)"), _error); \ + } \ + TESTL(KErrNone == _error); \ + } \ + { \ + TRAPD(_error, aTest); /* execute the test code */ \ + if(_error != KErrNone) \ + { \ + INFO_PRINTF2(_L("Test code issued a leave (%d)"), _error); \ + } \ + TESTL(KErrNone == _error); \ + } \ + aCleanup; /* execute the cleanup */ \ + aApaLsSession.DeleteExtension(); \ + aApaLsSession.PerformOutstandingRecognizerUnloading(); \ + if(aServerCount != DONT_CHECK) \ + { \ + const TInt _error = aApaLsSession.HeapMarkEnd(aServerCount); \ + if(_error != KErrNone) \ + { \ + INFO_PRINTF2(_L("__UHEAP_MARKEND failed on the server (error=%d)"), _error);\ + } \ + TESTL(KErrNone == _error); \ + } \ + if(aClientCount != DONT_CHECK) \ + { \ + __UHEAP_MARKENDC(aClientCount); \ + } \ + + + +#endif //__TESTABLEAPALSSESSION_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/testapp/testupdregappuninstallation/testupdregappuninstallation.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/testapp/testupdregappuninstallation/testupdregappuninstallation.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -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 the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +TInt E32Main() +{ +return(0); +} \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/testapp/testupdregappuninstallation/testupdregappuninstallation.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/testapp/testupdregappuninstallation/testupdregappuninstallation.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,37 @@ +/* +* 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 "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +// +// testupdregappuninstallation.mmp +// + + +target testupdregappuninstallation.exe +CAPABILITY WriteDeviceData +targettype EXE +UID 0x1000007a 0x10207f80 + + +systeminclude /epoc32/include + +source ./TestUpdRegAppUninstallation.cpp + + +START RESOURCE testupdregappuninstallation_reg.rss + TARGETPATH c:\private\10003a3f\import\apps +END + +library euser.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/testapp/testupdregappuninstallation/testupdregappuninstallation_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/testapp/testupdregappuninstallation/testupdregappuninstallation_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,30 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207f80 + +RESOURCE APP_REGISTRATION_INFO + { + app_file="TestUpdRegAppUninstallation"; + + // MIME types + datatype_list= + { + DATATYPE { priority=EDataTypePriorityNormal; type="mime/updregappuninstall"; } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,193 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code. +*/ + + +#include +#include +#include "ticoncaptionoverride.h" + +const TUid KIconCapOverrideAppUid = {0x2001B674}; // test application UID + +CIconCaptionOverrideView* CIconCaptionOverrideView::NewL( const TRect& aRect ) + { + CIconCaptionOverrideView* self = CIconCaptionOverrideView::NewLC( aRect ); + CleanupStack::Pop( self ); + return self; + } + +CIconCaptionOverrideView* CIconCaptionOverrideView::NewLC( const TRect& aRect ) + { + CIconCaptionOverrideView* self = new ( ELeave ) CIconCaptionOverrideView; + CleanupStack::PushL( self ); + self->ConstructL( aRect ); + return self; + } + +void CIconCaptionOverrideView::ConstructL( const TRect& aRect ) + { + // Create a window for this application view + CreateWindowL(); + + // Set the windows size + SetRect( aRect ); + + // Activate the window, which makes it ready to be drawn + ActivateL(); + } + +CIconCaptionOverrideView::CIconCaptionOverrideView() + { + // No implementation required + } + +CIconCaptionOverrideView::~CIconCaptionOverrideView() + { + // No implementation required + } + +void CIconCaptionOverrideView::Draw( const TRect& /*aRect*/ ) const + { + // Get the standard graphics context + CWindowGc& gc = SystemGc(); + + // Gets the control's extent + TRect drawRect( Rect()); + + // Clears the screen + gc.Clear( drawRect ); + + } + +void CIconCaptionOverrideView::SizeChanged() + { + DrawNow(); + } + +void CIconCaptionOverrideAppUi::ConstructL() + { + // Initialise app UI. Without EAknEnableSkin the dialogs do not render properly in 3.x. + //BaseConstructL(EAknEnableSkin); + BaseConstructL(); + + // Create view object + iAppView = CIconCaptionOverrideView::NewL( ClientRect() ); + } + +CIconCaptionOverrideAppUi::CIconCaptionOverrideAppUi() + { + // No implementation required + } + +CIconCaptionOverrideAppUi::~CIconCaptionOverrideAppUi() + { + if ( iAppView ) + { + delete iAppView; + iAppView = NULL; + } + } + +void CIconCaptionOverrideAppUi::HandleCommandL( TInt aCommand ) + { + switch( aCommand ) + { + case EEikCmdExit: + //case EAknSoftkeyExit: + Exit(); + break; + default: + break; + } + } + +/*void CIconCaptionOverrideAppUi::HandleStatusPaneSizeChange() + { + iAppView->SetRect( ClientRect() ); + } +*/ +CIconCaptionOverrideDocument* CIconCaptionOverrideDocument::NewL( CEikApplication& + aApp ) + { + CIconCaptionOverrideDocument* self = NewLC( aApp ); + CleanupStack::Pop( self ); + return self; + } + +CIconCaptionOverrideDocument* CIconCaptionOverrideDocument::NewLC( CEikApplication& + aApp ) + { + CIconCaptionOverrideDocument* self = + new ( ELeave ) CIconCaptionOverrideDocument( aApp ); + + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +void CIconCaptionOverrideDocument::ConstructL() + { + // No implementation required + } + +CIconCaptionOverrideDocument::CIconCaptionOverrideDocument( CEikApplication& aApp ) + : CEikDocument( aApp ) + { + // No implementation required + } + +CIconCaptionOverrideDocument::~CIconCaptionOverrideDocument() + { + // No implementation required + } + +CEikAppUi* CIconCaptionOverrideDocument::CreateAppUiL() + { + // Create the application user interface, and return a pointer to it; + // the framework takes ownership of this object + return ( static_cast ( new ( ELeave ) + CIconCaptionOverrideAppUi ) ); + } + +CApaDocument* CIconCaptionOverrideApplication::CreateDocumentL() + { + return (static_cast + ( CIconCaptionOverrideDocument::NewL( *this ) ) ); + } + +TUid CIconCaptionOverrideApplication::AppDllUid() const + { + return KIconCapOverrideAppUid; + } + +LOCAL_C CApaApplication* NewApplication() + { + return new CIconCaptionOverrideApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,92 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#ifndef __TICONCAPTIONOVERRIDE_H__ +#define __TICONCAPTIONOVERRIDE_H__ + +#include +#include +#include +#include +#include +#include +#include + +const TUid KUidTestIconCapOverride = {0x2001B674}; + +class CIconCaptionOverrideView : public CCoeControl + { + public: // New methods + static CIconCaptionOverrideView* NewL( const TRect& aRect ); + static CIconCaptionOverrideView* NewLC( const TRect& aRect ); + virtual ~CIconCaptionOverrideView(); + + public: // Functions from base classes + void Draw( const TRect& aRect ) const; + virtual void SizeChanged(); + + private: // Constructors + void ConstructL(const TRect& aRect); + CIconCaptionOverrideView(); + }; + +class CIconCaptionOverrideAppUi : public CEikAppUi + { + public: // Constructors and destructor + void ConstructL(); + CIconCaptionOverrideAppUi(); + virtual ~CIconCaptionOverrideAppUi(); + + private: // Functions from base classes + void HandleCommandL( TInt aCommand ); + //void HandleStatusPaneSizeChange(); + + private: // Data + CIconCaptionOverrideView* iAppView; + }; + +class CIconCaptionOverrideDocument : public CEikDocument + { + public: // Constructors and destructor + + static CIconCaptionOverrideDocument* NewL( CEikApplication& aApp ); + static CIconCaptionOverrideDocument* NewLC( CEikApplication& aApp ); + virtual ~CIconCaptionOverrideDocument(); + + public: // Functions from base classes + CEikAppUi* CreateAppUiL(); + + private: // Constructors + void ConstructL(); + CIconCaptionOverrideDocument( CEikApplication& aApp ); + }; + +class CIconCaptionOverrideApplication : public CEikApplication + { + public: // Functions from base classes + TUid AppDllUid() const; + + protected: // Functions from base classes + CApaDocument* CreateDocumentL(); + }; + +#endif // __TICONCAPTIONOVERRIDE_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,71 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET ticoncaptionoverride.exe +TARGETTYPE exe +TARGETPATH /sys/bin + +CAPABILITY All -Tcb + +UID 0x100039CE 0x2001B674 //the original UID +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE ticoncaptionoverride.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +//reg added for Datacaging +START RESOURCE ticoncaptionoverride_reg.rss +TARGETPATH /private/10003a3f/import/apps +END + +START RESOURCE ticoncaptionoverride.rss +TARGETPATH /resource/apps +END + +START RESOURCE ticoncaptionoverride_loc.rss +TARGETPATH /resource/apps +LANG SC 01 02 03 +END + +START BITMAP ticoncapoverride.mbm +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 tstappicon24x20.bmp tstappicon24x20m.bmp +SOURCE c8,1 tstappicon40x55.bmp tstappicon40x55m.bmp +END + +START BITMAP ticoncapoverride02.m02 +TARGETPATH /resource/apps +SOURCEPATH ../tdatasrc +SOURCE c8,1 DEF25.BMP DEF25M.BMP DEF25.BMP DEF25M.BMP DEF50.BMP DEF50M.BMP +END + +LIBRARY euser.lib apparc.lib eikcore.lib cone.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,72 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +NAME TICO + +#include +#include + +#include "TSTAPP.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="TIconCapOverride"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + +RESOURCE TBUF r_example_text_Title { buf="IconCapOverride Application"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride01.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride01.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,27 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +rls_string STRING_r_ticoncapoverride_caption_string "TstCap UK" +rls_string STRING_r_ticoncapoverride_short_caption_string "TC UK" + +rls_string STRING_r_ticoncapoverride_icon_file "z:\\resource\\apps\\ticoncapoverride.mbm" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride02.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride02.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,27 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +rls_string STRING_r_ticoncapoverride_caption_string "TstCap FR" +rls_string STRING_r_ticoncapoverride_short_caption_string "TC FR" + +rls_string STRING_r_ticoncapoverride_icon_file "z:\\resource\\apps\\ticoncapoverride02.m02" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride03.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride03.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,27 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +rls_string STRING_r_ticoncapoverride_caption_string "TstCap GE" +rls_string STRING_r_ticoncapoverride_short_caption_string "TC GE" + +rls_string STRING_r_ticoncapoverride_icon_file "z:\\resource\\apps\\ticoncapoverride.mbm" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,48 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +#if defined(LANGUAGE_01) +#include "ticoncaptionoverride01.rls" +#elif(LANGUAGE_02) +#include "ticoncaptionoverride02.rls" +#elif(LANGUAGE_03) +#include "ticoncaptionoverride03.rls" +#else +#include "ticoncaptionoverridesc.rls" +#endif + +RESOURCE LOCALISABLE_APP_INFO + { + short_caption = STRING_r_ticoncapoverride_short_caption_string; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = STRING_r_ticoncapoverride_caption_string; + number_of_icons = 2; + icon_file = STRING_r_ticoncapoverride_icon_file; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverride_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,40 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 0x2001B674 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "ticoncaptionoverride"; + + localisable_resource_file = "\\resource\\apps\\ticoncaptionoverride_loc"; + + hidden = KAppNotHidden; + embeddability=KAppEmbeddable; + newfile = KAppDoesNotSupportNewFile; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverridesc.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/ticoncaptionoverridesc.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,28 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_ticoncapoverride_caption_string "TstCap UK" +rls_string STRING_r_ticoncapoverride_short_caption_string "TC UK" + +rls_string STRING_r_ticoncapoverride_icon_file "z:\\resource\\apps\\ticoncapoverride.mbm" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __TLARGESTACKAPP_H +#define __TLARGESTACKAPP_H + +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include "tlargestackapp.hrh" + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.hrh Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,31 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + + +enum TExampleMenuCommands + { + EExampleItem0 = 200, + EExampleItem1, + EExampleItem2 + }; diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,50 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET tlargestackapp.exe +TARGETTYPE exe +UID 0x100039CE 0x10282B27 +VENDORID 0x70000001 + +epocstacksize 0xf000 + +SOURCEPATH . +SOURCE tlargestackapp_main.cpp +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +START RESOURCE tlargestackapp.rss +HEADER +TARGETPATH /Resource/Apps +end + +START RESOURCE tlargestackapp_reg.rss +TARGETPATH /private/10003a3f/apps +END + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib gdi.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,74 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +NAME TEAP + +#include +#include +#include + +#include "tlargestackapp.hrh" + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_example_hotkeys; + menubar=r_example_menubar; + } + +RESOURCE HOTKEYS r_example_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_example_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_example_first_menu; txt="LargeStackApp"; } + }; + } + +RESOURCE MENU_PANE r_example_first_menu + { + items= + { + MENU_ITEM { command=EExampleItem0; txt="Item 0"; }, + MENU_ITEM { command=EExampleItem1; txt="Item 1"; }, + MENU_ITEM { command=EExampleItem2; txt="Item 2"; }, + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_example_text_TestApp { buf="TLargeStackApp!"; } +RESOURCE TBUF r_example_text_Item0 { buf="Item 0"; } +RESOURCE TBUF r_example_text_Item1 { buf="Item 1"; } +RESOURCE TBUF r_example_text_Item2 { buf="Item 2"; } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp_main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp_main.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,39 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// An application that uses more than the normally available amount of stack space. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + + +#include "tlargestackapp.h" + +#include + + +GLDEF_C TInt E32Main() + { + TInt array[100000000]; // Create an array large enough to use up more than our stack allocation + array[0]=1; // just a line to get rid of the warning in the build + array[1]=array[0]+1; // just a line to get rid of the warning in the build + return KErrNone; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tlargestack/tlargestackapp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2006-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10282B27 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TLargeStackApp"; + localisable_resource_file = "\\resource\\apps\\TLargeStackApp"; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,172 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include "tnotifydrivesapp.h" + +const TUid KNotifyDrivesAppUid = { 0xA0003376 }; + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the application class - CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +TUid CExampleApplication::AppDllUid() const + { + return KNotifyDrivesAppUid; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the appui class - CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the view class - CExampleAppView +// +//////////////////////////////////////////////////////////////////////// + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + + + // Control is a window owning control + CreateWindowL(); + + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); // Window graphics context + TRect drawRect = Rect(); // Area in which we shall draw + const CFont* fontUsed; // Font used for drawing text + + // Start with a clear screen + gc.Clear(); + + // Draw an outline rectangle (the default pen and brush styles ensure this) slightly smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + + + // Finished using the font + gc.DiscardFont(); + } + + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the document class - CExampleDocument +// +//////////////////////////////////////////////////////////////////////// + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,108 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ +#ifndef __TNOTIFYDRIVESAPP_H +#define __TNOTIFYDRIVESAPP_H + +#include +#include +#include +#include +#include +#include +#include +#include + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,55 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET tnotifydrivesapp.exe +TARGETTYPE exe +TARGETPATH /sys/bin +UID 0x100039CE 0xA0003376 +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE tnotifydrivesapp.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +SOURCEPATH . +RESOURCE tnotifydrivesapp.RSS +START RESOURCE tnotifydrivesapp.RSS +TARGETPATH /System/Data +LANG SC +END + +SOURCEPATH . +START RESOURCE tnotifydrivesapp_reg.rss +TARGETPATH /System/Data +END + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib gdi.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Symbian test code +*/ + +NAME TEAP + +#include +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tnotifydrivesapp/tnotifydrivesapp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0xA0003376 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "tnotifydrivesapp"; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/a000b461.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/a000b461.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// 0xA000B461.rss +// +// + +#include + + +RESOURCE REGISTRY_INFO r_registry + { + dll_uid = 0xA000B461; //should match name of this file + interfaces = + { + INTERFACE_INFO + { + interface_uid = 0x101F7D87; // Const for all Data Recognizers + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0xA000B461; // Our test recognizer + version_no = 1; + display_name = "recupg"; + default_data = ""; // Notify Interface + opaque_data = ""; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/recupgrade.MMP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/recupgrade.MMP Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,41 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// recupgrade.dll Symbian OS new MIME type recognizer +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +target recupgrade.dll +targettype plugin +uid 0x10009d8d 0xA000B461 +VENDORID 0x70000001 +CAPABILITY All -Tcb + +systeminclude /epoc32/include /epoc32/include/ecom /epoc32/include/test + +SOURCEPATH . +source recupgrade.cpp + +library euser.lib apmime.lib efsrv.lib + +start resource a000b461.rss +target recupgrade.rsc +end diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/recupgrade.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/recupgrade.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,80 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +#include "recupgrade.h" +#include "upgconstants.h" + +///////////////////////////////////////////////// + +const TInt KMaxBufferLength=1024; // maximum amount of buffer space we will ever use + +///////////////////////////////////////////////// + +/* +DLL entry point +*/ +GLDEF_C TInt E32Dll() + { + return KErrNone; + } + +/* +Private constructor +*/ +CTestUpgradeRecognizer::CTestUpgradeRecognizer() + :CApaDataRecognizerType(KUidUpgradeRecognizer, CApaDataRecognizerType::ENormal) + { + iCountDataTypes=0; + } + +/* +Ecom factory function +*/ +CApaDataRecognizerType* CTestUpgradeRecognizer::CreateRecognizerL() + { + + return new (ELeave) CTestUpgradeRecognizer(); + } + + +TUint CTestUpgradeRecognizer::PreferredBufSize() + { + return KMaxBufferLength; + } + +TDataType CTestUpgradeRecognizer::SupportedDataTypeL(TInt /*aIndex*/) const + { + return TDataType(); + } + +void CTestUpgradeRecognizer::DoRecognizeL(const TDesC& /*aName*/, const TDesC8& /*aBuffer*/) + { + // returning ENotRecognized will avoid the possibility of impacting other test code. + iDataType=TDataType(); + iConfidence=ENotRecognized; + } + +const TImplementationProxy ImplementationTable[] = + { + IMPLEMENTATION_PROXY_ENTRY(KUidUpgradeRecognizerValue, CTestUpgradeRecognizer::CreateRecognizerL) + }; + +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) + { + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); + return ImplementationTable; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/recupgrade.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/recupgrade.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__RECUPGRADE_H__) +#define __RECUPGRADE_H__ + +#include + +/** +@class +@internalComponent - Internal Symbian test code + + +This recognizer is part of the CT_ApsUpgradeStep tef test. +*/ +class CTestUpgradeRecognizer : public CApaDataRecognizerType + { +public: + // for ECOM + static CApaDataRecognizerType* CreateRecognizerL(); + + // from CApaDataRecognizerType + TUint PreferredBufSize(); + TDataType SupportedDataTypeL(TInt aIndex) const; + +private: + CTestUpgradeRecognizer(); + + // from CApaDataRecognizerType + void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/upgconstants.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/trecupgrade/upgconstants.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// 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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if !defined(__RECUPGRADECONSTANTS_H__) +#define __RECUPGRADECONSTANTS_H__ + + +_LIT(KUpgDocPath, "Z:\\system\\data\\TApsRecogUpgradeTest.upg"); +_LIT(KUpgRscTargetDir,"C:\\resource\\plugins\\"); +_LIT(KUpgDllTargetDir,"C:\\sys\\bin\\"); +_LIT(KUpgRscSourcePath, "Z:\\system\\data\\recupgrade.rsc"); +_LIT(KUpgRscTargetPath,"C:\\resource\\plugins\\recupgrade.rsc"); +_LIT(KUpgDllTargetPath, "C:\\sys\\bin\\recupgrade.dll"); +_LIT(KUpgDllSourcePathWinscw, "Z:\\system\\data\\recupgrade_winscw_rel.dll"); +_LIT(KUpgDllSourcePathArmv5, "Z:\\system\\data\\recupgrade_armv5_rel.dll"); +_LIT8(KMimeUpgType,"mime/upg"); + +#define KUidUpgradeRecognizerValue 0xA000B461 + +const TUid KUidUpgradeRecognizer={KUidUpgradeRecognizerValue}; +const TInt KNumUpgradeTypes=1; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/SysStartApparcTestCases.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/SysStartApparcTestCases.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,732 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// REQ3889 is essentially a change to the boot sequence and not a change to the functionality of apparc, +// i.e. once the system has finished startup the functional behaviour should not have changed, which will +// be proved with execution of the existing App-Framework test suite. +// The test cases implemented below are executed during the Critical Static phase of startup to prove the +// restricted functionality during this phase is correct. All calls to the API will panic except the call +// to RApaLsSession::StartApp which has been modified not to panic. +// Note that some of the tests cases used in this test are later executed during the normal +// phone operation phase (non-critical phase) by other tests (see T_StartAppStep.cpp, T_RapaLsSession.cpp, ...) +// As nearly all these test cases panic at the first client-server call and so execution of these test cases +// will never reach the end of the function. +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +#include "appfwk_test_AppUi.h" +#include "T_SysStartApparcStep.h" +#include "SysStartApparcTestCases.h" +#include "TRApaLsSessionStartAppTest.h" +#include "TRApaLsSessionTestUids.h" +#include "tstapp.h" +#include "tssaac.h" + +_LIT(KNonExistingFile, "z:\\system\\data\\not_here_thanks.foo"); +_LIT(KLitExePath, "\\sys\\bin\\texe.exe"); + + +/** + Constructor + */ +CSysStartApparcTestCase::CSysStartApparcTestCase() + { + } + +/** + Destructor + */ +CSysStartApparcTestCase::~CSysStartApparcTestCase() + { + iApaLsSession.Close(); + } + +/** +Connect to the Apparc server and call RunTestCasesL() inside a +trap harness. Panic if an error is returned +*/ +void CSysStartApparcTestCase::doTestCasesL() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test Cases Running...")); + + TInt error = iApaLsSession.Connect(); + if(error!=KErrNone) + { + RDebug::Print(_L("CSysStartApparcTestCase: Error connecting to RApaLsSession (err=%d)"), error); + } + + TRAP(error,RunTestCasesL()) + if(error!=KErrNone) + { + RDebug::Print(_L("CSysStartApparcTestCase: Error running test cases (err=%d)"), error); + } + + RDebug::Print(_L("CSysStartApparcTestCase: Test Cases Completed!")); + } + +/** +Call each test case inside a trap harness and panic if an error is returned. +The Panic will be raised in doTestCasesL() function. +The Use __UHEAP macros to test for memory leaks. +Reads in the test case number from file TestCaseConfig.txt +Each test case is assigned a unique number in the batch file sysstart_apparc_run.bat +*/ +void CSysStartApparcTestCase::RunTestCasesL() + { + __UHEAP_MARK; + + TInt aTestCase=ReadConfigFileL(); + + switch(aTestCase) + { + case 1: + TestStartApp1L(); + WriteResultFileL(); //Called if the test case does not panic + break; + + case 2: + TestStartApp2L(); + break; + + case 3: + TestStartApp3L(); + break; + + case 4: + TestStartApp4L(); + break; + + case 5: + TestStartApp5L(); + break; + + case 6: + TestStartApp6L(); + break; + + case 7: + TestGetAllApps(); + break; + + case 8: + TestInsertDataTypeL(); + break; + + case 9: + TestAppForDataTypeL(); + break; + + case 10: + TestDeleteDataTypeL(); + break; + + case 11: + TestServiceDiscovery(); + break; + + case 12: + TestGetAppInfo(); + break; + + case 13: + TestAppCount(); + break; + + case 14: + TestCreateDoc(); + break; + + case 29: + case 0: + default: + RDebug::Print(_L("CSysStartApparcTestCase: Unknown Test Case Specified")); + break; + } + + __UHEAP_MARKEND; + } + + +/** + @SYMTestCaseID APPFWK-APPARC-I-0001 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test Launching of an application using command line information. + Test is run during SSA Critical Static phase, + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::StartApp() to start an application defined by the command + line information. Test the launching of application for following scenarios: + (1) When Application specified by command line exists. + (2) When Application specified by command line does not exist. + API Calls:\n + RApaLsSession::StartApp(const CApaCommandLine& aCommandLine) + + @SYMTestExpectedResults (1) StartApp() returns KErrNone + (2) StartApp() returns KErrNotFound +*/ +void CSysStartApparcTestCase::TestStartApp1L() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::StartApp using CApaCommandLine.....")); + + // Set filename location + TPtrC apparcTestFilename(KLitExePath); + + // (1) start application texe.exe from the commandline + CApaCommandLine* cmdLn=CApaCommandLine::NewLC(); + cmdLn->SetExecutableNameL(apparcTestFilename); + _LIT8(KLitDogfish,"dogfish"); + cmdLn->SetTailEndL(KLitDogfish); + iStartApp1LRes1 = iApaLsSession.StartApp(*cmdLn); // explicit + + if(iStartApp1LRes1 == KErrNone) + { + RDebug::Print(_L("CSysStartApparcTestCase: TestStartApp1L Launch of Command line app successful")); + } + + // (2) start a non-existant app + _LIT(KLitWibble,"wibble"); + cmdLn->SetExecutableNameL(KLitWibble); + iStartApp1LRes2 = iApaLsSession.StartApp(*cmdLn); + if(iStartApp1LRes2 == KErrNotFound) + { + RDebug::Print(_L("CSysStartApparcTestCase: TestStartApp1L Launch of non-existant app returns KErrNotFound")); + } + + CleanupStack::PopAndDestroy(cmdLn); // cmdLn + } + +/** + @SYMTestCaseID APPFWK-APPARC-0002 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Get the MIME type of the data in the specified document and return the UID of an + application that can handle this type. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::AppForDocument() to return the UID of an application that can + read/display the specified file. The Apparc server is not ready in CS phase, so the + call has to fail. + API Calls:\n + RApaLsSession::AppForDocument(const TDesC& aFileName, TUid& aAppUid, TDataType& aDataType) const + + @SYMTestExpectedResults AppForDocument() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestStartApp2L() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::AppForDocument using filename and app uid....")); + + TUid retUid = KNullUid; + + TDataType data; + + // Set filename location + TPtrC apparcTestFilename(KLitTRApaLsSessionStartAppTest); + + // Main Panic KERN-EXEC 0 + iApaLsSession.AppForDocument(apparcTestFilename, retUid, data); + + } + +/** + @SYMTestCaseID APPFWK-APPARC-0003 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Finds and launches an application to match the specified document. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::StartDocument() with a document name + API Calls:\n + RApaLsSession::StartDocument(const TDesC& aFileName, TThreadId& aThreadId, TLaunchType aLaunchType) + + @SYMTestExpectedResults StartDocument() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestStartApp3L() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::StartDocument....start the app from the recognized doc given.")); + + // Set filename location + TPtrC apparcTestFilename(KLitTRApaLsSessionStartAppTest); + + //Call to tested function - for info, startAppThreadID is assigned to the app thread id + TThreadId startAppThreadID; + + //Main Panic KERN-EXEC 0 + iApaLsSession.StartDocument(apparcTestFilename, startAppThreadID); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0004 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Launches an application to suit the specified document by means of a specified MIME type + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::StartDocument() with filename and MIME type. + API Calls:\n + RApaLsSession::StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aThreadId, TLaunchType aLaunchType) + + @SYMTestExpectedResults StartDocument() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestStartApp4L() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::StartDocument....known data type")); + + // Set filename location + TPtrC apparcTestFilename(KLitTRApaLsSessionStartAppTest); + + // KErrNotFound as a return value + TThreadId startAppThreadID; + + //Main Panic KERN-EXEC 0 + iApaLsSession.StartDocument(apparcTestFilename, TDataType(KLitMimeType_TRApaLsSessionStartAppTest), startAppThreadID); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0005 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Attempt to launch an application by means of an unknown MIME type + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::StartDocument() with filename and unknown MIME type. + API Calls:\n + RApaLsSession::StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aThreadId, TLaunchType aLaunchType) + + @SYMTestExpectedResults StartDocument() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestStartApp5L() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::StartDocument....unknown data type")); + + // Set filename location + TPtrC apparcTestFilename(KLitTRApaLsSessionStartAppTest); + + // KErrNotFound as a return value + TThreadId startAppThreadID; + + //Main Panic KERN-EXEC 0 + iApaLsSession.StartDocument(apparcTestFilename, TDataType(_L8("text/plain/no thanks")), startAppThreadID); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0006 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Attempt to launch an application by specifying a non-existent file + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::StartDocument() with a non-existent file + API Calls:\n + RApaLsSession::StartDocument(const TDesC& aFileName, TThreadId& aThreadId, TLaunchType aLaunchType) + + @SYMTestExpectedResults StartDocument() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestStartApp6L() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::StartDocument....non existent file.")); + + // Set filename location + TPtrC apparcTestFilename(KNonExistingFile); + + // KErrNotFound as a return value + TThreadId startAppThreadID; + + //Main Panic KERN-EXEC 0 + iApaLsSession.StartDocument(apparcTestFilename, startAppThreadID); + } + +/** + @SYMTestCaseID APPFWK-APPARC-0007 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test the functionality of GetAllApps + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAllApps() + + @SYMTestExpectedResults GetAllApps() causes Main Panic KERN-EXEC 0 + +*/ +void CSysStartApparcTestCase::TestGetAllApps() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::GetAllApps....check list of apps")); + + // Main Panic KERN-EXEC 0 + iApaLsSession.GetAllApps(); + + } + +/** + @SYMTestCaseID APPFWK-APPARC-0008 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Tests InsertDataMapping() which links a datatype to the UID of an associated application + for launching assigns adds a low priority. + Tests InsertDataMappingIfHigher() which remaps the datatype to the specified UID if the + specified priority is higher. + The "added" parameter indicates if the mapping was successful. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::InsertDataMapping() with datatype, application UID and low priority + API Calls:\n + RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid) + + @SYMTestExpectedResults InsertDataMapping() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestInsertDataTypeL() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::InsertDataMapping....Check data type mapping addition")); + const TDataTypePriority KPriLow = 1; + + _LIT8(KLitPlainText,"text/plain"); + + TSecurityInfo info; + info.Set(RProcess()); + + //Main Panic KERN-EXEC 0 + iApaLsSession.InsertDataMapping(TDataType(KLitPlainText), KPriLow, KUidTestApp); + + } + +/** + @SYMTestCaseID APPFWK-APPARC-0009 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Tests AppForDataType() which returns the UID of an application which can handle the specified datatype + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::InsertDataMapping() with datatype and application UID (and priority) + API Calls:\n + RApaLsSession::InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid) + + @SYMTestExpectedResults AppForDataType() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestAppForDataTypeL() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::AppForDataType....Check an app binding")); + + _LIT8(KLitPlainText,"text/plain"); + + TUid retUid = KNullUid; + + //Main Panic KERN-EXEC 0 + iApaLsSession.AppForDataType(TDataType(KLitPlainText), retUid); + + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0010 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Tests DeleteDataMapping() which removes the linking of a datatype to the UID of an associated application + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::DeleteDataMapping() with datatype and service UID + API Calls:\n + RApaLsSession::DeleteDataMapping(const TDataType& aDataType, TUid aServiceUid) + + @SYMTestExpectedResults DeleteDataMapping() causes Main Panic KERN-EXEC 0 +*/ +void CSysStartApparcTestCase::TestDeleteDataTypeL() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::DeleteDataMapping....Check data type mapping deletion")); + + _LIT8(KLitPlainText,"text/plain"); + + TSecurityInfo info; + info.Set(RProcess()); + + //Main Panic KERN-EXEC 0 + iApaLsSession.DeleteDataMapping(TDataType(KLitPlainText)); + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0011 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test the functionality of GetServerApps with the service uid as parameter. + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetServerApps() with a service uid that + is not provided by any application + API Calls:\n + RApaLsSession::GetServerApps(TUid aServiceUid) const + + @SYMTestExpectedResults GetServerApps() causes Main Panic KERN-EXEC 0 + +*/ +void CSysStartApparcTestCase::TestServiceDiscovery() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::GetServerApps....check the service uid")); + + TApaAppInfo appInfo; + + // Uid is not provided by any application + const TUid KUidNonProvidedService = {0x01020300}; // service Uid + + //Main Panic KERN-EXEC 0 + iApaLsSession.GetServerApps(KUidNonProvidedService); + + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0012 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test the functionality of GetAppInfo with a Uid as a parameter + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::GetAppInfo() with a Uid that + represents a non-existing app + + API Calls:\n + RApaLsSession::GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const + + @SYMTestExpectedResults GetAppInfo() causes Main Panic KERN-EXEC 0 + +*/ +void CSysStartApparcTestCase::TestGetAppInfo() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::GetAppInfo....check the app uid")); + + TApaAppInfo info; + + // non-existing app causes Main Panic KERN-EXEC 0 + iApaLsSession.GetAppInfo(info, KNullUid); + + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0013 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test the functionality of AppCount + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::AppCount() + + + @SYMTestExpectedResults AppCount() causes Main Panic KERN-EXEC 0 + +*/ +void CSysStartApparcTestCase::TestAppCount() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::AppCount()....check list of apps")); + + TInt dummyArg; + + // Main Panic KERN-EXEC 0 + iApaLsSession.AppCount(dummyArg); + + } + + +/** + @SYMTestCaseID APPFWK-APPARC-0014 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test the functionality of CreateDocument with a Uid as a parameter + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call RApaLsSession::CreateDocument() with a Uid of an application + When Application specified exists. + + API Calls:\n + RApaLsSession::CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType) + + @SYMTestExpectedResults (1) GetAppInfo() causes Main Panic KERN-EXEC 0 + +*/ +void CSysStartApparcTestCase::TestCreateDoc() + { + RDebug::Print(_L("CSysStartApparcTestCase: Test RApaLsSession::CreateDocument....check the app uid")); + + // Set filename location + TPtrC apparcTestFilename(KLitTRApaLsSessionStartAppTest); + + TThreadId startAppThreadID; + + //Call to tested function with a existing uid (tstapp) causes Main Panic KERN-EXEC 0 + iApaLsSession.CreateDocument(apparcTestFilename, KUidTestApp, startAppThreadID); + } + +/** +Reads the input config file created by sysstart_apparc_setup.bat and returns the +test case number (Defined in sysstart_apparc_run.bat) +@return TInt - the test case number +*/ +TInt CSysStartApparcTestCase::ReadConfigFileL() + { + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + + RFileReadStream reader; + User::LeaveIfError(reader.Open(fs, KApparcConfigFile, EFileRead)); + CleanupClosePushL(reader); + + TChar delimChar('='); + + TBuf8<255> aDes; + reader.ReadL(aDes, delimChar); + + //Read in a two character representation of a number and convert to an integer + TChar result1(reader.ReadInt8L()); + TChar result0(reader.ReadInt8L()); + TInt aTestCase = result1.GetNumericValue()*10 + result0.GetNumericValue(); + + // clean-up + CleanupStack::PopAndDestroy(2, &fs); + + return aTestCase; + + } + +/** + Write the results to the result file, to be later extracted by + testexecute test case. + These contain the results of the individual tests. The order in + which these results are written in MUST match the order in which + they are read and tested in CSysStartApparcTestStep::GetApparcResultsL() + and the expected result tested in CSysStartApparcTestStep::Testxxx must + match that in the test specification\n + + The format is: + StartApp1LRes1 count=value1 + StartApp1LRes2 count=value2 + + '=' is used as the deliminator. +*/ +void CSysStartApparcTestCase::WriteResultFileL() + { + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + + RFileWriteStream writer; + User::LeaveIfError(writer.Replace(fs, KSsaacResultFile, EFileWrite)); + CleanupClosePushL(writer); + + // write data to file + writer << _L("StartApp1LRes1 count="); + writer.WriteInt16L(iStartApp1LRes1); + writer << _L("\n"); + writer << _L("StartApp1LRes2 count="); + writer.WriteInt16L(iStartApp1LRes2); + writer << _L("\n"); + + writer.CommitL(); + CleanupStack::PopAndDestroy(2, &fs); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/SysStartApparcTestCases.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/SysStartApparcTestCases.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,86 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_SYSSTARTAPPARCTESTCASES_H__) +#define __T_SYSSTARTAPPARCTESTCASES_H__ + +#include + +/** + Literals which determine: + 1. CApparcFuncInSystart - message logged if a panic occurs in a test case + 2. z:\\apparctest\\TestCaseConfig.txt - Input configuration file which determines + which test case will be run. + +*/ +_LIT(KApparcFuncInSystartPanic, "CApparcFuncInSystart"); +_LIT(KApparcConfigFile, "z:\\apparctest\\TestCaseConfig.txt"); + +enum TSystartPanic + { + ESystartRApaLsSessionErr=10, + ESystartRunTestCaseErr, + ESystartWriteResultsErr, + ESystartRFsErr, + ESystartFindFileErr + }; + + +/** + Class containing the apparc test cases +*/ +class CSysStartApparcTestCase : public CBase + { +public: + CSysStartApparcTestCase(); + ~CSysStartApparcTestCase(); + void doTestCasesL(); + +private: + void RunTestCasesL(); + void TestStartApp1L(); + void TestStartApp2L(); + void TestStartApp3L(); + void TestStartApp4L(); + void TestStartApp5L(); + void TestStartApp6L(); + void TestGetAllApps(); + void TestInsertDataTypeL(); + void TestAppForDataTypeL(); + void TestDeleteDataTypeL(); + void TestServiceDiscovery(); + void TestGetAppInfo(); + void TestAppCount(); + void TestCreateDoc(); + + void WriteResultFileL(); + TInt ReadConfigFileL(); + +private: + TInt iStartApp1LRes1; + TInt iStartApp1LRes2; + + RApaLsSession iApaLsSession; + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_checkEpocWind.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_checkEpocWind.bat Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,66 @@ +@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 the License "Symbian Foundation License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off +setlocal + +set SSAAC_RESULT_FILE=\epoc32\winscw\c\T_SSAAC_PanicResultFile.txt + +set TEST_CASE=%1 +set EPOCWIND=%TEMP%\epocwind.out + +goto :%TEST_CASE% + +:checkLog + :: checkLog SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES + set SEARCH_STRING=%1 + set TEMP_FILE=sysstart_temp.txt + set EXPECTED_COUNT=%2 + set LOG_COUNT=0 + type %EPOCWIND% | %windir%\system32\find /c %SEARCH_STRING%>%TEMP_FILE% + for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i + del %TEMP_FILE% + if "%EXPECTED_COUNT%" == "%LOG_COUNT%" goto :EOF + if "%EXPECTED_COUNT%" NEQ "%LOG_COUNT%" set TEST_RESULT_FLAG=false +goto :EOF + +:initialise + if exist %SSAAC_RESULT_FILE% del %SSAAC_RESULT_FILE% + set TEST_RESULT_FLAG=true +goto :EOF + + +:T_TestStartApp2L +:T_TestStartApp3L +:T_TestStartApp4L +:T_TestStartApp5L +:T_TestStartApp6L +:T_TestInsertDataTypeL +:T_TestAppForDataTypeL +:T_TestDeleteDataTypeL +:T_TestServiceDiscovery +:T_TestGetAppInfo +:T_TestGetAllApps +:T_TestCreateDoc +:T_TestAppCount + call :initialise + call :checkLog "CSysStartApparcTestCase: Error connecting to RApaLsSession (err=-1)" 1 + call :checkLog "Thread tssaac.exe::Main Panic KERN-EXEC 0" 1 + echo Test Case=%TEST_CASE% > %SSAAC_RESULT_FILE% + if /i "%TEST_RESULT_FLAG%"=="true" echo Result=1 >> %SSAAC_RESULT_FILE% + if /i "%TEST_RESULT_FLAG%"=="false" echo Result=0 >> %SSAAC_RESULT_FILE% +goto :EOF + +endlocal diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_run.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_run.bat Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,80 @@ +@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 the License "Symbian Foundation License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off +setlocal + +set SYSSTART_APPARCTEST_SUMMARY=\epoc32\winscw\c\logs\testexecute\sysstart_apparctest_summary.txt +if exist %SYSSTART_APPARCTEST_SUMMARY% del %SYSSTART_APPARCTEST_SUMMARY% + +goto :skipFunctions + +:test + set TEST_CASE=%1 + set TESTCASE_NUMBER=%2 + set EPOCWIND_COPY=\epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%_epocwind.out + set EPOCWIND_ORIG=%TEMP%\epocwind.out + + call z\apparctest\sysstart_apparc_setup.bat install %TEST_CASE% %TESTCASE_NUMBER% + + echo testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script + testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script + + call z\apparctest\sysstart_apparc_setup.bat uninstall %TEST_CASE% + + copy %EPOCWIND_ORIG% %EPOCWIND_COPY% >NUL + call :updateTestSummary +goto :EOF + +:checkLog + :: checkLog SEARCH_FILE SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES + set SEARCH_FILE=%1 + set SEARCH_STRING=%2 + set TEMP_FILE=sysstart_temp.txt + set EXPECTED_COUNT=%3 + set LOG_COUNT=0 + type %SEARCH_FILE% | find /c %SEARCH_STRING%>%TEMP_FILE% + for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i + del %TEMP_FILE% + if "%EXPECTED_COUNT%" == "%LOG_COUNT%" goto :EOF + if "%EXPECTED_COUNT%" NEQ "%LOG_COUNT%" set TEST_RESULT_FLAG=FAIL +goto :EOF + +:updateTestSummary + set TEST_RESULT_FLAG=PASS + call :checkLog \epoc32\winscw\c\logs\testexecute\apparctest_%TEST_CASE%.htm "%TEST_CASE% ***Result = PASS" 1 + echo %TEST_CASE% - %TEST_RESULT_FLAG% >> %SYSSTART_APPARCTEST_SUMMARY% +goto :EOF + +:skipFunctions + +:: SysStart Apparc Function call tests +call :test T_TestStartApp1L 01 +call :test T_TestStartApp2L 02 +call :test T_TestStartApp3L 03 +call :test T_TestStartApp4L 04 +call :test T_TestStartApp5L 05 +call :test T_TestStartApp6L 06 +call :test T_TestGetAllApps 07 +call :test T_TestInsertDataTypeL 08 +call :test T_TestAppForDataTypeL 09 +call :test T_TestDeleteDataTypeL 10 +call :test T_TestServiceDiscovery 11 +call :test T_TestGetAppInfo 12 +call :test T_TestAppCount 13 +call :test T_TestCreateDoc 14 +call :test T_TestLocalisedCaptionL 29 + +endlocal diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_setup.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/emulator/sysstart_apparc_setup.bat Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,91 @@ +@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 the License "Symbian Foundation License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off +setlocal + +:: Initialise local variables +set COMMAND_CHOICE=%1 +set RSC_LOCATION=Z\private\10205C44 +set TEST_CASE=%2 +set TESTCASE_NUMBER=%3 +set TEST_RSC=%RSC_LOCATION%\tssaac_emulator.RSC +set TEST_EXE_RSC=%RSC_LOCATION%\tssaac_tapp_emulator.RSC +set SM0_RSC=%RSC_LOCATION%\SSCForStartupMode0.RSC + +set TESTCASE_CONFIG=z\apparctest\TestCaseConfig.txt +set EPOCWIND=%TEMP%\epocwind.out +set TESTNONPANIC_RESULT_FILE=\epoc32\winscw\c\SysStartApparc_TestNonPanic.txt + +goto :%COMMAND_CHOICE% + +:install + if not exist "%TEST_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF + if not exist "%TEST_EXE_RSC%" echo SysStart Test: ERROR - test resource file does not exist & goto :EOF + + if not exist %SM0_RSC%.original copy %SM0_RSC% %SM0_RSC%.original > NUL + + if /i "%TEST_CASE%" NEQ "T_TestLocalisedCaptionL" copy %TEST_RSC% %SM0_RSC% > NUL + if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" copy %TEST_EXE_RSC% %SM0_RSC% > NUL + + if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG% + if exist %TESTNONPANIC_RESULT_FILE% del %TESTNONPANIC_RESULT_FILE% + + echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG% + +goto :EOF + +:uninstall + call :restore + :: TestStartApp1L and TestLocalisedCaptionL are the only non-paniccing test cases + if /i "%TEST_CASE%" == "T_TestStartApp1L" goto :bypass + if /i "%TEST_CASE%" == "T_TestLocalisedCaptionL" goto :bypass + call :test + :bypass + if exist %EPOCROOT%epoc32\winscw\c\T_SSAAC_PanicResultFile.txt del %EPOCROOT%epoc32\winscw\c\T_SSAAC_PanicResultFile.txt +goto :EOF + +:execTimeOut + set TIMEOUT=300 + \ExecTimeOut.exe "testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script" %TIMEOUT% +goto :EOF + +:testExecute + testexecute.exe z:\apparctest\apparctest_%TEST_CASE%.script +goto :EOF + +:test + call z\apparctest\sysstart_apparc_checkEpocWind.bat %TEST_CASE% + + if exist %TEMP%\epocwind.out copy %TEMP%\epocwind.out %TEMP%\epocwind.out.temp > NUL + + :: If using SYMBIAN overnight DABS test scripts, then utilise ExecTimeOut to ensure + :: execution does not exceed expected execution time. + if exist \ExecTimeOut.exe call :execTimeOut + + :: If simply executing manually, then call testexecute directly. + if not exist \ExecTimeOut.exe call :testExecute + + if exist %TEMP%\epocwind.out.temp copy %TEMP%\epocwind.out.temp %TEMP%\epocwind.out > NUL + if exist %TEMP%\epocwind.out.temp del %TEMP%\epocwind.out.temp +goto :EOF + +:restore + if exist %SM0_RSC%.original copy %SM0_RSC%.original %SM0_RSC% > NUL + if exist %SM0_RSC%.original del %SM0_RSC%.original +goto :EOF + +endlocal + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_buildrom.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_buildrom.bat Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,197 @@ +@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 the License "Symbian Foundation License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off +setlocal + +:: Initialise local variables +set TEST_CASE=%1 +set TESTCASE_NUMBER=%2 + +set RSC_LOCATION=\epoc32\data\Z\private\10205C44 +set TEST_RSC=%RSC_LOCATION%\tssaac_hardware.RSC +set SM0_RSC=%RSC_LOCATION%\SSCForStartupMode0_target.RSC + +set TEST_ROM_FLAG=false +if /i "%3"=="TEST_ROM_ONLY" set TEST_ROM_FLAG=true + +if /i "%TEST_ROM_FLAG%"=="true" set TEST_RSC=%RSC_LOCATION%\appfwk_sysstart_test_eshell_hardware.RSC + +call :%TEST_CASE% + +set AUTOEXEC=autoexec.bat +set AUTOEXEC_LOC=\epoc32\data\z\apparctest\%AUTOEXEC% + +set APPARCTEST_IBY=\epoc32\rom\include\apparctest.iby + +set EPOCWIND=%TEMP%\epocwind.out + +set SSAAC_RESULT_FILE=\epoc32\data\z\apparctest\T_SSAAC_PanicResultFile.txt +set TESTCASE_CONFIG=\epoc32\data\z\apparctest\TestCaseConfig.txt + +set DABS_SCRIPT=\logs\autorom\TESTEXECUTEapparctest_%TEST_CASE%.script.txt + +set DABS_FLAG=%4 + +set HARDWARE_REFERENCE_PLATFORM=%5 + +goto :skipFunctions + +:restore + cd\ + if exist %APPARCTEST_IBY%.original copy %APPARCTEST_IBY%.original %APPARCTEST_IBY% > NUL + if exist %APPARCTEST_IBY%.original del %APPARCTEST_IBY%.original >NUL + + if exist %SM0_RSC%.original copy %SM0_RSC%.original %SM0_RSC% > NUL + if exist %SM0_RSC%.original del %SM0_RSC%.original + + if exist %TESTCASE_CONFIG% del %TESTCASE_CONFIG% >NUL + + if exist %DABS_SCRIPT% del %DABS_SCRIPT% >NUL + if exist %AUTOEXEC_LOC% del %AUTOEXEC_LOC% >NUL +goto :EOF + +:configure + if not exist %SM0_RSC%.original copy %SM0_RSC% %SM0_RSC%.original > NUL + copy %TEST_RSC% %SM0_RSC% > NUL + + if not exist %APPARCTEST_IBY%.original copy %APPARCTEST_IBY% %APPARCTEST_IBY%.original > NUL + + echo Test Case %TEST_CASE%=%TESTCASE_NUMBER% > %TESTCASE_CONFIG% + echo data=DATAZ_\apparctest\TestCaseConfig.txt \apparctest\TestCaseConfig.txt >> %APPARCTEST_IBY% + echo data=DATAZ_\apparctest\%AUTOEXEC% \%AUTOEXEC% >> %APPARCTEST_IBY% + + if exist %SSAAC_RESULT_FILE% echo copy z:\apparctest\T_SSAAC_PanicResultFile.txt c:\ >> %AUTOEXEC_LOC% + + if /i "%DABS_FLAG%"=="true" call :configureDabs & goto :EOF + + echo copy z:\apparctest\TestCaseConfig.txt c:\ >> %AUTOEXEC_LOC% + echo testexecute z:\apparctest\apparctest_%TEST_CASE%.script >> %AUTOEXEC_LOC% + echo md e:\logs >> %AUTOEXEC_LOC% + echo md e:\logs\testexecute >> %AUTOEXEC_LOC% + echo copy c:\logs\testexecute\apparctest_%TEST_CASE%.htm e:\logs\testexecute\ >> %AUTOEXEC_LOC% +goto :EOF + +:configureDabs + echo testexecute z:\apparctest\apparctest_%TEST_CASE%.script >> %DABS_SCRIPT% + echo thindump -nop c:\logs\testexecute\apparctest_%TEST_CASE%.htm >> %DABS_SCRIPT% + + echo #include ^ >> %APPARCTEST_IBY% + echo data=\logs\autorom\TESTEXECUTEapparctest_%TEST_CASE%.script.txt \test\TESTEXECUTEapparctest_%TEST_CASE%.script.txt >> %APPARCTEST_IBY% + echo data=\logs\autorom\dummytest.txt \test\dummytest.txt >> %APPARCTEST_IBY% + + echo md c:\logs >> %AUTOEXEC_LOC% + echo md c:\logs\testresults >> %AUTOEXEC_LOC% + echo md c:\system >> %AUTOEXEC_LOC% + echo md c:\system\data >> %AUTOEXEC_LOC% + echo z: >> %AUTOEXEC_LOC% + echo cd test >> %AUTOEXEC_LOC% + echo RUNTESTS TESTEXECUTEapparctest_%TEST_CASE%.script.txt -t 13 >> %AUTOEXEC_LOC% + if "%TEST_ROM_FLAG%"=="false" echo format k: >> %AUTOEXEC_LOC% + if "%TEST_ROM_FLAG%"=="true" echo c: >> %AUTOEXEC_LOC% + if "%TEST_ROM_FLAG%"=="true" echo attrib -r >> %AUTOEXEC_LOC% + if "%TEST_ROM_FLAG%"=="true" echo del c:\*.txt >> %AUTOEXEC_LOC% + if "%TEST_ROM_FLAG%"=="true" echo z: >> %AUTOEXEC_LOC% + echo RUNTESTS dummytest.txt -p >> %AUTOEXEC_LOC% +goto :EOF + +:zipRom + if exist rombld.img call zip sys$rom.zip rombld.img > NUL + if exist rombld.symbol call zip symbol.zip rombld.symbol > NUL + if exist rombld.img echo ROM built: \rom\%TEST_CASE%\sys$rom.zip + if not exist sys$rom.zip echo ERROR: ROM failed to build. +goto :EOF + +:addSsaacResultFile + echo data=DATAZ_\apparctest\T_SSAAC_PanicResultFile.txt \apparctest\T_SSAAC_PanicResultFile.txt >> %APPARCTEST_IBY% +goto :EOF + +:buildTestRom + cd\ + if exist \rom\%TEST_CASE%\testrom rd /s/q \rom\%TEST_CASE%\testrom + md \rom\%TEST_CASE%\testrom + cd \rom\%TEST_CASE%\testrom + + echo Building Test ROM for SysStart Apparc test case: %TEST_CASE% + if exist %SSAAC_RESULT_FILE% call :addSsaacResultFile + + call buildrom -D_FULL_DEBUG -D_LFFSC %HARDWARE_REFERENCE_PLATFORM% techview.oby platsec.oby appfwk_test.iby -orombld.img> NUL + call :zipRom + + if exist %SSAAC_RESULT_FILE% del %SSAAC_RESULT_FILE% >NUL + + copy %AUTOEXEC_LOC% \rom\%TEST_CASE%\testrom +goto :EOF + +:build + if not exist %TEST_RSC% echo SysStart Apparc Test: ERROR - test resource file does not exist & goto :EOF + + call :restore + call :configure + + if "%TEST_ROM_FLAG%"=="false" call :buildRom + if "%TEST_ROM_FLAG%"=="true" call :buildTestRom + + call :restore +goto :EOF + +:buildRom + set LFFSC_FLAG= + if /i "%TEST_FLAG%"=="checkEpocWind" set LFFSC_FLAG=-D_LFFSC + + if exist \rom\%TEST_CASE% rd /s/q \rom\%TEST_CASE% + + cd\ + md \rom\%TEST_CASE% + cd \rom\%TEST_CASE% + if /i "%TEST_FLAG%"=="checkEpocWind" md \rom\%TEST_CASE%\TEST_ROM_REQUIRED + + echo Building ROM for SysStart Apparc test case: %TEST_CASE% + call buildrom -D_FULL_DEBUG %LFFSC_FLAG% %HARDWARE_REFERENCE_PLATFORM% techview.oby platsec.oby appfwk_test.iby -orombld.img> rombuild.txt + call :zipRom + copy %AUTOEXEC_LOC% \rom\%TEST_CASE% + echo %HARDWARE_REFERENCE_PLATFORM% UIF-Techview Apparc - %TEST_CASE% > rom_desc.txt +goto :EOF + +:T_TestStartApp1L + set TEST_FLAG= +goto :EOF + +:T_TestLocalisedCaptionL + set TEST_FLAG= + set TEST_RSC=%RSC_LOCATION%\tssaac_tapp_hardware.RSC +goto :EOF + +:T_TestStartApp2L +:T_TestStartApp3L +:T_TestStartApp4L +:T_TestStartApp5L +:T_TestStartApp6L +:T_TestGetAllApps +:T_TestInsertDataTypeL +:T_TestAppForDataTypeL +:T_TestDeleteDataTypeL +:T_TestServiceDiscovery +:T_TestGetAppInfo +:T_TestAppCount +:T_TestCreateDoc + set TEST_FLAG=checkEpocWind +goto :EOF + +:skipFunctions + +call :build + +endlocal diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_checkEpocWind.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_checkEpocWind.bat Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,73 @@ +@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 the License "Symbian Foundation License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off +setlocal + +set TEST_CASE=%1 +set EPOCWIND=\epoc32\data\z\apparctest\logs\%TEST_CASE%.log + +set DABS_FLAG=%2 + +set HARDWARE_REFERENCE_PLATFORM=%3 + +goto :skipFunctions + +:checkLog + :: checkLog SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES + set SEARCH_STRING=%1 + set TEMP_FILE=sysstart_temp.txt + set EXPECTED_COUNT=%2 + set LOG_COUNT=0 + type %EPOCWIND% | find /c %SEARCH_STRING%>%TEMP_FILE% + for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i + del %TEMP_FILE% + if "%EXPECTED_COUNT%" == "%LOG_COUNT%" goto :EOF + if "%EXPECTED_COUNT%" NEQ "%LOG_COUNT%" set TEST_RESULT_FLAG=false +goto :EOF + +:initialise + set SSAAC_RESULT_FILE=\epoc32\data\z\apparctest\T_SSAAC_PanicResultFile.txt + if exist %SSAAC_RESULT_FILE% del %SSAAC_RESULT_FILE% >NUL + set TEST_RESULT_FLAG=true +goto :EOF + +:T_TestStartApp2L +:T_TestStartApp3L +:T_TestStartApp4L +:T_TestStartApp5L +:T_TestStartApp6L +:T_TestInsertDataTypeL +:T_TestAppForDataTypeL +:T_TestDeleteDataTypeL +:T_TestServiceDiscovery +:T_TestGetAppInfo +:T_TestGetAllApps +:T_TestCreateDoc +:T_TestAppCount + call :initialise + call :checkLog "CSysStartApparcTestCase: Error connecting to RApaLsSession (err=-1)" 1 + call :checkLog "Thread tssaac.exe::Main Panic KERN-EXEC 0" 1 + echo Test Case=%TEST_CASE% > %SSAAC_RESULT_FILE% + if /i "%TEST_RESULT_FLAG%"=="true" echo Result=1 >> %SSAAC_RESULT_FILE% + if /i "%TEST_RESULT_FLAG%"=="false" echo Result=0 >> %SSAAC_RESULT_FILE% +goto :EOF + +:skipFunctions + +call :%TEST_CASE% +call \epoc32\data\z\apparctest\sysstart_apparc_buildrom.bat %TEST_CASE% 00 TEST_ROM_ONLY %DABS_FLAG% %HARDWARE_REFERENCE_PLATFORM% + +endlocal diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_insertlog.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_insertlog.pl Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,52 @@ +# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Symbian Foundation License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Used within automated overnight testing system to insert results +# of sysstart tests on hardware in test summary log. +# +# + +use strict; + +my $file=@ARGV[0]; +my $fromString=@ARGV[1]; +my $insertString1=@ARGV[2]; +my $insertString2=@ARGV[3]; + +my $outfile; + +if (not open (INFILE, "< $file")) + { + die "WARNING: insert.pl: Can't open $file"; + } + +while (my $line = ) + { + if ($line =~ /$fromString/) + { + $outfile .= $line; + $outfile .= $insertString1; + $outfile .= "\n"; + $outfile .= $insertString2; + $outfile .= "\n"; + } + else + { + $outfile .= $line; + } + } +close(INFILE); + +open (OUTFILE, "> $file"); +print OUTFILE $outfile; +close(OUTFILE); diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_run.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/scripts/hardware/sysstart_apparc_run.bat Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,294 @@ +@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 the License "Symbian Foundation License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@echo off +setlocal + +call :initialise %1 %2 +if /i "%INPUT_ERROR%"=="true" goto :EOF + +call :test T_TestStartApp1L 01 + +:: if automation is not supported, then don't bother attempting to run +:: the remaining test cases. +if /i "%TEST_MANUAL_FLAG%"=="false" (if /i "%AUTOMATED_FLAG%"=="false" goto :EOF) + +call :test T_TestStartApp2L 02 +call :test T_TestStartApp3L 03 +call :test T_TestStartApp4L 04 +call :test T_TestStartApp5L 05 +call :test T_TestStartApp6L 06 +call :test T_TestGetAllApps 07 +call :test T_TestInsertDataTypeL 08 +call :test T_TestAppForDataTypeL 09 +call :test T_TestDeleteDataTypeL 10 +call :test T_TestServiceDiscovery 11 +call :test T_TestGetAppInfo 12 +call :test T_TestAppCount 13 +call :test T_TestCreateDoc 14 +call :test T_TestLocalisedCaptionL 29 + +goto :skipFunctions + +:help + echo. + echo Description: + echo This script runs the apparc startup test suite on the hardware + echo reference platform. + echo. + echo Syntax: + echo %RUN_COMMAND% [choice] [hrp] + echo where the argument [choice] can be one of: + echo "-h" or "help" - this help screen + echo "manual" - run scripts manually i.e. build auto + echo start ROMs for each test case, but do + echo not attempt to upload ROM + echo "auto" - run scripts in automated mode, i.e. + echo requires USB download to HRP + echo and argument [hrp] is the hardware reference platform, e.g. + echo "h2" or "h4hrp" + echo. + echo e.g. + echo %RUN_COMMAND% auto h4hrp + echo. +goto :EOF + +:initialise + set APPFWK_COMPONENT=apparctest + set EPOC_Z=\epoc32\data\z + + set BUILDROM_COMMAND=%EPOC_Z%\%APPFWK_COMPONENT%\sysstart_apparc_buildrom.bat + set CHECKEPOC_COMMAND=%EPOC_Z%\%APPFWK_COMPONENT%\sysstart_apparc_checkepocwind.bat + set INSERT_COMMAND=%EPOC_Z%\%APPFWK_COMPONENT%\sysstart_apparc_insertlog.pl + set RUN_COMMAND=%EPOC_Z%\%APPFWK_COMPONENT%\sysstart_apparc_run.bat + + :: check input values + set INPUT_ERROR=false + set TEST_CHOICE=%1 + if /i "%TEST_CHOICE%"=="-h" set INPUT_ERROR=true + if /i "%TEST_CHOICE%"=="help" set INPUT_ERROR=true + set TEST_MANUAL_FLAG=false + if /i "%TEST_CHOICE%"=="manual" set TEST_MANUAL_FLAG=true + set HARDWARE_REFERENCE_PLATFORM=%2 + if /i "%HARDWARE_REFERENCE_PLATFORM%"=="" set INPUT_ERROR=true + if /i "%INPUT_ERROR%"=="true" call :help & goto :EOF + + set TEST_CASE=INIT_VALUE + set TEST_RSC=INIT_VALUE + set TEST_ROM_PORT=1 + set TEST_CASE_TIMEOUT=60 + + set TEST_LOG_LOCATION=%EPOC_Z%\%APPFWK_COMPONENT%\logs + if not exist %TEST_LOG_LOCATION% md %TEST_LOG_LOCATION% + + set DABS_TEST_LOG_LOCATION=\logs\armv5 + + set TEST_LOG=%DABS_TEST_LOG_LOCATION%\%APPFWK_COMPONENT%.log + if exist %TEST_LOG% del %TEST_LOG% + + set SUMMARY_LOG=%DABS_TEST_LOG_LOCATION%\%APPFWK_COMPONENT%_summary.txt + if exist %SUMMARY_LOG% del %SUMMARY_LOG% >NUL +goto :EOF + +:checkForUsbDrive + dir %1:\ 2>&1 | find "%1:" >NUL 2>&1 + if ERRORLEVEL 1 goto :EOF + if not exist %1:\usbload.zip goto :EOF + echo INFO: %1:\usbload.zip found! + set HARDWARE_USB=true + set HARDWARE_USB_DRIVE=%1 +goto :EOF + +:wait + echo INFO: Waiting %1 seconds + ping 1.1.1.1 -w 1000 -n %1 >NUL +goto :EOF + +:searchForUSB + for %%i in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do call :checkForUsbDrive %%i +goto :EOF + +:checkAutomation + set AUTOMATED_FLAG=false + set HARDWARE_USB=false + if not exist "\trgtest.exe" echo INFO: \trgtest.exe not found & goto :EOF + if not exist "\empty_image_file" echo INFO: \empty_image_file not found & goto :EOF + if not exist "\sync.exe" echo INFO: \sync.exe not found & goto :EOF + if not exist "\hardwareswitch.exe" echo INFO: \hardwareswitch.exe not found & goto :EOF + if not exist "\devcon.exe" echo INFO: \devcon.exe not found & goto :EOF + if not exist "\EJECTDELAY.15" echo INFO: \EJECTDELAY.15 not found & goto :EOF + if not exist "\empty_image_file" echo INFO: \empty_image_file not found & goto :EOF + if not exist "\logs\autorom\dummytest.txt" echo INFO: \logs\autorom\dummytest.txt not found & goto :EOF + + call \devcon.exe remove "USB\Vid_0e22&Pid_1112&Rev_0305" > NUL + + echo INFO: Hardware OFF + call \hardwareswitch.exe off > NUL + + call :wait 2 + + echo INFO: Hardware ON + call \hardwareswitch.exe on > NUL + + call :wait 15 + call :searchForUSB + + if /i "%HARDWARE_USB%"=="true" goto :skipUsbSearch + call :wait 10 + call :searchForUSB + + if /i "%HARDWARE_USB%"=="true" goto :skipUsbSearch + call :usbNotFound + goto :EOF + + :skipUsbSearch + if not exist \logs\armv5 md \logs\armv5 + set AUTOMATED_FLAG=true +goto :EOF + +:usbNotFound + echo INFO: Target USB Drive not found + call \hardwareswitch.exe off > NUL +goto :EOF + +:upLoadROm + echo INFO: Uploading ROM to %HARDWARE_USB_DRIVE%: + if exist "%HARDWARE_USB_DRIVE%:\sys$rom.zip" del %HARDWARE_USB_DRIVE%:\sys$rom.zip + copy %1 %HARDWARE_USB_DRIVE%:\ > NUL + + del %HARDWARE_USB_DRIVE%:\EJECTDELAY.* + copy \EJECTDELAY.15 %HARDWARE_USB_DRIVE%:\ > NUL + + echo INFO: Checking %HARDWARE_USB_DRIVE%: + chkdsk %HARDWARE_USB_DRIVE%: > NUL + + echo INFO: Ejecting %HARDWARE_USB_DRIVE%: + \sync.exe -r -e %HARDWARE_USB_DRIVE%: > NUL + call \devcon.exe remove "USB\Vid_0e22&Pid_1112&Rev_0305" >NUL + + echo INFO: Listening to COM%TEST_ROM_PORT% for test results (%TEST_CASE_TIMEOUT% seconds) + \trgtest.exe %TEST_ROM_PORT% \empty_image_file %TEST_CASE_LOG% %TEST_CASE_TIMEOUT% + echo INFO: test case log - %TEST_CASE_LOG% + + call \devcon.exe remove "USB\Vid_0e22&Pid_1112&Rev_0305" > NUL + + echo INFO: Hardware OFF + call \hardwareswitch.exe off > NUL + + call :wait 2 +goto :EOF + +:manualBuild + set AUTOMATED_FLAG=false + call %BUILDROM_COMMAND% %TEST_CASE% %TEST_CONFIG% ROM %AUTOMATED_FLAG% +goto :EOF + +:test + set TEST_CASE=%1 + set TEST_CONFIG=%2 + + if /i "%TEST_MANUAL_FLAG%"=="true" call :manualBuild & goto :EOF + + set TEST_CASE_LOG=%TEST_LOG_LOCATION%\%TEST_CASE%.log + set DABS_TEST_CASE_LOG=%DABS_TEST_LOG_LOCATION%\%TEST_CASE%.log + + if exist %TEST_CASE_LOG% del %TEST_CASE_LOG% + if exist %TEST_CASE_LOG%.original del %TEST_CASE_LOG%.original + if exist %DABS_TEST_CASE_LOG% del %DABS_TEST_CASE_LOG% + if exist %DABS_TEST_CASE_LOG%.original del %DABS_TEST_CASE_LOG%.original + + call :checkAutomation + + if /i "%AUTOMATED_FLAG%"=="false" echo ERROR: Automation check failed for rom >> %TEST_CASE_LOG% & goto :EOF + + call %BUILDROM_COMMAND% %TEST_CASE% %TEST_CONFIG% ROM %AUTOMATED_FLAG% %HARDWARE_REFERENCE_PLATFORM% + + if not exist \rom\%TEST_CASE%\sys$rom.zip echo ERROR: \rom\%TEST_CASE%\sys$rom.zip does not exist >> %TEST_CASE_LOG% & goto :logResult + + call :upLoadROm \rom\%TEST_CASE%\sys$rom.zip + + if not exist "\rom\%TEST_CASE%\TEST_ROM_REQUIRED" goto :logResult + + call %CHECKEPOC_COMMAND% %TEST_CASE% %AUTOMATED_FLAG% %HARDWARE_REFERENCE_PLATFORM% + + if not exist \rom\%TEST_CASE%\testrom\sys$rom.zip echo ERROR: \rom\%TEST_CASE%\testrom\sys$rom.zip does not exist >> %TEST_CASE_LOG% & goto :logResult + + call :checkAutomation + + if /i "%AUTOMATED_FLAG%"=="false" echo ERROR: Automation check failed for testrom >> %TEST_CASE_LOG% & goto :logResult + + if exist %TEST_CASE_LOG% copy %TEST_CASE_LOG% %TEST_CASE_LOG%.original >NUL + if exist %TEST_CASE_LOG% del %TEST_CASE_LOG% + + call :upLoadROm \rom\%TEST_CASE%\testrom\sys$rom.zip + + :logResult + if not exist %TEST_CASE_LOG% echo ERROR in test execution > %TEST_CASE_LOG% + + :: add the test case log to the overall test log, which will then be split by the DABS scripts. + type %TEST_CASE_LOG% >> %TEST_LOG% + + :: copy the test log files across for debugging test runs + :: NOTE: these won't be reported on the DABS html pages, but can be checked if further info is required + :: after a failed test case + copy %TEST_CASE_LOG% %DABS_TEST_CASE_LOG% > NUL + if exist %TEST_CASE_LOG%.original copy %TEST_CASE_LOG%.original %DABS_TEST_CASE_LOG%.original > NUL + + :: DABS looks for '_epocwind.txt' extension to then include these logs as epocwind + :: logs, which is useful for debugging what went wrong in case of failure + copy %TEST_CASE_LOG% %DABS_TEST_LOG_LOCATION%\TESTEXECUTE%APPFWK_COMPONENT%_%TEST_CASE%_epocwind.txt >NUL + if exist %TEST_CASE_LOG%.original copy %TEST_CASE_LOG%.original %DABS_TEST_LOG_LOCATION%\TESTEXECUTE%APPFWK_COMPONENT%_%TEST_CASE%_epocwind.txt >NUL + + :: insert result into DABS testlog + call :insertResult + + call :updateTestSummary +goto :EOF + +:insertResult + :: DABS uses this format in the testlog when building the result summary html page + set RUNNING_TEXT="9999-99-99=99:99:99 Running for udeb" + set LOCATION_TEXT="9999-99-99=99:99:99 Log location: <\logs\armv5\TESTEXECUTE%APPFWK_COMPONENT%_%TEST_CASE%.script.htm>" + + set SEARCH_TEXT="Log location: <\\logs\\armv5\\TESTEXECUTEapparctest_t_StartDoc.script.htm>" + + if not exist %DABS_TEST_LOG_LOCATION%\testlog.txt echo ERROR: %DABS_TEST_LOG_LOCATION%\testlog.txt does not exist & goto :EOF + perl %INSERT_COMMAND% %DABS_TEST_LOG_LOCATION%\testlog.txt %SEARCH_TEXT% %RUNNING_TEXT% %LOCATION_TEXT% +goto :EOF + +:checkLog + :: checkLog SEARCH_FILE SEARCH_STRING EXPECTED_NUMBER_OF_OCCURENCES + set SEARCH_FILE=%1 + set SEARCH_STRING=%2 + set TEMP_FILE=sysstart_temp.txt + set EXPECTED_COUNT=%3 + set LOG_COUNT=0 + type %SEARCH_FILE% | find /c %SEARCH_STRING%>%TEMP_FILE% + for /f "delims=\" %%i in ('type %TEMP_FILE%') do set LOG_COUNT=%%i + del %TEMP_FILE% + if "%EXPECTED_COUNT%" == "%LOG_COUNT%" goto :EOF + if "%EXPECTED_COUNT%" NEQ "%LOG_COUNT%" set TEST_RESULT_FLAG=FAIL +goto :EOF + +:updateTestSummary + set TEST_RESULT_FLAG=PASS + call :checkLog %DABS_TEST_LOG_LOCATION%\%TEST_CASE%.log "%TEST_CASE% ***Result = PASS" 1 + echo %TEST_CASE% - %TEST_RESULT_FLAG% >> %SUMMARY_LOG% +goto :EOF + +:skipFunctions + + +endlocal \ No newline at end of file diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,173 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Startup State Aware (SSA) test component used to +// test apparc StartApp and StartDocument functionality \n +// +// + + + +/** + @file + @test + @internalComponent Internal Symbian test code +*/ + +#include +#include +#include +#include +#include +#include + +#include "tssaac.h" +#include "SysStartApparcTestCases.h" + + +CApparcFuncInSystart* CApparcFuncInSystart::NewL(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId) + { + RDebug::Print(_L("CApparcFuncInSystart::NewL - entry")); + CApparcFuncInSystart* self = NewLC(aHierarchyId, aDomainId); + CleanupStack::Pop(self); + RDebug::Print(_L("CApparcFuncInSystart::NewL - exit")); + return self; + } + +CApparcFuncInSystart* CApparcFuncInSystart::NewLC(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId) + { + RDebug::Print(_L("CApparcFuncInSystart::NewLC - entry")); + CApparcFuncInSystart* self = new (ELeave) CApparcFuncInSystart(aHierarchyId, aDomainId); + CleanupStack::PushL(self); + self->ConstructL(); + RDebug::Print(_L("CApparcFuncInSystart::NewLC - exit")); + return self; + } + +/** + Constructor +*/ +CApparcFuncInSystart::CApparcFuncInSystart(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId) : + CDmDomain(aHierarchyId, aDomainId) + { + } + +/** + Destructor +*/ +CApparcFuncInSystart::~CApparcFuncInSystart() + { + Cancel(); + } + +/** + Start - Register the requests +*/ +void CApparcFuncInSystart::Start() + { + RDebug::Print(_L("CApparcFuncInSystart::Start - entry")); + + __ASSERT_ALWAYS(!IsActive(), User::Panic(KApparcFuncInSystartPanic,1)); + + // register a request for further transition notifications + RDebug::Print(_L("CApparcFuncInSystart: Request Transition Notification")); + RequestTransitionNotification(); + RDebug::Print(_L("CApparcFuncInSystart: Transition Acknowlege")); + } + + +/** + DoCancel() +*/ +void CApparcFuncInSystart::DoCancel() + { + } + + +/** + RunL() +*/ +void CApparcFuncInSystart::RunL() + { + RDebug::Print(_L("CApparcFuncInSystart::RunL - entry")); + + // Check current state + TInt state = GetState(); + if (state != EStartupStateCriticalDynamic) + { + RDebug::Print(_L("CApparcFuncInSystart::RunL - Initial state check failure! Current state = %d"), state); + User::Leave(KErrGeneral); + } + + // Perform tests - creates a test case object used for running the apparc test cases + CSysStartApparcTestCase* teststep = new (ELeave) CSysStartApparcTestCase(); + CleanupStack::PushL(teststep); + teststep->doTestCasesL(); + CleanupStack::PopAndDestroy(teststep); + + // Check current state + state = GetState(); + if (state != EStartupStateCriticalDynamic) + { + RDebug::Print(_L("CApparcFuncInSystart::RunL - Final state check failure! Current state = %d"), state); + User::Leave(KErrGeneral); + } + + // Acknowledge this state (The transition should pass) + AcknowledgeLastState(KErrNone); + + RDebug::Print(_L("CApparcFuncInSystart::RunL - exit")); + } + + + +LOCAL_C void StartSystemL(); + +GLDEF_C TInt E32Main() + { + RDebug::Print(_L("CApparcFuncInSystart::E32Main - entry")); + __UHEAP_MARK; // mark heap state + + CTrapCleanup* TheTrapCleanup = CTrapCleanup::New(); + TRAPD(error, StartSystemL()); + delete TheTrapCleanup; + + __UHEAP_MARKEND; // check for no memory leak + + RDebug::Print(_L("CApparcFuncInSystart::E32Main - exit")); + return error; + } + +LOCAL_C void StartSystemL() + { + RDebug::Print(_L("CApparcFuncInSystart::StartSystemL - entry")); + + //Prevent emulator closing when a panic occurs + User::SetJustInTime(EFalse); + + CActiveScheduler* theScheduler = new (ELeave) CActiveScheduler(); + CleanupStack::PushL(theScheduler); + CActiveScheduler::Install(theScheduler); + CApparcFuncInSystart *starter = CApparcFuncInSystart::NewLC(KDmHierarchyIdStartup, KAppServicesDomain3); + + starter->Start(); + + CActiveScheduler::Start(); + + // This point should never be reached + User::Panic(KApparcFuncInSystartPanic,1); + + CleanupStack::PopAndDestroy(2); // starter, theScheduler + CleanupStack::PopAndDestroy(theScheduler); + RDebug::Print(_L("CApparcFuncInSystart::StartSystemL - exit")); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,52 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent Internal Symbian test code +*/ + +#if (!defined __TSSAAC_H__) +#define __TSSAAC_H__ + +#include + +//Write a result file for the only non-paniccing test case +_LIT(KSsaacResultFile, "c:\\SysStartApparc_TestNonPanic.txt"); + + +/** +The class registers with the Domain Manager, listens for state transitions, and performs the test object +ro run the test cases. +In the end, the transition is always passed. +*/ +class CApparcFuncInSystart : public CDmDomain + { +public: + static CApparcFuncInSystart* NewL(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId); + static CApparcFuncInSystart* NewLC(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId); + ~CApparcFuncInSystart(); + void Start(); + +private: + CApparcFuncInSystart(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId); + void RunL(); + void DoCancel(); + }; + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,65 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// ssaac - Startup State Aware Apparc Component +// Startup State Aware (SSA) test component used to +// test apparc StartApp and StartDocument functionality +// +// + +#include + +TARGET tssaac.exe +TARGETTYPE exe +TARGETPATH /sys/bin +UID 0x1000007A 0x10207F77 +VENDORID 0x70000001 + +CAPABILITY AllFiles WriteDeviceData + +#if defined(WINS) +// startup with tssaac application for emulator +START RESOURCE tssaac_emulator.rss +TARGETPATH /private/10205C44 +END +#else +// startup with tssaac application for hardware +START RESOURCE tssaac_hardware.rss +TARGETPATH /private/10205C44 +END +#endif + +SOURCEPATH . + +SOURCE tssaac.cpp +SOURCE SysStartApparcTestCases.cpp + +USERINCLUDE . +USERINCLUDE ../../tef +USERINCLUDE ../../../uiftestfw/inc + +SYSTEMINCLUDE /EPOC32/INCLUDE +SYSTEMINCLUDE /EPOC32/INCLUDE/TEST + +MW_LAYER_SYSTEMINCLUDE + +LIBRARY EUSER.LIB +LIBRARY EFSRV.LIB +LIBRARY DOMAINCLI.LIB +LIBRARY ESTOR.LIB + +LIBRARY APGRFX.LIB +LIBRARY APPARC.LIB +LIBRARY APPFWK_TEST_APPUI.LIB +LIBRARY TESTEXECUTEUTILS.LIB +LIBRARY APMIME.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_emulator.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_emulator.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,227 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Modified default resource file to test apparc functionality +// during critical startup +// WARNING: Any changes made to this resource file must be +// checked against the sysstart apparc test cases listed +// T_TestStartApp2L +// T_TestStartApp3L +// T_TestStartApp4L +// T_TestStartApp5L +// T_TestStartApp6L +// T_TestStartApp7L +// T_TestInsertDataTypeL +// T_TestAppForDataTypeL +// T_TestDeleteDataTypeL +// T_TestServiceDiscovery +// T_TestGetAppInfo +// T_TestGetAllApps +// T_TestCreateDoc +// +// + +#include "startup.rh" + +///////////////////////////////////////////// +// ENTRY POINT +///////////////////////////////////////////// + +// THIS MUST BE THE FIRST RESOURCE. The system relies on +// this having a resource ID of 1 + +RESOURCE STARTUP_ENTRY_POINT r_entry_point + { + entry_point = r_startup_state_critical_static; + } +///////////////////////////////////////////// + + + +///////////////////////////////////////////// +// CRITICAL-STATIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_static + { + id = EStartupStateCriticalStatic; + name = "Critical Static"; + command_list = r_critical_static_commands; + next = r_startup_state_critical_dynamic; + } + +RESOURCE COMMAND_ARRAY r_critical_static_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SysAgt2Svr.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 2; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fbserv.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 1; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\wserv.exe"; + args = "-NoShell"; + start_method = EWaitForStart; + }, + + SPLASH_SCREEN + { + path = "Z:\\sys\\bin\\splash.exe"; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\eiksrvs.exe"; + args = "-OnlyStartDependentServers"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\sisregistryserver.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tzserver.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tssaac.exe"; + } + }; + } + +///////////////////////////////////////////// +// CRITICAL-DYNAMIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_dynamic + { + id = EStartupStateCriticalDynamic; + name = "Critical Dynamic"; + command_list = r_critical_dynamic_commands; + next = r_startup_state_networking_critical; + } + +RESOURCE COMMAND_ARRAY r_critical_dynamic_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\apsexe.exe"; + start_method = EWaitForStart; // this is the only method allowable for apsexe.exe + }, + START_APP_INFO + { + path = "Z:\\sys\\bin\\shell.exe"; // Requires apparc to be properly started + viewless = 1; + start_method = EDeferredWaitForStart; + }, + MULTIPLE_WAIT + { + timeout = 10000; + fail_on_error = EPanicOnCommandFailure; + }, + SPLASH_SCREEN + { + kill = 1; + } + }; + } + +///////////////////////////////////////////// +// Networking-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_networking_critical + { + id = EStartupStateNetworkingCritical; + name = "Networking-Critical"; + command_list = r_networking_critical_commands; + next = r_startup_state_non_critical; + } + +RESOURCE COMMAND_ARRAY r_networking_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\c32start.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\msexe.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\watcher.exe"; + start_method = EWaitForStart; + } + }; + } + +///////////////////////////////////////////// +// NON-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_non_critical + { + id = EStartupStateNonCritical; + name = "Non-critical"; + command_list = r_non_critical_commands; + next = 0; // No more state transitions + } + +RESOURCE COMMAND_ARRAY r_non_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SystemAMS.exe"; + args = "-boot"; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\swidaemon.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\cntsrv.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\agsvexe.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fotaagent.exe"; + fail_on_error = EIgnoreCommandFailure; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_hardware.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_hardware.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,231 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Modified default resource file to test apparc functionality +// during critical startup +// WARNING: Any changes made to this resource file must be +// checked against the sysstart apparc test cases listed +// T_TestStartApp2L +// T_TestStartApp3L +// T_TestStartApp4L +// T_TestStartApp5L +// T_TestStartApp6L +// T_TestStartApp7L +// T_TestInsertDataTypeL +// T_TestAppForDataTypeL +// T_TestDeleteDataTypeL +// T_TestServiceDiscovery +// T_TestGetAppInfo +// T_TestGetAllApps +// T_TestCreateDoc +// +// + +#include "startup.rh" + +///////////////////////////////////////////// +// ENTRY POINT +///////////////////////////////////////////// + +// THIS MUST BE THE FIRST RESOURCE. The system relies on +// this having a resource ID of 1 + +RESOURCE STARTUP_ENTRY_POINT r_entry_point + { + entry_point = r_startup_state_critical_static; + } +///////////////////////////////////////////// + + + +///////////////////////////////////////////// +// CRITICAL-STATIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_static + { + id = EStartupStateCriticalStatic; + name = "Critical Static"; + command_list = r_critical_static_commands; + next = r_startup_state_critical_dynamic; + } + +RESOURCE COMMAND_ARRAY r_critical_static_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SysAgt2Svr.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 2; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fbserv.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 1; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\ewsrv.exe"; + args = "-NoShell"; + start_method = EWaitForStart; + }, + SPLASH_SCREEN + { + path = "Z:\\sys\\bin\\splash.exe"; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\eiksrvs.exe"; + args = "-OnlyStartDependentServers"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\sisregistryserver.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tzserver.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tssaac.exe"; + } + }; + } + +///////////////////////////////////////////// +// CRITICAL-DYNAMIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_dynamic + { + id = EStartupStateCriticalDynamic; + name = "Critical Dynamic"; + command_list = r_critical_dynamic_commands; + next = r_startup_state_networking_critical; + } + +RESOURCE COMMAND_ARRAY r_critical_dynamic_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\apsexe.exe"; + start_method = EWaitForStart; // this is the only method allowable for apsexe.exe + }, + START_APP_INFO + { + path = "Z:\\sys\\bin\\shell.exe"; // Requires apparc to be properly started + start_method = EDeferredWaitForStart; + viewless = 1; + }, + MULTIPLE_WAIT + { + timeout = 10000; + fail_on_error = EPanicOnCommandFailure; + }, + SPLASH_SCREEN + { + kill = 1; + } + }; + } + +///////////////////////////////////////////// +// Networking-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_networking_critical + { + id = EStartupStateNetworkingCritical; + name = "Networking-Critical"; + command_list = r_networking_critical_commands; + next = r_startup_state_non_critical; + } + +RESOURCE COMMAND_ARRAY r_networking_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\c32start.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\msexe.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\watcher.exe"; + start_method = EWaitForStart; + } + }; + } + +///////////////////////////////////////////// +// NON-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_non_critical + { + id = EStartupStateNonCritical; + name = "Non-critical"; + command_list = r_non_critical_commands; + next = 0; // No more state transitions + } + +RESOURCE COMMAND_ARRAY r_non_critical_commands + { + commands = + { + START_APP_INFO + { + path = "Z:\\sys\\bin\\eshell.exe"; + viewless = 1; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SystemAMS.exe"; + args = "-boot"; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\swidaemon.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\cntsrv.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\agsvexe.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fotaagent.exe"; + fail_on_error = EIgnoreCommandFailure; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,311 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This is a Startup State Aware (SSA) test application used to +// test apparc StartApp and StartDocument functionality. +// +// + + + +/** + @file + @test + @internalComponent Internal Symbian test code +*/ + + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include "tssaac.h" +#include +#include "appfwk_test_AppUi.h" +#include "tstapp.h" + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); +private: + void Draw(const TRect& /*aRect*/) const; +private: + HBufC* iExampleText; + }; + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + _LIT(KExampleText, "This is a Startup State Aware (SSA) test application"); + TPtrC ptr(KExampleText); + iExampleText = ptr.AllocL(); + CreateWindowL(); + SetRect(aRect); + ActivateL(); + } + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + TRect drawRect = Rect(); + const CFont* fontUsed; + + gc.Clear(); + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + gc.DiscardFont(); + } + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); +private: + void HandleCommandL(TInt aCommand); +private: + CCoeControl* iAppView; + }; + + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + CEikAppUi* CreateAppUiL(); + }; + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + +//////////////////////////////////////////////////////////////////////// +// +// CSysatartApparc +// +//////////////////////////////////////////////////////////////////////// + +class CSysatartApparc : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + void WriteResultFileL(); + TUid AppDllUid() const; + //Test functions and variables + CApaDocument* CreateDocumentL(CApaProcess* aApaProcess); +private: + TInt iLocalizedCaptionLRes1; + TInt iLocalizedCaptionLRes2; + }; + +const TUid KUidSSAACTestApp = { 0x10207F7A }; + +TUid CSysatartApparc::AppDllUid() const + { + return KUidSSAACTestApp; + } + +/** + @SYMTestCaseID APPFWK-APPARC-0029 + + @SYMPREQ PREQ967 + + @SYMREQ REQ3889 + + @SYMTestCaseDesc Test the functionality of EnsureCaptionIsLocalisedL() + + @SYMTestPriority High + + @SYMTestStatus Implemented + + @SYMTestActions Call CEikApplication::CreateDocumentL() with a local resource file argument + When Application specified exists. + + API Calls:\n + CEikApplication::EnsureCaptionIsLocalisedL(TDesC&) + + @SYMTestExpectedResults (1) AppCaption() returns "tssaac_tapp" + (2) AppCaption() returns "NewCaption" + +*/ +CApaDocument* CSysatartApparc::CreateDocumentL(CApaProcess* aApaProcess) + { + _LIT(KPath, "z:\\resource\\apps\\tssaac_tapp_loc.rsc"); + _LIT(KCurrentCaption, "tssaac_tapp"); + _LIT(KNewCaption, "NewCaption"); + + //(1) Fetch the existing name of the exe (tssaac_tapp) + TApaAppCaption caption = AppCaption(); + + iLocalizedCaptionLRes1 = caption.Compare(KCurrentCaption); + RDebug::Print(_L("Expected existing caption: '%S' Actual caption: '%S'"), &KCurrentCaption, &caption); + + //Assign a new name to the exe from the local resource file + CEikApplication::EnsureCaptionIsLocalisedL(KPath); + + //(2) Fetch the new name of the exe (NewCaption) + caption = AppCaption(); + + //Assign the result to the member variable + iLocalizedCaptionLRes2 = caption.Compare(KNewCaption); + RDebug::Print(_L("Expected new caption: '%S' Actual caption: '%S'"), &KNewCaption, &caption); + + WriteResultFileL(); + + // Completes all Rendezvous' with the current process in order to notify sysstart and continue + // launching the next process in the SSC list (this app is launched with EWaitForStart) + RProcess::Rendezvous(KErrNone); + + return CEikApplication::CreateDocumentL(aApaProcess); + } + + +CApaDocument* CSysatartApparc::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CSysatartApparc; + } + + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + +/** + Write the results to the result file, to be later extracted by + testexecute test case. + These contain the results of the test. The order in + which these results are written in MUST match the order in which + they are read and tested in CSysStartApparcTestStep::GetApparcResultsL() + and the expected result tested in CSysStartApparcTestStep::Testxxx must + match that in the test specification\n + + The format is: + LocalisedCaptionRes1 result=value1 Pass = 0 Fail = non-zero + LocalisedCaptionRes2 result=value2 Pass = 0 Fail = non-zero + + '=' is used as the deliminator. +*/ +void CSysatartApparc::WriteResultFileL() + { + RFs fs; + User::LeaveIfError(fs.Connect()); + CleanupClosePushL(fs); + + RFileWriteStream writer; + User::LeaveIfError(writer.Replace(fs, KSsaacResultFile, EFileWrite)); + CleanupClosePushL(writer); + + // write data to file + writer << _L("LocalizedCaptionRes1 count="); + writer.WriteInt16L(iLocalizedCaptionLRes1); + writer << _L("\n"); + writer << _L("LocalizedCaptionRes2 count="); + writer.WriteInt16L(iLocalizedCaptionLRes2); + writer << _L("\n"); + writer.CommitL(); + + CleanupStack::PopAndDestroy(2, &fs); + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,84 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent Internal Symbian test code +*/ + +#include + +target tssaac_tapp.exe +TARGETTYPE exe +targetpath /sys/bin +UID 0x100039CE 0x10207F7A +VENDORID 0x70000001 +CAPABILITY none + +#if defined(WINS) +// startup with tssaac application for emulator +START RESOURCE tssaac_tapp_emulator.rss +TARGETPATH /private/10205C44 +END +#else +// startup with tssaac application for hardware +START RESOURCE tssaac_tapp_hardware.rss +TARGETPATH /private/10205C44 +END +#endif + +SOURCEPATH . +SOURCE tssaac_tapp.cpp + +USERINCLUDE . +USERINCLUDE ../../tef +USERINCLUDE ../../../uiftestfw/inc + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/test + +MW_LAYER_SYSTEMINCLUDE + +// Application exe specific resource which is localised to the application +RESOURCE tssaac_tapp.rss +start resource tssaac_tapp.rss +targetpath /resource/apps +lang sc +end + +RESOURCE tssaac_tapp_loc.rss +start resource tssaac_tapp_loc.rss +targetpath /resource/apps +lang sc +end + +// Application exe registration resource file +START RESOURCE tssaac_tapp_reg.rss +TARGETPATH /private/10003a3f/apps +lang sc +END + + +LIBRARY APPARC.LIB +LIBRARY CONE.LIB +LIBRARY EFSRV.LIB +LIBRARY EIKCORE.LIB +LIBRARY ESTOR.LIB +LIBRARY EUSER.LIB +LIBRARY GDI.LIB diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +NAME WWWW + +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_emulator.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_emulator.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,229 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Modified default resource file to test apparc functionality +// during critical startup +// WARNING: Any changes made to this resource file must be +// checked against the sysstart apparc test cases listed +// T_TestLocalisedCaptionL +// +// + +#include "startup.rh" + +///////////////////////////////////////////// +// ENTRY POINT +///////////////////////////////////////////// + +// THIS MUST BE THE FIRST RESOURCE. The system relies on +// this having a resource ID of 1 + +RESOURCE STARTUP_ENTRY_POINT r_entry_point + { + entry_point = r_startup_state_critical_static; + } +///////////////////////////////////////////// + + + +///////////////////////////////////////////// +// CRITICAL-STATIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_static + { + id = EStartupStateCriticalStatic; + name = "Critical Static"; + command_list = r_critical_static_commands; + next = r_startup_state_critical_dynamic; + } + +RESOURCE COMMAND_ARRAY r_critical_static_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SysAgt2Svr.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 2; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fbserv.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 1; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\wserv.exe"; + args = "-NoShell"; + start_method = EWaitForStart; + }, + + SPLASH_SCREEN + { + path = "Z:\\sys\\bin\\splash.exe"; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\eiksrvs.exe"; + args = "-OnlyStartDependentServers"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tzserver.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tssaac_tapp.exe"; + start_method = EWaitForStart; + } + }; + } + +///////////////////////////////////////////// +// CRITICAL-DYNAMIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_dynamic + { + id = EStartupStateCriticalDynamic; + name = "Critical Dynamic"; + command_list = r_critical_dynamic_commands; + next = r_startup_state_networking_critical; + } + +RESOURCE COMMAND_ARRAY r_critical_dynamic_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\initialiselocale.exe"; + start_method = EWaitForStart; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\apsexe.exe"; + start_method = EWaitForStart; // this is the only method allowable for apsexe.exe + }, + START_APP_INFO + { + path = "Z:\\sys\\bin\\shell.exe"; // Requires apparc to be properly started + viewless = 1; + start_method = EDeferredWaitForStart; + }, + MULTIPLE_WAIT + { + timeout = 10000; + fail_on_error = EPanicOnCommandFailure; + }, + SPLASH_SCREEN + { + kill = 1; + } + }; + } + +///////////////////////////////////////////// +// Networking-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_networking_critical + { + id = EStartupStateNetworkingCritical; + name = "Networking-Critical"; + command_list = r_networking_critical_commands; + next = r_startup_state_non_critical; + } + +RESOURCE COMMAND_ARRAY r_networking_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\c32start.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\msexe.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\watcher.exe"; + start_method = EWaitForStart; + } + }; + } + +///////////////////////////////////////////// +// NON-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_non_critical + { + id = EStartupStateNonCritical; + name = "Non-critical"; + command_list = r_non_critical_commands; + next = 0; // No more state transitions + } + +RESOURCE COMMAND_ARRAY r_non_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SystemAMS.exe"; + args = "-boot"; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\swidaemon.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\cntsrv.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\agsvexe.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fotaagent.exe"; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "z:\\sys\\bin\\Fepswitch.exe"; + start_method = EFireAndForget; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\schexe.exe"; + args = "sysstartschexe"; // Command line parameter passed to schexe.exe + fail_on_error = EIgnoreCommandFailure; //Task Scheduler may have already been started by a client + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_hardware.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_hardware.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,228 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Modified default resource file to test apparc functionality +// during critical startup +// WARNING: Any changes made to this resource file must be +// checked against the sysstart apparc test cases listed +// T_TestLocalisedCaptionL +// +// + +#include "startup.rh" + +///////////////////////////////////////////// +// ENTRY POINT +///////////////////////////////////////////// + +// THIS MUST BE THE FIRST RESOURCE. The system relies on +// this having a resource ID of 1 + +RESOURCE STARTUP_ENTRY_POINT r_entry_point + { + entry_point = r_startup_state_critical_static; + } +///////////////////////////////////////////// + + + +///////////////////////////////////////////// +// CRITICAL-STATIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_static + { + id = EStartupStateCriticalStatic; + name = "Critical Static"; + command_list = r_critical_static_commands; + next = r_startup_state_critical_dynamic; + } + +RESOURCE COMMAND_ARRAY r_critical_static_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SysAgt2Svr.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 2; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fbserv.exe"; + start_method = EWaitForStart; + no_of_retries_on_failure = 1; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\ewsrv.exe"; + args = "-NoShell"; + start_method = EWaitForStart; + }, + SPLASH_SCREEN + { + path = "Z:\\sys\\bin\\splash.exe"; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\eiksrvs.exe"; + args = "-OnlyStartDependentServers"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tzserver.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\tssaac_tapp.exe"; + start_method = EWaitForStart; + } + }; + } + +///////////////////////////////////////////// +// CRITICAL-DYNAMIC startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_critical_dynamic + { + id = EStartupStateCriticalDynamic; + name = "Critical Dynamic"; + command_list = r_critical_dynamic_commands; + next = r_startup_state_networking_critical; + } + +RESOURCE COMMAND_ARRAY r_critical_dynamic_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\initialiselocale.exe"; + start_method = EWaitForStart; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\apsexe.exe"; + start_method = EWaitForStart; // this is the only method allowable for apsexe.exe + }, + START_APP_INFO + { + path = "Z:\\sys\\bin\\shell.exe"; // Requires apparc to be properly started + start_method = EDeferredWaitForStart; + viewless = 1; + }, + MULTIPLE_WAIT + { + timeout = 10000; + fail_on_error = EPanicOnCommandFailure; + }, + SPLASH_SCREEN + { + kill = 1; + } + }; + } + +///////////////////////////////////////////// +// Networking-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_networking_critical + { + id = EStartupStateNetworkingCritical; + name = "Networking-Critical"; + command_list = r_networking_critical_commands; + next = r_startup_state_non_critical; + } + +RESOURCE COMMAND_ARRAY r_networking_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\c32start.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\msexe.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\watcher.exe"; + start_method = EWaitForStart; + } + }; + } + +///////////////////////////////////////////// +// NON-CRITICAL startup state +///////////////////////////////////////////// +RESOURCE STATE_INFO r_startup_state_non_critical + { + id = EStartupStateNonCritical; + name = "Non-critical"; + command_list = r_non_critical_commands; + next = 0; // No more state transitions + } + +RESOURCE COMMAND_ARRAY r_non_critical_commands + { + commands = + { + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\SystemAMS.exe"; + args = "-boot"; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\swidaemon.exe"; + start_method = EWaitForStart; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\cntsrv.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\agsvexe.exe"; + args = "-nontransient"; + fail_on_error = 0; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\fotaagent.exe"; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "z:\\sys\\bin\\Fepswitch.exe"; + start_method = EFireAndForget; + fail_on_error = EIgnoreCommandFailure; + }, + START_PROCESS_INFO + { + path = "Z:\\sys\\bin\\schexe.exe"; + args = "sysstartschexe"; // Command line parameter passed to schexe.exe + fail_on_error = EIgnoreCommandFailure; //Task Scheduler may have already been started by a client + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,35 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +RESOURCE LOCALISABLE_APP_INFO + { + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption="NewCaption"; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tssaac/tssaac_tapp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0x10207F7A + +RESOURCE APP_REGISTRATION_INFO + { + app_file="tssaac_tapp"; + localisable_resource_file="\\resource\\apps\\tssaac_tapp_loc"; + } + + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp01.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp01.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_tstapp_caption_string "TstCap UK" +rls_string STRING_r_tstapp_short_caption_string "TC UK" + +rls_string STRING_r_tstapp_view1_caption "V1 UK" +rls_string STRING_r_tstapp_view2_caption "V2 UK" + +rls_string STRING_r_tstapp_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view1_icon_file "z:\\resource\\apps\\tstappview01.m01" +rls_string STRING_r_tstapp_view2_icon_file "z:\\resource\\apps\\tstappview02.k" +rls_string STRING_r_tstapp_view3_icon_file "z:\\resource\\apps\\tstappviewneg.xyz" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp02.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp02.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_tstapp_caption_string "TstCap FR" +rls_string STRING_r_tstapp_short_caption_string "TC FR" + +rls_string STRING_r_tstapp_view1_caption "V1 FR" +rls_string STRING_r_tstapp_view2_caption "V2 FR" + +rls_string STRING_r_tstapp_icon_file "z:\\resource\\apps\\tstapp02.m02" +rls_string STRING_r_tstapp_view1_icon_file "z:\\resource\\apps\\tstappview01.m02" +rls_string STRING_r_tstapp_view2_icon_file "z:\\resource\\apps\\tstappview" +rls_string STRING_r_tstapp_view3_icon_file "z:\\resource\\apps\\tstappviewneg.mbm" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp03.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp03.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_tstapp_caption_string "TstCap GE" +rls_string STRING_r_tstapp_short_caption_string "TC GE" + +rls_string STRING_r_tstapp_view1_caption "V1 GE" +rls_string STRING_r_tstapp_view2_caption "V2 GE" + +rls_string STRING_r_tstapp_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view1_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view2_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view3_icon_file "z:\\resource\\apps\\tstappviewneg.xyz" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp04.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp04.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_tstapp_caption_string "TstCap SP" +rls_string STRING_r_tstapp_short_caption_string "" + +rls_string STRING_r_tstapp_view1_caption "V1 SP" +rls_string STRING_r_tstapp_view2_caption "V2 SP" + +rls_string STRING_r_tstapp_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view1_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view2_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view3_icon_file "z:\\resource\\apps\\tstappviewneg.xyz" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp05.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp05.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_tstapp_caption_string "" +rls_string STRING_r_tstapp_short_caption_string "TC IT" + +rls_string STRING_r_tstapp_view1_caption "V1 IT" +rls_string STRING_r_tstapp_view2_caption "V2 IT" + +rls_string STRING_r_tstapp_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view1_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view2_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view3_icon_file "z:\\resource\\apps\\tstappviewneg.xyz" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp_Reg.RSS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp_Reg.RSS Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,42 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include + +UID2 KUidAppRegistrationResourceFile + +UID3 10 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "tstapp"; + + localisable_resource_file = "\\resource\\apps\\tstapp_loc"; + + hidden = KAppNotHidden; + embeddability=KAppEmbeddable; + newfile = KAppDoesNotSupportNewFile; + } + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp_loc.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstapp_loc.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,98 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +#if defined(LANGUAGE_01) +#include "tstapp01.rls" +#elif(LANGUAGE_02) +#include "tstapp02.rls" +#elif(LANGUAGE_03) +#include "tstapp03.rls" +#elif(LANGUAGE_04) +#include "tstapp04.rls" +#elif(LANGUAGE_05) +#include "tstapp05.rls" +#else +#include "tstappsc.rls" +#endif + + +RESOURCE LOCALISABLE_APP_INFO + { + short_caption = STRING_r_tstapp_short_caption_string; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = STRING_r_tstapp_caption_string; + number_of_icons = 3; + icon_file = STRING_r_tstapp_icon_file; + } + }; + view_list = + { + VIEW_DATA + { + uid = 270565258; + screen_mode = 0x00; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = STRING_r_tstapp_view1_caption; + number_of_icons = 1; + icon_file = STRING_r_tstapp_view1_icon_file ; + } + }; + }, + VIEW_DATA + { + uid = 270565259; + screen_mode = 0x00; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = STRING_r_tstapp_view2_caption; + number_of_icons = 1; + icon_file = STRING_r_tstapp_view2_icon_file; + } + }; + }, + VIEW_DATA + { + uid = 0x2000F5A8; + screen_mode = 0x00; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = STRING_r_tstapp_view2_caption; + number_of_icons = 1; + icon_file = STRING_r_tstapp_view3_icon_file; + } + }; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstappsc.rls --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tstappsc.rls Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +rls_string STRING_r_tstapp_caption_string "TstCap UK" +rls_string STRING_r_tstapp_short_caption_string "TC UK" + +rls_string STRING_r_tstapp_view1_caption "V1 SC" +rls_string STRING_r_tstapp_view2_caption "V2 SC" + +rls_string STRING_r_tstapp_icon_file "z:\\resource\\apps\\tstapp.mbm" +rls_string STRING_r_tstapp_view_icon_file "z:\\resource\\apps\\tstapp.mbm" diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstappviewneg.mbm Binary file common/tools/ats/smoketest/localisation/apparchitecture/tef/tstappviewneg.mbm has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstappviewneg.xyz Binary file common/tools/ats/smoketest/localisation/apparchitecture/tef/tstappviewneg.xyz has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tstnnapp.mbm Binary file common/tools/ats/smoketest/localisation/apparchitecture/tef/tstnnapp.mbm has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,174 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + + +#include "tupgradeiconapp.h" + +const TUid KUidUpgradeIconApp = { 0xA0003195 }; + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the application class - CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +TUid CExampleApplication::AppDllUid() const + { + return KUidUpgradeIconApp; + } + +CApaDocument* CExampleApplication::CreateDocumentL() + { + return new (ELeave) CExampleDocument(*this); + } + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the appui class - CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// + +void CExampleAppUi::ConstructL() + { + BaseConstructL(); + iAppView = CExampleAppView::NewL(ClientRect()); + } + +CExampleAppUi::~CExampleAppUi() + { + delete iAppView; + } + +void CExampleAppUi::HandleCommandL(TInt aCommand) + { + switch (aCommand) + { + case EEikCmdExit: + Exit(); + break; + } + } + + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the view class - CExampleAppView +// +//////////////////////////////////////////////////////////////////////// + +CExampleAppView::CExampleAppView() + { + } + +CExampleAppView* CExampleAppView::NewL(const TRect& aRect) + { + CExampleAppView* self = new(ELeave) CExampleAppView(); + CleanupStack::PushL(self); + self->ConstructL(aRect); + CleanupStack::Pop(); + return self; + } + +CExampleAppView::~CExampleAppView() + { + delete iExampleText; + } + +void CExampleAppView::ConstructL(const TRect& aRect) + { + // Fetch the text from the resource file. + iExampleText = iEikonEnv->AllocReadResourceL(R_UPGRADEICONAPP_TEXT_TESTAPP); + + // Control is a window owning control + CreateWindowL(); + + // Extent of the control. This is + // the whole rectangle available to application. + // The rectangle is passed to us from the application UI. + SetRect(aRect); + + // At this stage, the control is ready to draw so + // we tell the UI framework by activating it. + ActivateL(); + } + + +void CExampleAppView::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); // Window graphics context + TRect drawRect = Rect(); // Area in which we shall draw + const CFont* fontUsed; // Font used for drawing text + + // Start with a clear screen + gc.Clear(); + + // Draw an outline rectangle (the default pen and brush styles ensure this) slightly smaller than the drawing area. + drawRect.Shrink(10,10); + gc.DrawRect(drawRect); + + // Use the title font supplied by the UI + fontUsed = iEikonEnv->TitleFont(); + gc.UseFont(fontUsed); + + // Draw the text in the middle of the rectangle. + TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2; + gc.DrawText(*iExampleText,drawRect,baselineOffset,CGraphicsContext::ECenter, 0); + + // Finished using the font + gc.DiscardFont(); + } + + + +//////////////////////////////////////////////////////////////////////// +// +// Implementation of the document class - CExampleDocument +// +//////////////////////////////////////////////////////////////////////// + +CExampleDocument::CExampleDocument(CEikApplication& aApp) + : CEikDocument(aApp) + { + } + +CEikAppUi* CExampleDocument::CreateAppUiL() + { + return new(ELeave) CExampleAppUi; + } + + +LOCAL_C CApaApplication* NewApplication() + { + return new CExampleApplication; + } + +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication(NewApplication); + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,115 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __TUPGRADEICONAPP_H +#define __TUPGRADEICONAPP_H + +#include + +#include +#include +#include +#include +#include + +#include + +#include + + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleApplication +// +//////////////////////////////////////////////////////////////////////// + +class CExampleApplication : public CEikApplication + { +private: + // Inherited from class CApaApplication + CApaDocument* CreateDocumentL(); + TUid AppDllUid() const; + }; + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppView +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppView : public CCoeControl + { +public: + static CExampleAppView* NewL(const TRect& aRect); + CExampleAppView(); + ~CExampleAppView(); + void ConstructL(const TRect& aRect); + +private: + // Inherited from CCoeControl + void Draw(const TRect& /*aRect*/) const; + +private: + HBufC* iExampleText; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleAppUi +// +//////////////////////////////////////////////////////////////////////// +class CExampleAppUi : public CEikAppUi + { +public: + void ConstructL(); + ~CExampleAppUi(); + +private: + // Inherirted from class CEikAppUi + void HandleCommandL(TInt aCommand); + +private: + CCoeControl* iAppView; + }; + + +//////////////////////////////////////////////////////////////////////// +// +// CExampleDocument +// +//////////////////////////////////////////////////////////////////////// +class CExampleDocument : public CEikDocument + { +public: + static CExampleDocument* NewL(CEikApplication& aApp); + CExampleDocument(CEikApplication& aApp); + void ConstructL(); +private: + // Inherited from CEikDocument + CEikAppUi* CreateAppUiL(); + }; + + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.mbm Binary file common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.mbm has changed diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,57 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// using relative paths for sourcepath and user includes +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET tupgradeiconapp.exe +TARGETTYPE exe +TARGETPATH /sys/bin +UID 0x100039CE 0xA0003195 +CAPABILITY tcb +VENDORID 0x70000001 + +SOURCEPATH . +SOURCE tupgradeiconapp.cpp + +USERINCLUDE . +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview + +MW_LAYER_SYSTEMINCLUDE + +SOURCEPATH . +RESOURCE tupgradeiconapp.RSS +START RESOURCE tupgradeiconapp.RSS +TARGETPATH /resource/apps +LANG SC +END + +SOURCEPATH . +START RESOURCE tupgradeiconapp_reg.rss +TARGETPATH /private/10003a3f/apps +END + + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib gdi.lib diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,81 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Symbian test code +*/ + + +NAME TEAP + +#include +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } + +RESOURCE EIK_APP_INFO + { + hotkeys=r_upgradeiconapp_hotkeys; + menubar=r_upgradeiconapp_menubar; + } + +RESOURCE HOTKEYS r_upgradeiconapp_hotkeys + { + control= + { + HOTKEY { command=EEikCmdExit; key='e'; } + }; + } + +RESOURCE MENU_BAR r_upgradeiconapp_menubar + { + titles= + { + MENU_TITLE { menu_pane=r_upgradeiconapp_first_menu; txt="TUpgradeIconApp"; } + }; + } + +RESOURCE MENU_PANE r_upgradeiconapp_first_menu + { + items= + { + MENU_ITEM { command=EEikCmdExit; txt="Close"; } + }; + } + + +RESOURCE TBUF r_upgradeiconapp_text_TestApp { buf="TUpgradeIconApp!"; } + + +RESOURCE LOCALISABLE_APP_INFO r_lai + { + short_caption = "TUIconApp"; + caption_and_icon = + { + CAPTION_AND_ICON_INFO + { + caption = "TestUpgradeIconApp"; + number_of_icons = 3; // each icon must be a bitmap/mask pair + icon_file = "c:\\resource\\apps\\tupgradeiconapp.mbm"; + } + }; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp_reg.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/apparchitecture/tef/tupgradeiconapp/tupgradeiconapp_reg.rss Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,36 @@ +// Copyright (c) 2007-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 "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Symbian test code +*/ + +#include +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0xA0003195 // application UID + +RESOURCE APP_REGISTRATION_INFO + { + app_file = "TUpgradeIconApp"; + localisable_resource_file = "\\resource\\apps\\tupgradeiconapp"; + localisable_resource_id = R_LAI; + } + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/bwins/APPFWK_TEST_APPUIU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/bwins/APPFWK_TEST_APPUIU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,18 @@ +EXPORTS + ??0CAutoTestManager@@AAE@PAVMAutoTestApp@@@Z @ 1 NONAME ; CAutoTestManager::CAutoTestManager(class MAutoTestApp *) + ??0CTestAppUi@@QAE@PAVCTestStep@@ABVTDesC16@@HHH@Z @ 2 NONAME ; CTestAppUi::CTestAppUi(class CTestStep *, class TDesC16 const &, int, int, int) + ??0CTestCoeAppUi@@QAE@PAVCTestStep@@@Z @ 3 NONAME ; CTestCoeAppUi::CTestCoeAppUi(class CTestStep *) + ??1CAutoTestManager@@UAE@XZ @ 4 NONAME ; CAutoTestManager::~CAutoTestManager(void) + ??1CTestAppUi@@UAE@XZ @ 5 NONAME ; CTestAppUi::~CTestAppUi(void) + ??1CTestCoeAppUi@@UAE@XZ @ 6 NONAME ; CTestCoeAppUi::~CTestCoeAppUi(void) + ?ConstructL@CTestAppUi@@UAEXXZ @ 7 NONAME ; void CTestAppUi::ConstructL(void) + ?ConstructL@CTestCoeAppUi@@QAEXXZ @ 8 NONAME ; void CTestCoeAppUi::ConstructL(void) + ?FinishAllTestCases@CAutoTestManager@@QAEXW4TTestResult@1@@Z @ 9 NONAME ; void CAutoTestManager::FinishAllTestCases(enum CAutoTestManager::TTestResult) + ?NewL@CAutoTestManager@@SAPAV1@PAVMAutoTestApp@@@Z @ 10 NONAME ; class CAutoTestManager * CAutoTestManager::NewL(class MAutoTestApp *) + ?PreallocateHALBuffer@@YAXXZ @ 11 NONAME ; void PreallocateHALBuffer(void) + ?ProcessCommandL@CTestAppUi@@MAEXH@Z @ 12 NONAME ; void CTestAppUi::ProcessCommandL(int) + ?ReduceRect@CTestAppUi@@IBEXAAVTRect@@@Z @ 13 NONAME ; void CTestAppUi::ReduceRect(class TRect &) const + ?SetTestCaseNumber@CAutoTestManager@@QAEXH@Z @ 14 NONAME ; void CAutoTestManager::SetTestCaseNumber(int) + ?StartAutoTest@CAutoTestManager@@QAEXXZ @ 15 NONAME ; void CAutoTestManager::StartAutoTest(void) + ?CloseAllPanicWindowsL@@YAXXZ @ 16 NONAME ; void CloseAllPanicWindowsL(void) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/bwins/APPFWK_TEST_UTILSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/bwins/APPFWK_TEST_UTILSU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,21 @@ +EXPORTS + ?ChangeFilePermissionL@RSmlTestUtils@@QAEHABVTDesC16@@@Z @ 1 NONAME ; int RSmlTestUtils::ChangeFilePermissionL(class TDesC16 const &) + ?Connect@RSmlTestUtils@@QAEHXZ @ 2 NONAME ; int RSmlTestUtils::Connect(void) + ?CopyDirectoryL@RSmlTestUtils@@QAEHABVTDesC16@@0@Z @ 3 NONAME ; int RSmlTestUtils::CopyDirectoryL(class TDesC16 const &, class TDesC16 const &) + ?CopyFileL@RSmlTestUtils@@QAEHABVTDesC16@@0@Z @ 4 NONAME ; int RSmlTestUtils::CopyFileL(class TDesC16 const &, class TDesC16 const &) + ?CreateDirectoryL@RSmlTestUtils@@QAEHABVTDesC16@@@Z @ 5 NONAME ; int RSmlTestUtils::CreateDirectoryL(class TDesC16 const &) + ?CreateFileL@RSmlTestUtils@@QAEHABVTDesC16@@@Z @ 6 NONAME ; int RSmlTestUtils::CreateFileL(class TDesC16 const &) + ?DeleteDirectoryL@RSmlTestUtils@@QAEHABVTDesC16@@@Z @ 7 NONAME ; int RSmlTestUtils::DeleteDirectoryL(class TDesC16 const &) + ?DeleteFileL@RSmlTestUtils@@QAEHABVTDesC16@@@Z @ 8 NONAME ; int RSmlTestUtils::DeleteFileL(class TDesC16 const &) + ?DeleteFileUsingWildcardL@RSmlTestUtils@@QAEHABVTDesC16@@@Z @ 9 NONAME ; int RSmlTestUtils::DeleteFileUsingWildcardL(class TDesC16 const &) + ?GetAtt@RSmlTestUtils@@QAEHABVTDesC16@@AAI@Z @ 10 NONAME ; int RSmlTestUtils::GetAtt(class TDesC16 const &, unsigned int &) + ?GetDevIdL@RSmlTestUtils@@QAEXAAVTDes8@@@Z @ 11 NONAME ; void RSmlTestUtils::GetDevIdL(class TDes8 &) + ?IsFilePresent@RSmlTestUtils@@QAEHABVTDesC16@@AAH@Z @ 12 NONAME ; int RSmlTestUtils::IsFilePresent(class TDesC16 const &, int &) + ?RenameDirectoryL@RSmlTestUtils@@QAEHABVTDesC16@@0@Z @ 13 NONAME ; int RSmlTestUtils::RenameDirectoryL(class TDesC16 const &, class TDesC16 const &) + ?ReplaceFileL@RSmlTestUtils@@QAEHABVTDesC16@@I@Z @ 14 NONAME ; int RSmlTestUtils::ReplaceFileL(class TDesC16 const &, unsigned int) + ?SetAtt@RSmlTestUtils@@QAEHABVTDesC16@@II@Z @ 15 NONAME ; int RSmlTestUtils::SetAtt(class TDesC16 const &, unsigned int, unsigned int) + ?SetDevIdL@RSmlTestUtils@@QAEXABVTDesC8@@@Z @ 16 NONAME ; void RSmlTestUtils::SetDevIdL(class TDesC8 const &) + ?SetHomeTimeL@RSmlTestUtils@@QAEXVTTime@@@Z @ 17 NONAME ; void RSmlTestUtils::SetHomeTimeL(class TTime) + ?SetReadOnly@RSmlTestUtils@@QAEHABVTDesC16@@I@Z @ 18 NONAME ; int RSmlTestUtils::SetReadOnly(class TDesC16 const &, unsigned int) + ?WipeDataStoreL@RSmlTestUtils@@QAEHE@Z @ 19 NONAME ; int RSmlTestUtils::WipeDataStoreL(unsigned char) + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/eabi/APPFWK_TEST_APPUIU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/eabi/APPFWK_TEST_APPUIU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,32 @@ +EXPORTS + _Z20PreallocateHALBufferv @ 1 NONAME + _ZN10CTestAppUi10ConstructLEv @ 2 NONAME + _ZN10CTestAppUi15ProcessCommandLEi @ 3 NONAME + _ZN10CTestAppUiC2EP9CTestStepRK7TDesC16iii @ 4 NONAME + _ZN10CTestAppUiD0Ev @ 5 NONAME + _ZN10CTestAppUiD1Ev @ 6 NONAME + _ZN10CTestAppUiD2Ev @ 7 NONAME + _ZN13CTestCoeAppUi10ConstructLEv @ 8 NONAME + _ZN13CTestCoeAppUiC2EP9CTestStep @ 9 NONAME + _ZN13CTestCoeAppUiD0Ev @ 10 NONAME + _ZN13CTestCoeAppUiD1Ev @ 11 NONAME + _ZN13CTestCoeAppUiD2Ev @ 12 NONAME + _ZN16CAutoTestManager13StartAutoTestEv @ 13 NONAME + _ZN16CAutoTestManager17SetTestCaseNumberEi @ 14 NONAME + _ZN16CAutoTestManager18FinishAllTestCasesENS_11TTestResultE @ 15 NONAME + _ZN16CAutoTestManager4NewLEP12MAutoTestApp @ 16 NONAME + _ZN16CAutoTestManagerC1EP12MAutoTestApp @ 17 NONAME + _ZN16CAutoTestManagerC2EP12MAutoTestApp @ 18 NONAME + _ZN16CAutoTestManagerD0Ev @ 19 NONAME + _ZN16CAutoTestManagerD1Ev @ 20 NONAME + _ZN16CAutoTestManagerD2Ev @ 21 NONAME + _ZNK10CTestAppUi10ReduceRectER5TRect @ 22 NONAME + _ZTI10CTestAppUi @ 23 NONAME ; ## + _ZTI13CTestCoeAppUi @ 24 NONAME ; ## + _ZTI16CAutoTestManager @ 25 NONAME ; ## + _ZTV10CTestAppUi @ 26 NONAME ; ## + _ZTV13CTestCoeAppUi @ 27 NONAME ; ## + _ZTV16CAutoTestManager @ 28 NONAME ; ## + _ZThn24_N10CTestAppUi15ProcessCommandLEi @ 29 NONAME ; ## + _Z21CloseAllPanicWindowsLv @ 30 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/eabi/APPFWK_TEST_UTILSU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/eabi/APPFWK_TEST_UTILSU.DEF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,21 @@ +EXPORTS + _ZN13RSmlTestUtils11CreateFileLERK7TDesC16 @ 1 NONAME + _ZN13RSmlTestUtils11DeleteFileLERK7TDesC16 @ 2 NONAME + _ZN13RSmlTestUtils11SetReadOnlyERK7TDesC16j @ 3 NONAME + _ZN13RSmlTestUtils12ReplaceFileLERK7TDesC16j @ 4 NONAME + _ZN13RSmlTestUtils12SetHomeTimeLE5TTime @ 5 NONAME + _ZN13RSmlTestUtils13IsFilePresentERK7TDesC16Ri @ 6 NONAME + _ZN13RSmlTestUtils14CopyDirectoryLERK7TDesC16S2_ @ 7 NONAME + _ZN13RSmlTestUtils14WipeDataStoreLEh @ 8 NONAME + _ZN13RSmlTestUtils16CreateDirectoryLERK7TDesC16 @ 9 NONAME + _ZN13RSmlTestUtils16DeleteDirectoryLERK7TDesC16 @ 10 NONAME + _ZN13RSmlTestUtils16RenameDirectoryLERK7TDesC16S2_ @ 11 NONAME + _ZN13RSmlTestUtils21ChangeFilePermissionLERK7TDesC16 @ 12 NONAME + _ZN13RSmlTestUtils24DeleteFileUsingWildcardLERK7TDesC16 @ 13 NONAME + _ZN13RSmlTestUtils6GetAttERK7TDesC16Rj @ 14 NONAME + _ZN13RSmlTestUtils6SetAttERK7TDesC16jj @ 15 NONAME + _ZN13RSmlTestUtils7ConnectEv @ 16 NONAME + _ZN13RSmlTestUtils9CopyFileLERK7TDesC16S2_ @ 17 NONAME + _ZN13RSmlTestUtils9GetDevIdLER5TDes8 @ 18 NONAME + _ZN13RSmlTestUtils9SetDevIdLERK6TDesC8 @ 19 NONAME + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/group/BLD.INF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/group/BLD.INF Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,34 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +// test code only + +PRJ_MMPFILES +// test code only + +PRJ_TESTMMPFILES +../group/appfwk_test_AppUi.mmp +../group/appfwk_test_utils.mmp + +PRJ_TESTEXPORTS + +// TestFramework INCLUDE files +../inc/appfwk_test.h /epoc32/include/test/appfwk_test.h +../inc/appfwk_test_AppUi.h /epoc32/include/test/appfwk_test_appui.h +../inc/appfwk_test_utils.h /epoc32/include/test/appfwk_test_utils.h diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/group/app-framework_testframework.history.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/group/app-framework_testframework.history.xml Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,12 @@ + + + + + Appended GfxTransEffect batch file + + + + + Remove in testframework the source dependency on sysstart by removing testframework\resource\SSCForStartupMode0_target.rss file. This file is not needed as is made redundant by sysstart\test\resource\hardware\SSCForStartupMode0_target.rss. + + diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/group/app-framework_testframework.mrp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/group/app-framework_testframework.mrp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,11 @@ +component app-framework_testframework +source \sf\mw\appsupport\appfw\uiftestfw + + +notes_source \component_defs\release.src + + +# == IPR section auto-inserted from distribution.policy files == +ipr T + +# == end auto-inserted section == diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/group/appfwk_test_AppUi.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/group/appfwk_test_AppUi.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include + +TARGET appfwk_test_AppUi.dll +TARGETTYPE DLL +TARGETPATH /sys/bin +UID 0x1100008D 0x11003B3C +VENDORID 0x70000001 + +CAPABILITY All -tcb + +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/techview +SYSTEMINCLUDE /epoc32/include/test + +MW_LAYER_SYSTEMINCLUDE + +USERINCLUDE ../inc + +SOURCEPATH ../src +SOURCE appfwk_test_AppUi.CPP + +LIBRARY EUSER.LIB +LIBRARY CONE.LIB +LIBRARY BAFL.LIB +LIBRARY EFSRV.LIB +LIBRARY ESTOR.LIB +LIBRARY EGUL.LIB +LIBRARY EIKCORE.LIB +LIBRARY EIKCOCTL.LIB +LIBRARY HAL.LIB +LIBRARY WS32.LIB + +DEFFILE APPFWK_TEST_APPUI.DEF diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/group/appfwk_test_utils.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/group/appfwk_test_utils.mmp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,45 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Client API for appfwk_test_utils +// +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +TARGET appfwk_test_utils.dll +TARGETTYPE dll +TARGETPATH /sys/bin +UID 0x1000008D 0x10009FBE +VENDORID 0x70000001 + +CAPABILITY all + +SYSTEMINCLUDE /epoc32/include + +USERINCLUDE ../inc + +SOURCEPATH ../src +SOURCE appfwk_test_utils.cpp + +LIBRARY EUSER.lib + +DEFFILE APPFWK_TEST_UTILS.DEF + +EPOCSTACKSIZE 32000 diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/inc/appfwk_test.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/inc/appfwk_test.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,33 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __APPFWK_TEST_H__) +#define __APPFWK_TEST_H__ + +#define APPFWK_NEGATIVE_PLATSEC_START RDebug::Print(_L("*PlatSec* ERROR - NEGATIVE TEST - START")) +#define APPFWK_NEGATIVE_PLATSEC_FINISH RDebug::Print(_L("*PlatSec* ERROR - NEGATIVE TEST - FINISH")) + +#define APPFWK_EXPECTED_PLATSEC_START RDebug::Print(_L("*PlatSec* ERROR - EXPECTED ERROR - START")) +#define APPFWK_EXPECTED_PLATSEC_FINISH RDebug::Print(_L("*PlatSec* ERROR - EXPECTED ERROR - FINISH")) + +#endif diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/inc/appfwk_test_AppUi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/inc/appfwk_test_AppUi.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,215 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __APPFWK_TEST_APPUI_H__ +#define __APPFWK_TEST_APPUI_H__ + +#include +#include +#include +#include + +#include + + +// user panic descriptors +_LIT(KPanicNullPointer,"Null pointer"); + +//user panic errors +const TInt KNullPointer = 1; + + +/********************************************************************/ +/* */ +/* */ +/* MAutoTestApp */ +/* */ +/* */ +/********************************************************************/ + +class MAutoTestApp + { +public: + virtual void RunTestStepL(TInt aNextStep)=0; // this function needs to be implemented by the derived class of either CTestCoeAppUi or CTestAppUi + }; + + +/********************************************************************/ +/* */ +/* */ +/* CAutoTestManager */ +/* */ +/* */ +/********************************************************************/ + +/** + The test code manager, provides functions to set active object with lowest priority for running test in auto mode. +*/ +class CAutoTestManager : public CActive + { +public: + enum TTestResult + { + EPass, + EFailed, + EUnknown, + }; +public: + IMPORT_C ~CAutoTestManager(); + IMPORT_C static CAutoTestManager* NewL(MAutoTestApp* aAutoTestApp); + IMPORT_C void StartAutoTest(); //init active object and set it active + IMPORT_C void FinishAllTestCases(TTestResult aTestResult); //every test program should call this function in order to + //stop the consequence of test steps by + //closing active sheduler + IMPORT_C void SetTestCaseNumber(TInt aNumber); + inline TTestResult GetTestResult() const; +private: + IMPORT_C CAutoTestManager(MAutoTestApp* aAutoTestApp); + void RunL(); + void DoCancel(); +private: + MAutoTestApp* iAutoTestApp; + TInt iNumStep; + TTestResult iResult; + }; + +inline CAutoTestManager::TTestResult CAutoTestManager::GetTestResult() const + { + return iResult; + } + + +/********************************************************************/ +/* */ +/* */ +/* CTestCoeAppUi */ +/* */ +/* */ +/********************************************************************/ + +/** + The abstract class is base for test programs, incapsulates the CAutoTestManager member. + The class doesn't handles work with resources. + + It is supposed that a derived class in its ConstructL(); function first of all has to calls the ConstructL() function of the parent class. +*/ + +class CTestCoeAppUi : public CCoeAppUi, public MAutoTestApp + { +public: + IMPORT_C CTestCoeAppUi(CTestStep* aStep); + IMPORT_C ~CTestCoeAppUi(); + IMPORT_C void ConstructL(); // should be called from ConstructL of the child class + CTestExecuteLogger& Logger() {return iStep->Logger();} + inline void testBooleanTrue(TBool aCondition, const TText8* aFile, TInt aLine) + { + iStep -> testBooleanTrue(aCondition, aFile, aLine); + } + void testBooleanTrueL(TBool aCondition, const TText8* aFile, TInt aLine); + void testBooleanTrueWithErrorCode(TBool aCondition, TInt aErrorCode, const TText8* aFile, TInt aLine ); + void testBooleanTrueWithErrorCodeL(TBool aCondition, TInt aErrorCode, const TText8* aFile, TInt aLine ); + void TestCheckPointCompareL(TInt aVal, TInt aExpectedVal, const TDesC& aText, const TText8* aFile, TInt aLine); + +protected: + inline CAutoTestManager& AutoTestManager() const; + +private: + CAutoTestManager* iAutoTestManager; + CTestStep *iStep; + }; + +CAutoTestManager& CTestCoeAppUi::AutoTestManager() const + { + return *iAutoTestManager; + } + + +class CEikButtonGroupContainer; +class CEikMenuBar; + +/********************************************************************/ +/* */ +/* */ +/* CTestAppUi */ +/* */ +/* */ +/********************************************************************/ + +/** + The abstract class is base for test programs, incapsulates the CAutoTestManager member. + The class handles work with resources. + + It is supposed that a derived class in its ConstructL(); function first of all has to calls the ConstructL() function of the parent class. +*/ +class CTestAppUi : public CEikAppUi, public MAutoTestApp + { +public: + IMPORT_C CTestAppUi(CTestStep* aStep, const TDesC& aRes, TInt aResourceHotKeysId = 0, TInt aResourceMenuBarId = 0, TInt aResourceToolBarId = 0); + IMPORT_C ~CTestAppUi(); + IMPORT_C void ConstructL(); // should be called from ConstructL of the child class + CTestExecuteLogger& Logger() {return iStep->Logger();} + inline void testBooleanTrue(TBool aCondition, const TText8* aFile, TInt aLine) + { + iStep -> testBooleanTrue(aCondition, aFile, aLine, ETrue); + } + +protected: + inline CAutoTestManager& AutoTestManager() const; + inline CTestStep& TestStep() const; + IMPORT_C void ReduceRect(TRect& aRect) const; //reduce client rectangle if toolbar or/and menu exist hide menu from screen + IMPORT_C void ProcessCommandL(TInt aCommand); + +private: + CAutoTestManager* iAutoTestManager; + + TInt iResourceFileFlag; + CEikButtonGroupContainer *iToolBar; + CEikMenuBar *iMenuBar; + + TInt iResourceHotKeysId; + TInt iResourceMenuBarId; + TInt iResourceToolBarId; + TFileName iRes; + CTestStep *iStep; + }; + +CAutoTestManager& CTestAppUi::AutoTestManager() const + { + return *iAutoTestManager; + } + +CTestStep& CTestAppUi::TestStep() const + { + return *iStep; + } + +//to prevent from alloc memory error in the User::__DbgMarkEnd +//we need to call this function if we are using CCoeEnv and memory heap macros +IMPORT_C void PreallocateHALBuffer(); + +//to prevent test fail due to panic dialog on screen +//we need to call this function if we the test we are running is sensitive to dialogs being on screen. +IMPORT_C void CloseAllPanicWindowsL(); + +#endif // __APPFWK_TEST_APPUI_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/inc/appfwk_test_utils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/inc/appfwk_test_utils.h Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,104 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#ifndef __APPFWK_TEST_UTILS_H__ +#define __APPFWK_TEST_UTILS_H__ + +#include + +typedef TUint8 TWipeItems; +TInt E32Main(); + +_LIT(KTestServerName,"!appfwk_test_utils_server"); +_LIT(KTestServerImg,"appfwk_test_utils_server"); + + +enum TSmlProfileTransportType + { + ELocalTransport, + ENetworkTransport, + }; + +class RSmlTestUtils : public RSessionBase + { +public: + IMPORT_C TInt Connect(); + IMPORT_C void SetDevIdL(const TDesC8& aDevId); + IMPORT_C void GetDevIdL(TDes8& aDevId); + IMPORT_C TInt WipeDataStoreL(TWipeItems aItemsToClean); + IMPORT_C TInt RenameDirectoryL(const TDesC16& aSrc,const TDesC16& aDest); + IMPORT_C TInt CreateDirectoryL(const TDesC& aPath); + IMPORT_C TInt DeleteDirectoryL(const TDesC& aPath); + IMPORT_C TInt CreateFileL(const TDesC& aPath); + IMPORT_C TInt DeleteFileUsingWildcardL(const TDesC& aPath); + IMPORT_C TInt DeleteFileL(const TDesC& aPath); + IMPORT_C TInt CopyFileL(const TDesC& aSrc,const TDesC& aDest); + IMPORT_C TInt ReplaceFileL(const TDesC& aName,TUint aFileMode); + IMPORT_C TInt IsFilePresent(const TDesC& aName, TBool &aPresent); + IMPORT_C TInt GetAtt( const TDesC &aName, TUint &aAttValue ); + IMPORT_C TInt SetAtt( const TDesC &aName, TUint aSetAttMask, TUint aClearAttMask ); + IMPORT_C void SetHomeTimeL(const TTime aTime); + IMPORT_C TInt SetReadOnly(const TDesC& aName,TUint aSetAttMask); + IMPORT_C TInt CopyDirectoryL(const TDesC& aSource,const TDesC& aTarget); + IMPORT_C TInt ChangeFilePermissionL(const TDesC& aPath); + }; + +enum TSmlTestUtilsService //Services provided by the SmlTestUtils server + { + EChangeDevId, + EGetDevId, + EWipeDataStore, + ECreateDir, + ERenameDir, + EDeleteDir, + ECreateFile, + EDeleteFile, + EDeleteFileUsingWildcard, + ECreateDSJob, + EStopDSJob, + ECreateDSProfile, + ESetHomeTime, + ECopyFile, + EReplaceFile, + EIsFilePresent, + ESetReadOnly, + EGetAttributes, + ESetAttributes, + ECopyDirectory, + EChangeFilePermission + }; + +enum TStoreType //Types of store that can be deleted using WipeDataStoreL() + { + ECenRep = 0x01, + ELocalSDS = 0x02, + EDMTree = 0x04, + ECenRepFiles = 0x08,// Deletes all the cen rep data files. This is a lengthy and volatile operation + // and should be used with caution. Note that this is not covered by "EAll" + // and should be called explicitly + ESDS = ELocalSDS | ECenRep, + EAll = 0xff + }; + +#endif // __APPFWK_TEST_UTILS_SERVER_H__ diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/src/appfwk_test_AppUi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/src/appfwk_test_AppUi.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,288 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + + +#include +#include +#include +#include + +#include "appfwk_test_AppUi.h" + + +EXPORT_C void PreallocateHALBuffer() + { + HAL::SEntry* pE=NULL; + TInt entries=0; + HAL::GetAll(entries, pE); + User::Free(pE); + } + +EXPORT_C void CloseAllPanicWindowsL() + { + RWsSession ws; + User::LeaveIfError(ws.Connect()); + + TInt wgFocus = ws.GetFocusWindowGroup(); + + const TUint32 ENullWsHandle = 0xFFFFFFFF; // Events delivered to this handle are thrown away + RWindowGroup wg = RWindowGroup(ws); + + wg.Construct(ENullWsHandle); + TInt wgId = wg.Identifier(); + + TWsEvent event; + event.SetType(EEventKey); + TKeyEvent *keyEvent = event.Key(); + keyEvent->iCode = EKeyEscape; + keyEvent->iScanCode = EStdKeyEscape; + keyEvent->iModifiers = 0; + + TInt limit = 0; + for(limit = 0; wgFocus != wgId && (limit < 50); limit++) + { + ws.SendEventToAllWindowGroups(event); + wgFocus = ws.GetFocusWindowGroup(); + RDebug::Print(_L("CloseAllPanicWindowsL() - EKeyEscape sent to Windows Group")); + } + + // close everything + wg.Close(); + ws.Close(); + } + + +EXPORT_C CAutoTestManager::CAutoTestManager(MAutoTestApp* aAutoTestApp) : + CActive(EPriorityIdle), iAutoTestApp(aAutoTestApp) + { + } + + +EXPORT_C CAutoTestManager::~CAutoTestManager() + { + Cancel(); + } + + +EXPORT_C CAutoTestManager* CAutoTestManager::NewL(MAutoTestApp* aAutoTestApp) + { + CAutoTestManager *theTestManager=new (ELeave) CAutoTestManager(aAutoTestApp); + CActiveScheduler::Add(theTestManager); + return theTestManager; + } + + +void CAutoTestManager::RunL() + { + __ASSERT_DEBUG(iAutoTestApp, User::Panic(KPanicNullPointer, KNullPointer)); + iAutoTestApp->RunTestStepL(++iNumStep); + StartAutoTest(); + } + + +void CAutoTestManager::DoCancel() + { + } + + +/** + Init active object and set it active + */ +EXPORT_C void CAutoTestManager::StartAutoTest() + { + TRequestStatus *pS=(&iStatus); + User::RequestComplete(pS,0); + SetActive(); + } + + +/** + This function must be called after all test cases will be completed + */ +EXPORT_C void CAutoTestManager::FinishAllTestCases(TTestResult aResult) + { + iResult = aResult; + if(aResult != EPass) + { + RDebug::Print(_L("\nTest completed with error %d"), aResult); + } + CCoeEnv::Static()->Flush(); + CBaActiveScheduler::Exit(); + } + + +/** + This function will set the internal test state variable to the user defined state. + */ +EXPORT_C void CAutoTestManager::SetTestCaseNumber(TInt aNumber) + { + iNumStep = aNumber; + } + + +EXPORT_C CTestCoeAppUi::CTestCoeAppUi(CTestStep* aStep) : + iStep(aStep) + { + } + + +EXPORT_C CTestCoeAppUi::~CTestCoeAppUi() + { + if(iAutoTestManager) + { + iAutoTestManager->Cancel(); + } + delete iAutoTestManager; + } + + +/** + Read thread local storage read and free thread local storage STL is used for storage Auto attribute, + it sets in an export function void ProcessParam(TAny* aParam) + */ +EXPORT_C void CTestCoeAppUi::ConstructL() + { + iAutoTestManager = CAutoTestManager::NewL(this); + + CCoeAppUi::ConstructL(); + } + + +EXPORT_C CTestAppUi::CTestAppUi(CTestStep* aStep, const TDesC& aRes, TInt aResourceHotKeysId, TInt aResourceMenuBarId, TInt aResourceToolBarId) : + CEikAppUi(), + iResourceHotKeysId(aResourceHotKeysId), + iResourceMenuBarId(aResourceMenuBarId), + iResourceToolBarId(aResourceToolBarId), + iStep(aStep) + { + iRes.Copy(aRes); + } + + +EXPORT_C CTestAppUi::~CTestAppUi() + { + if(iResourceFileFlag) + { + CCoeEnv::Static()->DeleteResourceFile(iResourceFileFlag); + } + + if(iAutoTestManager) + { + iAutoTestManager->Cancel(); + } + delete iAutoTestManager; + + if(iMenuBar) + { + RemoveFromStack(iMenuBar); + } + delete iMenuBar; + + if(iToolBar) + { + RemoveFromStack(iToolBar); + } + delete iToolBar; + } + + +/** + Load resource, create toolbar & menubar, read and free thread local storage + */ +EXPORT_C void CTestAppUi::ConstructL() + { + iAutoTestManager = CAutoTestManager::NewL(this); + + if(iStep == 0) + { + BaseConstructL(ENoAppResourceFile); + } + else + { + CCoeAppUi::ConstructL(); + } + + if(iRes.Length() > 0) + { + CCoeEnv* coeEnv = CCoeEnv::Static(); + TBuf8<256> buf; + buf.Copy(iRes); + iResourceFileFlag=coeEnv->AddResourceFileL(iRes); + } + + if(iResourceMenuBarId) + { + iMenuBar = new (ELeave) CEikMenuBar; + iMenuBar->ConstructL(this,iResourceHotKeysId,iResourceMenuBarId); + iMenuBar->MakeVisible(ETrue); + AddToStackL(iMenuBar); + } + + if(iResourceToolBarId) + { + iToolBar=CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::EToolbar, CEikButtonGroupContainer::EVertical, this, iResourceToolBarId); + const TRect boundingRect = ClientRect(); // make toolband stretch to the screen width by default + iToolBar->SetBoundingRect(boundingRect); + iToolBar->MakeVisible(ETrue); + AddToStackL(iToolBar); + } + } + + +/** + Reduce client rectangle + */ +EXPORT_C void CTestAppUi::ReduceRect(TRect& aRect) const + { + if(iMenuBar) + { + iMenuBar->ReduceRect(aRect); + } + + if(iToolBar) + { + iToolBar->ReduceRect(aRect); + } + } + + +/** + Hide menu from screen and pass on to the parent method + */ +EXPORT_C void CTestAppUi::ProcessCommandL(TInt aCommand) + { + if (iMenuBar && iMenuBar->IsVisible()) + { + iMenuBar->StopDisplayingMenuBar(); + } + if(aCommand != EEikCmdCanceled) + { + CEikAppUi::ProcessCommandL(aCommand); + } + } + + +TInt E32Dll() + { + return 0; + } diff -r 893b85cda81b -r 0c32c669a39d common/tools/ats/smoketest/localisation/uiftestfw/src/appfwk_test_utils.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/tools/ats/smoketest/localisation/uiftestfw/src/appfwk_test_utils.cpp Fri Nov 27 12:22:12 2009 +0000 @@ -0,0 +1,242 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#include +#include + +#include "appfwk_test_utils.h" + + + +const TUid KServerUid3 = {0x10009FBD}; + + +/** + Start the server process. Simultaneous launching of two such processes should be detected when the second one attempts to + create the server object, failing with KErrAlreadyExists. +*/ +static TInt StartServer() + { + const TUidType serverUid(KNullUid,KNullUid,KServerUid3); + RProcess server; + TInt r = server.Create(KTestServerImg,KNullDesC,serverUid); + if (r!=KErrNone) + { + return r; + } + + TRequestStatus stat; + server.Rendezvous(stat); + if (stat!=KRequestPending) + { + server.Kill(0); + } + else + { + server.Resume(); + } + + // wait for start or death + User::WaitForRequest(stat); + server.Close(); + + return stat.Int(); + } + + +/** + Connect to the server, attempting to start it if necessary +*/ +EXPORT_C TInt RSmlTestUtils::Connect() + { + TInt retry=2; + for (;;) + { + TInt r=CreateSession(KTestServerName,TVersion(0,0,0),1); + if (r!=KErrNotFound && r!=KErrServerTerminated) + { + return r; + } + if (--retry==0) + { + return r; + } + r=StartServer(); + if (r!=KErrNone && r!=KErrAlreadyExists) + { + return r; + } + } + } + + +EXPORT_C void RSmlTestUtils::SetDevIdL(const TDesC8& aDevId) + { + TIpcArgs args(&aDevId); + User::LeaveIfError(SendReceive(EChangeDevId,args)); + } + + +EXPORT_C void RSmlTestUtils::GetDevIdL(TDes8& aDevId) + { + TIpcArgs args(&aDevId); + User::LeaveIfError(SendReceive(EGetDevId, args)); + } + + +EXPORT_C TInt RSmlTestUtils::WipeDataStoreL(TWipeItems aItemsToClean) + { + TPckgBuf temp(aItemsToClean); + TIpcArgs args(&temp); + User::LeaveIfError(SendReceive(EWipeDataStore, args)); + return KErrNone; + } + + +EXPORT_C TInt RSmlTestUtils::RenameDirectoryL(const TDesC16& aSrc,const TDesC16& aDest) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aSrc,&aDest); + TInt ret = SendReceive(ERenameDir, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::CreateDirectoryL(const TDesC& aPath) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aPath); + TInt ret = SendReceive(ECreateDir, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::DeleteDirectoryL(const TDesC& aPath) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aPath); + TInt ret = SendReceive(EDeleteDir, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::CreateFileL(const TDesC& aPath) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aPath); + TInt ret = SendReceive(ECreateFile, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::DeleteFileL(const TDesC& aPath) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aPath); + TInt ret = SendReceive(EDeleteFile, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::DeleteFileUsingWildcardL(const TDesC& aPath) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aPath); + TInt ret = SendReceive(EDeleteFileUsingWildcard, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::CopyFileL(const TDesC& aSrc,const TDesC& aDest) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aSrc,&aDest); + TInt ret = SendReceive(ECopyFile, args); + return ret; + } + +// lint warning stating that aTime could be a const reference, +// but since this is derived from product code, it cannot be +// changed here, and hence the warning is suppressed +//lint -efunc(1746,RSmlTestUtils::SetHomeTimeL) +EXPORT_C void RSmlTestUtils::SetHomeTimeL(const TTime aTime) + { + TPckgBuf temp(aTime); + TIpcArgs args(&temp); + User::LeaveIfError(SendReceive(ESetHomeTime, args)); + } + + +EXPORT_C TInt RSmlTestUtils::ReplaceFileL(const TDesC& aName,TUint aFileMode) + { // this implementation of this method does not leave but further derived implementations may if they choose + TPckgBuf temp(aFileMode); + TIpcArgs args(&aName,&temp); + TInt ret = SendReceive(EReplaceFile, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::IsFilePresent(const TDesC& aName, TBool &aPresent) + { + TPckgBuf present(aPresent); + TIpcArgs args(&aName,&present); + TInt ret = SendReceive(EIsFilePresent, args); + aPresent = present(); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::SetReadOnly(const TDesC& aName,TUint aSetAttMask) + { + TPckgBuf temp(aSetAttMask); + TIpcArgs args(&aName,&temp); + TInt ret = SendReceive(ESetReadOnly,args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::GetAtt( const TDesC& aName, TUint& aAttValue ) + { + TPckgBuf attPckg( aAttValue ); + TIpcArgs args( &aName, &attPckg ); + TInt ret = SendReceive( EGetAttributes, args ); + aAttValue = attPckg(); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::SetAtt( const TDesC &aName, TUint aSetAttMask, TUint aClearAttMask ) + { + TIpcArgs args( &aName, &aSetAttMask, &aClearAttMask ); + TInt ret = SendReceive( ESetAttributes, args ); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::CopyDirectoryL(const TDesC& aSource,const TDesC& aTarget) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aSource,&aTarget); + TInt ret = SendReceive(ECopyDirectory, args); + return ret; + } + + +EXPORT_C TInt RSmlTestUtils::ChangeFilePermissionL(const TDesC& aPath) + { // this implementation of this method does not leave but further derived implementations may if they choose + TIpcArgs args(&aPath); + TInt ret = SendReceive(EChangeFilePermission, args); + return ret; + }