Merge workaround for bug 2630.
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonconnectionemulator/src/AccMonConnectionEmulator.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -98,10 +98,10 @@
TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
// Reset the values and then order the connect
- TTFASYReference method;
+ TTFASYReference method( ETFAsyNone );
TInt64 param1( 0 );
TBool wired( EFalse );
- TUint64 btaddress;
+ TUint64 btaddress( 0 );
RArray< TUint32 > capabilityArray;
TUint8 deviceType;
@@ -192,7 +192,6 @@
{
#ifdef TEST_BT
TBTDevAddr btaddr( btaddress );
- TBool oldTest( EFalse );
TRequestStatus status;
RAccessoryServer server;
server.Connect();
@@ -322,10 +321,10 @@
TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
// Reset the values and then order the connect
- TTFASYReference method;
+ TTFASYReference method( ETFAsyNone );
TInt64 param1( 0 );
TBool wired( EFalse );
- TUint64 btaddress;
+ TUint64 btaddress( 0 );
RArray< TUint32 > capabilityArray;
switch( aAccDefintion )
@@ -444,13 +443,11 @@
if( aAccInfo->AccPhysicalConnection() == KAccMonWired )
{
- TInt err( KErrNone );
TPckgBuf< TTFAccessoryPublishAndSubscribe > buf;
// Reset the values and then order the connect
TTFASYReference method;
TInt64 param1( 0 );
- TBool wired( EFalse );
RArray< TUint32 > capabilityArray;
method = ETFAsyDisc;
@@ -516,4 +513,5 @@
return retval;
}
-// End of file
\ No newline at end of file
+// End of file
+
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envrecall.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envrecall.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,21 +19,25 @@
@echo Cleaning stubs...
pushd ..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
popd
@echo Cleaning stubs... Finished
@echo build accfwuinotifier...
pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
popd
@echo build accfwuinotifier... Finished
@echo build accessoryadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld build accessoryadaptation
+REM call bldmake bldfiles
+REM call abld build accessoryadaptation
+call sbs -p accessoryadaptation
popd
@echo build accessoryadaptation... Finished
\ No newline at end of file
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envsetup.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envsetup.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,22 +19,30 @@
@echo Cleaning accfwuinotifier...
pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
popd
@echo Cleaning accfwuinotifier... Finished
@echo Cleaning accessoryadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld clean armv5 accessoryadaptation
+REM call bldmake bldfiles
+REM call abld clean armv5 accessoryadaptation
+call sbs -p accessoryadaptation -c armv5 CLEAN
+call sbs -p accessoryadaptation -c winscw CLEAN
popd
@echo Cleaning accessoryadaptation... Finished
@echo Setting up stubs...
pushd ..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
popd
@echo Setting up stubs... Finished
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/src/accMonitoringTestModuleCases.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/src/accMonitoringTestModuleCases.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -37,9 +37,9 @@
//extern ?external_function( ?arg_type,?arg_type );
// CONSTANTS
-_LIT( KEnter, "Enter" );
-_LIT( KOnGoing, "On-going" );
-_LIT( KExit, "Exit" );
+//_LIT( KEnter, "Enter" );
+//_LIT( KOnGoing, "On-going" );
+//_LIT( KExit, "Exit" );
// MACROS
//#define ?macro ?macro_def
@@ -139,21 +139,21 @@
static TCaseInfoInternal const KCases[] =
{
// To add new test cases, add new items to this array
- ENTRY( "Get connected accessories (no accessories connected)", AccMonitorTestNoL ),
- ENTRY( "Get connected accessories test(one accessory)", AccMonitorTestOneL ),
- ENTRY( "Get connected accessories test(multiple accessories)", AccMonitorTestMultiL ),
- ENTRY( "Test has accessory capa", TestHasAccessoryCapaL ),
- ENTRY( "Test has accessory different capas", TestHasAccessoryDifferentCapasL ),
- ENTRY( "Start Observer test(all connections)", StartObservingL ),
- ENTRY( "Start Observer test(defined type)", StartObserving1L ),
- ENTRY( "Start Observer test(defined accessory)", StartObserving2L ),
- ENTRY( "Start Observer test(wrong accessory)", StartObserving3L ),
- ENTRY( "Start Observer test(monitor non-existing accessory)", StartObserving4L ),
- ENTRY( "StopObserving test", StopObservingL ),
- ENTRY( "Compare Infos test", CompareInfosL ),
- ENTRY( "Get value test", GetValueTestL ),
- ENTRY( "Run error test", RunErrTestL ),
- ENTRY( "Start observing all capas test", StartObserverAllCapasL )
+ ENTRY( "Get connected accessories (no accessories connected)", &CAccMonitoringTestModule::AccMonitorTestNoL ),
+ ENTRY( "Get connected accessories test(one accessory)", &CAccMonitoringTestModule::AccMonitorTestOneL ),
+ ENTRY( "Get connected accessories test(multiple accessories)", &CAccMonitoringTestModule::AccMonitorTestMultiL ),
+ ENTRY( "Test has accessory capa", &CAccMonitoringTestModule::TestHasAccessoryCapaL ),
+ ENTRY( "Test has accessory different capas", &CAccMonitoringTestModule::TestHasAccessoryDifferentCapasL ),
+ ENTRY( "Start Observer test(all connections)", &CAccMonitoringTestModule::StartObservingL ),
+ ENTRY( "Start Observer test(defined type)", &CAccMonitoringTestModule::StartObserving1L ),
+ ENTRY( "Start Observer test(defined accessory)", &CAccMonitoringTestModule::StartObserving2L ),
+ ENTRY( "Start Observer test(wrong accessory)", &CAccMonitoringTestModule::StartObserving3L ),
+ ENTRY( "Start Observer test(monitor non-existing accessory)", &CAccMonitoringTestModule::StartObserving4L ),
+ ENTRY( "StopObserving test", &CAccMonitoringTestModule::StopObservingL ),
+ ENTRY( "Compare Infos test", &CAccMonitoringTestModule::CompareInfosL ),
+ ENTRY( "Get value test", &CAccMonitoringTestModule::GetValueTestL ),
+ ENTRY( "Run error test", &CAccMonitoringTestModule::RunErrTestL ),
+ ENTRY( "Start observing all capas test", &CAccMonitoringTestModule::StartObserverAllCapasL )
};
// Verify that case number is valid
@@ -747,8 +747,7 @@
TTestResult& aResult )
{
__UHEAP_MARK;
- _LIT( KStatusTest, "StartObservingTest" );
-
+
iConnectedAccessory->Reset();
// Enter
CAccMonitor* api = CAccMonitor::NewL();
@@ -963,7 +962,7 @@
}
result = iConnectedAccessory->Exists( array );
- if( ( err = KErrNone ) && result )
+ if( ( err == KErrNone ) && result )
{
_LIT( KDescription, "Observer set without errors");
aResult.SetResult( err, KDescription );
@@ -1014,7 +1013,6 @@
TTestResult& aResult )
{
__UHEAP_MARK;
- _LIT( KStatusTest, "StartObservingTest" );
iConnectedAccessory->Reset();
// Enter
@@ -1303,8 +1301,8 @@
CleanupStack::Pop( api );
delete api;
someArray.Close();
- __UHEAP_MARKEND;
- return err;*/
+ __UHEAP_MARKEND;*/
+ return err;
}
TInt CAccMonitoringTestModule::ConnectBTHeadsetL(
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/group/envrecall.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/group/envrecall.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,21 +19,25 @@
@echo Cleaning stubs...
pushd ..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
popd
@echo Cleaning stubs... Finished
@echo build accfwuinotifier...
pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
popd
@echo build accfwuinotifier... Finished
@echo build accessoryadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld build accessoryadaptation
+REM call bldmake bldfiles
+REM call abld build accessoryadaptation
+call sbs -p accessoryadaptation
popd
@echo build accessoryadaptation... Finished
\ No newline at end of file
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/group/envsetup.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/group/envsetup.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,22 +19,29 @@
@echo Cleaning accfwuinotifier...
pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
popd
@echo Cleaning accfwuinotifier... Finished
@echo Cleaning accessoryadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld clean armv5 accessoryadaptation
+REM call bldmake bldfiles
+REM call abld clean armv5 accessoryadaptation
+call sbs -p accessoryadaptation -c armv5 CLEAN
popd
@echo Cleaning accessoryadaptation... Finished
@echo Setting up stubs...
pushd ..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
popd
@echo Setting up stubs... Finished
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/AsyStub/src/AsyStubMainServiceBase.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/AsyStub/src/AsyStubMainServiceBase.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -87,7 +87,6 @@
{
COMPONENT_TRACE( ( _L( "ASYStub - CASYStubMainServiceBase::GetAndRemoveCapability()" ) ) );
return iService->GetAndRemoveCapability();
- COMPONENT_TRACE( ( _L( "ASYStub - CASYStubMainServiceBase::GetAndRemoveCapability() - return" ) ) );
}
// End of file
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -35,8 +35,6 @@
// CONSTANTS
const TUid KScreenOutputChannel = {0x00000666};
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc");
-
// MACROS
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -38,8 +38,7 @@
// CONSTANTS
const TUid KScreenOutputChannel = {0x00000666};
-
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc");
+
// MACROS
// LOCAL CONSTANTS AND MACROS
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -70,8 +70,8 @@
TBool booli( EFalse );
booli = 1 & buf().iParam2;
- //iService->SetObserverSelection( some, booli/*buf().iParam1, buf().iParam2*/ //);
-/*
+ iService->SetObserverSelection( some, boolibuf().iParam1, buf().iParam2);
+
if( !IsActive() )
{
iStatus = KRequestPending;
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,30 +19,37 @@
@echo Cleaning stubs
pushd ..\..\..\stub\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
popd
@echo Cleaning stubs done
@echo build remconadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld build remconadaptation
+REM call bldmake bldfiles
+REM call abld build remconadaptation
+call sbs -p remconadaptation
popd
@echo build remconadaptation... Finished
@echo build phoneclient...
pushd \sf\mw\phonesrv\phoneclientserver\phoneclient\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
popd
@echo build phoneclient... Finished
@echo build phonecmdhandler
pushd \sf\mw\phonesrv\phonecmdhandler\group\
-call bldmake bldfiles
-call abld makefile
-call abld reallyclean
-call abld build
+REM call bldmake bldfiles
+REM call abld makefile
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
+REM call abld build
+call sbs
popd
@echo build phonecmdhandler done
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,17 +19,22 @@
@echo Cleaning remconadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld makefile remconadaptation
-call abld reallyclean remconadaptation
+REM call bldmake bldfiles
+REM call abld makefile remconadaptation
+REM call abld reallyclean remconadaptation
+call sbs -p remconadaptation -c armv5 REALLYCLEAN
+call sbs -p remconadaptation -c winscw REALLYCLEAN
popd
@echo Cleaning remconadaptation... Finished
-
@echo build/instr stubs
pushd ..\..\..\stub\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
popd
@echo build/instr stubs done
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/remcontestcontrolplugin/src/remconcontrol.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -472,6 +472,7 @@
break;
case ETFRemCon_LaunchAudioClient:
+ {
// reset return channel
TRemConClientKeyDataBuf keyDatabuf;
TRemConClientKeyData keyData;
@@ -495,6 +496,7 @@
retval = status.Int();
}
}
+ }
break;
case ETFRemCon_CloseAudioClient:
@@ -506,6 +508,7 @@
break;
case ETFRemCon_CheckClientKey:
+ {
TRemConClientKeyDataBuf keyDataBuf;
retval = RProperty::Get( KTFRemConTestProperty, KTFRemConClientKey, keyDataBuf );
if ( retval == KErrNone )
@@ -521,6 +524,7 @@
}
}
+ }
break;
default:
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/audio/src/audioclientstubAppUi.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -31,7 +31,6 @@
#include "audioclientstubAppView.h"
#include "audioclientstubremconobserver.h"
-_LIT(KText, "Hello World!");
// ============================ MEMBER FUNCTIONS ===============================
--- a/accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryremotecontrol/tsrc/stub/remcon/src/remconstub.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -84,7 +84,6 @@
COMPONENT_TRACE( ( _L( "REMCONSTUB - CRemConStub::ConstructL() - Enter" ) ) );
- TInt retval(KErrNone);
TRemConAddress addr;
addr.BearerUid() = Uid(); // implementation UID of this bearer
Observer().ConnectIndicate(addr);
@@ -291,7 +290,7 @@
// This branch is used for following test cases
TPhoneCmdHandlerKeyEventBuf cmdDataBuf;
- cmdDataBuf().iOperationId = -1;
+ cmdDataBuf().iOperationId = (TUint)-1;
(void)iSubcribeToControl.Set(KTFPhoneCmdHandlerProperty, KTFPhoneCmdHandlerKey,cmdDataBuf);
}
--- a/accessoryservices/accessoryserver/BWINS/AccPolComU.DEF Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/BWINS/AccPolComU.DEF Thu Jun 24 11:22:10 2010 +0100
@@ -60,4 +60,6 @@
?ValueInt@CCapValue@@QBEHAAJ@Z @ 59 NONAME ; int CCapValue::ValueInt(long &) const
?CompareCriticalValuesL@CCapabilityStorage@@QAEHABVTAccPolGenericID@@@Z @ 60 NONAME ; int CCapabilityStorage::CompareCriticalValuesL(class TAccPolGenericID const &)
?GetGenericID@CCapabilityStorage@@QAEHAAVTAccPolGenericID@@@Z @ 61 NONAME ; int CCapabilityStorage::GetGenericID(class TAccPolGenericID &)
+ ?IsCapabilityDefinedL@CAccPolAccessoryPolicy@@QAEHABVTAccPolGenericID@@ABK@Z @ 62 NONAME ; int CAccPolAccessoryPolicy::IsCapabilityDefinedL(class TAccPolGenericID const &, unsigned long const &)
+ ?RemoveIndexFromGenericIDArray@TAccPolGenericIDArrayAccessor@@SAXAAVTAccPolGenericIDArray@@H@Z @ 63 NONAME ; void TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(class TAccPolGenericIDArray &, int)
--- a/accessoryservices/accessoryserver/EABI/AccPolComU.DEF Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/EABI/AccPolComU.DEF Thu Jun 24 11:22:10 2010 +0100
@@ -69,5 +69,9 @@
_ZTV22CAccPolAccessoryPolicy @ 68 NONAME ; #<VT>#
_ZTV9CCapValue @ 69 NONAME ; #<VT>#
_ZTVN18CCapabilityStorage14CListContainerE @ 70 NONAME ; #<VT>#
-
+ _ZN22CAccPolAccessoryPolicy20IsCapabilityDefinedLERK16TAccPolGenericIDRKm @ 71 NONAME
+ _ZN22CAccPolAccessoryPolicyD0Ev @ 72 NONAME
+ _ZN22CAccPolAccessoryPolicyD1Ev @ 73 NONAME
+ _ZN22CAccPolAccessoryPolicyD2Ev @ 74 NONAME
+ _ZN29TAccPolGenericIDArrayAccessor29RemoveIndexFromGenericIDArrayER21TAccPolGenericIDArrayi @ 75 NONAME
--- a/accessoryservices/accessoryserver/group/AccServer.mmp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/group/AccServer.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -59,7 +59,6 @@
USERINCLUDE ../inc/Common
USERINCLUDE ../inc/Server
-USERINCLUDE ../inc/ChargerContext
// System include macro Starter P&S keys
OS_LAYER_SYSTEMINCLUDE
@@ -77,7 +76,6 @@
LIBRARY hwrmlightclient.lib // Used by accessory settings.
LIBRARY efsrv.lib // Used by accessory settings
LIBRARY accpolicydb.lib
-LIBRARY accchargercontext.lib
#ifdef RD_TSP_CLIENT_MAPPER
LIBRARY tspclientmapper.lib
#endif // RD_TSP_CLIENT_MAPPER
--- a/accessoryservices/accessoryserver/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -54,7 +54,6 @@
AccAudioControl.mmp
ASYComms.mmp
ASYProxy.mmp
-AccChargerContext.mmp
accpolaudiodevicetopology.mmp
// End of File
--- a/accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/inc/Common/AccPolAccessoryPolicy.h Thu Jun 24 11:22:10 2010 +0100
@@ -195,6 +195,17 @@
* @see AccessoryTypes.h for supported HW device types.
*/
IMPORT_C TUint32 SupportedHWDevicesL();
+
+ /**
+ * Check to see if the requested capability is defined for the genericId
+ *
+ * @since S60 3.1
+ * @param aGenericID Generic ID of the list to be used
+ * @param aName Name of the capability
+ * @return True if the requested capability is defined for the genericId. Else False.
+ */
+ IMPORT_C TBool IsCapabilityDefinedL(const TAccPolGenericID& aGenericId,
+ const TUint32& aName );
public: // Functions from base classes
--- a/accessoryservices/accessoryserver/inc/Common/AccPolGenericIDArrayAccessor.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/inc/Common/AccPolGenericIDArrayAccessor.h Thu Jun 24 11:22:10 2010 +0100
@@ -72,6 +72,18 @@
const TAccPolGenericIDArray& aSource,
TAccPolGenericIDArray& aTarget );
+ /**
+ * Remove an index entry from Generic ID array.
+ *
+ * @since S60 3.1
+ * @param aGenericIDArray Source Generic ID array.
+ * @param aIndex Index entry to be removed from aGenericIDArray.
+ * @return ?description
+ */
+ IMPORT_C static void RemoveIndexFromGenericIDArray(
+ TAccPolGenericIDArray& aGenericIDArray,
+ TInt aIndex );
+
/**
* Find Generic ID from array based on Device ID.
*
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvConnectionController.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvConnectionController.h Thu Jun 24 11:22:10 2010 +0100
@@ -43,7 +43,6 @@
class CAccSrvASYProxyHandler;
class CAccSrvSettingsHandler;
class CAccSrvWiredConnectionPublisher;
-class CAccSrvChargingContextController;
// CLASS DECLARATION
@@ -298,7 +297,13 @@
TAccPolGenericID& aOldGenericId,
const CAccSrvConnectionHandler* aCaller,
TInt aError );
-
+
+
+ void HandleConnectionUpdateValidationL( const TAccPolGenericID& aGenericID,
+ TAccPolGenericID& aOldGenericId,
+ const CAccSrvSettingsHandler* aCaller,
+ TInt aError );
+
/**
* From MAccSrvConnectionControllerObserver
@@ -381,7 +386,6 @@
CAccSrvModeHandler* iModeHandler; //Owned
CAccSrvASYProxyHandler* iASYProxyHandler; //Owned
CAccSrvSettingsHandler* iSettingsHandler; //Owned
- CAccSrvChargingContextController* iChargingContextController; //Owned
RPointerArray<CAccSrvConnectionHandler> iConnectionHandler; //Owned
TUint32 iInformationNoteUID;
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvServerModel.h Thu Jun 24 11:22:10 2010 +0100
@@ -172,6 +172,17 @@
void GetLastConnectedAccessoryL( TAccPolGenericID& aGenericID ) const;
/**
+ * Get last connected wired accessory.
+ *
+ * @since S60 3.1
+ * @param aGenericID On succesful return, contains the Generic ID of
+ * last connected wired accessory.
+ * @return TBool On successful return will be ETrue, else EFalse
+ */
+ TBool GetLastConnectedWiredAccessory( TAccPolGenericID& aGenericID ) const;
+
+
+ /**
* Remove the physical connection from array of detected accessories.
*
* @since S60 3.1
--- a/accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/inc/Server/AccSrvSettingsHandler.h Thu Jun 24 11:22:10 2010 +0100
@@ -23,6 +23,7 @@
#include <e32base.h>
#include <AccModeSettingArray.h>
#include "AccSrvServerModel.h"
+#include "AccPolAccessoryPolicy.h"
// CONSTANTS
_LIT_SECURITY_POLICY_C1(KNoCapability, ECapability_None);
@@ -60,7 +61,8 @@
* Two-phased constructor.
*/
static CAccSrvSettingsHandler* NewL( CAccSrvConnectionController* aConCtrl,
- CAccSrvServerModel& aModel );
+ CAccSrvServerModel& aModel,
+ CAccPolAccessoryPolicy* aPolicy );
/**
* Destructor.
@@ -179,7 +181,8 @@
* C++ default constructor.
*/
CAccSrvSettingsHandler( CAccSrvConnectionController* aConCtrl,
- CAccSrvServerModel& aModel );
+ CAccSrvServerModel& aModel,
+ CAccPolAccessoryPolicy* aPolicy );
/**
* By default Symbian 2nd phase constructor is private.
@@ -253,6 +256,10 @@
// Tells wheter lights set on or off by accessory server.
TAccSettingsLights iLightsOn;
+ //Handle to the Accessory Policy
+ CAccPolAccessoryPolicy* iPolicy;//Not owned
+
+
public: // Friend classes
protected: // Friend classes
--- a/accessoryservices/accessoryserver/rom/AccServer.iby Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/rom/AccServer.iby Thu Jun 24 11:22:10 2010 +0100
@@ -32,7 +32,6 @@
file=ABI_DIR\BUILD_DIR\AsyComms.dll SHARED_LIB_DIR\AsyComms.dll
file=ABI_DIR\BUILD_DIR\AsyProxy.dll SHARED_LIB_DIR\AsyProxy.dll
file=ABI_DIR\BUILD_DIR\accsrvutil.dll SHARED_LIB_DIR\accsrvutil.dll
-file=ABI_DIR\BUILD_DIR\AccChargerContext.dll SHARED_LIB_DIR\AccChargerContext.dll
file=ABI_DIR\BUILD_DIR\accpolaudiodevicetopology.dll SHARED_LIB_DIR\accpolaudiodevicetopology.dll
data=ZPRIVATE\100012A5\policy\10205030.spd \private\100012A5\policy\10205030.spd
--- a/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommandObserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommandObserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -438,34 +438,34 @@
TInt trId = iAsyProxyTRRecord->TrId();
DoDestroy( trId );
- //Reset buffer
- iObjectBuf->Reset();
- if ( ECmdGetObjectValue == iAsyProxyTRRecord->CmdId() )
- {
- iObjectBuf->ResizeL( KAccSrvObjectBaseStreamBufMaxSize );
- //Externalize aValue to aBuf
- RBufWriteStream wStrm;
- (void) wStrm.Open( *iObjectBuf );
- CleanupClosePushL( wStrm );
- aObjectCon.ExternalizeL( wStrm );
- wStrm.CommitL();
- CleanupStack::PopAndDestroy( &wStrm );
- }
- else
- {
- COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoProcessResponseL() - Nothing do to!");
- }
-
- // Release allocated buffer
if ( iObjectBuf )
{
+ //Reset buffer
+ iObjectBuf->Reset();
+ if ( ECmdGetObjectValue == iAsyProxyTRRecord->CmdId() )
+ {
+ iObjectBuf->ResizeL( KAccSrvObjectBaseStreamBufMaxSize );
+ //Externalize aValue to aBuf
+ RBufWriteStream wStrm;
+ (void) wStrm.Open( *iObjectBuf );
+ CleanupClosePushL( wStrm );
+ aObjectCon.ExternalizeL( wStrm );
+ wStrm.CommitL();
+ CleanupStack::PopAndDestroy( &wStrm );
+ }
+ else
+ {
+ COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommandObserver::DoProcessResponseL() - Nothing do to!");
+ }
+
+ // Release allocated buffer
TPtr8 ptr( iObjectBuf->Ptr(0) );
iAsyProxyCommsSrvc->iAsyComms.ProcessResponse( trId,
&ptr,
aErrCode );
delete iObjectBuf;
- iObjectBuf = NULL;
- }
+ iObjectBuf = NULL;
+ }
else
{
iAsyProxyCommsSrvc->iAsyComms.ProcessResponse( trId,
--- a/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommsService.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/ASYProxy/ASYProxyCommsService.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -141,10 +141,10 @@
{
COM_TRACE_( "[AccFW:AsyProxy] CASYProxyCommsService::~CASYProxyCommsService()" );
- Destroy( KDeleteAllRecords );
-
if ( iAsyProxyCommsStack )
{
+ Destroy( KDeleteAllRecords );
+
delete iAsyProxyCommsStack;
iAsyProxyCommsStack = 0;
}
--- a/accessoryservices/accessoryserver/src/ChargerContext/ChargingContextFSMBody.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/ChargerContext/ChargingContextFSMBody.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -78,7 +78,7 @@
}
}
// Delete state objects
- for (TInt i = 1; i <= EChargerContextStateMaxValue; i++ )
+ for (TInt i = 1; i < EChargerContextStateMaxValue; i++ )
{
delete iStateArray[i];
iStateArray[i] = NULL;
@@ -111,7 +111,7 @@
COM_TRACE_( "[AccFW:AccServer] CChargingContextFSMBody::Transit()" );
TBool retVal(EFalse);
if ( ( EChargerContextStateUndefined < aNextState ) &&
- ( EChargerContextStateMaxValue >= aNextState ) )
+ ( EChargerContextStateMaxValue > aNextState ) )
{
iCurrentStateId = aNextState;
if ( NULL != iStateArray[iCurrentStateId])
@@ -173,7 +173,7 @@
COM_TRACE_( "[AccFW:AccServer] CChargingContextFSMBody::CurrentState()" );
MFSMState* currentState( NULL );
if ( ( EChargerContextStateUndefined < iCurrentStateId ) &&
- ( EChargerContextStateMaxValue >= iCurrentStateId ))
+ ( EChargerContextStateMaxValue > iCurrentStateId ))
{
currentState = iStateArray[iCurrentStateId];
}
@@ -191,7 +191,7 @@
TPtrC currentStateName;
currentStateName.Set( KNullDesC );
if ( ( EChargerContextStateUndefined < iCurrentStateId ) &&
- ( EChargerContextStateMaxValue >= iCurrentStateId ))
+ ( EChargerContextStateMaxValue > iCurrentStateId ))
{
currentStateName.Set( iStateArray[iCurrentStateId]->Name() );
}
--- a/accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Policy/AccPolAccessoryPolicy.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -35,7 +35,7 @@
// CONSTANTS
-const TInt KAccMaxRules = 6;
+const TInt KAccMaxRules = 7;
const TInt KAccConfigMaxCapabilityGroups = 64;
const TInt KAccGidIntBuf = 100;
@@ -80,7 +80,7 @@
}
// Destructor
-CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()
+EXPORT_C CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()
{
API_TRACE_( "[AccFW: ACCPOLICY] CAccPolAccessoryPolicy::~CAccPolAccessoryPolicy()" );
@@ -295,6 +295,10 @@
{
// Audio is routed to current GID, so resolve mode because this can be accessory settings case.
SetAccessoryModeL( aGenericIDArray.GetGenericIDL( index ), accMode );
+ if( accMode.iAccessoryMode == aCurrentAccessoryMode.iAccessoryMode )
+ {
+ accMode.iAudioOutputStatus = aCurrentAccessoryMode.iAudioOutputStatus;
+ }
COM_TRACE_2( "[AccFW: ACCPOLICY] CAccPolAccessoryPolicy::ResolveAccessoryModeL - set mode according to current audio output status UniqueID, (UniqueID=%d, mode=%d) ", aCurrentAudioOutputStatusUniqueID, accMode.iAccessoryMode );
}
else
@@ -378,6 +382,7 @@
// This should allocated from heap in future
TAccPolMultibleConnectionRules aAccPolConnRules[KAccMaxRules] =
{
+ {KPCHDMI, 0},
{KPCWired, KAccStereoAudio},
{KPCWired, KAccMonoAudio},
{KPCBluetooth, KAccStereoAudio},
@@ -1234,4 +1239,13 @@
return supportedDevices;
}
+EXPORT_C TBool CAccPolAccessoryPolicy::IsCapabilityDefinedL(
+ const TAccPolGenericID& aGenericId,
+ const TUint32& aName )
+ {
+ if(iCapabilityStorage->GetCapability(aGenericId,aName) != NULL)
+ return ETrue;
+ else
+ return EFalse;
+ }
// End of File
--- a/accessoryservices/accessoryserver/src/Policy/AccPolGenericIDArrayAccessor.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Policy/AccPolGenericIDArrayAccessor.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -108,6 +108,31 @@
COM_TRACE_( "[AccFW: ACCPOLICY] TAccPolGenericIDArrayAccessor::CopyGenericIDArrayL() - return void" );
}
+
+EXPORT_C void TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(
+ TAccPolGenericIDArray& aGenericIDArray,
+ TInt aIndex)
+ {
+ COM_TRACE_( "[AccFW: ACCPOLICY] TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray()" );
+
+ TInt iArrayCount( aGenericIDArray.Count() );
+ TInt i(aIndex);
+
+ if( (iArrayCount > 0) && (i >= 0) )
+ {
+ for ( ; i < (iArrayCount-1); ++i )
+ {
+ aGenericIDArray.iGenericIDArray[i] = aGenericIDArray.iGenericIDArray[i+1];
+ }
+ TAccPolGenericID emptyID;
+ aGenericIDArray.iGenericIDArray[i] = emptyID;
+ }
+
+ COM_TRACE_( "[AccFW: ACCPOLICY] TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray() - return void" );
+ }
+
+
+
// -----------------------------------------------------------------------------
// TAccPolGenericIDArrayAccessor::FindWithHWDeviceIDL
// Look for a Generic ID from the array with device ID.
--- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -30,7 +30,6 @@
#include "AccPolGenericIDAccessor.h"
#include "AccSrvSettingsHandler.h"
#include "AccPolSubblockNameArrayAccessor.h"
-#include "AccSrvChargingContextController.h"
#include <AccConfigFileParser.h>
#include <s32mem.h>
#include "AccSrvWiredConnectionPublisher.h"
@@ -99,14 +98,8 @@
iConnectionStatusHandler = CAccSrvConnectionStatusHandler::NewL( this );
iModeHandler = CAccSrvModeHandler::NewL( this );
iASYProxyHandler = CAccSrvASYProxyHandler::NewL( this );
- iSettingsHandler = CAccSrvSettingsHandler::NewL( this, *aServerModel );
+ iSettingsHandler = CAccSrvSettingsHandler::NewL( this, *aServerModel, iPolicy );
iWiredConnPublisher = CAccSrvWiredConnectionPublisher::NewL();
- TRAPD( err, iChargingContextController = CAccSrvChargingContextController::NewL() );
- if ( err != KErrNone ) // Server does not need to die on charging context fail.
- {
- COM_TRACE_1( "[AccFW:AccServer] CAccSrvConnectionController::ConstructL - CAccSrvChargingContextController err %d", err );
- iChargingContextController = NULL;
- }
COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::ConstructL - return void" );
}
@@ -167,11 +160,6 @@
delete iSettingsHandler;
}
- if( NULL != iChargingContextController )
- {
- delete iChargingContextController;
- }
-
delete iWiredConnPublisher;
// Handlers must be deleted after iPolicy and iASYProxyHandler
@@ -459,6 +447,95 @@
}
// -----------------------------------------------------------------------------
+// CAccSrvConnectionController::HandleConnectionUpdateValidationL
+// -----------------------------------------------------------------------------
+//
+void CAccSrvConnectionController::HandleConnectionUpdateValidationL(
+ const TAccPolGenericID& aGenericID,
+ TAccPolGenericID& aOldGenericId,
+ const CAccSrvSettingsHandler* aCaller,
+ TInt aError )
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleConnectionUpdateValidationL()" );
+
+ TInt err ( KErrNone );
+ TAccSrvConnection isValidConnection(EAccSrvConnect);
+ TBool isConnected( iServerModel->IsConnected( aGenericID ) );
+
+ if( KErrNone == aError )
+ {
+ isValidConnection = iPolicy->IsValidConnectionL( aGenericID, err );
+ }
+ else
+ {
+ err = aError;
+ isValidConnection = EAccSrvDeny;
+ }
+
+ if( iServerModel->FindAndRemoveCancelledConnectAccessory( aGenericID.UniqueID() ) )
+ {
+ //Connection of this accessory is cancelled.
+ err = KErrCancel;
+ isValidConnection = EAccSrvDeny;
+ }
+
+ switch( isValidConnection )
+ {
+ case EAccSrvDetect:
+ {
+ }
+ break;
+
+ case EAccSrvConnect:
+ {
+ if( isConnected )
+ {
+ //update connection generic id array
+ iServerModel->UpdateConnectionL( aGenericID);
+
+ // Complete all possible connection status related requests
+ iNotificationQueue->CompleteControlMessageL( EAccessoryConnectionStatusChanged,
+ KErrNone,
+ aGenericID.UniqueID() );
+ iNotificationQueue->CompleteControlMessageL( EAccessoryDisconnected,
+ KErrNone,
+ aOldGenericId.UniqueID() );
+ iNotificationQueue->CompleteControlMessageL( ENewAccessoryConnected,
+ KErrNone,
+ aGenericID.UniqueID() );
+ }
+
+ }
+ break;
+
+ case EAccSrvDeny:
+ {
+ iServerModel->RemovePhysicalConnection( aGenericID );
+ iServerModel->RemoveASYThreadID( aGenericID.UniqueID() );//Remove ThreadID GID mapping
+ iServerModel->CapabilityStorage().RemoveCapabilityList( aGenericID);
+
+
+ }
+ break;
+
+ default:
+ {
+ TRACE_ASSERT_ALWAYS;//unhandled enum
+ }
+ break;
+ }
+
+ iNotificationQueue->CompleteControlMessageL( EConnectAccessory,
+ err,
+ aGenericID.UniqueID() );
+
+
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionController::HandleConnectionUpdateValidationL - return void" );
+ }
+
+
+
+// -----------------------------------------------------------------------------
// CAccSrvConnectionController::ConnectionHandlingCancel
// -----------------------------------------------------------------------------
//
@@ -761,12 +838,37 @@
TAccPolAccessoryMode accMode;
iServerModel->CurrentConnectionStatusL( genericIDArray );
+
+ TUint count;
+ TBool isHDMIConnected = EFalse;
+
+ count = genericIDArray.Count();
+ if((1 < count) && (EFalse == aAudioOutputStatus) && (KErrUnknown != aDbId))
+ {
+ for(TInt i( 0 ); i < count; ++i)
+ {
+ if(genericIDArray.GetGenericIDL(i).PhysicalConnectionCaps() & KPCHDMI)
+ {
+ isHDMIConnected = ETrue;
+ break;
+ }
+ }
+ }
+
+ if(isHDMIConnected)
+ {
+ accMode = iServerModel->AccessoryMode();
+ }
+ else
+ {
+ accMode = iPolicy->ResolveAccessoryModeL( genericIDArray,
+ aDbId,
+ aAudioOutputStatus,
+ iServerModel->AccessoryMode(),
+ iServerModel->UniqueID() );
+ }
- accMode = iPolicy->ResolveAccessoryModeL( genericIDArray,
- aDbId,
- aAudioOutputStatus,
- iServerModel->AccessoryMode(),
- iServerModel->UniqueID() );
+
if( iServerModel->SetAccessoryMode( accMode, aDbId ) ) //Store accessory mode
{
@@ -796,33 +898,35 @@
case EAccModeLoopset:
case EAccModeMusicStand:
case EAccModeTVOut:
- case EAccModeHDMI:
case EAccModeHeadphones:
{
TAccPolGenericID genericID;
iServerModel->GetLastConnectedAccessoryL( genericID );
TUint32 num = genericID.SubblockCaps();
- if( num & KSBAudioSubblock )
+ if ( genericID.PhysicalConnectionCaps() != KPCHDMI ) // No info note for HDMI
{
- CCapValue* capValue = iServerModel->CapabilityStorage().GetCapability( genericID, KAccIntegratedAudioInput );
- if( iInformationNoteDefault )
- {
- noteValue = iInformationNoteDefault;
- showNote = ETrue;
- }
- if( !capValue && !iInformationNoteDefault )
- {
- showNote = ETrue;
- }
- }
- else
- {
- if( iInformationNoteDefault )
- {
- noteValue = iInformationNoteDefault;
- showNote = ETrue;
- }
- }
+ if( num & KSBAudioSubblock )
+ {
+ CCapValue* capValue = iServerModel->CapabilityStorage().GetCapability( genericID, KAccIntegratedAudioInput );
+ if( iInformationNoteDefault )
+ {
+ noteValue = iInformationNoteDefault;
+ showNote = ETrue;
+ }
+ if( !capValue && !iInformationNoteDefault )
+ {
+ showNote = ETrue;
+ }
+ }
+ else
+ {
+ if( iInformationNoteDefault )
+ {
+ noteValue = iInformationNoteDefault;
+ showNote = ETrue;
+ }
+ }
+ }
}
break;
default:
--- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionHandler.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -246,95 +246,82 @@
if ( aEvaluateConnectionRules )
{
COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling() - Evaluate connection rules" );
-
- //check rules
- TUint32 selectionListBitmask( 0 );
- iPolicy->EvaluateConnectionRulesL( iGenericID, selectionListBitmask );
-
- if ( selectionListBitmask )
- {
- COM_TRACE_1( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling() - Selection bitmask: 0x%bb", selectionListBitmask);
-
- //remove not supported items...
- selectionListBitmask = selectionListBitmask & iModel->SupportedDevicesL();
-
- //Check default selection
- TInt defaultSelection( iModel->DeviceType() );
-
- if ( selectionListBitmask == ( KASTTY | KASHeadset ) )
- {
- if ( defaultSelection != KASTTY )
- {
- defaultSelection = KASHeadset;
- }
- else
- {
- defaultSelection = KASTTY;
- }
- }
- else
- {
- if ( defaultSelection == KASHeadset )
- {
- defaultSelection = 0;
- }
-
- defaultSelection = selectionListBitmask & defaultSelection;
- }
-
- if ( defaultSelection )
- {
- iReplyValue = defaultSelection;
- iCallback->SetDefaultAccessoryInformation( iGenericID, defaultSelection );
- CAccSrvHandlerBase::IssueRequest();
- }
- else
- {
- //check that more than one accessories in the selection list
- TUint32 bitmask( 1 );
- TInt accCount( 0 );
- for ( TInt i( 0 ); i < 32; i++ )
- {
- if ( selectionListBitmask & bitmask )
- {
- if ( ++accCount > 1 )
- {
- //more than one accessories, stop the loop
- break;
- }
- }
- bitmask <<= 1;
- }
-
- if ( accCount > 1 )
- {
- //if there is possible selection show UI
- SetupSelectionDialogL( selectionListBitmask );
- }
- else
- {
- //only one selection, don't show selection dialog
- iState = EGetSelectionFromUser;
- iReplyValue = selectionListBitmask;
- iCallback->SetDefaultAccessoryInformation( iGenericID, selectionListBitmask );
- CAccSrvHandlerBase::IssueRequest();
- }
- }
-
- }
- else
- {
- iState = EInitializeConnection;
- }
-
+
}
else
{
COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling() - No connection rules" );
- iState = EInitializeConnection;
+
+ //Check default selection
+ TInt defaultSelection( iModel->DeviceType() );
+
+ // Device Type Supplied
+ if( (iGenericID.PhysicalConnectionCaps() & KPCWired) &&
+ (iGenericID.DeviceTypeCaps(KDTHeadset)) &&
+ (iPolicy->IsCapabilityDefinedL(iGenericID,KAccIntegratedAudioInput)) )
+ {
+ // This is a Headset
+ if(KASTTY == defaultSelection)
+ {
+ iReplyValue = defaultSelection;
+ }
+ else
+ {
+ iReplyValue = KASHeadset;
+ }
+
+ if(KASHeadset != iReplyValue)
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- TTY Case" );
+ //only one selection, don't show selection dialog
+ iState = EGetSelectionFromUser;
+ iCallback->SetDefaultAccessoryInformation( iGenericID, iReplyValue );
+ CAccSrvHandlerBase::IssueRequest();
+ }
+ else
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- Headset Case" );
+ iState = EInitializeConnection;
+ }
+ }
+ else if( (iGenericID.PhysicalConnectionCaps() & KPCWired) &&
+ (iGenericID.DeviceTypeCaps(KDTHeadset)) &&
+ !(iPolicy->IsCapabilityDefinedL(iGenericID,KAccIntegratedAudioInput)) )
+ {
+ // This is a Headphone
+ if((KASLineOut == defaultSelection) ||
+ (KASMusicStand == defaultSelection) ||
+ (KASHeadphones == defaultSelection))
+ {
+ iReplyValue = defaultSelection;
+ }
+ else
+ {
+ iReplyValue = KASHeadphones;
+ }
+
+ if(KASHeadphones != iReplyValue)
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- LineOut/MusicStand Case" );
+ //only one selection, don't show selection dialog
+ iState = EGetSelectionFromUser;
+ iCallback->SetDefaultAccessoryInformation( iGenericID, iReplyValue );
+ CAccSrvHandlerBase::IssueRequest();
+
+ }
+ else
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::StartConnectionHandling- Headphone Case" );
+ iState = EInitializeConnection;
+ }
+ }
+
+ else
+ {
+ iState = EInitializeConnection;
+ }
}
-
// Atleas one Asynchronous request is made for ourselves,
// clients ConnectAccessory asynchronous request will be completed
// during it.
--- a/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvServerModel.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -501,6 +501,43 @@
COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedAccessoryL - return" );
}
+
+// -----------------------------------------------------------------------------
+// CAccSrvServerModel::GetLastConnectedWiredAccessory
+//
+// Last connected wired accessory is to be searched in the iConnectionArray
+// -----------------------------------------------------------------------------
+//
+TBool CAccSrvServerModel::GetLastConnectedWiredAccessory( TAccPolGenericID& aGenericID ) const
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedWiredAccessoryL()" );
+
+ TInt arrCount = 0;
+
+ if ( (arrCount = iConnectionArray.Count()) != 0 )
+ {
+ TUint arrIndex = 0;
+ TAccPolGenericID iGenericID;
+
+ while(arrIndex < arrCount)
+ {
+ iGenericID = iConnectionArray[arrIndex];
+
+ if( iGenericID.PhysicalConnectionCaps(KPCWired) )
+ {
+ aGenericID = iGenericID;
+ return ETrue;
+ }
+ arrIndex++;
+ }
+ }
+
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedWiredAccessory - return" );
+
+ return EFalse;
+
+ }
+
// -----------------------------------------------------------------------------
// CAccSrvServerModel::SetAccessoryMode
--- a/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -73,10 +73,12 @@
// -----------------------------------------------------------------------------
//
CAccSrvSettingsHandler::CAccSrvSettingsHandler( CAccSrvConnectionController* aConCtrl,
- CAccSrvServerModel& aModel )
+ CAccSrvServerModel& aModel,
+ CAccPolAccessoryPolicy* aPolicy )
: iConCtrl( aConCtrl ),
iModel( aModel ),
- iLightsOn( EAccSettingsLightsNotSet )
+ iLightsOn( EAccSettingsLightsNotSet ),
+ iPolicy( aPolicy )
{
COM_TRACE_( "[AccFW:AccServer] CAccSrvSettingsHandler::CAccSrvSettingsHandler()" );
@@ -122,13 +124,15 @@
//
CAccSrvSettingsHandler* CAccSrvSettingsHandler::NewL(
CAccSrvConnectionController* aConCtrl,
- CAccSrvServerModel& aModel )
+ CAccSrvServerModel& aModel,
+ CAccPolAccessoryPolicy* aPolicy )
{
COM_TRACE_( "[AccFW:AccServer] CAccSrvSettingsHandler::NewL()" );
CAccSrvSettingsHandler* self = new( ELeave ) CAccSrvSettingsHandler(
aConCtrl,
- aModel );
+ aModel,
+ aPolicy );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
@@ -254,17 +258,18 @@
TPtr8 ptrBuf( buf->Des() );
User::LeaveIfError( session.Connect() );
+ CleanupClosePushL ( session );
User::LeaveIfError( file.Open( session, KHWDevicesFile, EFileRead ) );
file.Read( ptrBuf );
file.Close();
- session.Close();
TLex8 l( ptrBuf );
TInt32 temp;
l.Val( temp );
settings = static_cast< TUint32 >( temp );
- CleanupStack::Pop( buf );
+ CleanupStack::PopAndDestroy ( &session );
+ CleanupStack::PopAndDestroy ( buf );
COM_TRACE_1( "[AccFW:AccServer] CAccSrvSettingsHandler::GetSupportedHWDevicesL() - return %d", settings );
@@ -285,7 +290,8 @@
// Valid settings
TUint32 settings = ResolveNewSettingsL( aSettings, aEnable, aForce );
-
+ TUint32 iOldDeviceType = iModel.DeviceType();
+
// Update model
iModel.SetDeviceType( settings );
@@ -296,6 +302,99 @@
delete repository;
repository = NULL;
+ //Check default selection. The newly set device-type after the model update.
+ TInt defaultSelection( iModel.DeviceType() );
+ TInt iReplyValue = KASNoDevice;
+ TAccPolGenericID iGenericID;
+
+ // get the last connected wired accessory
+ if(iModel.GetLastConnectedWiredAccessory(iGenericID))
+ {
+ // Device Type Supplied
+ if( iGenericID.DeviceTypeCaps(KDTHeadset) )
+ {
+ // This is a Headset
+ if( iPolicy->IsCapabilityDefinedL(iGenericID, KAccIntegratedAudioInput) )
+ {
+ if(KASTTY == defaultSelection)
+ {
+ iReplyValue = defaultSelection;
+ }
+ else
+ {
+ iReplyValue = KASHeadset;
+ }
+ }
+ // This is a Headphone
+ else
+ {
+ if(KASMusicStand == defaultSelection)
+ {
+ iReplyValue = defaultSelection;
+ }
+ else
+ {
+ iReplyValue = KASHeadphones;
+ }
+ }
+ }
+ else if( iGenericID.DeviceTypeCaps(KDTTTY) )
+ {
+ if( iPolicy->IsCapabilityDefinedL(iGenericID, KAccIntegratedAudioInput) )
+ {
+ if(KASHeadset == defaultSelection)
+ {
+ iReplyValue = defaultSelection;
+ }
+ else
+ {
+ iReplyValue = KASTTY;
+ }
+ }
+ }
+ else if( iGenericID.DeviceTypeCaps(KDTOffice) )
+ {
+ if(KASHeadphones == defaultSelection)
+ {
+ iReplyValue = defaultSelection;
+ }
+ else
+ {
+ iReplyValue = KASMusicStand;
+ }
+ }
+ // Device Type Not Supplied
+ else if( iGenericID.DeviceTypeCaps() == KASNoDevice )
+ {
+ iReplyValue = defaultSelection;
+ }
+
+ if( (KASNoDevice != iReplyValue) && (iReplyValue != iOldDeviceType) )
+ {
+ //update generic id
+ iPolicy->UpdateGenericIDL( iGenericID, iReplyValue);
+ // Update the "iConnectionArray" of CAccSrvServerModel,
+ // to reflect the update on generic-id done earlier.
+ TAccPolGenericID oldGenericId;
+ iModel.FindWithUniqueIDL( iGenericID.UniqueID(), oldGenericId );
+
+ iConCtrl->HandleConnectionUpdateValidationL(
+ iGenericID, oldGenericId, this, KErrNone );
+
+ TASYCommandParamRecord asyCommandParamRecord;
+ asyCommandParamRecord.iCmdValue = 0;//Not used in update command
+ asyCommandParamRecord.iGenericID = iGenericID;
+
+ //Send request to ASY Proxy Handler
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvConnectionHandler::RunL() - Send update request");
+ TInt trId = iConCtrl->HandleASYCommsL( ECmdAccessoryUpdated,
+ asyCommandParamRecord );
+
+ iConCtrl->HandleAccessoryModeChangedL();
+
+ }
+ }
+
COM_TRACE_( "[AccFW:AccServer] CAccSrvSettingsHandler::SetHWDeviceSettingsL() - return" );
}
--- a/accessoryservices/accessoryserver/src/Server/AccSrvSubAsyComms.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSubAsyComms.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -292,30 +292,36 @@
HBufC8 *asyData = NULL;
CBufFlat* objectBuf = NULL;
- //
- // Allocated the buffer which is really needed!
- //
- if ( EProcessResponseTDes == aResponseType &&
- ECmdGetSupportedBTProfiles != iOutstandingProcessCmdId )
- {
- asyDataSize = aMessage.GetDesLengthL( KAccServParamPosSecond );
- asyData = HBufC8::NewL( asyDataSize );
- CleanupStack::PushL( asyData );
- }
- else if ( EProcessResponseObject == aResponseType )
- {
- objectBuf = CBufFlat::NewL( KAccSrvObjectBaseStreamBufGranularity );
- CleanupStack::PushL( objectBuf );
- TInt bufLength( aMessage.GetDesLength( KAccServParamPosSecond ) );
- objectBuf->ResizeL( bufLength );
- }
- else
- {
- COM_TRACE_( "[AccFW:AccServer] CAccSrvSubAsyComms::ProcessResponseL() - Buffer is not needed!" );
- }
-
+
if ( !aTimeOut )
{
+ //
+ // Allocated the buffer which is really needed!
+ //
+ if ( EProcessResponseTDes == aResponseType &&
+ ECmdGetSupportedBTProfiles != iOutstandingProcessCmdId )
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvSubAsyComms::ProcessResponseL() - Before RMessage with EProcessResponse" );
+ asyDataSize = aMessage.GetDesLengthL( KAccServParamPosSecond );
+ asyData = HBufC8::NewL( asyDataSize );
+ CleanupStack::PushL( asyData );
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvSubAsyComms::ProcessResponseL() - After RMessage with EProcessResponse" );
+ }
+ else if ( EProcessResponseObject == aResponseType )
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvSubAsyComms::ProcessResponseL() - Before RMessage with EProcessResponseObject" );
+ TInt bufLength = ( aMessage.GetDesLengthL( KAccServParamPosSecond ) );
+ objectBuf = CBufFlat::NewL( KAccSrvObjectBaseStreamBufGranularity );
+ CleanupStack::PushL( objectBuf );
+ objectBuf->ResizeL( bufLength );
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvSubAsyComms::ProcessResponseL() - After RMessage with EProcessResponseObject" );
+ }
+ else
+ {
+ COM_TRACE_( "[AccFW:AccServer] CAccSrvSubAsyComms::ProcessResponseL() - Buffer is not needed!" );
+ }
+
+
aMessage.ReadL( KAccServParamPosFirst, tridPckgBuf );
if ( iOutstandingTrId != tridPckgBuf() )
{
@@ -445,24 +451,42 @@
}
else
{
- TPtr8 asyDataPtr = asyData->Des();
+ TPtr8 asyDataPtr ( NULL, 0, 0 );
+ if ( NULL != asyData )
+ {
+ asyDataPtr.Set ( asyData->Des() );
+ }
iConnectionController->NotificationQueue().CompleteValueMessageL(
messageId,
asyDataPtr,
errPckgBuf(),
- iOutstandingTrId );
- CleanupStack::PopAndDestroy( asyData );
+ iOutstandingTrId );
+
+ if ( NULL != asyData )
+ {
+ CleanupStack::PopAndDestroy( asyData );
+ }
}
break;
case EProcessResponseObject :
- {
- TPtr8 objectBufPtr( objectBuf->Ptr(0) );
- iConnectionController->NotificationQueue().CompleteValueMessageL(
- messageId,
- iOutstandingTrId,
- &objectBufPtr,
- errPckgBuf() );
- CleanupStack::PopAndDestroy( objectBuf );
+ {
+ TPtr8 objectBufPtr ( NULL, 0, 0 );
+
+ if( NULL != objectBuf )
+ {
+ objectBufPtr.Set ( objectBuf->Ptr(0) );
+ }
+
+ iConnectionController->NotificationQueue().CompleteValueMessageL(
+ messageId,
+ iOutstandingTrId,
+ &objectBufPtr,
+ errPckgBuf() );
+
+ if( NULL != objectBuf )
+ {
+ CleanupStack::PopAndDestroy( objectBuf );
+ }
}
break;
--- a/accessoryservices/accessoryserver/src/Server/AccSrvSubBTControl.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSubBTControl.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -408,6 +408,8 @@
TPckg<TBTDevAddr> BTDevAddrPckg( BTDevAddr );
aMessage.ReadL( KAccServParamPosFirst, BTDevAddrPckg );
+ // coverity[check_return]
+ // coverity[unchecked_value]
iServerModel->FindWithDeviceAddressL( MakeTUint64( BTDevAddr ), uniqueID );
iConnectionController->NotificationQueue().CompleteControlMessageL(
EBluetoothAudioLinkOpenReq, KErrNone, uniqueID );
--- a/accessoryservices/accessoryserver/src/Server/AccSrvWiredConnectionPublisher.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvWiredConnectionPublisher.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -78,7 +78,7 @@
COM_TRACE_2( "[AccFW:AccServer] CAccSrvWiredConnectionPublisher::HandleConnectL: physConnCaps=0x%x, iConnectionCount=%d",
physConnCaps, iConnectionCount );
- if ( physConnCaps & KPCWired )
+ if ( physConnCaps & (KPCWired | KPCHDMI) )
{
if ( !iConnectionCount++ )
{
@@ -102,7 +102,7 @@
COM_TRACE_2( "[AccFW:AccServer] CAccSrvWiredConnectionPublisher::HandleDisconnectL: physConnCaps=0x%x, iConnectionCount=%d",
physConnCaps, iConnectionCount );
- if ( (physConnCaps & KPCWired) && iConnectionCount )
+ if ( (physConnCaps & (KPCWired | KPCHDMI)) && iConnectionCount )
{
if ( !(--iConnectionCount) )
{
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/AccessoryTestControlPlugin/src/TfAccessoryTestControlPlugin.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1545,6 +1545,7 @@
{ ETFAccessoryConnection_Close, 0, 0, 0, 0, 0, 10807, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
};
+#if 0
//
// [M10808] [[AccServer] Set TTY Mode After Connection]
//
@@ -1568,8 +1569,94 @@
{ ETFAccessorySettings_Close, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
{ ETFAccessoryConnection_Close, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
};
+#endif
//
+// [M10808] [[AccServer] Set TTY Mode After Connection]
+//
+const TTFAccessoryTestCaseStateControl KTFSetTTYModeAfterConnectionStates[]=
+ {
+ { ETFAccessoryConnection_Open, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Open, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Open, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFSetHWDeviceSettings, 0, KASNoDevice, 1, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 100000},
+ { ETFAccessoryNotifyAccessoryModeChanged, 0, 2, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFConnectWiredAccessory, 0, 0, 1, 0, 0, 10808, ETFAsyConnectHeadset, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFFindAndCheckRequest, 0, 1, 0, 0, 0, 10808, ETFAsyNone, ReqNotifyAccessoryModeChanged, KErrNone, 2000000}, // Headset Connected !
+ { ETFSetHWDeviceSettings, 0, KASTTY, 1, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 3000000},
+ { ETFSetHWDeviceSettings, 0, KASTTY, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFDisconnectWiredAccessory, 0, 0, 0, 0, 0, 10808, ETFAsyDisc, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFClearStack, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Close, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Close, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryConnection_Close, 0, 0, 0, 0, 0, 10808, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ };
+
+//
+// [M10809] [[AccServer] Set MusicStand Mode After Connection]
+//
+const TTFAccessoryTestCaseStateControl KTFSetLoopsetModeBeforeConnectionStates[]=
+ {
+ { ETFAccessoryConnection_Open, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Open, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Open, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFSetHWDeviceSettings, 0, KASNoDevice, 1, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 100000},
+ { ETFAccessoryNotifyAccessoryModeChanged, 0, 2, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFConnectWiredAccessory, 0, 0, 1, 0, 0, 10809, ETFAsyConnectOpenCable3Poles, ReqAccRequestNone, KErrNone, 1000000},
+ { ETFFindAndCheckRequest, 0, 9, 0, 0, 0, 10809, ETFAsyNone, ReqNotifyAccessoryModeChanged, KErrNone, 2000000}, // Headphone Connected !
+ { ETFSetHWDeviceSettings, 0, KASMusicStand, 1, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 3000000},
+ { ETFSetHWDeviceSettings, 0, KASMusicStand, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFDisconnectWiredAccessory, 0, 0, 0, 0, 0, 10809, ETFAsyDisc, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFClearStack, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Close, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Close, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryConnection_Close, 0, 0, 0, 0, 0, 10809, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ };
+
+//
+// [M10810] [[AccServer] Default Accessory Set To MusicStand; Connect Headphone; Change accessory settings to Headphones]
+//
+const TTFAccessoryTestCaseStateControl KTFSetTTYModeBeforeConnectionStates[]=
+ {
+ { ETFAccessoryConnection_Open, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Open, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Open, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFSetHWDeviceSettings, 0, KASMusicStand, 1, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 100000},
+ { ETFAccessoryNotifyAccessoryModeChanged, 0, 2, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFConnectWiredAccessory, 0, 0, 1, 0, 0, 10810, ETFAsyConnectOpenCable3Poles, ReqAccRequestNone, KErrNone, 1000000},
+ { ETFFindAndCheckRequest, 0, 7, 0, 0, 0, 10810, ETFAsyNone, ReqNotifyAccessoryModeChanged, KErrNone, 2000000}, // MusicStand Connected !
+ { ETFSetHWDeviceSettings, 0, KASHeadphones, 1, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 3000000},
+ { ETFSetHWDeviceSettings, 0, KASMusicStand, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFDisconnectWiredAccessory, 0, 0, 0, 0, 0, 10810, ETFAsyDisc, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFClearStack, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Close, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Close, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryConnection_Close, 0, 0, 0, 0, 0, 10810, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ };
+
+//
+// [M10811] [[AccServer] Default Accessory Set To TTY; Connect Headset; Change accessory settings to Headset]
+//
+const TTFAccessoryTestCaseStateControl KTFGetSupportedHWDevicesStates[]=
+ {
+ { ETFAccessoryConnection_Open, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Open, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Open, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFSetHWDeviceSettings, 0, KASTTY, 1, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 100000},
+ { ETFAccessoryNotifyAccessoryModeChanged, 0, 2, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFConnectWiredAccessory, 0, 0, 1, 0, 0, 10811, ETFAsyConnectHeadset, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFFindAndCheckRequest, 0, 5, 0, 0, 0, 10811, ETFAsyNone, ReqNotifyAccessoryModeChanged, KErrNone, 2000000}, // Headset identified as TTY!
+ { ETFSetHWDeviceSettings, 0, KASHeadset, 1, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 3000000},
+ { ETFSetHWDeviceSettings, 0, KASTTY, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFDisconnectWiredAccessory, 0, 0, 0, 0, 0, 10811, ETFAsyDisc, ReqAccRequestNone, KErrNone, 2000000},
+ { ETFClearStack, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryMode_Close, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessorySettings_Close, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ { ETFAccessoryConnection_Close, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
+ };
+
+#if 0
+//
// [M10809] [[AccServer] Set Loopset Mode Before Connection]
//
const TTFAccessoryTestCaseStateControl KTFSetLoopsetModeBeforeConnectionStates[15]=
@@ -1623,6 +1710,7 @@
{ ETFAccessorySettings_Close, 0, 0, 0, 0, 0, 10811, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
};
+#endif
//
// [M10812] [[AccServer] Accessory Mode Settings (TInt)]
//
@@ -2218,11 +2306,11 @@
//
// [M11102] [[AccServer] Cancel connect Accessory]
//
-const TTFAccessoryTestCaseStateControl KTFCallTClassMethods[1]=
+/*const TTFAccessoryTestCaseStateControl KTFCallTClassMethods[1]=
{
{ ETFCallTClassMethods, 0, 0, 0, 0, 0, 11102, ETFAsyNone, ReqAccRequestNone, KErrNone, 0},
};
-
+*/
/************************ ****************************/
/************************ CAccPolObjectBase related testcases (USB) ****************************/
/************************ ****************************/
@@ -2891,6 +2979,10 @@
TF_ADD_TEST_CASE_L( 10804, _L( "[M10804] [[AccServer] Set TTY Mode] ") );
TF_ADD_TEST_CASE_L( 10805, _L( "[M10805] [[AccServer] Get TTY Mode] ") );
TF_ADD_TEST_CASE_L( 10806, _L( "[M10806] [[AccServer] Set And Get TTY Mode] ") );
+ TF_ADD_TEST_CASE_L( 10808, _L( "[M10808] [[AccServer] Set TTY Mode After Connection] ") );
+ TF_ADD_TEST_CASE_L( 10809, _L( "[M10809] [[AccServer] Set MusicStand Mode After Connection] ") );
+ TF_ADD_TEST_CASE_L( 10810, _L( "[M10810] [[AccServer] Default Accessory Set To MusicStand; Connect Headphone; Change accessory settings to Headphones] ") );
+ TF_ADD_TEST_CASE_L( 10811, _L( "[M10811] [[AccServer] Default Accessory Set To TTY; Connect Headset; Change accessory settings to Headset] ") );
TF_ADD_TEST_CASE_L( 10812, _L( "[M10812] [[AccServer] Accessory Mode Settings (TInt)] ") );
TF_ADD_TEST_CASE_L( 10813, _L( "[M10813] [[AccServer] Accessory Mode Settings (TBool)] ") );
TF_ADD_TEST_CASE_L( 10814, _L( "[M10814] [[AccServer] Accessory Mode Settings (TDes)] ") );
@@ -2924,9 +3016,9 @@
TF_ADD_TEST_CASE_L( 11001, _L( "[M11001] [[AccServer] Selection dialog test] "));
TF_ADD_TEST_CASE_L( 11002, _L( "[M11002] [[AccServer] Selection dialog open/cancel] "));
- TF_ADD_TEST_CASE_L( 11003, _L( "[M11003] [[AccServer] Connect open cable, user select tv-out]"));
+ //TF_ADD_TEST_CASE_L( 11003, _L( "[M11003] [[AccServer] Connect open cable, user select tv-out]"));
TF_ADD_TEST_CASE_L( 11004, _L( "[M11004] [[AccServer] Connect open cable, ASY selects tv-out]"));
- TF_ADD_TEST_CASE_L( 11005, _L( "[M11005] [[AccServer] Connect open cable, User selection device, after that ASY selects tv-out]"));
+ //TF_ADD_TEST_CASE_L( 11005, _L( "[M11005] [[AccServer] Connect open cable, User selection device, after that ASY selects tv-out]"));
TF_ADD_TEST_CASE_L( 11006, _L( "[M11006] [[AccServer] Connect open cable, open selection dialog, disconnect]"));
TF_ADD_TEST_CASE_L( 11007, _L( "[M11007] [[AccServer] Connect open cable, connect headset, user select headset]"));
TF_ADD_TEST_CASE_L( 11008, _L( "[M11008] [[AccServer] Connect ECI accessory]"));
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,41 +19,51 @@
@echo Cleaning stubs...
pushd ..\..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
popd
@echo Cleaning stubs... Finished
@echo build BT Audioman Client...
pushd \sf\mw\btservices\bluetoothengine\btaudioman\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
popd
@echo build BT Audioman Client... Finished
@echo build accfwuinotifier...
pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
popd
@echo build accfwuinotifier... Finished
@echo build accessoryadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld cleanexport
-call abld export
-call abld build accessoryadaptation
+REM call bldmake bldfiles
+REM call abld cleanexport
+call sbs -c armv5 CLEANEXPORT
+call sbs -c winscw CLEANEXPORT
+REM call abld export
+call sbs -c armv5 EXPORT
+call sbs -c winscw EXPORT
+REM call abld build accessoryadaptation
+call sbs -p accessoryadaptation
popd
@echo build accessoryadaptation... Finished
@echo build Plugged Display ASY...
pushd \sf\os\devicesrv\accessoryservices\pluggeddisplay\pluggeddisplayasy\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
popd
@echo build Plugged Display ASY... Finished
\ No newline at end of file
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -19,43 +19,55 @@
@echo Cleaning BT Audioman Client...
pushd \sf\mw\btservices\bluetoothengine\btaudioman\group
-call bldmake bldfiles
-call abld makefile btaudiomanclient
-call abld reallyclean btaudiomanclient
+REM call bldmake bldfiles
+REM call abld makefile btaudiomanclient
+REM call abld reallyclean btaudiomanclient
+call sbs -p btaudiomanclient -c armv5 REALLYCLEAN
+call sbs -p btaudiomanclient -c winscw REALLYCLEAN
popd
@echo Cleaning BT Audioman Client... Finished
@echo Cleaning accfwuinotifier...
pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group
-call bldmake bldfiles
-call abld makefile
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld makefile
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
popd
@echo Cleaning accfwuinotifier... Finished
@echo Cleaning accessoryadaptation...
pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld makefile accessoryadaptation
-call abld clean accessoryadaptation
+REM call bldmake bldfiles
+REM call abld makefile accessoryadaptation
+REM call abld clean accessoryadaptation
+call sbs -p accessoryadaptation -c armv5 CLEAN
+call sbs -p accessoryadaptation -c winscw CLEAN
popd
@echo Cleaning accessoryadaptation... Finished
@echo Cleaning Plugged Display ASY...
pushd \sf\os\devicesrv\accessoryservices\pluggeddisplay\pluggeddisplayasy\group
-call bldmake bldfiles
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
popd
@echo Cleaning Plugged Display ASY... Finished
@echo Setting up stubs...
pushd ..\..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
popd
@echo Setting up stubs... Finished
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/AsyStub/src/AsyStubService.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -123,6 +123,10 @@
break;
case ETFAsyConnOpenCable:
+ {
+ }
+ break;
+// case ETFAsyConnOpenCable:
case ETFAsyConnectOpenCable3Poles:
{
TRequestStatus status;
@@ -140,7 +144,7 @@
TBuf<KHWModelIDMaxLength> HWModelID( _L("opencable"));
//Set GenericID header
- iGenericIDHeader.iAccessoryDeviceType = KDTAVDevice;
+ iGenericIDHeader.iAccessoryDeviceType = KDTHeadset;
iGenericIDHeader.iPhysicalConnection = KPCWired;
iGenericIDHeader.iApplicationProtocol = 0x0;
@@ -170,7 +174,7 @@
nameValueArray );
nameValueArray.Close();
- iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+ iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
User::WaitForRequest( status );
TInt retval = status.Int();
@@ -311,7 +315,7 @@
nameValueArray );
nameValueArray.Close();
- iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+ iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
User::WaitForRequest( status );
TInt retval = status.Int();
@@ -377,7 +381,7 @@
nameValueArray );
nameValueArray.Close();
- iAccessoryControl.ConnectAccessory( status, genericID, ETrue );
+ iAccessoryControl.ConnectAccessory( status, genericID, EFalse );
User::WaitForRequest( status );
TInt retval = status.Int();
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiDialogNotifierStub.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -35,7 +35,6 @@
// CONSTANTS
const TUid KScreenOutputChannel = {0x00000666};
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc");
// MACROS
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNoteNotifierStub.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -38,8 +38,7 @@
// CONSTANTS
const TUid KScreenOutputChannel = {0x00000666};
-
-_LIT(KAccFwUiNotifierResource, "accfwnoteuinotifier.rsc");
+
// MACROS
// LOCAL CONSTANTS AND MACROS
--- a/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/Stubs/accfwuinotifierstub/src/AccFwUiNotifierStubObserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -70,8 +70,8 @@
TBool booli( EFalse );
booli = 1 & buf().iParam2;
- //iService->SetObserverSelection( some, booli/*buf().iParam1, buf().iParam2*/ //);
-/*
+ iService->SetObserverSelection( some, boolibuf().iParam1, buf().iParam2);
+
if( !IsActive() )
{
iStatus = KRequestPending;
--- a/accessoryservices/gid_pc_tool/Data/CMD/CreateDB.cmd Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/gid_pc_tool/Data/CMD/CreateDB.cmd Thu Jun 24 11:22:10 2010 +0100
@@ -40,8 +40,12 @@
cd%ACCPOL_PATH%\group
echo export second
xcopy \epoc32\winscw\c\System\Data\DBS_10205030_accpolicydb.db ..\data\
-call abld.bat cleanexport
-call abld.bat export
+REM call abld.bat cleanexport
+call sbs -c armv5 CLEANEXPORT
+call sbs -c winscw CLEANEXPORT
+REM call abld.bat export
+call sbs -c armv5 EXPORT
+call sbs -c winscw EXPORT
goto end
@@ -49,9 +53,13 @@
cd%ACCPOL_PATH%\group
echo export first
-call bldmake bldfiles
-call abld cleanexport
-call abld export
+REM call bldmake bldfiles
+REM call abld cleanexport
+call sbs -c armv5 CLEANEXPORT
+call sbs -c winscw CLEANEXPORT
+REM call abld export
+call sbs -c armv5 EXPORT
+call sbs -c winscw EXPORT
goto importer
--- a/accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/headsetstatusapi/tsrc/public/basic/headsettestmodule/src/headsetTestModuleCases.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -131,14 +131,14 @@
static TCaseInfoInternal const KCases[] =
{
// To add new test cases, add new items to this array
- ENTRY( "HeadsetStatus test", HeadsetStatusTestL ),
+ ENTRY( "HeadsetStatus test", &CheadsetTestModule::HeadsetStatusTestL ),
// Example how to use OOM functionality
//OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3),
//OOM_FUNCENTRY( PrintTest, ETrue, 1, 3 ),
- ENTRY( "SetObserver test", SetObserverL ),
- ENTRY( "StartObserving test", StartObservingL ),
- ENTRY( "StopObserving test", StopObservingL )
+ ENTRY( "SetObserver test", &CheadsetTestModule::SetObserverL ),
+ ENTRY( "StartObserving test", &CheadsetTestModule::StartObservingL ),
+ ENTRY( "StopObserving test", &CheadsetTestModule::StopObservingL )
};
// Verify that case number is valid
--- a/accessoryservices/pluggeddisplay/edidparser/bwins/edidparseru.def Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/edidparser/bwins/edidparseru.def Thu Jun 24 11:22:10 2010 +0100
@@ -54,4 +54,5 @@
?GetInterlacedAudioLatency@CCea861EdidParser@@QAEEXZ @ 53 NONAME ; unsigned char CCea861EdidParser::GetInterlacedAudioLatency(void)
?GetInterlacedVideoLatency@CCea861EdidParser@@QAEEXZ @ 54 NONAME ; unsigned char CCea861EdidParser::GetInterlacedVideoLatency(void)
?GetStandardTimings@CEdidParserBase@@QAEEH@Z @ 55 NONAME ; unsigned char CEdidParserBase::GetStandardTimings(int)
+ ?HasIEEERegistration@CCea861EdidParser@@QAEHXZ @ 56 NONAME ; int CCea861EdidParser::HasIEEERegistration(void)
--- a/accessoryservices/pluggeddisplay/edidparser/eabi/edidparseru.def Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/edidparser/eabi/edidparseru.def Thu Jun 24 11:22:10 2010 +0100
@@ -56,4 +56,5 @@
_ZTI17CCea861EdidParser @ 55 NONAME ; #<TI>#
_ZTV17CCea861EdidParser @ 56 NONAME ; #<VT>#
_ZN15CEdidParserBase18GetStandardTimingsEi @ 57 NONAME
+ _ZN17CCea861EdidParser19HasIEEERegistrationEv @ 58 NONAME
--- a/accessoryservices/pluggeddisplay/edidparser/inc/cea861edidparser.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/edidparser/inc/cea861edidparser.h Thu Jun 24 11:22:10 2010 +0100
@@ -156,6 +156,14 @@
IMPORT_C TBool IsVendorSpecificDataBlockSupported();
/**
+ * Indicates whether the sink has IEEE registration or not in the vendor specific data block
+ *
+ * @param none
+ * @return true/false
+ */
+ IMPORT_C TBool HasIEEERegistration();
+
+ /**
* Indicates whether or not Speaker Allocation Data Block is supported
*
*
--- a/accessoryservices/pluggeddisplay/edidparser/src/cea861ediddatatypes.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/edidparser/src/cea861ediddatatypes.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -205,26 +205,15 @@
// delete all descriptor blocks
while( iDescriptorBlocks )
{
- TCEA861TEdidDescriptorBlockList* prev = iDescriptorBlocks;
- TCEA861TEdidDescriptorBlockList* last = prev;
- /* coverity[var_deref_op]*/
- if( prev->iNext )
- {
- last = prev->iNext;
- }
- while( last->iNext ) // go to last block
- {
- prev = prev->iNext;
- last = last->iNext;
- }
- prev->iNext = NULL;
- if( last == iDescriptorBlocks )
- {
- iDescriptorBlocks = NULL;
- prev = NULL;
- }
- delete last;
+ TCEA861TEdidDescriptorBlockList* node;
+
+ node = iDescriptorBlocks;
+ iDescriptorBlocks = iDescriptorBlocks->iNext;
+
+ delete node;
}
+ iDescriptorBlocks = NULL;
+
}
// End of file
--- a/accessoryservices/pluggeddisplay/edidparser/src/cea861edidparser.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/edidparser/src/cea861edidparser.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -19,6 +19,8 @@
#include "cea861edidparser.h"
#include "trace.h"
+const TInt KIEEERegistrationID = 0x00000C03;
+
// ======== LOCAL FUNCTIONS ========
@@ -300,6 +302,24 @@
}
// ----------------------------------------------------------------------------
+// CCea861EdidParser::HasIEEERegistration
+//
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TBool CCea861EdidParser::HasIEEERegistration()
+ {
+ FUNC_LOG;
+
+ if ( iVendorSpecificDataBlockSupported && iParsedInfo->iVendorSpecificData &&
+ iParsedInfo->iVendorSpecificData->iIEEE24bitRegistrationIdentifier == KIEEERegistrationID )
+ {
+ return ETrue;
+ }
+
+ return EFalse;
+ }
+
+// ----------------------------------------------------------------------------
// CCea861EdidParser::GetParsedInformation
//
// ----------------------------------------------------------------------------
@@ -577,6 +597,8 @@
{
return KErrOverflow;
}
+
+ TCEA861TEdidDescriptorBlockList* lastnode = iParsedInfo->iDescriptorBlocks;
for( TInt index = aIndex; index < KEdidParserSizeOfEdidBlock; index++ )
{
@@ -594,32 +616,21 @@
if( aData[index] != KEdidPaddingByte ) // padding = 0x00
{
- // start of 18-byte descriptors: See section 3.10.2 of VESA E-EDID Standard [10]
-
- TBool first = ETrue;
- if( iParsedInfo->iDescriptorBlocks == 0 )
- {
- iParsedInfo->iDescriptorBlocks
- = new ( ELeave ) TCEA861TEdidDescriptorBlockList();
- }
-
+ // start of 18-byte descriptors: See section 3.10.2 of E-EDID Standard [10]
// read the descriptors here
TEdidDescriptorBlock tmp = GetDescriptorBlock( aData, index );
- if( first )
+
+ if( iParsedInfo->iDescriptorBlocks == 0 )
{
- first = EFalse;
- iParsedInfo->iDescriptorBlocks->iData = tmp;
- continue;
+ iParsedInfo->iDescriptorBlocks = new ( ELeave ) TCEA861TEdidDescriptorBlockList();
+ lastnode = iParsedInfo->iDescriptorBlocks;
}
- TCEA861TEdidDescriptorBlockList* last =
- iParsedInfo->iDescriptorBlocks;
- while( last->iNext != 0 ) // go to last block
+ else
{
- last = last->iNext;
+ lastnode->iNext = new ( ELeave ) TCEA861TEdidDescriptorBlockList();
+ lastnode = lastnode->iNext;
}
- last->iNext = new ( ELeave ) TCEA861TEdidDescriptorBlockList();
- last = last->iNext;
- last->iData = tmp;
+ lastnode->iData = tmp;
}
else
{
@@ -1468,6 +1479,7 @@
{
case 0:
//reserved
+ ReadUnknownTagCode( aData, aIndex, L1 );
break;
case 1:
ReadCea861ShortAudioDataBlockL( aData, aIndex, L1 );
@@ -1482,7 +1494,7 @@
ReadCea861SpeakerAllocationDataBlock( aData, aIndex, L1 );
break;
case 5:
- //VESA DTC Data Block
+ //DTC Data Block
ReadUnknownTagCode( aData, aIndex, L1 );
break;
case 6:
@@ -1509,10 +1521,6 @@
// TODO: these should be read as well, not just as unknown
ReadUnknownTagCode( aData, aIndex, L1 );
break;
- default:
- // if tag-code is unknown, we still must read through it
- ReadUnknownTagCode( aData, aIndex, L1 );
- break;
}
return KErrNone;
@@ -1528,6 +1536,7 @@
const TInt8 aLen )
{
FUNC_LOG;
+ TBool first = EFalse;
iAudioDataBlockSupported = ETrue;
@@ -1535,6 +1544,8 @@
{
iParsedInfo->iShortAudioDescriptors
= new ( ELeave ) TCEA861AudioDataBlock();
+ first = ETrue;
+ iParsedInfo->iShortAudioDescriptors->iNext = 0;
}
TCEA861AudioDataBlock* cur = iParsedInfo->iShortAudioDescriptors;
@@ -1543,8 +1554,8 @@
cur = cur->iNext; // jump to the end
}
- TBool first = ETrue;
- for( int i = 0; i < aLen; i++ )
+ TInt i = 0;
+ while (i < aLen)
{
// read aLen-amount of short video descriptors
@@ -1587,20 +1598,20 @@
{
FUNC_LOG;
- TBool first = ETrue;
+ TBool first = EFalse;
iVideoDataBlockSupported = ETrue;
if( !iParsedInfo->iShortVideoDescriptors ) // linked list
{
iParsedInfo->iShortVideoDescriptors
= new ( ELeave ) TCEA861VideoDataBlock();
iParsedInfo->iShortVideoDescriptors->iNext = 0; // make sure there are no stray pointers
+ first = ETrue;
}
TCEA861VideoDataBlock* cur = iParsedInfo->iShortVideoDescriptors;
while( cur->iNext != 0 )
{
cur = cur->iNext; // jump to the end
- first = EFalse; // there is already some links, so set first to false
}
for( int i = 0; i < aLen; i++ )
@@ -1666,11 +1677,13 @@
aLen -= 3; // this is needed: Vendor specific payload length = L4-3bytes
- TBool first = ETrue;
+ TBool first = EFalse;
if( iParsedInfo->iVendorSpecificData->iVendorSpecificPayloadStart == 0 )
{
iParsedInfo->iVendorSpecificData->iVendorSpecificPayloadStart
= new ( ELeave ) TCEA861VendorSpecificDataBlockPayload();
+ iParsedInfo->iVendorSpecificData->iVendorSpecificPayloadStart->iNext = 0;
+ first = ETrue;
}
TCEA861VendorSpecificDataBlockPayload* cur =
iParsedInfo->iVendorSpecificData->iVendorSpecificPayloadStart;
@@ -1749,6 +1762,7 @@
const TInt8 aLen )
{
FUNC_LOG;
+ TBool first = EFalse;
aIndex++; // jump to the extended tag code (aLen is the length from extended tag to the end)
@@ -1756,13 +1770,12 @@
{
iParsedInfo->iVideoCapabilityDataBlock
= new ( ELeave ) TCEA861VideoCapabilityDataBlock();
+ first = ETrue;
}
TCEA861VideoCapabilityDataBlock* cur =
iParsedInfo->iVideoCapabilityDataBlock;
- TBool first = ETrue;
while( cur->iNext != 0 )
{
- first = EFalse;
cur = cur->iNext;
}
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/tvoutconfigforhdmi.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/inc/tvoutconfigforhdmi.h Thu Jun 24 11:22:10 2010 +0100
@@ -23,7 +23,7 @@
#include <e32base.h>
#include "multifinitestatemachine.h"
#include "myasynconeshottimercallback.h"
-
+#include "pdengine.h"
// CONSTANTS
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/compositecablestateconnected.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -359,7 +359,12 @@
if ( EPDEIfCentralRepositoryWatchEventKeyChanged == aEvent )
{
INFO( "Event: EPDEIfCentralRepositoryWatchEventKeyChanged" );
- iResettingInput = ETrue;
+ iCRWatchForFlickerFilter->Cancel();
+ iCRWatchForAspectRatio->Cancel();
+ iCRWatchForTvSystem->Cancel();
+ ClearAvailableTvOutConfig();
+ iTVOutConfigForComposite.Disable();
+ iResettingInput = ETrue;
Enter();
}
else
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/edidhandler.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -40,6 +40,7 @@
const TInt KDefaultCEAMode = E640x480p59_94d60Hz4d3;
const TInt KDefaultCEAModeIndex = 0;
+const TInt KDefaultDMTModeIndex = 3;
// Retry Delay for EDID access
const TInt KRetryDelay = 50 * 1000; // 50 milliseconds
@@ -291,7 +292,86 @@
// Set audio format
TUid audioFormat;
- audioFormat.iUid = audioDataBlock->iAudioFormatCode;
+ // Map the audio format code defined in
+ // cea861ediddatatypes.h to accpolhdmiaudioformat.h
+ switch ( audioDataBlock->iAudioFormatCode )
+ {
+ case KAudioFormatCodePCM:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatPCM16;
+ break;
+ }
+ case KAudioFormatCodeAC3:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatAC3;
+ break;
+ }
+ case KAudioFormatCodeMPEG1:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatMPEG1;
+ break;
+ }
+ case KAudioFormatCodeMP3:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatMP3;
+ break;
+ }
+ case KAudioFormatCodeMPEG2:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatMPEG2;
+ break;
+ }
+ case KAudioFormatCodeAACLC:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatAACLC;
+ break;
+ }
+ case KAudioFormatCodeDTS:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatDTS;
+ break;
+ }
+ case KAudioFormatCodeATRAC:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatATRAC;
+ break;
+ }
+ case KAudioFormatCodeDSD:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatDSD;
+ break;
+ }
+ case KAudioFormatCodeEAC3:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatEAC3;
+ break;
+ }
+ case KAudioFormatCodeDTSHD:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatDTSHD;
+ break;
+ }
+ case KAudioFormatCodeMLP:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatMLP;
+ break;
+ }
+ case KAudioFormatCodeDST:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatDST;
+ break;
+ }
+ case KAudioFormatCodeWMAPRO:
+ {
+ audioFormat = HdmiAudioFormat::KUidFormatWMAPRO;
+ break;
+ }
+ default:
+ {
+ audioFormat.iUid = KAudioFormatCodeNA;
+ break;
+ }
+ }
hdmiAudioFormat->SetAudioFormat( audioFormat ); // const TUid aAudioFormat,
// Set bit resolution
@@ -472,9 +552,10 @@
}
else
{
+ // No EDID data available from the sink
iRetryCounter = KErrNone;
- iFSM.Input( EPDEIfEDIDHandler,
- EPDEIfEDIDHandlerEventEdidDataFetchFailed );
+ ResetData();
+ iFSM.Input( EPDEIfEDIDHandler, EPDEIfEDIDHandlerEventEdidDataFetched );
}
}
break;
@@ -564,8 +645,6 @@
{
FUNC_LOG;
- aTimings.iTvPhysicalImageWidthMm = iEdidParserPtr->GetHorizontalScreenSize() * 10;
- aTimings.iTvPhysicalImageHeightMm = iEdidParserPtr->GetVerticalScreenSize() * 10;
aTimings.iTvPhysicalImageAspectRatioNumerator = 0;
aTimings.iTvPhysicalImageAspectRatioDenominator = 0;
aTimings.iHorizontalBorderPixels = 0;
@@ -573,15 +652,25 @@
aTimings.iVerticalBorderLinesField2 = 0;
aTimings.iLeftBorderPixels = 0;
aTimings.iRightBorderPixels = 0;
- aTimings.iUnderscanEnabled = EFalse;
if( iExtensionParserPtr )
{
+ INFO("==CEA Extension Exists");
aTimings.iUnderscanEnabled = iExtensionParserPtr->Underscan();
}
+ else
+ {
+ INFO("==No CEA Extension");
+ // No CEA Extension so it should be DVI
+ // Underscan supported always
+ aTimings.iTvPhysicalImageAspectRatioNumerator = 4;
+ aTimings.iTvPhysicalImageAspectRatioDenominator = 3;
+ aTimings.iUnderscanEnabled = ETrue;
+ }
if( aTimings.iUnderscanEnabled )
{
+ INFO("==Underscan Enabled");
// Underscan
aTimings.iLeftTopCorner.iX = 0;
aTimings.iLeftTopCorner.iY = 0;
@@ -590,23 +679,30 @@
}
else
{
+ INFO("==Underscan Disabled");
// Calculate overscan
CalculateOverscan( aTimings.iLeftTopCorner,
aTimings.iRightBottomCorner );
}
- aTimings.iTvPhysicalImageAspectRatioNumerator = iEdidParserPtr->GetAspectRatioLandscape();
- aTimings.iTvPhysicalImageAspectRatioDenominator = iEdidParserPtr->GetAspectRatioPortrait();
aTimings.iConnector = TTvSettings::EHDMI;
- aTimings.iTvColorCoordinates.iRed.iX = iEdidParserPtr->GetColorCoordinatesRedX();
- aTimings.iTvColorCoordinates.iRed.iY = iEdidParserPtr->GetColorCoordinatesRedY();
- aTimings.iTvColorCoordinates.iGreen.iX = iEdidParserPtr->GetColorCoordinatesGreenX();
- aTimings.iTvColorCoordinates.iGreen.iY = iEdidParserPtr->GetColorCoordinatesGreenY();
- aTimings.iTvColorCoordinates.iBlue.iX = iEdidParserPtr->GetColorCoordinatesBlueX();
- aTimings.iTvColorCoordinates.iBlue.iY = iEdidParserPtr->GetColorCoordinatesBlueY();
- aTimings.iTvColorCoordinates.iWhite.iX = iEdidParserPtr->GetColorCoordinatesWhiteX();
- aTimings.iTvColorCoordinates.iWhite.iY = iEdidParserPtr->GetColorCoordinatesWhiteY();
- aTimings.iTvHdmiVersion = iEdidParserPtr->GetVersion();
- aTimings.iTvHdmiRevision = iEdidParserPtr->GetRevision();
+
+ if( iEdidParserPtr )
+ {
+ aTimings.iTvPhysicalImageWidthMm = iEdidParserPtr->GetHorizontalScreenSize() * 10;
+ aTimings.iTvPhysicalImageHeightMm = iEdidParserPtr->GetVerticalScreenSize() * 10;
+ aTimings.iTvPhysicalImageAspectRatioNumerator = iEdidParserPtr->GetAspectRatioLandscape();
+ aTimings.iTvPhysicalImageAspectRatioDenominator = iEdidParserPtr->GetAspectRatioPortrait();
+ aTimings.iTvColorCoordinates.iRed.iX = iEdidParserPtr->GetColorCoordinatesRedX();
+ aTimings.iTvColorCoordinates.iRed.iY = iEdidParserPtr->GetColorCoordinatesRedY();
+ aTimings.iTvColorCoordinates.iGreen.iX = iEdidParserPtr->GetColorCoordinatesGreenX();
+ aTimings.iTvColorCoordinates.iGreen.iY = iEdidParserPtr->GetColorCoordinatesGreenY();
+ aTimings.iTvColorCoordinates.iBlue.iX = iEdidParserPtr->GetColorCoordinatesBlueX();
+ aTimings.iTvColorCoordinates.iBlue.iY = iEdidParserPtr->GetColorCoordinatesBlueY();
+ aTimings.iTvColorCoordinates.iWhite.iX = iEdidParserPtr->GetColorCoordinatesWhiteX();
+ aTimings.iTvColorCoordinates.iWhite.iY = iEdidParserPtr->GetColorCoordinatesWhiteY();
+ aTimings.iTvHdmiVersion = iEdidParserPtr->GetVersion();
+ aTimings.iTvHdmiRevision = iEdidParserPtr->GetRevision();
+ }
Mem::FillZ( ( TAny* )&aTimings.iProductName, ( sizeof( TChar ) * KProductNameChars ) );
Mem::FillZ( ( TAny* )&aTimings.iProductDescription, ( sizeof( TChar ) * KProductDescriptorsChars ) );
aTimings.iSourceType = THdmiDviTimings::ESourceTypeUnknown;
@@ -782,21 +878,44 @@
FUNC_LOG;
TInt retVal(KErrNone);
-
- // Check established timings 1 and 2
- retVal = SetDmtModesFromEstablishedTimings( aTimings );
-
- if( KErrNone == retVal )
- {
- // Check standard timings
- retVal = SetDmtModesFromStandardTimings( aTimings );
-
- if( KErrNone == retVal )
- {
- // Check timing descriptors
- retVal = SetDmtModesFromTimingDescriptors( aTimings );
- }
- }
+
+ if( iDataBlockPtr )
+ {
+ // Check established timings 1 and 2
+ retVal = SetDmtModesFromEstablishedTimings( aTimings );
+
+ if( KErrNone == retVal )
+ {
+ // Check standard timings
+ retVal = SetDmtModesFromStandardTimings( aTimings );
+
+ if( KErrNone == retVal )
+ {
+ // Check timing descriptors
+ retVal = SetDmtModesFromTimingDescriptors( aTimings );
+ }
+ }
+ }
+ else
+ {
+ INFO( "==No EDID available from the Sink. Setting DMT 4" );
+ // No EDID data available from the sink
+ // Default VGA resolution should be selected
+ THdmiDviTimings timings;
+ const TTimingItem* item = TimingByIndex( KDefaultDMTModeIndex, ETimingModeDMT );
+ if( item )
+ {
+ Mem::FillZ( ( TAny* )&timings, sizeof( timings ) );
+ FillHdmiDviTimings( *item, timings );
+ retVal = aTimings.Append( timings );
+ ERROR_1( retVal, "Failed to append DMT timing: %S in array", item->iTimingName );
+ }
+ else
+ {
+ ERROR_1( KErrArgument, "DMT timing item not found for VIC mode: %d", KDefaultDMTModeIndex );
+ retVal = KErrNotFound;
+ }
+ }
return retVal;
}
@@ -1187,7 +1306,7 @@
// No need to calculate if the screen size is zero
if( aBRCorner.iX > 0 && aBRCorner.iY > 0 )
{
- // hOverscanPixels = ( ( Width * hOverscan ) + 50 ) / 20000
+ // hOverscanPixels = ( ( Width * hOverscan ) + 50 ) / 10000
//
// hOverscanPixels:
// pixels which are needed to be added to top left X
@@ -1198,14 +1317,14 @@
// Horizontal overscan in percents (1% == 100)
// 50:
// Used to round up possible decimals
- // 20000:
+ // 10000:
// Used to get rid of percentage multiplier and to get the overscan value
// for one side
- TInt hOverscanPixels = ( aBRCorner.iX * iHOverscan + 50 ) / 20000;
+ TInt hOverscanPixels = ( aBRCorner.iX * iHOverscan + 50 ) / 10000;
aTLCorner.iX = hOverscanPixels;
aBRCorner.iX = ( aBRCorner.iX - hOverscanPixels );
- // vOverscanPixels = ( ( Height * vOverscan ) + 50 ) / 20000
+ // vOverscanPixels = ( ( Height * vOverscan ) + 50 ) / 10000
//
// vOverscanPixels:
// pixels which are needed to be added to top left Y
@@ -1216,10 +1335,10 @@
// Vertical overscan in percents (1% == 100)
// 50:
// Used to round up possible decimals
- // 20000:
+ // 10000:
// Used to get rid of percentage multiplier and to get the overscan value
// for one side
- TInt vOverscanPixels = ( aBRCorner.iY * iVOverscan + 50 ) / 20000;
+ TInt vOverscanPixels = ( aBRCorner.iY * iVOverscan + 50 ) / 10000;
aTLCorner.iY = vOverscanPixels;
aBRCorner.iY = ( aBRCorner.iY - vOverscanPixels );
}
@@ -1288,7 +1407,7 @@
{
TInt availableIndex = 0;
TBool found( EFalse );
- TBool defaultCEAmode( EFalse );
+ TBool defaultCEAmode( EFalse ), ceaMode( EFalse );
supportedCount = supportedModes.Count();
INFO_1( "HDMI CONFIGS --- From HW -- Total : %d", supportedCount );
@@ -1304,6 +1423,7 @@
(TSupportedHdmiDviMode::ECea == supportedModes[ supportedIndex ].iStandardModeType) &&
(aHdmiConfigs[ availableIndex ].iCeaMode == supportedModes[ supportedIndex ].iStandardMode) )
{
+ ceaMode = ETrue;
found = ETrue;
if( aHdmiConfigs[ availableIndex].iCeaMode == KDefaultCEAMode )
{
@@ -1334,24 +1454,50 @@
availableIndex++;
}
-
- if( ( (KDefaultCEAModePhysImgAspRatioNr == iEdidParserPtr->GetAspectRatioLandscape())
- && (KDefaultCEAModePhysImgAspRatioDr == iEdidParserPtr->GetAspectRatioPortrait()) )
- && !defaultCEAmode )
+ // If the Vendor Specific Data Block supported and it has IEEE registration number then it is HDMI
+ if ( iExtensionParserPtr && iExtensionParserPtr->IsVendorSpecificDataBlockSupported() && iExtensionParserPtr->HasIEEERegistration() )
{
- THdmiDviTimings timings;
-
- // Get a timing item for default CEA Mode (1)
- const TTimingItem* item = TimingByIndex( KDefaultCEAModeIndex, ETimingModeCEA );
- if( item )
- {
- Mem::FillZ( ( TAny* )&timings, sizeof( timings ) );
- FillHdmiDviTimings( *item, timings );
- retVal = aHdmiConfigs.Append( timings );
- ERROR( retVal, "Failed to append CEA timing in available config array" );
- }
- }
+ INFO( "<<<<<<<<<<<<<<It is HDMI connector>>>>>>>>>>>>>>" );
+ // Add default CEA mode 1 to the list if it is not there already
+ if( ( (KDefaultCEAModePhysImgAspRatioNr == iEdidParserPtr->GetAspectRatioLandscape())
+ && (KDefaultCEAModePhysImgAspRatioDr == iEdidParserPtr->GetAspectRatioPortrait()) )
+ && !defaultCEAmode )
+
+ {
+ THdmiDviTimings timings;
+
+ // Get a timing item for default CEA Mode (1)
+ const TTimingItem* item = TimingByIndex( KDefaultCEAModeIndex, ETimingModeCEA );
+ if( item )
+ {
+ Mem::FillZ( ( TAny* )&timings, sizeof( timings ) );
+ FillHdmiDviTimings( *item, timings );
+ retVal = aHdmiConfigs.Append( timings );
+ ERROR( retVal, "Failed to append CEA timing in available config array" );
+ }
+ }
+ }
+ else // It is DVI connector
+ {
+ TInt modecount = aHdmiConfigs.Count();
+
+ while( modecount-- )
+ {
+
+ if( aHdmiConfigs[ modecount ].iDmtMode && (EFalse == ceaMode) )
+ {
+ INFO( "<<<<<<<<<<<<<<It is DVI connector>>>>>>>>>>>>>>" );
+
+ // Change it to DVI mode as it is existing in both Supported and available configurations
+ aHdmiConfigs[ modecount ].iConnector = TTvSettings::EDVI;
+
+ // Version should be zeroed for non-HDMI
+ aHdmiConfigs[ modecount ].iTvHdmiVersion = 0;
+ aHdmiConfigs[ modecount ].iTvHdmiRevision = 0;
+ }
+ }
+ }
INFO( "Filtered list -- END" );
supportedModes.Close();
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/pdengine.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/pdengine.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -129,7 +129,7 @@
if( iFSMPtr[EPDEFSMIdCompositeCableStatus]->CurrentStateID() != ECompositeCableStateIdle )
{
// Forcefully transit CompositeCable FSM to Idle state
- ((CCompositeCableStatusFSM*)iFSMPtr[EPDEFSMIdCompositeCableStatus])->Transit(ECompositeCableStateIdle);
+ ((CCompositeCableStatusFSM*)iFSMPtr[EPDEFSMIdCompositeCableStatus])->Input(EPDEIfAccessoryConnection, EPDEIfAccessoryConnectionEventCableDisconnected);
}
iFSMPtr[ aFSMId ]->Input( aInterfaceId, aEvent );
}
--- a/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/pluggeddisplay/pluggeddisplayengine/src/tvoutconfigforhdmi.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -34,6 +34,11 @@
// CONSTANTS
// MACROS
+#define SEND_VIA_PDENGINE(event) \
+ ((CHDMICableStatusFSM*)&iFSM)->GetPDEngine()->Input( \
+ EPDEFSMIdHDMICableStatus, \
+ EPDEIfTVOutConfig, \
+ event )
// LOCAL CONSTANTS AND MACROS
@@ -435,9 +440,8 @@
}
else if ( iTvConfig->HdmiCableConnected() )
{
- iFSM.Input(
- EPDEIfTVOutConfig,
- EIfTVOutConfigEventCableConnected );
+ // Send connected event to FSM via PDEngine where the multiple connection(analog and hdmi) logic is handled.
+ SEND_VIA_PDENGINE(EIfTVOutConfigEventCableConnected);
}
else
{
--- a/accessoryservices/remotecontrolfw/client/coreapi/public/remconcoreapicontrollerobserver.h Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/remotecontrolfw/client/coreapi/public/remconcoreapicontrollerobserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -41,7 +41,7 @@
command of this type.
@param The response error.
*/
- virtual void MrccacoResponse(TRemConCoreApiOperationId aOperationId, TInt aError);
+ IMPORT_C virtual void MrccacoResponse(TRemConCoreApiOperationId aOperationId, TInt aError);
};
#endif // REMCONCOREAPICONTROLLEROBSERVER_H
--- a/accessoryservices/remotecontrolfw/client/intermediate/src/interfaceselector.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/remotecontrolfw/client/intermediate/src/interfaceselector.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -431,6 +431,7 @@
{
delete iTargetSession;
iTargetSession = NULL;
+ LEAVEL(err);
}
}
@@ -485,6 +486,7 @@
{
delete iTargetSession;
iTargetSession = NULL;
+ LEAVEL(err);
}
}
--- a/accessoryservices/remotecontrolfw/group/remotecontrol.iby Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/remotecontrolfw/group/remotecontrol.iby Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -56,7 +56,7 @@
REM *** Now for things which should only be included if the device
REM *** supports bluetooth, to save ROM space...
-#ifdef SYMBIAN_EXCLUDE_BLUETOOTH
+#ifndef __BT
REM Feature BLUETOOTH is not in this ROM (remotecontrol.iby)
#else
// Server
@@ -74,6 +74,6 @@
// The concrete Target Selector Plugin.
#include <tsp.iby>
-#endif // SYMBIAN_EXCLUDE_BLUETOOTH
+#endif // __BT
#endif // __REMCON_IBY__
--- a/accessoryservices/tspclientmapper/src/tspclientmapperimpl.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/tspclientmapper/src/tspclientmapperimpl.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -545,10 +545,14 @@
if ( (TInt)buf().operator[]( i ) != 0 ) // count of registered clients is lost with TFixedArray, so rely on id being different from 0
{
COM_TRACE_1( "[TspClientMapperImpl] CTspClientMapperImpl::GetTspTargetClientsL() first client's Pid = %d", (TInt)buf().operator[]( i ) );
- aPidArray.Append( buf().operator[]( i ) );
- }
+ returnErr = aPidArray.Append( buf().operator[]( i ) );
+ if ( returnErr != KErrNone )
+ {
+ break;
+ }
+ }
}
- COM_TRACE_( "[TspClientMapperImpl] CTspClientMapperImpl::GetTspTargetClientsL() - return" );
+ COM_TRACE_1 ( "[TspClientMapperImpl] CTspClientMapperImpl::GetTspTargetClientsL() - returnErr: %d", returnErr );
return returnErr;
}
--- a/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/init/tspclienttestmodule.ini Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/init/tspclienttestmodule.ini Thu Jun 24 11:22:10 2010 +0100
@@ -1,8 +1,8 @@
#
-# Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp Fri May 28 14:18:28 2010 +0100
+++ b/accessoryservices/tspclientmapper/tsrc/public/basic/tspclienttestmodule/src/tspclientTestModuleCases.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -33,9 +33,6 @@
//extern ?external_function( ?arg_type,?arg_type );
// CONSTANTS
-_LIT( KEnter, "Enter" );
-_LIT( KOnGoing, "On-going" );
-_LIT( KExit, "Exit" );
// MACROS
//#define ?macro ?macro_def
@@ -138,20 +135,20 @@
static TCaseInfoInternal const KCases[] =
{
// To add new test cases, add new items to this array
- ENTRY( "Set a process id playing", SetProcessIdPlayingL ),
- ENTRY( "Set and move a process id playing", SetAndMoveProcessIdPlayingL ),
- ENTRY( "Set and remove a process id playing", SetAndRemoveProcessIdPlayingL ),
- ENTRY( "Set two and set first process id playing", SetTwoAndSetFirstProcessIdPlayingL ),
- ENTRY( "Set a process id registered", SetProcessIdRegisteredL ),
- ENTRY( "Set and move a process id registered", SetAndMoveProcessIdRegisteredL ),
- ENTRY( "Set and remove a process id registered", SetAndRemoveProcessIdRegisteredL ),
- ENTRY( "Set two and set first process id registered", SetTwoAndSetFirstProcessIdRegisteredL ),
- ENTRY( "Set a process id stopped", SetProcessIdStoppedL ),
- ENTRY( "Set and move a process id stopped", SetAndMoveProcessIdStoppedL ),
- ENTRY( "Set and remove a process id stopped", SetAndRemoveProcessIdStoppedL ),
- ENTRY( "Set two and set first process id stopped", SetTwoAndSetFirstProcessIdStoppedL ),
- ENTRY( "Check out of range", CheckOutOfRangeL ),
- ENTRY( "AddAPI Usage from Multiple Threads Simultaneously", MultiThreadTestSyncL ),
+ ENTRY( "Set a process id playing", &CTspClientTestModule::SetProcessIdPlayingL ),
+ ENTRY( "Set and move a process id playing", &CTspClientTestModule::SetAndMoveProcessIdPlayingL ),
+ ENTRY( "Set and remove a process id playing", &CTspClientTestModule::SetAndRemoveProcessIdPlayingL ),
+ ENTRY( "Set two and set first process id playing", &CTspClientTestModule::SetTwoAndSetFirstProcessIdPlayingL ),
+ ENTRY( "Set a process id registered", &CTspClientTestModule::SetProcessIdRegisteredL ),
+ ENTRY( "Set and move a process id registered", &CTspClientTestModule::SetAndMoveProcessIdRegisteredL ),
+ ENTRY( "Set and remove a process id registered", &CTspClientTestModule::SetAndRemoveProcessIdRegisteredL ),
+ ENTRY( "Set two and set first process id registered", &CTspClientTestModule::SetTwoAndSetFirstProcessIdRegisteredL ),
+ ENTRY( "Set a process id stopped", &CTspClientTestModule::SetProcessIdStoppedL ),
+ ENTRY( "Set and move a process id stopped", &CTspClientTestModule::SetAndMoveProcessIdStoppedL ),
+ ENTRY( "Set and remove a process id stopped", &CTspClientTestModule::SetAndRemoveProcessIdStoppedL ),
+ ENTRY( "Set two and set first process id stopped", &CTspClientTestModule::SetTwoAndSetFirstProcessIdStoppedL ),
+ ENTRY( "Check out of range", &CTspClientTestModule::CheckOutOfRangeL ),
+ ENTRY( "AddAPI Usage from Multiple Threads Simultaneously", &CTspClientTestModule::MultiThreadTestSyncL ),
};
// Verify that case number is valid
--- a/commonservices/PlatformEnv/data/estart_mds.txt Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/data/estart_mds.txt Thu Jun 24 11:22:10 2010 +0100
@@ -1,18 +1,21 @@
+# ============================================================================
+# Name estart_mds.txt
+# Part of
#
-# Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+# Description
+# MDS Drive mappings that override default Symbian mappings
+# Version
#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
+# Copyright (C) 2007 Nokia Corporation.
+# This material, including documentation and any related
+# computer programs, is protected by copyright controlled by
+# Nokia Corporation. All rights are reserved. Copying,
+# including reproducing, storing, adapting or translating, any
+# or all of this material requires the prior written consent of
+# Nokia Corporation. This material also contains confidential
+# information which may not be disclosed to others without the
+# prior written consent of Nokia Corporation.
+# ============================================================================
E: 1 EFAT32 FAT 0 FS_FORMAT_CORRUPT # MEMORYCARD 1 Partition 0
--- a/commonservices/PlatformEnv/data/estart_mds_ms.txt Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/data/estart_mds_ms.txt Thu Jun 24 11:22:10 2010 +0100
@@ -1,18 +1,21 @@
+# ============================================================================
+# Name estart_mds_ms.txt
+# Part of
#
-# Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+# Description
+# MDS Drive mappings that override default Symbian mappings
+# Version
#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
+# Copyright (C) 2008 Nokia Corporation.
+# This material, including documentation and any related
+# computer programs, is protected by copyright controlled by
+# Nokia Corporation. All rights are reserved. Copying,
+# including reproducing, storing, adapting or translating, any
+# or all of this material requires the prior written consent of
+# Nokia Corporation. This material also contains confidential
+# information which may not be disclosed to others without the
+# prior written consent of Nokia Corporation.
+# ============================================================================
E: 1 EFAT32 FAT 0 FS_FORMAT_CORRUPT # MEMORYCARD 1 Partition 0
--- a/commonservices/PlatformEnv/disknotifyhandler/tsrc/disknotifyhandlertest/init/disknotifyhandlertest.ini Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/disknotifyhandler/tsrc/disknotifyhandlertest/init/disknotifyhandlertest.ini Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,15 @@
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
#
# This is STIFTestFramework initialization file
# Comment lines start with '#'-character.
--- a/commonservices/PlatformEnv/platformver/tsrc/platformvertest/init/platformvertest.ini Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/platformver/tsrc/platformvertest/init/platformvertest.ini Thu Jun 24 11:22:10 2010 +0100
@@ -1,8 +1,8 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/platformver/tsrc/platformvertest/src/platformvertestcases.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -134,8 +134,8 @@
{
// To add new test cases, add new items to this array
//FUNCENTRY( PrintTest ),
- ENTRY( "[PlatformVer] GetPlatformVersion", GetPlatformVersion ),
- OOM_ENTRY( "[OOM_PlatformVer] GetPlatformVersion", GetPlatformVersion ,ETrue,1,5)
+ ENTRY( "[PlatformVer] GetPlatformVersion", &CPlatformVerTest::GetPlatformVersion ),
+ OOM_ENTRY( "[OOM_PlatformVer] GetPlatformVersion", &CPlatformVerTest::GetPlatformVersion ,ETrue,1,5)
// Example how to use OOM functionality
//OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3),
--- a/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/init/sysutiltests.ini Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/init/sysutiltests.ini Thu Jun 24 11:22:10 2010 +0100
@@ -1,8 +1,8 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/sysversioninfo/tsrc/sysutiltests/src/sysutiltests.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -110,21 +110,21 @@
{
// To add new test cases, add new items to this array
- ENTRY( "[SYSUTIL] GetVersionInfo test", CSysUtiltests::GetVersionInfo ),
- ENTRY( "[SYSUTIL] GetVersionInfo2 test", CSysUtiltests::GetVersionInfo2 ),
- ENTRY( "[SYSUTIL] GetOSVersionInfo test", CSysUtiltests::GetOSVersionInfo ),
- ENTRY( "[SYSUTIL] GetProductVersionInfo test", CSysUtiltests::GetProductVersionInfo ),
- ENTRY( "[SYSUTIL] GetOSVersionInfo2 test", CSysUtiltests::GetOSVersionInfo2 ),
- ENTRY( "[SYSUTIL] GetProductVersionInfo2 test", CSysUtiltests::GetProductVersionInfo2 ),
- ENTRY( "[SYSUTIL] GetProductCode test", CSysUtiltests::GetProductCode ),
+ ENTRY( "[SYSUTIL] GetVersionInfo test", &CSysUtiltests::GetVersionInfo ),
+ ENTRY( "[SYSUTIL] GetVersionInfo2 test", &CSysUtiltests::GetVersionInfo2 ),
+ ENTRY( "[SYSUTIL] GetOSVersionInfo test", &CSysUtiltests::GetOSVersionInfo ),
+ ENTRY( "[SYSUTIL] GetProductVersionInfo test", &CSysUtiltests::GetProductVersionInfo ),
+ ENTRY( "[SYSUTIL] GetOSVersionInfo2 test", &CSysUtiltests::GetOSVersionInfo2 ),
+ ENTRY( "[SYSUTIL] GetProductVersionInfo2 test", &CSysUtiltests::GetProductVersionInfo2 ),
+ ENTRY( "[SYSUTIL] GetProductCode test", &CSysUtiltests::GetProductCode ),
- OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo test", CSysUtiltests::GetVersionInfo ,ETrue,1,5 ),
- OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo2 test", CSysUtiltests::GetVersionInfo2,ETrue,1,5 ),
- OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo test", CSysUtiltests::GetOSVersionInfo ,ETrue,1,5),
- OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo test", CSysUtiltests::GetProductVersionInfo ,ETrue,1,5),
- OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo2 test", CSysUtiltests::GetOSVersionInfo2 ,ETrue,1,5),
- OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo2 test", CSysUtiltests::GetProductVersionInfo2 ,ETrue,1,5),
- OOM_ENTRY( "[OOM_SYSUTIL] GetProductCode test", CSysUtiltests::GetProductCode ,ETrue,1,5)
+ OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo test", &CSysUtiltests::GetVersionInfo ,ETrue,1,5 ),
+ OOM_ENTRY( "[OOM_SYSUTIL] GetVersionInfo2 test", &CSysUtiltests::GetVersionInfo2,ETrue,1,5 ),
+ OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo test", &CSysUtiltests::GetOSVersionInfo ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo test", &CSysUtiltests::GetProductVersionInfo ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_SYSUTIL] GetOSVersionInfo2 test", &CSysUtiltests::GetOSVersionInfo2 ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_SYSUTIL] GetProductVersionInfo2 test", &CSysUtiltests::GetProductVersionInfo2 ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_SYSUTIL] GetProductCode test", &CSysUtiltests::GetProductCode ,ETrue,1,5)
};
--- a/commonservices/PlatformEnv/tsrc/platformenvtest/init/platformenvtest.ini Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/tsrc/platformenvtest/init/platformenvtest.ini Thu Jun 24 11:22:10 2010 +0100
@@ -1,8 +1,8 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/PlatformEnv/tsrc/platformenvtest/src/PlatformEnvTestCases.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -132,35 +132,35 @@
{
// To add new test cases, add new items to this array
//FUNCENTRY( PrintTest ),
- ENTRY( "[PLATFORMENV] PathTest", PathTest ),
- ENTRY( "[PLATFORMENV] GetPathTest", GetPathTest ),
- ENTRY( "[PLATFORMENV] GetRootPathTest", GetRootPathTest ),
- ENTRY( "[PLATFORMENV] GetFullPathTest", GetFullPathTest ),
- ENTRY( "[PLATFORMENV] PathTypeTest", PathTypeTest ),
- ENTRY( "[PLATFORMENV] GetListOfPathsTest", GetListOfPathsTest ),
- ENTRY( "[PLATFORMENV] GetDefaultDriveTest", GetDefaultDriveTest ),
- ENTRY( "[PLATFORMENV] GetDefaultDriveTest2", GetDefaultDriveTest2 ),
- ENTRY( "[PLATFORMENV] GetDriveStatusTest", GetDriveStatusTest ),
- ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest", GetUserVisibleDrivesTest ),
- ENTRY( "[PLATFORMENV] StripUserHiddenDrivesTest", StripUserHiddenDrivesTest ),
- ENTRY( "[PLATFORMENV] DriveCountTest", DriveCountTest ),
- ENTRY( "[PLATFORMENV] DriveArrayTest", DriveArrayTest ),
- ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest2", GetUserVisibleDrivesTest2 ),
+ ENTRY( "[PLATFORMENV] PathTest", &CPlatformEnvTest::PathTest ),
+ ENTRY( "[PLATFORMENV] GetPathTest", &CPlatformEnvTest::GetPathTest ),
+ ENTRY( "[PLATFORMENV] GetRootPathTest", &CPlatformEnvTest::GetRootPathTest ),
+ ENTRY( "[PLATFORMENV] GetFullPathTest", &CPlatformEnvTest::GetFullPathTest ),
+ ENTRY( "[PLATFORMENV] PathTypeTest", &CPlatformEnvTest::PathTypeTest ),
+ ENTRY( "[PLATFORMENV] GetListOfPathsTest", &CPlatformEnvTest::GetListOfPathsTest ),
+ ENTRY( "[PLATFORMENV] GetDefaultDriveTest", &CPlatformEnvTest::GetDefaultDriveTest ),
+ ENTRY( "[PLATFORMENV] GetDefaultDriveTest2", &CPlatformEnvTest::GetDefaultDriveTest2 ),
+ ENTRY( "[PLATFORMENV] GetDriveStatusTest", &CPlatformEnvTest::GetDriveStatusTest ),
+ ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest", &CPlatformEnvTest::GetUserVisibleDrivesTest ),
+ ENTRY( "[PLATFORMENV] StripUserHiddenDrivesTest", &CPlatformEnvTest::StripUserHiddenDrivesTest ),
+ ENTRY( "[PLATFORMENV] DriveCountTest", &CPlatformEnvTest::DriveCountTest ),
+ ENTRY( "[PLATFORMENV] DriveArrayTest", &CPlatformEnvTest::DriveArrayTest ),
+ ENTRY( "[PLATFORMENV] GetUserVisibleDrivesTest2", &CPlatformEnvTest::GetUserVisibleDrivesTest2 ),
- OOM_ENTRY( "[OOM_PLATFORMENV] PathTest", PathTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetPathTest", GetPathTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetRootPathTest", GetRootPathTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetFullPathTest", GetFullPathTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] PathTypeTest", PathTypeTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetListOfPathsTest", GetListOfPathsTest,ETrue,1,5 ),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest", GetDefaultDriveTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest2", GetDefaultDriveTest2 ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetDriveStatusTest", GetDriveStatusTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest", GetUserVisibleDrivesTest,ETrue,1,5 ),
- OOM_ENTRY( "[OOM_PLATFORMENV] StripUserHiddenDrivesTest", StripUserHiddenDrivesTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] DriveCountTest", DriveCountTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] DriveArrayTest", DriveArrayTest ,ETrue,1,5),
- OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest2", GetUserVisibleDrivesTest2 ,ETrue,1,5)
+ OOM_ENTRY( "[OOM_PLATFORMENV] PathTest", &CPlatformEnvTest::PathTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetPathTest", &CPlatformEnvTest::GetPathTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetRootPathTest", &CPlatformEnvTest::GetRootPathTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetFullPathTest", &CPlatformEnvTest::GetFullPathTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] PathTypeTest", &CPlatformEnvTest::PathTypeTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetListOfPathsTest", &CPlatformEnvTest::GetListOfPathsTest,ETrue,1,5 ),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest", &CPlatformEnvTest::GetDefaultDriveTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetDefaultDriveTest2", &CPlatformEnvTest::GetDefaultDriveTest2 ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetDriveStatusTest", &CPlatformEnvTest::GetDriveStatusTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest", &CPlatformEnvTest::GetUserVisibleDrivesTest,ETrue,1,5 ),
+ OOM_ENTRY( "[OOM_PLATFORMENV] StripUserHiddenDrivesTest", &CPlatformEnvTest::StripUserHiddenDrivesTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] DriveCountTest", &CPlatformEnvTest::DriveCountTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] DriveArrayTest", &CPlatformEnvTest::DriveArrayTest ,ETrue,1,5),
+ OOM_ENTRY( "[OOM_PLATFORMENV] GetUserVisibleDrivesTest2", &CPlatformEnvTest::GetUserVisibleDrivesTest2 ,ETrue,1,5)
// Example how to use OOM functionality
//OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3),
--- a/commonservices/activitymanager/group/activitymanager.mrp Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/activitymanager/group/activitymanager.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component activitymanager
source \sf\os\devicesrv\commonservices\activitymanager
binary \sf\os\devicesrv\commonservices\activitymanager\group all
Binary file commonservices/commonengine/conf/commonengine.confml has changed
Binary file commonservices/commonengine/conf/commonengine_1020503B.crml has changed
--- a/commonservices/sysutil/group/sysutil.mrp Fri May 28 14:18:28 2010 +0100
+++ b/commonservices/sysutil/group/sysutil.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component sysutil
source \sf\os\devicesrv\commonservices\sysutil
binary \sf\os\devicesrv\commonservices\sysutil\group all
--- a/devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_info/devicesrv_metadata/devicesrv_metadata.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component devicesrv_metadata
source \sf\os\devicesrv\devicesrv_info\devicesrv_metadata
source \sf\os\devicesrv\package_definition.xml
--- a/devicesrv_plat/accessory_key_event_handling_api/inc/RemConKeyEventData.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/accessory_key_event_handling_api/inc/RemConKeyEventData.h Thu Jun 24 11:22:10 2010 +0100
@@ -22,7 +22,9 @@
#define TREMCONKEYEVENTDATA_H
// INCLUDES
+#ifndef __KERNEL_MODE__
#include <e32std.h>
+#endif
// CONSTANTS
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiocontrolbase.h Thu Jun 24 11:22:10 2010 +0100
@@ -49,7 +49,7 @@
/**
* Destructor.
*/
- virtual ~CAccPolAudioControlBase();
+ IMPORT_C virtual ~CAccPolAudioControlBase();
/**
* Assign operator for audio control base class.
@@ -112,13 +112,13 @@
/**
* C++ default constructor.
*/
- CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
+ IMPORT_C CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
CAccPolObjectCon* aObject = NULL );
/**
* C++ default constructor.
*/
- CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
+ IMPORT_C CAccPolAudioControlBase( TTopologyConObjectType aObjectType,
TUint32 aChannel );
private:
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiounitbase.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolaudiounitbase.h Thu Jun 24 11:22:10 2010 +0100
@@ -37,7 +37,7 @@
/**
* Destructor.
*/
- virtual ~CAccPolAudioUnitBase();
+ IMPORT_C virtual ~CAccPolAudioUnitBase();
/**
* Assign operator for audio unit base class.
--- a/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolterminalbase.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/accessory_policy_usb_audio_api/inc/accpolterminalbase.h Thu Jun 24 11:22:10 2010 +0100
@@ -32,7 +32,7 @@
/**
* Destructor.
*/
- virtual ~CAccPolTerminalBase();
+ IMPORT_C virtual ~CAccPolTerminalBase();
/**
* Assign operator for audio terminal base class.
--- a/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectbase.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectbase.h Thu Jun 24 11:22:10 2010 +0100
@@ -38,7 +38,7 @@
/**
* Destructor.
*/
- virtual ~CAccPolObjectBase();
+ IMPORT_C virtual ~CAccPolObjectBase();
/**
* Sets the object type.
--- a/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectcon.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/accessory_policy_utility_api/inc/accpolobjectcon.h Thu Jun 24 11:22:10 2010 +0100
@@ -34,7 +34,7 @@
/**
* Destructor.
*/
- virtual ~CAccPolObjectCon();
+ IMPORT_C virtual ~CAccPolObjectCon();
/**
* Resets the object container.
--- a/devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/display_language_definition_api/inc/CommonEngineDomainCRKeys.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -41,4 +41,26 @@
**/
const TUint32 KGSDisplayTxtLang = 0x00000001;
+/**
+* Collation code, integer value
+*
+* Possible values are:
+* 0 (automatic)
+* Valid Symbian OS collation(language) code
+*
+* Default value: 0
+**/
+const TUint32 KGSCollation = 0x00000002;
+
+/**
+* Region code, integer value
+*
+* Possible values are:
+* 0 (automatic)
+* Valid Symbian OS region code
+*
+* Default value: 0
+**/
+const TUint32 KGSRegion = 0x00000003;
+
#endif // COMMONENGINEDOMAINCRKEYS_H
--- a/devicesrv_plat/tv_out_config_api/inc/tvoutconfig.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/tv_out_config_api/inc/tvoutconfig.h Thu Jun 24 11:22:10 2010 +0100
@@ -124,18 +124,18 @@
//-- Standby Figure ---------------------------------------------------
- /** Returns maximum size of TStandByFigure.iTable in bytes.
+ /** Returns maximum size of TStandByFigure.iTable in bytes. Deprecated since TB10.2.
@param aMaxFigureSize Max size of standByFigure in bytes
@return KErrNotSupported if not supported. */
virtual TInt StandByFigureMaxSizeInBytes(TUint& aMaxFigureSize) = 0;
- /** Sets user defined figure to show on tv.
+ /** Sets user defined figure to show on tv. Deprecated since TB10.2.
@pre SetConfig() is called without errors.
@param aStandByFigure TStandByFigure object.
@return KErrNone if all success */
virtual TInt StandByFigure(const TStandByFigure& aStandByFigure) = 0;
- /** Gets user defined figure to show on tv.
+ /** Gets user defined figure to show on tv. Deprecated since TB10.2.
@see CTvOutConfig::StandByFigureMaxSizeInBytes for getting size of TStandByFigure.iTable.
@pre StandByFigure() is called without errors.
@param aStandByFigure TStandByFigure object.
--- a/devicesrv_plat/tv_out_config_api/inc/tvoutconfigdef.h Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_plat/tv_out_config_api/inc/tvoutconfigdef.h Thu Jun 24 11:22:10 2010 +0100
@@ -431,11 +431,11 @@
///ETrue if iLeftTopCorner&iRightBottomCorner are used instead of iHorizontalOverScan&iVerticalOverScan
TBool iCornerPointsUsed;
- /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports overscan (0=underscan enabled)
+ /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports underscan (0=underscan enabled)
This should be "point" to active image area. Cannot point out of active image area.
Cannot across with iRightBottomCorner. And this allows overscan and position tuning. */
TPoint iLeftTopCorner;
- /** Overscan in pixels. Set Right Bottom corner point (offset from left top corner).
+ /** Overscan in pixels. Set Right Bottom corner point (offset from Tv's left top corner).
@see iLeftTopCorner
Driver returns KErrExtensionNotSupported if driver does not support this settings.
If driver supports centralizing only, then this has to be same as iLeftTopCorner. */
@@ -571,17 +571,18 @@
///Vertical sync polarity, EFalse=Negative, ETrue=Positive. With CEA mode 1 this is EFalse.
TBool iVerticalSyncPolarity;
/** Wanted pixel repeat, can be used if mode supports. Otherwise horisontal resolution can be increased also.
+ Value minus one. 0 -> sent once. 9 -> pixel sent 10 times.
0 when repeat is disabled. With CEA mode 1 this is 0. */
TUint8 iPixelRepeat;
/** ETrue if Tv supports underscan, and it is enabled (to be always enabled when supported/possible),
EFalse otherwise */
TBool iUnderscanEnabled;
- /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports overscan (0=underscan enabled)
+ /** Overscan in pixels. Set Left Top corner point. Zero when Tv supports underscan (0=underscan enabled)
This should be "point" to active image area. Cannot point out of active image area.
Cannot across with iRightBottomCorner. And this allows overscan and position tuning. */
TPoint iLeftTopCorner;
- /** Overscan in pixels. Set Right Bottom corner point (offset from left top corner).
+ /** Overscan in pixels. Set Right Bottom corner point (offset from Tv's left top corner).
@see iLeftTopCorner. Has not affect if iCentralizingOnly==ETrue. */
TPoint iRightBottomCorner;
@@ -614,7 +615,13 @@
};
/**
-Standby Figure Format
+Standby Figure Format. Fully deprecated since TB10.2.
+Note for TB9.2 and TB10.1:
+- iLeftTopColumn & iLeftTopRow are deprecated and those can be ignored.
+- the icon of iColumns x iRows is scaled by (iScaleNumeratorWidth/iScaleDenominatorWidth) and (iScaleNumeratorHeight/iScaleDenominatorHeight)
+- the resulting icon is centered to the layer's extent which contained the protected surface
+- the scaled and centered icon is clipped against layer extent and screen size.
+- pixels inside the layer's extent not covered by the scaled and centered icon are filled with iBackGroundColor.
*/
class TStandByFigure
{
@@ -659,9 +666,9 @@
TUint16 iScaleNumeratorHeight;
///Height scaler denominator
TUint16 iScaleDenominatorHeight;
- ///Start column
+ ///Start column. Deprecated!
TUint16 iLeftTopColumn;
- ///Start row
+ ///Start row. Deprecated!
TUint16 iLeftTopRow;
///Back ground color. Input RGB565 RRRR RGGG GGGB BBBB.
TUint16 iBackGroundColor;
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caged_locations.mk Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caged_locations.mk Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
@@ -44,4 +44,5 @@
DC_BOOTDATA_DIR=\resource\bootdata
DC_SKINS_DIR=\private\10207114
+DC_QT_TRANSLATIONS_DIR=\resource\qt\translations
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_path_literals.hrh Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_path_literals.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -58,6 +58,7 @@
_LIT(KDC_WINDOW_SERVER_INI_DIR,"\\private\\10003b20\\"); // Window server INI
_LIT(KDC_SKINS_DIR,"\\private\\10207114\\"); // Skins
_LIT(KDC_BOOTDATA_DIR,"\\resource\\bootdata\\"); // Bootdata
+_LIT(KDC_QT_TRANSLATIONS_DIR,"\\resource\\qt\\translations\\"); //Qt Localization
#endif
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths.hrh Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -57,6 +57,7 @@
#define WINDOW_SERVER_INI_DIR private/10003b20
#define SKINS_DIR private/10207114
#define BOOTDATA_DIR resource/bootdata
+#define QT_TRANSLATIONS_DIR resource/qt/translations
#endif
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_for_iby.hrh Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_for_iby.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -57,7 +57,7 @@
define WINDOW_SERVER_INI_DIR private/10003b20
define SKINS_DIR private/10207114
define BOOTDATA_DIR resource/bootdata
-
+define QT_TRANSLATIONS_DIR resource/qt/translations
#endif
--- a/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_strings.hrh Fri May 28 14:18:28 2010 +0100
+++ b/devicesrv_pub/common_platform_security_definitions_api/inc/data_caging_paths_strings.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -57,5 +57,6 @@
#define WINDOW_SERVER_INI_DIR "\\private\\10003b20"
#define SKINS_DIR "\\private\\10207114"
#define BOOTDATA_DIR "\\resource\\bootdata"
+#define QT_TRANSLATIONS_DIR "\\resource\\qt\\translations"
#endif
--- a/hwrmhaptics/hapticseffectdatagetterfw/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/hwrmhaptics/hapticseffectdatagetterfw/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -22,7 +22,6 @@
PRJ_EXPORTS
-#include "../plugins/hapticsivtgetterplugin/group/bld.inf"
PRJ_MMPFILES
hwrmhapticseffectdatagetterfw.mmp
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/data/20021204.rss Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Haptics effect data getter plugin ECom resource file
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x20021204;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x20021202;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x20021203;
- version_no = 1;
- display_name = "";
- default_data = "";
- opaque_data = "";
- }
- };
- }
- };
- }
-
-// End of file
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build file for effect data getter ECom plugin.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../rom/hwrmhapticsivtgetterplugin.iby CORE_OS_LAYER_IBY_EXPORT_PATH(hwrmhapticsivtgetterplugin.iby)
-
-PRJ_MMPFILES
-hwrmhapticsivtgetterplugin.mmp
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group/hwrmhapticsivtgetterplugin.mmp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for effect data getter ECom plugin.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET hwrmhapticsivtgetterplugin.dll
-TARGETTYPE PLUGIN
-UID 0x10009D8D 0x20021204
-
-CAPABILITY CAP_ECOM_PLUGIN
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE hwrmhapticsivtgetter.cpp
-SOURCE basisivtgetters.cpp
-SOURCE ivthelper.cpp
-SOURCE timelineivtgetters.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../../../inc
-
-// Default system include paths for osext layer modules.
-OS_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/stdapis
-
-SOURCEPATH ../data
-START RESOURCE 20021204.rss
-TARGETPATH ECOM_RESOURCE_DIR
-TARGET hwrmhapticsivtgetterplugin.rsc
-END
-
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY estlib.lib
-LIBRARY ecom.lib
-LIBRARY hwrmhapticseffectdatagetterfw.lib
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/basisivtgetters.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Basis effect internal getters header file.
-*
-*/
-
-#ifndef BASISIVTGETTERS_H
-#define BASISIVTGETTERS_H
-
-
-#include "ivtinternal.h"
-
-
-/**
- * Utility class for getting various basis effect specific information
- * from data buffer.
- */
-class BasisIVTGetters
- {
-public:
-
- /**
- * Method for getting basis effect properties.
- *
- * @param aMsg Pointer to the data buffer containing the
- * effect definition.
- * @param aDuration Duration of the effect (out param).
- * @param aStartDelay Start delay of the effect (out param).
- * @param aMagnitude Magnitude of the effect (out param).
- * @param aStartFlag Start flag of the effect (out param).
- * @param aType Type of the effect (out param).
- * @param aFreqPer Period of the effect (out param).
- * @param aControlMode Control mode of the effect (out param).
- */
- static void VibeIVTGetPeriodic(
- const TUint8* aMsg,
- TVibeIVTMessageTime* aDuration,
- TVibeIVTMessageTime* aStartDelay,
- TVibeIVTMagnitude* aMagnitude,
- TInt* aStartFlag,
- TInt* aType,
- TVibeIVTFreqPer* aFreqPer,
- TInt* aControlMode );
-
- /**
- * Method for getting basis effect modifier (envelope) properties.
- *
- * @param aMsg Pointer to the data buffer containing the
- * effect definition.
- * @param aImpulseTime Impulse (attack) time of the effect
- * (out param).
- * @param aFadeTime Fade time of the effect (out param).
- * @param aImpulseLevel Impulse (attack) level of the effect
- * (out param).
- * @param aFadeLevel Fade level of the effect (out param).
- */
- static void VibeIVTGetPeriodicModifier(
- const TUint8* aMsg,
- TVibeIVTMessageTime* aImpulseTime,
- TVibeIVTMessageTime* aFadeTime,
- TVibeIVTMagnitude* aImpulseLevel,
- TVibeIVTMagnitude* aFadeLevel );
-
-};
-
-#endif /* BASISIVTGETTERS_H */
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/hwrmhapticsivtgetter.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Plugin for reading effect information from IVT effect data.
-*
-*/
-
-#ifndef C_HWRMHAPTICSIVTGETTER_H
-#define C_HWRMHAPTICSIVTGETTER_H
-
-#include <e32base.h>
-
-#include <hwrmhapticseffectdatagetter.h>
-#include "ivtinternal.h"
-
-/**
- * Ecom plugin for getting haptics ivt data.
- *
- * @lib hapticsivtgetterplugin.lib
- * @since S60 5.1
- */
-NONSHARABLE_CLASS( CHWRMHapticsIVTGetter ): public CHWRMHapticsEffectDataGetter
- {
-public:
-
- /**
- * 2-phased constructor.
- * @return An instance of haptics ivt getter.
- */
- static CHWRMHapticsIVTGetter* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CHWRMHapticsIVTGetter();
-
-public: // From CHWRMHapticsEffectDataGetter
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetEffectCount( const TDesC8& aData, TInt& aCount );
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetEffectName( const TDesC8& aData,
- TInt aEffectIndex,
- TDes8& aEffectName );
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetEffectIndexFromName( const TDesC8& aData,
- const TDesC8& aEffectName,
- TInt& aEffectIndex );
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetEffectType( const TDesC8& aData,
- TInt aEffectIndex,
- TInt& aEffectType );
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetMagSweepEffectDefinition(
- const TDesC8& aData,
- TInt aEffectIndex,
- CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect );
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetPeriodicEffectDefinition(
- const TDesC8& aData,
- TInt aEffectIndex,
- CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect );
-
- /**
- * @see CHWRMHapticsEffectDataGetter
- */
- TInt GetEffectDuration( const TDesC8& aData,
- TInt aEffectIndex,
- TInt& aEffectDuration );
-
-private:
-
- /**
- * Constructor.
- */
- CHWRMHapticsIVTGetter();
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
-private:
-
- /**
- * Utility method for fetching the effect definition using effect data
- * and index.
- */
- TInt GetEffectByIndex( const TDesC8& aData,
- TInt aEffectIndex,
- TVibeEffectDefinition* aEffectDefinition );
-
- };
-
-
-#endif // C_HWRMHAPTICSIVTGETTER_H
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivtconstants.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: VibeTonz related const definitions header file
-*
-*/
-
-#ifndef _HWRMHAPTICSIVTCONSTANTS_H
-#define _HWRMHAPTICSIVTCONSTANTS_H
-
-#include <e32def.h>
-#include <limits.h>
-
-/**
- * Invalid index constant
- */
-const TInt KVibeInvalidIndex = -1;
-
-/**
- * Maximum effect name length constant
- */
-const TInt KVibeMaxEffectNameLength = 128; // Maximum effect name length
-
-/**
- * 'Infinite' time
- */
-const TInt KVibeTimeInfinite = INT_MAX;
-
-/**
- * 'Infinite' repeat count value
- */
-const TUint8 KVibeRepeatCountInfinite = 255;
-
-
-
-#endif // _HWRMHAPTICSIVTCONSTANTS_H
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivthelper.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IVT effect getter methods high level helper functions header file.
-*
-*/
-
-#ifndef IVTHELPER_H
-#define IVTHELPER_H
-
-#include "ivtinternal.h"
-
-/**
- * Utility class for parsing various information from effect data buffer.
- */
-class IVTHelper
- {
-public:
- /**
- * Method for checking that the IVT header is correctly formatted.
- * (This includes also version number check).
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return ETrue if header is correctly formatted, EFalse otherwise.
- */
- static TBool IsValidIVTAddress( const TUint8* aIVT );
-
- /**
- * Method for getting number of effects within an effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Number (count) of effects contained within the effect data
- * buffer.
- */
- static TUint16 GetNumEffects( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the sub-buffer (from the
- * effect data buffer containing possibly several effect definitions)
- * that contains effect definition of the given effect.
- *
- * @param aIVT Pointer to the effect data buffer.
- * @param aEffectIndex Index of the effect (within the effect data
- * buffer).
- *
- * @return Pointer to the effect definition sub-buffer. In case of
- * any error, NULL is returned.
- */
- static TUint8* GetEffectStorage( const TUint8* aIVT, TInt aEffectIndex );
-
- /**
- * Method for extracting envelope (attack and fade times and levels) from
- * a buffer of effect-specific data. I.e., this is given an address to the
- * effect specific part in effect data buffer, not the whole effect data
- * buffer. The aPacket param can be obtained e.g. by first calling the
- * above GetEffectStorage method.
- *
- * @param aPacket Pointer to effect specific data (sub-)buffer.
- * @param aEnvelope Pointer to a TVibeEnvelopeParams structure to which
- * the envelope params are read.
- *
- * @return ETrue on success, EFalse otherwise.
- */
- static TBool ExtractEnvelopeFromPacket(
- const TUint8* aPacket,
- TVibeEnvelopeParams* aEnvelope );
-
- /**
- * Method for extracting effect definition from a buffer of effect-
- * specific data. I.e., this is given an address to the effect-specific
- * part in effect data buffer, not the whole effect data
- * buffer. The aPacket param can be obtained e.g. by first calling the
- * above GetEffectStorage method.
- *
- * @param aPacket Pointer to effect specific data (sub-)buffer.
- * @param aEffectDefinition Pointer to a TVibeEffectDefinition structure
- * to which the effect definition params are
- * read.
- * @param aPeriodicType The type of the effect (basis vs timeline) is
- * written to the TInt located in this address.
- *
- * @return ETrue on success, EFalse otherwise.
- */
- static TBool ExtractEffectDefinitionFromPacket(
- const TUint8* aPacket,
- TVibeEffectDefinition* aEffectDefinition,
- TInt* aPeriodicType );
-
- /**
- * Method for getting the effect name data sub-buffer address.
- *
- * @param aIVT Pointer to the effect data buffer.
- * @param aEffectIndex Index of the effect (within the effect data
- * buffer) which name data is queried.
- *
- * @return Pointer to the (sub-)buffer containing the effect name data.
- * In case of error, returns NULL pointer.
- */
- static TUint8* GetEffectNameData( const TUint8* aIVT, TInt aEffectIndex );
-
- /**
- * Method for getting the effect duration.
- *
- * @param aIVT Pointer to the effect data buffer.
- * @param aEffectIndex Index of the effect (within the effect data
- * buffer) which duration is queried.
- *
- * @return Duration of the effect.
- * In case of error, one of Vibe error codes.
- */
- static TInt GetIVTEffectDuration( const TUint8* aIVT, TInt aEffectIndex );
-
-private:
-
- /**
- * Internal structure for repeat bar.
- * iEvent not owned.
- */
- struct TVibeRepeatBar
- {
- TInt iTimeOffsetEnd;
- TInt iTimeDuration;
- TVibeIVTCount iCount;
- const TUint8* iEvent;
- };
-
- /**
- * Structure for timeline effect information
- * None of the pointer members are owned.
- */
- struct TVibeTimeLineInfo
- {
- TVibeRepeatBar iRepeatBarStack[KRepeatBarStackMaxSize];
- TInt iRepeatBarStackTop;
- TUint8* iOffsetSubBlock;
- TUint8* iDataSubBlock;
- const TUint8* iNextEvent;
- TInt iTimeAllEffectsEnd;
- // all events times offest are relative to this time
- // when computing effect end time
- TInt iTimeOffsetZero;
- TInt iTimeRepeat;
- TInt iTimeEvent;
- };
-
- /**
- * Method for getting the IVT header from effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the IVT header.
- */
- static TVibeIVTHeader* GetIVTHeader( const TUint8* aIVT );
-
- /**
- * Method for checking if the given effect data buffer contains any effect
- * definitions or not.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return ETrue if the buffer contains effect definition, EFalse otherwise.
- */
- static TBool IsEmpty( const TUint8* aIVT);
-
- /**
- * Method for getting storage block size from effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Storage block size.
- */
- static TUint16 GetStorageBlockSize( const TUint8* aIVT );
-
- /**
- * Method for getting name block size from effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Name block size.
- */
- static TUint16 GetNameBlockSize( const TUint8* aIVT );
-
- /**
- * Method for checking if the given effect data buffer contains any effect
- * name block(s) or not.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return ETrue if the buffer contains effect name block(s), EFalse otherwise.
- */
- static TBool HasNameBlock( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the storage block within the
- * effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the start of the storage block. In case of error
- * returns NULL.
- */
- static TUint8* GetStorageBlock( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the storage offset subblock
- * within the effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the start of the storage offset subblock.
- * In case of error returns NULL.
- */
- static TUint8* GetStorageOffsetSubBlock( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the storage data subblock
- * within the effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the start of the storage data subblock.
- * In case of error returns NULL.
- */
- static TUint8* GetStorageDataSubBlock( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the name block within the
- * effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the start of the name block. In case of error
- * returns NULL.
- */
- static TUint8* GetNameBlock( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the name offset subblock
- * within the effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the start of the name offset subblock.
- * In case of error returns NULL.
- */
- static TUint8* GetNameOffsetSubBlock( const TUint8* aIVT );
-
- /**
- * Method for getting the start address of the name data subblock
- * within the effect data buffer.
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Pointer to the start of the name data subblock.
- * In case of error returns NULL.
- */
- static TUint8* GetNameDataSubBlock( const TUint8* aIVT );
-
- /**
- * Method for getting size of the effect data buffer (as calculated
- * from the header fields).
- *
- * @param aIVT Pointer to the effect data buffer.
- *
- * @return Size of the effect data buffer.
- */
- static TUint GetIVTSize( const TUint8* aIVT );
-
- /**
- * Method for converting firmware representation of magnitude to the
- * one used in user interface (i.e., returned by various magnitude
- * getters).
- *
- * @param aFwMagnitude Magnitude in firmware representation.
- *
- * @return Magnitude as seen by users.
- */
- static TInt ConvertToUserMagnitude( TInt aFwMagnitude );
-
- /**
- * Method for converting firmware representation of duration to the
- * one used in user interface (i.e., returned by various duration
- * getters).
- *
- * @param aFwDuration Duration in firmware representation.
- *
- * @return Duration as seen by users.
- */
- static TInt ConvertToUserDuration( TVibeIVTMessageTime aFwDuration );
-
- /**
- * Method for converting firmware representation of frequency period to
- * the one used in user interface (i.e., returned by various frequency
- * period getters).
- *
- * @param aFwFrequency Frequency period in firmware representation.
- *
- * @return Frequency period as seen by users.
- */
- static TInt ConvertToUserFrequency( TVibeIVTFreqPer aFwFrequency );
-
- /**
- * Helper method for processing Launch Playback events when calculating
- * timeline effect's duration.
- *
- * @param Pointer to a timeline info structure which is to be processed.
- *
- * @return KVibeStatusSuccess in case of successful processing, otherwise
- * one of Vibe error statuses.
- */
- static TInt TimelineDurationProcessEvent(
- TVibeTimeLineInfo* aTimelineInfo );
-
- /**
- * Helper method for processing Repeat Bar events when calculating
- * timeline effect's duration.
- *
- * @param Pointer to a timeline info structure which is to be processed.
- *
- * @return KVibeStatusSuccess in case of successful processing, otherwise
- * one of Vibe error statuses.
- */
- static TInt TimelineDurationProcessRepeatInStack(
- TVibeTimeLineInfo* aTimelineInfo );
- };
-
-#endif /* IVTHELPER_H */
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/ivtinternal.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,336 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Basis and timeline effects related constant, macro and function
-* prototype definition header file.
-*/
-
-#ifndef _HWRMHAPTICSVIBEIVTINTERNAL_H
-#define _HWRMHAPTICSVIBEIVTINTERNAL_H
-
-
-#include "ivtconstants.h"
-
-/**
- * A few typedefs for internal Vibe (integer) types
- */
-
-typedef TUint16 TVibeIVTMessageTime;
-typedef TUint16 TVibeIVTEffectID;
-typedef TUint8 TVibeIVTOverrideFlags;
-typedef TInt8 TVibeIVTMagnitude;
-typedef TUint16 TVibeIVTFreqPer;
-typedef TUint8 TVibeIVTCount;
-
-/**
- * Number of bytes in a basis effect message
- */
-const TInt KVibeIvtMessageSize = 8;
-
-/**
- * Basis effect message types
- */
-const TUint8 KVibeMessageTypeSetPeriodic = 2;
-const TUint8 KVibeMessageTypeSetPeriodicModifier = 3;
-
-/**
- * Periodic type constants. MagSweep effects use KVibePeriodicTypeConstant
- * and Periodic effects KVibePeriodicTypeSquare.
- * Others are reserved for future developement.
- */
-const TInt KVibePeriodicTypeConstant = 0;
-const TInt KVibePeriodicTypeSquare = 1;
-const TInt KVibePeriodicTypeTriangle = 2; // For future dev
-const TInt KVibePeriodicTypeSine = 3; // For future dev
-const TInt KVibePeriodicTypeSawtooth = 4; // For future dev
-const TInt KVibePeriodicTypeInvertedSawtooth = 5; // For future dev
-
-/**
- * Timeline effect message property types
- */
-const TUint8 KVibeIvtPropertyTypeLaunchPlayback = 0xf1;
-const TUint8 KVibeIvtPropertyTypeRepeatBar = 0xf2;
-const TUint8 KVibeIvtPropertyTypeEndOfList = 0xff;
-const TUint8 KVibeIvtPropertyTypeEffectIdU8 = 0xe0;
-const TUint8 KVibeIvtPropertyTypeEffectIdU16 = 0xe1;
-const TUint8 KVibeIvtPropertyTypeTimeOffsetU16 = 0xe2;
-const TUint8 KVibeIvtPropertyTypeTimeOffsetU24 = 0xe3;
-const TUint8 KVibeIvtPropertyTypeTimeOffsetU32 = 0xe4;
-const TUint8 KVibeIvtPropertyTypeCountU8 = 0xe5;
-const TUint8 KVibeIvtPropertyTypeDurationMsU16 = 0xd0;
-const TUint8 KVibeIvtPropertyTypeMagnitudeS8 = 0xd1;
-const TUint8 KVibeIvtPropertyTypeFreqPeriodU16 = 0xd2;
-
-/**
- * Override flags
- */
-const TUint8 KVibeIvtOverrideFlagDuration = ( 1 << 0 );
-const TUint8 KVibeIvtOverrideFlagMagnitude = ( 1 << 1 );
-const TUint8 KVibeIvtOverrideFlagFreqPeriod = ( 1 << 2 );
-
-/**
- * Style mask
- */
-// #define VIBE_STYLE_MASK 0x0F
-const TInt KVibeStyleMask = 0x0f;
-
-/**
- * Wave type bit shift value and mask
- */
-const TInt KVibeWavetypeShift = 4;
-const TInt KVibeWavetypeMask = 0xf0;
-
-/**
- * Const for repeat bar stack size
- */
-const TInt KRepeatBarStackMaxSize = 4;
-
-/**
- * Couple of firmware (IVT player) specific constants
- */
-const TInt KVibeFirmwareTimeInfinite = 0xFFFF;
-const TInt KVibeMaxFirmwareMagnitude = 127;
-/**
- * General macro for extracting bits from buffer (pointed by p) with mask (m)
- * and then shifting right with given shift (s) value
- */
-#define VIBE_GET_BIT_FIELD(p,m,s) \
- ( ( *( p ) & ( m ) ) >> ( s ) )
-
-/**
- * Basis effect macros for extracting values from IVT buffer
- */
-#define VIBE_IVT_GET_MESSAGE_TYPE(p) \
- VIBE_GET_BIT_FIELD(p, 0xf0, 4)
-
-#define VIBE_IVT_GET_PERIODIC_DURATION(p) \
- ( ( ( ( VIBE_GET_BIT_FIELD( ( p ) + 1, 0xff, 0 ) ) | \
- ( VIBE_GET_BIT_FIELD( ( p ) + 2, 0x0f, 0 ) << 8 ) ) << 4 ) | \
- ( VIBE_GET_BIT_FIELD( ( p ) + 7, 0xf0, 4 ) ) )
-
-#define VIBE_IVT_GET_PERIODIC_START_DELAY(p) \
- ( VIBE_GET_BIT_FIELD( ( p ) + 2, 0xf0, 0 ) | \
- ( VIBE_GET_BIT_FIELD( ( p ) + 3, 0xff, 0 ) << 4 ) )
-
-#define VIBE_IVT_GET_PERIODIC_MAGNITUDE(p) \
- VIBE_GET_BIT_FIELD( ( p ) + 4, 0x7f, 0 )
-
-#define VIBE_IVT_GET_PERIODIC_START_FLAG(p) \
- VIBE_GET_BIT_FIELD( ( p ) + 4, 0x80, 7 )
-
-#define VIBE_IVT_GET_PERIODIC_TYPE(p) \
- VIBE_GET_BIT_FIELD( ( p ) + 5, 0x0f, 0 )
-
-#define VIBE_IVT_GET_PERIODIC_CONTROLMODE(p) \
- VIBE_GET_BIT_FIELD( ( p ) + 7, 0x0f, 0 )
-
-#define VIBE_IVT_GET_PERIODIC_FREQPER(p) \
- ( VIBE_GET_BIT_FIELD( ( p ) + 5, 0xf0, 4 ) | \
- ( VIBE_GET_BIT_FIELD( ( p ) + 6, 0xff, 0 ) << 4 ) )
-
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_TIME(p) \
- ( VIBE_GET_BIT_FIELD( ( p ) + 1, 0xff, 0 ) | \
- ( VIBE_GET_BIT_FIELD( (p ) + 2, 0x3f, 0 ) << 8 ) )
-
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_TIME(p) \
- ( VIBE_GET_BIT_FIELD( ( p ) + 3, 0xff, 0 ) | \
- ( VIBE_GET_BIT_FIELD( ( p ) + 4, 0x3f, 0 ) << 8 ) )
-
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_LEVEL(p) \
- VIBE_GET_BIT_FIELD( ( p ) + 5, 0x7f, 0 )
-
-#define VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_LEVEL(p) \
- VIBE_GET_BIT_FIELD( ( p ) + 6, 0x7f, 0 )
-
-/**
- * Timeline effect specific macro
- */
-#define VIBE_IVT_IS_OVERRIDE(p) \
- ( 0xd0 == ( *( p ) & 0xf0 ) )
-
-/**
- * Macros to determine effect type macros */
-#define VIBE_IVT_IS_BASIS_EFFECT(p) \
- ( 0 == ( 0x0f & *( p ) ) )
-
-#define VIBE_IVT_IS_TIMELINE_EFFECT(p) \
- ( 0xf0 == ( 0xf0 & *( p ) ) )
-
-/**
- * Structure for IVT header
- */
-struct TVibeIVTHeader
- {
- /**
- * IVT file format major version. (In current version: 0x1)
- */
- TUint8 iVersionMajor;
-
- /**
- * IVT file format major version. (In current version: 0x0)
- */
- TUint8 iVersionMinor;
-
- /**
- * Lower byte of Number of effects (within the IVT data)
- */
- TUint8 iEffects_0_7;
-
- /**
- * Upper byte of Number of effects (within the IVT data)
- */
- TUint8 iEffects_8_15;
-
- /**
- * Lower byte of effect storage block size
- */
- TUint8 iEffectStorageBlockSize_0_7;
-
- /**
- * Upper byte of effect storage block size
- */
- TUint8 iEffectStorageBlockSize_8_15;
-
- /**
- * Lower byte of effect name block size
- */
- TUint8 iEffectNameBlockSize_0_7;
-
- /**
- * Upper byte of effect name block size
- */
- TUint8 iEffectNameBlockSize_8_15;
- };
-
-/**
- * Structure for effect's envelope parameters (attack and fade params)
- */
-struct TVibeEnvelopeParams
- {
- /**
- * Magnitude at the start of the envelope
- */
- TInt iAttackLevel;
-
- /**
- * Time to reach the sustain level, in milliseconds
- */
- TInt iAttackTime;
-
- /**
- * Magnitude at the end of the envelope
- */
- TInt iFadeLevel;
-
- /**
- * Time to reach the fade level, in milliseonds
- */
- TInt iFadeTime;
- };
-
-/**
- * Stucture for Periodic effect definition.
- */
-struct TVibePeriodicEffectDefinition
- {
- /**
- * Type (bitmasked Wave Type) of the effect
- */
- TInt iType;
-
- /**
- * Magnitude of the effect
- */
- TInt iMagnitude;
-
- /**
- * Period of the effect
- */
- TInt iPeriod;
-
- /**
- * Envelope params of the effect
- */
- TVibeEnvelopeParams iEnvelope;
- };
-
-/**
- * Stucture for MagSweep effect definition.
- */
-struct TVibeMagSweepEffectDefinition
- {
- /**
- * Magnitude of the effect
- */
- TInt iMagnitude;
-
- /**
- * Envelope params of the effect
- */
- TVibeEnvelopeParams iEnvelope;
- };
-
-/**
- * Union that contains either Periodic or MagSweep effect definition
- */
-union TVibeEffectDefTypeParams
- {
- /**
- * Periodic effect definition
- */
- TVibePeriodicEffectDefinition iPeriodicEffectDefinition;
-
- /**
- * MagSweep effect definition
- */
- TVibeMagSweepEffectDefinition iMagSweepEffectDefinition;
- };
-
-/**
- * Structure for common effect parameters
- */
-struct TVibeEffectCommonParams
- {
- /**
- * Type of the effect
- */
- TInt iEffectType;
-
- /**
- * Playing duration of the effect in milliseconds
- */
- TInt iDuration;
-
- /**
- * Control mode (a.k.a. Style) of the effect
- */
- TInt iControlMode;
- };
-
-/**
- * Structure for complete effect definition
- */
-struct TVibeEffectDefinition
- {
- /**
- * Common effect parameters (a structure)
- */
- TVibeEffectCommonParams iEffectCommonParams;
-
- /**
- * Effect type specific parameters (an union)
- */
- TVibeEffectDefTypeParams iEffectTypeParams;
- };
-
-#endif /* _HWRMHAPTICSVIBEIVTINTERNAL_H */
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/inc/timelineivtgetters.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Timeline effect internal getters header file.
-*
-*/
-
-#ifndef TIMELINEIVTGETTERS_H
-#define TIMELINEIVTGETTERS_H
-
-
-#include "ivtinternal.h"
-
-/**
- * Utility class for getting various timeline effect specific information
- * from data buffer.
- */
-class TimelineIVTGetters
- {
-public:
- /**
- * Method for getting the effect Id from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the Id is read) and sets the pointer to next
- * position.
- *
- * @param aProp Pointer to the current position in effect data buffer
- * @param aPProp Double pointer to which new position in effect data
- * buffer is written (out param).
- *
- * @return Id of the effect (that is in current position of the effect
- * data buffer).
- */
- static TVibeIVTEffectID VibeIVTGetEffectID( const TUint8* aProp,
- const TUint8** aPProp );
-
- /**
- * Method for getting the effect time offset from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the time offset is read) and sets the pointer
- * to next position.
- *
- * @param aProp Pointer to the current position in effect data buffer
- * @param aPProp Double pointer to which new position in effect data
- * buffer is written (out param).
- *
- * @return Time offset of the effect (that is in current position of
- * the effect data buffer).
- */
- static TInt VibeIVTGetTimeOffset( const TUint8* aProp,
- const TUint8** aPProp );
-
- /**
- * Method for getting the count value from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the count is read) and sets the pointer to next
- * position.
- *
- * @param aProp Pointer to the current position in effect data buffer
- * @param aPProp Double pointer to which new position in effect data
- * buffer is written (out param).
- *
- * @return Count value (that is in current position of the effect
- * data buffer).
- */
- static TVibeIVTCount VibeIVTGetCount( const TUint8* aProp,
- const TUint8** aPProp );
-
- /**
- * Method for getting the effect duration from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the duration is read) and sets the pointer to next
- * position.
- *
- * @param aProp Pointer to the current position in effect data buffer
- * @param aPProp Double pointer to which new position in effect data
- * buffer is written (out param).
- *
- * @return Duration of the effect (that is in current position of the
- * effect data buffer).
- */
- static TVibeIVTMessageTime VibeIVTGetDuration( const TUint8* aProp,
- const TUint8** aPProp );
-
- /**
- * Method for getting the effect magnitude from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the magnitude is read) and sets the pointer to next
- * position.
- *
- * @param aProp Pointer to the current position in effect data buffer
- * @param aPProp Double pointer to which new position in effect data
- * buffer is written (out param).
- *
- * @return Magnitude of the effect (that is in current position of the
- * effect data buffer).
- */
- static TVibeIVTMagnitude VibeIVTGetMagnitude(
- const TUint8* aProp,
- const TUint8** aPProp );
-
- /**
- * Method for getting the effect frequency period from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the frequency period is read) and sets the pointer
- * to nextposition.
- *
- * @param aProp Pointer to the current position in effect data buffer.
- * @param aPProp Double pointer to which new position in effect data
- * buffer is written (out param).
- *
- * @return Frequency period of the effect (that is in current position of
- * the effect data buffer).
- */
- static TVibeIVTFreqPer VibeIVTGetFreqPer( const TUint8* aProp,
- const TUint8** aPProp );
-
- /**
- * Method for getting the event time offset from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the event offset is read).
- *
- * @param aProp Pointer to the current position in effect data buffer
- *
- * @return Time offset of the event (that is in current position of
- * the effect data buffer). Time unit depends on the given data.
- */
- static TInt VibeIVTGetEventTimeOffset( const TUint8* aProp );
-
-private:
-
- /**
- * Method for getting the override values from effect data buffer.
- * Takes pointer to the current position in effect data buffer (i.e.,
- * position from which the overrides are read) and sets the pointer
- * to next position.
- *
- * @param aProp Pointer to the current position in effect data
- * buffer.
- * @param aOverrideFlags Override flags are read into this (out) param.
- * @param aDuration Override duration is read into this (out) param.
- * @param aMagnitude Override magnitude is read into this (out) param.
- * @param aFreqPer Override frequency period is read into this (out)
- * param.
- * @param aPProp Double pointer to which new position in effect
- * data buffer is written (out param).
- *
- */
- static void VibeIVTGetOverrides( const TUint8* aProp,
- TVibeIVTOverrideFlags* aOverrideFlags,
- TVibeIVTMessageTime* aDuration,
- TVibeIVTMagnitude* aMagnitude,
- TVibeIVTFreqPer* aFreqPer,
- const TUint8** aPProp );
-
- /**
- * Method for getting the launch playback event time offset from effect
- * data buffer.
- *
- * @param aProp Pointer to the current position in effect data buffer.
- *
- * @return The time offset of the launch playback event. Time unit
- * depends on the given data.
- */
- static TInt VibeIVTGetLaunchPlaybackEventTimeOffset(
- const TUint8* aProp );
-
- /**
- * Method for getting the repeat bar event time offset from effect
- * data buffer.
- *
- * @param aProp Pointer to the current position in effect data buffer.
- *
- * @return The time offset of the repeat bar event. Time unit
- * depends on the given data.
- */
- static TInt VibeIVTGetRepeatBarEventTimeOffset( const TUint8* aProp );
- };
-
-#endif /* TIMELINEIVTGETTERS_H*/
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/rom/hwrmhapticsivtgetterplugin.iby Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IBY file for effect data getter ECom plugin.
-*
-*/
-
-#ifndef HAPTICSIVTGETTERPLUGIN_IBY
-#define HAPTICSIVTGETTERPLUGIN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-ECOM_PLUGIN(hwrmhapticsivtgetterplugin.dll, hwrmhapticsivtgetterplugin.rsc)
-
-#endif // HAPTICSIVTGETTERPLUGIN_IBY
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/basisivtgetters.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IVT effect get functions' high level helper functions
-* (for basis effects) implementation file.
-*/
-
-#include "basisivtgetters.h"
-
-// ---------------------------------------------------------------------------
-// Gets the periodic effect data from the effect data buffer to which pointer
-// is given as argument.
-// ---------------------------------------------------------------------------
-//
-void BasisIVTGetters::VibeIVTGetPeriodic(
- const TUint8* aMsg,
- TVibeIVTMessageTime* aDuration,
- TVibeIVTMessageTime* aStartDelay,
- TVibeIVTMagnitude* aMagnitude,
- TInt* aStartFlag,
- TInt* aType,
- TVibeIVTFreqPer* aFreqPer,
- TInt* aControlMode )
- {
- if ( aMsg )
- {
- if ( aDuration )
- {
- *aDuration = VIBE_IVT_GET_PERIODIC_DURATION( aMsg );
- }
- if ( aStartDelay )
- {
- *aStartDelay = VIBE_IVT_GET_PERIODIC_START_DELAY( aMsg );
- }
- if ( aMagnitude )
- {
- *aMagnitude = VIBE_IVT_GET_PERIODIC_MAGNITUDE( aMsg );
- }
- if ( aStartFlag )
- {
- *aStartFlag = VIBE_IVT_GET_PERIODIC_START_FLAG( aMsg );
- }
- if ( aType )
- {
- *aType = VIBE_IVT_GET_PERIODIC_TYPE( aMsg );
- }
- if ( aFreqPer )
- {
- *aFreqPer = VIBE_IVT_GET_PERIODIC_FREQPER( aMsg );
- }
- if ( aControlMode )
- {
- *aControlMode = VIBE_IVT_GET_PERIODIC_CONTROLMODE( aMsg );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Gets the periodic modifier data from the effect data buffer to which
-// pointer is given as argument.
-// ---------------------------------------------------------------------------
-//
-void BasisIVTGetters::VibeIVTGetPeriodicModifier(
- const TUint8* aMsg,
- TVibeIVTMessageTime* aImpulseTime,
- TVibeIVTMessageTime* aFadeTime,
- TVibeIVTMagnitude* aImpulseLevel,
- TVibeIVTMagnitude* aFadeLevel )
- {
- if ( aMsg )
- {
- if ( aImpulseTime )
- {
- *aImpulseTime =
- VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_TIME( aMsg );
- }
- if ( aFadeTime )
- {
- *aFadeTime = VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_TIME( aMsg );
- }
- if ( aImpulseLevel )
- {
- *aImpulseLevel =
- VIBE_IVT_GET_PERIODIC_MODIFIER_IMPULSE_LEVEL( aMsg );
- }
- if ( aFadeLevel )
- {
- *aFadeLevel = VIBE_IVT_GET_PERIODIC_MODIFIER_FADE_LEVEL( aMsg );
- }
- }
- }
-
-// end of file
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/hwrmhapticsivtgetter.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,560 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Plugin for reading effect information from IVT effect data.
-*
-*/
-
-#include <ecom/implementationproxy.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <hwrmhaptics.h>
-
-#include "hwrmhapticsivtgetter.h"
-#include "hwrmhapticstrace.h"
-#include "ivtinternal.h"
-#include "ivthelper.h"
-
-// ---------------------------------------------------------------------------
-// Constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsIVTGetter::CHWRMHapticsIVTGetter()
- {
- }
-
-// ---------------------------------------------------------------------------
-// 2nd phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CHWRMHapticsIVTGetter::ConstructL()
- {
- }
-
-// ---------------------------------------------------------------------------
-// 2-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsIVTGetter* CHWRMHapticsIVTGetter::NewL()
- {
- CHWRMHapticsIVTGetter* self = new ( ELeave ) CHWRMHapticsIVTGetter();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsIVTGetter::~CHWRMHapticsIVTGetter()
- {
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectCount( const TDesC8& aData,
- TInt& aCount )
- {
- TInt status( KErrArgument );
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
- {
- aCount = IVTHelper::GetNumEffects( aData.Ptr() );
- status = KErrNone;
- }
- return status;
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectName( const TDesC8& aData,
- TInt aEffectIndex,
- TDes8& aEffectName )
- {
- TUint8* effectNameData( 0 );
- char effectNameTemp[KVibeMaxEffectNameLength];
- memset( effectNameTemp, 0,
- KVibeMaxEffectNameLength * sizeof( char ) );
- TInt status( KErrNone );
-
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
- 0 <= aEffectIndex &&
- aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
- {
- effectNameData = IVTHelper::GetEffectNameData( aData.Ptr(), aEffectIndex );
- if ( effectNameData )
- {
- // Convert the name from wchar (VibeWChar) into the
- // temporary char format buffer first
- TInt stringSize =
- wcstombs( effectNameTemp,
- reinterpret_cast<const wchar_t*>( effectNameData ),
- KVibeMaxEffectNameLength );
- if ( aData.Size() < stringSize )
- {
- status = KErrArgument;
- }
- else
- {
- aEffectName.Copy( reinterpret_cast<TUint8*>( effectNameTemp ),
- stringSize );
- }
- }
- else
- {
- // IVT data doesn't contain effect name block
- // so return empty string
- aEffectName.Copy( KNullDesC );
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTEffectName: invalid args.") );
- status = KErrArgument;
- }
- return status;
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectIndexFromName( const TDesC8& aData,
- const TDesC8& aEffectName,
- TInt& aEffectIndex )
- {
- TInt i( 0 );
- TInt numEffects( 0 );
- TInt status( KErrGeneral );
-
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
- {
- HBufC8* temp = HBufC8::New( aEffectName.Size() + 1 );
- if ( temp )
- {
- TPtr8 effectName = temp->Des();
- effectName.Copy( aEffectName );
- effectName.ZeroTerminate();
-
- aEffectIndex = KVibeInvalidIndex;
- numEffects = IVTHelper::GetNumEffects( aData.Ptr() );
- for (i = 0; i < numEffects; i++)
- {
- TUint8 *effectNameData = IVTHelper::GetEffectNameData( aData.Ptr(), i );
- if ( effectNameData )
- {
- // Convert the name from wchar (VibeWChar) into char format
- char effectNameFromIVT[KVibeMaxEffectNameLength];
- memset( effectNameFromIVT, 0,
- KVibeMaxEffectNameLength * sizeof( char ) );
- wcstombs( effectNameFromIVT,
- reinterpret_cast<const wchar_t*>( effectNameData ),
- KVibeMaxEffectNameLength );
-
- if ( !strcmp( reinterpret_cast<const char*>
- ( effectName.Ptr() ), effectNameFromIVT ) )
- {
- // Match found, break from the for loop
- aEffectIndex = i;
- i = numEffects;
- status = KErrNone;
- }
- }
- }
- delete temp;
- temp = NULL;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTEffectIndexFromName: invalid args.") );
- status = KErrArgument;
- }
- return status;
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectType( const TDesC8& aData,
- TInt aEffectIndex,
- TInt& aEffectType )
- {
- TUint8 *effectPtr( 0 );
- TInt status( KErrNone );
-
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
- 0 <= aEffectIndex &&
- aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
- {
- aEffectType = 0;
- effectPtr = IVTHelper::GetEffectStorage( aData.Ptr(), aEffectIndex );
- if ( effectPtr )
- {
- // Skip over periodic modifier, if any
- if ( KVibeMessageTypeSetPeriodicModifier ==
- VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
- {
- effectPtr += KVibeIvtMessageSize;
- }
- if ( KVibeMessageTypeSetPeriodic ==
- VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
- {
- // It is either MagSweep or Periodic effect
- aEffectType = KVibePeriodicTypeConstant ==
- VIBE_IVT_GET_PERIODIC_TYPE( effectPtr ) ?
- CHWRMHaptics::EHWRMHapticsTypeMagSweep :
- CHWRMHaptics::EHWRMHapticsTypePeriodic;
- }
- else
- {
- // It has to be timeline effect
- aEffectType = CHWRMHaptics::EHWRMHapticsTypeTimeline;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTEffectType: GetEffectStorage failed.") );
- status = KErrGeneral;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTEffectType: invalid args.") );
- status = KErrArgument;
- }
-
- return status;
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetMagSweepEffectDefinition(
- const TDesC8& aData,
- TInt aEffectIndex,
- CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect )
- {
- TVibeEffectDefinition effectDefinition;
- TInt effectType( 0 );
- TInt status ( KErrNone );
-
- memset( &effectDefinition, 0, sizeof( effectDefinition ) );
-
- // Validity of aEffectIndex is already done in ImmVibeGetIVTEffectType
- // For params NULL values just mean "not to be returned"
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
- {
- status = GetEffectType( aData, aEffectIndex, effectType );
- if ( KErrNone == status )
- {
- if ( CHWRMHaptics::EHWRMHapticsTypeMagSweep == effectType )
- {
- status =
- GetEffectByIndex( aData,
- aEffectIndex,
- &effectDefinition );
- if ( KErrNone == status )
- {
- aEffect.iDuration =
- effectDefinition.iEffectCommonParams.iDuration;
-
- aEffect.iMagnitude =
- effectDefinition.iEffectTypeParams.
- iMagSweepEffectDefinition.iMagnitude;
-
- aEffect.iStyle =
- effectDefinition.iEffectCommonParams.iControlMode;
-
- aEffect.iAttackTime =
- effectDefinition.iEffectTypeParams.
- iMagSweepEffectDefinition.iEnvelope.
- iAttackTime;
-
- aEffect.iAttackLevel =
- effectDefinition.iEffectTypeParams.
- iMagSweepEffectDefinition.iEnvelope.
- iAttackLevel;
-
- aEffect.iFadeTime =
- effectDefinition.iEffectTypeParams.
- iMagSweepEffectDefinition.iEnvelope.iFadeTime;
-
- aEffect.iFadeLevel =
- effectDefinition.iEffectTypeParams.
- iMagSweepEffectDefinition.iEnvelope.
- iFadeLevel;
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: VibeAPIInternalGetIVTEffectByIndex failed.") );
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: EffectType invalid.") );
- status = KErrNotSupported;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: ImmVibeGetIVTEffectType failed.") );
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTMagSweepEffectDefinition: invalid data buffer.") );
- status = KErrArgument;
- }
- return status;
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetPeriodicEffectDefinition(
- const TDesC8& aData,
- TInt aEffectIndex,
- CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect )
- {
- TVibeEffectDefinition effectDefinition;
- TInt effectType( 0 );
- TInt status( KErrNone );
-
- memset( &effectDefinition, 0, sizeof( effectDefinition ) );
-
- // Validity of aEffectIndex is already done in ImmVibeGetIVTEffectType
- // For params NULL values just mean "not to be returned"
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) )
- {
- status = GetEffectType( aData, aEffectIndex, effectType );
- if ( KErrNone == status )
- {
- if ( CHWRMHaptics::EHWRMHapticsTypePeriodic == effectType )
- {
- status =
- GetEffectByIndex( aData,
- aEffectIndex,
- &effectDefinition );
- if ( KErrNone == status )
- {
- aEffect.iDuration =
- effectDefinition.iEffectCommonParams.iDuration;
-
- aEffect.iMagnitude =
- effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iMagnitude;
-
- aEffect.iPeriod =
- effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iPeriod;
-
- aEffect.iStyle =
- (effectDefinition.iEffectCommonParams.iControlMode
- & KVibeStyleMask) |
- ( ( effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iType
- << KVibeWavetypeShift ) & KVibeWavetypeMask );
-
- aEffect.iAttackTime =
- effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iEnvelope.
- iAttackTime;
-
- aEffect.iAttackLevel =
- effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iEnvelope.
- iAttackLevel;
-
- aEffect.iFadeTime =
- effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iEnvelope.iFadeTime;
-
- aEffect.iFadeLevel =
- effectDefinition.iEffectTypeParams.
- iPeriodicEffectDefinition.iEnvelope.
- iFadeLevel;
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: VibeAPIInternalGetIVTEffectByIndex failed.") );
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: EffectType invalid.") );
- status = KErrNotSupported;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: ImmVibeGetIVTEffectType failed.") );
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTPeriodicEffectDefinition: pIVT invalid.") );
- status = KErrArgument;
- }
- return status;
- }
-
-//---------------------------------------------------------------------------
-//
-//---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectDuration( const TDesC8& aData,
- TInt aEffectIndex,
- TInt& aEffectDuration )
- {
- TInt status( KErrNone );
-
- if ( IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
- 0 <= aEffectIndex &&
- aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
- {
- aEffectDuration = 0;
- TInt effectCount =
- IVTHelper::GetIVTEffectDuration( aData.Ptr(), aEffectIndex );
- if ( effectCount < 0 )
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTEffectDuration failed.") );
- aEffectDuration = 0;
- status = effectCount;
- }
- else
- {
- // On success, GetIVTEffectDuration returns the duration
- aEffectDuration = effectCount;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("ImmVibeGetIVTEffectDuration: invalid args.") );
- status = KErrArgument;
- }
-
- return status;
- }
-
-
-// ---------------------------------------------------------------------------
-// Internal helper method for getting effect definition by its index
-// from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsIVTGetter::GetEffectByIndex(
- const TDesC8& aData,
- TInt aEffectIndex,
- TVibeEffectDefinition* aEffectDefinition )
- {
- TInt periodicType;
- TUint8* effectPtr;
- TVibeEnvelopeParams envelope;
- TInt status( KErrNone );
-
- memset( &envelope, 0, sizeof( envelope ) );
-
- if ( aEffectDefinition && IVTHelper::IsValidIVTAddress( aData.Ptr() ) &&
- 0 <= aEffectIndex &&
- aEffectIndex < IVTHelper::GetNumEffects( aData.Ptr() ) )
- {
- memset( reinterpret_cast<void*>( aEffectDefinition ),
- 0,
- sizeof( TVibeEffectDefinition ) );
- effectPtr = IVTHelper::GetEffectStorage( aData.Ptr(), aEffectIndex );
- if ( effectPtr )
- {
- // Get IVT basis effect envelope
- if ( KVibeMessageTypeSetPeriodicModifier ==
- VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
- {
- IVTHelper::ExtractEnvelopeFromPacket( effectPtr, &envelope );
- effectPtr += KVibeIvtMessageSize;
- }
- if ( KVibeMessageTypeSetPeriodic ==
- VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
- {
- // Get IVT basis effect definition excluding envelope
- IVTHelper::ExtractEffectDefinitionFromPacket(
- effectPtr,
- aEffectDefinition,
- &periodicType );
- if ( KVibePeriodicTypeConstant == periodicType )
- {
- memcpy( &( aEffectDefinition->iEffectTypeParams.
- iMagSweepEffectDefinition.iEnvelope ),
- &envelope, sizeof( envelope ) );
- }
- else
- {
- memcpy( &( aEffectDefinition->iEffectTypeParams.
- iPeriodicEffectDefinition.iEnvelope ),
- &envelope, sizeof( envelope ) );
-
- }
- }
- else
- {
- COMPONENT_TRACE( _L("VibeAPIInternalGetIVTEffectByIndex: Invalid vibe message type.") );
- status = KErrGeneral;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("VibeAPIInternalGetIVTEffectByIndex: GetEffectStorage failed.") );
- status = KErrGeneral;
- }
- }
- else
- {
- COMPONENT_TRACE( _L("VibeAPIInternalGetIVTEffectByIndex: invalid arguments.") );
- status = KErrArgument;
- }
-
- return status;
- }
-
-
-
-//---------------------------------------------------------------------------
-// ImplementationTable[]
-//
-//---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( 0x20021203, CHWRMHapticsIVTGetter::NewL )
- };
-
-//---------------------------------------------------------------------------
-// TImplementationProxy* ImplementationGroupProxy()
-//
-//---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
- return ImplementationTable;
- }
-
-// End of file
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/ivthelper.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,774 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IVT effect get functions' high level helper functions
-* implementation file.
-*/
-
-#include <string.h>
-#include <hwrmhaptics.h>
-
-#include "ivtinternal.h"
-#include "ivthelper.h"
-#include "timelineivtgetters.h"
-#include "basisivtgetters.h"
-
-// ---------------------------------------------------------------------------
-// Checks the validity of IVT header. I.e., basic sanity check.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::IsValidIVTAddress( const TUint8* aIVT )
- {
- TBool validity( EFalse );
- // For now, all IVT have the following version number:
- // major version number = 1,
- // minor version number = 0
- if ( aIVT &&
- 1 == GetIVTHeader( aIVT )->iVersionMajor &&
- 0 == GetIVTHeader( aIVT )->iVersionMinor )
- {
- if ( IsEmpty ( aIVT ) )
- {
- // IVT containing zero effects is considered valid.
- validity = ETrue;
- }
- else
- {
- // For Non empty IVT, StorageDataSubBlock must start with
- // basic effect or timeline definition.
- if ( VIBE_IVT_IS_BASIS_EFFECT(
- GetStorageDataSubBlock( aIVT ) ) ||
- VIBE_IVT_IS_TIMELINE_EFFECT(
- GetStorageDataSubBlock( aIVT ) ) )
- {
- validity = ETrue;
- }
- }
- }
- return validity;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the number of contained effect definitions from the effect data buffer.
-// For empty data buffer returns 0.
-// ---------------------------------------------------------------------------
-//
-TUint16 IVTHelper::GetNumEffects( const TUint8* aIVT )
- {
- return aIVT ?
- GetIVTHeader( aIVT )->iEffects_0_7 +
- ( GetIVTHeader( aIVT )->iEffects_8_15 << 8 ) : 0;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the effect storage of the given effect (as indicated by index
-// argument) from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetEffectStorage( const TUint8* aIVT, TInt aEffectIndex )
- {
- // First get the storage data subblock pointer, and then advance that
- // according to correct effect's storage offset.
- // The offset is stored in two bytes (corresponding to the index of the
- // effect) of the storage offset subblock data area.
- return ( IsEmpty( aIVT ) || aEffectIndex >= GetNumEffects( aIVT ) ) ? 0 :
- GetStorageDataSubBlock( aIVT )
- + GetStorageOffsetSubBlock( aIVT )[2 * aEffectIndex]
- + ( GetStorageOffsetSubBlock( aIVT )[2 * aEffectIndex + 1] << 8 );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the the envelope params (attack and fade params) from the effect data.
-// The effect data pointer must point to a specific effect data, not the
-// whole effect data buffer as in above functions.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::ExtractEnvelopeFromPacket( const TUint8* aPacket,
- TVibeEnvelopeParams* aEnvelope )
- {
- TBool status( ETrue );
- if ( aPacket && aEnvelope )
- {
- TVibeIVTMessageTime attackTime( 0 );
- TVibeIVTMessageTime fadeTime( 0 );
- TVibeIVTMagnitude attackLevel( 0 );
- TVibeIVTMagnitude fadeLevel( 0 );
-
- BasisIVTGetters::VibeIVTGetPeriodicModifier( aPacket,
- &attackTime,
- &fadeTime,
- &attackLevel,
- &fadeLevel );
-
- aEnvelope->iAttackTime = attackTime;
- aEnvelope->iFadeTime = fadeTime;
- aEnvelope->iAttackLevel = ConvertToUserMagnitude( attackLevel );
- aEnvelope->iFadeLevel = ConvertToUserMagnitude( fadeLevel );
- }
- else
- {
- status = EFalse;
- }
- return status;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the the effect definition from the effect data.
-// The effect data pointer must point to a specific effect data, not the
-// whole effect data buffer as in above functions.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::ExtractEffectDefinitionFromPacket(
- const TUint8* aPacket,
- TVibeEffectDefinition* aEffectDefinition,
- TInt* aPeriodicType )
- {
- TBool status( ETrue );
- if ( aPacket && aEffectDefinition && aPeriodicType )
- {
- TVibeIVTMessageTime duration( 0 );
- TVibeIVTMessageTime startDelay( 0 );
- TVibeIVTMagnitude magnitude( 0 );
- TInt type( 0 );
- TVibeIVTFreqPer freqPer( 0 );
- TInt controlMode( 0 );
-
- BasisIVTGetters::VibeIVTGetPeriodic( aPacket,
- &duration,
- &startDelay,
- &magnitude,
- 0,
- &type,
- &freqPer,
- &controlMode );
-
- *aPeriodicType = VIBE_IVT_GET_PERIODIC_TYPE( aPacket );
-
- if ( KVibePeriodicTypeSquare == *aPeriodicType )
- {
- // Fill the Periodic specific definition data
- aEffectDefinition->iEffectCommonParams.iEffectType =
- CHWRMHaptics::EHWRMHapticsTypePeriodic;
- aEffectDefinition->iEffectCommonParams.iDuration =
- ConvertToUserDuration( duration );
- aEffectDefinition->iEffectCommonParams.iControlMode =
- controlMode;
- aEffectDefinition->iEffectTypeParams.
- iPeriodicEffectDefinition.iType = type;
- aEffectDefinition->iEffectTypeParams.
- iPeriodicEffectDefinition.iPeriod =
- ConvertToUserFrequency( freqPer );
- aEffectDefinition->iEffectTypeParams.
- iPeriodicEffectDefinition.iMagnitude =
- ConvertToUserMagnitude( magnitude );
- }
- else if ( KVibePeriodicTypeConstant == *aPeriodicType )
- {
- // Fill the MagSweep specific definition data
- aEffectDefinition->iEffectCommonParams.iEffectType =
- CHWRMHaptics::EHWRMHapticsTypeMagSweep;
- aEffectDefinition->iEffectCommonParams.iDuration =
- ConvertToUserDuration( duration );
- aEffectDefinition->iEffectCommonParams.iControlMode =
- controlMode;
- aEffectDefinition->iEffectTypeParams.
- iMagSweepEffectDefinition.iMagnitude =
- ConvertToUserMagnitude( magnitude );
- }
- else
- {
- status = EFalse;
- }
- }
- else
- {
- status = EFalse;
- }
- return status;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the effect name data of the given effect (as indicated by index
-// argument) from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetEffectNameData( const TUint8* aIVT, TInt aEffectIndex )
- {
- // First get the name data subblock pointer, and then advance that
- // according to effect's name offset.
- // The offset is stored in two bytes (corresponding to the index of the
- // effect) of the name offset subblock data area.
- return HasNameBlock( aIVT ) ?
- ( GetNameDataSubBlock( aIVT )
- + GetNameOffsetSubBlock( aIVT )[2 * aEffectIndex]
- + ( GetNameOffsetSubBlock( aIVT )[2 * aEffectIndex + 1] << 8 ) ) :
- 0;
- }
-
-// ---------------------------------------------------------------------------
-// GetIVTEffectDuration()
-//
-// IVT effect duration computation:
-// - For Basis effect: this function extracts duration from the BasicEffect
-// definition
-// - For Timeline effects, this function loops trough all the timeline events
-// and compute each basic effects's end time and keep the biggest value of
-// them.
-//
-// The formula:
-// BasicEffect's End time = ZeroOffsetTime + EventOffsetTime +
-// EffectDuration (Effect definition's duration or override duration)
-//
-// Every time the end of repeat event is reached, "ZeroOffsetTime" is always
-// adjusted (ZeroOffsetTime = ZeroOffsetTime + Repeat duration) and this ´
-// function goes back to the next event following the current repeat event.
-//
-// Return values:
-// -negative values: errors
-// -Positive values: duration
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::GetIVTEffectDuration( const TUint8* aIVT, TInt aEffectIndex )
- {
- TInt status( KErrNone );
- TInt duration( 0 );
-
- if ( aIVT && 0 <= aEffectIndex && aEffectIndex < GetNumEffects( aIVT ) )
- {
- TUint8* effectPtr( 0 );
- TVibeTimeLineInfo timelineInfo;
- memset( &timelineInfo, 0, sizeof( timelineInfo ) );
-
- timelineInfo.iOffsetSubBlock =
- reinterpret_cast<TUint8*>( GetIVTHeader( aIVT ) + 1 );
- timelineInfo.iDataSubBlock =
- timelineInfo.iOffsetSubBlock
- + 2*( GetIVTHeader( aIVT )->iEffects_0_7
- + ( GetIVTHeader( aIVT )->iEffects_8_15 << 8 ) );
- effectPtr =
- timelineInfo.iDataSubBlock
- + timelineInfo.iOffsetSubBlock[2*aEffectIndex]
- + ( timelineInfo.iOffsetSubBlock[2*aEffectIndex+1] << 8 );
-
- // Effect type specific handling
- if ( VIBE_IVT_IS_BASIS_EFFECT( effectPtr ) )
- {
- // Basis effect
- // Skip any messages preceding the SetPeriodic message
- while ( KVibeMessageTypeSetPeriodic !=
- VIBE_IVT_GET_MESSAGE_TYPE( effectPtr ) )
- {
- effectPtr += KVibeIvtMessageSize;
- }
- duration = ConvertToUserDuration(
- VIBE_IVT_GET_PERIODIC_DURATION( effectPtr ) );
- }
- else if ( VIBE_IVT_IS_TIMELINE_EFFECT( effectPtr ) )
- {
- // Timeline effect
- timelineInfo.iNextEvent = effectPtr;
- timelineInfo.iTimeRepeat = KVibeTimeInfinite;
- timelineInfo.iRepeatBarStackTop = -1;
-
- // Process the timeline effect
- // The looping stops either:
- // - due to processing error (e.g. invalid effect data)
- // - when it has been determined that effect is 'infinite'
- // - when the whole effect has been processed
- do
- {
- // Process next event or next closing of repeat bar,
- // whichever comes first, provided that its time is up
- if ( timelineInfo.iTimeEvent < timelineInfo.iTimeRepeat )
- {
- status = TimelineDurationProcessEvent( &timelineInfo );
- }
- else
- {
- status =
- TimelineDurationProcessRepeatInStack( &timelineInfo );
- }
-
- // Only continue loop if the above succeeded and didn't result
- // in infinite all effects end value
- if ( KErrNone == status &&
- KVibeTimeInfinite != timelineInfo.iTimeAllEffectsEnd )
- {
-
- // Check whether there are more events
- if ( timelineInfo.iNextEvent )
- {
- // Update times for the next event handling round
- timelineInfo.iTimeEvent =
- TimelineIVTGetters::VibeIVTGetEventTimeOffset(
- timelineInfo.iNextEvent );
- }
- else
- {
- timelineInfo.iTimeEvent = KVibeTimeInfinite;
- }
-
- // Check whether there are more repeat bars in stack
- if ( 0 <= timelineInfo.iRepeatBarStackTop )
- {
- // Update repeat time value for next repeat bar
- // handling round
- timelineInfo.iTimeRepeat =
- timelineInfo.iRepeatBarStack
- [timelineInfo.iRepeatBarStackTop].iTimeOffsetEnd;
- }
- else
- {
- timelineInfo.iTimeRepeat = KVibeTimeInfinite;
- }
- }
- } while( KErrNone == status &&
- KVibeTimeInfinite != timelineInfo.iTimeAllEffectsEnd &&
- ! ( KVibeTimeInfinite == timelineInfo.iTimeEvent &&
- KVibeTimeInfinite == timelineInfo.iTimeRepeat ) );
-
- duration = timelineInfo.iTimeAllEffectsEnd;
- }
- else
- {
- // Invalid effect type
- status = KErrGeneral;
- }
- }
- else
- {
- status = KErrGeneral;
- }
- // return either duration or error status
- return KErrNone == status ? duration : status;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the TVibeIVTHeader from the effect data buffer. Basically just a cast
-// ---------------------------------------------------------------------------
-//
-TVibeIVTHeader* IVTHelper::GetIVTHeader( const TUint8* aIVT )
- {
- return reinterpret_cast<TVibeIVTHeader*>( const_cast<TUint8*>( aIVT ) );
- }
-
-// ---------------------------------------------------------------------------
-// Returns ETrue if data buffer is either empty or contains zero effects.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::IsEmpty( const TUint8* aIVT )
- {
- // If aIVT is NULL, the GetNumEffects returns 0, i.e., no need
- // to check for NULL here.
- return 0 == GetNumEffects( aIVT ) ? ETrue : EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the effect storage block size from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint16 IVTHelper::GetStorageBlockSize( const TUint8* aIVT )
- {
- return IsEmpty( aIVT ) ? 0 :
- GetIVTHeader( aIVT )->iEffectStorageBlockSize_0_7 +
- ( GetIVTHeader( aIVT )->iEffectStorageBlockSize_8_15 << 8 );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the effect storage block size from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint16 IVTHelper::GetNameBlockSize( const TUint8* aIVT )
- {
- return IsEmpty( aIVT ) ? 0 :
- GetIVTHeader( aIVT )->iEffectNameBlockSize_0_7 +
- ( GetIVTHeader( aIVT )->iEffectNameBlockSize_8_15 << 8 );
- }
-
-// ---------------------------------------------------------------------------
-// Returns ETrue if data buffer contains name block.
-// ---------------------------------------------------------------------------
-//
-TBool IVTHelper::HasNameBlock( const TUint8* aIVT )
- {
- return 0 != GetNameBlockSize( aIVT ) ? ETrue : EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the storage block from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetStorageBlock( const TUint8* aIVT )
- {
- // Storage block starts after the IVT header
- return IsEmpty( aIVT ) ? 0 :
- reinterpret_cast<TUint8*>( GetIVTHeader( aIVT ) + 1 );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the storage offset subblock from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetStorageOffsetSubBlock( const TUint8* aIVT )
- {
- // The storage offset subblock is in the beginning of the storage block
- return GetStorageBlock( aIVT );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the storage data subblock from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetStorageDataSubBlock( const TUint8* aIVT )
- {
- // First get the storage offset subblock start point and then advance
- // over the offsets (there are 2 bytes of offset value per effect)
- return IsEmpty( aIVT ) ? 0 :
- GetStorageOffsetSubBlock( aIVT ) + 2* GetNumEffects( aIVT );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the name block from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetNameBlock( const TUint8* aIVT )
- {
- // Name block starts right after the storage block
- return IsEmpty( aIVT ) ? 0 :
- GetStorageBlock( aIVT ) + GetStorageBlockSize( aIVT );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the name offset subblock from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetNameOffsetSubBlock( const TUint8* aIVT )
- {
- // Name offset subblock is in the beginning of the name block
- return GetNameBlock( aIVT );
- }
-
-// ---------------------------------------------------------------------------
-// Gets the name data subblock from the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint8* IVTHelper::GetNameDataSubBlock( const TUint8* aIVT )
- {
- // First get the name offset subblock start point and then advance
- // over the offsets (there are 2 bytes of offset value per effect)
- return IsEmpty( aIVT ) ? 0 :
- GetNameOffsetSubBlock( aIVT ) + 2 * GetNumEffects( aIVT );
- }
-
-
-// ---------------------------------------------------------------------------
-// Calculates the size of the effect data buffer.
-// ---------------------------------------------------------------------------
-//
-TUint IVTHelper::GetIVTSize( const TUint8* aIVT)
- {
- TUint size( 0 );
- if ( aIVT )
- {
- size = sizeof( TVibeIVTHeader )
- + GetIVTHeader( aIVT )->iEffectNameBlockSize_0_7
- + ( GetIVTHeader( aIVT )->iEffectNameBlockSize_8_15 << 8 )
- + GetIVTHeader( aIVT )->iEffectStorageBlockSize_0_7
- + ( GetIVTHeader( aIVT )->iEffectStorageBlockSize_8_15 << 8 );
- }
- return size;
- }
-
-// ---------------------------------------------------------------------------
-// Converts magnitude from firmware to user interface representation
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::ConvertToUserMagnitude( TInt aFwMagnitude )
- {
- return ( aFwMagnitude * KHWRMHapticsMaxMagnitude ) / KVibeMaxFirmwareMagnitude;
- };
-
-// ---------------------------------------------------------------------------
-// Converts duration from firmware to user interface representation
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::ConvertToUserDuration( TVibeIVTMessageTime aFwDuration )
- {
- return KVibeFirmwareTimeInfinite == aFwDuration ? KVibeTimeInfinite :
- static_cast<TInt>( aFwDuration );
- };
-
-// ---------------------------------------------------------------------------
-// Converts frequency from firmware to user interface representation
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::ConvertToUserFrequency( TVibeIVTFreqPer aFwFrequency )
- {
- // map received value to a value between 100 and 1000000
- TInt tmpFreq = aFwFrequency >= 2900 ?
- 1000000 :
- aFwFrequency >= 2000 ?
- static_cast<TInt>( ( aFwFrequency - 1900 ) * 1000 ) :
- aFwFrequency >= 1000 ?
- static_cast<TInt>( ( aFwFrequency - 900 ) * 100 ) :
- aFwFrequency > 0 ?
- static_cast<TInt>( ( aFwFrequency + 10 ) * 10 ) :
- 100;
-
- return 1000000 / tmpFreq ;
- };
-
-// ---------------------------------------------------------------------------
-// Helper function to process timeline events (substructures within timeline
-// effects).
-// Used by GetIVTEffectDuration in case it is called for timeline effect.
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::TimelineDurationProcessEvent( TVibeTimeLineInfo* aTimelineInfo )
- {
- TInt status( KErrNone );
-
- if ( aTimelineInfo && aTimelineInfo->iNextEvent )
- {
- // pointer for propagating through the timeline info
- const TUint8* propPtr = aTimelineInfo->iNextEvent;
-
- // event specific handling
- switch ( *propPtr )
- {
- case KVibeIvtPropertyTypeLaunchPlayback:
- // Process launch playback event
- {
- TVibeIVTMessageTime timeLaunchEventDuration( 0 );
- TBool overrides( EFalse );
- TInt effectID = TimelineIVTGetters::VibeIVTGetEffectID(
- propPtr + 1, &propPtr );
- TInt timeOffset = TimelineIVTGetters::VibeIVTGetTimeOffset(
- propPtr, &propPtr );
-
- // loop through overrides and save override duration if found
- while ( VIBE_IVT_IS_OVERRIDE( propPtr ) )
- {
- // override-type specific handling
- switch ( *propPtr )
- {
- case KVibeIvtPropertyTypeDurationMsU16:
- {
- overrides = ETrue;
- timeLaunchEventDuration =
- TimelineIVTGetters::VibeIVTGetDuration(
- propPtr, &propPtr );
- if ( KVibeFirmwareTimeInfinite ==
- timeLaunchEventDuration )
- {
- aTimelineInfo->iTimeAllEffectsEnd =
- KVibeTimeInfinite;
- }
- break;
- }
- case KVibeIvtPropertyTypeMagnitudeS8:
- {
- // skip this, following updates propPtr correctly
- TimelineIVTGetters::VibeIVTGetMagnitude(
- propPtr, &propPtr );
- break;
- }
- case KVibeIvtPropertyTypeFreqPeriodU16:
- {
- // skip this, following updates propPtr correctly
- TimelineIVTGetters::VibeIVTGetFreqPer(
- propPtr, &propPtr );
- break;
- }
- }
- } // override looping
-
- // We only need to continue if there was no override
- // for duration
- if ( !overrides )
- {
- // No override for duration. Get the basis effect
- // duration instead.
- // First, get a pointer to the beginning of the effect
- // definition of the corresponding effect.
- TUint8* timelineBasisEffect =
- aTimelineInfo->iDataSubBlock
- + aTimelineInfo->iOffsetSubBlock[2*effectID]
- + ( aTimelineInfo->iOffsetSubBlock[2*effectID+1]
- << 8 );
-
- // Skip any (possible) preceding messages before the
- // SetPeriodic message
- while ( KVibeMessageTypeSetPeriodic !=
- VIBE_IVT_GET_MESSAGE_TYPE( timelineBasisEffect ) )
- {
- timelineBasisEffect += KVibeIvtMessageSize;
- }
-
- timeLaunchEventDuration =
- VIBE_IVT_GET_PERIODIC_DURATION( timelineBasisEffect );
-
- if ( KVibeFirmwareTimeInfinite ==
- timeLaunchEventDuration )
- {
- // Set the all effects end to infinite value
- aTimelineInfo->iTimeAllEffectsEnd = KVibeTimeInfinite;
- }
- }
-
- if ( KVibeTimeInfinite != aTimelineInfo->iTimeAllEffectsEnd )
- {
- // If the all effects end value is not 'infinite',
- // we need to set that value to current effects end
- // value (but only if its later than the current all
- // effects end value)
- TInt timeEffectEnd =
- aTimelineInfo->iTimeOffsetZero
- + ConvertToUserDuration( timeLaunchEventDuration )
- + timeOffset;
- if ( timeEffectEnd > aTimelineInfo->iTimeAllEffectsEnd )
- {
- aTimelineInfo->iTimeAllEffectsEnd = timeEffectEnd;
- }
-
- // also update the iNextEvent pointer (note this too has
- // only meaning if the all effects end value is not
- // 'infinite'
- aTimelineInfo->iNextEvent = propPtr;
- }
- break;
- }
- case KVibeIvtPropertyTypeRepeatBar:
- {
- // Process repeat playback event
- TInt timeOffsetStart =
- TimelineIVTGetters::VibeIVTGetTimeOffset(
- propPtr + 1, &propPtr );
- TInt timeOffsetEnd =
- TimelineIVTGetters::VibeIVTGetTimeOffset( propPtr, &propPtr );
- TInt count =
- TimelineIVTGetters::VibeIVTGetCount( propPtr, &propPtr );
-
- if ( KVibeRepeatCountInfinite == count )
- {
- aTimelineInfo->iTimeAllEffectsEnd = KVibeTimeInfinite;
- }
- else if ( KRepeatBarStackMaxSize >
- aTimelineInfo->iRepeatBarStackTop + 1 )
- {
- // Push repeat bar to repeat bar stack
- ++aTimelineInfo->iRepeatBarStackTop;
- TVibeRepeatBar& tmp =
- aTimelineInfo->iRepeatBarStack
- [aTimelineInfo->iRepeatBarStackTop];
- tmp.iTimeOffsetEnd = timeOffsetEnd;
- tmp.iTimeDuration = timeOffsetEnd - timeOffsetStart;
- tmp.iCount = count;
- tmp.iEvent = propPtr; // First event following this repeat
- // event, could be outside the
- // repeat bar
-
- // update the iNextEvent pointer
- aTimelineInfo->iNextEvent = propPtr;
- }
- else
- {
- // More than KHpeRepeatBarStackNum repeat bars in
- // the timeline. Bail out.
- status = KErrGeneral;
- }
- break;
- }
- case KVibeIvtPropertyTypeEndOfList:
- {
- // End of event list
- aTimelineInfo->iNextEvent = 0;
- break;
- }
- default:
- {
- status = KErrGeneral;
- break;
- }
- }
- }
- else
- {
- status = KErrGeneral;
- }
- return status;
- }
-
-// ---------------------------------------------------------------------------
-// Helper function to process timeline repeat bars that are closing.
-// Used by GetIVTEffectDuration in case it is called for timeline effect.
-// ---------------------------------------------------------------------------
-//
-TInt IVTHelper::TimelineDurationProcessRepeatInStack(
- TVibeTimeLineInfo* aTimelineInfo )
- {
- TInt status( KErrNone );
-
- // sanity check
- if ( aTimelineInfo &&
- 0 <= aTimelineInfo->iRepeatBarStackTop &&
- KVibeRepeatCountInfinite !=
- aTimelineInfo->
- iRepeatBarStack[aTimelineInfo->iRepeatBarStackTop].iCount )
- {
- // Processing needed only if count isn't already zero
- if ( 0 <
- aTimelineInfo->
- iRepeatBarStack[aTimelineInfo->iRepeatBarStackTop].iCount-- )
- {
- // update iNextEvent pointer
- aTimelineInfo->iNextEvent =
- aTimelineInfo->iRepeatBarStack
- [aTimelineInfo->iRepeatBarStackTop].iEvent;
-
- // Update the all effects end value if the end of repeat
- // is later than the current value
- TInt timeRepeat =
- aTimelineInfo->iTimeOffsetZero
- + aTimelineInfo->
- iRepeatBarStack[aTimelineInfo->iRepeatBarStackTop].
- iTimeOffsetEnd;
- if ( timeRepeat > aTimelineInfo->iTimeAllEffectsEnd )
- {
- aTimelineInfo->iTimeAllEffectsEnd = timeRepeat;
- }
-
- // Add the repeat bar duration to the effect start time:
- // repeating the last T time is like adding T to the ZeroTime
- aTimelineInfo->iTimeOffsetZero +=
- aTimelineInfo->iRepeatBarStack
- [aTimelineInfo->iRepeatBarStackTop].iTimeDuration;
-
- // If count has reached zero, update the repeat bar stack
- // top value (the current top has now been handled)
- if (0 == aTimelineInfo->iRepeatBarStack
- [aTimelineInfo->iRepeatBarStackTop].iCount)
- {
- --aTimelineInfo->iRepeatBarStackTop;
- }
- }
- }
- else
- {
- status = KErrGeneral;
- }
- return status;
- }
-
-// end of file
-
--- a/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/src/timelineivtgetters.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,342 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IVT effect get functions' high level helper functions
-* (for timeline effects) implementation file.
-*/
-
-#include "timelineivtgetters.h"
-
-// ---------------------------------------------------------------------------
-// Gets the effectID from the current location of the data as pointed by the
-// aProp pointer argument and advances the aPProp argument's pointer value to
-// the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTEffectID TimelineIVTGetters::VibeIVTGetEffectID(
- const TUint8* aProp,
- const TUint8** aPProp )
- {
- TVibeIVTEffectID effectID( 0 );
-
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp )
- {
- switch ( *( aProp++ ) )
- {
- case KVibeIvtPropertyTypeEffectIdU16:
- effectID |= *( aProp++ ) << 8;
- // fall through
- case KVibeIvtPropertyTypeEffectIdU8:
- effectID |= *( aProp++ );
- break;
- default:
- {
- // We shouldn't come here
- break;
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- return effectID;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the time offset from the current location of the data as pointed by
-// the aProp pointer argument and advances the aPProp argument's pointer value
-// to the next data location
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetTimeOffset( const TUint8* aProp,
- const TUint8** aPProp )
- {
- TInt time( 0 );
-
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp )
- {
- switch ( *( aProp++ ) )
- {
- case KVibeIvtPropertyTypeTimeOffsetU32:
- time |= *( aProp++ ) << 24;
- // fall through
- case KVibeIvtPropertyTypeTimeOffsetU24:
- time |= *( aProp++ ) << 16;
- // fall through
- case KVibeIvtPropertyTypeTimeOffsetU16:
- time |= *( aProp++ ) << 8;
- time |= *( aProp++ );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- return time;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the count value from the current location of the data as pointed by
-// the aProp pointer argument and advances the aPProp argument's pointer value
-// to the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTCount TimelineIVTGetters::VibeIVTGetCount( const TUint8* aProp,
- const TUint8** aPProp )
- {
- TVibeIVTCount count( 0 );
-
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp )
- {
- switch ( *( aProp++ ) )
- {
- case KVibeIvtPropertyTypeCountU8:
- count |= *( aProp++ );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- return count;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the duration value from the current location of the data as pointed by
-// the aProp pointer argument and advances the aPProp argument's pointer value
-// to the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTMessageTime TimelineIVTGetters::VibeIVTGetDuration(
- const TUint8* aProp,
- const TUint8** aPProp )
- {
- TVibeIVTMessageTime duration( 0 );
-
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp )
- {
- switch ( *( aProp++ ) )
- {
- case KVibeIvtPropertyTypeDurationMsU16:
- duration |= *( aProp++ ) << 8;
- duration |= *( aProp++ );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- return duration;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the magnitude from the current location of the data as pointed by the
-// aProp pointer argument and advances the aPProp argument's pointer value to
-// the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTMagnitude TimelineIVTGetters::VibeIVTGetMagnitude(
- const TUint8* aProp,
- const TUint8** aPProp )
- {
- TVibeIVTMagnitude magnitude( 0 );
-
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp )
- {
- switch ( *( aProp++ ) )
- {
- case KVibeIvtPropertyTypeMagnitudeS8:
- magnitude |= *( aProp++ );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- return magnitude;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the frequency value from the current location of the data as pointed
-// by the aProp pointer argument and advances the aPProp argument's pointer
-// value to the next data location
-// ---------------------------------------------------------------------------
-//
-TVibeIVTFreqPer TimelineIVTGetters::VibeIVTGetFreqPer(
- const TUint8* aProp,
- const TUint8** aPProp )
- {
- TVibeIVTFreqPer freqper( 0 );
-
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp )
- {
- switch ( *( aProp++ ) )
- {
- case KVibeIvtPropertyTypeFreqPeriodU16:
- freqper |= *( aProp++ ) << 8;
- freqper |= *( aProp++ );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- return freqper;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the event offset time from the current location of the
-// data as pointed by the aProp pointer argument.
-// This is the generic version that usually is called and that in turn uses
-// the above more specific getters.
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetEventTimeOffset( const TUint8* aProp )
- {
- // Default return value a time that's guaranteed to never play
- TInt offset( KVibeTimeInfinite );
- if ( aProp )
- {
- // Return the start time depending on the event type
- switch ( *aProp )
- {
- case KVibeIvtPropertyTypeLaunchPlayback:
- offset = VibeIVTGetLaunchPlaybackEventTimeOffset( aProp );
- break;
- case KVibeIvtPropertyTypeRepeatBar:
- offset = VibeIVTGetRepeatBarEventTimeOffset( aProp );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- }
- return offset;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the override value(s) from the current location of the data as pointed
-// by the aProp pointer argument and advances the aPProp argument's pointer
-// value to the next data location
-// ---------------------------------------------------------------------------
-//
-void TimelineIVTGetters::VibeIVTGetOverrides(
- const TUint8* aProp,
- TVibeIVTOverrideFlags* aOverrideFlags,
- TVibeIVTMessageTime* aDuration,
- TVibeIVTMagnitude* aMagnitude,
- TVibeIVTFreqPer* aFreqPer,
- const TUint8** aPProp )
- {
- // aPProp can be NULL if the caller doesn't want to retrieve it
- if ( aProp && aOverrideFlags && aDuration && aMagnitude && aFreqPer )
- {
- *aOverrideFlags = 0;
- while ( VIBE_IVT_IS_OVERRIDE( aProp ) )
- {
- switch ( *aProp )
- {
- case KVibeIvtPropertyTypeDurationMsU16:
- *aOverrideFlags |= KVibeIvtOverrideFlagDuration;
- *aDuration = VibeIVTGetDuration( aProp, &aProp );
- break;
- case KVibeIvtPropertyTypeMagnitudeS8:
- *aOverrideFlags |= KVibeIvtOverrideFlagMagnitude;
- *aMagnitude = VibeIVTGetMagnitude( aProp, &aProp );
- break;
- case KVibeIvtPropertyTypeFreqPeriodU16:
- *aOverrideFlags |= KVibeIvtOverrideFlagFreqPeriod;
- *aFreqPer = VibeIVTGetFreqPer( aProp, &aProp );
- break;
- default:
- {
- // We should never come here.
- break;
- }
- }
- }
- if ( aPProp )
- {
- *aPProp = aProp;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Gets the launch playback event offset time from the current location of the
-// data as pointed by the aProp pointer argument
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetLaunchPlaybackEventTimeOffset(
- const TUint8* aProp )
- {
- TInt offset( 0 );
- if ( aProp )
- {
- VibeIVTGetEffectID( aProp + 1, &aProp ); // skip the return value
- offset = VibeIVTGetTimeOffset( aProp, 0 );
- }
- return offset;
- }
-
-// ---------------------------------------------------------------------------
-// Gets the repeat event offset time from the current location of the
-// data as pointed by the aProp pointer argument
-// ---------------------------------------------------------------------------
-//
-TInt TimelineIVTGetters::VibeIVTGetRepeatBarEventTimeOffset(
- const TUint8* aProp )
- {
- return aProp ? VibeIVTGetTimeOffset( aProp + 1, 0 ) : 0;
- }
-
-// end of file
--- a/hwrmhaptics/hapticspacketizer/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/hwrmhaptics/hapticspacketizer/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -20,7 +20,6 @@
PRJ_EXPORTS
-#include "../plugins/hapticsvibepacketizerplugin/group/bld.inf"
PRJ_MMPFILES
hwrmhapticspacketizer.mmp
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/data/20021206.rss Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Vibe packetizer plugin's ECom resource file.
-*
-*/
-
-#include <ecom/registryinfo.rh>
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x20021206;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x20021205;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x20021207;
- version_no = 1;
- display_name = "";
- default_data = "";
- opaque_data = "";
- }
- };
- }
- };
- }
-
-// End of file
\ No newline at end of file
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Plugin for VibeTonz Haptics command packetizer.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../rom/hwrmhapticsvibepacketizerplugin.iby CORE_OS_LAYER_IBY_EXPORT_PATH(hwrmhapticsvibepacketizerplugin.iby)
-
-PRJ_MMPFILES
-hwrmhapticsvibepacketizerplugin.mmp
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group/hwrmhapticsvibepacketizerplugin.mmp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for Vibe Packetizer ECom plugin.
-*
-*/
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET hwrmhapticsvibepacketizerplugin.dll
-TARGETTYPE PLUGIN
-UID 0x10009D8D 0x20021206
-
-CAPABILITY CAP_ECOM_PLUGIN
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE hwrmhapticsvibepacketizer.cpp
-
-USERINCLUDE ../inc
-
-// Default system include paths for osext layer modules.
-OS_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/stdapis
-
-SOURCEPATH ../data
-START RESOURCE 20021206.rss
-TARGETPATH ECOM_RESOURCE_DIR
-TARGET hwrmhapticsvibepacketizerplugin.rsc
-END
-
-LIBRARY euser.lib
-LIBRARY bafl.lib
-LIBRARY ecom.lib
-LIBRARY hwrmhapticspacketizer.lib
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibeconstants.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: VibeTonz related const definitions header file
-*
-*/
-
-#ifndef _HWRMHAPTICSVIBECONSTANTS_H
-#define _HWRMHAPTICSVIBECONSTANTS_H
-
-#include <e32def.h>
-#include <limits.h>
-
-/**
- * Invalid index constant
- */
-const TInt KVibeInvalidIndex = -1;
-
-/**
- * String maximum length constants
- */
-const TInt KVibeMaxEffectNameLength = 128; // Maximum effect name length
-const TInt KVibeMaxDeviceNameLength = 64; // Maximum device name length
-const TInt KVibeMaxCapabilityStringLength = 64; // Maximum capability string length
-const TInt KVibeMaxPropertyStringLength = 64; // Maximum property string length
-
-/**
- * 'Infinite' time
- */
-const TInt KVibeTimeInfinite = INT_MAX;
-
-/**
- * Device Default priority value
- */
-const TInt KVibeDevicePriorityDefault = 0;
-
-/**
- * 'Infinite' repeat count value
- */
-const TUint8 KVibeRepeatCountInfinite = 255;
-
-/**
- * Maximum size of streaming sample (in bytes)
- */
-const TInt KVibeMaxStreamingSampleSize = 255;
-
-/**
- * Data value types (used as property and capability data value type)
- */
-const TUint8 KVibeValuetypeUnspecified = 0;
-const TUint8 KVibeValuetypeInt32 = 1;
-const TUint8 KVibeValuetypeBool = 2;
-const TUint8 KVibeValuetypeString = 3;
-
-/**
- * Error and Return value codes.
- */
-// Success
-const TInt KVibeStatusSuccess = 0;
-
-// Effect is not playing
-const TInt KVibeWarningNotPlaying = 1;
-
-// Effect doesn't have enough priority to play,
-// higher priority effect is playing on the device
-const TInt KVibeWarningInsufficientPriority = 2;
-
-// Effects are disabled on the device
-const TInt KVibeWarningEffectsDisabled = 3;
-
-// Trying to resume an effect that is not paused
-const TInt KVibeWarningNotPaused = 4;
-
-// The API is already initialized (this code is obsolete)
-const TInt KVibeErrAlreadyInitialized = -1;
-
-// The API is not initialized
-const TInt KVibeErrNotInitialized = -2;
-
-// Invalid argument was used in a API function call
-const TInt KVibeErrInvalidArgument = -3;
-
-// Generic error
-const TInt KVibeErrFail = -4;
-
-// Incompatible Effect type has been passed into an API call
-const TInt KVibeErrIncompatibleEffectType = -5;
-
-// Incompatible Capability type was used in one of the following API call:
-// -ImmVibeGetDeviceCapabilityString
-// -ImmVibeSetDeviceCapabilityString
-// -ImmVibeGetDeviceCapabilityInt32
-// -ImmVibeGetDeviceCapabilityInt32
-const TInt KVibeErrIncompatibleCapabilityType = -6;
-
-// Incompatible Property type was used in on of the following API calls:
-// -ImmVibeGetDevicePropertyString
-// -ImmVibeSetDevicePropertyString
-// -ImmVibeGetDevicePropertyBool
-// -ImmVibeGetDevicePropertyInt32
-// -ImmVibeSetDevicePropertyInt32
-const TInt KVibeErrIncompatiblePropertyType = -7;
-
-// Access to the instance of haptics is locked until a valid license key is provided.
-// Use ImmVibeSetDevicePropertyString to set the license key.
-// The following API functions may return this error
-// -ImmVibeGetDevicePropertyBool
-// -ImmVibeSetDevicePropertyBool
-// -ImmVibeGetDevicePropertyInt32
-// -ImmVibeSetDevicePropertyInt32
-// -ImmVibeGetDevicePropertyString
-// -ImmVibeSetDevicePropertyString (except for setting the license key)
-// -ImmVibePlayIVTEffect
-// -ImmVibePlayIVTEffectRepeat
-// -ImmVibeStopPlayingEffect
-// -ImmVibePlayMagSweepEffect
-// -ImmVibePlayPeriodicEffect
-// -ImmVibeModifyPlayingMagSweepEffect
-// -ImmVibeModifyPlayingPeriodicEffect
-// -ImmVibeStopAllPlayingEffects
-const TInt KVibeErrDeviceNeedsLicense = -8;
-
-// Cannot allocate memory to complete the request
-const TInt KVibeErrNotEnoughMemory = -9;
-
-// ImmVibe service is not running
-const TInt KVibeErrServiceNotRunning = -10;
-
-// Insufficient priority to complete the request (insufficient license key priority)
-const TInt KVibeErrInsufficientPriority = -11;
-
-// ImmVibe service is busy and failed to complete the request
-const TInt KVibeErrServiceBusy = -12;
-
-#endif // _HWRMHAPTICSVIBECONSTANTS_H
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibepacketizer.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Plugin for handling vibe command packages.
-*
-*/
-
-#ifndef C_HWRMHAPTICSVIBEPACKETIZER_H
-#define C_HWRMHAPTICSVIBEPACKETIZER_H
-
-#include <e32base.h>
-#include <hwrmhapticspacketizer.h>
-
-class CDesC8ArraySeg;
-
-/**
- * ECom plugin for handling vibe command packages.
- *
- * @lib hwrmhapticsvibepacketizerplugin.lib
- * @since S60 v5.1
- */
-NONSHARABLE_CLASS( CHWRMHapticsVibePacketizer ): public CHWRMHapticsPacketizer
- {
-public:
-
- /**
- * Two phased constructor.
- *
- * @return An instance of haptics vibe packetizer.
- */
- static CHWRMHapticsVibePacketizer* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CHWRMHapticsVibePacketizer();
-
-public: // From CHWRMHapticsPacketizer
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncOpenDeviceReq( THWRMLogicalActuators aLogicalActuator,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncCloseDeviceReq( TInt aDeviceHandle, RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayMagSweepEffectReq(
- TInt aDeviceHandle,
- CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayPeriodicEffectReq(
- TInt aDeviceHandle,
- CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncModifyPlayingMagSweepEffectReq(
- TInt aDeviceHandle,
- TInt aEffectHandle,
- CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncModifyPlayingPeriodicEffectReq(
- TInt aDeviceHandle,
- TInt aEffectHandle,
- CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPausePlayingEffectReq( TInt aDeviceHandle,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncResumePausedEffectReq( TInt aDeviceHandle,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncStopPlayingEffectReq( TInt aDeviceHandle,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncStopAllPlayingEffectsReq( TInt aDeviceHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayEffectIncludeEffectDataReq( TInt aDeviceHandle,
- const TDesC8& aData,
- TInt aEffectIndex,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayEffectRepeatIncludeEffectDataReq( TInt aDeviceHandle,
- const TDesC8& aData,
- TInt aEffectIndex,
- TUint8 aRepeat,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayEffectRepeatNoDataReq( TInt aDeviceHandle,
- TInt aEffectIndex,
- TUint8 aRepeat,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayEffectNoDataReq( TInt aDeviceHandle,
- TInt aEffectIndex,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncCreateStreamingEffectReq( TInt aDeviceHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncDestroyStreamingEffectReq( TInt aDeviceHandle,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayStreamingSampleReq( TInt aDeviceHandle,
- const TDesC8& aStreamingSample,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncPlayStreamingSampleWithOffsetReq(
- TInt aDeviceHandle,
- const TDesC8& aStreamingSample,
- TInt aOffsetTime,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncGetEffectStateReq( TInt aDeviceHandle,
- TInt aEffectHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncSetDevicePropertyBoolReq( TInt aDeviceHandle,
- TBool aDevPropValue,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncSetDevicePropertyIntReq( TInt aDeviceHandle,
- TInt aDevPropValue,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncSetDevicePropertyStringReq( TInt aDeviceHandle,
- const TDesC8& aDevPropValue,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncSetPlatformLicenseKeyReq( TInt aDeviceHandle,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncGetDevicePropertyBoolReq( TInt aDeviceHandle,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncGetDevicePropertyIntReq( TInt aDeviceHandle,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncGetDevicePropertyStringReq( TInt aDeviceHandle,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncGetDeviceCapabilityIntReq( TInt aDeviceHandle,
- TInt aDevCapType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt EncGetDeviceCapabilityStringReq( TInt aDeviceHandle,
- TInt aDevCapType,
- RBuf8& aBuffer );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual CDesC8ArraySeg* DecodeMessageL( const TDesC8& aData,
- TInt& aStatus );
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt DeviceHandle();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt InfiniteRepeat();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt InfiniteDuration();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt MaxEffectNameLength();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt MaxDeviceNameLength();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt MaxCapabilityStringLength();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt MaxPropertyStringLength();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt MaxStreamingSampleSize();
-
- /**
- * @see MHWRMHapticsPacketizer
- */
- virtual TInt DefaultDevicePriority();
-
-private:
-
- /**
- * Constructor.
- */
- CHWRMHapticsVibePacketizer();
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
- /**
- * Internal helper method. Fills Get Device Capability request data.
- */
- TInt EncGetDeviceCapabilityReqInternal( TInt aValueType,
- TInt aDeviceHandle,
- TInt aDevCapType,
- RBuf8& aBuffer );
-
- /**
- * Internal helper method. Fills Get Device Property request data.
- */
- TInt EncGetDevicePropertyReqInternal( TInt aValueType,
- TInt aDeviceHandle,
- TInt aDevPropType,
- RBuf8& aBuffer );
-
- /**
- * Internal helper method. Fills Play Streaming Sample request data.
- */
- TInt EncPlayStreamingSampleInternal( TInt aDeviceHandle,
- TInt aEffectHandle,
- const TDesC8& aStreamingSample,
- TInt aOffsetTime,
- RBuf8& aBuffer );
-
- /**
- * Maps Vibe error code to Symbian error code.
- *
- * @param aVibeError Vibe error code.
- * @return Symbian system wide error code.
- */
- TInt MapError( TInt aVibeError );
-
-private: // data
-
- /**
- * Buffer for request data.
- */
- RBuf8 iReqBuf;
-
- /**
- * Buffer for streaming or IVT data.
- */
- RBuf8 iDataBuf;
-
- /**
- * Array used for decoded values in DecodeMessageL. Owned.
- */
- CDesC8ArraySeg* iReturnArray;
-
- /**
- * Stores the latest value of opened device handle. Initiated
- * to KErrNotFound.
- */
- TInt iDeviceHandle;
- };
-
-#endif // C_HWRMHAPTICSVIBEPACKETIZER_H
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/inc/hwrmhapticsvibepackets.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,735 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: VibeTonz API protocol packet definition header file
-*
-*/
-
-#ifndef _HWRMHAPTICSVIBEPACKETS_H_
-#define _HWRMHAPTICSVIBEPACKETS_H_
-
-/**
- * Byte alignment is set to 1 byte boundary with this pragma.
- */
-#pragma pack( push, 1 )
-
-/**
- * Const for largest allowable packet size. It is used
- * by packetizer functions that piggyback IVT or streaming
- * data in their packets.
- */
-const TInt KVibePacketMaxSize = 0xFFFF;
-
-/**
- * Haptics command codes (VibeTonz API command codes)
- */
-const TUint16 KVibeCmdProtocolVersion = 0xFF;
-const TUint16 KVibeCmdApiVersion = 0x00;
-const TUint16 KVibeCmdInitialize = 0x01;
-const TUint16 KVibeCmdTerminate = 0x02;
-const TUint16 KVibeCmdPlayBasisEffect = 0x03;
-const TUint16 KVibeCmdPlayIVTEffectIncludeData = 0x04;
-const TUint16 KVibeCmdPlayIVTEffectNoData = 0x05;
-const TUint16 KVibeCmdModifyBasisEffect = 0x06;
-const TUint16 KVibeCmdStopEffect = 0x07;
-const TUint16 KVibeCmdStopAllEffects = 0x08;
-const TUint16 KVibeCmdGetDeviceCapabilities = 0x09;
-const TUint16 KVibeCmdDebugBuffer = 0x0A;
-const TUint16 KVibeCmdResetDebugBuffer = 0x0B;
-const TUint16 KVibeCmdStopDesignedBridge = 0x0C;
-const TUint16 KVibeCmdGetDeviceState = 0x0D;
-const TUint16 KVibeCmdSetKernelParameter = 0x0E;
-const TUint16 KVibeCmdGetKernelParameter = 0x0F;
-const TUint16 KVibeCmdSetDeviceProperty = 0x10;
-const TUint16 KVibeCmdGetDeviceProperty = 0x11;
-const TUint16 KVibeCmdOpenDevice = 0x12;
-const TUint16 KVibeCmdCloseDevice = 0x13;
-const TUint16 KVibeCmdStartDesignerBridge = 0x14;
-const TUint16 KVibeCmdDeviceCount = 0x15;
-const TUint16 KVibeCmdPlayStreamingSample = 0x16;
-const TUint16 KVibeCmdCreateStreamingEffect = 0x17;
-const TUint16 KVibeCmdDestroyStreamingEffect = 0x18;
-const TUint16 KVibeCmdPausePlayingEffect = 0x19;
-const TUint16 KVibeCmdResumePausedEffect = 0x1A;
-const TUint16 KVibeCmdGetEffectState = 0x1B;
-const TUint16 KVibeCmdPlayMagSweepEffect = 0x1C;
-const TUint16 KVibeCmdPlayPeriodicEffect = 0x1D;
-const TUint16 KVibeCmdModifyPlayingMagSweepEffect = 0x1E;
-const TUint16 KVibeCmdModifyPlayingPeriodicEffect = 0x1F;
-const TUint16 KVibeCmdSetLicense = 0x20;
-
-/**
- * Simple request struct contains just command code
- */
-struct TVibePacketSimpleRequest
- {
- TUint16 iCmdCode;
- };
-
-/**
- * Simple response struct contains just command code and status.
- */
-struct TVibePacketSimpleResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- };
-
-/**
- * Packet structures for Protocol Version request and response
- * (Implemented since Mobile 2.0 protocol)
- */
-typedef TVibePacketSimpleRequest TVibePacketProtocolVersionRequest;
-
-struct TVibePacketProtocolVersionResponse
- {
- TUint16 iCmdCode;
- TUint8 iVersionMinor;
- TUint8 iVersionMajor;
- };
-
-
-/**
- * Packet structures for API Version request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketApiVersionRequest;
-
-struct TVibePacketApiVersionResponse
- {
- TUint16 iCmdCode;
- TUint8 iVersionMajor;
- TUint8 iVersionMinor;
- TUint8 iVersionBuild_7_0;
- TUint8 iVersionBuild_15_8;
- };
-
-/**
- * Packet structures for Initialize request and response
- */
-struct TVibePacketInitializeRequest
- {
- TUint16 iCmdCode;
- TUint8 iVersionMajor;
- TUint8 iVersionMinor;
- TUint8 iVersionBuild_7_0;
- TUint8 iVersionBuild_15_8;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketInitializeResponse;
-
-/**
- * Packet structures for Terminate request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketTerminateRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketTerminateResponse;
-
-/**
- * Packet structures for PlayBasisEffect request and response.
- * Used with following commands:
- * - KVibeCmdPlayBasisEffect
- * - KVibeCmdPlayMagSweepEffect
- * - KVibeCmdPlayPeriodicEffect
- */
-struct TVibePacketPlayBasisEffectRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- TUint8 iDuration_7_0;
- TUint8 iDuration_15_8;
- TUint8 iDuration_23_16;
- TUint8 iDuration_31_24;
- TUint8 iMagnitude_7_0;
- TUint8 iMagnitude_15_8;
- TUint8 iMagnitude_23_16;
- TUint8 iMagnitude_31_24;
- TUint8 iEffectTypeStyle;
- TUint8 iPeriod_7_0;
- TUint8 iPeriod_15_8;
- TUint8 iPeriod_23_16;
- TUint8 iPeriod_31_24;
- TUint8 iImpulseTime_7_0;
- TUint8 iImpulseTime_15_8;
- TUint8 iImpulseTime_23_16;
- TUint8 iImpulseTime_31_24;
- TUint8 iImpulseLevel_7_0;
- TUint8 iImpulseLevel_15_8;
- TUint8 iImpulseLevel_23_16;
- TUint8 iImpulseLevel_31_24;
- TUint8 iFadeTime_7_0;
- TUint8 iFadeTime_15_8;
- TUint8 iFadeTime_23_16;
- TUint8 iFadeTime_31_24;
- TUint8 iFadeLevel_7_0;
- TUint8 iFadeLevel_15_8;
- TUint8 iFadeLevel_23_16;
- TUint8 iFadeLevel_31_24;
- };
-
-struct TVibePacketPlayBasisEffectResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- };
-
-/**
- * Packet structures for PlayIVTEffect requests and responses.
- * Used with following commands:
- * - KVibeCmdPlayIVTEffectIncludeData
- * - KVibeCmdPlayIVTEffectNoData
- */
-struct TVibePacketPlayIVTEffectRequest
- {
- TUint16 iCmdCode;
- TUint16 iIvtDataSize;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- TUint8 iIvtIndex_7_0;
- TUint8 iIvtIndex_15_8;
- TUint8 iRepeat;
- TUint8 iIvtData[1];
- };
-
-struct TVibePacketPlayIVTEffectResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- };
-
-/**
- * Packet structures for ModifyBasisEffect request and response.
- * Used with following commands:
- * - KVibeCmdModifyBasisEffect
- * - KVibeCmdModifyPlayingMagSweepEffect
- * - KVibeCmdModifyPlayingPeriodicEffect
- */
-struct TVibePacketModifyBasisEffectRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- TUint8 iDuration_7_0;
- TUint8 iDuration_15_8;
- TUint8 iDuration_23_16;
- TUint8 iDuration_31_24;
- TUint8 iMagnitude_7_0;
- TUint8 iMagnitude_15_8;
- TUint8 iMagnitude_23_16;
- TUint8 iMagnitude_31_24;
- TUint8 iEffectTypeStyle;
- TUint8 iPeriod_7_0;
- TUint8 iPeriod_15_8;
- TUint8 iPeriod_23_16;
- TUint8 iPeriod_31_24;
- TUint8 iImpulseTime_7_0;
- TUint8 iImpulseTime_15_8;
- TUint8 iImpulseTime_23_16;
- TUint8 iImpulseTime_31_24;
- TUint8 iImpulseLevel_7_0;
- TUint8 iImpulseLevel_15_8;
- TUint8 iImpulseLevel_23_16;
- TUint8 iImpulseLevel_31_24;
- TUint8 iFadeTime_7_0;
- TUint8 iFadeTime_15_8;
- TUint8 iFadeTime_23_16;
- TUint8 iFadeTime_31_24;
- TUint8 iFadeLevel_7_0;
- TUint8 iFadeLevel_15_8;
- TUint8 iFadeLevel_23_16;
- TUint8 iFadeLevel_31_24;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketModifyBasisEffectResponse;
-
-/**
- * Packet structures for StopEffect request and response
- */
-struct TVibePacketStopEffectRequest
- {
- TUint16 iCmdCode;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketStopEffectResponse;
-
-/**
- * Packet structures for StopAllEffects request and response
- */
-struct TVibePacketStopAllEffectsRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketStopAllEffectsResponse;
-
-/**
- * Packet structures for GetDeviceCapabilities request and response
- */
-struct TVibePacketGetDeviceCapabilitiesRequest
- {
- TUint16 iCmdCode;
- TUint8 iCapabilityValueType;
- TUint8 iDeviceIndex_7_0;
- TUint8 iDeviceIndex_15_8;
- TUint8 iDeviceIndex_23_16;
- TUint8 iDeviceIndex_31_24;
- TUint8 iCapabilityType_7_0;
- TUint8 iCapabilityType_15_8;
- TUint8 iCapabilityType_23_16;
- TUint8 iCapabilityType_31_24;
- };
-
-struct TVibePacketGetDeviceCapabilitiesResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iCapabilityType_7_0;
- TUint8 iCapabilityType_15_8;
- TUint8 iCapabilityType_23_16;
- TUint8 iCapabilityType_31_24;
- TUint8 iCapabilityValueType;
- TUint8 iSize;
- TUint8 iCapabilityValue[1];
- };
-
-/**
- * Packet structures for Get DebugBuffer request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketGetDebugBufferRequest;
-
-struct TVibePacketGetDebugBufferResponse
- {
- TUint16 iCmdCode;
- TUint8 iBufferSize_7_0;
- TUint8 iBufferSize_15_8;
- TUint8 iBuffer[1];
- };
-
-/**
- * Packet structures for ResetDebugBuffer request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketResetDebugBufferRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketResetDebugBufferResponse;
-
-/**
- * Packet structures for Stop designer Bridge request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketStopDesignerBridgeRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketStopDesignerBridgeResponse;
-
-/**
- * Packet structures for GetDeviceState request and response
- */
-struct TVibePacketGetDeviceStateRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceIndex_7_0;
- TUint8 iDeviceIndex_15_8;
- TUint8 iDeviceIndex_23_16;
- TUint8 iDeviceIndex_31_24;
- };
-
-struct TVibePacketGetDeviceStateResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iDeviceState_7_0;
- TUint8 iDeviceState_15_8;
- TUint8 iDeviceState_23_16;
- TUint8 iDeviceState_31_24;
- };
-
-/**
- * Packet structures for Set Device Kernel Parameter request and response
- */
-struct TVibePacketSetKernelParameterRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceIndex_7_0;
- TUint8 iDeviceIndex_15_8;
- TUint8 iDeviceIndex_23_16;
- TUint8 iDeviceIndex_31_24;
- TUint8 iKernelParameterID_7_0;
- TUint8 iKernelParameterID_15_8;
- TUint8 iKernelParameterValue_7_0;
- TUint8 iKernelParameterValue_15_8;
- };
-
-struct TVibePacketSetKernelParameterResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iKernelParameterID_7_0;
- TUint8 iKernelParameterID_15_8;
- };
-
-/**
- * Get Device Kernel Parameter request and response
- */
- struct TVibePacketGetKernelParameterRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceIndex_7_0;
- TUint8 iDeviceIndex_15_8;
- TUint8 iDeviceIndex_23_16;
- TUint8 iDeviceIndex_31_24;
- TUint8 iKernelParameterID_7_0;
- TUint8 iKernelParameterID_15_8;
- };
-
-struct TVibePacketGetKernelParameterResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iKernelParameterID_7_0;
- TUint8 iKernelParameterID_15_8;
- TUint8 iKernelParameterValue_7_0;
- TUint8 iKernelParameterValue_15_8;
- };
-
-/**
- * Packet structures for SetDeviceProperty request and response
- */
-struct TVibePacketSetDevicePropertyRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- TUint8 iPropertyType_7_0;
- TUint8 iPropertyType_15_8;
- TUint8 iPropertyType_23_16;
- TUint8 iPropertyType_31_24;
- TUint8 iPropertyValueType;
- TUint8 iSize;
- TUint8 iPropertyValue[1];
- };
-
-struct TVibePacketSetDevicePropertyResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iPropertyType_7_0;
- TUint8 iPropertyType_15_8;
- TUint8 iPropertyType_23_16;
- TUint8 iPropertyType_31_24;
- TUint8 iPropertyValueType;
- };
-
-/**
- * Packet structures for GetDeviceProperty request and response
- */
-struct TVibePacketGetDevicePropertyRequest
- {
- TUint16 iCmdCode;
- TUint8 iPropertyValueType;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- TUint8 iPropertyType_7_0;
- TUint8 iPropertyType_15_8;
- TUint8 iPropertyType_23_16;
- TUint8 iPropertyType_31_24;
- };
-
-struct TVibePacketGetDevicePropertyResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iPropertyType_7_0;
- TUint8 iPropertyType_15_8;
- TUint8 iPropertyType_23_16;
- TUint8 iPropertyType_31_24;
- TUint8 iPropertyValueType;
- TUint8 iSize;
- TUint8 iPropertyValue[1];
- };
-
-/**
- * Packet structures for OpenDevice
- */
-struct TVibePacketOpenDeviceRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceIndex_7_0;
- TUint8 iDeviceIndex_15_8;
- TUint8 iDeviceIndex_23_16;
- TUint8 iDeviceIndex_31_24;
- };
-
-struct TVibePacketOpenDeviceResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-/**
- * Packet structures for CloseDevice request and response
- */
-struct TVibePacketCloseDeviceRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketCloseDeviceResponse;
-
-/**
- * Packet structures for Start designer Bridge request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketStartDesignedBridgeRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketStartDesignedBridgeResponse;
-
-/**
- * Packet structures for DeviceCount request and response
- */
-typedef TVibePacketSimpleRequest TVibePacketDeviceCountRequest;
-
-// Uses simple response packet struct where vibe_status contains
-// the device count (or negative error value)
-typedef TVibePacketSimpleResponse TVibePacketDeviceCountResponse;
-
-/**
- * Packet structures for Upload SPE data request and response
- */
-struct TVibePacketPlayStreamingSampleRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- TUint8 iSize;
- TUint8 iEffectOffsetTime_7_0;
- TUint8 iEffectOffsetTime_15_8;
- TUint8 iStreamingData[1];
- };
-
-typedef TVibePacketSimpleResponse TVibePacketPlayStreamingSampleResponse;
-
-/**
- * Packet structures for Create streaming effect request and response
- */
-struct TVibePacketCreateStreamingEffectRequest
- {
- TUint16 iCmdCode;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-struct TVibePacketCreateStreamingEffectResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- };
-
-/**
- * Packet structures for Destroy streaming effect request and response
- */
-struct TVibePacketDestroyStreamingEffectRequest
- {
- TUint16 iCmdCode;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketDestroyStreamingEffectResponse;
-
-/**
- * Packet structures for Pause Playing Effect request and response
- */
-struct TVibePacketPausePlayingEffectRequest
- {
- TUint16 iCmdCode;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-typedef TVibePacketSimpleResponse TVibePacketPausePlayingEffectResponse;
-
-/**
- * Packet structures for Resume Paused Effect request and response
- */
-typedef TVibePacketPausePlayingEffectRequest TVibePacketResumePlayingEffectRequest;
-
-typedef TVibePacketSimpleResponse TVibePacketResumePlayingEffectResponse;
-
-/**
- * Packet structures for Get effect state request and response
- */
-struct TVibePacketGetEffectStateRequest
- {
- TUint16 iCmdCode;
- TUint8 iEffectHandle_7_0;
- TUint8 iEffectHandle_15_8;
- TUint8 iEffectHandle_23_16;
- TUint8 iEffectHandle_31_24;
- TUint8 iDeviceHandle_7_0;
- TUint8 iDeviceHandle_15_8;
- TUint8 iDeviceHandle_23_16;
- TUint8 iDeviceHandle_31_24;
- };
-
-struct TVibePacketGetEffectStateResponse
- {
- TUint16 iCmdCode;
- TInt8 iVibeStatus;
- TInt8 iEffectState;
- };
-
-/**
- * Packet structures for license request and response
- * (Uses currently same packet structs as SetProperty)
- */
-typedef TVibePacketSetDevicePropertyRequest TVibePacketSetLicenseRequest;
-
-typedef TVibePacketSetDevicePropertyResponse TVibePacketSetLicenseResponse;
-
-/**
- * Packet union definition, useful for decoder function
- */
-union TVibePacket
- {
- TVibePacketSimpleRequest iSimpleReq;
- TVibePacketSimpleResponse iSimpleRsp;
- TVibePacketProtocolVersionRequest iProtocolVersionReq;
- TVibePacketProtocolVersionResponse iProtocolVersionRsp;
- TVibePacketApiVersionRequest iAPIVersionReq;
- TVibePacketApiVersionResponse iAPIVersionRsp;
- TVibePacketInitializeRequest iInitializeReq;
- TVibePacketInitializeResponse iInitializeRsp;
- TVibePacketTerminateRequest iTerminateReq;
- TVibePacketTerminateResponse iTerminateRsp;
- TVibePacketPlayBasisEffectRequest iPlayBasisEffectReq;
- TVibePacketPlayBasisEffectResponse iPlayBasisEffectRsp;
- TVibePacketPlayIVTEffectRequest iPlayIVTEffectReq;
- TVibePacketPlayIVTEffectResponse iPlayIVTEffectRsp;
- TVibePacketModifyBasisEffectRequest iModifyBasisEffectReq;
- TVibePacketModifyBasisEffectResponse iModifyBasisEffectRsp;
- TVibePacketStopEffectRequest iStopEffectReq;
- TVibePacketStopEffectResponse iStopEffectRsp;
- TVibePacketStopAllEffectsRequest iStopAllEffectsReq;
- TVibePacketStopAllEffectsResponse iStopAllEffectsRsp;
- TVibePacketGetDeviceCapabilitiesRequest iGetDeviceCapsReq;
- TVibePacketGetDeviceCapabilitiesResponse iGetDeviceCapsRsp;
- TVibePacketGetDebugBufferRequest iDebugBufferReq;
- TVibePacketGetDebugBufferResponse iDebugBufferRsp;
- TVibePacketResetDebugBufferRequest iResetDebugBufferReq;
- TVibePacketResetDebugBufferResponse iResetDebugBufferRsp;
- TVibePacketStopDesignerBridgeRequest iStopDesignerBridgeReq;
- TVibePacketStopDesignerBridgeResponse iStopDesignerBridgeRsp;
- TVibePacketGetDeviceStateRequest iGetDeviceStateReq;
- TVibePacketGetDeviceStateResponse iGetDeviceStateRsp;
- TVibePacketSetKernelParameterRequest iSetKernelParamsReq;
- TVibePacketSetKernelParameterResponse iSetKernelParamsRsp;
- TVibePacketGetKernelParameterRequest iGetKernelParamsReq;
- TVibePacketGetKernelParameterResponse iGetKernelParamsRsp;
- TVibePacketOpenDeviceRequest iOpenDeviceReq;
- TVibePacketOpenDeviceResponse iOpenDeviceRsp;
- TVibePacketCloseDeviceRequest iCloseDeviceReq;
- TVibePacketCloseDeviceResponse iCloseDeviceRsp;
- TVibePacketSetDevicePropertyRequest iSetDevicePropertyReq;
- TVibePacketSetDevicePropertyResponse iSetDevicePropertyRsp;
- TVibePacketGetDevicePropertyRequest iGetDevicePropertyReq;
- TVibePacketGetDevicePropertyResponse iGetDevicePropertyRsp;
- TVibePacketDeviceCountRequest iGetDeviceCountReq;
- TVibePacketDeviceCountResponse iGetDeviceCountRsp;
- TVibePacketStartDesignedBridgeRequest iStartDesignerBridgeReq;
- TVibePacketStartDesignedBridgeResponse iStartDesignerBridgeRsp;
- TVibePacketPlayStreamingSampleRequest iPlayStreamingSampleReq;
- TVibePacketPlayStreamingSampleResponse iPlayStreamingSampleRsp;
- TVibePacketCreateStreamingEffectRequest iCreateStreamingEffectReq;
- TVibePacketCreateStreamingEffectResponse iCreateStreamingEffectRsp;
- TVibePacketDestroyStreamingEffectRequest iDestroyStreamingEffectReq;
- TVibePacketDestroyStreamingEffectResponse iDestroyStreamingEffectRsp;
- TVibePacketPausePlayingEffectRequest iPausePlayingEffectReq;
- TVibePacketPausePlayingEffectResponse iPausePlayingEffectRsp;
- TVibePacketResumePlayingEffectRequest iResumePausedEffectReq;
- TVibePacketResumePlayingEffectResponse iResumePausedEffectRsp;
- TVibePacketGetEffectStateRequest iGetEffectStateReq;
- TVibePacketGetEffectStateResponse iGetEffectStateRsp;
- TVibePacketSetLicenseRequest iSetLicenseReq;
- TVibePacketSetLicenseResponse iSetLicenseRsp;
- };
-
-/**
- * The 1-byte alignment pack pragma definitions pop'ed out of stack.
- */
-#pragma pack( pop )
-
-#endif /* _HWRMHAPTICSVIBEPACKETS_H_ */
-
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/rom/hwrmhapticsvibepacketizerplugin.iby Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IBY file for the Vibe Packetizer plugin.
-*
-*/
-
-#ifndef HWRMHAPTICSVIBEPACKETIZERPLUGIN_IBY
-#define HWRMHAPTICSVIBEPACKETIZERPLUGIN_IBY
-
-#include <data_caging_paths_for_iby.hrh>
-
-ECOM_PLUGIN(hwrmhapticsvibepacketizerplugin.dll, hwrmhapticsvibepacketizerplugin.rsc)
-
-#endif // HWRMHAPTICSVIBEPACKETIZERPLUGIN_IBY
--- a/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/src/hwrmhapticsvibepacketizer.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1905 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Plugin for handling vibe command packages.
-*
-*/
-
-#include <ecom/implementationproxy.h>
-#include <badesca.h>
-#include <hwrmhaptics.h>
-
-#include "hwrmhapticsvibepacketizer.h"
-#include "hwrmhapticsvibepackets.h"
-#include "hwrmhapticsvibeconstants.h"
-
-// Default request message size (enough for any request message)
-const TInt KMsgDefaultSize = 80;
-
-// const for shifts
-const TInt KShiftByte = 8;
-const TInt KShift2Bytes = 16;
-const TInt KShift3Bytes = 24;
-
-const TInt KArrayElements = 10;
-
-// ---------------------------------------------------------------------------
-// Two phased constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsVibePacketizer* CHWRMHapticsVibePacketizer::NewL()
- {
- CHWRMHapticsVibePacketizer* self =
- new ( ELeave ) CHWRMHapticsVibePacketizer();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsVibePacketizer::~CHWRMHapticsVibePacketizer()
- {
- iReqBuf.Close();
- iDataBuf.Close();
-
- if( iReturnArray )
- {
- delete iReturnArray;
- iReturnArray = NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructor.
-// ---------------------------------------------------------------------------
-//
-CHWRMHapticsVibePacketizer::CHWRMHapticsVibePacketizer()
- : iDeviceHandle( KErrNotFound )
- {
- }
-
-// ---------------------------------------------------------------------------
-// 2nd phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CHWRMHapticsVibePacketizer::ConstructL()
- {
- User::LeaveIfError( iReqBuf.CreateMax( KMsgDefaultSize ) );
- User::LeaveIfError( iDataBuf.CreateMax( KMsgDefaultSize ) );
-
- iReturnArray = new (ELeave) CDesC8ArraySeg( KArrayElements );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncOpenDeviceReq(
- THWRMLogicalActuators aLogicalActuator, RBuf8& aBuffer )
- {
- TVibePacketOpenDeviceRequest* pReq =
- reinterpret_cast<TVibePacketOpenDeviceRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdOpenDevice;
- pReq->iDeviceIndex_7_0 =
- static_cast<TUint8>( aLogicalActuator & 0xFF );
- pReq->iDeviceIndex_15_8 =
- static_cast<TUint8>( ( aLogicalActuator >> KShiftByte ) & 0xFF );
- pReq->iDeviceIndex_23_16 =
- static_cast<TUint8>(
- ( aLogicalActuator >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceIndex_31_24 =
- static_cast<TUint8>(
- ( aLogicalActuator >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof ( TVibePacketOpenDeviceRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncCloseDeviceReq( TInt aDeviceHandle,
- RBuf8& aBuffer )
- {
- TVibePacketCloseDeviceRequest* pReq =
- reinterpret_cast<TVibePacketCloseDeviceRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdCloseDevice;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketCloseDeviceRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayMagSweepEffectReq(
- TInt aDeviceHandle, CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect,
- RBuf8& aBuffer )
- {
- TVibePacketPlayBasisEffectRequest* pReq =
- reinterpret_cast<TVibePacketPlayBasisEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdPlayMagSweepEffect;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDuration_7_0 =
- static_cast<TUint8>( aEffect.iDuration & 0xFF );
- pReq->iDuration_15_8 =
- static_cast<TUint8>( ( aEffect.iDuration >> KShiftByte ) & 0xFF );
- pReq->iDuration_23_16 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
- pReq->iDuration_31_24 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
- pReq->iMagnitude_7_0 =
- static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
- pReq->iMagnitude_15_8 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
- pReq->iMagnitude_23_16 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
- pReq->iMagnitude_31_24 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
- pReq->iEffectTypeStyle =
- static_cast<TUint8>( ( aEffect.iStyle << 4 ) & 0xF0 );
- pReq->iPeriod_7_0 = 0x0;
- pReq->iPeriod_15_8 = 0x0;
- pReq->iPeriod_23_16 = 0x0;
- pReq->iPeriod_31_24 = 0x0;
- pReq->iImpulseTime_7_0 =
- static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
- pReq->iImpulseTime_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
- pReq->iImpulseTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
- pReq->iImpulseLevel_7_0 =
- static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
- pReq->iImpulseLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
- pReq->iImpulseLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
- pReq->iFadeTime_7_0 =
- static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
- pReq->iFadeTime_15_8 =
- static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
- pReq->iFadeTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
- pReq->iFadeTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
- pReq->iFadeLevel_7_0 =
- static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
- pReq->iFadeLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
- pReq->iFadeLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
- pReq->iFadeLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketPlayBasisEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayPeriodicEffectReq( TInt aDeviceHandle,
- CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect, RBuf8& aBuffer )
- {
- TVibePacketPlayBasisEffectRequest* pReq =
- reinterpret_cast<TVibePacketPlayBasisEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdPlayPeriodicEffect;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDuration_7_0 =
- static_cast<TUint8>( aEffect.iDuration & 0xFF );
- pReq->iDuration_15_8 =
- static_cast<TUint8>( ( aEffect.iDuration >> KShiftByte ) & 0xFF );
- pReq->iDuration_23_16 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
- pReq->iDuration_31_24 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
- pReq->iMagnitude_7_0 =
- static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
- pReq->iMagnitude_15_8 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
- pReq->iMagnitude_23_16 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
- pReq->iMagnitude_31_24 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
- pReq->iEffectTypeStyle =
- static_cast<TUint8>( ( ( aEffect.iStyle << 4 ) & 0xF0 ) | 0x01 );
- pReq->iPeriod_7_0 =
- static_cast<TUint8>( aEffect.iPeriod & 0xFF );
- pReq->iPeriod_15_8 =
- static_cast<TUint8>( ( aEffect.iPeriod >> KShiftByte ) & 0xFF );
- pReq->iPeriod_23_16 =
- static_cast<TUint8>( ( aEffect.iPeriod >> KShift2Bytes ) & 0xFF );
- pReq->iPeriod_31_24 =
- static_cast<TUint8>( ( aEffect.iPeriod >> KShift3Bytes ) & 0xFF );
- pReq->iImpulseTime_7_0 =
- static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
- pReq->iImpulseTime_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
- pReq->iImpulseTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
- pReq->iImpulseLevel_7_0 =
- static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
- pReq->iImpulseLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
- pReq->iImpulseLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
- pReq->iFadeTime_7_0 =
- static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
- pReq->iFadeTime_15_8 =
- static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
- pReq->iFadeTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
- pReq->iFadeTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
- pReq->iFadeLevel_7_0 =
- static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
- pReq->iFadeLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
- pReq->iFadeLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
- pReq->iFadeLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketPlayBasisEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncModifyPlayingMagSweepEffectReq(
- TInt aDeviceHandle, TInt aEffectHandle,
- CHWRMHaptics::THWRMHapticsMagSweepEffect aEffect, RBuf8& aBuffer )
- {
- TVibePacketModifyBasisEffectRequest* pReq =
- reinterpret_cast<TVibePacketModifyBasisEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdModifyPlayingMagSweepEffect;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDuration_7_0 =
- static_cast<TUint8>( aEffect.iDuration & 0xFF );
- pReq->iDuration_15_8 =
- static_cast<TUint8>( ( aEffect.iDuration >> KShiftByte ) & 0xFF );
- pReq->iDuration_23_16 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
- pReq->iDuration_31_24 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
- pReq->iMagnitude_7_0 =
- static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
- pReq->iMagnitude_15_8 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
- pReq->iMagnitude_23_16 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
- pReq->iMagnitude_31_24 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
- pReq->iEffectTypeStyle =
- static_cast<TUint8>( ( aEffect.iStyle << 4 ) & 0xF0 );
- pReq->iPeriod_7_0 = 0x0;
- pReq->iPeriod_15_8 = 0x0;
- pReq->iPeriod_23_16 = 0x0;
- pReq->iPeriod_31_24 = 0x0;
- pReq->iImpulseTime_7_0 =
- static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
- pReq->iImpulseTime_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
- pReq->iImpulseTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
- pReq->iImpulseLevel_7_0 =
- static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
- pReq->iImpulseLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
- pReq->iImpulseLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
- pReq->iFadeTime_7_0 =
- static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
- pReq->iFadeTime_15_8 =
- static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
- pReq->iFadeTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
- pReq->iFadeTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
- pReq->iFadeLevel_7_0 =
- static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
- pReq->iFadeLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
- pReq->iFadeLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
- pReq->iFadeLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketModifyBasisEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncModifyPlayingPeriodicEffectReq(
- TInt aDeviceHandle, TInt aEffectHandle,
- CHWRMHaptics::THWRMHapticsPeriodicEffect aEffect, RBuf8& aBuffer )
- {
- TVibePacketModifyBasisEffectRequest* pReq =
- reinterpret_cast<TVibePacketModifyBasisEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdModifyPlayingPeriodicEffect;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDuration_7_0 =
- static_cast<TUint8>( aEffect.iDuration & 0xFF );
- pReq->iDuration_15_8 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShiftByte ) & 0xFF );
- pReq->iDuration_23_16 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift2Bytes ) & 0xFF );
- pReq->iDuration_31_24 =
- static_cast<TUint8>(
- ( aEffect.iDuration >> KShift3Bytes ) & 0xFF );
- pReq->iMagnitude_7_0 =
- static_cast<TUint8>( aEffect.iMagnitude & 0xFF );
- pReq->iMagnitude_15_8 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShiftByte ) & 0xFF );
- pReq->iMagnitude_23_16 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift2Bytes ) & 0xFF );
- pReq->iMagnitude_31_24 =
- static_cast<TUint8>(
- ( aEffect.iMagnitude >> KShift3Bytes ) & 0xFF );
- pReq->iEffectTypeStyle =
- static_cast<TUint8>( ( ( aEffect.iStyle << 4 ) & 0xF0 ) | 0x01 );
- pReq->iPeriod_7_0 =
- static_cast<TUint8>( aEffect.iPeriod & 0xFF );
- pReq->iPeriod_15_8 =
- static_cast<TUint8>( ( aEffect.iPeriod >> KShiftByte ) & 0xFF );
- pReq->iPeriod_23_16 =
- static_cast<TUint8>( ( aEffect.iPeriod >> KShift2Bytes ) & 0xFF );
- pReq->iPeriod_31_24 =
- static_cast<TUint8>( ( aEffect.iPeriod >> KShift3Bytes ) & 0xFF );
- pReq->iImpulseTime_7_0 =
- static_cast<TUint8>( aEffect.iAttackTime & 0xFF );
- pReq->iImpulseTime_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShiftByte ) & 0xFF );
- pReq->iImpulseTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackTime >> KShift3Bytes ) & 0xFF );
- pReq->iImpulseLevel_7_0 =
- static_cast<TUint8>( aEffect.iAttackLevel & 0xFF );
- pReq->iImpulseLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShiftByte ) & 0xFF );
- pReq->iImpulseLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift2Bytes ) & 0xFF );
- pReq->iImpulseLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iAttackLevel >> KShift3Bytes ) & 0xFF );
- pReq->iFadeTime_7_0 =
- static_cast<TUint8>( aEffect.iFadeTime & 0xFF );
- pReq->iFadeTime_15_8 =
- static_cast<TUint8>( ( aEffect.iFadeTime >> KShiftByte ) & 0xFF );
- pReq->iFadeTime_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift2Bytes ) & 0xFF );
- pReq->iFadeTime_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeTime >> KShift3Bytes ) & 0xFF );
- pReq->iFadeLevel_7_0 =
- static_cast<TUint8>( aEffect.iFadeLevel & 0xFF );
- pReq->iFadeLevel_15_8 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShiftByte ) & 0xFF );
- pReq->iFadeLevel_23_16 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift2Bytes ) & 0xFF );
- pReq->iFadeLevel_31_24 =
- static_cast<TUint8>(
- ( aEffect.iFadeLevel >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketModifyBasisEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPausePlayingEffectReq(
- TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
- {
- TVibePacketPausePlayingEffectRequest* pReq =
- reinterpret_cast<TVibePacketPausePlayingEffectRequest*>
- (const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdPausePlayingEffect;
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketPausePlayingEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncResumePausedEffectReq(
- TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
- {
- TVibePacketResumePlayingEffectRequest* pReq =
- reinterpret_cast<TVibePacketResumePlayingEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdResumePausedEffect;
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketResumePlayingEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncStopPlayingEffectReq(
- TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
- {
- TVibePacketStopEffectRequest* pReq =
- reinterpret_cast<TVibePacketStopEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdStopEffect;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketStopEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncStopAllPlayingEffectsReq(
- TInt aDeviceHandle, RBuf8& aBuffer )
- {
- TVibePacketStopAllEffectsRequest* pReq =
- reinterpret_cast<TVibePacketStopAllEffectsRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdStopAllEffects;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketStopAllEffectsRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectIncludeEffectDataReq(
- TInt aDeviceHandle, const TDesC8& aData, TInt aEffectIndex,
- RBuf8& aBuffer )
- {
- iDataBuf.Close();
- TInt err = iDataBuf.Create( aData.Size() + KMsgDefaultSize );
-
- TVibePacketPlayIVTEffectRequest* pReq =
- reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
- ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-
- if ( !err && pReq &&
- ( ( aData.Size() + KMsgDefaultSize ) <= KVibePacketMaxSize ) )
- {
- pReq->iCmdCode = KVibeCmdPlayIVTEffectIncludeData;
- pReq->iIvtDataSize = aData.Size();
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iIvtIndex_7_0 =
- static_cast<TUint8>( aEffectIndex & 0xFF );
- pReq->iIvtIndex_15_8 =
- static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
- pReq->iRepeat = 0x0;
-
- memcpy( pReq->iIvtData, aData.Ptr(), aData.Size() );
-
- // the data buffer length is set to the size of the request packet
- // plus size of the data minus 1 (minus 1, because first byte of the
- // data is already calculated as part of the request packet size).
- iDataBuf.SetLength(
- sizeof( TVibePacketPlayIVTEffectRequest ) + aData.Size() -1 );
- }
- else
- {
- iDataBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iDataBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectRepeatIncludeEffectDataReq(
- TInt aDeviceHandle, const TDesC8& aData, TInt aEffectIndex,
- TUint8 aRepeat, RBuf8& aBuffer )
- {
- iDataBuf.Close();
- TInt err = iDataBuf.Create( aData.Size() + KMsgDefaultSize );
-
- TVibePacketPlayIVTEffectRequest* pReq =
- reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
- ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-
- if ( !err && pReq &&
- ( ( aData.Size() + KMsgDefaultSize ) <= KVibePacketMaxSize ) )
- {
- pReq->iCmdCode = KVibeCmdPlayIVTEffectIncludeData;
- pReq->iIvtDataSize = aData.Size();
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iIvtIndex_7_0 =
- static_cast<TUint8>( aEffectIndex & 0xFF );
- pReq->iIvtIndex_15_8 =
- static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
- pReq->iRepeat = aRepeat;
-
- memcpy( pReq->iIvtData, aData.Ptr(), aData.Size() );
-
- // the data buffer length is set to the size of the request packet
- // plus size of the data minus 1 (minus 1, because first byte of the
- // data is already calculated as part of the request packet size).
- iDataBuf.SetLength(
- sizeof( TVibePacketPlayIVTEffectRequest ) + aData.Size() -1 );
- }
- else
- {
- iDataBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iDataBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectRepeatNoDataReq(
- TInt aDeviceHandle, TInt aEffectIndex, TUint8 aRepeat, RBuf8& aBuffer )
- {
- TVibePacketPlayIVTEffectRequest* pReq =
- reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdPlayIVTEffectNoData;
- pReq->iIvtDataSize = 0x0;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iIvtIndex_7_0 =
- static_cast<TUint8>( aEffectIndex & 0xFF );
- pReq->iIvtIndex_15_8 =
- static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
- pReq->iRepeat = aRepeat;
- iReqBuf.SetLength( sizeof( TVibePacketPlayIVTEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayEffectNoDataReq(
- TInt aDeviceHandle, TInt aEffectIndex, RBuf8& aBuffer )
- {
- TVibePacketPlayIVTEffectRequest* pReq =
- reinterpret_cast<TVibePacketPlayIVTEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdPlayIVTEffectNoData;
- pReq->iIvtDataSize = 0x0;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iIvtIndex_7_0 =
- static_cast<TUint8>( aEffectIndex & 0xFF );
- pReq->iIvtIndex_15_8 =
- static_cast<TUint8>( ( aEffectIndex >> KShiftByte ) & 0xFF );
- pReq->iRepeat = 0x0;
- iReqBuf.SetLength( sizeof( TVibePacketPlayIVTEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncCreateStreamingEffectReq(
- TInt aDeviceHandle, RBuf8& aBuffer )
- {
- TVibePacketCreateStreamingEffectRequest* pReq =
- reinterpret_cast<TVibePacketCreateStreamingEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdCreateStreamingEffect;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength(
- sizeof( TVibePacketCreateStreamingEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncDestroyStreamingEffectReq(
- TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
- {
- TVibePacketDestroyStreamingEffectRequest* pReq =
- reinterpret_cast<TVibePacketDestroyStreamingEffectRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdDestroyStreamingEffect;
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength(
- sizeof( TVibePacketDestroyStreamingEffectRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayStreamingSampleReq(
- TInt aDeviceHandle, const TDesC8& aStreamingSample, TInt aEffectHandle,
- RBuf8& aBuffer )
- {
- return EncPlayStreamingSampleInternal( aDeviceHandle,
- aEffectHandle,
- aStreamingSample,
- 0, aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayStreamingSampleWithOffsetReq(
- TInt aDeviceHandle, const TDesC8& aStreamingSample, TInt aOffsetTime,
- TInt aEffectHandle, RBuf8& aBuffer )
- {
- return EncPlayStreamingSampleInternal( aDeviceHandle,
- aEffectHandle,
- aStreamingSample,
- aOffsetTime,
- aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetEffectStateReq(
- TInt aDeviceHandle, TInt aEffectHandle, RBuf8& aBuffer )
- {
- TVibePacketGetEffectStateRequest* pReq =
- reinterpret_cast<TVibePacketGetEffectStateRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdGetEffectState;
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof( TVibePacketGetEffectStateRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetDevicePropertyBoolReq(
- TInt aDeviceHandle, TBool aDevPropValue, TInt aDevPropType,
- RBuf8& aBuffer )
- {
- TVibePacketSetDevicePropertyRequest* pReq =
- reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdSetDeviceProperty;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyType_7_0 =
- static_cast<TUint8>( aDevPropType & 0xFF );
- pReq->iPropertyType_15_8 =
- static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
- pReq->iPropertyType_23_16 =
- static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
- pReq->iPropertyType_31_24 =
- static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyValueType =
- static_cast<TUint8>( KVibeValuetypeBool );
- pReq->iSize = 1; // size of bool data is 1 byte
- pReq->iPropertyValue[0] =
- static_cast<TUint8>( aDevPropValue );
- iReqBuf.SetLength( sizeof( TVibePacketSetDevicePropertyRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetDevicePropertyIntReq(
- TInt aDeviceHandle, TInt aDevPropValue, TInt aDevPropType,
- RBuf8& aBuffer )
- {
- TVibePacketSetDevicePropertyRequest* pReq =
- reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdSetDeviceProperty;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyType_7_0 =
- static_cast<TUint8>( aDevPropType & 0xFF );
- pReq->iPropertyType_15_8 =
- static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
- pReq->iPropertyType_23_16 =
- static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
- pReq->iPropertyType_31_24 =
- static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyValueType =
- static_cast<TUint8>( KVibeValuetypeInt32 );
- pReq->iSize = 4; // Size of int32 value is 4 bytes
- pReq->iPropertyValue[0] =
- static_cast<TUint8>( aDevPropValue & 0xFF );
- pReq->iPropertyValue[1] =
- static_cast<TUint8>( ( aDevPropValue >> KShiftByte ) & 0xFF );
- pReq->iPropertyValue[2] =
- static_cast<TUint8>( ( aDevPropValue >> KShift2Bytes ) & 0xFF );
- pReq->iPropertyValue[3] =
- static_cast<TUint8>( ( aDevPropValue >> KShift3Bytes ) & 0xFF );
- // the data buffer length is set to the size of the request packet
- // plus size of the data minus 1. Since int32 type data is always
- // 4 bytes, the extra size needed for data is 3 bytes (4-1).
- iReqBuf.SetLength(
- sizeof( TVibePacketSetDevicePropertyRequest ) +3 );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetDevicePropertyStringReq(
- TInt aDeviceHandle, const TDesC8& aDevPropValue, TInt aDevPropType,
- RBuf8& aBuffer )
- {
- iDataBuf.Close();
- TInt err = iDataBuf.Create( aDevPropValue.Size() + KMsgDefaultSize );
-
- TVibePacketSetDevicePropertyRequest* pReq =
- reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
- ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-
- if ( !err && pReq &&
- ( ( aDevPropValue.Size() + KMsgDefaultSize ) <= KVibePacketMaxSize ) )
- {
- pReq->iCmdCode = KVibeCmdSetDeviceProperty;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyType_7_0 =
- static_cast<TUint8>( aDevPropType & 0xFF );
- pReq->iPropertyType_15_8 =
- static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
- pReq->iPropertyType_23_16 =
- static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
- pReq->iPropertyType_31_24 =
- static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyValueType =
- static_cast<TUint8>( KVibeValuetypeString );
- pReq->iSize =
- static_cast<TUint8>( aDevPropValue.Size() );
-
- memcpy ( pReq->iPropertyValue,
- reinterpret_cast<TUint8*>(
- const_cast<TUint8*>( aDevPropValue.Ptr() ) ),
- aDevPropValue.Size() );
-
- // the data buffer length is set to the size of the request packet
- // plus size of the data minus 1 (minus 1, because first byte of the
- // data is already calculated as part of the request packet size).
- iDataBuf.SetLength(
- sizeof( TVibePacketSetDevicePropertyRequest ) + pReq->iSize -1 );
- }
- else
- {
- iDataBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iDataBuf );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncSetPlatformLicenseKeyReq(
- TInt aDeviceHandle, RBuf8& aBuffer )
- {
- TInt ret = EncSetDevicePropertyStringReq( aDeviceHandle, KNullDesC8,
- CHWRMHaptics::EHWRMHapticsLicensekey,
- aBuffer );
-
- // change the command id from general device property to setting
- // license key
- if ( ret == KErrNone )
- {
- TVibePacketSetDevicePropertyRequest* tmpReq =
- reinterpret_cast<TVibePacketSetDevicePropertyRequest*>
- ( const_cast<TUint8*>( aBuffer.Ptr() ) );
-
- if ( tmpReq )
- {
- tmpReq->iCmdCode = KVibeCmdSetLicense;
- }
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyBoolReq(
- TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
- {
- return EncGetDevicePropertyReqInternal(
- KVibeValuetypeBool, aDeviceHandle, aDevPropType, aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyIntReq(
- TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
- {
- return EncGetDevicePropertyReqInternal(
- KVibeValuetypeInt32, aDeviceHandle, aDevPropType, aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyStringReq(
- TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
- {
- return EncGetDevicePropertyReqInternal(
- KVibeValuetypeString, aDeviceHandle, aDevPropType, aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDeviceCapabilityIntReq(
- TInt aDeviceHandle, TInt aDevCapType, RBuf8& aBuffer )
- {
- return EncGetDeviceCapabilityReqInternal( KVibeValuetypeInt32,
- aDeviceHandle,
- aDevCapType,
- aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDeviceCapabilityStringReq(
- TInt aDeviceHandle, TInt aDevCapType, RBuf8& aBuffer )
- {
- return EncGetDeviceCapabilityReqInternal( KVibeValuetypeString,
- aDeviceHandle,
- aDevCapType,
- aBuffer );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CDesC8ArraySeg* CHWRMHapticsVibePacketizer::DecodeMessageL(
- const TDesC8& aData, TInt& aStatus )
- {
- // Clear Array before use
- iReturnArray->Reset();
-
- TVibePacket* pRsp =
- reinterpret_cast<TVibePacket*>( const_cast<TUint8*>( aData.Ptr() ) );
-
- switch( pRsp->iSimpleRsp.iCmdCode )
- {
- case KVibeCmdOpenDevice:
- {
- aStatus = pRsp->iOpenDeviceRsp.iVibeStatus;
- iDeviceHandle =
- pRsp->iOpenDeviceRsp.iDeviceHandle_7_0 |
- pRsp->iOpenDeviceRsp.iDeviceHandle_15_8 << KShiftByte |
- pRsp->iOpenDeviceRsp.iDeviceHandle_23_16 << KShift2Bytes |
- pRsp->iOpenDeviceRsp.iDeviceHandle_31_24 << KShift3Bytes;
-
- TPckg<TInt> deviceHandlePckg( iDeviceHandle );
-
- iReturnArray->AppendL( deviceHandlePckg );
- break;
- }
-
- case KVibeCmdCloseDevice:
- {
- aStatus = pRsp->iCloseDeviceRsp.iVibeStatus;
- iDeviceHandle = KErrNotFound;
- break;
- }
-
- case KVibeCmdSetDeviceProperty: // flow through
- case KVibeCmdSetLicense:
- {
- aStatus = pRsp->iSetDevicePropertyRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdGetDeviceProperty:
- {
- TInt propertyValueType =
- pRsp->iGetDevicePropertyRsp.iPropertyValueType;
-
- switch( propertyValueType )
- {
- case KVibeValuetypeBool:
- {
- aStatus = pRsp->iGetDevicePropertyRsp.iVibeStatus;
-
- TUint8* intArr =
- pRsp->iGetDevicePropertyRsp.iPropertyValue;
-
- TUint value = ( TUint( intArr[0] ) );
- TPckg<TBool> devicePropertyValuePckg( value );
-
- iReturnArray->AppendL( devicePropertyValuePckg );
- break;
- }
- case KVibeValuetypeInt32:
- {
- aStatus = pRsp->iGetDevicePropertyRsp.iVibeStatus;
-
- TUint8* intArr =
- pRsp->iGetDevicePropertyRsp.iPropertyValue;
-
- TUint value = ( TUint( intArr[0] ) )
- | ( TUint( intArr[1] ) << KShiftByte )
- | ( TUint( intArr[2] ) << KShift2Bytes )
- | ( TUint( intArr[3] ) << KShift3Bytes );
- TPckg<TInt> devicePropertyValuePckg( value );
-
- iReturnArray->AppendL( devicePropertyValuePckg );
- break;
- }
-
- case KVibeValuetypeString:
- {
- aStatus = pRsp->iGetDevicePropertyRsp.iVibeStatus;
- TInt stringSize = pRsp->iGetDevicePropertyRsp.iSize;
-
- if( stringSize > MaxPropertyStringLength() )
- {
- // truncate string if too long
- stringSize = MaxPropertyStringLength();
- }
-
- TUint8* text = reinterpret_cast<TUint8*>(
- pRsp->iGetDevicePropertyRsp.iPropertyValue );
- TPtrC8 ptr( text, stringSize );
-
- iReturnArray->AppendL( ptr );
- break;
- }
- default:
- break;
- }// switch
- break;
- }
-
- case KVibeCmdPlayMagSweepEffect: // flow through
- case KVibeCmdPlayPeriodicEffect:
- {
- aStatus = pRsp->iPlayBasisEffectRsp.iVibeStatus;
- TInt effectHandle =
- pRsp->iPlayBasisEffectRsp.iEffectHandle_7_0 |
- pRsp->iPlayBasisEffectRsp.iEffectHandle_15_8 << KShiftByte |
- pRsp->iPlayBasisEffectRsp.iEffectHandle_23_16 << KShift2Bytes |
- pRsp->iPlayBasisEffectRsp.iEffectHandle_31_24 << KShift3Bytes;
-
- TPckg<TInt> effectHandlePckg( effectHandle );
- iReturnArray->AppendL( effectHandlePckg );
- break;
- }
-
- case KVibeCmdPlayIVTEffectIncludeData: // flow through
- case KVibeCmdPlayIVTEffectNoData:
- {
- aStatus = pRsp->iPlayIVTEffectRsp.iVibeStatus;
- TInt effectHandle =
- pRsp->iPlayIVTEffectRsp.iEffectHandle_7_0 |
- pRsp->iPlayIVTEffectRsp.iEffectHandle_15_8 << KShiftByte |
- pRsp->iPlayIVTEffectRsp.iEffectHandle_23_16 << KShift2Bytes |
- pRsp->iPlayIVTEffectRsp.iEffectHandle_31_24 << KShift3Bytes;
-
- TPckg<TInt> effectHandlePckg( effectHandle );
- iReturnArray->AppendL( effectHandlePckg );
- break;
- }
-
- case KVibeCmdModifyPlayingMagSweepEffect: // flow through
- case KVibeCmdModifyPlayingPeriodicEffect:
- {
- aStatus = pRsp->iModifyBasisEffectRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdStopEffect:
- {
- aStatus = pRsp->iStopEffectRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdStopAllEffects:
- {
- aStatus = pRsp->iStopAllEffectsRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdGetDeviceCapabilities:
- {
- TInt capabilityValueType =
- pRsp->iGetDeviceCapsRsp.iCapabilityValueType;
-
- switch( capabilityValueType )
- {
- case KVibeValuetypeInt32:
- {
- aStatus = pRsp->iGetDeviceCapsRsp.iVibeStatus;
- TUint8* intArr =
- pRsp->iGetDeviceCapsRsp.iCapabilityValue;
-
- TUint value = ( TUint( intArr[0] ) )
- | ( TUint( intArr[1] ) << KShiftByte )
- | ( TUint( intArr[2] ) << KShift2Bytes )
- | ( TUint( intArr[3] ) << KShift3Bytes );
-
- TPckg<TInt> deviceCapabilityValuePckg( value );
- iReturnArray->AppendL( deviceCapabilityValuePckg );
- break;
- }
-
- case KVibeValuetypeString:
- {
- aStatus = pRsp->iGetDeviceCapsRsp.iVibeStatus;
- TUint8* text =
- reinterpret_cast<TUint8*>(
- pRsp->iGetDeviceCapsRsp.iCapabilityValue );
- TInt stringSize ( pRsp->iGetDeviceCapsRsp.iSize );
-
- if( stringSize > MaxCapabilityStringLength() )
- {
- // truncate string if too long
- stringSize = MaxCapabilityStringLength();
- }
- TPtrC8 ptr( text, stringSize );
-
- iReturnArray->AppendL( ptr );
- break;
- }
- default:
- break;
- }// switch
- break;
- }
-
- case KVibeCmdPlayStreamingSample:
- {
- aStatus = pRsp->iPlayStreamingSampleRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdCreateStreamingEffect:
- {
- aStatus = pRsp->iCreateStreamingEffectRsp.iVibeStatus;
-
- TInt effectHandle =
- pRsp->iCreateStreamingEffectRsp.iEffectHandle_7_0 |
- pRsp->iCreateStreamingEffectRsp.iEffectHandle_15_8
- << KShiftByte |
- pRsp->iCreateStreamingEffectRsp.iEffectHandle_23_16
- << KShift2Bytes |
- pRsp->iCreateStreamingEffectRsp.iEffectHandle_31_24
- << KShift3Bytes;
-
- TPckg<TInt> effectHandlePckg( effectHandle );
- iReturnArray->AppendL( effectHandlePckg );
- break;
- }
-
- case KVibeCmdDestroyStreamingEffect:
- {
- aStatus = pRsp->iDestroyStreamingEffectRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdPausePlayingEffect:
- {
- aStatus = pRsp->iPausePlayingEffectRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdResumePausedEffect:
- {
- aStatus = pRsp->iResumePausedEffectRsp.iVibeStatus;
- break;
- }
-
- case KVibeCmdGetEffectState:
- {
- aStatus = pRsp->iGetEffectStateRsp.iVibeStatus;
- TInt effectState = pRsp->iGetEffectStateRsp.iEffectState;
-
- TPckg<TInt> effectStatePckg( effectState );
- iReturnArray->AppendL( effectStatePckg );
- break;
- }
-
- default:
- User::Leave( KErrGeneral );
- }
-
- // convert vibe error code to Symbian error code
- aStatus = MapError( aStatus );
-
- return iReturnArray;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::DeviceHandle()
- {
- return iDeviceHandle;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::InfiniteRepeat()
- {
- return static_cast<TInt>( KVibeRepeatCountInfinite );
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::InfiniteDuration()
- {
- return KVibeTimeInfinite;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxEffectNameLength()
- {
- return KVibeMaxEffectNameLength;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxDeviceNameLength()
- {
- return KVibeMaxDeviceNameLength;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxCapabilityStringLength()
- {
- return KVibeMaxCapabilityStringLength;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxPropertyStringLength()
- {
- return KVibeMaxPropertyStringLength;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MaxStreamingSampleSize()
- {
- return KVibeMaxStreamingSampleSize;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::DefaultDevicePriority()
- {
- return KVibeDevicePriorityDefault;
- }
-
-// ---------------------------------------------------------------------------
-// Internal helper method. Fills Get Device Capability request data.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDeviceCapabilityReqInternal(
- TInt aValueType, TInt aDeviceHandle, TInt aDevCapType, RBuf8& aBuffer )
- {
- TVibePacketGetDeviceCapabilitiesRequest* pReq =
- reinterpret_cast<TVibePacketGetDeviceCapabilitiesRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdGetDeviceCapabilities;
- pReq->iCapabilityValueType =
- static_cast<TUint8>( aValueType );
- pReq->iDeviceIndex_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceIndex_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceIndex_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceIndex_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iCapabilityType_7_0 =
- static_cast<TUint8>( aDevCapType & 0xFF );
- pReq->iCapabilityType_15_8 =
- static_cast<TUint8>( ( aDevCapType >> KShiftByte ) & 0xFF );
- pReq->iCapabilityType_23_16 =
- static_cast<TUint8>( ( aDevCapType >> KShift2Bytes ) & 0xFF );
- pReq->iCapabilityType_31_24 =
- static_cast<TUint8>( ( aDevCapType >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength(
- sizeof ( TVibePacketGetDeviceCapabilitiesRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-// Internal helper method. Fills Get Device Property request data.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncGetDevicePropertyReqInternal(
- TInt aValueType, TInt aDeviceHandle, TInt aDevPropType, RBuf8& aBuffer )
- {
- TVibePacketGetDevicePropertyRequest* pReq =
- reinterpret_cast<TVibePacketGetDevicePropertyRequest*>
- ( const_cast<TUint8*>( iReqBuf.Ptr() ) );
-
- if ( pReq )
- {
- pReq->iCmdCode = KVibeCmdGetDeviceProperty;
- pReq->iPropertyValueType =
- static_cast<TUint8>( aValueType );
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iPropertyType_7_0 =
- static_cast<TUint8>( aDevPropType & 0xFF );
- pReq->iPropertyType_15_8 =
- static_cast<TUint8>( ( aDevPropType >> KShiftByte ) & 0xFF );
- pReq->iPropertyType_23_16 =
- static_cast<TUint8>( ( aDevPropType >> KShift2Bytes ) & 0xFF );
- pReq->iPropertyType_31_24 =
- static_cast<TUint8>( ( aDevPropType >> KShift3Bytes ) & 0xFF );
- iReqBuf.SetLength( sizeof ( TVibePacketGetDevicePropertyRequest ) );
- }
- else
- {
- iReqBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iReqBuf );
- }
-
-// ---------------------------------------------------------------------------
-// Internal helper method. Fills Play Streaming Sample request data.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::EncPlayStreamingSampleInternal(
- TInt aDeviceHandle, TInt aEffectHandle, const TDesC8& aStreamingSample,
- TInt aOffsetTime, RBuf8& aBuffer )
- {
- iDataBuf.Close();
- TInt err = iDataBuf.Create( aStreamingSample.Size() + KMsgDefaultSize );
-
- TVibePacketPlayStreamingSampleRequest* pReq =
- reinterpret_cast<TVibePacketPlayStreamingSampleRequest*>
- ( const_cast<TUint8*>( iDataBuf.Ptr() ) );
-
- if ( !err && pReq &&
- ( ( aStreamingSample.Size() + KMsgDefaultSize ) <=
- KVibePacketMaxSize ) )
- {
- pReq->iCmdCode = KVibeCmdPlayStreamingSample;
- pReq->iDeviceHandle_7_0 =
- static_cast<TUint8>( aDeviceHandle & 0xFF );
- pReq->iDeviceHandle_15_8 =
- static_cast<TUint8>( ( aDeviceHandle >> KShiftByte ) & 0xFF );
- pReq->iDeviceHandle_23_16 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift2Bytes ) & 0xFF );
- pReq->iDeviceHandle_31_24 =
- static_cast<TUint8>( ( aDeviceHandle >> KShift3Bytes ) & 0xFF );
- pReq->iEffectHandle_7_0 =
- static_cast<TUint8>( aEffectHandle & 0xFF );
- pReq->iEffectHandle_15_8 =
- static_cast<TUint8>( ( aEffectHandle >> KShiftByte ) & 0xFF );
- pReq->iEffectHandle_23_16 =
- static_cast<TUint8>( ( aEffectHandle >> KShift2Bytes ) & 0xFF );
- pReq->iEffectHandle_31_24 =
- static_cast<TUint8>( ( aEffectHandle >> KShift3Bytes ) & 0xFF );
- pReq->iSize = static_cast<TUint8>( aStreamingSample.Size() );
- pReq->iEffectOffsetTime_7_0 =
- static_cast<TUint8>( aOffsetTime & 0xFF );
- pReq->iEffectOffsetTime_15_8 =
- static_cast<TUint8>( ( aOffsetTime >> KShiftByte ) & 0xFF );
-
- memcpy( pReq->iStreamingData,
- reinterpret_cast<TUint8*>(
- const_cast<TUint8*>( aStreamingSample.Ptr() ) ),
- aStreamingSample.Size() );
-
- iDataBuf.SetLength(
- sizeof ( TVibePacketPlayStreamingSampleRequest )
- + aStreamingSample.Size() -1 );
- }
- else
- {
- iDataBuf.SetLength( 0 );
- }
-
- return aBuffer.Create( iDataBuf );
- }
-
-// ---------------------------------------------------------------------------
-// Maps Vibe error code to Symbian error code.
-// ---------------------------------------------------------------------------
-//
-TInt CHWRMHapticsVibePacketizer::MapError( TInt aVibeError )
- {
- TInt error = KErrNone;
-
- switch ( aVibeError )
- {
- case KVibeErrAlreadyInitialized:
- {
- error = KErrAlreadyExists;
- break;
- }
-
- case KVibeErrNotInitialized:
- {
- error = KErrNotReady;
- break;
- }
-
- case KVibeWarningNotPlaying: // flow through
- case KVibeErrInvalidArgument:
- {
- error = KErrArgument;
- break;
- }
-
- case KVibeErrFail:
- {
- error = KErrGeneral;
- break;
- }
-
- case KVibeErrIncompatibleEffectType: // flow through
- case KVibeErrIncompatibleCapabilityType: // flow through
- case KVibeErrIncompatiblePropertyType:
- {
- error = KErrNotSupported;
- break;
- }
-
- case KVibeErrDeviceNeedsLicense:
- {
- error = KErrAccessDenied;
- break;
- }
-
- case KVibeErrNotEnoughMemory:
- {
- error = KErrNoMemory;
- break;
- }
-
- case KVibeErrServiceNotRunning:
- {
- error = KErrNotReady;
- break;
- }
-
- case KVibeErrInsufficientPriority:
- {
- error = KErrAccessDenied;
- break;
- }
-
- case KVibeErrServiceBusy:
- {
- error = KErrInUse;
- break;
- }
-
- case KVibeStatusSuccess:
- {
- error = KErrNone;
- break;
- }
-
- default:
- {
- // All the warning codes, except KVibeWarningNotPlaying
- // are handled here. Thus they are converted to KErrNone.
- break;
- }
- }
-
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// ImplementationTable[]
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( 0x20021207, CHWRMHapticsVibePacketizer::NewL )
- };
-
-// ---------------------------------------------------------------------------
-// TImplementationProxy* ImplementationGroupProxy()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
- return ImplementationTable;
- }
-
-// End of file
--- a/layers.sysdef.xml Fri May 28 14:18:28 2010 +0100
+++ b/layers.sysdef.xml Thu Jun 24 11:22:10 2010 +0100
@@ -14,6 +14,8 @@
<module name="">
<unit unitID="sydo.devicesrv.fps_api" mrp="" bldFile="&layer_real_source_path;/devicesrv_plat/fps_api/group" name="sydo_devicesrv_fps_api" filter="dfs_build" />
<unit unitID="sydo.devicesrv.fpsclient" mrp="" bldFile="&layer_real_source_path;/sensorservices/fpsclient/group" name="sydo_devicesrv_fpsclient" filter="dfs_build" />
+ <unit unitID="sydo.devicesrv.hapticsivtgetterplugin" mrp="" bldFile="&layer_real_source_path;/hwrmhaptics/hapticseffectdatagetterfw/plugins/hapticsivtgetterplugin/group" name="sydo_devicesrv_hapticsivtgetterplugin" filter="dfs_build" />
+ <unit unitID="sydo.devicesrv.hapticsvibepacketizerplugin" mrp="" bldFile="&layer_real_source_path;/hwrmhaptics/hapticspacketizer/plugins/hapticsvibepacketizerplugin/group" name="sydo_devicesrv_hapticsvibepacketizerplugin" filter="dfs_build" />
</module>
</layer>
--- a/mediator/data/MediatorDebug.rss Fri May 28 14:18:28 2010 +0100
+++ b/mediator/data/MediatorDebug.rss Thu Jun 24 11:22:10 2010 +0100
@@ -32,4 +32,5 @@
categories={};
options=KLogCommands+KLogEvents+KLogParameterData;
output_file = "mediator.txt";
- }
\ No newline at end of file
+ }
+
--- a/mediator/inc/Client/MediatorCommandInitiatorBody.h Fri May 28 14:18:28 2010 +0100
+++ b/mediator/inc/Client/MediatorCommandInitiatorBody.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -93,6 +93,11 @@
* From CActive::DoCancel()
*/
void DoCancel();
+
+ /**
+ * From CActive::RunError()
+ */
+ TInt RunError( TInt aError );
private: // new functions
/**
--- a/mediator/inc/Client/MediatorCommandResponderBody.h Fri May 28 14:18:28 2010 +0100
+++ b/mediator/inc/Client/MediatorCommandResponderBody.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -153,6 +153,11 @@
* From CActive::DoCancel()
*/
void DoCancel();
+
+ /**
+ * From CActive::RunError()
+ */
+ TInt RunError( TInt aError );
private: // new functions
--- a/mediator/inc/Client/MediatorEventConsumerBody.h Fri May 28 14:18:28 2010 +0100
+++ b/mediator/inc/Client/MediatorEventConsumerBody.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -121,6 +121,11 @@
* From CActive::DoCancel()
*/
void DoCancel();
+
+ /**
+ * From CActive::RunError()
+ */
+ TInt RunError( TInt aError );
private: // New functions
--- a/mediator/inc/Server/MediatorDebug.hrh Fri May 28 14:18:28 2010 +0100
+++ b/mediator/inc/Server/MediatorDebug.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -33,4 +33,5 @@
#define KLogStatus 0x04 // status reporting
#define KLogParameterData 0x08 // log parameter data
-#endif // MEDIATORDEBUG_HRH
\ No newline at end of file
+#endif // MEDIATORDEBUG_HRH
+
--- a/mediator/src/Client/MediatorCommandInitiatorBody.cpp Fri May 28 14:18:28 2010 +0100
+++ b/mediator/src/Client/MediatorCommandInitiatorBody.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -172,6 +172,23 @@
}
// -----------------------------------------------------------------------------
+// CMediatorCommandInitiatorBody::RunError
+// This will be called when there is a leave from ResetDataBufferL() or CommandResponseL() from RunL
+//
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+TInt CMediatorCommandInitiatorBody::RunError( TInt aError )
+#else
+TInt CMediatorCommandInitiatorBody::RunError( TInt /*aError*/ )
+#endif //_DEBUG
+ {
+ ERROR_TRACE(Print(_L("[Mediator Server]\t CMediatorCommandInitiatorBody::RunError called with Error %d\n"), aError ));
+ //Ignore the error.
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
// CMediatorCommandInitiatorBody::WaitForCommandResponse
//
// (other items were commented in a header).
--- a/mediator/src/Client/MediatorCommandResponderBody.cpp Fri May 28 14:18:28 2010 +0100
+++ b/mediator/src/Client/MediatorCommandResponderBody.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -162,6 +162,23 @@
StartCommandReceiving();
}
+
+// -----------------------------------------------------------------------------
+// CMediatorCommandResponderBody::RunError
+// This will be called when there is a leave from ResetDataBufferL()
+//
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+TInt CMediatorCommandResponderBody::RunError( TInt aError )
+#else
+TInt CMediatorCommandResponderBody::RunError( TInt /*aError*/ )
+#endif //_DEBUG
+ {
+ ERROR_TRACE(Print(_L("[Mediator Server]\t CMediatorCommandResponderBody::RunError called with Error %d\n"), aError ));
+ //Ignore the error
+ return KErrNone;
+ }
// -----------------------------------------------------------------------------
// CMediatorCommandResponderBody::RegisterCommandL
--- a/mediator/src/Client/MediatorEventConsumerBody.cpp Fri May 28 14:18:28 2010 +0100
+++ b/mediator/src/Client/MediatorEventConsumerBody.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -120,7 +120,24 @@
}
StartEventReceiving();
}
-
+
+// -----------------------------------------------------------------------------
+// CMediatorEventConsumerBody::RunError
+// This will be called when there is a leave from ResetDataBufferL() and MediatorEventL() of RunL()
+//
+// -----------------------------------------------------------------------------
+//
+#ifdef _DEBUG
+TInt CMediatorEventConsumerBody::RunError( TInt aError )
+#else
+TInt CMediatorEventConsumerBody::RunError( TInt /*aError*/ )
+#endif //_DEBUG
+ {
+ ERROR_TRACE(Print(_L("[Mediator Server]\t CMediatorEventConsumerBody::RunError called with Error %d\n"), aError ));
+ //Ignore the error
+ return KErrNone;
+ }
+
// -----------------------------------------------------------------------------
// CMediatorEventConsumerBody::DoCancel
//
--- a/mediator/tsrc/public/basic/group/MediatorTest.pkg Fri May 28 14:18:28 2010 +0100
+++ b/mediator/tsrc/public/basic/group/MediatorTest.pkg Thu Jun 24 11:22:10 2010 +0100
@@ -28,3 +28,6 @@
"\epoc32\release\armv5\urel\mediatortest.dll"-"c:\sys\bin\mediatortest.dll"
"..\init\mediatortest.ini"-"c:\testframework\mediatortest.ini"
+"\epoc32\release\armv5\urel\MediatorTestPlugin.dll"-"c:\sys\bin\MediatorTestPlugin.dll"
+"\epoc32\data\z\resource\plugins\MediatorTestPlugin.rsc"-"c:\data\z\resource\plugins\MediatorTestPlugin.rsc"
+"\epoc32\data\z\private\10207449\events\StaticEvents.rsc"-"c:\data\z\private\10207449\events\StaticEvents.rsc"
--- a/mediator/tsrc/public/basic/src/MediatorTestCases.cpp Fri May 28 14:18:28 2010 +0100
+++ b/mediator/tsrc/public/basic/src/MediatorTestCases.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -154,101 +154,101 @@
static TCaseInfoInternal const KCases[] =
{
// To add new test cases, add new items to this array
- FUNCENTRY( RegisterOneEvent ),
- FUNCENTRY( GetListOfDomainsInitL ),
- FUNCENTRY( GetListOfDomains1DomainL ),
- FUNCENTRY( GetListOfEvents1EventInCategoryL ),
- FUNCENTRY( RegisterMultipleEventsL ),
- FUNCENTRY( RegisterOver500EventsL ),
- FUNCENTRY( UnregisterNonExistingEventDom ),
- FUNCENTRY( GetListOfDomainsMultipleDomainsL ),
- FUNCENTRY( UnregisterNonExistingEventCat ),
- FUNCENTRY( UnregisterNonExistingEventEve ),
- FUNCENTRY( UnregisterExistingEvent ),
- FUNCENTRY( UnregisterRxistingEventDifferentSID ),
- FUNCENTRY( UnregisterAListOfEventsL ),
- FUNCENTRY( UnregisterAListOfEventsNotRegisteredL ),
- FUNCENTRY( SubscribeToNonExistingEventDom ),
- FUNCENTRY( SubscribeToNonExistingEventCat ),
- FUNCENTRY( SubscribeToNonExistingEventEve ),
- FUNCENTRY( SubscribeToWrongEventVersionMajor ),
- FUNCENTRY( SubscribeToEventNonExistCapabilities ),
- FUNCENTRY( SubscribeToEventCorrectParam ),
- FUNCENTRY( SubscribeToListOfEventsCorrectParamL ),
- FUNCENTRY( SubscribeToListOfEventsOneInfoIncorrectL ),
- FUNCENTRY( RaiseNonExistingEventWrongDomainL ),
- FUNCENTRY( RaiseNonExistingEventWrongCatL ),
- FUNCENTRY( RaiseNonExistingEventEveL ),
- FUNCENTRY( RaiseEventWithWrongEventVerMajorL ),
- FUNCENTRY( RaiseEventRequiresNotExistingCapsInPubL ),
- FUNCENTRY( RaiseExistingEventL ),
- FUNCENTRY( SubscribeExistingEventRaiseFromPublisherSideL ),
- FUNCENTRY( SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL ),
- FUNCENTRY( SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL ),
- FUNCENTRY( Add2ndSubscriberToEventRaiseEventFromPublisherL ),
- FUNCENTRY( UnsubscribeFrom1stSubscriberL ),
- FUNCENTRY( SubscribeToEventRaise500TimesInLoopL ),
- FUNCENTRY( RegisterOneCommandToMediator ),
- FUNCENTRY( RegisterMultipleCommandsToMediatorL ),
- FUNCENTRY( RegisterOver500CommandsWithinOneCatL ),
- FUNCENTRY( RegisterCommandWithDomainUID0 ),
- FUNCENTRY( RegisterCommandWithCategoryUID0 ),
- FUNCENTRY( RegisterCommandWithCommandID0 ),
- FUNCENTRY( RegisterCommandWithTimeoutValue0 ),
- FUNCENTRY( IssueNonExistingCommandWrongDomainL ),
- FUNCENTRY( IssueNonExistingCommandWrongCatL ),
- FUNCENTRY( IssueNonExistingCommandIdL ),
- FUNCENTRY( IssueCommandWrongCommandVerMajorL ),
- FUNCENTRY( IssueCommandL ),
- FUNCENTRY( IssueCommand2L ),
- FUNCENTRY( IssueExistingCommandSameInitiatorWhileProcessingL ),
- FUNCENTRY( IssueCommandWaitWithoutRespondingToCommandL ),
- FUNCENTRY( IssueCommandCancelFromInitiatorBeforeTimeoutL ),
- FUNCENTRY( IssueCommandRespondCorrectlyFromResponderL ),
- FUNCENTRY( IssueCommandALotOfParameterDataL ),
- FUNCENTRY( IssueCommandRespondALotOfResponseDataL ),
- //FUNCENTRY( GetListOfDomainsOver500Domains ),
- FUNCENTRY( GetListOfCategoriesNoCategoriesL ),
- FUNCENTRY( GetListOfCategoriesIncorrectDomainUIDL ),
- FUNCENTRY( GetListOfCategoriesMultipleCategoriesL ),
- FUNCENTRY( GetListOfCommandsL ),
- FUNCENTRY( GetListOfCommandsIncorrectDomainUIDL ),
- FUNCENTRY( GetListOfCommandsIncorrectCategoryUIDL ),
- FUNCENTRY( GetListOfCommands1CommandL ),
- FUNCENTRY( GetListOfCommandsMultipleCommandsL ),
- FUNCENTRY( GetListOfCommandsOver500CommandsL ),
- FUNCENTRY( GetListOfEventsNoEventsInCategoryL ),
- FUNCENTRY( GetListOfEventsWithIncorrectDomainUIDL ),
- FUNCENTRY( GetListOfEventsWithIncorrectCategoryUIDL ),
- FUNCENTRY( GetListOfEventsMultipleEventsInCategoryL ),
- FUNCENTRY( GetListOfEventsOver500EventsInCategoryL ),
- FUNCENTRY( SubscribeNotificationReceiver ),
- FUNCENTRY( ReSubscribeNotificationReceiver ),
- FUNCENTRY( ReUnsubscribeNotificationReceiver ),
- FUNCENTRY( SubscribeNotificationReceiverRegisterCommandsL ),
- FUNCENTRY( SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL ),
- FUNCENTRY( SubscribeNotificationReceiverRegisterEventsL ),
- FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsL ),
- FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL ),
- FUNCENTRY( SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL ),
- FUNCENTRY( SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL ),
- FUNCENTRY( SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration ),
- FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration ),
- FUNCENTRY( IssueCommandCancelAndReissueL ),
- FUNCENTRY( IssueCommandCancelAndIssueNewCommandL ),
- FUNCENTRY( InstantiateAndDeleteMediatorPluginL ),
- FUNCENTRY( IssueCommandNoDataL ),
- FUNCENTRY( RaiseEventNoDataL ),
- FUNCENTRY( RegisterMultipleEventsWithMultipleUIDsL ),
- FUNCENTRY( RegisterMultipleCommandsWithMultipleUIDsL ),
- FUNCENTRY( IssueCommandRespondIncorrectlyFromResponderL ),
- FUNCENTRY( OOMForEventProviderTestL ),
- FUNCENTRY( OOMForEventConsumerTestL ),
- FUNCENTRY( OOMForEventProviderwithListTestL ),
- FUNCENTRY( OOMForEventConsumerWithEventTestL ),
- FUNCENTRY( OOMForCommandInitiatorTestL ),
- FUNCENTRY( OOMForCommandInitiatorCommandListTestL ),
- FUNCENTRY( OOMForMediatorNotificationsTestL )
+ ENTRY( "[CMediatorTest] RegisterOneEvent", &CMediatorTest::RegisterOneEvent ),
+ ENTRY( "[CMediatorTest] GetListOfDomainsInitL", &CMediatorTest::GetListOfDomainsInitL ),
+ ENTRY( "[CMediatorTest] GetListOfDomains1DomainL", &CMediatorTest::GetListOfDomains1DomainL ),
+ ENTRY( "[CMediatorTest] GetListOfEvents1EventInCategoryL", &CMediatorTest::GetListOfEvents1EventInCategoryL ),
+ ENTRY( "[CMediatorTest] RegisterMultipleEventsL", &CMediatorTest::RegisterMultipleEventsL ),
+ ENTRY( "[CMediatorTest] RegisterOver500EventsL", &CMediatorTest::RegisterOver500EventsL ),
+ ENTRY( "[CMediatorTest] UnregisterNonExistingEventDom", &CMediatorTest::UnregisterNonExistingEventDom ),
+ ENTRY( "[CMediatorTest] GetListOfDomainsMultipleDomainsL", &CMediatorTest::GetListOfDomainsMultipleDomainsL ),
+ ENTRY( "[CMediatorTest] UnregisterNonExistingEventCat", &CMediatorTest::UnregisterNonExistingEventCat ),
+ ENTRY( "[CMediatorTest] UnregisterNonExistingEventEve", &CMediatorTest::UnregisterNonExistingEventEve ),
+ ENTRY( "[CMediatorTest] UnregisterExistingEvent", &CMediatorTest::UnregisterExistingEvent ),
+ ENTRY( "[CMediatorTest] UnregisterRxistingEventDifferentSID", &CMediatorTest::UnregisterRxistingEventDifferentSID ),
+ ENTRY( "[CMediatorTest] UnregisterAListOfEventsL", &CMediatorTest::UnregisterAListOfEventsL ),
+ ENTRY( "[CMediatorTest] UnregisterAListOfEventsNotRegisteredL", &CMediatorTest::UnregisterAListOfEventsNotRegisteredL ),
+ ENTRY( "[CMediatorTest] SubscribeToNonExistingEventDom", &CMediatorTest::SubscribeToNonExistingEventDom ),
+ ENTRY( "[CMediatorTest] SubscribeToNonExistingEventCat", &CMediatorTest::SubscribeToNonExistingEventCat ),
+ ENTRY( "[CMediatorTest] SubscribeToNonExistingEventEve", &CMediatorTest::SubscribeToNonExistingEventEve ),
+ ENTRY( "[CMediatorTest] SubscribeToWrongEventVersionMajor", &CMediatorTest::SubscribeToWrongEventVersionMajor ),
+ ENTRY( "[CMediatorTest] SubscribeToEventNonExistCapabilities", &CMediatorTest::SubscribeToEventNonExistCapabilities ),
+ ENTRY( "[CMediatorTest] SubscribeToEventCorrectParam", &CMediatorTest::SubscribeToEventCorrectParam ),
+ ENTRY( "[CMediatorTest] SubscribeToListOfEventsCorrectParamL", &CMediatorTest::SubscribeToListOfEventsCorrectParamL ),
+ ENTRY( "[CMediatorTest] SubscribeToListOfEventsOneInfoIncorrectL", &CMediatorTest::SubscribeToListOfEventsOneInfoIncorrectL ),
+ ENTRY( "[CMediatorTest] RaiseNonExistingEventWrongDomainL", &CMediatorTest::RaiseNonExistingEventWrongDomainL ),
+ ENTRY( "[CMediatorTest] RaiseNonExistingEventWrongCatL", &CMediatorTest::RaiseNonExistingEventWrongCatL ),
+ ENTRY( "[CMediatorTest] RaiseNonExistingEventEveL", &CMediatorTest::RaiseNonExistingEventEveL ),
+ ENTRY( "[CMediatorTest] RaiseEventWithWrongEventVerMajorL", &CMediatorTest::RaiseEventWithWrongEventVerMajorL ),
+ ENTRY( "[CMediatorTest] RaiseEventRequiresNotExistingCapsInPubL", &CMediatorTest::RaiseEventRequiresNotExistingCapsInPubL ),
+ ENTRY( "[CMediatorTest] RaiseExistingEventL", &CMediatorTest::RaiseExistingEventL ),
+ ENTRY( "[CMediatorTest] SubscribeExistingEventRaiseFromPublisherSideL", &CMediatorTest::SubscribeExistingEventRaiseFromPublisherSideL ),
+ ENTRY( "[CMediatorTest] SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL", &CMediatorTest::SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL ),
+ ENTRY( "[CMediatorTest] SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL", &CMediatorTest::SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL ),
+ ENTRY( "[CMediatorTest] Add2ndSubscriberToEventRaiseEventFromPublisherL", &CMediatorTest::Add2ndSubscriberToEventRaiseEventFromPublisherL ),
+ ENTRY( "[CMediatorTest] UnsubscribeFrom1stSubscriberL", &CMediatorTest::UnsubscribeFrom1stSubscriberL ),
+ ENTRY( "[CMediatorTest] SubscribeToEventRaise500TimesInLoopL", &CMediatorTest::SubscribeToEventRaise500TimesInLoopL ),
+ ENTRY( "[CMediatorTest] RegisterOneCommandToMediator", &CMediatorTest::RegisterOneCommandToMediator ),
+ ENTRY( "[CMediatorTest] RegisterMultipleCommandsToMediatorL", &CMediatorTest::RegisterMultipleCommandsToMediatorL ),
+ ENTRY( "[CMediatorTest] RegisterOver500CommandsWithinOneCatL", &CMediatorTest::RegisterOver500CommandsWithinOneCatL ),
+ ENTRY( "[CMediatorTest] RegisterCommandWithDomainUID0", &CMediatorTest::RegisterCommandWithDomainUID0 ),
+ ENTRY( "[CMediatorTest] RegisterCommandWithCategoryUID0", &CMediatorTest::RegisterCommandWithCategoryUID0 ),
+ ENTRY( "[CMediatorTest] RegisterCommandWithCommandID0", &CMediatorTest::RegisterCommandWithCommandID0 ),
+ ENTRY( "[CMediatorTest] RegisterCommandWithTimeoutValue0", &CMediatorTest::RegisterCommandWithTimeoutValue0 ),
+ ENTRY( "[CMediatorTest] IssueNonExistingCommandWrongDomainL", &CMediatorTest::IssueNonExistingCommandWrongDomainL ),
+ ENTRY( "[CMediatorTest] IssueNonExistingCommandWrongCatL", &CMediatorTest::IssueNonExistingCommandWrongCatL ),
+ ENTRY( "[CMediatorTest] IssueNonExistingCommandIdL", &CMediatorTest::IssueNonExistingCommandIdL ),
+ ENTRY( "[CMediatorTest] IssueCommandWrongCommandVerMajorL", &CMediatorTest::IssueCommandWrongCommandVerMajorL ),
+ ENTRY( "[CMediatorTest] IssueCommandL", &CMediatorTest::IssueCommandL ),
+ ENTRY( "[CMediatorTest] IssueCommand2L", &CMediatorTest::IssueCommand2L ),
+ ENTRY( "[CMediatorTest] IssueExistingCommandSameInitiatorWhileProcessingL", &CMediatorTest::IssueExistingCommandSameInitiatorWhileProcessingL ),
+ ENTRY( "[CMediatorTest] IssueCommandWaitWithoutRespondingToCommandL", &CMediatorTest::IssueCommandWaitWithoutRespondingToCommandL ),
+ ENTRY( "[CMediatorTest] IssueCommandCancelFromInitiatorBeforeTimeoutL", &CMediatorTest::IssueCommandCancelFromInitiatorBeforeTimeoutL ),
+ ENTRY( "[CMediatorTest] IssueCommandRespondCorrectlyFromResponderL", &CMediatorTest::IssueCommandRespondCorrectlyFromResponderL ),
+ ENTRY( "[CMediatorTest] IssueCommandALotOfParameterDataL", &CMediatorTest::IssueCommandALotOfParameterDataL ),
+ ENTRY( "[CMediatorTest] IssueCommandRespondALotOfResponseDataL", &CMediatorTest::IssueCommandRespondALotOfResponseDataL ),
+ //ENTRY( "[CMediatorTest] GetListOfDomainsOver500Domains", &CMediatorTest::GetListOfDomainsOver500Domains ),
+ ENTRY( "[CMediatorTest] GetListOfCategoriesNoCategoriesL", &CMediatorTest::GetListOfCategoriesNoCategoriesL ),
+ ENTRY( "[CMediatorTest] GetListOfCategoriesIncorrectDomainUIDL", &CMediatorTest::GetListOfCategoriesIncorrectDomainUIDL ),
+ ENTRY( "[CMediatorTest] GetListOfCategoriesMultipleCategoriesL", &CMediatorTest::GetListOfCategoriesMultipleCategoriesL ),
+ ENTRY( "[CMediatorTest] GetListOfCommandsL", &CMediatorTest::GetListOfCommandsL ),
+ ENTRY( "[CMediatorTest] GetListOfCommandsIncorrectDomainUIDL", &CMediatorTest::GetListOfCommandsIncorrectDomainUIDL ),
+ ENTRY( "[CMediatorTest] GetListOfCommandsIncorrectCategoryUIDL", &CMediatorTest::GetListOfCommandsIncorrectCategoryUIDL ),
+ ENTRY( "[CMediatorTest] GetListOfCommands1CommandL", &CMediatorTest::GetListOfCommands1CommandL ),
+ ENTRY( "[CMediatorTest] GetListOfCommandsMultipleCommandsL", &CMediatorTest::GetListOfCommandsMultipleCommandsL ),
+ ENTRY( "[CMediatorTest] GetListOfCommandsOver500CommandsL", &CMediatorTest::GetListOfCommandsOver500CommandsL ),
+ ENTRY( "[CMediatorTest] GetListOfEventsNoEventsInCategoryL", &CMediatorTest::GetListOfEventsNoEventsInCategoryL ),
+ ENTRY( "[CMediatorTest] GetListOfEventsWithIncorrectDomainUIDL", &CMediatorTest::GetListOfEventsWithIncorrectDomainUIDL ),
+ ENTRY( "[CMediatorTest] GetListOfEventsWithIncorrectCategoryUIDL", &CMediatorTest::GetListOfEventsWithIncorrectCategoryUIDL ),
+ ENTRY( "[CMediatorTest] GetListOfEventsMultipleEventsInCategoryL", &CMediatorTest::GetListOfEventsMultipleEventsInCategoryL ),
+ ENTRY( "[CMediatorTest] GetListOfEventsOver500EventsInCategoryL", &CMediatorTest::GetListOfEventsOver500EventsInCategoryL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiver", &CMediatorTest::SubscribeNotificationReceiver ),
+ ENTRY( "[CMediatorTest] ReSubscribeNotificationReceiver", &CMediatorTest::ReSubscribeNotificationReceiver ),
+ ENTRY( "[CMediatorTest] ReUnsubscribeNotificationReceiver", &CMediatorTest::ReUnsubscribeNotificationReceiver ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterCommandsL", &CMediatorTest::SubscribeNotificationReceiverRegisterCommandsL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL", &CMediatorTest::SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterEventsL", &CMediatorTest::SubscribeNotificationReceiverRegisterEventsL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsL", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL", &CMediatorTest::SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL", &CMediatorTest::SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration", &CMediatorTest::SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration ),
+ ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration ),
+ ENTRY( "[CMediatorTest] IssueCommandCancelAndReissueL", &CMediatorTest::IssueCommandCancelAndReissueL ),
+ ENTRY( "[CMediatorTest] IssueCommandCancelAndIssueNewCommandL", &CMediatorTest::IssueCommandCancelAndIssueNewCommandL ),
+ ENTRY( "[CMediatorTest] InstantiateAndDeleteMediatorPluginL", &CMediatorTest::InstantiateAndDeleteMediatorPluginL ),
+ ENTRY( "[CMediatorTest] IssueCommandNoDataL", &CMediatorTest::IssueCommandNoDataL ),
+ ENTRY( "[CMediatorTest] RaiseEventNoDataL", &CMediatorTest::RaiseEventNoDataL ),
+ ENTRY( "[CMediatorTest] RegisterMultipleEventsWithMultipleUIDsL", &CMediatorTest::RegisterMultipleEventsWithMultipleUIDsL ),
+ ENTRY( "[CMediatorTest] RegisterMultipleCommandsWithMultipleUIDsL", &CMediatorTest::RegisterMultipleCommandsWithMultipleUIDsL ),
+ ENTRY( "[CMediatorTest] IssueCommandRespondIncorrectlyFromResponderL", &CMediatorTest::IssueCommandRespondIncorrectlyFromResponderL ),
+ ENTRY( "[CMediatorTest] OOMForEventProviderTestL", &CMediatorTest::OOMForEventProviderTestL ),
+ ENTRY( "[CMediatorTest] OOMForEventConsumerTestL", &CMediatorTest::OOMForEventConsumerTestL ),
+ ENTRY( "[CMediatorTest] OOMForEventProviderwithListTestL", &CMediatorTest::OOMForEventProviderwithListTestL ),
+ ENTRY( "[CMediatorTest] OOMForEventConsumerWithEventTestL", &CMediatorTest::OOMForEventConsumerWithEventTestL ),
+ ENTRY( "[CMediatorTest] OOMForCommandInitiatorTestL", &CMediatorTest::OOMForCommandInitiatorTestL ),
+ ENTRY( "[CMediatorTest] OOMForCommandInitiatorCommandListTestL", &CMediatorTest::OOMForCommandInitiatorCommandListTestL ),
+ ENTRY( "[CMediatorTest] OOMForMediatorNotificationsTestL", &CMediatorTest::OOMForMediatorNotificationsTestL )
// Example how to use OOM functionality
//OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3 ),
//OOM_FUNCENTRY( PrintTest, ETrue, 1, 3 ),
--- a/psmservices/psmserver/src/client/psmclientimpl.cpp Fri May 28 14:18:28 2010 +0100
+++ b/psmservices/psmserver/src/client/psmclientimpl.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -64,22 +64,10 @@
{
COMPONENT_TRACE( ( _L( "PSM Client - CPsmClientImpl::~CPsmClientImpl()" ) ) );
- if ( iActive->IsActive() )
- {
- CancelPowerSaveModeChange();
- }
+ CancelPowerSaveModeChange();
- if ( iActive )
- {
- delete iActive;
- iActive = NULL;
- }
-
- if ( iSettings )
- {
- delete iSettings;
- iSettings = NULL;
- }
+ delete iActive;
+ delete iSettings;
iPsmServer.Close();
--- a/psmservices/psmserver/src/engine/psmbackupstorage.cpp Fri May 28 14:18:28 2010 +0100
+++ b/psmservices/psmserver/src/engine/psmbackupstorage.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -194,6 +194,7 @@
// Search correct set item for aKey
TBool setFound( EFalse );
RXmlEngNodeList<TXmlEngElement> nodeList;
+ CleanupClosePushL(nodeList);
aConfigSet.GetElementsByTagNameL(nodeList, KPsmSetItem);
TXmlEngElement setItem = nodeList.Next().AsElement();
@@ -205,7 +206,7 @@
if ( aKey == setItemKey )
{
- // Set found, no need to loop anumore
+ // Set found, no need to loop any more
setFound = ETrue;
}
else
@@ -214,7 +215,8 @@
setItem = nodeList.Next().AsElement();
}
}
-
+
+ CleanupStack::PopAndDestroy(&nodeList);
if ( !setFound )
{
COMPONENT_TRACE( ( _L( "PSM Server - CPsmBackupStorage::FindSetItemL() - Not found id:%i, LEAVE" ), aKey ) );
--- a/psmservices/psmserver/src/engine/psmstorage.cpp Fri May 28 14:18:28 2010 +0100
+++ b/psmservices/psmserver/src/engine/psmstorage.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -112,6 +112,7 @@
TBool setFound( EFalse );
TXmlEngElement settings;
RXmlEngNodeList<TXmlEngElement> nodeList;
+ CleanupClosePushL(nodeList);
if ( iStorageRoot.NotNull() )
{
@@ -141,7 +142,7 @@
settings = nodeList.Next().AsElement();
}
}
-
+ CleanupStack::PopAndDestroy(&nodeList);
if ( !setFound )
{
COMPONENT_TRACE( ( _L( "PSM Server - CPsmStorage::FindConfigurationSet() - Mode not found: %i, LEAVE" ), aMode ) );
@@ -166,6 +167,7 @@
// Get first setElemens
RXmlEngNodeList<TXmlEngElement> nodeList;
+ CleanupClosePushL(nodeList);
settings.GetElementsByTagNameL(nodeList, KPsmSetItem);
TXmlEngElement setElement = nodeList.Next().AsElement();
@@ -207,7 +209,7 @@
// handle next element set
setElement = nodeList.Next().AsElement();
}
-
+ CleanupStack::PopAndDestroy(&nodeList);
COMPONENT_TRACE( ( _L( "PSM Server - CPsmStorage::CreateConfigArrayL() - return" ) ) );
}
@@ -227,6 +229,7 @@
// Get first setElemens
RXmlEngNodeList<TXmlEngElement> nodeList;
+ CleanupClosePushL(nodeList);
settings.GetElementsByTagNameL(nodeList, KPsmSetItem);
TXmlEngElement setElement = nodeList.Next().AsElement();
@@ -287,6 +290,7 @@
setElement = nodeList.Next().AsElement();
}
+ CleanupStack::PopAndDestroy(&nodeList);
COMPONENT_TRACE( ( _L( "PSM Server - CPsmStorage::GetConfigurationL() - return" ) ) );
}
--- a/psmservices/psmserver/src/server/psmsrvsession.cpp Fri May 28 14:18:28 2010 +0100
+++ b/psmservices/psmserver/src/server/psmsrvsession.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,7 +15,8 @@
*
*/
-
+#include <e32property.h>
+#include <connect/sbdefs.h>
#include <psmsettingsprovider.h>
#include "psmmanager.h"
#include "psmsrvserver.h"
@@ -167,7 +168,18 @@
{
User::Leave( KErrArgument );
}
-
+
+ TInt keyVal = -1;
+ User::LeaveIfError( RProperty::Get( KUidSystemCategory, conn::KUidBackupRestoreKey, keyVal ) );
+ //if backup or restore is in progress, change in power save mode
+ //is not allowed as it will not be possible to do write
+ //operation in cenrep and it would leave the device in unstable power saving mode state
+ if( (( keyVal & conn::KBURPartTypeMask ) != conn::EBURNormal )
+ && (( keyVal & conn::KBURPartTypeMask ) != conn::EBURUnset ))
+ {
+ User::Leave( KErrNotSupported );
+ }
+
iNotifyModeMessage->Initialize( aMessage );
iPsmManager.NotifyPowerSaveModeChangeL( mode );
break;
--- a/psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.pkg Fri May 28 14:18:28 2010 +0100
+++ b/psmservices/psmserver/tsrc/PsmTestModule/group/PsmTestModule.pkg Thu Jun 24 11:22:10 2010 +0100
@@ -29,3 +29,11 @@
"..\conf\PsmTestModule.cfg"-"c:\testframework\PsmTestModule.cfg"
"..\init\PsmTestModule_armi.ini"-"c:\testframework\PsmTestModule_armi.ini"
+;data files
+
+"\epoc32\data\z\private\2000B187\10200EE1.xml"-"c:\private\2000B187\10200EE1.xml"
+"\epoc32\data\z\private\2000B187\10200EE2.xml"-"c:\private\2000B187\10200EE2.xml"
+"\epoc32\data\z\private\2000B187\10200EE4.xml"-"c:\private\2000B187\10200EE4.xml"
+"\epoc32\data\z\private\2000B187\10200EE5.xml"-"c:\private\2000B187\10200EE5.xml"
+"\epoc32\data\z\private\2000B187\cenrep\10200EE3.xml"-"c:\private\2000B187\cenrep\10200EE3.xml"
+"\epoc32\data\z\private\10202BE9\10200EE3.txt"-"c:\private\10202BE9\10200EE3.txt"
\ No newline at end of file
--- a/resourceinterfaces/fmtransmittercontrol/group/FmTx_HWRM.iby Fri May 28 14:18:28 2010 +0100
+++ b/resourceinterfaces/fmtransmittercontrol/group/FmTx_HWRM.iby Thu Jun 24 11:22:10 2010 +0100
@@ -21,7 +21,7 @@
#include <featreg.iby> // Feature Registry (featreg.dll)
-#ifndef SYMBIAN_EXCLUDE_FMTX
+#ifdef FF_FMTX
file=ABI_DIR\DEBUG_DIR\HWRMFmTxClient.dll SYSTEM_BINDIR\HWRMFmTxClient.dll
#endif
--- a/resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp Fri May 28 14:18:28 2010 +0100
+++ b/resourceinterfaces/fmtransmittercontrol/group/telephony_hwrmfmtx.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component telephony_hwrmfmtx
source \sf\os\devicesrv\resourceinterfaces\fmtransmittercontrol
binary \sf\os\devicesrv\resourceinterfaces\fmtransmittercontrol\group all
Binary file resourcemgmt/hwresourcesmgr/documentation/HWRM Central Repository keys.xls has changed
--- a/resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/hwresourcesmgr/group/telephony_hwrm.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component telephony_hwrm
source \sf\os\devicesrv\resourcemgmt\hwresourcesmgr\client
--- a/resourcemgmt/hwresourcesmgr/test/data/featreg/RemovableFeatures.iby Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/hwresourcesmgr/test/data/featreg/RemovableFeatures.iby Thu Jun 24 11:22:10 2010 +0100
@@ -17,18 +17,18 @@
#define __REMOVABLEFEATURES_IBY__
#define SYMBIAN_EXCLUDE_FAX
-#define SYMBIAN_EXCLUDE_PRINT
-#define SYMBIAN_EXCLUDE_MMC
+#undef __UPNP_PRINT_FRAMEWORK
+#undef __MMC
#define SYMBIAN_EXCLUDE_RTP_RTCP
#define SYMBIAN_EXCLUDE_PC_CONNECTIVITY_EXCEPT_SECURE_BACKUP
-#define SYMBIAN_EXCLUDE_INFRARED
-#define SYMBIAN_EXCLUDE_BLUETOOTH
+#undef __IRDA
+#undef __BT
#define SYMBIAN_EXCLUDE_OBEX
-#define SYMBIAN_EXCLUDE_USB
+#undef __USB
#define SYMBIAN_EXCLUDE_DRM_AGENT_PLUGINS
-#define SYMBIAN_EXCLUDE_IPSEC
+#undef __IPSEC
#define SYMBIAN_EXCLUDE_QOS_PROTPLUGINS
-#define SYMBIAN_EXCLUDE_DHCP
+#undef __DHCP
#define SYMBIAN_EXCLUDE_MOBILEIP
#define SYMBIAN_EXCLUDE_LOCATION
#define SYMBIAN_EXCLUDE_SIP
@@ -36,13 +36,13 @@
#define SYMBIAN_EXCLUDE_OMA_DATASYNC
#define SYMBIAN_EXCLUDE_OMA_DEVMAN
#define SYMBIAN_EXCLUDE_OMA_DS_HOSTSERVERS
-#define SYMBIAN_EXCLUDE_MTP
+#undef __MTP_PROTOCOL_SUPPORT
// Include HWRM features by uncommenting their exclusion macros
-//#define SYMBIAN_EXCLUDE_FMTX
-//#define SYMBIAN_EXCLUDE_VIBRA
-//#define SYMBIAN_EXCLUDE_AMBIENT_LIGHT_SENSOR
-//#define SYMBIAN_EXCLUDE_COVER_DISPLAY
-//#define SYMBIAN_EXCLUDE_KEYPAD_NO_SLIDER
+//#undef FF_FMTX
+//#undef __VIBRA
+//#undef __SERIES60_AMBIENT_LIGHT_SENSOR
+//#undef __COVER_DISPLAY
+//#undef __SERIES60_KEYPAD_NO_SLIDER
#endif
--- a/resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/hwresourcesmgrconfig/telephony_hwrm-config.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component telephony_hwrm-config
source \sf\os\devicesrv\resourcemgmt\hwresourcesmgrconfig
--- a/resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/hwrmfmtxwatcherplugin/data/20012401.rss Thu Jun 24 11:22:10 2010 +0100
@@ -43,4 +43,5 @@
};
}
};
- }
\ No newline at end of file
+ }
+
--- a/resourcemgmt/hwrmfmtxwatcherplugin/src/hwrmfmtxusbobserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/hwrmfmtxwatcherplugin/src/hwrmfmtxusbobserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -33,7 +33,7 @@
INFO_LOG1( "UsbConnected - %d", aDeviceState);
if ( aDeviceState == EUsbDeviceStateAttached || aDeviceState == EUsbDeviceStatePowered ||
- aDeviceState == EUsbDeviceStateUndefined)
+ aDeviceState == EUsbDeviceStateUndefined || aDeviceState == EUsbDeviceStateSuspended )
{
RDebug::Print(_L("return false "));
return EFalse;
--- a/resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/hwrmtargetmodifierplugin/data/10281B9B.rss Thu Jun 24 11:22:10 2010 +0100
@@ -45,4 +45,5 @@
};
}
};
- }
\ No newline at end of file
+ }
+
--- a/resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp Fri May 28 14:18:28 2010 +0100
+++ b/resourcemgmt/powerandmemorynotificationservice/group/syslibs_pwrcli.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component syslibs_pwrcli
source \sf\os\devicesrv\resourcemgmt\powerandmemorynotificationservice
binary \sf\os\devicesrv\resourcemgmt\powerandmemorynotificationservice\group all
--- a/sensorservices/orientationssy/inc/SsyConfiguration.h Fri May 28 14:18:28 2010 +0100
+++ b/sensorservices/orientationssy/inc/SsyConfiguration.h Thu Jun 24 11:22:10 2010 +0100
@@ -156,8 +156,7 @@
KNoRealValue,
0, // iMinValue
KNoRealValue,
- ETrue, // iReadOnly. Default value is not readonly, it is set
- // to read only when updated.
+ ETrue, // iReadOnly.
ESensrvIntProperty // iPropertyType
}
};
--- a/sensorservices/orientationssy/src/SsyChannel.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sensorservices/orientationssy/src/SsyChannel.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -303,17 +303,6 @@
break;
case EChannelOpening:
{
- // Before completing channel opening, get max data rate from actual SSY
- if ( !iSensorProperties->DataRateUpdated() )
- {
- TSensrvProperty maxdatarate;
- RSensrvChannelList affectedChannels;
- // Get max data rate
- iOrientationHandler->GetMaxDataRateL( maxdatarate );
- // Set property
- iSensorProperties->SetProperty( maxdatarate, affectedChannels );
- }
-
SetChannelState( EChannelOpen );
iCallback->ChannelOpened( iChannelInfo.iChannelId, iStatus.Int(), this, this );
break;
@@ -808,7 +797,9 @@
{
aChannelPropertyList.Append( channelProperties[index] );
}
-
+
+ channelProperties.Close();
+
SSY_TRACE_OUT();
}
--- a/sensorservices/orientationssy/src/SsyProperty.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sensorservices/orientationssy/src/SsyProperty.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -297,14 +297,13 @@
else if ( aProperty.GetPropertyId() == KSensrvPropIdDataRate )
{
- SSY_TRACE( EExtended, "ORIENTATIONSSY: Updating data rate property" );
- // Data rate property is replaced in a different way than others.
- // Note that this can be done only once as this property is set to read only.
- aProperty.GetValue( intValue );
- // Leave value to 0, update only max value because that is the only value we can provide
+ // Since Orientation is an event, the data rate property is made readonly.
+ // In ssyconfiguration.h file, the datarate property is defined as writable,
+ // it is not modified due to backward compatibility.
+ // Now it is changed and the orientation channel property is made readonly always.
+
if( iChannelProperties.Count() >= index )
{
- iChannelProperties[index].iIntMaxValue = intValue;
iChannelProperties[index].iReadOnly = ETrue;
}
--- a/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sensorservices/sensorserver/src/server/sensrvpluginproxy.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -30,6 +30,10 @@
#include "sensrvclientserver.h"
#include "sensrvthreadmonitor.h"
#include "sensrvchanneldatareader.h"
+#include <e32std.h>
+#include <e32cmn.h>
+
+
// ---------------------------------------------------------------------------
// 2-phase constructor
@@ -251,14 +255,13 @@
{
buf->Des().AppendNum(iProxyManager.GenerateUniqueId());
+
err = iSsyThread.Create(*buf,
SsyThreadFunction,
ProxyManager().SsyStackSize(),
- KSensrvSsyHeapInitialSize,
- ProxyManager().SsyHeapMaxSize(),
+ NULL,
(TAny*)this);
-
if (err == KErrAlreadyExists)
{
COMPONENT_TRACE( ( _L( "Sensor Server - CSensrvPluginProxy::InitializePluginL - Thread name is already in use, recreating..." ) ) );
@@ -1339,7 +1342,7 @@
return KErrBadHandle;
}
- __UHEAP_MARK;
+ // __UHEAP_MARK;
#ifdef MEMORY_TRACE_DEBUG
// TRACE heap usage
@@ -1425,7 +1428,7 @@
MEMORY_TRACE( ( _L( "#### Sensor Server, SSY exit - HEAP: Size: %d, Available: %d, Used: %d, Change in used: %d" ), heapSize, heapAvail, newUsed, newUsed - used ) );
#endif
- __UHEAP_MARKEND;
+ // __UHEAP_MARKEND;
return err;
}
Binary file sensorservices/sensorserver/tsrc/sensorsrvtest/SensorTestModule/cenrepsample/1020507E.txt has changed
Binary file sensorservices/sensorserver/tsrc/sensorsrvtest/SensorTestModule/cenrepsample/10282DEE.txt has changed
Binary file sensorservices/sensorserver/tsrc/sensorsrvtest/SensorTestModule/cenrepsample/sensorframework.confml has changed
Binary file sensorservices/sensorserver/tsrc/sensorsrvtest/SensorTestModule/cenrepsample/sensorframework_10282DEE.crml has changed
--- a/sensorservices/sensorserver/tsrc/sensorsrvtest/SensorTestModule/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/sensorservices/sensorserver/tsrc/sensorsrvtest/SensorTestModule/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -27,15 +27,13 @@
// NOTE: If using ARS requirements all export operations should be done under this.
// 'abld test export'
+
+../cenrepsample/sensorframework.confml OS_LAYER_CONFML(sensorframework.confml)
+../cenrepsample/sensorframework_10282DEE.crml OS_LAYER_CRML(sensorframework_10282DEE.crml)
+
../../conf/SensorTestModule.cfg /epoc32/winscw/c/testframework/SensorTestModule.cfg
../../init/SensorTestModule.ini /epoc32/winscw/c/testframework/SensorTestModule.ini
-../cenrepsample/10282DEE.txt /epoc32/RELEASE/winscw/UDEB/Z/private/10202BE9/10282DEE.txt
-../cenrepsample/10282DEE.txt /epoc32/RELEASE/winscw/UREL/Z/private/10202BE9/10282DEE.txt
-../cenrepsample/10282DEE.txt /epoc32/data/Z/private/10202BE9/10282DEE_stub.txt
-../cenrepsample/1020507E.txt /epoc32/RELEASE/winscw/UDEB/Z/private/10202BE9/1020507E.txt
-../cenrepsample/1020507E.txt /epoc32/RELEASE/winscw/UREL/Z/private/10202BE9/1020507E.txt
-../cenrepsample/1020507E.txt /epoc32/data/Z/private/10202BE9/1020507E_stub.txt
../../rom/SensorServer_ats3.iby CORE_OS_LAYER_IBY_EXPORT_PATH(SensorServer_ats3.iby)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sensorservices/sensorserver/tsrc/sensorsrvtest/conf/SensorTestModule_OOM.cfg Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,2953 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+// Publish&Subscribe definitions
+// From SensrvInternalPSKeys.h
+[Define]
+KSensrvLeaveFirstStubConstruction 1
+KSensrvLeaveSecondStubConstruction 2
+KSensrvStubConstructionDelay 3
+KSensrvFirstStubChannelCount 4
+KSensrvSecondStubChannelCount 5
+KSensrvLatestOpenedChannel 6
+KSensrvLatestClosedChannel 7
+KSensrvLatestStartListeningChannel 8
+KSensrvLatestStopListeningChannel 9
+KSensrvSamplingInterval 10
+KSensrvStubConstructionJam 11
+KSensrvStartListeningJam 12
+KSensrvStopListeningJam 13
+KSensrvOpenChannelAsyncJam 14
+KSensrvCloseChannelAsyncJam 15
+KSensrvChannelOpenedError 16
+KSensrvChannelClosedError 17
+KSensrvStartListeningLeave 18
+KSensrvStopListeningLeave 19
+KSensrvDataListeningJam 20
+KSensrvDataListeningBufferFilledError 21
+KSensrvForceBufferFilledJam 22
+KSensrvForceBufferFilledLeave 23
+KSensrvOpenChannelMethodJam 24
+KSensrvCloseChannelMethodJam 25
+KSensrvOpenChannelError 26
+KSensrvCloseChannelError 27
+KSensrvChannelOpenedWithError 28
+KSensrvPropertyChanged 29
+KSensrvOpenChannelMethodPanic 30
+KSensrvOpenChannelAsyncPanic 31
+KSensrvCloseChannelMethodPanic 32
+KSensrvCloseChannelAsyncPanic 33
+KSensrvStartListeningMethodPanic 34
+KSensrvDataListeningPanic 35
+KSensrvStopListeningMethodPanic 36
+KSensrvStopListeningAsyncPanic 37
+KSensrvForceBufferFilledPanic 38
+KSensrvSSYUnloadingCount 39
+KSensrvBufferFilledNegativeCount 40
+KSensrvGetAllPropertyCount 41
+KSensrvGetPropertyLeave 42
+KSensrvGetPropertyJam 43
+KSensrvSetPropertyLeave 44
+KSensrvSetPropertyJam 45
+KSensrvGetAllPropertiesLeave 46
+KSensrvGetAllPropertiesJam 47
+KSensrvGetPropertyPanic 48;
+KSensrvSetPropertyPanic 49;
+KSensrvGetAllPropertiesPanic 50;
+KSensrvCheckPropertyDependenciesLeave 51
+KSensrvCheckPropertyDependenciesJam 52
+KSensrvCheckPropertyDependenciesPanic 53
+KSensrvGetDataOverflowTest 54
+KSensrvGetDataNotFoundTest 55
+KSensorTestModuleProcessCommand 56
+KSensrvSingleBufferFilledNegativeCount 57
+KSensrvCreateNewChannelsFirst 58
+KSensrvCreateNewChannelsSecond 59
+KSensrvRemoveNewChannelsFirst 60
+KSensrvRemoveNewChannelsSecond 61
+KSensrvRegisterZeroChannels 62
+KSensrvRegisterInvalidChannels 63
+KSensrvFirstStubDoubleTappingChannelCount 64
+KSensrvSetPropertyArray 65
+KSensrvCheckPluginLoaded 66
+
+KSensrvSignalAftedDataReseived 100
+KSensrvWaitTestCompletion 101
+
+KSensorTestModuleComplete1 200
+KSensorTestModuleComplete2 201
+KSensorTestModuleComplete3 202
+KSensorTestModuleComplete4 203
+KSensorTestModuleComplete5 204
+KSensorTestModuleComplete6 205
+KSensorTestModuleComplete7 206
+KSensorTestModuleComplete8 207
+KSensorTestModuleComplete9 208
+KSensorTestModuleComplete10 209
+KSensorTestModuleComplete11 210
+KSensorTestModuleComplete12 211
+KSensorTestModuleComplete13 212
+KSensorTestModuleComplete14 213
+KSensorTestModuleComplete15 214
+
+// Errors
+KErrNotFound -1
+KErrGeneral -2
+KErrCancel -3
+KErrNoMemory -4
+KErrNotSupported -5
+KErrArgument -6
+KErrOverflow -9
+KErrAlreadyExists -11
+KErrPermissionDenied -46
+KErrAccessDenied -21
+
+ESensrvMinor 1
+ESensrvFatal 2
+
+// Property from sensrvgeneralproperties.h
+KSensrvPropIdDataRate 2
+KSensrvPropIdAvailability 4
+KSensrvPropIdMeasureRange 5
+KSensrvPropIdChannelScale 9
+KSensrvSensorDescription 19
+
+// Commands for test process (SensorTestModuleTypes.h)
+KProcessCommandSetProperty 1
+KProcessCommandOpenChannel 2
+KProcessCommandCloseChannel 3
+KProcessCommandFindChannel 4
+
+// Condition enumerations
+ESensrvOrConditionSet 0
+ESensrvAndConditionSet 1
+
+ESensrvSingleLimitCondition 0
+ESensrvRangeConditionLowerLimit 1
+ESensrvRangeConditionUpperLimit 2
+ESensrvBinaryCondition 3
+
+ESensrvOperatorEquals 0
+ESensrvOperatorGreaterThan 1
+ESensrvOperatorGreaterThanOrEquals 2
+ESensrvOperatorLessThan 3
+ESensrvOperatorLessThanOrEquals 4
+ESensrvOperatorBinaryAnd 5
+ESensrvOperatorBinaryAll 6
+
+KSensorTestModuleEventChannelType 519761901
+KSensrvChannelIdAccelerometerXYZAxisData 270553214
+KSensrvChannelTypeIdAccelerometerDoubleTappingData 270553217
+
+KSensrvAccelerometerDataItemSize 20
+KSensrvEventChannelDataItemSize 16
+KSensrvDoubleTappingDataItemSize 12
+
+iAxisX 1
+iAxisY 2
+iAxisZ 3
+
+iTimeStampFromEventPlugin 0
+iTimeStampFromAccelerometerPlugin 1
+
+iDirection 1
+
+KSensrvUncertainExpectedValue 99999999
+
+// Change types
+ESensrvChannelRemoved 1
+ESensrvChannelAdded 2
+
+// SetPropertyIndication types
+ESetPropertyIndicationUnknown 0
+ESetPropertyIndicationAvailable 1
+ESetPropertyIndicationPossible 2
+ESetPropertyIndicationUnavailable 3
+
+//OOM Testing
+KNumberToRepeatOOMTest 5
+[Enddefine]
+
+
+[StifSettings]
+// Add stif settings here
+CheckHeapBalance= on
+[EndStifSettings]
+
+[Test]
+title Check plugin loaded just once channel opened
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+
+testClass ShutdownServer
+pause 2000
+testClass StartServer
+pause 2000
+testClass GetPSValue KSensrvCheckPluginLoaded 0
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetPSValue KSensrvCheckPluginLoaded 1
+testClass ShutdownServer
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+[Endtest]
+
+[Test]
+title Open and Close two channels
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass1 CloseChannel
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+
+
+[Test]
+title Start server without Ssystubs
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass ShutdownServer
+testClass SetPSValue KSensrvLeaveFirstStubConstruction KErrNoMemory
+testClass SetPSValue KSensrvLeaveSecondStubConstruction KErrNoMemory
+testClass StartServer
+pause 3000
+testClass ShutdownServer
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+[Endtest]
+
+[Test]
+title Start server with one Ssystub
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass ShutdownServer
+testClass SetPSValue KSensrvLeaveFirstStubConstruction KErrNoMemory
+testClass StartServer
+pause 3000
+testClass ShutdownServer
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+[Endtest]
+
+[Test]
+title Start server with two Ssystub
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass ShutdownServer
+testClass StartServer
+pause 3000
+testClass ShutdownServer
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+[Endtest]
+
+
+// Invalid because of new static channel registration
+/*
+[Test]
+title Start server with zero and one channel
+create SensorTestModule testClass
+testClass ShutdownServer
+testClass SetPSValue KSensrvFirstStubChannelCount 0
+testClass SetPSValue KSensrvSecondStubChannelCount 1
+testClass StartServer
+pause 3000
+testClass ShutdownServer
+delete testClass
+[Endtest]
+*/
+
+
+[Test]
+title Create and destroy channel finder
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass CreateAndDestroyChannelFinder
+testClass ShutdownServer
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+[Endtest]
+
+[Test]
+title Create two channel finders
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass CreateAndDestroyChannelFinder
+testClass1 CreateAndDestroyChannelFinder
+testClass ShutdownServer
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+[Endtest]
+
+[Test]
+title Find channel: Find all channels
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass FindChannels 0 0 0 0 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channel: Find one channel "First1 VendorFirst"
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass FindChannels 0 0 0 0 0 First1 VendorFirst
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channels: Channel not found "Second1 VendorFirst"
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass FindChannels 0 0 0 0 0 Second1 VendorFirst
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channels: Requery
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvFirstStubChannelCount 10
+testClass SetPSValue KSensrvSecondStubChannelCount 3
+testClass FindChannels 0 0 0 0 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channels: Ssystubs construction jam
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvStubConstructionJam 1
+testClass FindChannels 0 0 0 0 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channels: Ssystubs construction delay
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvStubConstructionDelay 5
+testClass FindChannels 0 0 0 0 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channels: Ssystubs construction delay(two client)
+create SensorTestModule testClass
+testClass SetCompletedKey KSensorTestModuleComplete1
+create SensorTestModule testClass1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetPSValue KSensrvStubConstructionDelay 5
+testClass SetPSValue KSensrvWaitTestCompletion 0
+testClass FindChannels 0 0 0 0 0
+testClass1 SetPSValue KSensrvWaitTestCompletion 1
+testClass1 FindChannels 0 0 0 0 0
+testClass WaitCompletedKey
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channels: Ssystubs construction delay(three client)
+create SensorTestModule testClass
+create SensorTestModule testClass1
+create SensorTestModule testClass2
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass2 SetCompletedKey KSensorTestModuleComplete3
+testClass SetPSValue KSensrvStubConstructionDelay 5
+testClass SetPSValue KSensrvWaitTestCompletion 0
+testClass FindChannels 0 0 0 0 0
+testClass1 FindChannels 0 0 0 0 0
+testClass2 SetPSValue KSensrvWaitTestCompletion 1
+testClass2 FindChannels 0 0 0 0 0
+testClass WaitCompletedKey
+testClass1 WaitCompletedKey
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+delete testClass2
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channel: Find all channels(CAP_SERVER capabilities)
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass CreateNewProcess 1
+testClass SetProcessPSValue 1 KProcessCommandFindChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channel: Find all channels(WriteDeviceData capabilities)
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass CreateNewProcess 3
+testClass SetProcessPSValue 3 KProcessCommandFindChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Find channel: Find all channels(ReadDeviceData capabilities)
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass CreateNewProcess 4
+testClass SetProcessPSValue 4 KProcessCommandFindChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Open and Close channel
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Open channel twice
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+allownextresult KErrAlreadyExists
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Open and Close two channels
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass1 CloseChannel
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Open channel asynchronous error
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvChannelOpenedWithError KErrGeneral
+allownextresult KErrGeneral
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvChannelOpenedWithError 0
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Open channel return error
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvOpenChannelError KErrGeneral
+allownextresult KErrGeneral
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvOpenChannelError 0
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Close channel return error
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvCloseChannelError KErrGeneral
+testClass CloseChannel
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvCloseChannelError 0
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title SSY do not call ChannelOpened
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvChannelOpenedError 1
+allownextresult KErrCancel
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvChannelOpenedError 0
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title SSY do not call ChannelClosed
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvChannelClosedError 1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass SetPSValue KSensrvChannelClosedError 0
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Start listening twice
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvSamplingInterval 100
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 15 10000 3
+allownextresult KErrAlreadyExists
+testClass StartDataListening 15 10000 3
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: two channels
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 22 1000 5
+testClass1 OpenChannel 0 0 0 0 0 Second0 VendorSecond
+testClass1 StartDataListening 22 1000 10
+testClass WaitCompletedKey
+testClass CloseChannel
+delete testClass
+testClass1 WaitCompletedKey
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: two same channels:
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 22 1000 5
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartDataListening 22 1000 10
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass1 WaitCompletedKey
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Start listening Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvStartListeningLeave KErrGeneral
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+allownextresult KErrGeneral
+testClass StartDataListening 15 10000 3
+testClass SetPSValue KSensrvStartListeningLeave 0
+testClass StartDataListening 15 10000 3
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Stop listening Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvStopListeningLeave KErrGeneral
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 15 10000 3
+testClass WaitCompletedKey
+testClass SetPSValue KSensrvStopListeningLeave 0
+testClass StartDataListening 15 10000 3
+testClass WaitCompletedKey
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Start listening when channel is not open
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass FindChannels 0 0 0 0 0 First1 VendorFirst
+allownextresult KErrNotFound
+testClass StartListeningWhenChannelIsNotOpen 15 10000 3
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: ForceBufferFilled Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvForceBufferFilledLeave KErrGeneral
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvSamplingInterval 200
+testClass StartDataListening 22 1000 10
+testClass WaitCompletedKey
+testClass SetPSValue KSensrvForceBufferFilledLeave 0
+testClass StartDataListening 22 1000 10
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: GetData overflow test
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvGetDataOverflowTest 1
+testClass StartDataListening 10 1000 5
+allownextresult KErrOverflow
+testClass WaitCompletedKey
+testClass SetPSValue KSensrvGetDataOverflowTest 0
+testClass StartDataListening 10 1000 5
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: GetData 'data not found' test
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvGetDataNotFoundTest 1
+testClass StartDataListening 10 1000 5
+allownextresult KErrNotFound
+testClass WaitCompletedKey
+testClass SetPSValue KSensrvGetDataNotFoundTest 0
+testClass StartDataListening 10 1000 5
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Sample size 1
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvSamplingInterval 200
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 1 10000 10
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: One per channel, six channels
+create SensorTestModule testClass
+create SensorTestModule testClass1
+create SensorTestModule testClass2
+create SensorTestModule testClass3
+create SensorTestModule testClass4
+create SensorTestModule testClass5
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass2 SetCompletedKey KSensorTestModuleComplete3
+testClass3 SetCompletedKey KSensorTestModuleComplete4
+testClass4 SetCompletedKey KSensorTestModuleComplete5
+testClass5 SetCompletedKey KSensorTestModuleComplete6
+testClass SetPSValue KSensrvSamplingInterval 10
+testClass SetPSValue KSensrvFirstStubChannelCount 10
+testClass OpenChannel 0 0 0 0 0 First0 VendorFirst
+testClass StartDataListening 10 0 200
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartDataListening 3 0 600
+testClass2 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass2 StartDataListening 1 0 2000
+testClass3 OpenChannel 0 0 0 0 0 First3 VendorFirst
+testClass3 StartDataListening 1 10 2000
+testClass4 OpenChannel 0 0 0 0 0 First4 VendorFirst
+testClass4 StartDataListening 3 30 600
+testClass5 OpenChannel 0 0 0 0 0 First5 VendorFirst
+testClass5 StartDataListening 10 100 200
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass1 WaitCompletedKey
+testClass1 CloseChannel
+testClass2 WaitCompletedKey
+testClass2 CloseChannel
+testClass3 WaitCompletedKey
+testClass3 CloseChannel
+testClass4 WaitCompletedKey
+testClass4 CloseChannel
+testClass5 WaitCompletedKey
+testClass5 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+delete testClass2
+delete testClass3
+delete testClass4
+delete testClass5
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Restarting listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetPSValue KSensrvSamplingInterval 10
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 3 10000 40
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 5 10000 30
+testClass WaitCompletedKey
+testClass StartDataListening 4 10000 20
+testClass WaitCompletedKey
+testClass StartDataListening 3 10000 10
+testClass WaitCompletedKey
+testClass StartDataListening 2 10000 5
+testClass WaitCompletedKey
+testClass StartDataListening 1 10000 1
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Extreme values
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetPSValue KSensrvSamplingInterval 10
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 2000000000 2000000000 10
+testClass WaitCompletedKey
+//testClass StartDataListening 0 0 10
+//testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Listening: Buffer write error (negative count on buffer filled)
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvBufferFilledNegativeCount 1
+testClass StartDataListening 15 10000 2
+allownextresult ESensrvMinor
+testClass WaitCompletedKey
+allownextresult ESensrvFatal
+testClass WaitCompletedKey
+testClass SetPSValue KSensrvBufferFilledNegativeCount 0
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 15 10000 2
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title SSY Unloading: Unloading after normal close
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 15 10000 1
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass WaitSSYUnloading 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title SSY Unloading: Unloading after open error
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvOpenChannelError KErrGeneral
+allownextresult KErrGeneral
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass WaitSSYUnloading 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title SSY Unloading: Unloading after close error
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 15 10000 1
+testClass WaitCompletedKey
+testClass SetPSValue KSensrvCloseChannelError KErrGeneral
+testClass CloseChannel
+testClass WaitSSYUnloading 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title SSY Unloading: Unloading after server start
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass FindChannels 0 0 0 0 0 First1 VendorFirst
+testClass WaitSSYUnloading 2 // 2 dynamic channel SSYs are loaded when FindChannels queries all channels to verify result
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Set and Get a property. Property type TInt
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Set and Get a property. Property type TReal
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetProperty KSensrvPropIdMeasureRange 1 200
+testClass GetProperty KSensrvPropIdMeasureRange 1 200
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Set and Get a property. Property type TDes
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetProperty KSensrvSensorDescription 1 test
+testClass GetProperty KSensrvSensorDescription 1 test
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Get all properties
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvGetAllPropertyCount 10
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetAllProperties
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Get all properties ( Requery )
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvGetAllPropertyCount 50
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetAllProperties
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Get array property
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvSetPropertyArray 3
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetAllPropertiesWithPropertyId
+testClass GetAllPropertiesWithArrayIndex
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property Listening: Start and stop property listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvPropertyChanged 500 ms
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+pause 2000 // pause for 2 seconds
+testClass StopPropertyListening
+testClass CheckPropertyChangedCount
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property Listening: Start property listening twice
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvPropertyChanged 500 ms
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+allownextresult KErrAlreadyExists
+testClass StartPropertyListening
+pause 2000 // pause for 2 seconds
+testClass StopPropertyListening
+testClass CheckPropertyChangedCount
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property Listening: Start and stop property and data listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvPropertyChanged 500 ms
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 20 10000 30
+testClass StartPropertyListening
+pause 2000 // pause for 2 seconds
+testClass StopPropertyListening
+testClass WaitCompletedKey
+testClass CheckPropertyChangedCount
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property Listening: Restart property listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvPropertyChanged 200 ms
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 20 10000 30
+testClass StartPropertyListening
+pause 1000 // pause for 1 seconds
+testClass StopPropertyListening
+testClass CheckPropertyChangedCount
+pause 1000 // pause for 1 seconds
+testClass CheckPropertyChangedCount 0
+testClass StartPropertyListening
+pause 1000 // pause for 1 seconds
+testClass StopPropertyListening
+testClass CheckPropertyChangedCount
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property Listening: Three clients listening
+create SensorTestModule testClass1
+testClass1 SetCompletedKey KSensorTestModuleComplete1
+create SensorTestModule testClass2
+testClass2 SetCompletedKey KSensorTestModuleComplete2
+create SensorTestModule testClass3
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass3 SetCompletedKey KSensorTestModuleComplete3
+testClass1 OpenChannel 0 0 0 0 0 First0 VendorFirst
+testClass2 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass3 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass1 StartDataListening 10 10000 30
+testClass2 StartDataListening 10 10000 30
+testClass3 StartDataListening 10 10000 30
+testClass1 StartPropertyListening
+testClass2 StartPropertyListening
+testClass3 StartPropertyListening
+testClass1 SetProperty KSensrvPropIdDataRate 1 200
+testClass1 SetProperty KSensrvPropIdMeasureRange 1 200
+testClass1 SetProperty KSensrvSensorDescription 1 test
+testClass2 SetProperty KSensrvPropIdDataRate 1 200
+testClass2 SetProperty KSensrvPropIdMeasureRange 1 200
+testClass2 SetProperty KSensrvSensorDescription 1 test
+testClass3 SetProperty KSensrvPropIdDataRate 1 200
+testClass3 SetProperty KSensrvPropIdMeasureRange 1 200
+testClass3 SetProperty KSensrvSensorDescription 1 test
+pause 1000 // pause for 1 seconds
+testClass1 CheckPropertyChangedCount 6
+testClass2 CheckPropertyChangedCount 6
+testClass3 CheckPropertyChangedCount 6
+testClass1 StopPropertyListening
+testClass2 StopPropertyListening
+testClass3 StopPropertyListening
+testClass1 WaitCompletedKey
+testClass2 WaitCompletedKey
+testClass3 WaitCompletedKey
+testClass1 CloseChannel
+testClass2 CloseChannel
+testClass3 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass1
+delete testClass2
+delete testClass3
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: SetProperty Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvSetPropertyLeave KErrPermissionDenied
+allownextresult KErrPermissionDenied
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass SetPSValue KSensrvSetPropertyLeave 0
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass StartDataListening 10 10000 5
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: SetProperty Leave when data listening and property listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 20 10000 30
+testClass StartPropertyListening
+testClass SetPSValue KSensrvSetPropertyLeave KErrPermissionDenied
+allownextresult KErrPermissionDenied
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass SetPSValue KSensrvSetPropertyLeave 0
+create SensorTestModule testClass1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartPropertyListening
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass CheckPropertyChangedCount 0
+testClass1 CheckPropertyChangedCount 1
+testClass StopPropertyListening
+testClass1 StopPropertyListening
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: GetProperty Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvGetPropertyLeave KErrPermissionDenied
+allownextresult KErrPermissionDenied
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass SetPSValue KSensrvGetPropertyLeave 0
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass StartDataListening 10 10000 5
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: GetProperty Leave when data listening and property listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 30 10000 30
+testClass StartPropertyListening
+testClass SetPSValue KSensrvGetPropertyLeave KErrPermissionDenied
+allownextresult KErrPermissionDenied
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass SetPSValue KSensrvGetPropertyLeave 0
+create SensorTestModule testClass1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartPropertyListening
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass CheckPropertyChangedCount 0
+testClass1 CheckPropertyChangedCount 1
+testClass StopPropertyListening
+testClass1 StopPropertyListening
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: GetAllProperties Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvGetAllPropertyCount 10
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvGetAllPropertiesLeave KErrPermissionDenied
+allownextresult KErrPermissionDenied
+testClass GetAllProperties
+testClass SetPSValue KSensrvGetAllPropertiesLeave 0
+testClass StartDataListening 10 10000 10
+testClass GetAllProperties
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: GetAllProperties Leave when data listening and property listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvGetAllPropertyCount 10
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 20 10000 30
+testClass StartPropertyListening
+testClass SetPSValue KSensrvGetAllPropertiesLeave KErrPermissionDenied
+allownextresult KErrPermissionDenied
+testClass GetAllProperties
+testClass SetPSValue KSensrvGetAllPropertiesLeave 0
+create SensorTestModule testClass1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartPropertyListening
+testClass GetAllProperties
+testClass SetProperty KSensrvPropIdDataRate 1 200
+pause 2000
+testClass CheckPropertyChangedCount 0
+testClass1 CheckPropertyChangedCount 1
+testClass StopPropertyListening
+testClass1 StopPropertyListening
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: CheckPropertyDependenciesL Leave
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass SetPSValue KSensrvCheckPropertyDependenciesLeave KErrArgument
+allownextresult KErrArgument
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass SetPSValue KSensrvCheckPropertyDependenciesLeave 0
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass StartDataListening 10 10000 5
+testClass WaitCompletedKey
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: CheckPropertyDependenciesL Leave when data listening and property listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartDataListening 20 10000 30
+testClass StartPropertyListening
+testClass SetPSValue KSensrvCheckPropertyDependenciesLeave KErrArgument
+allownextresult KErrArgument
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass SetPSValue KSensrvCheckPropertyDependenciesLeave 0
+create SensorTestModule testClass1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartPropertyListening
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass CheckPropertyChangedCount 0
+testClass1 CheckPropertyChangedCount 1
+testClass StopPropertyListening
+testClass1 StopPropertyListening
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: SetProperty - Capability test
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 StartPropertyListening
+allownextresult KErrPermissionDenied
+testClass SetProperty KSensrvPropIdChannelScale 1 200
+testClass SetProperty KSensrvPropIdDataRate 1 200
+testClass GetProperty KSensrvPropIdDataRate 1 200
+testClass StartDataListening 10 10000 5
+testClass WaitCompletedKey
+testClass CheckPropertyChangedCount 0
+testClass1 CheckPropertyChangedCount 1
+testClass CloseChannel
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Set a property from multiple processes, set is denyed for process 2.
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CreateNewProcess 2
+testClass SetProcessPSValue 1 KProcessCommandOpenChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass SetProcessPSValue 2 KProcessCommandOpenChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass SetProcessPSValue 1 KProcessCommandSetProperty 0 KSensrvPropIdDataRate 1 200
+testClass WaitCompletedKey
+testClass SetProcessPSValue 2 KProcessCommandSetProperty -21 KSensrvPropIdDataRate 1 200
+testClass WaitCompletedKey
+testClass SetProcessPSValue 1 KProcessCommandCloseChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass SetProcessPSValue 2 KProcessCommandCloseChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Reg: SSY registers and removes new channels
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass CloseChannel
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+testClass StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass AdjustChannels 4 VendorNew KSensrvCreateNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 4
+testClass OpenChannel 0 0 0 0 0 NULL VendorNew
+testClass StartDataListening 15 10000 3
+testClass WaitCompletedKey
+testClass CloseChannel
+testClass AdjustChannels 2 VendorNew KSensrvRemoveNewChannelsFirst
+testClass SetPSValue KSensrvWaitTestCompletion 1
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 2
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Reg: Restart listening after stopping it.
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+testClass StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass AdjustChannels 4 VendorNew KSensrvCreateNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 4
+testClass AdjustChannels 2 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 2
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass AdjustChannels 5 VendorNew KSensrvCreateNewChannelsFirst
+pause 100 //0.1s
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 7
+testClass StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass AdjustChannels 4 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 3
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Reg: Two SSYs register and remove new channels, with two listeners
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 Second1 VendorSecond
+testClass1 CloseChannel
+testClass StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass1 StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+pause 500
+testClass AdjustChannels 7 VendorNew KSensrvCreateNewChannelsFirst 4
+testClass1 AdjustChannels 7 VendorNew KSensrvCreateNewChannelsSecond 3
+testClass WaitCompletedKey
+testClass1 WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 7
+testClass AdjustChannels 4 VendorNew KSensrvRemoveNewChannelsFirst 2
+testClass1 AdjustChannels 4 VendorNew KSensrvRemoveNewChannelsSecond 2
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 3
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass1 StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Reg: SSY unregisters an active channel
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetPSValue KSensrvSamplingInterval 100
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 CloseChannel
+testClass1 FindChannels 0 0 0 0 0 NULL VendorNew
+testClass1 CheckFoundChannelCount 0
+testClass1 AdjustChannels 1 VendorNew KSensrvCreateNewChannelsFirst
+pause 500
+testClass1 StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+testClass OpenChannel 0 0 0 0 0 NULL VendorNew
+testClass StartDataListening 3 10000 30
+pause 500
+testClass1 AdjustChannels 1 VendorNew KSensrvRemoveNewChannelsFirst
+// Since the failure to open proxy completes quite fast,
+// it might be that minor error completion is not yet handled,
+// when fatal comes, so allow both results for the wait
+allownextresult ESensrvMinor
+allownextresult ESensrvFatal
+testClass WaitCompletedKey
+testClass1 WaitCompletedKey
+testClass1 FindChannels 0 0 0 0 0 NULL VendorNew
+testClass1 CheckFoundChannelCount 0
+testClass1 StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+allownextresult KErrNotFound
+testClass OpenChannel 0 0 0 0 0 NULL VendorNew
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Reg: Previously registered and removed channels get correct id upon re-registration
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass StartChannelChangeListening 0 0 0 0 0 NULL VendorNew
+pause 500
+testClass AdjustChannels 20 VendorNew KSensrvCreateNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 20
+testClass StoreFoundChannels 1
+testClass AdjustChannels 6 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass AdjustChannels 10 VendorNew KSensrvCreateNewChannelsFirst
+testClass WaitCompletedKey
+testClass AdjustChannels 21 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass AdjustChannels 3 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+testClass AdjustChannels 11 VendorNew KSensrvCreateNewChannelsFirst
+testClass WaitCompletedKey
+testClass AdjustChannels 2 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass AdjustChannels 11 VendorNew KSensrvCreateNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 20
+testClass StoreFoundChannels 0
+testClass AdjustChannels 20 VendorNew KSensrvRemoveNewChannelsFirst
+testClass WaitCompletedKey
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorNew
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with same priority appears
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 1
+testClass SetProcessPSValue 1 KProcessCommandOpenChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass CheckListenedSetPropertySuccessIndicator ESetPropertyIndicationPossible 1
+testClass SetProcessPSValue 1 KProcessCommandSetProperty 0 KSensrvPropIdDataRate 1 200
+testClass WaitCompletedKey
+testClass CheckListenedSetPropertySuccessIndicator ESetPropertyIndicationUnavailable 1
+//testClass WaitCompletedKey
+testClass StopPropertyListening
+testClass SetProcessPSValue 1 KProcessCommandCloseChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with same priority disappears
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 1
+testClass SetProcessPSValue 1 KProcessCommandOpenChannel 0 0 0 0
+pause 2000
+testClass SetProcessPSValue 1 KProcessCommandCloseChannel 0 0 0 0
+pause 2000
+testClass CheckListenedSetPropertySuccessIndicator ESetPropertyIndicationAvailable 2
+testClass StopPropertyListening
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with lower priority appears
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 2
+testClass SetProcessPSValue 2 KProcessCommandOpenChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass SetProcessPSValue 2 KProcessCommandSetProperty -21 KSensrvPropIdDataRate 1 200
+testClass WaitCompletedKey
+testClass CheckListenedSetPropertySuccessIndicator -1 0
+testClass StopPropertyListening
+testClass SetProcessPSValue 2 KProcessCommandCloseChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with lower priority disappears
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 2
+testClass SetProcessPSValue 2 KProcessCommandOpenChannel 0 0 0 0
+pause 2000
+testClass SetProcessPSValue 2 KProcessCommandCloseChannel 0 0 0 0
+pause 2000
+testClass CheckListenedSetPropertySuccessIndicator -1 0
+testClass StopPropertyListening
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with higher priority appears
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 3
+testClass SetProcessPSValue 3 KProcessCommandOpenChannel 0 0 0 0
+testClass SetProcessPSValue 3 KProcessCommandSetProperty 0 KSensrvPropIdDataRate 1 200
+testClass WaitCompletedKey
+testClass CheckListenedSetPropertySuccessIndicator ESetPropertyIndicationUnavailable 1
+testClass StopPropertyListening
+testClass SetProcessPSValue 3 KProcessCommandCloseChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with higher priority disappears
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 3
+testClass SetProcessPSValue 3 KProcessCommandOpenChannel 0 0 0 0
+pause 2000
+testClass SetProcessPSValue 3 KProcessCommandCloseChannel 0 0 0 0
+pause 2000
+testClass CheckListenedSetPropertySuccessIndicator ESetPropertyIndicationAvailable 2
+testClass StopPropertyListening
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Property: Start listening set success indicator, listener with higher priority disappears but same remains
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass StartPropertyListening
+testClass CreateNewProcess 3
+testClass SetProcessPSValue 3 KProcessCommandOpenChannel 0 0 0 0
+pause 2000
+testClass CreateNewProcess 1
+testClass SetProcessPSValue 1 KProcessCommandOpenChannel 0 0 0 0
+pause 2000
+testClass SetProcessPSValue 3 KProcessCommandCloseChannel 0 0 0 0
+pause 2000
+testClass CheckListenedSetPropertySuccessIndicator ESetPropertyIndicationPossible 2
+testClass SetProcessPSValue 1 KProcessCommandCloseChannel 0 0 0 0
+testClass StopPropertyListening
+testClass KillProcess
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Auto-shutdown: start first client
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+pause 2000
+testClass CheckServerAlive 1
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Auto-shutdown: start second client
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+allownextresult KErrAlreadyExists
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CheckServerAlive 1
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Auto-shutdown: shutdown first client
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass1 CloseChannel
+delete testClass1
+pause 5000
+testClass CheckServerAlive 1
+testClass CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Auto-shutdown: shutdown second client
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass1 CloseChannel
+testClass CloseChannel
+pause 10000
+testClass CheckServerAlive 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass1
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: SSY loaded for query channels, channel is available
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvFirstStubChannelCount 11
+pause 100
+testClass SetPSValue KSensrvWaitTestCompletion 0
+testClass FindChannels 0 0 0 0 0 First10 VendorFirst
+testClass WaitCompletedKey
+testClass CheckFoundChannelCount 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: SSY loaded for query channels, channel is unavailable
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvFirstStubChannelCount 10
+pause 100
+testClass SetPSValue KSensrvWaitTestCompletion 0
+testClass FindChannels 0 0 0 0 0 First10 VendorFirst
+testClass WaitCompletedKey
+testClass CheckFoundChannelCount 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: SSY loaded for change listening
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass GetPSValue KSensrvCheckPluginLoaded 0
+testClass StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+pause 100
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+testClass GetPSValue KSensrvCheckPluginLoaded 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: Change listening, SSY unload is denied
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass GetPSValue KSensrvCheckPluginLoaded 0
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetPSValue KSensrvCheckPluginLoaded 1
+testClass CloseChannel
+testClass StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+testClass WaitSSYUnloading 0
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: Change listening, SSY unload is allowed
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass GetPSValue KSensrvCheckPluginLoaded 0
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetPSValue KSensrvCheckPluginLoaded 1
+testClass CloseChannel
+testClass StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+testClass WaitSSYUnloading 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: Two clients change listening, SSY unload is denied
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass GetPSValue KSensrvCheckPluginLoaded 0
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetPSValue KSensrvCheckPluginLoaded 1
+testClass CloseChannel
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 CloseChannel
+testClass StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+testClass1 StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+testClass WaitSSYUnloading 0
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+testClass1 StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title DynChannels: Two clients change listening, SSY unload is allowed
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass GetPSValue KSensrvCheckPluginLoaded 0
+testClass SetCompletedKey KSensorTestModuleComplete1
+
+testClass1 SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass GetPSValue KSensrvCheckPluginLoaded 1
+testClass CloseChannel
+testClass1 OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 CloseChannel
+testClass StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+testClass1 StartChannelChangeListening 0 0 0 0 0 First10 VendorFirst
+testClass StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+testClass1 StopChannelChangeListening 0 0 0 0 0 NULL VendorFirst
+testClass WaitSSYUnloading 1
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Dependent Channels: Open and Close two channels
+create SensorTestModule testClass
+create SensorTestModule testClass1
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass1 SetPSValue KSensrvChannelOpenedError KErrNotSupported
+testClass1 OpenChannel 0 0 0 0 0 First2 VendorFirst
+testClass GetProperty KSensrvPropIdAvailability 1 1
+testClass1 GetProperty KSensrvPropIdAvailability 1 0
+testClass CloseChannel
+testClass1 GetProperty KSensrvPropIdAvailability 1 1
+testClass1 CloseChannel
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+[Test]
+title Dependent Channels: Three dependent channels, listener with higher priority appears for the unavailable channel
+create SensorTestModule testClass
+create SensorTestModule testClass1
+create SensorTestModule testClass2
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass2 SetCompletedKey KSensorTestModuleComplete3
+testClass2 OpenChannel 0 0 0 0 0 First2 VendorFirst 1
+testClass1 SetCompletedKey KSensorTestModuleComplete2
+testClass1 OpenChannel 0 0 0 0 0 First0 VendorFirst 1
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass SetPSValue KSensrvChannelOpenedError KErrNotSupported
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst 0
+testClass GetProperty KSensrvPropIdAvailability 1 0
+testClass1 GetProperty KSensrvPropIdAvailability 1 1
+testClass2 GetProperty KSensrvPropIdAvailability 1 1
+testClass CreateNewProcess 3
+testClass SetProcessPSValue 3 KProcessCommandOpenChannel 0 0 0 0
+testClass GetProperty KSensrvPropIdAvailability 1 0
+testClass1 GetProperty KSensrvPropIdAvailability 1 1
+testClass SetProcessPSValue 3 KProcessCommandCloseChannel 0 0 0 0
+testClass WaitCompletedKey
+testClass GetProperty KSensrvPropIdAvailability 1 1
+testClass1 GetProperty KSensrvPropIdAvailability 1 1
+testClass CloseChannel
+testClass1 GetProperty KSensrvPropIdAvailability 1 1
+testClass1 CloseChannel
+testClass KillProcess
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+delete testClass1
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+// This case panics intensionally in debug builds
+[Test]
+title Reg: SSY registers zero channels (UDEB panics!)
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass SetPSValue KSensrvRegisterZeroChannels 0
+pause 500
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+allownextresult KErrArgument
+testClass GetPsResult KSensrvRegisterZeroChannels
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
+
+// This case panics intensionally in debug builds
+[Test]
+title Reg: SSY registers invalid channels (UDEB panics!)
+create SensorTestModule testClass
+
+oomignorefailure ON
+loop KNumberToRepeatOOMTest
+oomheapfailnext 5
+
+testClass SetCompletedKey KSensorTestModuleComplete1
+testClass OpenChannel 0 0 0 0 0 First1 VendorFirst
+testClass CloseChannel
+testClass SetPSValue KSensrvRegisterInvalidChannels 0
+pause 500
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+allownextresult KErrArgument
+testClass GetPsResult KSensrvRegisterInvalidChannels
+testClass FindChannels 0 0 0 0 0 NULL VendorNew
+testClass CheckFoundChannelCount 0
+
+endloop
+oomignorefailure OFF
+oomheaptonormal
+
+delete testClass
+create SensorTestModule sd
+sd ShutdownServer
+delete sd
+[Endtest]
--- a/sensorservices/sensorserver/tsrc/sensorsrvtest/rom/sensorserver_ats3.iby Fri May 28 14:18:28 2010 +0100
+++ b/sensorservices/sensorserver/tsrc/sensorsrvtest/rom/sensorserver_ats3.iby Thu Jun 24 11:22:10 2010 +0100
@@ -29,9 +29,6 @@
ECOM_PLUGIN(sensrvcondeval.dll, sensrvcondeval.rsc)
-data=ZPRIVATE\10202BE9\10282DEE_stub.txt PRIVATE\10202BE9\10282DEE.txt
-data=ZPRIVATE\10202BE9\1020507E_stub.txt PRIVATE\10202BE9\1020507E.txt
-
#endif // SENSORSERVERTEST_IBY
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/inc/ssmcommonlocale.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Declaration of TLanguageRegion structure.
+*
+*/
+#ifndef __SSMCOMMONLOCALE_H__
+#define __SSMCOMMONLOCALE_H__
+#include <e32base.h>
+
+_LIT( KLanguageDllNameBase, "elocl_lan" );
+_LIT( KRegionDllNameBase, "elocl_reg" );
+_LIT( KCollationDllNameBase, "elocl_col" );
+_LIT( KDllExtensionFormat, ".%u" );
+_LIT( KDllExtensionPadding, "0" );
+const TInt KMaxDllNameLength = 16;
+const TInt KMaxDllExtensionLength = 6;
+const TInt KMinDllExtensionLength = 4;
+const TInt KDllExtensionPaddingPosition = 1;
+
+/**
+* Used for mapping associated regions for the languages
+*/
+class TLanguageRegion
+ {
+public:
+
+ /**
+ * Default constructor.
+ */
+ TLanguageRegion () : iLanguage( 0 ), iRegion ( 0 )
+ {
+ }
+
+ /**
+ * Overloaded constructor.
+ */
+ TLanguageRegion ( const TInt aLanguage )
+ : iLanguage( aLanguage ), iRegion ( 0 )
+ {
+ }
+
+ /**
+ * Overloaded constructor.
+ */
+ TLanguageRegion (const TInt aLanguage, const TInt aRegion)
+ : iLanguage( aLanguage ), iRegion ( aRegion )
+ {
+ }
+
+public:
+ /** Mapped language code */
+ TInt iLanguage;
+
+ /** Mapped region code */
+ TInt iRegion;
+};
+
+#endif // __SSMCOMMONLOCALE_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/inc/ssmlocalepskeys.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: PSKey definition.
+*
+*/
+#ifndef __SSMLOCALEPSKEYS_H__
+#define __SSMLOCALEPSKEYS_H__
+#include <e32base.h>
+
+/** Publish and Subscribe key used for observing Collation code changes. */
+static const TInt KSSMCollationPSKey = 501;
+
+/** Publish and Subscribe key used for observing Region code changes. */
+static const TInt KSSMRegionPSKey = 502;
+
+/** Publish and Subscribe key used for observing UI Language code changes. */
+static const TInt KSSMUILanguagePSKey = 503;
+
+#endif // __SSMLOCALEPSKEYS_H__
--- a/sysstatemgmt/ssmcmdlists/data/alarm_charging.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/alarm_charging.rss Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -226,7 +226,7 @@
name = "z:\\sys\\bin\\locod.exe";
execution_behaviour = ESsmFireAndForget;
monitor_info = r_mon_3_restarts_ignore;
- conditional_information = r_cond_feat_testatcommand;
+ conditional_information = r_cond_testatcommand_or_enableisicommunicationinusbchargingmode;
}
// ---------------------------------------------------------------------------
@@ -535,6 +535,26 @@
feature_id = KFeatureIdTestATCommand;
}
+// ---------------------------------------------------------------------------
+// r_cond_feat_enableisicommunicationinusbchargingmode
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_enableisicommunicationinusbchargingmode
+ {
+ feature_id = KFeatureIdEnableIsiCommunicationInUsbChargingMode;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_testatcommand_or_certtesting
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_testatcommand_or_enableisicommunicationinusbchargingmode
+ {
+ lhs = r_cond_feat_testatcommand;
+ rhs = r_cond_feat_enableisicommunicationinusbchargingmode;
+ }
+
+
// monitoring.rss contains resource definitions, so it may not be included
// before entry point.
#include "monitoring.rss"
--- a/sysstatemgmt/ssmcmdlists/data/criticalappscmdlist.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/criticalappscmdlist.rss Thu Jun 24 11:22:10 2010 +0100
@@ -72,7 +72,6 @@
r_cmd_selftest,
r_cmd_cfserver,
r_cmd_sysap,
- r_cmd_calsrv,
r_cmd_profmon,
// prio 0xFFE6
r_cmd_multiwaitforever
@@ -84,17 +83,6 @@
// ===========================================================================
//
-// ---------------------------------------------------------------------------
-// r_cmd_calsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_calsrv
- {
- priority = 0xFFE7;
- name = "calensvr.exe";
- execution_behaviour = ESsmFireAndForget;
- monitor_info = r_mon_100_restarts_reset;
- }
// ---------------------------------------------------------------------------
// r_cmd_cfserver
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist.rss Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,7 +12,7 @@
* Contributors:
*
* Description:
-* Command list for the Non-critical startup state.
+* Command list for the Non-critical startup state in minimal startup mode.
*
*/
@@ -73,94 +73,17 @@
r_cmd_psstate, // prio 0xFFF0
// prio 0xFFE7
r_cmd_simcheck,
- r_cmd_clearstartupreason,
+ r_cmd_clearstartupreason,
r_cmd_createswp_uiphase,
r_cmd_createswp_rfstatus,
r_cmd_waitforofflinequery,
// prio 0xFFD7
r_cmd_setswp_uistart, // After offline query has been made
- r_cmd_adtupdater, // Location, date & time queries
r_cmd_bsengine,
- r_cmd_waitforphone,
// prio 0xFFC7
r_cmd_setswp_rfon,
r_cmd_setswp_rfoff,
- r_cmd_waitidle,
- // prio 0xFFB7
-#ifdef __JAVA
- r_cmd_javacaptain,
-#endif // __JAVA
- r_cmd_watcher,
- r_cmd_dmutilsrv,
- r_cmd_mediasyncserver, // Should be executed before contentharvester
- // prio 0xFFA7
- r_cmd_contentharvester,
- r_cmd_harvestersrv,
- r_cmd_predefinedcontacts,
- r_cmd_xnthemesrv,
- r_cmd_ncnlist,
- r_cmd_satsrv,
- r_cmd_cbssrv,
- r_cmd_schedsrv,
- r_cmd_aosrv,
- r_cmd_ippushman,
- r_cmd_remotefe,
- r_cmd_supllistener,
- r_cmd_autolock,
- r_cmd_pocstarter,
- r_cmd_gsserver,
- r_cmd_vcommandmgr,
- r_cmd_dmallreasons,
- r_cmd_locod,
-#ifdef FF_LBT_ENGINE
- r_cmd_lbtsrv,
-#endif // FF_LBT_ENGINE
- r_cmd_fsemail,
- // prio 0xFFA6
- r_cmd_dmfirstbootreason,
- r_cmd_fota,
- // prio 0x7F87
- r_cmd_waitcleanbootinfo,
- // prio 0x7F97
- r_cmd_dcmo,
- r_cmd_amastart,
- // prio 0x7EFF
- r_cmd_activitymonitor1,
- // prio 0x7EFE
- r_cmd_logs,
- // prio 0x7EFD
- r_cmd_activitymonitor2,
- // prio 0x7EFC
- r_cmd_pbk2,
- // prio 0x7EFB
- r_cmd_activitymonitor3,
- // prio 0x7EFA
- r_cmd_mce,
- // prio 0x7EF9
- r_cmd_activitymonitor4,
- // prio 0x7EF8
- r_cmd_clockapp,
- // prio 0x7EF7
- r_cmd_activitymonitor5,
- // prio 0x7EF6
- r_cmd_videocenter,
- // prio 0x7EF5
- r_cmd_activitymonitor6,
- // prio 0x7EF4
- r_cmd_iaupdatebg,
- // prio 0x7EF3
- r_cmd_activitymonitor7,
- // prio 0x7EF2
- r_cmd_screensaver,
- // prio 0x7EEF
- r_cmd_activitymonitor8,
- // prio 0x7EEE
- r_cmd_autosync,
- // prio 0x7EED
- r_cmd_activitymonitor9,
- // prio 0x7EEC
- r_cmd_mylocationsengine,
- r_cmd_startupready // Last command, prio 0x0000
+ r_cmd_startupready // Last command, prio 0x0000
};
}
@@ -168,188 +91,6 @@
// Command items in alphabetical order
// ===========================================================================
//
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor1
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor1
- {
- priority = 0x7EFF;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor2
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor2
- {
- priority = 0x7EFD;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor3
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor3
- {
- priority = 0x7EFB;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor4
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor4
- {
- priority = 0x7EF9;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor5
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor5
- {
- priority = 0x7EF7;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor6
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor6
- {
- priority = 0x7EF5;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor7
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor7
- {
- priority = 0x7EF3;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor8
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor8
- {
- priority = 0x7EEF;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_activitymonitor9
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor9
- {
- priority = 0x7EED;
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "ssmactivitycmd.dll";
- ordinal = 1; // SsmActivityCmdNewL
- retries = 2;
- dll_data = r_dlldata_activitymonitor_timeout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_adtupdater
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_adtupdater
- {
- priority = 0xFFD7;
- name = "adtupdater.exe";
- execution_behaviour = ESsmFireAndForget;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_amastart
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_AMA_STARTER r_cmd_amastart
- {
- priority = 0x7F97;
- conditional_information = r_cond_ps_normalboot;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_autosync
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_autosync
- {
- priority = 0x7EEE;
- execution_behaviour = ESsmFireAndForget;
- retries = 3;
- name = "cctautosync.exe";
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_aosrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_aosrv
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\alwaysonlinestarter.exe";
- execution_behaviour = ESsmFireAndForget;
- conditional_information = r_cond_feat_alwaysonline;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
// ---------------------------------------------------------------------------
// r_cmd_bsengine
// ---------------------------------------------------------------------------
@@ -363,46 +104,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_autolock
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_autolock
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\lockapp.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- background = 1; // To background
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_cbssrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_cbssrv
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\cbsserver.exe";
- execution_behaviour = ESsmFireAndForget;
- conditional_information = r_cond_feat_cellbroadcast;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_clockapp
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_clockapp
- {
- priority = 0x7EF8;
- name = "z:\\sys\\bin\\clockapp.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- background = 1; // To background
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_createswp_rfstatus
// ---------------------------------------------------------------------------
//
@@ -427,271 +128,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_contentharvester
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_contentharvester
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\contentharvester.exe";
- execution_behaviour = ESsmFireAndForget; //behavior changed from ESsmWaitForSignal as part of SCB CR MSOI-7XARNT
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dcmo
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dcmo
- {
- priority = 0x7F97;
- execution_behaviour = ESsmFireAndForget;
- dllname = "dcmostartupcustcmd.dll";
- ordinal = 1; // DCMO command
- conditional_information = r_cond_feat_runtime_dcmo;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dmallreasons
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmallreasons
- {
- priority = 0xFFA7;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "fotacustcmds.dll";
- ordinal = 1; // AllReasons command
- retries = 2;
- conditional_information = r_cond_syncml_dm_or_pnp_mobile_services;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dmfirstbootreason
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmfirstbootreason
- {
- priority = 0xFFA6;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "fotacustcmds.dll";
- ordinal = 3; // FirstBoot command
- retries = 2;
- conditional_information = r_cond_pnp_mobile_services_and_firstboot;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dmutilsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_dmutilsrv
- {
- priority = 0xFFB7;
- name = "z:\\sys\\bin\\dmutilserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_reset;
- conditional_information = r_cond_feat_sappolicymgmt;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_fota
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_fota
- {
- priority = 0xFFA6;
- execution_behaviour = ESsmWaitForSignal;
- dllname = "fotacustcmds.dll";
- ordinal = 2; // Fota command
- retries = 2;
- conditional_information = r_cond_syncml_dm_fota_and_fotareset;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_fsemail
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_fsemail
- {
- priority = 0xFFA7;
- name = "fsmailserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- background = 1; // To background
- monitor_info = r_mon_3_restarts_ignore;
- conditional_information = r_cond_feat_emailfw;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_gsserver
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_gsserver
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\gsserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- conditional_information = r_cond_feat_tvout;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_harvestersrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_harvestersrv
- {
- priority = 0xFFA7;
- name = "harvesterserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_iaupdatebg
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_iaupdatebg
- {
- priority = 0x7EF4;
- name = "iaupdatebg.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- conditional_information = r_cond_feat_iadv2;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_loadsup_ippushman
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_ippushman
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\ippushman.exe";
- execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
- conditional_information = r_cond_feat_ippush;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_lbtsrv
-// ---------------------------------------------------------------------------
-//
-#ifdef FF_LBT_ENGINE
-RESOURCE SSM_START_PROCESS_INFO r_cmd_lbtsrv
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\lbtserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- }
-#endif // FF_LBT_ENGINE
-
-// ---------------------------------------------------------------------------
-// r_cmd_locod
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_locod
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\locod.exe";
- execution_behaviour = ESsmFireAndForget;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_logs
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_logs
- {
- priority = 0x7EFE;
- name = "z:\\sys\\bin\\logs.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- background = 1; // To background
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_mce
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_mce
- {
- priority = 0x7EFA;
- name = "mce.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- background = 1; // To background
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_mediasyncserver
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_mediasyncserver
- {
- priority = 0xFFA6;
- name = "z:\\sys\\bin\\mediasyncserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_ncnlist
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_ncnlist
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\ncnlist.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_pbk2
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_pbk2
- {
- priority = 0x7EFC;
- name = "z:\\sys\\bin\\phonebook2.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- background = 1; // To background
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_pocstarter
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_pocstarter
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\pocstarter.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- conditional_information = r_cond_feat_omapoc;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_predefinedcontacts
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_predefinedcontacts
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\predefinedcontacts.exe";
- execution_behaviour = ESsmWaitForSignal;
- retries = 2;
- conditional_information = r_cond_firstboot_or_fotareset_or_deeprfsreset;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_psstate
// ---------------------------------------------------------------------------
//
@@ -716,19 +152,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_remotefe
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_remotefe
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\rsfwbootmounter.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- conditional_information = r_cond_feat_remotestoragefw;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_sastate
// ---------------------------------------------------------------------------
//
@@ -744,46 +167,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_satsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_satsrv
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\satserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- conditional_information = r_cond_feat_simcard;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_schedsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_schedsrv
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\schexe.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_screensaver
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_screensaver
- {
- priority = 0x7EF2;
- name = "z:\\sys\\bin\\screensaver.exe";
- background = 1; // To background
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_setswp_rfoff
// ---------------------------------------------------------------------------
//
@@ -849,89 +232,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_supllistener
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_supllistener
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\epos_omasupllistener.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- conditional_information = r_cond_feat_omasuplplugins;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_systemams
-// ---------------------------------------------------------------------------
-//
-#ifdef __JAVA
-RESOURCE SSM_START_PROCESS_INFO r_cmd_javacaptain
- {
- priority = 0xFFB7;
- name = "javacaptain.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- }
-#endif // __JAVA
-// ---------------------------------------------------------------------------
-// r_cmd_vcommandmgr
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_vcommandmgr
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\vcommandmanager.exe";
- background = 1; // To background
- execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
- conditional_information = r_cond_sind_and_no_sdnd;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_videocenter
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_videocenter
- {
- priority = 0x7EF6;
- name = "cseschedulerserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_waitcleanbootinfo
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitcleanbootinfo
- {
- priority = 0x7F87;
- severity = ECmdCriticalSeverity;
- dllname = "ssmsystemcmds.dll";
- ordinal = 6; // WaitPsKeyRange
- dll_data = r_dlldata_waitcleanbootinfo;
- retries = 2;
- execution_behaviour = ESsmWaitForSignal;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_waitforidle
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitidle
- {
- priority = 0xFFC7;
- severity = ECmdCriticalSeverity;
- dllname = "ssmsystemcmds.dll";
- ordinal = 5; // WaitPsKeyExact
- dll_data = r_dlldata_waitidle;
- unload_on_finish = ENeverUnload;
- retries = 2;
- execution_behaviour = ESsmWaitForSignal;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_waitforofflinequery
// ---------------------------------------------------------------------------
//
@@ -948,46 +248,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_waitforphone
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitforphone
- {
- priority = 0xFFD7;
- severity = ECmdCriticalSeverity;
- dllname = "ssmsystemcmds.dll";
- ordinal = 5; // WaitPsKeyExact
- dll_data = r_dlldata_waitphone;
- unload_on_finish = ENeverUnload;
- retries = 2;
- execution_behaviour = ESsmWaitForSignal;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_watcher
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_watcher
- {
- priority = 0xFFB7;
- name = "z:\\sys\\bin\\watcher.exe";
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_xnthemesrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_xnthemesrv
- {
- priority = 0xFFA7;
- name = "z:\\sys\\bin\\xnthemeserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_clearstartupreason
// ---------------------------------------------------------------------------
//
@@ -1001,7 +261,6 @@
execution_behaviour = ESsmWaitForSignal;
}
-
// ===========================================================================
// DLL data items in alphabetical order
// ===========================================================================
@@ -1039,17 +298,6 @@
}
// ---------------------------------------------------------------------------
-// r_dlldata_waitidle
-// ---------------------------------------------------------------------------
-//
-RESOURCE CMD_PARAM_WAIT_PS r_dlldata_waitidle
- {
- category = 0x101F8766; // KPSUidStartup
- key = 0x00000043; // KPSIdlePhase1Ok
- target = 101; // EIdlePhase1Ok
- }
-
-// ---------------------------------------------------------------------------
// r_dlldata_waitofflinequery
// ---------------------------------------------------------------------------
//
@@ -1072,18 +320,6 @@
target = 101; // EPhonePhase1Ok
}
-
-// ---------------------------------------------------------------------------
-// r_cmd_mylocationsengine
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_mylocationsengine
- {
- priority = 0x7EEC;
- name = "z:\\sys\\bin\\mylocationsengine.exe";
- execution_behaviour = ESsmFireAndForget;
- }
-
// ===========================================================================
// Conditional blocks in alphabetical order
// ===========================================================================
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,707 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Command list for the Non-critical startup state in extended startup mode.
+*
+*/
+
+#include <ssm/conditionresourcetypes.rh>
+#include <ssm/ssmcmd.rh>
+#include <ssm/startupreason.h>
+#include <ssm/clayerswp.hrh>
+
+#include "ssmswp.hrh"
+#include "ssmsubstateext.hrh"
+#include "ssmdlldatadefs.rh"
+
+// Identify command list type
+UID2 KUidSsmCommandListResourceFile
+
+// ---------------------------------------------------------------------------
+// r_entry_point
+// This must be the first resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
+ {
+ command_list_mapping = r_map;
+ }
+
+// ---------------------------------------------------------------------------
+// r_map
+// Mapping of command list ids to resource ids.
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_MAPPING r_map
+ {
+ mappings =
+ {
+ SSM_COMMANDLISTID_TO_RESOURCEID
+ {
+ command_list_id = ESsmStateNonCritical;
+ resource_id = r_cmds;
+ }
+ };
+ }
+
+// ===========================================================================
+// Command lists in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmds
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST r_cmds
+ {
+ commands =
+ {
+ // prio 0xFFB7
+#ifdef __JAVA
+ r_cmd_javacaptain,
+#endif // __JAVA
+ r_cmd_watcher,
+ r_cmd_dmutilsrv,
+ // prio 0xFFA7
+ r_cmd_mdswatchdog,
+ r_cmd_satsrv,
+ r_cmd_cbssrv,
+ r_cmd_schedsrv,
+ r_cmd_aosrv,
+ r_cmd_ippushman,
+ r_cmd_remotefe,
+ r_cmd_supllistener,
+ r_cmd_autolock,
+ r_cmd_dmallreasons,
+ r_cmd_locod,
+#ifdef FF_LBT_ENGINE
+ r_cmd_lbtsrv,
+#endif // FF_LBT_ENGINE
+ //prio 0xFFA6
+ r_cmd_dmfirstbootreason,
+ r_cmd_fota,
+ // prio 0x7F87
+ r_cmd_waitcleanbootinfo,
+ // prio 0x7F97
+ r_cmd_dcmo,
+ r_cmd_amastart,
+ // prio 0x7F96
+ r_cmd_multiple_wait,
+ // prio 0x7F55
+ r_cmd_createswp_noncriticalphase,
+ // prio 0x7F54
+ r_cmd_setswp_noncriticalstart
+ };
+ }
+
+// ===========================================================================
+// Command items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmd_amastart
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_AMA_STARTER r_cmd_amastart
+ {
+ priority = 0x7F97;
+ conditional_information = r_cond_ps_normalboot;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_aosrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_aosrv
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\alwaysonlinestarter.exe";
+ execution_behaviour = ESsmFireAndForget;
+ conditional_information = r_cond_feat_alwaysonline;
+ monitor_info = r_mon_3_restarts_ignore;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_autolock
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_APP_INFO r_cmd_autolock
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\lockapp.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ background = 1; // To background
+ monitor_info = r_mon_3_restarts_ignore;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_cbssrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_cbssrv
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\cbsserver.exe";
+ execution_behaviour = ESsmFireAndForget;
+ conditional_information = r_cond_feat_cellbroadcast;
+ monitor_info = r_mon_3_restarts_ignore;
+ }
+
+
+// ---------------------------------------------------------------------------
+// r_cmd_createswp_noncriticalphase
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CREATE_SYSTEM_WIDE_PROPERTY r_cmd_createswp_noncriticalphase
+ {
+ priority = 0x7F55;
+ severity = ECmdCriticalSeverity;
+ key = SWP_UID_SSM_NONCRITICAL_PHASE;
+ filename = "ssmnoncriticalswppolicy.dll";
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_setswp_noncriticalstart
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_REQUEST_SYSTEM_WIDE_PROPERTY r_cmd_setswp_noncriticalstart
+ {
+ priority = 0x7F54;
+ key = SWP_UID_SSM_NONCRITICAL_PHASE;
+ value = ESsmNonCriticalPhaseStarted;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dcmo
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dcmo
+ {
+ priority = 0x7F97;
+ execution_behaviour = ESsmFireAndForget;
+ dllname = "dcmostartupcustcmd.dll";
+ ordinal = 1; // DCMO command
+ conditional_information = r_cond_feat_runtime_dcmo;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dmallreasons
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmallreasons
+ {
+ priority = 0xFFA7;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "fotacustcmds.dll";
+ ordinal = 1; // AllReasons command
+ retries = 2;
+ conditional_information = r_cond_syncml_dm_or_pnp_mobile_services;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dmfirstbootreason
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_dmfirstbootreason
+ {
+ priority = 0xFFA6;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "fotacustcmds.dll";
+ ordinal = 3; // FirstBoot command
+ retries = 2;
+ conditional_information = r_cond_pnp_mobile_services_and_firstboot;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_dmutilsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_dmutilsrv
+ {
+ priority = 0xFFB7;
+ name = "z:\\sys\\bin\\dmutilserver.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ monitor_info = r_mon_3_restarts_reset;
+ conditional_information = r_cond_feat_sappolicymgmt;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_fota
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_fota
+ {
+ priority = 0xFFA6;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "fotacustcmds.dll";
+ ordinal = 2; // Fota command
+ retries = 2;
+ conditional_information = r_cond_syncml_dm_fota_and_fotareset;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_mdswatchdog
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mdswatchdog
+ {
+ priority = 0xFFA7;
+ name = "mdswatchdog.exe";
+ execution_behaviour = ESsmFireAndForget;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_ippushman
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_ippushman
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\ippushman.exe";
+ execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
+ conditional_information = r_cond_feat_ippush;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_lbtsrv
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_LBT_ENGINE
+RESOURCE SSM_START_PROCESS_INFO r_cmd_lbtsrv
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\lbtserver.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ }
+#endif // FF_LBT_ENGINE
+
+// ---------------------------------------------------------------------------
+// r_cmd_locod
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_locod
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\locod.exe";
+ execution_behaviour = ESsmFireAndForget;
+ monitor_info = r_mon_3_restarts_ignore;
+ }
+
+
+// ---------------------------------------------------------------------------
+// r_cmd_psstate
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate
+ {
+ priority = 0xFFF0;
+ severity = ECmdCriticalSeverity;
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000041; // KPSGlobalSystemState
+ value = 104; // ESwStateCriticalPhaseOK
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_remotefe
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_remotefe
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\rsfwbootmounter.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ conditional_information = r_cond_feat_remotestoragefw;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_satsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_satsrv
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\satserver.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ monitor_info = r_mon_3_restarts_ignore;
+ conditional_information = r_cond_feat_simcard;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_schedsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_schedsrv
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\schexe.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_supllistener
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_supllistener
+ {
+ priority = 0xFFA7;
+ name = "z:\\sys\\bin\\epos_omasupllistener.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ monitor_info = r_mon_3_restarts_ignore;
+ conditional_information = r_cond_feat_omasuplplugins;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_multiple_wait
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_MULTIPLE_WAIT r_cmd_multiple_wait
+ {
+ priority = 0x7F96;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_waitcleanbootinfo
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_waitcleanbootinfo
+ {
+ priority = 0x7F87;
+ severity = ECmdCriticalSeverity;
+ dllname = "ssmsystemcmds.dll";
+ ordinal = 6; // WaitPsKeyRange
+ dll_data = r_dlldata_waitcleanbootinfo;
+ retries = 2;
+ execution_behaviour = ESsmWaitForSignal;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_watcher
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_watcher
+ {
+ priority = 0xFFB7;
+ name = "z:\\sys\\bin\\watcher.exe";
+ monitor_info = r_mon_3_restarts_ignore;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_javacaptain
+// ---------------------------------------------------------------------------
+//
+#ifdef __JAVA
+RESOURCE SSM_START_PROCESS_INFO r_cmd_javacaptain
+ {
+ priority = 0xFFB7;
+ name = "javacaptain.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ }
+#endif // __JAVA
+
+// ===========================================================================
+// DLL data items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_dlldata_waitcleanbootinfo
+// ---------------------------------------------------------------------------
+//
+RESOURCE CMD_PARAM_WAIT_PS_2 r_dlldata_waitcleanbootinfo
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000012; // KStartupCleanBoot
+ target1 = 101; // EStartupNormalBoot
+ target2 = 102; // EStartupCleanBoot
+ }
+
+// ===========================================================================
+// Conditional blocks in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_firstboot
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_firstboot
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000013; // KPSStartupFirstBoot
+ value = 101; // EPSStartupFirstBoot
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_alwaysonline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_alwaysonline
+ {
+ feature_id = KFeatureIdAlwaysOnLine;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_cellbroadcast
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_cellbroadcast
+ {
+ feature_id = KFeatureIdCellBroadcast;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_ippush
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_ippush
+ {
+ feature_id = KFeatureIdIpPush;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_omasuplplugins
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_omasuplplugins
+ {
+ feature_id = KFeatureIdOmaSuplPlugins;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_pnp_mobile_services
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_pnp_mobile_services
+ {
+ feature_id = KFeatureIdPlugAndPlayMobileServices;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_remotestoragefw
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_remotestoragefw
+ {
+ feature_id = KFeatureIdRemoteStorageFw;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_runtime_dcmo;
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_runtime_dcmo
+ {
+ feature_id = KFeatureIdFfRuntimeDeviceCapabilityConfiguration;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_sappolicymgmt
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_sappolicymgmt
+ {
+ feature_id = KFeatureIdSapPolicyManagement;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_sdnd
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_sdnd
+ {
+ feature_id = KFeatureIdSdnd;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_simcard
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_simcard
+ {
+ feature_id = KFeatureIdSimCard;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_sind
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_sind
+ {
+ feature_id = KFeatureIdSind;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_syncml_dm
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_syncml_dm
+ {
+ feature_id = KFeatureIdSyncMlDm;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_syncml_dm_fota
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_syncml_dm_fota
+ {
+ feature_id = KFeatureIdSyncMlDmFota;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_no_sdnd
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_NOT r_cond_no_sdnd
+ {
+ sub_condition = r_cond_feat_sdnd;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_pnp_mobile_services_and_firstboot
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_pnp_mobile_services_and_firstboot
+ {
+ lhs = r_cond_feat_pnp_mobile_services;
+ rhs = r_cond_ps_firstboot;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_bootoffline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_bootoffline
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000011; // KStartupBootIntoOffline
+ value = 102; // EBootIntoOfflineMode
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_bootonline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_bootonline
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000011; // KStartupBootIntoOffline
+ value = 101; // EBootIntoOnlineMode
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_fotareset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_fotareset
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000045; // KPSStartupReason
+ value = EFirmwareUpdate;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_normalboot
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_normalboot
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000012; // KStartupCleanBoot
+ value = 101; // EStartupNormalBoot
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_ps_simusable
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_simusable
+ {
+ category = 0x101F8766; // KPSUidStartup
+ key = 0x00000031; // KPSSimStatus
+ value = 101; // ESimUsable
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_simnotusable
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_NOT r_cond_simnotusable
+ {
+ sub_condition = r_cond_ps_simusable;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_simnotusable_or_bootoffline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_simnotusable_or_bootoffline
+ {
+ lhs = r_cond_simnotusable;
+ rhs = r_cond_ps_bootoffline;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_simusable_and_bootonline
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_simusable_and_bootonline
+ {
+ lhs = r_cond_ps_simusable;
+ rhs = r_cond_ps_bootonline;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_sind_and_no_sdnd
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_sind_and_no_sdnd
+ {
+ lhs = r_cond_feat_sind;
+ rhs = r_cond_no_sdnd;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_syncml_dm_fota_and_fotareset
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_AND r_cond_syncml_dm_fota_and_fotareset
+ {
+ lhs = r_cond_feat_syncml_dm_fota;
+ rhs = r_cond_ps_fotareset;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_syncml_dm_or_pnp_mobile_services
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_LOGICAL_OR r_cond_syncml_dm_or_pnp_mobile_services
+ {
+ lhs = r_cond_feat_syncml_dm;
+ rhs = r_cond_feat_pnp_mobile_services;
+ }
+
+// monitoring.rss contains resource definitions, so it may not be included
+// before entry point.
+#include "monitoring.rss"
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_hw.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_hw.rss Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -72,7 +72,6 @@
r_cmd_sipprofilesrv,
#endif // defined !SYMBIAN_EXCLUDE_SIP
r_cmd_remotelock,
- r_cmd_hotspotsrv,
// prio 0x7EF1
r_cmd_activitymonitor1,
// prio 0x7EF0
@@ -133,19 +132,6 @@
// ---------------------------------------------------------------------------
-// r_cmd_hotspotsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_hotspotsrv
- {
- priority = 0xFFA7;
- name = "hotspotserver.exe";
- execution_behaviour = ESsmWaitForSignal;
- timeout = 10000;
- conditional_information = r_cond_protwlan_and_firstboot_or_deeprfs_or_normalrfs;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_provisioning
// ---------------------------------------------------------------------------
//
@@ -206,26 +192,6 @@
//
// ---------------------------------------------------------------------------
-// r_cond_ps_firstboot
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_firstboot
- {
- category = 0x101F8766; // KPSUidStartup
- key = 0x00000013; // KPSStartupFirstBoot
- value = 101; // EPSStartupFirstBoot
- }
-
-// ---------------------------------------------------------------------------
-// r_cond_feat_protocolwlan
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_protocolwlan
- {
- feature_id = KFeatureIdProtocolWlan;
- }
-
-// ---------------------------------------------------------------------------
// r_cond_feat_remotelock
// ---------------------------------------------------------------------------
//
@@ -244,60 +210,6 @@
}
// ---------------------------------------------------------------------------
-// r_cond_firstboot_or_deeprfs
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_LOGICAL_OR r_cond_firstboot_or_deeprfs
- {
- lhs = r_cond_ps_deep_rfs;
- rhs = r_cond_ps_firstboot;
- }
-
-// ---------------------------------------------------------------------------
-// r_cond_firstboot_or_deeprfs_or_normalrfs
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_LOGICAL_OR r_cond_firstboot_or_deeprfs_or_normalrfs
- {
- lhs = r_cond_ps_normal_rfs;
- rhs = r_cond_firstboot_or_deeprfs;
- }
-
-// ---------------------------------------------------------------------------
-// r_cond_ps_normal_rfs
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_normal_rfs
- {
- category = 0x101F8766; // KPSUidStartup
- key = 0x00000045; // KPSStartupReason
- value = ENormalRFSReset;
- }
-
-// ---------------------------------------------------------------------------
-// r_cond_ps_deep_rfs
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_PUB_SUB_VALUE r_cond_ps_deep_rfs
- {
- category = 0x101F8766; // KPSUidStartup
- key = 0x00000045; // KPSStartupReason
- value = EDeepRFSReset;
- }
-
-// ---------------------------------------------------------------------------
-// r_cond_protwlan_and_firstboot_or_deeprfs_or_normalrfs
-// ( protocol WLAN ) AND ( first boot OR deep RFS OR normal RFS )
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_LOGICAL_AND r_cond_protwlan_and_firstboot_or_deeprfs_or_normalrfs
- {
- lhs = r_cond_feat_protocolwlan;
- rhs = r_cond_firstboot_or_deeprfs_or_normalrfs;
- }
-
-
-// ---------------------------------------------------------------------------
// r_dlldata_activitymonitor_timeout
// ---------------------------------------------------------------------------
//
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalswpcmdlists.rss Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,431 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Command lists for the noncritical phase SWP:
+* - non-critical phase Started
+*
+*/
+
+#include <ssm/conditionresourcetypes.rh>
+#include <ssm/ssmcmd.rh>
+
+#include "ssmswp.hrh"
+#include "ssmdlldatadefs.rh"
+
+// Identify command list type
+UID2 KUidSsmCommandListResourceFile
+
+// ---------------------------------------------------------------------------
+// r_entry_point
+// This must be the first resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
+ {
+ command_list_mapping = r_map;
+ }
+
+// ---------------------------------------------------------------------------
+// r_map
+// Mapping of command list ids to resource ids.
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_MAPPING r_map
+ {
+ mappings =
+ {
+ SSM_COMMANDLISTID_TO_RESOURCEID
+ {
+ command_list_id = ESsmNonCriticalPhaseStarted;
+ resource_id = r_noncriticalphase_commands;
+ }
+ };
+ }
+
+// ===========================================================================
+// Command lists in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_started_commands
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST r_noncriticalphase_commands
+ {
+ commands =
+ {
+ // prio 0xFFF1
+ r_cmd_publishswp,
+ // prio 0x7EF7
+ r_cmd_activitymonitor1,
+ // prio 0x7EF6
+ r_cmd_videocenter,
+ // prio 0x7EF5
+ r_cmd_activitymonitor2,
+ // prio 0x7EF4
+ r_cmd_iaupdatebg,
+ // prio 0x7EF2
+ r_cmd_activitymonitor3,
+ // prio 0x7EEE
+ r_cmd_autosync,
+ // prio 0x7EED
+ r_cmd_activitymonitor4,
+ // prio 0x7EEC
+ r_cmd_mylocationsengine,
+ //prio 0x7EEA
+ r_cmd_activitymonitor5,
+ //prio 0x7EE9
+ r_cmd_conversationserver, //SBSA-7YZGCQ
+ //prio 0x7EE8
+ r_cmd_activitymonitor6,
+ //prio 0x7EE7
+ r_cmd_msgnotifier //SBSA-82ZBMC
+#ifdef FF_ATT_ADDRESS_BK
+ //prio 0x7EE6
+ ,r_cmd_activitymonitor7,
+ //prio 0x7EE5
+ r_cmd_aab
+#endif
+#ifdef FF_SEARCH_SW
+ //prio 0x7EE4
+ ,r_cmd_activitymonitor8,
+ //prio 0x7EE3
+ r_cmd_searchsw //SLAR-832C9T
+#endif //FF_SEARCH_SW
+#ifdef FF_EMAIL_FRAMEWORK
+ //prio 0x7EE2
+ ,r_cmd_activitymonitor9,
+ //prio 0x7EE1
+ r_cmd_nmailagent //MBEN-83CFQE
+#endif //FF_EMAIL_FRAMEWORK
+ };
+ }
+
+// ===========================================================================
+// Command items in alphabetical order
+// ===========================================================================
+//
+
+// -----------------------------------------------------------------------------
+// r_cmd_aab
+// -----------------------------------------------------------------------------
+//
+#ifdef FF_ATT_ADDRESS_BK
+RESOURCE SSM_START_APP_INFO r_cmd_aab
+ {
+ priority = 0x7EE5;
+ name = "z:\\sys\\bin\\AABPhonebookapp.exe";
+ retries = 2;
+ background = 1; // To background
+ monitor_info = r_mon_3_restarts_ignore;
+ }
+#endif
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor1
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor1
+ {
+ priority = 0x7EF7;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor2
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor2
+ {
+ priority = 0x7EF5;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor3
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor3
+ {
+ priority = 0x7EF2;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor4
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor4
+ {
+ priority = 0x7EED;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor5
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor5
+ {
+ priority = 0x7EEA;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor6
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor6
+ {
+ priority = 0x7EE8;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor7
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_ATT_ADDRESS_BK
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor7
+ {
+ priority = 0x7EE6;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+#endif
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor8
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_SEARCH_SW
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor8
+ {
+ priority = 0x7EE4;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+#endif //FF_SEARCH_SW
+
+// ---------------------------------------------------------------------------
+// r_cmd_activitymonitor9
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_EMAIL_FRAMEWORK
+RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_activitymonitor9
+ {
+ priority = 0x7EE2;
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmWaitForSignal;
+ dllname = "ssmactivitycmd.dll";
+ ordinal = 1; // SsmActivityCmdNewL
+ retries = 2;
+ dll_data = r_dlldata_activitymonitor_timeout;
+ }
+#endif //FF_EMAIL_FRAMEWORK
+
+
+// ---------------------------------------------------------------------------
+// r_cmd_autosync
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_autosync
+ {
+ priority = 0x7EEE;
+ execution_behaviour = ESsmFireAndForget;
+ retries = 3;
+ name = "cctautosync.exe";
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_conversationserver
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_conversationserver
+ {
+ priority = 0x7EE9;
+ name = "csserver.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ }
+
+
+// ---------------------------------------------------------------------------
+// r_cmd_msgnotifier
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_APP_INFO r_cmd_msgnotifier
+ {
+ priority = 0x7EE7;
+ name = "msgnotifier.exe";
+ execution_behaviour = ESsmFireAndForget;
+ retries = 3;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_mylocationsengine
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mylocationsengine
+ {
+ priority = 0x7EEC;
+ name = "z:\\sys\\bin\\mylocationsengine.exe";
+ execution_behaviour = ESsmFireAndForget;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_publishswp
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_PUBLISH_SYSTEM_WIDE_PROPERTY r_cmd_publishswp
+ {
+ priority = 0xFFF1;
+ severity = ECmdCriticalSeverity;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_nmailagent
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_EMAIL_FRAMEWORK
+RESOURCE SSM_START_PROCESS_INFO r_cmd_nmailagent
+ {
+ priority = 0x7EE1;
+ name = "z:\\sys\\bin\\nmailagent.exe";
+ execution_behaviour = ESsmFireAndForget;
+ conditional_information = r_cond_feat_emailfw;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_emailfw
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_emailfw
+ {
+ feature_id = KFeatureIdFfEmailFramework;
+ }
+#endif //FF_EMAIL_FRAMEWORK
+
+// ---------------------------------------------------------------------------
+// r_cmd_iaupdatebg
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_iaupdatebg
+ {
+ priority = 0x7EF4;
+ name = "iaupdatebg.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ conditional_information = r_cond_feat_iadv2;
+ }
+
+//---------------------------------------------------------------------------
+// r_cmd_searchsw
+// ---------------------------------------------------------------------------
+//
+#ifdef FF_SEARCH_SW
+RESOURCE SSM_START_PROCESS_INFO r_cmd_searchsw
+ {
+ priority = 0x7EE3;
+ name = "z:\\sys\\bin\\cpixwatchdog.exe";
+ execution_behaviour = ESsmFireAndForget;
+ conditional_information = r_cond_feat_searchsw;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_searchsw
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_searchsw
+ {
+ feature_id = KFeatureIdFfSearchSw;
+ }
+#endif //FF_SEARCH_SW
+
+// ---------------------------------------------------------------------------
+// r_cmd_videocenter
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_videocenter
+ {
+ priority = 0x7EF6;
+ name = "cseschedulerserver.exe";
+ execution_behaviour = ESsmWaitForSignal;
+ timeout = 10000;
+ }
+
+// ===========================================================================
+// DLL data items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_dlldata_activitymonitor_timeout
+// ---------------------------------------------------------------------------
+//
+RESOURCE CMD_PARAM_TIMEOUT r_dlldata_activitymonitor_timeout
+ {
+ timeout = 2;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_iadv2
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_iadv2
+ {
+ feature_id = KFeatureIdFfIaupdatePhase2;
+ }
+
+// monitoring.rss contains resource definitions, so it may not be included
+// before entry point.
+#include "monitoring.rss"
--- a/sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/securitycheckcmdlist.rss Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -69,19 +69,16 @@
r_cmd_publishstate, // prio 0xFFF1
r_cmd_psstate, // prio 0xFFF0
// prio 0xFFE7
- r_cmd_menu,
- r_cmd_idle,
- // prio 0xFFE6
+ r_cmd_hbthemeserver,
+ // prio 0xFFE6
r_cmd_multiwaitforever1,
// prio 0xFFE3
r_cmd_startup,
r_cmd_phone,
- r_cmd_nitz,
- // prio 0xFFE2
+ r_cmd_clockserver,
r_cmd_multiwaitforever2,
// prio 0xFFDF
- r_cmd_touchscreen,
- r_cmd_touchplg,
+ r_cmd_idle,
// prio 0xFFDE
r_cmd_multiwaitforever3,
// prio 0xFFD8
@@ -97,7 +94,17 @@
// Command items in alphabetical order
// ===========================================================================
//
-
+// -----------------------------------------------------------------------------
+// r_cmd_clockserver
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_clockserver
+ {
+ priority = 0xFFE3;
+ name = "clockserver.exe";
+ execution_behaviour = ESsmDeferredWaitForSignal;
+ }
+
// ---------------------------------------------------------------------------
// r_cmd_createswp_simstatus
// ---------------------------------------------------------------------------
@@ -109,32 +116,32 @@
key = 0x00000031; // KPSSimStatus
filename = "ssm.swp.policy.simstatus.dll";
}
-
+
+// ---------------------------------------------------------------------------
+// r_cmd_hbthemeserver
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_hbthemeserver
+ {
+ priority = 0xFFE7;
+ name = "z:\\sys\\bin\\hbthemeserver.exe";
+ execution_behaviour = ESsmDeferredWaitForSignal;
+ monitor_info = r_mon_100_restarts_reset;
+ }
+
// ---------------------------------------------------------------------------
// r_cmd_idle
// ---------------------------------------------------------------------------
//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_idle
+RESOURCE SSM_START_APP_INFO r_cmd_idle
{
- priority = 0xFFE7;
- name = "z:\\sys\\bin\\ailaunch.exe";
+ priority = 0xFFDF;
+ name = "z:\\sys\\bin\\hsapplication.exe";
execution_behaviour = ESsmDeferredWaitForSignal;
monitor_info = r_mon_max_restarts_ignore;
}
// ---------------------------------------------------------------------------
-// r_cmd_menu
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_APP_INFO r_cmd_menu
- {
- priority = 0xFFE7;
- name = "z:\\sys\\bin\\matrixmenu.exe";
- execution_behaviour = ESsmDeferredWaitForSignal;
- background = 1; // To background
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_multiwaitforever1
// ---------------------------------------------------------------------------
//
@@ -162,18 +169,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_nitz
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_nitz
- {
- priority = 0xFFE3;
- name = "z:\\sys\\bin\\clockserver.exe";
- execution_behaviour = ESsmFireAndForget; // -- does not call Rendezvous() --
- monitor_info = r_mon_3_restarts_ignore;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_phone
// ---------------------------------------------------------------------------
//
@@ -181,8 +176,7 @@
{
priority = 0xFFE3;
name = "z:\\sys\\bin\\phoneui.exe";
- execution_behaviour = ESsmDeferredWaitForSignal;
- severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmFireAndForget;
retries = 2;
background = 1; // To background
monitor_info = r_mon_reset;
@@ -265,32 +259,6 @@
retries = 2;
}
-// ---------------------------------------------------------------------------
-// r_cmd_touchplg
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_touchplg
- {
- priority = 0xFFDF;
- severity = ECmdCriticalSeverity;
- dllname = "tsccustcmds.dll";
- ordinal = 1;
- retries = 2;
- execution_behaviour = ESsmDeferredWaitForSignal;
- conditional_information = r_cond_firstboot_and_tscinstartup;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_touchscreen
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_touchscreen
- {
- priority = 0xFFDF;
- name = "z:\\sys\\bin\\touchscreencalib.exe";
- execution_behaviour = ESsmDeferredWaitForSignal;
- conditional_information = r_cond_firstboot_and_tscinstartup;
- }
// ===========================================================================
// DLL data items in alphabetical order
--- a/sysstatemgmt/ssmcmdlists/data/shutdowncmdlists.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/shutdowncmdlists.rss Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -214,6 +214,7 @@
{
priority = 0xFFF1;
severity = ECmdCriticalSeverity;
+ direction = 1; // ETraverseChildrenFirst, Transition children first for graceful shutdown.
retries = 2;
}
--- a/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist.rss Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,7 +12,7 @@
* Contributors:
*
* Description:
-* Command list for the UI-Services startup state (UI shell version).
+* Command list for the UI-Services startup state (UI shell version) for minimal startup.
*
*/
@@ -78,25 +78,19 @@
// prio 0xFFC7
r_cmd_initclkeys,
r_cmd_initramdrive,
- // prio 0xFFA7
- r_cmd_splash,
- // prio 0xFF97
- r_cmd_tzsrv,
- r_cmd_cntsrv,
- r_cmd_randsrv,
- r_cmd_mediator,
- r_cmd_hwrmsrv,
- r_cmd_rtc,
- // prio 0xFF96 - tzsrv, randsrv, cntsrv, mediator, hwrmsrv
+ r_cmd_rtc, // prio 0xFF97
+ // prio 0xFF96 - rtc (tzsrv, mediator & hwrmsrv have been moved to extended startuplist but uses the same multiplewait command )
r_cmd_multiwaitforever1,
// prio 0xFF87
- r_cmd_dbrecovery,
r_cmd_accsrv,
r_cmd_selectlanguage, // Select UI language to use
- // prio 0xFF86 - dbrecovery, accsrv, seleclanguage
+ // prio 0xFF86 - accsrv, seleclanguage (dbrecovery has been moved to extended startup list but uses the same multiplewait command))
r_cmd_multiwaitforever2,
// prio 0xFF85
r_cmd_loadlocalesup, // Observes changes in locale data
+ r_cmd_loadcollation, // Observes changes in Collation setting
+ r_cmd_loadregion, // Observes changes in Region setting
+ r_cmd_loaduilanguage, // Observes changes in UI Language setting
// prio 0xFF79
r_cmd_aknstart, // UI Framework
// prio 0xFF77
@@ -148,57 +142,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_cntsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_cntsrv
- {
- priority = 0xFF97;
- name = "Z:\\sys\\bin\\cntsrv.exe";
- args = "-nontransient";
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmDeferredWaitForSignal;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_dbrecovery
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_dbrecovery
- {
- priority = 0xFF87;
- name = "z:\\sys\\bin\\dbrecovery.exe";
- execution_behaviour = ESsmDeferredWaitForSignal;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_hwrmsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_hwrmsrv
- {
- priority = 0xFF97;
- name = "Z:\\sys\\bin\\hwrmserver.exe";
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmDeferredWaitForSignal;
- retries = 2;
- }
-
-// ---------------------------------------------------------------------------
-// r_cmd_mediator
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_mediator
- {
- priority = 0xFF97;
- name = "Z:\\sys\\bin\\mediatorserver.exe";
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmDeferredWaitForSignal;
- monitor_info = r_mon_3_restarts_reset;
- conditional_information = r_cond_feat_mediator;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_initclkeys
// ---------------------------------------------------------------------------
//
@@ -240,6 +183,39 @@
}
// ---------------------------------------------------------------------------
+// r_cmd_loadcollation
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_SSM_UTILITY_PLUGIN r_cmd_loadcollation
+ {
+ priority = 0xFF85;
+ filename = "ssmlocaleobserversup.dll";
+ ordinal = 2;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_loadregion
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_SSM_UTILITY_PLUGIN r_cmd_loadregion
+ {
+ priority = 0xFF85;
+ filename = "ssmlocaleobserversup.dll";
+ ordinal = 3;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_loaduilanguage
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_SSM_UTILITY_PLUGIN r_cmd_loaduilanguage
+ {
+ priority = 0xFF85;
+ filename = "ssmlocaleobserversup.dll";
+ ordinal = 4;
+ }
+
+// ---------------------------------------------------------------------------
// r_cmd_loadpowersup
// ---------------------------------------------------------------------------
//
@@ -294,19 +270,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_randsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_randsrv
- {
- priority = 0xFF97;
- name = "Z:\\sys\\bin\\randsvr.exe";
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmWaitForSignal;
- retries = 2;
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_rfsdeep
// ---------------------------------------------------------------------------
//
@@ -401,16 +364,6 @@
}
// ---------------------------------------------------------------------------
-// r_cmd_splash
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_splash
- {
- priority = 0xFFA7;
- name = "Z:\\sys\\bin\\splashscreen.exe";
- }
-
-// ---------------------------------------------------------------------------
// r_cmd_startupmode
// ---------------------------------------------------------------------------
//
@@ -424,18 +377,6 @@
retries = 2;
}
-// ---------------------------------------------------------------------------
-// r_cmd_tzsrv
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_START_PROCESS_INFO r_cmd_tzsrv
- {
- priority = 0xFF97;
- name = "Z:\\sys\\bin\\tzserver.exe";
- severity = ECmdCriticalSeverity;
- execution_behaviour = ESsmDeferredWaitForSignal;
- }
-
// ===========================================================================
// DLL data items in alphabetical order
// ===========================================================================
@@ -489,14 +430,6 @@
value = 102; // ENormalRFSReset
}
-// ---------------------------------------------------------------------------
-// r_cond_feat_mediator
-// ---------------------------------------------------------------------------
-//
-RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_mediator
- {
- feature_id = KFeatureIdMediator;
- }
// monitoring.rss contains resource definitions, so it may not be included
// before entry point.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmcmdlists/data/uiservicescmdlist_ext.rss Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Command list for the UI-Services startup state (UI shell version) for extended startup.
+*
+*/
+
+#include <ssm/conditionresourcetypes.rh>
+#include <ssm/ssmcmd.rh>
+
+#include "ssmsubstateext.hrh"
+#include "ssmdlldatadefs.rh"
+
+// Identify command list type
+UID2 KUidSsmCommandListResourceFile
+
+// ---------------------------------------------------------------------------
+// r_entry_point
+// This must be the first resource
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
+ {
+ command_list_mapping = r_map;
+ }
+
+// ---------------------------------------------------------------------------
+// r_map
+// Mapping of command list ids to resource ids.
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST_MAPPING r_map
+ {
+ mappings =
+ {
+ SSM_COMMANDLISTID_TO_RESOURCEID
+ {
+ command_list_id = ESsmStateStartingUiServices;
+ resource_id = r_cmds;
+ }
+ };
+ }
+
+// ===========================================================================
+// Command lists in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmds
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_COMMAND_LIST r_cmds
+ {
+ commands =
+ {
+ //prio 0xFFA7
+ r_cmd_splash,
+ // prio 0xFF99
+ r_cmd_tzsrv,
+ r_cmd_mediator,
+ r_cmd_hwrmsrv,
+ // prio 0xFF89
+ r_cmd_dbrecovery
+ };
+ }
+
+// ===========================================================================
+// Command items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cmd_dbrecovery
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_dbrecovery
+ {
+ priority = 0xFF89;
+ name = "z:\\sys\\bin\\dbrecovery.exe";
+ execution_behaviour = ESsmDeferredWaitForSignal;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_hwrmsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_hwrmsrv
+ {
+ priority = 0xFF99;
+ name = "Z:\\sys\\bin\\hwrmserver.exe";
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmDeferredWaitForSignal;
+ retries = 2;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_mediator
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_mediator
+ {
+ priority = 0xFF99;
+ name = "Z:\\sys\\bin\\mediatorserver.exe";
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmDeferredWaitForSignal;
+ monitor_info = r_mon_3_restarts_reset;
+ conditional_information = r_cond_feat_mediator;
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_splash
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_splash
+ {
+ priority = 0xFFA7;
+ name = "Z:\\sys\\bin\\splashscreen.exe";
+ }
+
+// ---------------------------------------------------------------------------
+// r_cmd_tzsrv
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_START_PROCESS_INFO r_cmd_tzsrv
+ {
+ priority = 0xFF99;
+ name = "Z:\\sys\\bin\\tzserver.exe";
+ severity = ECmdCriticalSeverity;
+ execution_behaviour = ESsmDeferredWaitForSignal;
+ }
+
+// ===========================================================================
+// DLL data items in alphabetical order
+// ===========================================================================
+//
+
+// ---------------------------------------------------------------------------
+// r_cond_feat_mediator
+// ---------------------------------------------------------------------------
+//
+RESOURCE SSM_CND_FEATURE_VALUE r_cond_feat_mediator
+ {
+ feature_id = KFeatureIdMediator;
+ }
+// monitoring.rss contains resource definitions, so it may not be included
+// before entry point.
+#include "monitoring.rss"
--- a/sysstatemgmt/ssmcmdlists/data/usbwatcher_hw.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/data/usbwatcher_hw.rss Thu Jun 24 11:22:10 2010 +0100
@@ -74,7 +74,7 @@
{
#ifdef RD_USB_CHARGING
r_cmd_usbwatcher
-#endif RD_USB_CHARGING
+#endif //RD_USB_CHARGING
};
}
--- a/sysstatemgmt/ssmcmdlists/group/ssmcmdlists.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/group/ssmcmdlists.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -29,7 +29,7 @@
TARGETPATH /private/2000d75b/startup/0 // Private directory of sysstatemgr.exe
END
-START RESOURCE uiservicescmdlist.rss // Starting UI-Services startup state
+START RESOURCE uiservicescmdlist.rss // Starting UI-Services startup state for minimal bootup
TARGETPATH /private/2000d75b/startup/0 // Private directory of sysstatemgr.exe
END
@@ -49,7 +49,7 @@
TARGETPATH /private/2000d75b/startup/0 // Private directory of sysstatemgr.exe
END
-START RESOURCE noncriticalcmdlist.rss // Non-critical startup state
+START RESOURCE noncriticalcmdlist.rss // Non-critical startup state for minimal bootup
TARGETPATH /private/2000d75b/startup/0 // Private directory of sysstatemgr.exe
END
@@ -57,6 +57,14 @@
TARGETPATH /private/2000d75b/startup/0 // Private directory of sysstatemgr.exe
END
+START RESOURCE noncriticalcmdlist_ext.rss // Non-critical startup state for extended bootup
+TARGETPATH /private/2000d75b/startup/0_ext // Private directory of sysstatemgr.exe
+END
+
+START RESOURCE uiservicescmdlist_ext.rss // Starting UI-Services startup state for extended bootup
+TARGETPATH /private/2000d75b/startup/0_ext // Private directory of sysstatemgr.exe
+END
+
// Command lists specific to HW
START RESOURCE wserv_hw.rss // Window server command list (HW version)
@@ -99,6 +107,10 @@
TARGETPATH /private/2000d75b/swpui // Private directory of sysstatemgr.exe
END
+START RESOURCE noncriticalswpcmdlists.rss // noncritical phase SWP
+TARGETPATH /private/2000d75b/swpnoncritical // Private directory of sysstatemgr.exe
+END
+
USERINCLUDE ../inc
USERINCLUDE ../../inc
--- a/sysstatemgmt/ssmcmdlists/rom/ssmcmdlists.iby Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcmdlists/rom/ssmcmdlists.iby Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -27,6 +27,8 @@
data=DATAZ_\private\2000D75B\startup\0\securitycheckcmdlist.rsc \private\2000D75B\startup\0\securitycheckcmdlist.rsc
data=DATAZ_\private\2000D75B\startup\0\noncriticalcmdlist.rsc \private\2000D75B\startup\0\noncriticalcmdlist.rsc
data=DATAZ_\private\2000D75B\startup\0\emergencycallsonlycmdlist.rsc \private\2000D75B\startup\0\emergencycallsonlycmdlist.rsc
+data=DATAZ_\private\2000D75B\startup\0_ext\uiservicescmdlist_ext.rsc \private\2000D75B\startup\0\uiservicescmdlist_ext.rsc
+data=DATAZ_\private\2000D75B\startup\0_ext\noncriticalcmdlist_ext.rsc \private\2000D75B\startup\0\noncriticalcmdlist_ext.rsc
data=DATAZ_\private\2000D75B\hw\wserv_hw.rsc \private\2000D75B\startup\0\wserv.rsc
data=DATAZ_\private\2000D75B\hw\noncriticalcmdlist_hw.rsc \private\2000D75B\startup\0\noncriticalcmdlist_hw.rsc
data=DATAZ_\private\2000D75B\hw\usbwatcher_hw.rsc \private\2000D75B\startup\0\usbwatcher.rsc
@@ -34,5 +36,6 @@
data=DATAZ_\private\2000D75B\shutdown\shutdowncmdlists.rsc \private\2000D75B\shutdown\shutdowncmdlists.rsc
data=DATAZ_\private\2000D75B\rfstatusswpcmdlist\rfswpcmdlists.rsc \private\2000D75B\rfstatusswpcmdlist\rfswpcmdlists.rsc
data=DATAZ_\private\2000D75B\swpui\uiswpcmdlists.rsc \private\2000D75B\swpui\uiswpcmdlists.rsc
+data=DATAZ_\private\2000D75B\swpnoncritical\noncriticalswpcmdlists.rsc \private\2000D75B\swpnoncritical\noncriticalswpcmdlists.rsc
#endif // SSMCMDLISTS_IBY
--- a/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -20,6 +20,7 @@
#include "ssmmapperutility.h"
#include "ssmmapperutilityinternalpskeys.h"
#include "ssmcustcmdsprivatepskeys.h"
+#include "ssmlocalepskeys.h"
#include "trace.h"
#include <ssm/startupdomainpskeys.h>
@@ -273,6 +274,39 @@
KReadDeviceDataPolicy,
KWriteDeviceDataPolicy );
SetL( KPSStarterUid, KRTCPropertyKey, 0 );
+
+ //Used for observing the Collation code change in CSsmCollationObserver
+ INFO( "KPSStarterUid::KSSMCollationPSKey" );
+ DefineL( KPSStarterUid,
+ KSSMCollationPSKey,
+ KReadDeviceDataPolicy,
+ KWriteDeviceDataPolicy );
+ SetL( KPSStarterUid, KSSMCollationPSKey, 0 );
+
+ //Used for observing the Region code change in CSsmRegionObserver
+ INFO( "KPSStarterUid::KSSMRegionPSKey" );
+ DefineL( KPSStarterUid,
+ KSSMRegionPSKey,
+ KReadDeviceDataPolicy,
+ KWriteDeviceDataPolicy );
+ SetL( KPSStarterUid, KSSMRegionPSKey, 0 );
+
+
+ INFO( "KPSStarterUid::KSSMUiLanguagePSKey " );
+ DefineL( KPSStarterUid,
+ KSSMUILanguagePSKey ,
+ KReadDeviceDataPolicy,
+ KWriteDeviceDataPolicy );
+ SetL( KPSStarterUid, KSSMUILanguagePSKey , 0 );
+
+ INFO( "KPSUidStartup::KIgnoreSecurityEvent" );
+ DefineL( KPSUidStartup,
+ KIgnoreSecurityEvent,
+ KReadDeviceDataPolicy,
+ KWriteDeviceDataPolicy );
+ SetL( KPSUidStartup,
+ KIgnoreSecurityEvent,
+ EPSIgnoreSecurityEventUninitialized );
// Store FirstBoot Value from cenrep
TInt csVal( 0 );
--- a/sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmmapperutility/inc/ssmmapperutility.h Thu Jun 24 11:22:10 2010 +0100
@@ -105,7 +105,7 @@
* @aMessage Client message
* @return ETrue if capabilities ok, otherwise EFalse
*/
- virtual TBool CheckCaps( const RMessagePtr2& aMessage );
+ IMPORT_C virtual TBool CheckCaps( const RMessagePtr2& aMessage );
/**
* First phase constructor. Exported for
--- a/sysstatemgmt/ssmpolicyplugins/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmpolicyplugins/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -37,3 +37,5 @@
#include "../ssmfailpolicy/group/bld.inf"
#include "../ssmshutdownpolicy/group/bld.inf"
#include "../ssmuiswppolicy/group/bld.inf"
+#include "../ssmnoncriticalswppolicy/group/bld.inf"
+
--- a/sysstatemgmt/ssmpolicyplugins/inc/ssmswp.hrh Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmpolicyplugins/inc/ssmswp.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -32,6 +32,19 @@
};
/**
+* Startup NonCritical phase SWP.
+*
+* These identifiers are also used as command list ids to find the correct
+* command list among all command lists in the system.
+*/
+#define SWP_UID_SSM_NONCRITICAL_PHASE 0x2002EA5B
+
+enum TSwpStartupNonCriticalPhase
+ {
+ ESsmNonCriticalPhaseStarted = 0xb1
+ };
+
+/**
* System-wide property for RF status.
*
* These identifiers are also used as command list ids to find the correct
--- a/sysstatemgmt/ssmpolicyplugins/rom/ssmpolicyplugins.iby Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmpolicyplugins/rom/ssmpolicyplugins.iby Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -26,5 +26,6 @@
file=ABI_DIR\BUILD_DIR\ssm.state.policy.0002.dll SHARED_LIB_DIR\ssm.state.policy.0002.dll
file=ABI_DIR\BUILD_DIR\ssm.state.policy.0003.dll SHARED_LIB_DIR\ssm.state.policy.0003.dll
file=ABI_DIR\BUILD_DIR\ssmuiswppolicy.dll SHARED_LIB_DIR\ssmuiswppolicy.dll
+file=ABI_DIR\BUILD_DIR\ssmnoncriticalswppolicy.dll SHARED_LIB_DIR\ssmnoncriticalswppolicy.dll
#endif // SSMPOLICYPLUGINS_IBY
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmpolicyplugins/ssmnoncriticalswppolicy/bwins/ssmnoncriticalswppolicyu.def Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+ ?NewL@CSsmNonCriticalSwpPolicy@@SAPAVMSsmSwpPolicy@@XZ @ 1 NONAME ; class MSsmSwpPolicy * CSsmNonCriticalSwpPolicy::NewL(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmpolicyplugins/ssmnoncriticalswppolicy/eabi/ssmnoncriticalswppolicyu.def Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,3 @@
+EXPORTS
+ _ZN24CSsmNonCriticalSwpPolicy4NewLEv @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmpolicyplugins/ssmnoncriticalswppolicy/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Build information file for the ssmnoncriticalswppolicy project.
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+ssmnoncriticalswppolicy.mmp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmpolicyplugins/ssmnoncriticalswppolicy/group/ssmnoncriticalswppolicy.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Project definition file for the ssmnoncriticalswppolicy project.
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET ssmnoncriticalswppolicy.dll
+TARGETTYPE dll
+UID 0x2000D765 0x2002EA59
+
+CAPABILITY PowerMgmt ReadDeviceData WriteDeviceData ProtServ DiskAdmin SwEvent
+VENDORID VID_DEFAULT
+
+SOURCEPATH ../src
+SOURCE ssmnoncriticalswppolicy.cpp
+
+USERINCLUDE ../inc
+USERINCLUDE ../../inc
+USERINCLUDE ../../ssmpolicybase/inc
+USERINCLUDE ../../ssmswppolicybase/inc
+USERINCLUDE ../../../inc
+
+OS_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY ssmcmd.lib
+LIBRARY ssmcmn.lib
+LIBRARY ssmpolicybase.lib
+LIBRARY ssmswppolicybase.lib
+
+// >>> uncomment to enable function-level tracing
+// MACRO __SSM_FUNC_TRACE__
+// <<< uncomment to enable function-level tracing
+
+// >>> uncomment to direct trace output to file
+// MACRO __SSM_TRACE_INTO_FILE__
+// LIBRARY flogger.lib
+// <<< uncomment to direct trace output to file
+
+SMPSAFE
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmpolicyplugins/ssmnoncriticalswppolicy/inc/ssmnoncriticalswppolicy.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Declaration of CSsmNonCriticalSwpPolicy class.
+*
+*/
+
+#ifndef SSMNONCRITICALSWPPOLICY_H
+#define SSMNONCRITICALSWPPOLICY_H
+
+#include "ssmswppolicybase.h"
+
+/**
+ * Policy plugin for noncritical phase SWP.
+ */
+NONSHARABLE_CLASS( CSsmNonCriticalSwpPolicy ) : public CSsmSwpPolicyBase
+ {
+
+public:
+
+ /**
+ * Constructs a CSsmNonCriticalSwpPolicy object.
+ *
+ * @return The new object
+ */
+ IMPORT_C static MSsmSwpPolicy* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CSsmNonCriticalSwpPolicy();
+
+private: // From CSsmPolicyBase
+
+ void GetCommandListPathL( TDes& aCmdListPath );
+
+private: // From MSsmSwpPolicy
+
+ /**
+ * @see MSsmSwpPolicy.
+ */
+ TResponse TransitionAllowed(
+ const TSsmSwp& aSwp,
+ const RMessagePtr2& aMessage );
+
+private:
+
+ /**
+ * First phase constructor.
+ */
+ CSsmNonCriticalSwpPolicy();
+
+ };
+
+#endif // SSMNONCRITICALSWPPOLICY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmpolicyplugins/ssmnoncriticalswppolicy/src/ssmnoncriticalswppolicy.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CSsmNonCriticalSwpPolicy class.
+*
+*/
+
+#include <ssm/ssmswp.h>
+#include <ssm/ssmstate.h>
+
+#include "ssmnoncriticalswppolicy.h"
+#include "ssmswp.hrh"
+#include "ssmmapperutility.h"
+#include "trace.h"
+#include "ssmsubstateext.hrh"
+
+/**
+* SWP noncritical phase policy resource file path format : "\private\<SID of SSM>\swpnoncritical\"
+*/
+_LIT( KCommandListPath, "Z:\\private\\2000D75B\\swpnoncritical\\" );
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CSsmNonCriticalSwpPolicy::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmSwpPolicy* CSsmNonCriticalSwpPolicy::NewL()
+ {
+ FUNC_LOG;
+
+ CSsmNonCriticalSwpPolicy* self = new( ELeave ) CSsmNonCriticalSwpPolicy;
+ CleanupStack::PushL( self );
+ self->BaseConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// ---------------------------------------------------------------------------
+// CSsmNonCriticalSwpPolicy::~CSsmNonCriticalSwpPolicy
+// ---------------------------------------------------------------------------
+//
+CSsmNonCriticalSwpPolicy::~CSsmNonCriticalSwpPolicy()
+ {
+ FUNC_LOG;
+ }
+
+
+// ---------------------------------------------------------------------------
+// CSsmNonCriticalSwpPolicy::GetCommandListPathL
+// ---------------------------------------------------------------------------
+//
+void CSsmNonCriticalSwpPolicy::GetCommandListPathL( TDes& aCmdListPath )
+ {
+ FUNC_LOG;
+
+ aCmdListPath = KCommandListPath;
+ iUtil->GetCommandListPath( aCmdListPath );
+ }
+
+
+// ---------------------------------------------------------------------------
+// CSsmNonCriticalSwpPolicy::TransitionAllowed
+// ---------------------------------------------------------------------------
+//
+MSsmSwpPolicy::TResponse CSsmNonCriticalSwpPolicy::TransitionAllowed(
+ const TSsmSwp& aSwp,
+ const RMessagePtr2& aMessage )
+ {
+ FUNC_LOG;
+ INFO_2( "Requested SWP transition: 0x%08x::0x%08x", aSwp.Key(), aSwp.Value() );
+
+ TResponse response = ENotAllowed;
+ if ( iUtil->CheckCaps( aMessage ) )
+ {
+ TSsmState currentState;
+ const TInt errorCode = GetCurrentState(currentState);
+ ERROR( errorCode, "Failed to get current state" );
+
+ // this SwP transition would be allowed only once per boot(during the system startup).
+ if ((KErrNone == errorCode) && (ESsmStartup == currentState.MainState()) && (aSwp.Value() == ESsmNonCriticalPhaseStarted))
+ {
+ response = EAllowed;
+ }
+ else
+ {
+ INFO( "Requested SWP transition not allowed" );
+ }
+ }
+ else
+ {
+ INFO( "Capability Check Failed" );
+ }
+
+ return response;
+ }
+
+
+// ---------------------------------------------------------------------------
+// CSsmNonCriticalSwpPolicy::CSsmNonCriticalSwpPolicy
+// ---------------------------------------------------------------------------
+//
+CSsmNonCriticalSwpPolicy::CSsmNonCriticalSwpPolicy()
+ {
+ FUNC_LOG;
+ }
--- a/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/group/ssmshutdownpolicy.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/group/ssmshutdownpolicy.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -45,6 +45,7 @@
LIBRARY ssmpolicybase.lib
LIBRARY ssmstatepolicybase.lib
LIBRARY ssmmapperutility.lib
+LIBRARY ssmuiproviderdll.lib
// >>> uncomment to enable function-level tracing
// MACRO __SSM_FUNC_TRACE__
--- a/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmpolicyplugins/ssmshutdownpolicy/src/ssmshutdownpolicy.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -21,6 +21,7 @@
#include <ssm/ssmstatetransition.h>
#include <ssm/starterclient.h>
#include <ssm/starterdomaincrkeys.h>
+#include <ssm/ssmuiproviderdll.h>
#include "ssmsubstateext.hrh"
#include "ssmmapperutility.h"
@@ -215,6 +216,22 @@
CRepository::NewLC( iUtil->CrUid( KCRUidStartup ) );
TInt errorCode = repository->Set( KStartupReason, aReasonCode );
ERROR( errorCode, "Failed to set KStartupReason CenRep key" );
+
+ if( KErrDiskFull == errorCode )
+ {
+ //Need not to put on CleanupStack, it's not calling any leaving function and
+ //it's handled by reference count
+ CSsmUiSpecific* ssmUiSpecific = CSsmUiSpecific::InstanceL();
+ //Free complete reserve space
+ errorCode = ssmUiSpecific->FreeReservedPhoneMemorySpace( 0 );
+ if( KErrNone == errorCode )
+ {
+ errorCode = repository->Set( KStartupReason, aReasonCode );
+ ERROR( errorCode, "Failed to set KStartupReason CenRep key after freeing the memory" );
+ }
+ CSsmUiSpecific::Release();
+ }
+
CleanupStack::PopAndDestroy( repository );
User::LeaveIfError( errorCode );
}
--- a/sysstatemgmt/ssmpolicyplugins/ssmswppolicybase/src/ssmswppolicybase.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmpolicyplugins/ssmswppolicybase/src/ssmswppolicybase.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -22,6 +22,7 @@
#include <ssm/ssmswp.h>
#include <ssm/ssmsubstates.hrh>
#include <ssm/starterclient.h>
+#include <startupdomaindefs.h>
#include "ssmswppolicybase.h"
#include "trace.h"
@@ -135,27 +136,30 @@
}
else
{
- RSsmStateManager session;
- TInt errorCode = session.Connect();
- ERROR( errorCode, "Failed to connect to RSsmStateManager" );
- if ( errorCode == KErrNone )
- {
- if ( ResetLimitReached() ) // Updates the reset count
- {
- INFO( "SWP transition failed -> Fail" );
- errorCode = session.RequestStateTransition(
- TSsmStateTransition( ESsmFail, KSsmAnySubState, 0 ) );
- }
- else
- {
- INFO( "SWP transition failed -> Reset" );
- errorCode = session.RequestStateTransition(
- TSsmStateTransition( ESsmShutdown, KSsmAnySubState,
- RStarterSession::EUnknownReset ) );
- }
+ TSsmState currentState;
+ TInt errorCode = GetCurrentState(currentState);
- session.Close();
- }
+ if ( ((currentState.MainState() != ESsmShutdown) && (currentState.MainState() != ESsmFail)) || KErrNone != errorCode)
+ {
+ RSsmStateManager session;
+ errorCode = session.Connect();
+ ERROR( errorCode, "Failed to connect to RSsmStateManager" );
+ if ( KErrNone == errorCode )
+ {
+ if ( ResetLimitReached() ) // Updates the reset count
+ {
+ INFO_1( "SWP 0x%08x transition failed -> Fail", aSwp.Key() );
+ errorCode = session.RequestStateTransition( TSsmStateTransition( ESsmFail, KSsmAnySubState, 0 ) );
+ }
+ else
+ {
+ INFO_1( "SWP 0x%08x transition failed -> Reset", aSwp.Key() );
+ errorCode = session.RequestStateTransition(
+ TSsmStateTransition( ESsmShutdown, KSsmAnySubState, RStarterSession::EUnknownReset ) );
+ }
+ session.Close();
+ }
+ }
TRequestStatus* status = &aStatus;
User::RequestComplete( status, errorCode );
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/bwins/ssmlocaleobserversupu.def Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/bwins/ssmlocaleobserversupu.def Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,6 @@
EXPORTS
?NewL@CSsmLocaleObserverSup@@SAPAVMSsmUtility@@XZ @ 1 NONAME ; class MSsmUtility * CSsmLocaleObserverSup::NewL(void)
+ ?NewL@CSsmCollationObserver@@SAPAVMSsmUtility@@XZ @ 2 NONAME ; class MSsmUtility * CSsmCollationObserver::NewL(void)
+ ?NewL@CSsmRegionObserver@@SAPAVMSsmUtility@@XZ @ 3 NONAME ; class MSsmUtility * CSsmRegionObserver::NewL(void)
+ ?NewL@CSsmUiLanguageObserver@@SAPAVMSsmUtility@@XZ @ 4 NONAME ; class MSsmUtility * CSsmUiLanguageObserver::NewL(void)
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/eabi/ssmlocaleobserversupu.def Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/eabi/ssmlocaleobserversupu.def Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,6 @@
EXPORTS
_ZN21CSsmLocaleObserverSup4NewLEv @ 1 NONAME
+ _ZN18CSsmRegionObserver4NewLEv @ 2 NONAME
+ _ZN21CSsmCollationObserver4NewLEv @ 3 NONAME
+ _ZN22CSsmUiLanguageObserver4NewLEv @ 4 NONAME
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/group/ssmlocaleobserversup.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -28,6 +28,9 @@
SOURCEPATH ../src
SOURCE ssmlocaleobserversup.cpp
+SOURCE ssmcollationobserversup.cpp
+SOURCE ssmregionobserversup.cpp
+SOURCE ssmuilanguageobserversup.cpp
USERINCLUDE ../inc
USERINCLUDE ../../inc
@@ -41,6 +44,8 @@
LIBRARY euser.lib
LIBRARY ssmcmn.lib
LIBRARY ssmmapperutility.lib
+LIBRARY centralrepository.lib
+
// >>> uncomment to enable function-level tracing
// MACRO __SSM_FUNC_TRACE__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmcollationobserversup.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Declaration of CSsmCollationObserver class.
+*
+*/
+
+#ifndef __SSMCOLLATIONOBSERVER_H__
+#define __SSMCOLLATIONOBSERVER_H__
+
+#include <e32base.h>
+#include <ssm/ssmutility.h>
+#include <e32property.h>
+
+/**
+* SSM Utility plugin to observe the Collation code changes and load the new collation
+* when it is changed.
+*/
+NONSHARABLE_CLASS( CSsmCollationObserver ) : public CActive, public MSsmUtility
+ {
+public:
+ //From MSsmUtility
+ void InitializeL();
+ void StartL();
+ void Release();
+
+public:
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static MSsmUtility* NewL();
+
+protected:
+ // from base class CActive
+
+ /**
+ * Implements cancellation of an outstanding request.
+ */
+ void DoCancel();
+
+ /**
+ * Handles an active object’s request completion event.
+ * This RunL will never leave, so RunError not needed.
+ */
+ void RunL();
+
+private:
+ /**
+ * Destructor.
+ */
+ ~CSsmCollationObserver();
+
+ /**
+ * C++ default constructor.
+ */
+ CSsmCollationObserver();
+
+ /**
+ * Activate the active object.
+ */
+ void Activate();
+
+ /**
+ * Loads the Collation set in the PS key.
+ */
+ void LoadCollation();
+
+ /**
+ * Store the Collation code to Central Repository.
+ * @param aCollation The Collation code to store.
+ */
+ void StoreCollationToCentRep( const TInt aCollation );
+
+private: // data
+
+ /**
+ * Used for observing Collation code changes.
+ */
+ RProperty iCollationProperty;
+ };
+#endif // __SSMCOLLATIONOBSERVER_H__
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmlocaleobserversup.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,13 +15,15 @@
*
*/
-#ifndef C_SSMLOCALEOBSERVERSUP_H
-#define C_SSMLOCALEOBSERVERSUP_H
+#ifndef __SSMLOCALEOBSERVERSUP_H__
+#define __SSMLOCALEOBSERVERSUP_H__
+#include "ssmcommonlocale.h"
#include <e32base.h>
#include <e32property.h>
#include <f32file.h>
#include <ssm/ssmutility.h>
+#include <e32hashtab.h>
class CEnvironmentChangeNotifier;
@@ -75,34 +77,32 @@
/**
* Copied fron SysLocale.
* SaveLocaleL saves TLocale class to the given directory
- * and initiates missing independent data, if any.
- * Note, that independent data is created only once and it is
- * shared by all the locales. Therefore, it is recommended
- * to call this method upon early boot phase of a device.
+ *
* @param aPath Directory path containing locale data files.
* (e.g. "c:\dir" or c:\dir\")
*/
- void SaveLocaleL( const TDesC& aPath );
+ void SaveRegionL( const TDesC& aPath );
/**
* Copied fron SysLocale.
- * LoadLocaleL restores TLocale class from the given directory.
- * If locale independent data (see note)
- * exists, its data overrides the restored TLocale data.
+ * LoadRegionL restores TLocale class from the given directory.
+ *
* @param aPath Directory path containing locale data files
* (e.g. "c:\dir" or c:\dir\")
*/
- void LoadLocaleL( const TDesC& aPath );
-
+ void LoadRegionL( const TDesC& aPath );
+
/**
- * Stores locale independent data.
+ * Initialize the language region mapping
+ *
*/
- void SaveIndependentDataL( const TLocale& aLocale, const TDesC& aPath );
-
+ void InitializeRegionMappingL();
+
/**
- * Loads locale independent data.
+ * Gets the associated region for the given language
+ *
*/
- void LoadIndependentDataL( TLocale& aLocale, const TDesC& aPath );
+ TInt MappedRegionL(const TInt aLanguage);
private: // data
@@ -127,6 +127,10 @@
*/
RFs iFs;
+ /**
+ * Array of language and region mappings.
+ */
+ RHashSet<TLanguageRegion> iLangRegionMappingHashSet;
};
-#endif // C_SSMLOCALEOBSERVERSUP_H
+#endif // __SSMLOCALEOBSERVERSUP_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmregionobserversup.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Declaration of CSsmRegionObserver class.
+*
+*/
+#ifndef __SSMREGIONOBSERVER_H__
+#define __SSMREGIONOBSERVER_H__
+
+#include <e32base.h>
+#include <ssm/ssmutility.h>
+#include <e32property.h>
+#include "trace.h"
+
+/**
+* SSM Utility plugin to observe the Region code changes and load the new Region
+* when it is changed.
+*/
+NONSHARABLE_CLASS( CSsmRegionObserver ) : public CActive, public MSsmUtility
+ {
+public:
+ //From MSsmUtility
+ void InitializeL();
+ void StartL();
+ void Release();
+
+public:
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static MSsmUtility* NewL();
+
+protected:
+ // from base class CActive
+
+ /**
+ * Implements cancellation of an outstanding request.
+ */
+ void DoCancel();
+
+ /**
+ * Handles an active object’s request completion event.
+ * This RunL will never leave, so RunError not needed.
+ */
+ void RunL();
+
+private:
+ /**
+ * Destructor.
+ */
+ ~CSsmRegionObserver();
+
+ /**
+ * C++ default constructor.
+ */
+ CSsmRegionObserver();
+
+ /**
+ * Activate the active object.
+ */
+ void Activate();
+
+ /**
+ * Loads the Region set in the PS key.
+ */
+ void LoadRegion();
+
+ /**
+ * Store the Region code to Central Repository.
+ * @param aRegion The Region code to store.
+ */
+ void StoreRegionToCentRep( const TInt aRegion);
+
+private: // data
+
+ /**
+ * Used for observing Region code changes.
+ */
+ RProperty iRegionProperty;
+ };
+#endif // __SSMREGIONOBSERVER_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmuilanguageobserversup.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Declaration of CSsmUiLanguageObserver class.
+*
+*/
+#ifndef __SSMUILANGUAGEOBSERVER_H__
+#define __SSMUILANGUAGEOBSERVER_H__
+
+#include <e32base.h>
+#include <ssm/ssmutility.h>
+#include <e32property.h>
+#include "trace.h"
+
+/**
+* SSM Utility plugin to observe the UI Language code changes and load the new UI Language
+* when it is changed.
+*/
+NONSHARABLE_CLASS( CSsmUiLanguageObserver ) : public CActive, public MSsmUtility
+ {
+public:
+ //From MSsmUtility
+ void InitializeL();
+ void StartL();
+ void Release();
+
+public:
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static MSsmUtility* NewL();
+
+protected:
+ // from base class CActive
+
+ /**
+ * Implements cancellation of an outstanding request.
+ */
+ void DoCancel();
+
+ /**
+ * Handles an active object’s request completion event.
+ * This RunL will never leave, so RunError not needed.
+ */
+ void RunL();
+
+private:
+ /**
+ * Destructor.
+ */
+ ~CSsmUiLanguageObserver();
+
+ /**
+ * C++ default constructor.
+ */
+ CSsmUiLanguageObserver();
+
+ /**
+ * Activate the active object.
+ */
+ void Activate();
+
+ /**
+ * Loads the Language set in the PS key.
+ */
+ void LoadUILanguage();
+
+ /**
+ * Store the Language code to Central Repository.
+ * @param aUILanguage The Language code to store.
+ */
+ void StoreUILanguageToCentRep( const TInt aUILanguage);
+
+private: // data
+
+ /**
+ * Used for observing UI Language code changes.
+ */
+ RProperty iUILanguageProperty;
+ };
+#endif // __SSMUILANGUAGEOBSERVER_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmcollationobserversup.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CSsmCollationObserver class.
+*
+*/
+#include "ssmcollationobserversup.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmcommonlocale.h"
+#include "trace.h"
+#include <centralrepository.h>
+#include <CommonEngineDomainCRKeys.h>
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::NewL()
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmUtility* CSsmCollationObserver::NewL()
+ {
+ FUNC_LOG;
+ CSsmCollationObserver* self = new( ELeave ) CSsmCollationObserver();
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::InitializeL()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::InitializeL()
+ {
+
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::StartL()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::StartL()
+ {
+ FUNC_LOG;
+ TInt errorCode = iCollationProperty.Attach( KPSStarterUid, KSSMCollationPSKey );
+ ERROR_2( errorCode, "Failed to attach to property 0x%08x::0x%08x", KPSStarterUid.iUid, KSSMCollationPSKey );
+ Activate();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::Release()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::Release()
+ {
+ FUNC_LOG;
+ delete this;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::~CSsmCollationObserver()
+// ---------------------------------------------------------------------------
+//
+CSsmCollationObserver::~CSsmCollationObserver()
+ {
+ FUNC_LOG;
+ Cancel();
+ iCollationProperty.Close();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::DoCancel()
+ {
+ FUNC_LOG;
+ iCollationProperty.Cancel();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::RunL()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::RunL()
+ {
+ FUNC_LOG;
+ const TInt errorCode = iStatus.Int();
+ if (KErrNone == errorCode )
+ {
+ Activate();
+ LoadCollation();
+ }
+ else
+ {
+ INFO_1( "CSsmCollationObserver::RunL()completed with: %d - not reactivating", iStatus.Int() );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::LoadCollation()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::LoadCollation()
+ {
+ FUNC_LOG;
+ TInt collation(0);
+ TInt errorCode = iCollationProperty.Get( collation );
+
+ if( KErrNone != errorCode )
+ {
+ INFO_1( "Failed to get KSSMCollationPSKey value with error %d", errorCode );
+ return;
+ }
+
+ // Dot plus three digit locale
+ TBuf<KMaxDllExtensionLength> extension;
+ extension.Format( KDllExtensionFormat, collation );
+
+ // Padd ".1" to ".001" for compatibility.
+ for( ; extension.Length() < KMinDllExtensionLength ;)
+ {
+ extension.Insert( KDllExtensionPaddingPosition,
+ KDllExtensionPadding );
+ }
+
+ TBuf<KMaxDllNameLength> collationDllName( KCollationDllNameBase );
+ collationDllName.Append( extension );
+ INFO_1( "Loading Collation DLL named '%S'", &collationDllName );
+
+ TExtendedLocale extLocale;
+ extLocale.LoadSystemSettings();
+ errorCode = extLocale.LoadLocaleAspect( collationDllName );
+
+ if ( KErrNone == errorCode )
+ {
+ errorCode = extLocale.SaveSystemSettings();
+ ERROR( errorCode, "Failed to save locale (Collation) settings" );
+ TLocale().Set();
+ StoreCollationToCentRep( collation );
+ }
+ else
+ {
+ INFO_1( "Failed to load locale (Collation) with error %d", errorCode );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::StoreCollationToCentRep
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::StoreCollationToCentRep( const TInt aCollation )
+ {
+ FUNC_LOG;
+ CRepository* cenrep = NULL;
+ TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+ ERROR_1( errorCode, "Failed to initialize cen rep %d", errorCode );
+
+ if ( KErrNone == errorCode )
+ {
+ errorCode = cenrep->Set( KGSCollation, aCollation);
+ ERROR_1( errorCode, "Failed to store collation code to CentRep, %d",
+ errorCode );
+ delete cenrep;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::CSsmCollationObserver()
+// ---------------------------------------------------------------------------
+//
+CSsmCollationObserver::CSsmCollationObserver() : CActive( EPriorityStandard )
+ {
+ FUNC_LOG;
+ CActiveScheduler::Add( this );
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmCollationObserver::Activate()
+// ---------------------------------------------------------------------------
+//
+void CSsmCollationObserver::Activate()
+ {
+ FUNC_LOG;
+ ASSERT( !IsActive() );
+ iCollationProperty.Subscribe( iStatus );
+ SetActive();
+ }
--- a/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmlocaleobserversup.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -19,6 +19,7 @@
#include <bautils.h>
#include <connect/sbdefs.h>
#include <s32file.h>
+#include <e32reg.h>
#include "ssmmapperutilitystatic.h"
#include "ssmlocaleobserversup.h"
@@ -30,9 +31,8 @@
*/
_LIT( KLocaleDataDir, "\\private\\2000d766\\localedata\\" );
-/** Name is LocaleData.Dnn or CommonData.D00 */
-_LIT( KFileName, "LocaleData.D" );
-_LIT( KCommonFileName, "CommonData.D" );
+/** Name is RegionData.Dnn */
+_LIT( KFileName, "RegionData.D" );
/**
* Version number from 1..255 to indicate data
@@ -41,6 +41,9 @@
*/
const TInt KCurrentVersionNumber = 2; // For fixing TChar r/w
+/** The maximum number of regions to be appended to the hash set. */
+const TInt KMaxNumberOfRegions = 56;
+
// ======== LOCAL FUNCTIONS ========
// ---------------------------------------------------------------------------
@@ -64,7 +67,7 @@
static HBufC* MakeFileNameL( const TDesC& aPath, const TDesC& aName, const TInt aCode )
{
FUNC_LOG;
- INFO_3( "Locale data dir: %S, file name base: %S, lang code: %d", &aPath, &aName, aCode );
+ INFO_3( "Region data dir: %S, file name base: %S, region code: %d", &aPath, &aName, aCode );
TInt length = aPath.Length();
@@ -84,11 +87,21 @@
}
ptr.AppendNum( aCode );
- INFO_1( "Locale data file: %S", buffer );
+ INFO_1( "Region data file: %S", buffer );
return buffer;
}
+inline TUint32 HashLangRegionMappingFunction(const TLanguageRegion& aMapping)
+ {
+ return aMapping.iLanguage;
+ }
+
+inline TBool HashLangRegionMappingIdentityRelation(const TLanguageRegion& aMapping1,
+ const TLanguageRegion& aMapping2)
+ {
+ return (aMapping1.iLanguage == aMapping2.iLanguage);
+ }
// ======== MEMBER FUNCTIONS ========
@@ -112,6 +125,7 @@
FUNC_LOG;
Cancel();
+ iLangRegionMappingHashSet.Close();
delete iEnvChangeNotifier;
iFs.Close();
iProperty.Close();
@@ -133,7 +147,7 @@
if ( !iRestoreActive && ( changes & EChangesLocale ) )
{
TParsePtrC parse( KLocaleDataDir );
- SaveLocaleL( parse.FullName() );
+ SaveRegionL( parse.FullName() );
}
if( changes & EChangesSystemTime )
@@ -185,9 +199,9 @@
iRestoreActive = EFalse;
TParsePtrC parse( KLocaleDataDir );
- TRAP( err, LoadLocaleL( parse.FullName() ) );
+ TRAP( err, LoadRegionL( parse.FullName() ) );
ERROR( err, "Failed to load locale" );
- // Can not do anything about the error - just continue.
+ // Cannot do anything about the error - just continue.
}
}
}
@@ -218,6 +232,8 @@
ERROR( err, "Failed to connect to file server" );
User::LeaveIfError( err );
+ InitializeRegionMappingL();
+
TRAP( err, iEnvChangeNotifier = CEnvironmentChangeNotifier::NewL(
CActive::EPriorityStandard,
TCallBack( EnvChangeNotifierCallback, this ) ) );
@@ -235,8 +251,8 @@
FUNC_LOG;
TParsePtrC parse( KLocaleDataDir );
- TRAPD_ERR( err, LoadLocaleL( parse.FullName() ) );
- ERROR( err, "Failed to load locale data the first time" );
+ TRAPD_ERR( err, LoadRegionL( parse.FullName() ) );
+ ERROR( err, "Failed to load region data the first time" );
if ( iEnvChangeNotifier )
{
@@ -268,7 +284,8 @@
//
CSsmLocaleObserverSup::CSsmLocaleObserverSup()
: CActive( EPriorityNormal ),
- iRestoreActive( EFalse )
+ iRestoreActive( EFalse ),
+ iLangRegionMappingHashSet( &::HashLangRegionMappingFunction, &::HashLangRegionMappingIdentityRelation )
{
FUNC_LOG;
@@ -291,15 +308,16 @@
// ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::SaveLocaleL
+// CSsmLocaleObserverSup::SaveRegionL
// ---------------------------------------------------------------------------
//
-void CSsmLocaleObserverSup::SaveLocaleL( const TDesC& aPath )
+void CSsmLocaleObserverSup::SaveRegionL( const TDesC& aPath )
{
FUNC_LOG;
- INFO( "Saving locale data" );
-
- HBufC* fName = MakeFileNameL( aPath, KFileName, User::Language() );
+ INFO( "Saving region data" );
+
+ TInt region = MappedRegionL(User::Language());
+ HBufC* fName = MakeFileNameL( aPath, KFileName, region);
CleanupStack::PushL( fName );
RFileWriteStream fStream;
@@ -365,9 +383,6 @@
fStream.WriteInt8L( locale.NegativeCurrencySymbolOpposite() );
fStream.WriteInt16L( locale.DigitType() );
- // Then save display language independent data
- SaveIndependentDataL( locale, aPath );
-
// If CommitL leaves it means probably full disk.
// It is here assumed that data has not been changed if this leaves.
fStream.CommitL();
@@ -378,15 +393,16 @@
// ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::LoadLocaleL
+// CSsmLocaleObserverSup::LoadRegionL
// ---------------------------------------------------------------------------
//
-void CSsmLocaleObserverSup::LoadLocaleL( const TDesC& aPath )
+void CSsmLocaleObserverSup::LoadRegionL( const TDesC& aPath )
{
FUNC_LOG;
- INFO( "Loading locale data" );
+ INFO( "Loading region data" );
- HBufC* fName = MakeFileNameL( aPath, KFileName, User::Language() );
+ TInt region = MappedRegionL(User::Language());
+ HBufC* fName = MakeFileNameL( aPath, KFileName, region);
CleanupStack::PushL( fName );
TLocale locale; // copy current values
@@ -404,7 +420,7 @@
if ( err == KErrNone )
{
TInt version = fStream.ReadInt8L();
- INFO_1( "Locale file version: %d", version );
+ INFO_1( "Region file version: %d", version );
locale.SetCountryCode( fStream.ReadInt16L() );
fStream.ReadInt16L(); // obsolete
@@ -450,10 +466,6 @@
locale.SetDigitType( static_cast< TDigitType >( fStream.ReadInt16L() ) );
}
- // Then patch data with locale independent data (code 00)
- // No changes to locale if no independent data can be found (the very first boot)
- LoadIndependentDataL( locale, aPath );
-
// Save changes to the system.
locale.Set();
@@ -461,93 +473,83 @@
CleanupStack::PopAndDestroy( fName );
}
+void CSsmLocaleObserverSup::InitializeRegionMappingL()
+ {
+ //Reserve the memory for the number of mappings to be appended
+ iLangRegionMappingHashSet.ReserveL( KMaxNumberOfRegions );
+
+ //Insert the Language - Region mapping
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish, ERegGBR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFrench, ERegFRA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGerman, ERegDEU ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSpanish, ERegESP ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangItalian, ERegITA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSwedish, ERegSWE ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDanish, ERegDNK ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangNorwegian, ERegNOR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFinnish, ERegFIN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangAmerican, ERegUSA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPortuguese, ERegPRT ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTurkish, ERegTUR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIcelandic, ERegISL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRussian, ERegRUS ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHungarian, ERegHUN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDutch, ERegNLD ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBelgianFlemish, ERegBEL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCzech, ERegCZE ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovak, ERegSVK ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPolish, ERegPOL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovenian, ERegSVN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTaiwanChinese, ERegTWN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHongKongChinese, ERegHKG ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPrcChinese, ERegCHN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangJapanese, ERegJPN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangThai, ERegTHA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangArabic, ERegARE ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTagalog, ERegPHL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBulgarian, ERegBGR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCatalan, ERegESP ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCroatian, ERegHRV ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEstonian, ERegEST ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFarsi, ERegIRN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCanadianFrench, ERegCAN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGreek, ERegGRC ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHebrew, ERegISR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHindi, ERegIND ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIndonesian, ERegIDN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatvian, ERegLVA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLithuanian, ERegLTU ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay, ERegMYS ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBrazilianPortuguese, ERegBRA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRomanian, ERegROU ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSerbian, ERegSCG ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatinAmericanSpanish, ERegMEX ));
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUkrainian, ERegUKR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUrdu, ERegPAK ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangVietnamese, ERegVNM ) );
+#ifdef __E32LANG_H__
+ // 5.0
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBasque, ERegESP ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGalician, ERegESP ) );
+#endif //__E32LANG_H__
+#if !defined(__SERIES60_31__)
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Apac, ERegGBR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Taiwan, ERegTWN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_HongKong, ERegHKG ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Prc, ERegCHN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Japan, ERegJPN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Thailand, ERegTHA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay_Apac, ERegMYS ) );
+#endif //!defined(__SERIES60_31__)
+ }
// ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::SaveIndependentDataL
+// CSsmLocaleObserverSup::MappedRegionL
// ---------------------------------------------------------------------------
//
-void CSsmLocaleObserverSup::SaveIndependentDataL(
- const TLocale& aLocale,
- const TDesC& aPath )
+TInt CSsmLocaleObserverSup::MappedRegionL(const TInt aLanguage)
{
FUNC_LOG;
-
- // Get old independent data, if any.
- TLocale savedLoc;
- TRAPD( err, LoadIndependentDataL( savedLoc, aPath ) );
- ERROR( err, "Failed to load locale independent data" );
-
- HBufC* fName = MakeFileNameL( aPath, KCommonFileName, 0 );
- CleanupStack::PushL( fName );
- RFileWriteStream fStream;
- CleanupClosePushL( fStream );
-
- err = iFs.MkDirAll( *fName ); // Ignore errors
- err = fStream.Create( iFs, *fName, EFileWrite );
- if ( err == KErrAlreadyExists )
- {
- // Override
- err = fStream.Open( iFs, *fName, EFileWrite );
- ERROR_1( err, "Failed to create stream %S", fName );
- }
- User::LeaveIfError( err );
-
- // Write first the version number to enable support for file format changes.
- fStream.WriteInt8L( KCurrentVersionNumber );
- fStream.WriteInt32L( 0 ); // Universal time offset is not part of TLocale
- // any more. Write zero here to keep file structure.
- // Clock format is also common.
- fStream.WriteUint32L( aLocale.ClockFormat() );
- fStream.WriteUint32L( 0 ); // reserved 2
- fStream.WriteUint32L( 0 ); // reserved 3
-
- fStream.CommitL();
-
- CleanupStack::PopAndDestroy( &fStream );
- CleanupStack::PopAndDestroy( fName );
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLocaleObserverSup::LoadIndependentDataL
-// ---------------------------------------------------------------------------
-//
-void CSsmLocaleObserverSup::LoadIndependentDataL(
- TLocale& aLocale,
- const TDesC& aPath )
- {
- FUNC_LOG;
-
- HBufC* fName = MakeFileNameL( aPath, KCommonFileName, 0 );
- CleanupStack::PushL( fName );
-
- RFileReadStream fStream;
- CleanupClosePushL( fStream );
- TInt err = fStream.Open( iFs, *fName, EFileRead );
- if ( err != KErrNotFound && err != KErrPathNotFound )
- {
- ERROR_1( err, "Failed to open stream %S", fName );
- // Data file is missing upon the first boot or when switching into a
- // language for the first time
- }
-
- if ( err == KErrNotFound || err == KErrPathNotFound )
- {
- // File not found --> Not an error because
- // this is a new file and older builds do not have this file.
- INFO( "No locale data found" );
- }
- else
- {
- User::LeaveIfError( err );
-
- fStream.ReadInt8L(); // Version.
- fStream.ReadInt32L(); // Universal time offset was stored here.
- aLocale.SetClockFormat( ( TClockFormat ) fStream.ReadUint32L() );
- fStream.ReadUint32L(); // reserved 2
- fStream.ReadUint32L(); // reserved 3
- }
-
- CleanupStack::PopAndDestroy( &fStream );
- CleanupStack::PopAndDestroy( fName );
- }
+ TLanguageRegion langRegion = iLangRegionMappingHashSet.FindL(TLanguageRegion(aLanguage));
+ return langRegion.iRegion;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmregionobserversup.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,191 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CSsmRegionObserver class.
+*
+*/
+#include "ssmregionobserversup.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmcommonlocale.h"
+#include "trace.h"
+#include <centralrepository.h>
+#include <CommonEngineDomainCRKeys.h>
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmUtility* CSsmRegionObserver::NewL()
+ {
+ FUNC_LOG;
+ CSsmRegionObserver* self = new( ELeave ) CSsmRegionObserver();
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::InitializeL()
+ {
+
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::StartL
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::StartL()
+ {
+ FUNC_LOG;
+ TInt errorCode = iRegionProperty.Attach( KPSStarterUid, KSSMRegionPSKey );
+ ERROR_2( errorCode, "Failed to attach to property 0x%08x::0x%08x", KPSStarterUid.iUid, KSSMRegionPSKey );
+ Activate();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::Release
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::Release()
+ {
+ FUNC_LOG;
+ delete this;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::~CSsmRegionObserver
+// ---------------------------------------------------------------------------
+//
+CSsmRegionObserver::~CSsmRegionObserver()
+ {
+ FUNC_LOG;
+ Cancel();
+ iRegionProperty.Close();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::DoCancel()
+ {
+ FUNC_LOG;
+ iRegionProperty.Cancel();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::RunL
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::RunL()
+ {
+ FUNC_LOG;
+ const TInt errorCode = iStatus.Int();
+ if ( KErrNone == errorCode )
+ {
+ Activate();
+ LoadRegion();
+ }
+ else
+ {
+ INFO_1("CSsmRegionObserver::RunL()completed with: %d - not reactivating", iStatus.Int());
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::LoadRegion
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::LoadRegion()
+ {
+ TInt region(0);
+ TInt errorCode = iRegionProperty.Get( region);
+ if( KErrNone != errorCode )
+ {
+ INFO_1( "Failed to get KSSMRegionPSKey value with error %d", errorCode );
+ return;
+ }
+
+ // Dot plus five digit locale
+ TBuf<KMaxDllExtensionLength> extension;
+ extension.Format( KDllExtensionFormat, region);
+
+ // Padd ".1" to ".01" for compatibility.
+ for( ; extension.Length() < KMinDllExtensionLength ;)
+ {
+ extension.Insert( KDllExtensionPaddingPosition,
+ KDllExtensionPadding );
+ }
+
+ TBuf<KMaxDllNameLength> regionDllName( KRegionDllNameBase );
+ regionDllName.Append( extension );
+ INFO_1( "Loading region DLL named '%S'", ®ionDllName );
+
+ TExtendedLocale extLocale;
+ extLocale.LoadSystemSettings();
+ errorCode = extLocale.LoadLocaleAspect(regionDllName );
+
+ ERROR( errorCode, "Failed to load region" );
+
+ if ( KErrNone == errorCode )
+ {
+ errorCode = extLocale.SaveSystemSettings();
+ ERROR( errorCode, "Failed to set region" );
+ TLocale().Set();
+ StoreRegionToCentRep( region );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::StoreRegionToCentRep
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::StoreRegionToCentRep( const TInt aRegion )
+ {
+ FUNC_LOG;
+ CRepository* cenrep = NULL;
+ TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+ ERROR_1( errorCode, "Failed to initialize cen rep %d", errorCode );
+
+ if ( KErrNone == errorCode )
+ {
+ errorCode = cenrep->Set( KGSRegion, aRegion);
+ ERROR_1( errorCode, "Failed to store region code to CentRep, %d",
+ errorCode );
+ delete cenrep;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::CSsmRegionObserver
+// ---------------------------------------------------------------------------
+//
+CSsmRegionObserver::CSsmRegionObserver() : CActive( EPriorityStandard )
+ {
+ CActiveScheduler::Add( this );
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmRegionObserver::Activate
+// ---------------------------------------------------------------------------
+//
+void CSsmRegionObserver::Activate()
+ {
+ FUNC_LOG;
+ ASSERT( !IsActive() );
+ iRegionProperty.Subscribe( iStatus );
+ SetActive();
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/src/ssmuilanguageobserversup.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CSsmUiLanguageObserver class.
+*
+*/
+#include "ssmuilanguageobserversup.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include "ssmcommonlocale.h"
+#include "trace.h"
+#include <centralrepository.h>
+#include <CommonEngineDomainCRKeys.h>
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C MSsmUtility* CSsmUiLanguageObserver::NewL()
+ {
+ FUNC_LOG;
+ CSsmUiLanguageObserver* self = new( ELeave ) CSsmUiLanguageObserver();
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::InitializeL()
+ {
+
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::StartL
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::StartL()
+ {
+ FUNC_LOG;
+ TInt errorCode = iUILanguageProperty.Attach( KPSStarterUid, KSSMUILanguagePSKey );
+ ERROR_2( errorCode, "Failed to attach to property 0x%08x::0x%08x", KPSStarterUid.iUid, KSSMUILanguagePSKey );
+ Activate();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::Release
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::Release()
+ {
+ FUNC_LOG;
+ delete this;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::~CSsmUiLanguageObserver
+// ---------------------------------------------------------------------------
+//
+CSsmUiLanguageObserver::~CSsmUiLanguageObserver()
+ {
+ FUNC_LOG;
+ Cancel();
+ iUILanguageProperty.Close();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::DoCancel()
+ {
+ FUNC_LOG;
+ iUILanguageProperty.Cancel();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::RunL
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::RunL()
+ {
+ FUNC_LOG;
+ const TInt errorCode = iStatus.Int();
+ if (KErrNone == errorCode )
+ {
+ Activate();
+ LoadUILanguage();
+ }
+ else
+ {
+ INFO_1("CSsmUiLanguageObserver::RunL()completed with: %d - not reactivating", iStatus.Int());
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::LoadUILanguage
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::LoadUILanguage()
+ {
+ FUNC_LOG;
+ TInt uiLanguage(0);
+ TInt errorCode = iUILanguageProperty.Get( uiLanguage );
+
+ if( KErrNone != errorCode )
+ {
+ INFO_1( "Failed to get KSSMUILanguagePSKey value with error %d", errorCode );
+ return;
+ }
+
+ // Dot plus five digit locale
+ TBuf<KMaxDllExtensionLength> extension;
+ extension.Format( KDllExtensionFormat, uiLanguage );
+
+ // Padd ".1" to ".001" for compatibility.
+ for( ; extension.Length() < KMinDllExtensionLength ;)
+ {
+ extension.Insert( KDllExtensionPaddingPosition,
+ KDllExtensionPadding );
+ }
+
+ TBuf<KMaxDllNameLength> uiLanguageDllName( KLanguageDllNameBase );
+ uiLanguageDllName.Append( extension );
+ INFO_1( "Loading UI Language DLL named '%S'", &uiLanguageDllName );
+
+ TExtendedLocale extLocale;
+ extLocale.LoadSystemSettings();
+ errorCode = extLocale.LoadLocaleAspect( uiLanguageDllName );
+ ERROR( errorCode, "Failed to load locale" );
+
+ if ( errorCode == KErrNone )
+ {
+ errorCode = extLocale.SaveSystemSettings();
+ ERROR( errorCode, "Failed to set locale" );
+ TLocale().Set();
+ StoreUILanguageToCentRep( uiLanguage );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::StoreUILanguageToCentRep
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::StoreUILanguageToCentRep( const TInt aUILanguage )
+ {
+ FUNC_LOG;
+ CRepository* cenrep = NULL;
+ TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+ ERROR_1( errorCode, "Failed to initialize cen rep %d", errorCode );
+
+ if ( KErrNone == errorCode )
+ {
+ errorCode = cenrep->Set( KGSDisplayTxtLang, aUILanguage);
+ ERROR_1( errorCode, "Failed to store UI Language code to CentRep, %d",
+ errorCode );
+ delete cenrep;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::CSsmUiLanguageObserver
+// ---------------------------------------------------------------------------
+//
+CSsmUiLanguageObserver::CSsmUiLanguageObserver() : CActive( EPriorityStandard )
+ {
+ FUNC_LOG;
+ CActiveScheduler::Add( this );
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmUiLanguageObserver::Activate
+// ---------------------------------------------------------------------------
+//
+void CSsmUiLanguageObserver::Activate()
+ {
+ FUNC_LOG;
+ ASSERT( !IsActive() );
+ iUILanguageProperty.Subscribe( iStatus );
+ SetActive();
+ }
--- a/sysstatemgmt/syslangutil/rom/syslangutil.iby Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/syslangutil/rom/syslangutil.iby Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -22,4 +22,20 @@
file=ABI_DIR\BUILD_DIR\ssmlangselcmd.dll SHARED_LIB_DIR\ssmlangselcmd.dll
file=ABI_DIR\BUILD_DIR\syslangutil.dll SHARED_LIB_DIR\syslangutil.dll
+
+//If elocl.iby changes doesnt come on time then the epoc will not boot. Hence adding
+//these dlls temporarily to avoid such problems
+//Remove this once elocl.iby is updated with these dlls
+
+#ifdef EKA2
+file=ABI_DIR\BUILD_DIR\elocl_lan.001 SHARED_LIB_DIR\elocl_lan.001
+file=ABI_DIR\BUILD_DIR\elocl_reg.826 SHARED_LIB_DIR\elocl_reg.826
+file=ABI_DIR\BUILD_DIR\elocl_col.001 SHARED_LIB_DIR\elocl_col.001
+#else
+file=\epoc32\release\armi\DEBUG_DIR\elocl_lan.001 System\libs\elocl_lan.001
+file=\epoc32\release\armi\DEBUG_DIR\elocl_reg.826 System\libs\elocl_reg.826
+file=\epoc32\release\armi\DEBUG_DIR\elocl_col.001 System\libs\elocl_col.001
+#endif //EKA2
+//
+
#endif // SYSLANGUTIL_IBY
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlangselcmd.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -19,9 +19,11 @@
#ifndef SSMLANGSELCMD_H
#define SSMLANGSELCMD_H
+#include "ssmcommonlocale.h"
#include <e32base.h>
#include <ssm/ssmcustomcommand.h>
#include <ssm/ssmadaptationcli.h>
+#include <e32hashtab.h>
class CSsmMapperUtility;
@@ -157,6 +159,97 @@
*/
void UseLanguage(const TInt aLang);
+ /**
+ * Initialize the language region mapping
+ *
+ */
+ void InitializeRegionMappingL();
+
+ /**
+ * Used to check whether the region is valid or not
+ *
+ * @param aRegion Region to be validated
+ *
+ * @return ETrue if the region code was found in the list, EFalse otherwise.
+ */
+ TBool IsRegionValidL(const TInt aRegion) const;
+
+ /**
+ * Get the stored Region and Collation code from Central Repository
+ *
+ * @param aRegion On return, will store the Region code fetched from CR
+ * @param aCollation On return, will store the Collation code fetched from CR
+ *
+ */
+ void GetIndividualSettingsFromCentRepL(TInt& aRegion, TInt& aCollation);
+
+ /**
+ * Store the given Region and Collation code to Central Repository
+ *
+ * @param aRegion Region code to be stored in CR
+ * @param aCollation Collation code to be stored in CR
+ *
+ * @return Success code, Contains any of the error code in case of any error.
+ */
+ TInt SetIndividualSettingsToCentRep(const TInt aRegion, const TInt aCollation);
+
+ /**
+ * Gets the selected Region and Collation codes. If not set will get the asscoiated codes
+ * for the language
+ *
+ * @param aLastSelectedLang Contains the seleted Language code
+ * @param aLastSelectedRegion On success contains the Region code
+ * @param aLastSelectedCollation On success contains the Collation code
+ *
+ * @return ETrue If the Region and Collation codes are valid or found the mapped Region
+ * incase of auto selection, EFalse otherwise.
+ */
+ TBool ValidateAndGetSettings(const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation);
+
+ /**
+ * Gets the selected Region and Collation codes. If not set will get the asscoiated codes
+ * for the language
+ *
+ * @param aLastSelectedLang Contains the seleted Language code
+ * @param aLastSelectedRegion On success contains the Region code
+ * @param aLastSelectedCollation On success contains the Collation code
+ *
+ * @return ETrue If the Region and Collation codes are valid or found the mapped Region
+ * incase of auto selection, EFalse otherwise. Leaves with any of error code incase of any error
+ */
+ TBool ValidateAndGetSettingsL(const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation);
+
+ /**
+ * Loads the default language setting if it is valid
+ *
+ * @return KErrNone if the default language settings are valid and loaded successfully,
+ * any of the error code otherwise.
+ */
+ TInt ValidateAndUseDefaultLanguage();
+
+ /**
+ * Loads the corresponsing locale codes
+ *
+ * @param aLang Language code to be loaded
+ * @param aRegion Region code to be loaded
+ * @param aCollation Collation code to be loaded
+ *
+ * @return Success code, Contains any of the error code in case of any error.
+ */
+ TInt UseLocale( const TInt aLang, const TInt aRegion, const TInt aCollation );
+
+ /**
+ * Gets the region mapped with the given language after validating
+ *
+ * @param aLanguage Language code for getting associated Region code
+ * @param aRegion On return contains the Region code associated with
+ * the given language code
+ *
+ * @return ETrue if the region code was found in the list, EFalse otherwise.
+ */
+
+ TBool ValidateAndGetMappedRegion( const TInt aLanguage, TInt& aRegion );
+
private: // data
/** Custom command environment. Not owned. Set in Initialise. */
@@ -191,14 +284,20 @@
/** Internal state of the object. */
enum TState
{
+ EQueryListNone = 0,
EQueryListSize = 1,
- EQueryListContent
+ EQueryListContent = 2
};
TState iState;
// The mapper utility instance, owned.
CSsmMapperUtility* iMapperUtility;
+ /** Array of language and region mappings. */
+ RHashSet<TLanguageRegion> iLangRegionMappingHashSet;
+
+ /** Array of valid regions. */
+ RArray<TLanguageRegion> iRegionsArray;
};
#endif // SSMLANGSELCMD_H
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlanguageloader.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/inc/ssmlanguageloader.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,8 +11,7 @@
*
* Contributors:
*
-* Description:
-* Declaration of SsmLanguageLoader class.
+* Description: Declaration of SsmLanguageLoader class.
*
*/
@@ -34,15 +33,15 @@
public:
/**
- * Store language code to HAL and load corresponding locale DLL.
+ * Store language code to HAL and load corresponding Language, Region and Collation DLLs.
*
- * @since S60 3.2
- * @param aLanguage Language code identifying which locale DLL to load.
+ * @param aLanguage Language code identifying which language DLL to load.
+ * @param aRegion Region code identifying which region DLL to load.
+ * @param aCollation Collation code identifying which collation DLL to load.
* @return KErrNone if loading was successful, one of Symbian error codes
* otherwise.
*/
- static TInt LoadLanguage( const TInt aLanguage );
-
+ static TInt LoadLocale( const TInt aLanguage, const TInt aRegion, const TInt aCollation);
private:
/**
@@ -55,23 +54,13 @@
static TInt StoreLanguageToHal( const TInt aLanguage );
/**
- * Find the correct locale DLL to use by language code and take it to
- * use.
+ * Loads the given Language, Region and Collation DLLs and saves the settings
*
- * @param aLanguageCode The language code to find a locale dll for.
+ * @param aLanguageDllName The name of the Language DLL to load.
+ * @param aRegionDllName The name of the Region DLL to load.
+ * @param aCollationDllName The name of the Collation DLL to load.
* @return KErrNone if successful, one of Symbian error codes otherwise.
*/
- static TInt LoadLocaleDll( const TInt aLanguage );
-
- /**
- * Take a locale DLL to use by name.
- *
- * @param aLocaleDllName The name of the locale DLL to load.
- * @return KErrNone if successful, one of Symbian error codes otherwise.
- */
- static TInt ChangeLocale( const TDesC& aLocaleDllName );
-
+ static TInt ChangeLocale( const TDesC& aLanguageDllName, const TDesC& aRegionDllName, const TDesC& aCollationDllName );
};
-
-
#endif // SSMLANGUAGELOADER_H
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlangselcmd.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlangselcmd.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,8 +1,8 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
+* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
@@ -22,7 +22,10 @@
#include "ssmlanguageloader.h"
#include "syslangutilprivatecrkeys.h"
#include "trace.h"
+#include "ssmlocalepskeys.h"
+#include "ssmmapperutilityinternalpskeys.h"
+#include <e32property.h>
#include <syslangutil.h>
#include <CommonEngineDomainCRKeys.h>
#include <centralrepository.h>
@@ -31,6 +34,55 @@
/** Default granularity for list of installed languages. */
const TInt KLanguageListGranularity( 4 );
+/** Any of the code set to zero means auto selection is enabled. */
+const TInt KSettingAutomatic = 0;
+
+/** The maximum number of regions to be appended to the hash set. */
+const TInt KMaxNumberOfRegions = 56;
+
+// ======== LOCAL FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// HashLangRegionMappingFunction
+// ---------------------------------------------------------------------------
+//
+inline TUint32 HashLangRegionMappingFunction(const TLanguageRegion& aMapping)
+ {
+ return aMapping.iLanguage;
+ }
+
+// ---------------------------------------------------------------------------
+// LangRegionMappingIdentityRelation
+// ---------------------------------------------------------------------------
+//
+inline TBool LangRegionMappingIdentityRelation(const TLanguageRegion& aMapping1,
+ const TLanguageRegion& aMapping2)
+ {
+ return (aMapping1.iLanguage == aMapping2.iLanguage);
+ }
+
+// ---------------------------------------------------------------------------
+// RegionLangMappingIdentityRelation
+// ---------------------------------------------------------------------------
+//
+inline TBool RegionLangMappingIdentityRelation(const TLanguageRegion& aMapping1,
+ const TLanguageRegion& aMapping2)
+ {
+ return (aMapping1.iRegion == aMapping2.iRegion);
+ }
+
+// ---------------------------------------------------------------------------
+// CompareLanguageMapping
+// ---------------------------------------------------------------------------
+//
+static TInt CompareLanguageMapping(TLanguageRegion const &aLanguage1, TLanguageRegion const &aLanguage2)
+ {
+ if( aLanguage1.iLanguage == aLanguage2.iLanguage )
+ {
+ return 0;
+ }
+ return ( aLanguage1.iLanguage < aLanguage2.iLanguage ) ? -1 : 1;
+ }
// ======== MEMBER FUNCTIONS ========
@@ -48,6 +100,18 @@
return self;
}
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::CSsmLangSelCmd
+// ---------------------------------------------------------------------------
+//
+CSsmLangSelCmd::CSsmLangSelCmd() : CActive( EPriorityNormal ),
+ iState( EQueryListNone ),
+ iLangRegionMappingHashSet( &::HashLangRegionMappingFunction, &::LangRegionMappingIdentityRelation )
+ {
+ FUNC_LOG;
+
+ CActiveScheduler::Add( this );
+ }
// ---------------------------------------------------------------------------
// CSsmLangSelCmd::~CSsmLangSelCmd
@@ -56,11 +120,501 @@
CSsmLangSelCmd::~CSsmLangSelCmd()
{
FUNC_LOG;
+ Cancel();
delete iLangList;
delete iMapperUtility;
}
// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::ConstructL()
+ {
+ FUNC_LOG;
+ iMapperUtility = CSsmMapperUtility::NewL();
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::Initialize
+// ---------------------------------------------------------------------------
+//
+ TInt CSsmLangSelCmd::Initialize( CSsmCustomCommandEnv* aCmdEnv )
+ {
+ FUNC_LOG;
+
+ iEnv = aCmdEnv;
+ TRAPD( errorCode, InitializeL() );
+ return errorCode;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::InitializeL()
+ {
+ FUNC_LOG;
+ ASSERT_TRACE( iEnv );
+
+ iValidLanguages = new ( ELeave ) CArrayFixFlat<TInt>( KLanguageListGranularity );
+
+ RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
+
+ //Get the list of installed languages
+ TInt errorCode = SysLangUtil::GetInstalledLanguages( iValidLanguages,
+ fsSession );
+
+ ERROR( errorCode, "Failed to get installed languages" );
+ User::LeaveIfError( errorCode );
+
+ //Initialize the Language and Region mapping hash set
+ InitializeRegionMappingL();
+
+ //Get the number of installed languages
+ const TInt validLangCount = iValidLanguages->Count();
+ TLinearOrder<TLanguageRegion> order(&CompareLanguageMapping);
+
+ //Get the mapped regions for the installed languages
+ for(TInt index = 0; index < validLangCount; ++index)
+ {
+ TLanguageRegion region = iLangRegionMappingHashSet.FindL(TLanguageRegion(iValidLanguages->At(index)));
+ INFO_2( "Found Region code = %d for language %d", region.iRegion, region.iLanguage );
+ iRegionsArray.InsertInOrderL(region, order);
+ }
+
+ //Connect to Misc adaptation
+ errorCode = iAdaptation.Connect();
+ ERROR( errorCode, "Failed to connect to RSsmMiscAdaptation" );
+ User::LeaveIfError( errorCode );
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::InitializeRegionMappingL
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::InitializeRegionMappingL()
+ {
+ //Reserve the memory for the number of mappings to be appended
+ iLangRegionMappingHashSet.ReserveL( KMaxNumberOfRegions );
+
+ //Insert the Language - Region mapping
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish, ERegGBR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFrench, ERegFRA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGerman, ERegDEU ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSpanish, ERegESP ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangItalian, ERegITA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSwedish, ERegSWE ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDanish, ERegDNK ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangNorwegian, ERegNOR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFinnish, ERegFIN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangAmerican, ERegUSA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPortuguese, ERegPRT ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTurkish, ERegTUR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIcelandic, ERegISL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRussian, ERegRUS ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHungarian, ERegHUN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangDutch, ERegNLD ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBelgianFlemish, ERegBEL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCzech, ERegCZE ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovak, ERegSVK ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPolish, ERegPOL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSlovenian, ERegSVN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTaiwanChinese, ERegTWN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHongKongChinese, ERegHKG ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangPrcChinese, ERegCHN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangJapanese, ERegJPN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangThai, ERegTHA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangArabic, ERegARE ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangTagalog, ERegPHL ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBulgarian, ERegBGR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCatalan, ERegESP ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCroatian, ERegHRV ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEstonian, ERegEST ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangFarsi, ERegIRN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangCanadianFrench, ERegCAN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGreek, ERegGRC ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHebrew, ERegISR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangHindi, ERegIND ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangIndonesian, ERegIDN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatvian, ERegLVA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLithuanian, ERegLTU ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay, ERegMYS ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBrazilianPortuguese, ERegBRA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangRomanian, ERegROU ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangSerbian, ERegSCG ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangLatinAmericanSpanish, ERegMEX ));
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUkrainian, ERegUKR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangUrdu, ERegPAK ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangVietnamese, ERegVNM ) );
+#ifdef __E32LANG_H__
+ // 5.0
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangBasque, ERegESP ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangGalician, ERegESP ) );
+#endif //__E32LANG_H__
+#if !defined(__SERIES60_31__)
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Apac, ERegGBR ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Taiwan, ERegTWN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_HongKong, ERegHKG ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Prc, ERegCHN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Japan, ERegJPN ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangEnglish_Thailand, ERegTHA ) );
+ iLangRegionMappingHashSet.InsertL( TLanguageRegion( ELangMalay_Apac, ERegMYS ) );
+#endif //!defined(__SERIES60_31__)
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::Execute
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::Execute( const TDesC8& /*aParams*/, TRequestStatus& aRequest )
+ {
+ FUNC_LOG;
+
+ ASSERT_TRACE( !iClientStatus );
+ ASSERT_TRACE( !IsActive() );
+ ASSERT_TRACE( iEnv );
+
+ aRequest = KRequestPending;
+ iClientStatus = &aRequest;
+
+ RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
+
+ //Get the default language
+ TInt errorCode = SysLangUtil::GetDefaultLanguage( iDefaultLanguage, fsSession );
+ ERROR( errorCode, "Failed to get default language" );
+
+ //Get the language selected
+ TInt lastSelectedLang = GetLastSelectedLang();
+ TInt lastSelectedRegion ( KErrNotFound );
+ TInt lastSelectedCollation ( KErrNotFound );
+
+ //Reset error code to KErrNotFound
+ errorCode = KErrNotFound;
+
+ if ( KSettingAutomatic == lastSelectedLang )
+ {
+ //Auto selection is enabled
+ SetIndividualSettingsToCentRep( KSettingAutomatic, KSettingAutomatic );
+ PrepareNextList();
+ }
+ else if ( ValidateAndGetSettings( lastSelectedLang, lastSelectedRegion, lastSelectedCollation ) )
+ {
+ //Validate and get the selected Language, Region and Collation code
+ errorCode = UseLocale( lastSelectedLang , lastSelectedRegion, lastSelectedCollation );
+ ERROR( errorCode, "Failed to load selected Language, Region and Collation" );
+ }
+
+ //Load the default Language, Region and Collation in case of loading selected codes failed
+ //and auto selection is disabled.
+ if( KErrNone != errorCode && KSettingAutomatic != lastSelectedLang )
+ {
+ //Validate and use the default codes
+ errorCode = ValidateAndUseDefaultLanguage();
+ ERROR( errorCode, "Failed to load default Language, Region and Collation" );
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::GetLastSelectedLang
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::GetLastSelectedLang()
+ {
+ FUNC_LOG;
+
+ TInt value( 0 );
+ TInt errorCode = iMapperUtility->CrValue( KCRUidCommonEngineKeys,
+ KGSDisplayTxtLang,
+ value );
+ if( KErrNone == errorCode )
+ {
+ errorCode = RProperty::Set( KPSStarterUid, KSSMUILanguagePSKey, value );
+ ERROR_1( errorCode, "Failed to set read KSSMUILanguagePSKey PS key %d", errorCode );
+ }
+ else
+ {
+ INFO_1( "Failed read KGSDisplayTxtLang CenRep key with error= %d", errorCode );
+ }
+
+ INFO_1( "Last selected language is %d", value );
+ return value;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::SetIndividualSettingsToCentRep
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::SetIndividualSettingsToCentRep( const TInt aRegion, const TInt aCollation )
+ {
+ FUNC_LOG;
+ CRepository* cenrep = NULL;
+ TRAPD( errorCode, cenrep = CRepository::NewL( KCRUidCommonEngineKeys ) );
+
+ if ( KErrNone == errorCode )
+ {
+ //Set the Region CR with the given value
+ errorCode = cenrep->Set( KGSRegion, aRegion );
+ if ( KErrNone == errorCode )
+ {
+ //Set the Region PS key which is used in Region SUP
+ TInt err = RProperty::Set( KPSStarterUid, KSSMRegionPSKey, aRegion );
+ ERROR( err, "Failed to Set Region PS key");
+ }
+ else
+ {
+ INFO_1( "Failed to Set Region code to CentRep, %d", errorCode );
+ }
+ }
+ else
+ {
+ INFO_1( "Failed to initialize cen rep %d", errorCode );
+ }
+
+ if ( KErrNone == errorCode )
+ {
+ //Set the Collation CR with the given value
+ errorCode = cenrep->Set( KGSCollation, aCollation );
+ if ( KErrNone == errorCode )
+ {
+ //Set the Collation PS key which is used in Collation SUP
+ errorCode = RProperty::Set( KPSStarterUid, KSSMCollationPSKey, aCollation );
+ ERROR( errorCode, "Failed to Set Collation PS key " );
+ }
+ else
+ {
+ INFO_1( "Failed to Set Collation code to CentRep, %d", errorCode );
+ }
+ }
+ delete cenrep;
+ return errorCode;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidateAndGetSettings
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::ValidateAndGetSettings( const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation )
+ {
+ TBool isValid( EFalse );
+ //Validate and get the selected settings
+ TRAPD( errorCode, isValid = ValidateAndGetSettingsL( aLastSelectedLang, aLastSelectedRegion, aLastSelectedCollation ) );
+ ERROR_1( errorCode, "Validation failed for the selected Language, region and Collation with error %d", errorCode );
+ return isValid;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidateAndGetSettingsL
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::ValidateAndGetSettingsL( const TInt aLastSelectedLang, TInt& aLastSelectedRegion, TInt& aLastSelectedCollation )
+ {
+ TBool isValid( EFalse );
+
+ //Get the selected Region and Collation
+ GetIndividualSettingsFromCentRepL( aLastSelectedRegion, aLastSelectedCollation );
+
+ //Check whether the selected Language is valid or not
+ if( IsValid( aLastSelectedLang ) )
+ {
+ if (KSettingAutomatic >= aLastSelectedRegion )
+ {
+ //Selected Region is Automatic. Get the Region associated
+ //with the Language being loaded
+ if( ValidateAndGetMappedRegion( aLastSelectedLang, aLastSelectedRegion ) )
+ {
+ isValid = ETrue;
+ }
+ }
+ else if( IsRegionValidL( aLastSelectedRegion ) )
+ {
+ //Selected Region is a valid Region
+ isValid = ETrue;
+ }
+
+ if ( KSettingAutomatic >= aLastSelectedCollation )
+ {
+ //Collation is not set. Use the language code as the collation code
+ aLastSelectedCollation = aLastSelectedLang;
+ }
+ }
+
+ return isValid;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::IsValid
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::IsValid( const TInt aLanguage ) const
+ {
+ FUNC_LOG;
+ ASSERT_TRACE( iValidLanguages );
+
+ TBool valid( EFalse );
+ TKeyArrayFix keyProp( 0, ECmpTInt );
+ TInt index( KErrNotFound );
+ // Returns zero if element is found.
+ if ( 0 == iValidLanguages->Find( aLanguage, keyProp, index ) )
+ {
+ valid = ETrue;
+ }
+
+ return valid;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::GetLanguageFromCentRep
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::GetLanguageFromCentRep()
+ {
+ FUNC_LOG;
+
+ TInt lang = iDefaultLanguage;
+ TInt errorCode = iMapperUtility->CrValue( KCRUidSysLangUtil,
+ KSysLangUtilSimLanguage,
+ lang );
+
+ ERROR_1( errorCode, "Failed to read language code from CenRep %d",
+ errorCode );
+ return lang;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::IsRegionValidL
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::IsRegionValidL( const TInt aRegion ) const
+ {
+ FUNC_LOG;
+ TInt index = iRegionsArray.FindL(TLanguageRegion(0, aRegion), &::RegionLangMappingIdentityRelation);
+
+ return ETrue;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidRegionAndGetMappedLanguage
+//
+// ---------------------------------------------------------------------------
+//
+TBool CSsmLangSelCmd::ValidateAndGetMappedRegion( const TInt aLanguage, TInt& aRegion )
+ {
+ FUNC_LOG;
+
+ TBool valid( EFalse );
+ TLanguageRegion lang( aLanguage );
+
+ //Find the Language - Region mapping for the given Language
+ TInt index = iRegionsArray.Find( lang, &::LangRegionMappingIdentityRelation );
+ if( 0 <= index )
+ {
+ //Set the Region associated with the given Language
+ aRegion = iRegionsArray[index].iRegion;
+ INFO_1( "ValidRegionAndGetMappedLanguage:: Found region %d", aRegion);
+ valid = ETrue;
+ }
+ else
+ {
+ INFO_1( "ValidRegionAndGetMappedLanguage:: Not Found region for lang %d", aLanguage);
+ }
+
+ return valid;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::GetIndividualSettingsFromCentRepL
+//
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::GetIndividualSettingsFromCentRepL( TInt& aRegion, TInt& aCollation )
+ {
+ FUNC_LOG;
+ CRepository* cenrep = CRepository::NewL( KCRUidCommonEngineKeys );
+ CleanupStack::PushL( cenrep );
+
+ //Get the last selected Region from central repository
+ User::LeaveIfError(cenrep->Get( KGSRegion, aRegion));
+
+ //Set the Region PS key which is used in Region SUP
+ User::LeaveIfError(RProperty::Set( KPSStarterUid, KSSMRegionPSKey, aRegion ));
+
+ //Get the last selected Collation from central repository
+ User::LeaveIfError(cenrep->Get( KGSCollation, aCollation));
+
+ //Set the Collation PS key which is used in Collation SUP
+ User::LeaveIfError(RProperty::Set( KPSStarterUid, KSSMCollationPSKey, aCollation ));
+
+ INFO_2( "Last selected region %d and collation %d", aRegion, aCollation );
+ CleanupStack::PopAndDestroy( cenrep );
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::ValidateAndUseDefaultLanguage
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::ValidateAndUseDefaultLanguage()
+ {
+ FUNC_LOG;
+ TLanguageRegion langRegion;
+
+ //Get the Region associated with default Language
+ TRAPD( error, langRegion = iLangRegionMappingHashSet.FindL( TLanguageRegion( iDefaultLanguage ) ) );
+ if( KErrNone == error )
+ {
+ //Load the settings for default Language
+ error = UseLocale( iDefaultLanguage, langRegion.iRegion, iDefaultLanguage );
+ ERROR_1( error, "Failed to load default language setting %d", error );
+ }
+ else
+ {
+ INFO_1( "Failed to find the Region associated with default Language %d", error );
+ }
+
+ if ( iClientStatus )
+ {
+ ERROR_1( error, "Language selection custom command completed with error %d", error );
+ User::RequestComplete( iClientStatus, error );
+ iClientStatus = NULL;
+ }
+
+ return error;
+ }
+
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::UseLocale
+//
+// ---------------------------------------------------------------------------
+//
+TInt CSsmLangSelCmd::UseLocale( const TInt aLang, const TInt aRegion, const TInt aCollation )
+ {
+ FUNC_LOG;
+ TInt errorCode(KErrNotFound);
+
+ //Load the given Language, Region and Collation DLLs
+ errorCode = SsmLanguageLoader::LoadLocale( aLang, aRegion, aCollation );
+
+ if( KErrNone != errorCode )
+ {
+ INFO_1( "Loading failed with error %d", errorCode);
+ }
+ else if ( iClientStatus )
+ {
+ User::RequestComplete( iClientStatus, errorCode );
+ iClientStatus = NULL;
+ }
+ return errorCode;
+ }
+
+// ---------------------------------------------------------------------------
// CSsmLangSelCmd::RunL
//
// ---------------------------------------------------------------------------
@@ -86,74 +640,41 @@
}
}
-
// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::DoCancel
+// CSsmLangSelCmd::UseLanguage
//
// ---------------------------------------------------------------------------
//
-void CSsmLangSelCmd::DoCancel()
- {
- FUNC_LOG;
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::Initialize
-// ---------------------------------------------------------------------------
-//
-TInt CSsmLangSelCmd::Initialize( CSsmCustomCommandEnv* aCmdEnv )
+void CSsmLangSelCmd::UseLanguage( const TInt aLang )
{
FUNC_LOG;
-
- iEnv = aCmdEnv;
- TRAPD( errorCode, InitializeL() );
- return errorCode;
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::Execute
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::Execute(
- const TDesC8& /*aParams*/,
- TRequestStatus& aRequest )
- {
- FUNC_LOG;
-
- ASSERT_TRACE( !iClientStatus );
- ASSERT_TRACE( !IsActive() );
- ASSERT_TRACE( iEnv );
+ TInt errorCode = KErrNotFound;
+ TInt region = KErrNotFound;
- aRequest = KRequestPending;
- iClientStatus = &aRequest;
-
-
- RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
- TInt errorCode = SysLangUtil::GetDefaultLanguage( iDefaultLanguage,
- fsSession );
- ERROR( errorCode, "Failed to get default language" );
-
- TInt lastSelectedLang = GetLastSelectedLang();
- // Revert to automatic selection if fetching last used language
- // fails, last used language is not valid (and obviously when last
- // selection is automatic).
- if ( lastSelectedLang == 0 )
+ //Validate and get associated Region
+ if( ValidateAndGetMappedRegion( aLang, region ) )
{
- PrepareNextList();
- }
- else if ( IsValid( lastSelectedLang ) )
- {
- UseLanguage( lastSelectedLang );
+ errorCode = SsmLanguageLoader::LoadLocale( aLang, region, aLang );
}
else
{
- UseLanguage( iDefaultLanguage );
- }
+ INFO_1( "Validation failed for the language (auto) %d", aLang );
+ }
+
+ if( KErrNone != errorCode )
+ {
+ INFO_1( "Loading the auto settings failed with error %d", errorCode );
+
+ //Use the default setting as the selected one failed
+ errorCode = ValidateAndUseDefaultLanguage();
+ }
+ else if ( iClientStatus )
+ {
+ User::RequestComplete( iClientStatus, errorCode );
+ iClientStatus = NULL;
+ }
}
-
// ---------------------------------------------------------------------------
// CSsmLangSelCmd::ExecuteCancel
// ---------------------------------------------------------------------------
@@ -165,6 +686,27 @@
Cancel();
}
+// ---------------------------------------------------------------------------
+// CSsmLangSelCmd::DoCancel
+//
+// ---------------------------------------------------------------------------
+//
+void CSsmLangSelCmd::DoCancel()
+ {
+ FUNC_LOG;
+
+ //Cancel the pending request with misc adaptation
+ if( EQueryListNone != iState )
+ {
+ iAdaptation.Cancel();
+ }
+
+ if ( iClientStatus )
+ {
+ User::RequestComplete( iClientStatus, KErrCancel );
+ iClientStatus = NULL;
+ }
+ }
// ---------------------------------------------------------------------------
// CSsmLangSelCmd::Close
@@ -175,7 +717,8 @@
FUNC_LOG;
delete iValidLanguages;
iValidLanguages = NULL;
-
+ iRegionsArray.Close();
+ iLangRegionMappingHashSet.Close();
iAdaptation.Close();
}
@@ -190,95 +733,6 @@
delete this;
}
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::CSsmLangSelCmd
-// ---------------------------------------------------------------------------
-//
-
-CSsmLangSelCmd::CSsmLangSelCmd()
- : CActive( EPriorityNormal )
- {
- FUNC_LOG;
-
- CActiveScheduler::Add( this );
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::ConstructL()
- {
- iMapperUtility = CSsmMapperUtility::NewL();
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::InitializeL
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::InitializeL()
- {
-
- FUNC_LOG;
- ASSERT_TRACE( iEnv );
-
- iValidLanguages = new ( ELeave ) CArrayFixFlat<TInt>(
- KLanguageListGranularity );
- RFs* fsSession = &( const_cast<RFs&>( iEnv->Rfs() ) );
- TInt errorCode = SysLangUtil::GetInstalledLanguages( iValidLanguages,
- fsSession );
-
- ERROR( errorCode, "Failed to get installed languages" );
- User::LeaveIfError( errorCode );
-
- errorCode = iAdaptation.Connect();
- ERROR( errorCode, "Failed to connect to RSsmMiscAdaptation" );
- User::LeaveIfError( errorCode );
- }
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::GetLastSelectedLang
-//
-// ---------------------------------------------------------------------------
-//
-TInt CSsmLangSelCmd::GetLastSelectedLang()
- {
- FUNC_LOG;
-
- TInt value( 0 );
- TInt errorCode = iMapperUtility->CrValue( KCRUidCommonEngineKeys,
- KGSDisplayTxtLang,
- value );
-
- ERROR( errorCode, "Failed read KGSDisplayTxtLang CenRep key" );
- INFO_1( "Last selected language = %d", value );
- return value;
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::IsValid
-//
-// ---------------------------------------------------------------------------
-//
-TBool CSsmLangSelCmd::IsValid( const TInt aLanguage ) const
- {
- FUNC_LOG;
- ASSERT_TRACE( iValidLanguages );
-
- TBool valid( EFalse );
- TKeyArrayFix keyProp( 0, ECmpTInt );
- TInt index( KErrNotFound );
- // Returns zero if element is found.
- if ( 0 == iValidLanguages->Find( aLanguage, keyProp, index ) )
- {
- valid = ETrue;
- }
- return valid;
- }
-
// ---------------------------------------------------------------------------
// CSsmLangSelCmd::PrepareNextList
@@ -329,7 +783,6 @@
}
}
-
// ---------------------------------------------------------------------------
// CSsmLangSelCmd::InterpretResult
//
@@ -437,7 +890,6 @@
}
}
-
// ---------------------------------------------------------------------------
// CSsmLangSelCmd::StoreLanguageToCentRep
//
@@ -459,49 +911,3 @@
delete cenrep;
}
}
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::GetLanguageFromCentRep
-//
-// ---------------------------------------------------------------------------
-//
-TInt CSsmLangSelCmd::GetLanguageFromCentRep()
- {
- FUNC_LOG;
-
- TInt lang = iDefaultLanguage;
- TInt errorCode = iMapperUtility->CrValue( KCRUidSysLangUtil,
- KSysLangUtilSimLanguage,
- lang );
-
- ERROR_1( errorCode, "Failed to read language code from CenRep %d",
- errorCode );
- return lang;
- }
-
-
-// ---------------------------------------------------------------------------
-// CSsmLangSelCmd::UseLanguage
-//
-// ---------------------------------------------------------------------------
-//
-void CSsmLangSelCmd::UseLanguage( const TInt aLang )
- {
- FUNC_LOG;
-
- TInt errorCode = aLang;
- if ( aLang > KErrNone )
- {
- errorCode = SsmLanguageLoader::LoadLanguage( aLang );
- ERROR( errorCode, "Failed to load language" );
- }
-
- ERROR( errorCode, "Language selection failed" );
-
- if ( iClientStatus )
- {
- User::RequestComplete( iClientStatus, errorCode );
- }
- }
-
--- a/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlanguageloader.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/syslangutil/ssmlangselcmd/src/ssmlanguageloader.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -20,39 +20,11 @@
#include <hal.h>
#include "ssmlanguageloader.h"
+#include "ssmcommonlocale.h"
#include "trace.h"
-_LIT( KLocaleDllNameBase, "ELOCL" );
-_LIT( KLocaleDllExtensionFormat, ".%u" );
-_LIT( KLocaleDllExtensionPadding, "0" );
-_LIT( KDefaultLocaleDllNameExtension, ".LOC" );
-const TInt KMaxLocaleDllNameLength = 16;
-const TInt KMaxLocaleDllExtensionLength = 6;
-const TInt KMinLocaleDllExtensionLength = 3;
-const TInt KLocaleDllExtensionPaddingPosition = 1;
-
// ======== MEMBER FUNCTIONS ========
-// ---------------------------------------------------------------------------
-// SsmLanguageLoader::LoadLanguage
-//
-// ---------------------------------------------------------------------------
-//
-TInt SsmLanguageLoader::LoadLanguage( const TInt aLanguage )
- {
- FUNC_LOG;
- INFO_1( "Loading language %d", aLanguage );
-
- TInt errorCode = StoreLanguageToHal( aLanguage );
- ERROR( errorCode, "Failed to store language code to HAL" );
-
- errorCode = LoadLocaleDll( aLanguage );
- ERROR( errorCode, "Failed to load locale DLL" );
-
- return errorCode;
- }
-
-
// -----------------------------------------------------------------------------
// SsmLanguageLoader::StoreLanguageToHal
//
@@ -67,70 +39,96 @@
}
-// -----------------------------------------------------------------------------
-// SsmLanguageLoader::LoadLocaleDll
+// ---------------------------------------------------------------------------
+// SsmLanguageLoader::LoadLocale
//
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
//
-TInt SsmLanguageLoader::LoadLocaleDll( const TInt aLanguage )
+TInt SsmLanguageLoader::LoadLocale( const TInt aLanguage, const TInt aRegion, const TInt aCollation)
{
FUNC_LOG;
- // Dot plus five digit locale
- TBuf<KMaxLocaleDllExtensionLength> extension;
- extension.Format( KLocaleDllExtensionFormat, aLanguage );
-
- // Padd ".1" to ".01" for compatibility.
- if ( extension.Length() < KMinLocaleDllExtensionLength )
+ TInt errorCode = StoreLanguageToHal( aLanguage );
+ ERROR( errorCode, "Failed to store language code to HAL" );
+
+ //Format the language dll to be loaded
+ //Dot plus four to six digit locale
+ TBuf<KMaxDllExtensionLength> extension;
+ extension.Format( KDllExtensionFormat, aLanguage );
+
+ //Padd with zero to make the file extension length to be minimum of four
+ for( ; extension.Length() < KMinDllExtensionLength ;)
{
- extension.Insert( KLocaleDllExtensionPaddingPosition,
- KLocaleDllExtensionPadding );
- }
-
- TBuf<KMaxLocaleDllNameLength> localeDllName;
- localeDllName = KLocaleDllNameBase;
- localeDllName.Append( extension );
-
- INFO_1( "Loading DLL named '%S'", &localeDllName );
-
- TInt errorCode = ChangeLocale( localeDllName );
-
- if ( errorCode == KErrNotFound ) // Try default locale
- {
- INFO( "SsmLanguageLoader: Loading default locale" );
-
- localeDllName = KLocaleDllNameBase;
- localeDllName.Append( KDefaultLocaleDllNameExtension );
-
- errorCode = ChangeLocale( localeDllName );
+ extension.Insert( KDllExtensionPaddingPosition, KDllExtensionPadding );
}
+ TBuf<KMaxDllNameLength> languageDllName( KLanguageDllNameBase );
+ languageDllName.Append( extension );
+ INFO_1( "Loading language DLL named '%S'", &languageDllName );
+
+ //Format the region dll to be loaded
+ //Dot plus four to six digit locale
+ extension.Zero();
+ extension.Format( KDllExtensionFormat, aRegion );
+
+ //Padd with zero to make the file extension length to be minimum of four
+ for( ; extension.Length() < KMinDllExtensionLength ;)
+ {
+ extension.Insert( KDllExtensionPaddingPosition, KDllExtensionPadding );
+ }
+
+ TBuf<KMaxDllNameLength> regionDllName( KRegionDllNameBase );
+ regionDllName.Append( extension );
+ INFO_1( "Loading Region DLL named '%S'", ®ionDllName );
+
+
+ //Format the collation file to be loaded
+ //Dot plus four to six digit locale
+ extension.Zero();
+ extension.Format( KDllExtensionFormat, aCollation );
+
+ //Padd with zero to make the file extension length to be minimum of four
+ for( ; extension.Length() < KMinDllExtensionLength ;)
+ {
+ extension.Insert( KDllExtensionPaddingPosition, KDllExtensionPadding );
+ }
+
+ TBuf<KMaxDllNameLength> collationDllName( KCollationDllNameBase );
+ collationDllName.Append( extension );
+ INFO_1( "Loading Collation DLL named '%S'", &collationDllName );
+
+ //Load the given Language, Region and Collation dlls
+ errorCode = ChangeLocale( languageDllName, regionDllName, collationDllName );
if ( errorCode == KErrNone )
{
TLocale().Set();
}
-
return errorCode;
}
-
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
// SsmLanguageLoader::ChangeLocale
//
-// -----------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
//
-TInt SsmLanguageLoader::ChangeLocale( const TDesC& aLocaleDllName )
+TInt SsmLanguageLoader::ChangeLocale( const TDesC& aLanguageDllName, const TDesC& aRegionDllName, const TDesC& aCollationDllName )
{
FUNC_LOG;
+ TExtendedLocale extLocale;
- TExtendedLocale extLocale;
- TInt errorCode = extLocale.LoadLocale( aLocaleDllName );
- ERROR( errorCode, "Failed to load locale" );
-
+ INFO_3( "Loading Language dll '%S', Region dll '%S' and Collation dll '%S'",
+ &aLanguageDllName, &aRegionDllName, &aCollationDllName );
+ TInt errorCode = extLocale.LoadLocale( aLanguageDllName, aRegionDllName, aCollationDllName);
if ( errorCode == KErrNone )
{
+ //Save the loaded locale settings
errorCode = extLocale.SaveSystemSettings();
- ERROR( errorCode, "Failed to set locale" );
+ ERROR( errorCode, "Failed to save locale settings" );
+ }
+ else
+ {
+ INFO_3( "Failed to load Language dll '%S', Region dll '%S' and Collation dll '%S'",
+ &aLanguageDllName, &aRegionDllName, &aCollationDllName );
}
return errorCode;
Binary file sysstatemgmt/systemstarter/documentation/9.5/SSA HowTo Diagrams.ppt has changed
--- a/sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstarter/group/app-framework_sysstart.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component app-framework_sysstart
source \sf\os\devicesrv\sysstatemgmt\systemstarter
binary \sf\os\devicesrv\sysstatemgmt\systemstarter\group all
--- a/sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstarter/test/testappgood/testappgood_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="testappgood";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstarter/test/tsysstart/inc/appfwk_sysstart_test_dll.rh Thu Jun 24 11:22:10 2010 +0100
@@ -41,5 +41,3 @@
WORD arg2 = 22;
WORD arg3 = 23;
}
-
-
\ No newline at end of file
--- a/sysstatemgmt/systemstatemgr/cle/src/cmdlistexecutor.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/cle/src/cmdlistexecutor.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -198,6 +198,7 @@
if (iCommandList)
{
iCommandList->DeferredDelete();
+ iCommandList = NULL;
}
}
--- a/sysstatemgmt/systemstatemgr/cmd/inc/ssmcommandlistresourcereaderimpl.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/cmd/inc/ssmcommandlistresourcereaderimpl.h Thu Jun 24 11:22:10 2010 +0100
@@ -55,7 +55,8 @@
EInitialiseNextStep,
EInitialiseSysDriveStep,
EPrepareFirstStep,
- EPrepareNextStep
+ EPrepareNextStep,
+ EInitialiseExtFolderStep
};
NONSHARABLE_CLASS(TMapping)
@@ -118,6 +119,9 @@
void DoInitialiseNextStepL();
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
void DoInitialiseSysDriveStepL();
+#ifdef __WINS__
+ void DoInitialiseExtFolderStepL();
+#endif
#endif
CResourceFile* OpenResourceFileL(const TDesC& aFileName);
void ParseFileL(CResourceFile* aResourceFile);
@@ -135,6 +139,12 @@
RBuf iSystemDrivePath;
CDir* iRssFileEntriesInSysDrive;
TInt iSysDriveEntryIndex;
+#ifdef __WINS__
+ CDir* iExtendedResourceFileEntries;
+ RBuf iExtendedPath;
+ TInt iExtendedEntryIndex;
+#endif //__WINS__
+
#endif //SYMBIAN_SSM_FLEXIBLE_MERGE
};
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandfactory.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandfactory.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -333,7 +333,7 @@
{
CSsmCommandBase* cmd = NULL;
TSsmCommandType const cmdType = aSsmCommand.Type();
- DEBUGPRINT2A("Adding command type in CLE commandlist: %d", cmdType);
+ DEBUGPRINT2A("Adding command type in CLE commandlist: %d", cmdType);
switch(cmdType)
{
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistimpl.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -237,8 +237,6 @@
//@panic ECmdNullPtr if the information used to create command is null
void CSsmCommandListImpl::Execute( const TInt aIndex, TRequestStatus& aStatus )
{
- DEBUGPRINT2A("CSsmCommandListImpl::Execute - List Count() = %d", Count());
-
__ASSERT_DEBUG( __IN_RANGE(aIndex, iCmdList.Count()), PanicNow(KPanicCmdList, ECmdListBadIdx));
__ASSERT_DEBUG( iCmdList[ aIndex ], PanicNow(KPanicCmdList, ECmdNullPtr));
@@ -333,9 +331,9 @@
SSMLOGLEAVE(KErrArgument);
}
- const TSsmCommandType cmdType = aCmd->Type();
+ const TSsmCommandType cmdType = aCmd->Type();
DEBUGPRINT2A("Adding command type: %d", cmdType);
-
+
if (ESsmCmdPublishSystemState == cmdType)
{
++iPublishSysStateCmdCount;
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereader.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereader.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -19,6 +19,7 @@
#include "ssmpanic.h"
#include "ssmcommandlistresourcereaderimpl.h"
#include "ssmcommandlistimpl.h"
+#include "ssmdebug.h"
/**
Constructs a new command list resource reader object.
@@ -207,6 +208,7 @@
EXPORT_C CSsmCommandList* CSsmCommandListResourceReader::GetCommandList()
{
__ASSERT_DEBUG(iImpl->IsCommandListReady(), PanicNow(KPanicCmdResourceReader, ENoPreparedCommandList));
+ DEBUGPRINT2A("CSsmCommandListResourceReader::GetCommandList - List Count() = %d", iCommandList->Count());
CSsmCommandList* const commandList = iCommandList;
iCommandList = NULL; // return ownership of command list to the caller
return commandList;
--- a/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/cmd/src/ssmcommandlistresourcereaderimpl.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -29,7 +29,25 @@
#include "ssmpanic.h"
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
#include "ssmcommandlistimpl.h"
-#endif
+#ifdef __WINS__
+#include <u32hal.h>
+
+//Literal to be appended with the main folder path to get the extended folder path
+_LIT(KExtendedCommandListPath, "_ext\\");
+
+//Used for checking the presence of keyword for using extended folder in epoc.ini
+static TBool IsExtendedFolderDisabled()
+ {
+ TBool isMinimalBootDisable = EFalse;
+
+ //If the keyword "MINIMALSTART" is found in epoc.ini then only commands from main folder are
+ //executed else commands from both main and extended folder are executed.
+ UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalBoolProperty, (TAny*)"MINIMALSTART", &isMinimalBootDisable);
+ return isMinimalBootDisable;
+ }
+#endif // __WINS__
+#endif //SYMBIAN_SSM_FLEXIBLE_MERGE
+
CSsmCommandListResourceReaderImpl* CSsmCommandListResourceReaderImpl::NewL(RFs& aFs, const TDesC& aCommandListPath, MSsmConditionalCallback& aConditionalCallback)
{
@@ -180,7 +198,7 @@
break;
}
}
- DEBUGPRINT3(_L("Mapping Array for substate %d Contains %d entries"), iMappings[mappingIndex].iCommandListId, aMappingArray.Count());
+ DEBUGPRINT3(_L("Mapping Array for substate %04x Contains %d entries"), iMappings[mappingIndex].iCommandListId, aMappingArray.Count());
}
#else
@@ -276,6 +294,9 @@
CSsmCommandListResourceReaderImpl::CInitialiser::CInitialiser(RFs& aFs, CResourcePool& aResourcePool)
:CActiveBase(EPriorityStandard), iFs(aFs), iResourcePool(aResourcePool)
+#if defined(SYMBIAN_SSM_FLEXIBLE_MERGE) && defined(__WINS__)
+ , iExtendedEntryIndex(0)
+#endif //SYMBIAN_SSM_FLEXIBLE_MERGE && __WINS__
{
CActiveScheduler::Add(this);
}
@@ -287,6 +308,10 @@
iPath.Close();
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
iSystemDrivePath.Close();
+#ifdef __WINS__
+ iExtendedPath.Close();
+#endif //__WINS__
+
#endif
}
@@ -300,6 +325,10 @@
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
delete iRssFileEntriesInSysDrive;
iRssFileEntriesInSysDrive = NULL;
+#ifdef __WINS__
+ delete iExtendedResourceFileEntries;
+ iExtendedResourceFileEntries = NULL;
+#endif //__WINS__
#endif
}
@@ -351,7 +380,12 @@
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
case EInitialiseSysDriveStep:
DoInitialiseSysDriveStepL();
- break;
+ break;
+#ifdef __WINS__
+ case EInitialiseExtFolderStep:
+ DoInitialiseExtFolderStepL();
+ break;
+#endif //__WINS__
#endif
default:
PanicNow(KPanicCmdResourceReader, EInvalidRunLAction);
@@ -404,6 +438,24 @@
iEntryIndex = iResourceFileEntries->Count();
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
+#ifdef __WINS__
+ if(!IsExtendedFolderDisabled())
+ {
+ TFileName extPath(iPath);
+ extPath.Replace(iPath.Length() - 1, 1, KExtendedCommandListPath);
+ iExtendedPath.CreateL(extPath);
+ DEBUGPRINT2(_L("Extended list path is %S"), &extPath);
+
+ extPath.Append(KStar);
+ const TInt extErr = (iFs.GetDir(extPath, TUidType(KUidResourceFile, TUid::Uid(KUidSsmCommandListResourceFile)), ESortNone, iExtendedResourceFileEntries));
+ if (KErrNone == extErr)
+ {
+ iExtendedEntryIndex = iExtendedResourceFileEntries->Count();
+ DEBUGPRINT2(_L("Number of resource files in extended folder : %d"), iExtendedEntryIndex);
+ }
+ }
+#endif //__WINS__
+
DEBUGPRINT2(_L("Number of resource files in ROM Drive : %d"),iEntryIndex );
// Now, get list of command list resource filenames from system drive too
TFileName sysPath(iSystemDrivePath);
@@ -471,16 +523,44 @@
}
else
{
- // initialisation complete
- iAction = EIdle;
- delete iRssFileEntriesInSysDrive;
- iRssFileEntriesInSysDrive = NULL;
+ iAction = EIdle;
+ delete iRssFileEntriesInSysDrive;
+ iRssFileEntriesInSysDrive = NULL;
+
+#ifdef __WINS__
+ if(!IsExtendedFolderDisabled())
+ {
+ //Initialise the command list from extended list only if it is enabled
+ iAction = EInitialiseExtFolderStep;
+ }
+#endif //__WINS__
}
}
-#endif
+
+#ifdef __WINS__
+void CSsmCommandListResourceReaderImpl::CInitialiser::DoInitialiseExtFolderStepL()
+ {
+ //Append the file names from the extended folder only if it is enabled
+ if (iExtendedEntryIndex--)
+ {
+ TFileName filename(iExtendedPath);
+ filename.Append((*iExtendedResourceFileEntries)[iExtendedEntryIndex].iName);
+ CResourceFile* const resourceFile = OpenResourceFileL(filename);
+ ParseFileL(resourceFile);
+ }
+ else
+ {
+ // initialisation complete
+ iAction = EIdle;
+ delete iExtendedResourceFileEntries;
+ iExtendedResourceFileEntries = NULL;
+ }
+ }
+#endif //__WINS__
+#endif //SYMBIAN_SSM_FLEXIBLE_MERGE
+
CResourceFile* CSsmCommandListResourceReaderImpl::CInitialiser::OpenResourceFileL(const TDesC& aFileName)
{
-
// open the resource file
RFile file;
CleanupClosePushL(file);
@@ -721,6 +801,12 @@
inProgress = EFalse;
break;
}
+ else if((iCommandIndexInRssFile[iCurrentCommandListInMapping] == 0))
+ {
+ //The current commandlist is empty
+ //go to the next commandlist in the mapping.
+ continue;
+ }
else
{
//open the next resource id and read the commands
@@ -733,7 +819,6 @@
iListReader.AdvanceL(sizeof(TUint16));
}
}
- DEBUGPRINT2A("The value of RssFile's current command is %d ", iCommandIndexInRssFile[iCurrentCommandListInMapping]);
#else
while(iCommandIndex && iBatchIndex--)
{
@@ -741,7 +826,6 @@
#endif
// open command resource
const TInt commandResourceId = iListReader.ReadInt32L();
- DEBUGPRINT2A("Reading command resource id %x", commandResourceId);
RResourceReader commandReader;
#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
commandReader.OpenLC(iMappingArray[iCurrentCommandListInMapping].iResourceFile, commandResourceId);
--- a/sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/group/app-framework_ssma.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component app-framework_ssma
source \sf\os\devicesrv\sysstatemgmt\systemstatemgr
binary \sf\os\devicesrv\sysstatemgmt\systemstatemgr\group all
--- a/sysstatemgmt/systemstatemgr/inc/ssmadaptationcli.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/inc/ssmadaptationcli.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -36,8 +36,12 @@
public:
IMPORT_C TInt Connect();
IMPORT_C TInt Connect(TInt aAsyncMessageSlotCount);
+ //Used by testcode only
+#ifdef TEST_SSM_SERVER
+ TInt Connect(const TDesC& aServerName);
+#endif //TEST_SSM_SERVER
private:
- TInt DoConnect(TInt aAsyncMessageSlotCount);
+ TInt DoConnect(const TDesC& aServerName, TInt aAsyncMessageSlotCount);
TVersion Version() const;
};
--- a/sysstatemgmt/systemstatemgr/ssm/group/ssmserver.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/ssm/group/ssmserver.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -59,6 +59,7 @@
LIBRARY estor.lib //used by ssmclecli.lib
LIBRARY ssmcmd.lib //used by ssmclecli.lib
LIBRARY ssmcmn.lib
+LIBRARY ssmuiproviderdll.lib
STATICLIBRARY ssmclecli.lib
STATICLIBRARY ssmclesrv.lib //used by ssmclecli.lib
--- a/sysstatemgmt/systemstatemgr/ssm/inc/ssmserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/ssm/inc/ssmserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -25,6 +25,7 @@
class CSsmSwpRequestHandler;
class CSsmSwpPolicyResolver;
class CCleSessionProxy;
+class CSsmUiSpecific;
/**
Implements the API used to request changes to the
@@ -78,6 +79,7 @@
CSsmSwpRequestHandler* iSwpRequestHandler;
CSsmSwpPolicyResolver* iSwpResolver;
CCleSessionProxy* iSwpCleSession;
+ CSsmUiSpecific* iSsmUiSpecific;
};
#endif
--- a/sysstatemgmt/systemstatemgr/ssm/src/ssmserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/ssm/src/ssmserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -16,6 +16,7 @@
#include <ssm/ssmstates.hrh>
#include <ssm/ssmstatetransition.h>
#include <ssm/ssmstatepolicy.h>
+#include <ssm/ssmuiproviderdll.h>
#include "ssmserverpanic.h"
#include "ssmserver.h"
@@ -29,6 +30,7 @@
#include "ssmstatepolicyframe.h"
#include "ssmswppolicyresolver.h"
#include "ssmswprequesthandler.h"
+#include "ssmdebug.h"
// ------------------- Policy Server Security Setup ----------------------
@@ -86,7 +88,11 @@
{
iSwpCleSession->ReleaseCle();
}
-
+
+ if(iSsmUiSpecific)
+ {
+ iSsmUiSpecific->Release();
+ }
} //lint !e529 not subsequently referenced
/**
@@ -134,6 +140,10 @@
__ASSERT_ALWAYS( KErrNone == User::SetCritical(User::ESystemCritical), PanicNow(KPanicSysStateMgr,ESsmServerError1));
__ASSERT_ALWAYS( KErrNone == User::RenameThread(KSsmServerName), PanicNow(KPanicSysStateMgr,ESsmServerError2));
+ iSsmUiSpecific = CSsmUiSpecific::InstanceL();
+ //Reserve memory for critical operation especially when phone memory will be full
+ TInt err = iSsmUiSpecific->ReservePhoneMemorySpace();
+ DEBUGPRINT2(_L("CSsmUiSpecific::ReservePhoneMemorySpace returned with = %d"), err);
// --- Instantiate the "System State" handling classes ---
// Create a state policy resolver and load the initial policy
CSsmStatePolicyResolver* stateResolver = CSsmStatePolicyResolver::NewLC();
--- a/sysstatemgmt/systemstatemgr/sus/inc/ssmadaptationcmn.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/inc/ssmadaptationcmn.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -30,13 +30,11 @@
TInt Int0() const;
void ReadL(TInt aParamNumber,TPtr8 aParam);
TInt GetDesLength(TInt aParam);
+ void SetMessage(const RMessage2& aMessage);
private:
RMessage2 iMessage;
- TBool iMessageAvailable;
public :
- TSusAdaptionServerRequests iRequestType;
- //To know whether the object is created using reserved heap or not.
- TBool iUsingReservedHeap;
+ TSusAdaptionServerRequests iRequestType;
};
class RSsmAdaptationRequestQueue
@@ -48,14 +46,11 @@
void RemoveFromQueueAndComplete(const RMessage2 &aMessage);
TInt Queue(CAdaptationMessage *aPendingRequest);
void NotifyAndRemoveAll();
- void RemoveFromQueueAndComplete(const RMessage2 &aMessage, RHeap *aReservedHeap);
- void NotifyAndRemoveAll(RHeap *aReservedHeap);
- TInt Reserve(TInt aReserverCount);
- TInt Count();
-
+ TInt Count();
private:
RPointerArray<CAdaptationMessage > iQueue;
};
+
#endif __SSMADAPTATIONCMN_H__
--- a/sysstatemgmt/systemstatemgr/sus/inc/susadaptionserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/inc/susadaptionserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -37,6 +37,8 @@
{
public:
static CSsmAdaptationServer* NewLC();
+ static CSsmAdaptationServer* NewLC(const TDesC& aServerName);
+
~CSsmAdaptationServer();
//State Adaptation services
@@ -73,7 +75,7 @@
void DoDeactivateRfForEmergencyCallL(const RMessage2& aMessage);
void DoEmergencyCallRfCancelL(const RMessage2& aMessage);
TInt SetAsPriorityClientL(CSsmAdaptationSession* aSession);
- void RemovePriorityClient(CSsmAdaptationSession* aSession);
+ void RemovePriorityClient(CSsmAdaptationSession* aSession);
#ifdef _DEBUG
void UnloadAdaptationsAndObservers();
#endif
@@ -86,7 +88,7 @@
//From Policy Server
CPolicyServer::TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
CSsmAdaptationServer();
- void ConstructL();
+ void ConstructL(const TDesC& aServerName);
//from CServer2
CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
void LoadStateAdaptationL();
--- a/sysstatemgmt/systemstatemgr/sus/inc/susemergencycallrfadaptation.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/inc/susemergencycallrfadaptation.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -37,12 +37,11 @@
@internalComponent
*/
-
-
+class CEmergencyAdaptationMessage;
class CEmergencyCallRfAdaptation : public CActive
{
public:
- static CEmergencyCallRfAdaptation* NewL(MEmergencyCallRfAdaptation& aAdaptation);
+ static CEmergencyCallRfAdaptation* NewL(MEmergencyCallRfAdaptation* aAdaptation);
~CEmergencyCallRfAdaptation();
void Release();
@@ -52,38 +51,71 @@
void SetPriorityClientSession(CSsmAdaptationSession* aPriorityClientSession);
void RemovePriorityClientSession();
void ReserveMemoryL();
+ void DeleteAdaptationMessage();
+ void NotifyAndRemoveAll();
+ void Dequeue(CEmergencyAdaptationMessage *&aCurrentMessage);
protected:
void RunL();
TInt RunError( TInt aError );
void DoCancel();
+ void ConstructL(MEmergencyCallRfAdaptation* aAdaptation);
private:
- CEmergencyCallRfAdaptation(MEmergencyCallRfAdaptation& aAdaptation);
+ CEmergencyCallRfAdaptation();
void SubmitOrQueueL(const RMessage2 &aMessage);
- void Submit(CAdaptationMessage*& aMessage);
+ void Submit(CEmergencyAdaptationMessage*& aMessage);
private:
- CAdaptationMessage *iCurrentMessage;
- RSsmAdaptationRequestQueue iPendingRequestsQueue;
+ CEmergencyAdaptationMessage *iCurrentMessage;
+ RPointerArray<CEmergencyAdaptationMessage>iPendingEmergencyRequestsQueue;
- MEmergencyCallRfAdaptation& iEmergencyCallRfAdaptation;
- //Reserving Heap to create CAdaptationMessage in OOM condition for priority clients
- RHeap* iReservedHeap;
+ MEmergencyCallRfAdaptation* iEmergencyCallRfAdaptation;
//For storing PriorityClientsession
CSsmAdaptationSession* iPriorityClientSession;
+
+ //Count of unused reserved pointers.
+ TInt iReserveMsgCount;
+ //Pointer Array to store reserved adaptation message pointers
+ RPointerArray<CEmergencyAdaptationMessage> iAdaptationReservedMessageArray;
};
+enum TMessageStatus
+ {
+ EMsgStatusNULL = 0, //Default status of Message is 0
+ EMsgReserved = 1, //Flag to indicate the message is using Reserved memory.
+ EMsgInUse = 2 //Flag to indicate the Reserved message is Used.
+ };
/**
- * Used for pushing the CAdaptationMessage object in to cleanup stack. This is needed as
- * the message is created using the reserved heap should be freed back to reserved heap
- * instead of deleting.
- * @internalComponent
+ * Class to hold CAdaptationMessage pointer and the value to know whether the current message is from reserved pool
+ * or normal message.
*/
-struct TStoreAdaptationMessage
+class CEmergencyAdaptationMessage : public CBase
{
+public:
+ static CEmergencyAdaptationMessage* NewL(const RMessage2& aMessage);
+ static CEmergencyAdaptationMessage* NewL(const RMessage2& aMessage, const TInt8 aMessageStatus);
+
+ ~CEmergencyAdaptationMessage();
+
+ inline void UnsetMessageStatus(const TInt8 aMessageStatus);
+ inline void SetMessageStatus(const TInt8 aMessageStatus);
+ inline TBool IsMessageReserved() const;
+ inline TBool IsMessageInuse() const;
+ void SetMessage(const RMessage2& aMessage);
+ TInt Function() const;
+ CSession2 *Session() const;
+ void Complete(TInt aReason);
+
+protected:
+ void ConstructL(const RMessage2& aMessage);
+
+private:
+ CEmergencyAdaptationMessage(const TInt8 aMessageStatus);
+
+private:
CAdaptationMessage* iAdaptationMessage;
- RHeap* iReservedHeap;
+ // To know the Adaptation Message status.
+ TInt8 iMessageStatus;
};
-
#endif // __SUSEMERGENCYCALLRFADAPTATION_H__
--- a/sysstatemgmt/systemstatemgr/sus/inc/suspanic.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/inc/suspanic.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -36,7 +36,12 @@
//CSusAdaptionServer errors
EAdaptionServerError1,
EAdaptionServerError2,
- ELibraryAlreadyOpen
+ ELibraryAlreadyOpen,
+
+ //Emergency Adaptation panic codes
+ EEmergencyCallRfAdaptationNullPtrError1,
+ EEmergencyCallRfAdaptationNullPtrError2,
+ EEmergencyAdaptationMessageNullPtrError
};
#endif // __SUSPANICCODES_H__
--- a/sysstatemgmt/systemstatemgr/sus/src/ssmadaptationcli.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/src/ssmadaptationcli.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -33,8 +33,7 @@
*/
EXPORT_C TInt RSsmAdaptationBase::Connect()
{
- const TInt err = DoConnect(KAsyncMessageSlots);
- return err;
+ return Connect(KAsyncMessageSlots);
}
/**
@@ -52,15 +51,30 @@
*/
EXPORT_C TInt RSsmAdaptationBase::Connect(TInt aAsyncMessageSlotCount)
{
- const TInt err = DoConnect(aAsyncMessageSlotCount);
+ const TInt err = DoConnect(KSusAdaptionServerName, aAsyncMessageSlotCount);
return err;
- }
+ }
+
+/**
+ * This exists for testing purposes only
+ * @internalComponent
+ */
+#ifdef TEST_SSM_SERVER
-TInt RSsmAdaptationBase::DoConnect(TInt aAsyncMessageSlotCount)
+TInt RSsmAdaptationBase::Connect(const TDesC& aServerName)
+ {
+ return DoConnect(aServerName, KAsyncMessageSlots);
+ }
+#endif //TEST_SSM_SERVER
+
+/**
+ @internalComponent
+ */
+TInt RSsmAdaptationBase::DoConnect(const TDesC& aServerName, const TInt aAsyncMessageSlotCount)
{
if(!Handle())
{
- return CreateSession(KSusAdaptionServerName, Version(), aAsyncMessageSlotCount);
+ return CreateSession(aServerName, Version(), aAsyncMessageSlotCount);
}
return KErrAlreadyExists;
--- a/sysstatemgmt/systemstatemgr/sus/src/susadaptionserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/src/susadaptionserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -59,8 +59,8 @@
};
//ESetAsPriorityClient request is allowed only for priotity clients(Telephony). Inorder to prevent the access
-//client request will be policed using C32 SID
-#define KC32SecureId 0x10003D33
+//client request will be policed using C32exe.exe SID
+#define KC32SecureId 0x101F7989
/**
Array containing the different security checks performed by this server
@@ -168,8 +168,7 @@
}
-CSsmAdaptationServer::CSsmAdaptationServer( ): CPolicyServer(EPriorityStandard, KSusAdaptionServerPolicy)
-,iPriorityClientSession(NULL)
+CSsmAdaptationServer::CSsmAdaptationServer(): CPolicyServer(EPriorityStandard, KSusAdaptionServerPolicy)
{
}
@@ -207,15 +206,26 @@
*/
CSsmAdaptationServer* CSsmAdaptationServer::NewLC( )
{
- CSsmAdaptationServer* server = new(ELeave) CSsmAdaptationServer();
- CleanupStack::PushL (server );
- server->ConstructL ( );
- return server;
+ return CSsmAdaptationServer::NewLC(KSusAdaptionServerName);
}
/**
+ * Overloaded NewLC, which starts the server with the provided name.
+ @param aServerName - Name of the Server.
*/
-void CSsmAdaptationServer::ConstructL( )
+CSsmAdaptationServer* CSsmAdaptationServer::NewLC(const TDesC& aServerName)
+ {
+ CSsmAdaptationServer* server = new(ELeave) CSsmAdaptationServer();
+ CleanupStack::PushL(server);
+ server->ConstructL(aServerName);
+ return server;
+ }
+
+
+/**
+ * ConstructL()
+ */
+void CSsmAdaptationServer::ConstructL(const TDesC& aServerName)
{
__ASSERT_ALWAYS( KErrNone == User::SetCritical(User::ESystemCritical),
@@ -225,7 +235,7 @@
User::Panic(KPanicSsmSus, EAdaptionServerError2));
iSusAdaptationPluginLoader = CSusAdaptationPluginLoader::NewL();
- TInt err = Start(KSusAdaptionServerName);
+ TInt err = Start(aServerName);
#ifdef TESTSUSADAPTATIONPLUGINLOAD_OOM
if (err != KErrNone && err != KErrAlreadyExists)
{
@@ -501,12 +511,8 @@
{
LoadEmergencyCallRfAdaptationL();
}
-
iEmergencyCallRfAdaptation->DoEmergencyCallRfAdaptationCancelL(aMessage);
}
-
-
-
void CSsmAdaptationServer::LoadStateAdaptationL()
{
@@ -564,11 +570,9 @@
{
MEmergencyCallRfAdaptation *emergencyCallRfAdaptationPlugin = iSusAdaptationPluginLoader->CreateEmergencyCallRfAdaptationL();
CleanupReleasePushL(*emergencyCallRfAdaptationPlugin);
- //From here emergencyCallRfAdaptationPlugin object will be owned by iEmergencyCallRfAdaptation
- iEmergencyCallRfAdaptation = CEmergencyCallRfAdaptation::NewL(*emergencyCallRfAdaptationPlugin);
+ //From here emergencyCallRfAdaptationPlugin object will be owned by iEmergencyCallRfAdaptation
+ iEmergencyCallRfAdaptation = CEmergencyCallRfAdaptation::NewL(emergencyCallRfAdaptationPlugin);
CleanupStack::Pop(emergencyCallRfAdaptationPlugin);
- //Reserve memory for performing Emergency call during OOM condition
- iEmergencyCallRfAdaptation->ReserveMemoryL();
}
#ifdef _DEBUG
@@ -656,15 +660,21 @@
}
CAdaptationMessage::CAdaptationMessage(const RMessage2 &aMessage): CBase(),iMessage(aMessage)
-,iMessageAvailable(ETrue),iUsingReservedHeap(EFalse)
{
}
void CAdaptationMessage::Complete(TInt aReason)
{
- iMessage.Complete(aReason);
+ if (!(iMessage.IsNull()))
+ {
+ iMessage.Complete(aReason);
+ }
}
+void CAdaptationMessage::SetMessage(const RMessage2& aMessage)
+ {
+ iMessage = const_cast<RMessage2&> (aMessage);
+ }
void RSsmAdaptationRequestQueue::NotifyAndRemoveAll()
{
@@ -679,26 +689,6 @@
iQueue.Reset();
}
-void RSsmAdaptationRequestQueue::NotifyAndRemoveAll(RHeap *aReservedHeap)
- {
- TInt index,count = iQueue.Count();
-
- for(index =0;index < count ;index++)
- {
- iQueue[index]->Complete(KErrServerTerminated);
- if(iQueue[index]->iUsingReservedHeap)
- {
- aReservedHeap->Free(iQueue[index]);
- }
- else
- {
- delete iQueue[index];
- }
- iQueue[index] = NULL;
- }
- iQueue.Reset();
- }
-
void RSsmAdaptationRequestQueue::Close()
{
iQueue.Close();
@@ -736,33 +726,6 @@
}
-void RSsmAdaptationRequestQueue::RemoveFromQueueAndComplete(const RMessage2 &aMessage, RHeap *aReservedHeap )
- {
-
- CAdaptationMessage *messageToBeDeleted;
-
- // iQueue.Count() is recalculated each time as the object is removed from the
- // array(which reduces the number of object pointers in the array
- for(TInt index = 0; index < iQueue.Count(); ++index )
- {
- if(aMessage.Session() == iQueue[index]->Session())
- {
- messageToBeDeleted = iQueue[index];
- DEBUGPRINT2A("RSsmAdaptationRequestQueue(aMessage,ReservedHeap)called to cancel the request with function id: %d", messageToBeDeleted->Function());
- iQueue.Remove(index);
- messageToBeDeleted->Complete(KErrCancel);
- if(messageToBeDeleted->iUsingReservedHeap)
- {
- aReservedHeap->Free(messageToBeDeleted);
- }
- else
- {
- delete messageToBeDeleted;
- }
- --index;
- }
- }
- }
void RSsmAdaptationRequestQueue::Dequeue(CAdaptationMessage *&aCurrentMessage)
{
aCurrentMessage = iQueue[0];
@@ -773,11 +736,6 @@
return iQueue.Append(aPendingRequest);
}
-TInt RSsmAdaptationRequestQueue::Reserve(TInt aReserverCount)
- {
- return(iQueue.Reserve(aReserverCount));
- }
-
/**
* Method to get number of object pointers in the Queue
*/
--- a/sysstatemgmt/systemstatemgr/sus/src/susemergencycallrfadaptation.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/sus/src/susemergencycallrfadaptation.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -18,23 +18,27 @@
#include <e32debug.h>
#include <ssm/ssmadaptation.h>
#include "susemergencycallrfadaptation.h"
+#include "suspanic.h"
+//Count to reserve space for one Activate Rf call + one Deactive Rf message in Queue
+const TInt KReserveCount = 2;
/**
- * Function used to cleanup the CAdaptationMessage object which is pushed to cleanup stack incase of Leave
- * CAdaptationMessage message will be freed back to reserved heap incase of it is created using reserved heap.
+ * Function used to cleanup the CAdaptationMessage object which is pushed on to the cleanup stack incase of Leave.
+ * CAdaptationMessage message will be reset to hold default values, if it is using the precreated message pointer.
* or else message will be deleted.
*/
static void DoCleanUp(TAny* aAdaptationMessage)
{
- TStoreAdaptationMessage* storeMessage = static_cast <TStoreAdaptationMessage*>(aAdaptationMessage);
- if(storeMessage->iAdaptationMessage->iUsingReservedHeap)
+ CEmergencyAdaptationMessage* storeAdaptationMessage = static_cast <CEmergencyAdaptationMessage*>(aAdaptationMessage);
+ storeAdaptationMessage->Complete(KErrNone);
+ if(storeAdaptationMessage->IsMessageReserved())
{
- storeMessage->iReservedHeap->Free(storeMessage->iAdaptationMessage);
+ storeAdaptationMessage->UnsetMessageStatus(EMsgInUse);
}
else
{
- delete storeMessage->iAdaptationMessage;
+ delete storeAdaptationMessage;
}
}
@@ -43,71 +47,83 @@
*/
void CEmergencyCallRfAdaptation::SubmitOrQueueL(const RMessage2 &aMessage)
{
- CAdaptationMessage *messageCopy = NULL;
- TRAPD(err , messageCopy = new(ELeave) CAdaptationMessage(aMessage));
- //Use preallocated heap for creating CAdaptationMessage under OOM condition, if it is a priority client
+ CEmergencyAdaptationMessage *storeAdaptationMessage = NULL;
+ TRAPD(err, storeAdaptationMessage = CEmergencyAdaptationMessage::NewL(aMessage));
+
+ //Allow only priority client to perform emergency call.
if (KErrNoMemory == err && aMessage.Session() == iPriorityClientSession)
{
- DEBUGPRINT1A("CAdaptationMessage will be created using Reserved Heap");
- TAny* messagePtr = iReservedHeap->AllocL(sizeof(CAdaptationMessage));
- messageCopy = new (messagePtr)CAdaptationMessage(aMessage);
- messageCopy->iUsingReservedHeap = ETrue;
+ DEBUGPRINT1A("CEmergencyAdaptationMessage will be created using reserved pointers");
+ if ( iReserveMsgCount == 0 )
+ {
+ DEBUGPRINT1A("There is no reserved message to perform emergency call");
+ User::Leave(err);
+ }
+ //Traverse through the reserved message array to look for free message.
+ for ( TInt index = 0 ; index < KReserveCount ; ++index )
+ {
+ //Use the reserve message, if it is not already used.
+ if (!(iAdaptationReservedMessageArray[index]->IsMessageInuse()))
+ {
+ iAdaptationReservedMessageArray[index]->SetMessage(aMessage);
+ iAdaptationReservedMessageArray[index]->SetMessageStatus(EMsgInUse);
+ storeAdaptationMessage = iAdaptationReservedMessageArray[index];
+ --iReserveMsgCount;
+ break;
+ }
+ }
}
else
{
User::LeaveIfError(err);
}
-
if(!IsActive())
{
- Submit(messageCopy);
+ Submit(storeAdaptationMessage);
}
else
{
- //Store the CAdaptationMessage pointer and iReservedHeap in a struct inorder to cleanup
- //depending on the reserved heap/normal heap used.
- TStoreAdaptationMessage storeMessage;
- storeMessage.iAdaptationMessage = messageCopy;
- storeMessage.iReservedHeap = iReservedHeap;
- CleanupStack::PushL(TCleanupItem(DoCleanUp, &storeMessage ));
+ //Push the CEmergencyAdaptationMessage pointer on to the cleanup stack and reset/delete the pointer
+ //depending on using precreated pointer/new pointer.
+ CleanupStack::PushL(TCleanupItem(DoCleanUp, storeAdaptationMessage ));
DEBUGPRINT2A("CEmergencyCallRfAdaptationRequests queueing request with function id: %d", aMessage.Function());
- //Reserve heap only in non OOM condition
- if(messageCopy->iUsingReservedHeap == EFalse)
+ //Reserve slot only in non OOM condition
+ if(!(storeAdaptationMessage->IsMessageReserved()))
{
- //Always reserve 2 slots in queue for Emergency call requests. Slots will be reserved if count
- //to request memory(RPointerArray.Reserve(count)) is greater than the existing reserved memory in
- //RPonterArray. So there will be memory allocation only when
- //iPendingRequestsQueue.Count()+ reserveCount + 1(for the present message))
- // > already reserved memory.
- const TInt reserveCount = 2;
- err = iPendingRequestsQueue.Reserve(iPendingRequestsQueue.Count() + reserveCount + 1 );
+ //Priority clients are allowed to queue only two(KReserveCount) emergengency call request in the OOM condition.
+ //So always request to reserve only iPendingRequestsQueue.Count()+ iReserveMsgCount + 1
+ //slots.
+ //Memory will be only reserved if (iPendingRequestsQueue.Count()+ iReserveMsgCount + 1) >
+ //already reserved memory
+ TRAP(err, iPendingEmergencyRequestsQueue.ReserveL(iPendingEmergencyRequestsQueue.Count() + iReserveMsgCount + 1 ));
}
if(KErrNone == err || (KErrNoMemory == err && aMessage.Session() == iPriorityClientSession))
{
- User::LeaveIfError(iPendingRequestsQueue.Queue(messageCopy));
+ iPendingEmergencyRequestsQueue.AppendL(storeAdaptationMessage);
}
else
{
User::Leave(err);
}
- CleanupStack::Pop(&storeMessage);
+ CleanupStack::Pop(storeAdaptationMessage);
}
}
-void CEmergencyCallRfAdaptation::Submit(CAdaptationMessage*& aMessage)
+void CEmergencyCallRfAdaptation::Submit(CEmergencyAdaptationMessage*& aMessage)
{
+ __ASSERT_ALWAYS((iEmergencyCallRfAdaptation != NULL), User::Panic(KPanicSsmSus, EEmergencyCallRfAdaptationNullPtrError1));
DEBUGPRINT2A("CEmergencyCallRfAdaptationRequests immediate submission of request with function id: %d", aMessage->Function());
iCurrentMessage = aMessage;
switch(aMessage->Function())
{
case EActivateRfForEmergencyCall :
{
- iEmergencyCallRfAdaptation.ActivateRfForEmergencyCall(iStatus);
+ iEmergencyCallRfAdaptation->ActivateRfForEmergencyCall(iStatus);
break;
}
case EDeactivateRfForEmergencyCall :
{
- iEmergencyCallRfAdaptation.DeactivateRfForEmergencyCall(iStatus);
+ iEmergencyCallRfAdaptation->DeactivateRfForEmergencyCall(iStatus);
break;
}
default :
@@ -126,53 +142,80 @@
@internalComponent
*/
-CEmergencyCallRfAdaptation* CEmergencyCallRfAdaptation::NewL(MEmergencyCallRfAdaptation& aAdaptation)
+CEmergencyCallRfAdaptation* CEmergencyCallRfAdaptation::NewL(MEmergencyCallRfAdaptation* aAdaptation)
{
- CEmergencyCallRfAdaptation* self = new(ELeave) CEmergencyCallRfAdaptation(aAdaptation);
- return self;
+ CEmergencyCallRfAdaptation* self = new(ELeave) CEmergencyCallRfAdaptation();
+ CleanupStack::PushL(self);
+ self->ConstructL(aAdaptation);
+ CleanupStack::Pop(self);
+ return self;
}
+
+void CEmergencyCallRfAdaptation::ConstructL(MEmergencyCallRfAdaptation* aAdaptation)
+ {
+ ReserveMemoryL();
+ //Taking the ownership of emergencyCallRfAdaptationPlugin after all the leaving function have passed.
+ //If some function leaves before taking ownership of emergencyCallRfAdaptationPlugin, it will be released twice, which causes system to panic.
+ iEmergencyCallRfAdaptation = aAdaptation;
+ }
+
/**
* Function to reserve memory to make emergency call during OOM condition
*/
void CEmergencyCallRfAdaptation :: ReserveMemoryL()
{
//Reserve space for one Activate Rf call + one Deactive Rf message in Queue.
- const TInt reserveCount = 2;
- // heap requested for one Active Rf call + one Deactive Rf
- const TInt reservedHeap = reserveCount * sizeof(CAdaptationMessage);
- //heap is reserved for storing CAdaptationMessage during OOM condition.
- iReservedHeap = UserHeap::ChunkHeap(NULL, reservedHeap, reservedHeap);
- //Leave with KErrNoMemory if iReservedHeap is NULL
- if(iReservedHeap == NULL)
+ iPendingEmergencyRequestsQueue.ReserveL(KReserveCount);
+
+ //Pre-create an array to hold CEmergencyAdaptationMessage pointer, this is of size CEmergencyAdaptationMessage.
+ RMessage2 message;
+ for( TInt index = 0 ; index < KReserveCount ; ++index )
{
- User::Leave(KErrNoMemory);
+ CEmergencyAdaptationMessage* adaptationMessage = NULL;
+ adaptationMessage = CEmergencyAdaptationMessage::NewL(message, EMsgReserved);
+ CleanupStack::PushL(adaptationMessage);
+ iAdaptationReservedMessageArray.AppendL(adaptationMessage);
+ CleanupStack::Pop(adaptationMessage);
}
- User::LeaveIfError(iPendingRequestsQueue.Reserve(reserveCount));
}
-
CEmergencyCallRfAdaptation::~CEmergencyCallRfAdaptation()
{
- iPendingRequestsQueue.NotifyAndRemoveAll(iReservedHeap);
+ NotifyAndRemoveAll();
Cancel();
- iPendingRequestsQueue.Close();
- if(iReservedHeap != NULL)
- {
- iReservedHeap->Reset();
- iReservedHeap->Close();
- }
+ iPendingEmergencyRequestsQueue.Close();
+ iAdaptationReservedMessageArray.ResetAndDestroy();
Release();
}
-CEmergencyCallRfAdaptation::CEmergencyCallRfAdaptation(MEmergencyCallRfAdaptation& aAdaptation) : CActive(EPriorityStandard), iEmergencyCallRfAdaptation(aAdaptation)
-, iReservedHeap(NULL)
+void CEmergencyCallRfAdaptation::NotifyAndRemoveAll()
+ {
+ TInt count = iPendingEmergencyRequestsQueue.Count();
+
+ for(TInt index =0; index < count; ++index)
+ {
+ iPendingEmergencyRequestsQueue[index]->Complete(KErrServerTerminated);
+ if (!(iPendingEmergencyRequestsQueue[index]->IsMessageReserved()))
+ {
+ delete iPendingEmergencyRequestsQueue[index];
+ }
+ iPendingEmergencyRequestsQueue[index] = NULL;
+ }
+ iPendingEmergencyRequestsQueue.Reset();
+ }
+
+CEmergencyCallRfAdaptation::CEmergencyCallRfAdaptation() : CActive(EPriorityStandard)
+,iReserveMsgCount(KReserveCount)
{
CActiveScheduler::Add(this);
}
void CEmergencyCallRfAdaptation::Release()
{
- iEmergencyCallRfAdaptation.Release();
+ if(iEmergencyCallRfAdaptation != NULL)
+ {
+ iEmergencyCallRfAdaptation->Release();
+ }
}
void CEmergencyCallRfAdaptation::DoActivateRfForEmergencyCallL(const RMessage2& aMessage)
@@ -187,15 +230,37 @@
void CEmergencyCallRfAdaptation::DoEmergencyCallRfAdaptationCancelL(const RMessage2& aMessage)
{
-
+ __ASSERT_ALWAYS((iEmergencyCallRfAdaptation != NULL), User::Panic(KPanicSsmSus, EEmergencyCallRfAdaptationNullPtrError2));
+
if(iCurrentMessage != NULL)
{
if(aMessage.Session() == iCurrentMessage->Session())
{
DEBUGPRINT1A("CEmergencyCallRfAdaptationRequests cancelling current request as requested");
- iEmergencyCallRfAdaptation.Cancel();
+ iEmergencyCallRfAdaptation->Cancel();
}
- iPendingRequestsQueue.RemoveFromQueueAndComplete(aMessage, iReservedHeap);
+ CEmergencyAdaptationMessage *messageToBeDeleted;
+ for(TInt index = 0; index < iPendingEmergencyRequestsQueue.Count(); ++index )
+ {
+ if(aMessage.Session() == iPendingEmergencyRequestsQueue[index]->Session())
+ {
+ messageToBeDeleted = iPendingEmergencyRequestsQueue[index];
+ DEBUGPRINT2A("RSsmAdaptationRequestQueue(aMessage,ReservedHeap)called to cancel the request with function id: %d", messageToBeDeleted->Function());
+ iPendingEmergencyRequestsQueue.Remove(index);
+ messageToBeDeleted->Complete(KErrCancel);
+ //Reset the AdaptationMessage if it is created using reserved pointer or delete the pointer
+ if(messageToBeDeleted->IsMessageReserved())
+ {
+ messageToBeDeleted->UnsetMessageStatus(EMsgInUse);
+ ++iReserveMsgCount;
+ }
+ else
+ {
+ delete messageToBeDeleted;
+ }
+ --index;
+ }
+ }
aMessage.Complete(KErrNone);
}
@@ -209,23 +274,16 @@
void CEmergencyCallRfAdaptation::RunL()
{
-
+ __ASSERT_DEBUG((iCurrentMessage != NULL), User::Panic(KPanicSsmSus, EEmergencyAdaptationMessageNullPtrError));
DEBUGPRINT2A("CEmergencyCallRfAdaptationRequests processed the request with funtion id: %d", iCurrentMessage->Function());
iCurrentMessage->Complete(iStatus.Int());
- if(iCurrentMessage->iUsingReservedHeap)
- {
- iReservedHeap->Free(iCurrentMessage);
- }
- else
- {
- delete iCurrentMessage;
- }
+ DeleteAdaptationMessage();
iCurrentMessage = NULL;
- if( (iPendingRequestsQueue.IsEmpty()) == EFalse )
+ if( (iPendingEmergencyRequestsQueue.Count()) > 0 )
{
- CAdaptationMessage *messageCopy = NULL;
- iPendingRequestsQueue.Dequeue(messageCopy);
+ CEmergencyAdaptationMessage *messageCopy = NULL;
+ Dequeue(messageCopy);
Submit(messageCopy);
}
}
@@ -235,32 +293,18 @@
if(iCurrentMessage != NULL)
{
- iCurrentMessage->Complete(aError);
- if(iCurrentMessage->iUsingReservedHeap)
- {
- iReservedHeap->Free(iCurrentMessage);
- }
- else
- {
- delete iCurrentMessage;
- }
+ iCurrentMessage->Complete(aError);
+ DeleteAdaptationMessage();
iCurrentMessage = NULL;
}
- while( (iPendingRequestsQueue.IsEmpty()) == EFalse )
- {
- iPendingRequestsQueue.Dequeue(iCurrentMessage);
- iCurrentMessage->Complete(aError);
- if(iCurrentMessage->iUsingReservedHeap)
- {
- iReservedHeap->Free(iCurrentMessage);
- }
- else
- {
- delete iCurrentMessage;
- }
- iCurrentMessage = NULL;
- }
+ while( (iPendingEmergencyRequestsQueue.Count() > 0 ))
+ {
+ Dequeue(iCurrentMessage);
+ iCurrentMessage->Complete(aError);
+ DeleteAdaptationMessage();
+ iCurrentMessage = NULL;
+ }
return KErrNone;
@@ -271,30 +315,16 @@
if(iCurrentMessage != NULL)
{
iCurrentMessage->Complete(KErrCancel);
- if(iCurrentMessage->iUsingReservedHeap)
- {
- iReservedHeap->Free(iCurrentMessage);
- }
- else
- {
- delete iCurrentMessage;
- }
+ DeleteAdaptationMessage();
iCurrentMessage = NULL;
}
- while( (iPendingRequestsQueue.IsEmpty()) == EFalse )
+ while( (iPendingEmergencyRequestsQueue.Count() > 0 ))
{
- iPendingRequestsQueue.Dequeue(iCurrentMessage);
- iCurrentMessage->Complete(KErrCancel);
- if(iCurrentMessage->iUsingReservedHeap)
- {
- iReservedHeap->Free(iCurrentMessage);
- }
- else
- {
- delete iCurrentMessage;
- }
- iCurrentMessage = NULL;
+ Dequeue(iCurrentMessage);
+ iCurrentMessage->Complete(KErrCancel);
+ DeleteAdaptationMessage();
+ iCurrentMessage = NULL;
}
}
@@ -314,3 +344,128 @@
iPriorityClientSession = NULL;
}
+/**
+ * Reset the AdaptationMessage if it is created using reserved pointer or delete the pointer
+ */
+void CEmergencyCallRfAdaptation::DeleteAdaptationMessage()
+ {
+ if(iCurrentMessage->IsMessageReserved())
+ {
+ iCurrentMessage->UnsetMessageStatus(EMsgInUse);
+ ++iReserveMsgCount;
+ }
+ else
+ {
+ delete iCurrentMessage;
+ }
+ }
+
+void CEmergencyCallRfAdaptation::Dequeue(CEmergencyAdaptationMessage *&aCurrentMessage)
+ {
+ aCurrentMessage = iPendingEmergencyRequestsQueue[0];
+ iPendingEmergencyRequestsQueue.Remove(0);
+ }
+
+/**
+ * Constructor.
+ */
+CEmergencyAdaptationMessage::CEmergencyAdaptationMessage(const TInt8 aMessageStatus): iAdaptationMessage(NULL), iMessageStatus(0)
+ {
+ iMessageStatus |= aMessageStatus ;
+ }
+
+/**
+ * Destructor.
+ */
+CEmergencyAdaptationMessage::~CEmergencyAdaptationMessage()
+ {
+ if (iAdaptationMessage != NULL)
+ {
+ delete iAdaptationMessage;
+ }
+ }
+
+CEmergencyAdaptationMessage* CEmergencyAdaptationMessage::NewL(const RMessage2& aMessage)
+ {
+ return CEmergencyAdaptationMessage::NewL(aMessage, EMsgStatusNULL);
+ }
+
+CEmergencyAdaptationMessage* CEmergencyAdaptationMessage::NewL(const RMessage2& aMessage, const TInt8 aMessageStatus)
+ {
+ CEmergencyAdaptationMessage* self = new(ELeave) CEmergencyAdaptationMessage(aMessageStatus);
+ //custom cleanup is not required here as it is a normal message till this point.
+ CleanupStack::PushL(self);
+ self->ConstructL(aMessage);
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+void CEmergencyAdaptationMessage::ConstructL(const RMessage2& aMessage)
+ {
+ iAdaptationMessage = new (ELeave)CAdaptationMessage(aMessage);
+ }
+
+void CEmergencyAdaptationMessage::Complete(TInt aReason)
+ {
+ if (iAdaptationMessage != NULL)
+ {
+ iAdaptationMessage->Complete(aReason);
+ }
+ }
+
+/**
+ * Function to check whether the messages is using reserved heap or not.
+ */
+inline TBool CEmergencyAdaptationMessage::IsMessageReserved() const
+ {
+ return (iMessageStatus & EMsgReserved)? ETrue:EFalse;
+ }
+
+/**
+ * Function to check whether the reserved messages is in use or not.
+ */
+inline TBool CEmergencyAdaptationMessage::IsMessageInuse() const
+ {
+ return (iMessageStatus & EMsgInUse)? ETrue:EFalse;
+ }
+
+/**
+ * Unset the message status .
+ */
+inline void CEmergencyAdaptationMessage::UnsetMessageStatus(const TInt8 aMessageStatus)
+ {
+ iMessageStatus &= ~aMessageStatus ;
+ }
+
+/**
+ * Set the message status .
+ */
+inline void CEmergencyAdaptationMessage::SetMessageStatus(const TInt8 aMessageStatus)
+ {
+ iMessageStatus |= aMessageStatus ;
+ }
+
+/**
+ * Sets the RMessage2 .
+ */
+void CEmergencyAdaptationMessage::SetMessage(const RMessage2& aMessage)
+ {
+ iAdaptationMessage->SetMessage(aMessage);
+ }
+
+/**
+ * Returns the Function .
+ */
+TInt CEmergencyAdaptationMessage::Function() const
+ {
+ return iAdaptationMessage->Function();
+ }
+
+/**
+ * Returns the Session .
+ */
+CSession2 *CEmergencyAdaptationMessage::Session() const
+ {
+ return iAdaptationMessage->Session();
+ }
+
--- a/sysstatemgmt/systemstatemgr/test/tcmd/group/ssmatest_cmd.iby Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/group/ssmatest_cmd.iby Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -55,7 +55,9 @@
data=EPOCROOT##epoc32\data\Z\resource\ssmatest\cmdlists5\cmdlists5.rsc resource\ssmatest\cmdlists5\cmdlists5.rsc
data=EPOCROOT##epoc32\data\Z\resource\ssmatest\cmdlists6\cmdlists6.rsc resource\ssmatest\cmdlists6\cmdlists6.rsc
data=EPOCROOT##epoc32\data\Z\resource\ssmatest\bic\tcmd_cmdlist_swp_builtincmd.rsc resource\ssmatest\bic\tcmd_cmdlist_swp_builtincmd.rsc
-
+data=EPOCROOT##epoc32\data\Z\resource\ssmatest\cmdlists7\cmdlists7a.rsc resource\ssmatest\cmdlists7\cmdlists7a.rsc
+data=EPOCROOT##epoc32\data\Z\resource\ssmatest\cmdlists7\cmdlists7b.rsc resource\ssmatest\cmdlists7\cmdlists7b.rsc
+data=EPOCROOT##epoc32\data\Z\resource\ssmatest\cmdlists7\cmdlists7c.rsc resource\ssmatest\cmdlists7\cmdlists7c.rsc
// policy files for reqswpchange
data=ABI_DIR\BUILD_DIR\ssm.state.policy.createswp.dll sys\bin\ssm.state.policy.createswp.dll
data=ABI_DIR\BUILD_DIR\ssm.swp.policy.test.cmdreqswp.dll sys\bin\ssm.swp.policy.test.cmdreqswp.dll
--- a/sysstatemgmt/systemstatemgr/test/tcmd/group/tcmd_server.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/group/tcmd_server.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -257,5 +257,18 @@
TARGETPATH /resource/ssmatest/bic
END
+SOURCEPATH ../resource
+START RESOURCE cmdlists7a.rss
+TARGETPATH /resource/ssmatest/cmdlists7
+END
+SOURCEPATH ../resource
+START RESOURCE cmdlists7b.rss
+TARGETPATH /resource/ssmatest/cmdlists7
+END
+
+SOURCEPATH ../resource
+START RESOURCE cmdlists7c.rss
+TARGETPATH /resource/ssmatest/cmdlists7
+END
SMPSAFE
--- a/sysstatemgmt/systemstatemgr/test/tcmd/inc/tcmd_step_resourcereader.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/inc/tcmd_step_resourcereader.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -159,6 +159,7 @@
void TestGet3L();
void ThreadGet3L();
void TestGet4L();
+ void TestGet5L();
void ConfTestL();
void TestGeneral1L();
void TestCommandType1L();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/resource/cmdlists7a.rss Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,47 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Provides no command
+//
+//
+
+#include <ssm/ssmcmd.rh>
+#include "testcmdlistids.hrh"
+
+UID2 KUidSsmCommandListResourceFile
+
+// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
+// The SSM relies on this having a resource ID of 1.
+RESOURCE SSM_COMMAND_LIST_ROOT
+ {
+ command_list_mapping = r_command_list_mapping;
+ }
+
+RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
+ {
+ mappings =
+ {
+ SSM_COMMANDLISTID_TO_RESOURCEID
+ {
+ command_list_id = ETestCommandListId1;
+ resource_id = r_command_list_1;
+ }
+ };
+ }
+
+RESOURCE SSM_COMMAND_LIST r_command_list_1
+ {
+ commands =
+ {
+ };
+ }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/resource/cmdlists7b.rss Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,66 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Provides commands with conditional info
+//
+//
+
+#include <ssm/ssmcmd.rh>
+#include "testcmd.rh"
+#include "testcmdlistids.hrh"
+
+UID2 KUidSsmCommandListResourceFile
+
+// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
+// The SSM relies on this having a resource ID of 1.
+RESOURCE SSM_COMMAND_LIST_ROOT
+ {
+ command_list_mapping = r_command_list_mapping;
+ }
+
+RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
+ {
+ mappings =
+ {
+ SSM_COMMANDLISTID_TO_RESOURCEID
+ {
+ command_list_id = ETestCommandListId1;
+ resource_id = r_command_list_1;
+ }
+ };
+ }
+
+
+RESOURCE SSM_COMMAND_LIST r_command_list_1
+ {
+ commands =
+ {
+ r_command_state_include_no,
+ r_command_state_include_yes
+ };
+ }
+
+RESOURCE SSM_TEST_PUBLISH_SYSTEM_STATE r_command_state_include_no
+ {
+ }
+
+RESOURCE SSM_TEST_PUBLISH_SYSTEM_STATE r_command_state_include_yes
+ {
+ conditional_information = r_conditional_information_yes;
+ }
+
+RESOURCE SSM_SYMBIAN_CONDITIONAL_INFORMATION r_conditional_information_yes
+ {
+ software_reason = ESoftwareNormal;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/resource/cmdlists7c.rss Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,47 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Provides no command
+//
+//
+
+#include <ssm/ssmcmd.rh>
+#include "testcmdlistids.hrh"
+
+UID2 KUidSsmCommandListResourceFile
+
+// SSM_COMMAND_LIST_ROOT must be the first resource in a command list resource file.
+// The SSM relies on this having a resource ID of 1.
+RESOURCE SSM_COMMAND_LIST_ROOT
+ {
+ command_list_mapping = r_command_list_mapping;
+ }
+
+RESOURCE SSM_COMMAND_LIST_MAPPING r_command_list_mapping
+ {
+ mappings =
+ {
+ SSM_COMMANDLISTID_TO_RESOURCEID
+ {
+ command_list_id = ETestCommandListId1;
+ resource_id = r_command_list_1;
+ }
+ };
+ }
+
+RESOURCE SSM_COMMAND_LIST r_command_list_1
+ {
+ commands =
+ {
+ };
+ }
\ No newline at end of file
--- a/sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/resource/tcmd_cmdlist_swp_builtincmd.rss Thu Jun 24 11:22:10 2010 +0100
@@ -347,4 +347,4 @@
severity = ECmdMediumSeverity;
power_state = 1;
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/tcmd/src/tcmd_step_resourcereader.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tcmd/src/tcmd_step_resourcereader.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -452,6 +452,11 @@
__UHEAP_MARKEND;
__UHEAP_MARK;
+ TRAP(err, TestGet5L());
+ TEST(err == KErrNone);
+ __UHEAP_MARKEND;
+
+ __UHEAP_MARK;
TRAP(err, TestGeneral1L());
TEST(err == KErrNone);
__UHEAP_MARKEND;
@@ -2020,3 +2025,39 @@
CleanupStack::PushL(cmd);
return NULL;
}
+
+/*
+It tests for the scenario where first file have no commands(i.e. cmdlists7a) and second file cmdlists7b have two commands and
+third file have no commands(i.e cmdlists7c)
+
+CommandList should be created and iCommandConstructCount should be two.
+*/
+void CResourceReaderTest::TestGet5L()
+ {
+ INFO_PRINTF1(_L("*** Starting TestGet5L"));
+ _LIT(KCommandListPath, "z:\\resource\\ssmatest\\cmdlists7\\");
+ CSsmCommandListResourceReaderImpl* reader = CSsmCommandListResourceReaderImpl::NewL(iFs, KCommandListPath, *this);
+
+ // init
+ TRequestStatus status;
+ reader->Initialise(status);
+ TEST(status == KRequestPending);
+ Run();
+ User::WaitForRequest(status); // mop up the completed initialisation request
+ TEST(status == KErrNone);
+
+ // prepare
+ TSsmState state(0,23);
+ reader->PrepareCommandList(*this, ETestCommandListId1, state, status);
+ iWhichPrepare = EConditional;
+ iCommandConstructCount = 0;
+ Run();
+ User::WaitForRequest(status);
+
+ TBool commandListReady = reader->IsCommandListReady();
+
+ TEST((status == KErrNone) && (commandListReady == TRUE) && (iCommandConstructCount == 2));
+
+ iWhichPrepare = EPrepareNoCheck;
+ delete reader;
+ }
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmcletestapplication_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -30,4 +30,4 @@
app_file="ssmcletestapplication";
newfile = KAppDoesNotSupportNewFile;
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappgood_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -30,4 +30,4 @@
app_file="ssmtestappgood";
newfile = KAppDoesNotSupportNewFile;
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappnorv_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestappnorv";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppanic_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestapppanic";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapppaniczero_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestapppaniczero";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprvafterretry_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestapprvafterretry";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestapprverror_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestapprverror";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappslow_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestappslow";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/testapps/src/ssmtestappsucessfulafterretry_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="ssmtestappsucessfulafterretry";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstatemgr/test/tssm/group/tssm_server.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tssm/group/tssm_server.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -138,6 +138,7 @@
LIBRARY featmgr.lib
LIBRARY centralrepository.lib
LIBRARY conditionevaluator.lib
+LIBRARY ssmuiproviderdll.lib
STATICLIBRARY ssmclecli.lib
STATICLIBRARY ssmclesrv.lib //used by ssmclecli.lib
--- a/sysstatemgmt/systemstatemgr/test/tsus/group/tsus_ssmutilsrv.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tsus/group/tsus_ssmutilsrv.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -33,6 +33,9 @@
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+// Used for making the production code changes in the server available only for test code.
+macro TEST_SSM_SERVER
+
// production code
USERINCLUDE ../../../localinc
@@ -57,6 +60,7 @@
SOURCE susmiscadaptation.cpp
SOURCE susemergencycallrfadaptation.cpp
SOURCE susadaptationpluginloader.cpp
+SOURCE ssmadaptationcli.cpp
// testcode
@@ -69,6 +73,7 @@
SOURCE tsus_server.cpp
SOURCE tsus_ssmsuscli.cpp
SOURCE tsus_startserver.cpp
+SOURCE tsus_startadaptationserver.cpp
SOURCE tsus_step_supinfo.cpp
SOURCE tsus_step_suploader.cpp
SOURCE tsus_step_platsec.cpp
@@ -79,12 +84,12 @@
SOURCE tsus_step_susadaptationpluginloader.cpp
SOURCE tsus_step_loadadaptationserver.cpp
+
LIBRARY euser.lib
LIBRARY efsrv.lib
LIBRARY estor.lib
LIBRARY testexecuteutils.lib
LIBRARY testexecutelogclient.lib
LIBRARY ssmcmn.lib
-LIBRARY ssmadaptationcli.lib
SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tsus/inc/tsus_startadaptationserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,35 @@
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:Test Adaptation server
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal Symbian test code
+*/
+
+
+#ifndef __TSUS_STARTADAPTATIONSERVER_H__
+#define __TSUS_STARTADAPTATIONSERVER_H__
+
+#include <ssm/ssmsuscli.h>
+
+_LIT(KTestAdaptationServerName, "AdaptationSrvTest");
+
+extern void RunAdaptationTestSrvL();
+extern TInt TestAdaptationSrvInitFunction(TAny* /*aNothing*/);
+extern TInt StartAdaptationServer(RThread& aServer);
+
+
+#endif //__TSUS_STARTADAPTATIONSERVER_H__
--- a/sysstatemgmt/systemstatemgr/test/tsus/inc/tsus_step_adaptionserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tsus/inc/tsus_step_adaptionserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
/**
@file
@test
- @internalComponent - Internal Symbian test code
+ @internalComponent - Internal test code
*/
@@ -33,8 +33,14 @@
class RTestSusAdaptationCli : public RSsmEmergencyCallRfAdaptation
{
public:
+#ifdef TEST_SSM_SERVER
+ TInt Connect(const TDesC& aServerName);
+#endif
TInt SetHeapFailure(TInt aFailureRate);
TInt UnSetHeapFailure();
+ TInt SetHeapMark();
+ TInt UnSetHeapMark();
+
};
class CSusAdaptionServerTest : public CTestStep
@@ -51,11 +57,15 @@
private:
void doTestForMemoryLeaksL();
void doTestProcessCriticalL();
- void doTestOOML();
+ void doTestOOML();
+ void StartAndDestroyServerL();
+#ifdef TEST_SSM_SERVER
void doTestForEmergencyCallOOM();
- void StartAndDestroyServerL();
void doTestForSettingPriorityClient();
void doTestForNormalEmergencyCallinOOM();
+ void doTestForMultipleClientinOOMcondition();
+ void doTestForEmergencyCallOOMIterative();
+#endif
};
#endif
--- a/sysstatemgmt/systemstatemgr/test/tsus/scripts/ssmatest_sus_adaptionserver.script Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tsus/scripts/ssmatest_sus_adaptionserver.script Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
PRINT Run SusAdaptionServerStep tests
//Set the server with SID of telephony(c32 process) to test the emergency call under OOM condition
-RUN_PROGRAM -1 setcap tsus_ssmutilsrv.exe 0003FFFE -SID 10003D33 tsus_ssmutilsrv_WithC32_SID.exe
+RUN_PROGRAM -1 setcap tsus_ssmutilsrv.exe 00001134 -SID 101F7989 tsus_ssmutilsrv_WithC32_SID.exe
LOAD_SUITE tsus_ssmutilsrv_WithC32_SID
@@ -36,6 +36,7 @@
//! 4.Test to set SetPriorityClient() from two diff client
//! 5.Normal client calling Activate/DeactivateRfForEmergencyCall Rf in OOM condition
//! 6.Multiple client performing Activate/DeactivateRfForEmergencyCall during OOM situation
+//! 7.Iterate the OOM through Activate/DeactivateRfForEmergencyCall
//! @SYMTestExpectedResults The test ends with the following results:
//! 1.No error is reported a new object is created and the process is set to ESystemCritical.
//! 2.Intermediate iterations finish with KErrNoMemory with successful one completing with KErrNone. Memory is not leaked in any iteration.
@@ -43,5 +44,6 @@
//! 4.Call to SetPriorityClient() with error KErrAlreadyExists fails from the second client
//! 5.Call fails with KErrNoMemory.
//! 6.Only Priority client will be able to perform Activate/DeactivateRfForEmergencyCall, for other client KErrNoMemory will be returned
+//! 7.Activate/DeactivateRfForEmergencyCall works fine.
RUN_TEST_STEP 100 tsus_ssmutilsrv_WithC32_SID SusAdaptionServerStep
-END_TESTCASE DEVSRVS-SSMA-SUS-0011
\ No newline at end of file
+END_TESTCASE DEVSRVS-SSMA-SUS-0011
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/systemstatemgr/test/tsus/src/tsus_startadaptationserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,92 @@
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:Test Adaptation server
+//
+
+/**
+ @file
+ @test
+ @internalComponent - Internal test code
+*/
+
+#include <e32base.h>
+#include "tsus_startadaptationserver.h"
+#include "susadaptionserver.h"
+#include "ssmdebug.h"
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Test-Server startup code
+////////////////////////////////////////////////////////////////////////////////
+
+void RunAdaptationTestSrvL()
+ {
+ __UHEAP_MARK;
+ CActiveScheduler* sched = new(ELeave) CActiveScheduler();
+ CleanupStack::PushL( sched );
+ CActiveScheduler::Install( sched );
+
+ CSsmAdaptationServer* server = CSsmAdaptationServer::NewLC(KTestAdaptationServerName);
+ RThread::Rendezvous( KErrNone );
+
+ CActiveScheduler::Start();
+
+ CleanupStack::PopAndDestroy( server );
+ CleanupStack::PopAndDestroy( sched );
+ __UHEAP_MARKEND;
+ } //lint !e1746 Suppress parameter 'aSid' could be made const reference
+
+/**
+ This function is called when the TestServer's thread is resumed.
+ */
+TInt TestAdaptationSrvInitFunction(TAny* /*aNothing*/)
+ {
+ CTrapCleanup* cleanup=CTrapCleanup::New();
+ TInt err = KErrNoMemory;
+ if (cleanup)
+ {
+ TRAP( err, RunAdaptationTestSrvL());
+ delete cleanup;
+ }
+ return err;
+ }
+
+/**
+ */
+TInt StartAdaptationServer(RThread& aServer)
+ {
+ DEBUGPRINT2( _L("Starting test-server %S"), &KTestAdaptationServerName );
+
+ const TInt KMinHeapSize = 0x1000; // 4kB
+ const TInt KMaxHeapSize = 0x100000;// 1MB
+
+
+ TInt err = aServer.Create( KTestAdaptationServerName, &TestAdaptationSrvInitFunction,
+ KDefaultStackSize, KMinHeapSize, KMaxHeapSize,
+ NULL);
+ if( KErrNone == err )
+ {
+ TRequestStatus trs;
+ aServer.Rendezvous( trs );
+ aServer.Resume();
+
+ User::WaitForRequest( trs );
+
+ //We can't use the 'exit reason' if the server panicked as this is the
+ //panic 'reason' and may be '0' which cannot be distinguished from KErrNone
+ err = (aServer.ExitType()==EExitPanic) ? KErrGeneral : trs.Int();
+ }
+
+ return err;
+ }
--- a/sysstatemgmt/systemstatemgr/test/tsus/src/tsus_step_adaptionserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatemgr/test/tsus/src/tsus_step_adaptionserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -20,9 +20,19 @@
*/
#include "susadaptionserver.h"
-
+#include <ssm/ssmadaptationcli.h>
#include "tsus_step_adaptionserver.h"
+#include "tsus_startadaptationserver.h"
+#ifdef TEST_SSM_SERVER
+/**
+ * Overloaded function to Connect to the Test Adaptation server
+ */
+TInt RTestSusAdaptationCli::Connect(const TDesC& aServerName)
+ {
+ return RSsmEmergencyCallRfAdaptation::Connect(aServerName);
+ }
+#endif //TEST_SSM_SERVER
/**
* Client interface to simulate Heap failure at server side
*/
@@ -46,6 +56,27 @@
}
return KErrDisconnected;
}
+
+TInt RTestSusAdaptationCli::SetHeapMark()
+ {
+ if(Handle())
+ {
+ return SendReceive(EDebugMarkHeap);
+ }
+ return KErrDisconnected;
+ }
+
+/**
+ * Client interface to restore Heap Mark
+ */
+TInt RTestSusAdaptationCli::UnSetHeapMark()
+ {
+ if(Handle())
+ {
+ return SendReceive(EDebugMarkHeapEnd);
+ }
+ return KErrDisconnected;
+ }
CSusAdaptionServerTest::~CSusAdaptionServerTest()
{
@@ -79,11 +110,13 @@
TEST(KErrNone == err || KErrAlreadyExists == err);
TRAP(err, doTestOOML());
TEST(err == KErrNone);
-
+#ifdef TEST_SSM_SERVER
doTestForNormalEmergencyCallinOOM();
doTestForEmergencyCallOOM();
doTestForSettingPriorityClient();
-
+ doTestForMultipleClientinOOMcondition();
+ doTestForEmergencyCallOOMIterative();
+#endif //TEST_SSM_SERVER
__UHEAP_MARKEND;
INFO_PRINTF1(_L("....CSusAdaptionServerTest tests completed!"));
@@ -191,7 +224,7 @@
INFO_PRINTF1(_L("Destroy SSM adaptation server."));
delete server;
}
-
+#ifdef TEST_SSM_SERVER
/**
* Tests for client calling Activate/Deactivate Rf without setting as priorityclient.
*/
@@ -199,16 +232,20 @@
{
INFO_PRINTF1(_L("doTestForNormalEmergencyCallinOOM started."));
__UHEAP_MARK;
+ RThread thread;
+ CleanupClosePushL(thread);
+ TESTL(KErrNone == StartAdaptationServer(thread));
+
RTestSusAdaptationCli adaptationclitest;
- TInt err = adaptationclitest.Connect();
+ TInt err = adaptationclitest.Connect(KTestAdaptationServerName);
INFO_PRINTF2(_L("Connect() returned Error %d : Expected Error is KErrNone."),err);
TEST(err == KErrNone);
TRequestStatus status;
// Simulate OOM condition
- User::__DbgSetAllocFail(EFalse, RAllocator::EDeterministic, 1);
User::__DbgSetAllocFail(ETrue, RAllocator::EDeterministic, 1);
//Simulate OOM at Serverside
adaptationclitest.SetHeapFailure(1);
+ adaptationclitest.SetHeapMark();
//Normal client calling ActivateRfForEmergencyCall Rf in OOM condition. This call must fail with KErrNoMemory
//as there is no memory reserved.
adaptationclitest.ActivateRfForEmergencyCall(status);
@@ -216,10 +253,12 @@
User::WaitForRequest(status);
//Restore OOM condition
adaptationclitest.UnSetHeapFailure();
- adaptationclitest.Close();
- User::__DbgSetAllocFail(EFalse, RAllocator::ENone, 1);
+ adaptationclitest.UnSetHeapMark();
+ adaptationclitest.Close();
User::__DbgSetAllocFail(ETrue, RAllocator::ENone, 1);
TEST(status.Int() == KErrNoMemory);
+ thread.Kill(KErrNone);
+ CleanupStack::PopAndDestroy(&thread);
__UHEAP_MARKEND;
INFO_PRINTF1(_L("doTestForNormalEmergencyCallinOOM completed."));
}
@@ -233,18 +272,18 @@
{
INFO_PRINTF1(_L("doTestForEmergencyCallOOM started."));
__UHEAP_MARK;
+ RThread thread;
+ CleanupClosePushL(thread);
+ TESTL(KErrNone == StartAdaptationServer(thread));
RTestSusAdaptationCli adaptationclitest;
- TInt err = adaptationclitest.Connect();
+ TInt err = adaptationclitest.Connect(KTestAdaptationServerName);
INFO_PRINTF2(_L("Connect() returned Error %d : Expected Error is KErrNone."),err);
- TEST(err == KErrNone);
+ TEST(err == KErrNone);
err = adaptationclitest.SetAsPriorityClient();
+ adaptationclitest.SetHeapMark();
INFO_PRINTF2(_L("SetAsPriorityClient() returned Error %d : Expected Error is KErrNone."),err);
TEST(err == KErrNone);
- //Activate Rf + Deactivate Rf during non OOM situation.
- //Calls will be queued and processed one after the other. After 3 consecutive requests for
- //ActivateRfForEmergencyCall(), first call will be submitted directly to process and other two calls
- // will get queued. By end of this process will be having (count + 2) reserved memory in queue.i.e 4 reserved slots
- TRequestStatus status1,status2,status3,status4,status5,status6;
+ TRequestStatus status1,status2,status3,status4,status5,status6,status7;
adaptationclitest.ActivateRfForEmergencyCall(status1);
adaptationclitest.ActivateRfForEmergencyCall(status2);
adaptationclitest.ActivateRfForEmergencyCall(status3);
@@ -256,41 +295,47 @@
TEST(status2.Int() == KErrNone);
TEST(status3.Int() == KErrNone);
// Simulate OOM condition
- User::__DbgSetAllocFail(EFalse, RAllocator::EDeterministic, 1);
User::__DbgSetAllocFail(ETrue, RAllocator::EDeterministic, 1);
//Simulate OOM at Serverside
adaptationclitest.SetHeapFailure(1);
- //After the above 2 calls to Activate the Rfs, will be left with 4 reserved memory in queue, so in OOM
- //condition client can queue 4 activate/deactivate requests.The 5th request will fail with KErrNoMemory
+ //Two simulataneous calls for Active/deactivate Rf are allowed. The 3rd simultaneous request fail with KErrNoMemory
adaptationclitest.ActivateRfForEmergencyCall(status1);
- adaptationclitest.ActivateRfForEmergencyCall(status2);
- adaptationclitest.DeactivateRfForEmergencyCall(status3);
- adaptationclitest.DeactivateRfForEmergencyCall(status4);
- adaptationclitest.DeactivateRfForEmergencyCall(status5);
- adaptationclitest.DeactivateRfForEmergencyCall(status6);
+ adaptationclitest.DeactivateRfForEmergencyCall(status2);
+ adaptationclitest.ActivateRfForEmergencyCall(status3);
// Wait for completion of requests
User::WaitForRequest(status1);
User::WaitForRequest(status2);
User::WaitForRequest(status3);
+
+ //If the previous request for Activate/Deactivate is already finished. User can perform 2 more calls.
+ adaptationclitest.ActivateRfForEmergencyCall(status4);
+ adaptationclitest.DeactivateRfForEmergencyCall(status5);
+
User::WaitForRequest(status4);
User::WaitForRequest(status5);
- User::WaitForRequest(status6);
+
+ adaptationclitest.ActivateRfForEmergencyCall(status6);
+ adaptationclitest.DeactivateRfForEmergencyCall(status7);
+ adaptationclitest.Cancel();
+ // Wait for completion of requests
+ User::WaitForRequest(status6);
+ User::WaitForRequest(status7);
//Restore OOM condition
adaptationclitest.UnSetHeapFailure();
- User::__DbgSetAllocFail(EFalse, RAllocator::ENone, 1);
User::__DbgSetAllocFail(ETrue, RAllocator::ENone, 1);
TEST(status1.Int() == KErrNone);
TEST(status2.Int() == KErrNone);
- TEST(status3.Int() == KErrNone);
+ TEST(status3.Int() == KErrNoMemory);
TEST(status4.Int() == KErrNone);
TEST(status5.Int() == KErrNone);
- //6th request will fail with KErrNoMemory if, above 5 requests are still queued and there is no reserved slot for
- //6th one..otherwise, 6th request will be queued and processed
- TEST(status6.Int() == KErrNoMemory || status6.Int() == KErrNone);
-
+ TEST(status6.Int() == KErrNone);
+ TEST(status7.Int() == KErrCancel);
+ adaptationclitest.UnSetHeapMark();
adaptationclitest.Close();
+ thread.Kill(KErrNone);
+ CleanupStack::PopAndDestroy(&thread);
__UHEAP_MARKEND;
INFO_PRINTF1(_L("doTestForEmergencyCallOOM completed."));
}
@@ -302,13 +347,16 @@
{
INFO_PRINTF1(_L("doTestForSettingPriorityClient started."));
__UHEAP_MARK;
+ RThread thread;
+ CleanupClosePushL(thread);
+ TESTL(KErrNone == StartAdaptationServer(thread));
RTestSusAdaptationCli adaptationclitest1;
- TInt err = adaptationclitest1.Connect();
+ TInt err = adaptationclitest1.Connect(KTestAdaptationServerName);
INFO_PRINTF2(_L("adaptationclitest1.Connect() returned Error %d : Expected Error is KErrNone."),err);
TEST(err == KErrNone);
RTestSusAdaptationCli adaptationclitest2;
- err = adaptationclitest2.Connect();
+ err = adaptationclitest2.Connect(KTestAdaptationServerName);
INFO_PRINTF2(_L("adaptationclitest2.Connect() returned Error %d : Expected Error is KErrNone."),err);
TEST(err == KErrNone);
@@ -323,7 +371,152 @@
// Restore OOM condition
adaptationclitest1.Close();
adaptationclitest2.Close();
+
+ thread.Kill(KErrNone);
+ CleanupStack::PopAndDestroy(&thread);
__UHEAP_MARKEND;
INFO_PRINTF1(_L("doTestForSettingPriorityClient completed."));
}
+/**
+ * Multiple clients performing Emergency call during OOM situation
+ */
+void CSusAdaptionServerTest::doTestForMultipleClientinOOMcondition()
+ {
+ INFO_PRINTF1(_L("doTestForMultipleClientinOOMcondition started."));
+ __UHEAP_MARK;
+ RThread thread;
+ CleanupClosePushL(thread);
+
+ TESTL(KErrNone == StartAdaptationServer(thread));
+ RTestSusAdaptationCli adaptationclitest1;
+ TInt err = adaptationclitest1.Connect(KTestAdaptationServerName);
+ INFO_PRINTF2(_L("adaptationclitest1.Connect() returned Error %d : Expected Error is KErrNone."),err);
+ TEST(err == KErrNone);
+
+ RTestSusAdaptationCli adaptationclitest2;
+ err = adaptationclitest2.Connect(KTestAdaptationServerName);
+ INFO_PRINTF2(_L("adaptationclitest2.Connect() returned Error %d : Expected Error is KErrNone."),err);
+ TEST(err == KErrNone);
+
+ RTestSusAdaptationCli adaptationclitest3;
+ err = adaptationclitest3.Connect(KTestAdaptationServerName);
+ INFO_PRINTF2(_L("adaptationclitest3.Connect() returned Error %d : Expected Error is KErrNone."),err);
+ TEST(err == KErrNone);
+
+ err = adaptationclitest1.SetAsPriorityClient();
+ INFO_PRINTF2(_L("adaptationclitest1.SetAsPriorityClient() returned Error %d : Expected Error is KErrNone."),err);
+ TEST(err == KErrNone);
+
+ err = adaptationclitest2.SetAsPriorityClient();
+ INFO_PRINTF2(_L("adaptationclitest2.SetAsPriorityClient() returned Error %d : Expected Error is KErrAlreadyExists."),err);
+ TEST(err == KErrAlreadyExists);
+
+ err = adaptationclitest3.SetAsPriorityClient();
+ INFO_PRINTF2(_L("adaptationclitest3.SetAsPriorityClient() returned Error %d : Expected Error is KErrAlreadyExists."),err);
+ TEST(err == KErrAlreadyExists);
+
+ TRequestStatus status1,status2,status3,status4,status5,status6;
+ // Simulate OOM condition
+ User::__DbgSetAllocFail(ETrue, RAllocator::EDeterministic, 1);
+ //Simulate OOM Condition on server side
+ adaptationclitest1.SetHeapFailure(1);
+ adaptationclitest1.SetHeapMark();
+ adaptationclitest1.ActivateRfForEmergencyCall(status1);
+ adaptationclitest2.ActivateRfForEmergencyCall(status2);
+ adaptationclitest3.ActivateRfForEmergencyCall(status3);
+ adaptationclitest1.DeactivateRfForEmergencyCall(status4);
+ adaptationclitest2.DeactivateRfForEmergencyCall(status5);
+ adaptationclitest3.DeactivateRfForEmergencyCall(status6);
+
+ User::WaitForRequest(status1);
+ User::WaitForRequest(status2);
+ User::WaitForRequest(status3);
+ User::WaitForRequest(status4);
+ User::WaitForRequest(status5);
+ User::WaitForRequest(status6);
+ // Restore OOM condition
+ adaptationclitest1.Close();
+ adaptationclitest2.Close();
+ adaptationclitest3.Close();
+ //Restore OOM condition
+ adaptationclitest1.UnSetHeapMark();
+ adaptationclitest1.UnSetHeapFailure();
+ User::__DbgSetAllocFail(ETrue, RAllocator::ENone, 1);
+ //Priority client Performing Activate Rf returns KErrNone
+ TEST(status1.Int() == KErrNone);
+ //Normal clients performing Activate Rf fail with KErrNoMemory in OOM codition
+ TEST(status2.Int() == KErrNoMemory);
+ TEST(status3.Int() == KErrNoMemory);
+ //Priority client Performing Deactivate Rf returns KErrNone
+ TEST(status4.Int() == KErrNone);
+ //Normal clients peforming Deactivate Rf fail with KErrNoMemory in OOM codition
+ TEST(status5.Int() == KErrNoMemory);
+ TEST(status6.Int() == KErrNoMemory);
+ thread.Kill(KErrNone);
+ CleanupStack::PopAndDestroy(&thread);
+ __UHEAP_MARKEND;
+ INFO_PRINTF1(_L("doTestForMultipleClientinOOMcondition completed."));
+ }
+
+/**
+ * Tests for iterating heapfailure in ActivateRfForEmergencyCall and DeactivateRfForEmergencyCall.
+ */
+void CSusAdaptionServerTest::doTestForEmergencyCallOOMIterative()
+ {
+ INFO_PRINTF1(_L("doTestForEmergencyCallOOMIterative started."));
+ __UHEAP_MARK;
+ RThread thread;
+ CleanupClosePushL(thread);
+ TESTL(KErrNone == StartAdaptationServer(thread));
+ RTestSusAdaptationCli adaptationclitest;
+ TInt err = adaptationclitest.Connect(KTestAdaptationServerName);
+ INFO_PRINTF2(_L("Connect() returned Error %d : Expected Error is KErrNone."),err);
+ TEST(err == KErrNone);
+ err = adaptationclitest.SetAsPriorityClient();
+ INFO_PRINTF2(_L("SetAsPriorityClient() returned Error %d : Expected Error is KErrNone."),err);
+ TEST(err == KErrNone);
+ TRequestStatus status1,status2;
+ //simulate OOM at kernel
+ User::__DbgSetAllocFail(ETrue, RAllocator::EDeterministic, 1);
+ TInt maximumAllocation = 3;
+ //Iterate through the ActivateRfForEmergencyCall.
+ adaptationclitest.SetHeapMark();
+ for(TInt allocFailRate=1; allocFailRate <= 2*maximumAllocation; ++allocFailRate)
+ {
+ INFO_PRINTF2(_L("allocFailRateL %d:."), allocFailRate);
+ adaptationclitest.SetHeapFailure(allocFailRate);
+ adaptationclitest.ActivateRfForEmergencyCall(status1);
+ adaptationclitest.ActivateRfForEmergencyCall(status2);
+ User::WaitForRequest(status1);
+ User::WaitForRequest(status2);
+ TEST(status1.Int() == KErrNone);
+ TEST(status2.Int() == KErrNone);
+ }
+
+ //Iterate through the DeactivateRfForEmergencyCall.
+ for(TInt allocFailRate=1; allocFailRate < 2*maximumAllocation; allocFailRate++)
+ {
+ INFO_PRINTF2(_L("allocFailRateL %d:."), allocFailRate);
+ adaptationclitest.SetHeapFailure(allocFailRate);
+ adaptationclitest.DeactivateRfForEmergencyCall(status1);
+ adaptationclitest.DeactivateRfForEmergencyCall(status2);
+ User::WaitForRequest(status1);
+ User::WaitForRequest(status2);
+ TEST(status1.Int() == KErrNone);
+ TEST(status2.Int() == KErrNone);
+ }
+ adaptationclitest.UnSetHeapMark();
+ //Restore OOM condition
+ adaptationclitest.UnSetHeapFailure();
+ User::__DbgSetAllocFail(ETrue, RAllocator::ENone, 1);
+ adaptationclitest.Close();
+ thread.Kill(KErrNone);
+ CleanupStack::PopAndDestroy(&thread);
+ __UHEAP_MARKEND;
+ INFO_PRINTF1(_L("doTestForEmergencyCallOOMIterative completed."));
+ }
+
+#endif //TEST_SSM_SERVER
+
+
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndcentralrepository.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndcentralrepository.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,23 +12,8 @@
* Contributors:
*
* Description:
-* Name : conditiononcentrep.h
-* Part of : System Startup / Condition
-* Interface : None
* Declaration of CConditionOnCentRep and CConditionOnCentRepFlag
* classes.
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from conditiononcentrep.h to cndcentralrepository.h as part of Core OS transfer.
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndfeature.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndfeature.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,22 +12,7 @@
* Contributors:
*
* Description:
-* Name : conditiononfeature.h
-* Part of : System Startup / Condition
-* Interface : None
* Declaration of CConditionOnFeature class
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from conditiononfeature.h to cndfeature.h as part of Core OS transfer.
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndlogical.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndlogical.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,23 +12,8 @@
* Contributors:
*
* Description:
-* Name : boolexpr.h
-* Part of : System Startup / Condition
-* Interface : None
* Declaration of CBoolExpr, CLogicalNot, CLogicalAnd and
* CLogicalOr classes.
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from boolexpr.h to cndlogical.h as part of Core OS transfer.
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndpublishsubscribe.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/cndpublishsubscribe.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -13,22 +13,8 @@
*
* Description:
* Name : conditiononpubsub.h
-* Part of : System Startup / Condition
-* Interface : None
* Declaration of CConditionOnPubSub and CConditionOnPubSubFlag
* classes
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from conditiononpubsub.h to cndpublishsubscribe.h as part of Core OS transfer.
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditionevaluate.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditionevaluate.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -13,21 +13,7 @@
*
* Description:
* Name : resourcecondition.h
-* Part of : System Startup / Condition
-* Interface : None
* Declaration of ResourceCondition class
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.1
-* Nokia Core OS *
-* File renamed from resourcecondition.h to CConditionEvaluate.h as part of Core OS transfer.
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditionevaluatebase.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditionevaluatebase.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -13,22 +13,8 @@
*
* Description:
* Name : conditiononpubsub.h
-* Part of : System Startup / Condition
-* Interface : None
* Declaration of CConditionOnPubSub and CConditionOnPubSubFlag
* classes
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from conditiononpubsub.h to conditionevaluatebase.h as part of Core OS transfer.
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditionresourcetypes.rh Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditionresourcetypes.rh Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,19 +11,7 @@
// Contributors:
//
// Description:
-// Name : conditionresourcetypes.rh
-// Part of : System Startup / Condition
// Resource structure declarations for conditional checks.
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.0
-// Nokia Core OS *
//
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditiontypes.hrh Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/inc/conditiontypes.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,22 +12,8 @@
* Contributors:
*
* Description:
-* Name : conditiontypes.hrh
-* Part of : System Startup / Condition
-* Interface : None
* Identifiers for different condition types, for use in resource
* structs.
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-*
*/
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndcentralrepository.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndcentralrepository.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,21 +11,8 @@
// Contributors:
//
// Description:
-// Name : conditiononcentrep.cpp
-// Part of : System Startup / Condition
// Implementation of CConditionOnCentRep and
// CConditionOnCentRepFlag classes.
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from conditiononcentrep.cpp to cndcentralrepository.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndfeature.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndfeature.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,24 +11,12 @@
// Contributors:
//
// Description:
-// Name : conditiononfeature.cpp
-// Part of : System Startup / Starter
// Implementation of CConditionOnFeature class
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from conditiononfeature.cpp to cndfeature.cpp as part of Core OS transfer.
//
+
#include "cndfeature.h"
#include <featmgr/featurecontrol.h>
#include <featmgr/featmgr.h>
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndlogical.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndlogical.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : resourcecondition.cpp
-// Part of : System Startup / Condition
// Implementation of ResourceCondition class
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from resourcecondition.cpp to cndlogical.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndpublishsubscribe.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/cndpublishsubscribe.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,21 +11,8 @@
// Contributors:
//
// Description:
-// Name : conditiononpubsub.cpp
-// Part of : System Startup / Condition
// Implementation of CConditionOnPubSub and CConditionOnPubSubFlag
// classes
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from conditiononpubsub.cpp to cndpublishsubscribe.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstateplugins/conditionevaluator/src/conditionevaluate.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/conditionevaluator/src/conditionevaluate.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : resourcecondition.cpp
-// Part of : System Startup / Condition
// Implementation of ResourceCondition class
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from resourcecondition.cpp to conditionevaluate.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/group/app-framework_ssplugins.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component app-framework_ssplugins
source \sf\os\devicesrv\sysstatemgmt\systemstateplugins
binary \sf\os\devicesrv\sysstatemgmt\systemstateplugins\group all
--- a/sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/test/testapps/src/gsatestappgood_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="gsatestappgood";
}
-
\ No newline at end of file
+
--- a/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/test/tunitconditionevaluator/resource/tunitconditionevaluator.rss Thu Jun 24 11:22:10 2010 +0100
@@ -176,4 +176,5 @@
{
key = 0x2;
bitmask = 0x0010;
- }
\ No newline at end of file
+ }
+
--- a/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstateplugins/test/tunitutilityplugin/src/tutilityplugin_step.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -157,27 +157,27 @@
// OOM tests start here
__UHEAP_MARK;
- TRAP(err, doOOMTestL(&doTest1L));
+ TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest1L));
TEST(err == KErrNone);
__UHEAP_MARKEND;
__UHEAP_MARK;
- TRAP(err, doOOMTestL(&doTest2L));
+ TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest2L));
TEST(err == KErrNone);
__UHEAP_MARKEND;
__UHEAP_MARK;
- TRAP(err, doOOMTestL(&doTest3L));
+ TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest3L));
TEST(err == KErrNone);
__UHEAP_MARKEND;
__UHEAP_MARK;
- TRAP(err, doOOMTestL(&doTest5L));
+ TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest5L));
TEST(err == KErrNone);
__UHEAP_MARKEND;
__UHEAP_MARK;
- TRAP(err, doOOMTestL(&doTest6L));
+ TRAP(err, doOOMTestL(&CUtilityPluginTest::doTest6L));
TEST(err == KErrNone);
__UHEAP_MARKEND;
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -47,8 +47,8 @@
../inc/securitynotification.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(ssm/securitynotification.h)
../inc/ssmpropertyobserver.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(ssm/ssmpropertyobserver.h)
../inc/strtsecuritystatus.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(ssm/strtsecuritystatus.h)
-#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-../inc/startupadaptationadapter.h /epoc32/include/ssm/startupadaptationadapter.h
-#endif
+
+../inc/startupadaptationadapter.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(ssm/startupadaptationadapter.h)
+
../inc/clayerswp.hrh /epoc32/include/ssm/clayerswp.hrh
../inc/clayerdlldatadefs.rh SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(ssm/clayerdlldatadefs.rh)
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/group/ssmclayersup.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/group/ssmclayersup.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -32,7 +32,6 @@
USERINCLUDE ../inc
USERINCLUDE ../../localinc
USERINCLUDE ../../custcmd/inc
-USERINCLUDE ../../../../../../os/devicesrv/sysstatemgmt/systemstatereferenceplugins/custcmd/inc
SOURCEPATH ../src
SOURCE ssmsecurityeventobserver.cpp
@@ -45,6 +44,9 @@
SOURCEPATH ../../custcmd/src
SOURCE ssmsecuritychecknotifier.cpp
+SOURCEPATH ../../localsrc
+SOURCE ssmpanic.cpp
+
LIBRARY euser.lib
LIBRARY ssmuiproviderdll.lib
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/securitynotification.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/securitynotification.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,9 @@
* Contributors:
*
* Description:
-* Name : securitynotification.h
-* Part of : System Startup / Starter
* Interface : Domain, Security Notification API
* Parameter and constant definitions for launching
* security-related notifications using the Notifier Framework.
-* Version : %version: ou1s60rt#2.1.1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.1
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/simutils.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/simutils.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : simutils.h
-* Part of : System Startup / Starter
* Interface : Domain, SIM Utils API
* This file contains SIM Utils definitions of Startup subsystem.
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/ssmsecurityeventobserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/ssmsecurityeventobserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecurityeventobserver.h
-* Part of : System Startup / StrtSecObs
* Declaration of CStrtSecurityEventObserver class
-* Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
-* File renamed from strtsecurityeventobserver.h to ssmsecurityeventobserver.h as part of Core OS transfer.
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/ssmsecuritynotecontroller.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/ssmsecuritynotecontroller.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritynotecontroller.h
-* Part of : System Startup / StrtSecObs
* Declaration of CStrtSecurityNoteController class
-* Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
-* File renamed from strtsecuritynotecontroller.h to ssmsecuritynotecontroller.h as part of Core OS transfer.
*
*/
@@ -43,6 +30,7 @@
* @released
*/
+
class CSsmSecurityCheckNotifier;
class CStrtSecNoteRequestQueue;
@@ -98,10 +86,16 @@
/**
* From CActive.
* Handles an active object's request completion event.
- * Never leaves.
*/
virtual void RunL();
+ /**
+ * From CActive.
+ * Handles any leaves originating from the active object's RunL().
+ */
+
+ virtual TInt RunError(TInt aError);
+
private:
/**
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starter.hrh Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starter.hrh Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : starter.hrh
-* Part of : System Startup / Starter
* Interface : Domain, Extended Startup API
* Resource headers for projects StarterServer and StarterClient.
-* Version : %version: 6 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterclient.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterclient.h Thu Jun 24 11:22:10 2010 +0100
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : starterclient.h
-* Part of : System Startup / Starter
* Interface : Domain, System State Control API and Extended Startup API
* Declaration of RStarterSession interface
-* Version : %version: ou1s60rt#8 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterdomaincrkeys.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterdomaincrkeys.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : starterdomaincrkeys.h
-* Part of : System Startup / Starter
* Interface : Domain, Startup Status API.
* Domain Central Repository definitions of System Startup subsystem.
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterprivatecrkeys.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/starterprivatecrkeys.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : starterprivatecrkeys.h
-* Part of : System Startup / Starter
* Interface : Private, Starter Configuration API.
* Private Central Repository definitions of Starter component.
-* Version : %version: 2 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptation.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptation.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,9 @@
* Contributors:
*
* Description:
-* Name : startupadaptation.h
-* Part of : System Startup / Starter
* Interface : Domain, Startup Adaptation API
* This header file defines the Startup Adaptation API command
* interface used to issue commands towards adaptation.
-* Version : %version: ou1s60rt#6 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptation.inl Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptation.inl Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,9 @@
* Contributors:
*
* Description:
-* Name : startupadaptation.inl
-* Part of : System Startup / Starter
* Interface : Domain, Startup Adaptation API
* Implementation for inline functions of CStartupAdaptation
* class.
-* Version : %version: ou1s60rt#7 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationcommands.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationcommands.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,8 +12,6 @@
* Contributors:
*
* Description:
-* Name : startupadaptationcommands.h
-* Part of : System Startup / Starter
* Interface : Domain, Startup Adaptation API
* This header file defines the startup adaptation API commands
* and their parameters.
@@ -21,16 +19,6 @@
* - Command definitions
* - Command parameter definitions
* - Response parameter definitions
-* Version : %version: ou1s60rt#12.1.4 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
@@ -661,52 +649,58 @@
*/
enum TPreferredLanguage
- { // ISO 639 GSM 0338
- EPrefLangEnglish = 1, // EN 1
- EPrefLangFrench = 2, // FR 3
- EPrefLangGerman = 3, // DE 0
- EPrefLangSpanish = 4, // ES 4
- EPrefLangItalian = 5, // IT 2
- EPrefLangSwedish = 6, // SV 6
- EPrefLangDanish = 7, // DA 7
- EPrefLangNorwegian = 8, // NO 10
- EPrefLangFinnish = 9, // FI 9
- EPrefLangPortuguese = 13, // PT 8
- EPrefLangTurkish = 14, // TR 12
- EPrefLangIcelandic = 15, // IS 36
- EPrefLangRussian = 16, // RU 35
- EPrefLangHungarian = 17, // HU 13
- EPrefLangDutch = 18, // NL 5
- EPrefLangCzech = 25, // CS 32
- EPrefLangSlovak = 26, // SK
- EPrefLangPolish = 27, // PL 14
- EPrefLangSlovenian = 28, // SL
- EPrefLangPrcChinese = 31, // ZH
- EPrefLangJapanese = 32, // JA
- EPrefLangThai = 33, // TH
- EPrefLangArabic = 37, // AR 34
- EPrefLangTagalog = 39, // TL
- EPrefLangBulgarian = 42, // BG
- EPrefLangCatalan = 44, // CA
- EPrefLangCroatian = 45, // HR
- EPrefLangEstonian = 49, // ET
- EPrefLangFarsi = 50, // FA
- EPrefLangGreek = 54, // EL 11
- EPrefLangHebrew = 57, // IW 33
- EPrefLangHindi = 58, // HI
- EPrefLangIndonesian = 59, // IN
- EPrefLangKorean = 65, // KO
- EPrefLangLatvian = 67, // LV
- EPrefLangLithuanian = 68, // LT
- EPrefLangMalay = 70, // MS
- EPrefLangMarathi = 72, // MR
- EPrefLangRomanian = 78, // RO
- EPrefLangSerbian = 79, // SR
- EPrefLangUkrainian = 93, // UK
- EPrefLangUrdu = 94, // UR
- EPrefLangVietnamese = 96, // VI
- EPrefLangBasque = 102, // EU
- EPrefLangGalician = 103 // GL
+ { // ISO 639 GSM 0338
+ EPrefLangEnglish = 1, // EN 1
+ EPrefLangFrench = 2, // FR 3
+ EPrefLangGerman = 3, // DE 0
+ EPrefLangSpanish = 4, // ES 4
+ EPrefLangItalian = 5, // IT 2
+ EPrefLangSwedish = 6, // SV 6
+ EPrefLangDanish = 7, // DA 7
+ EPrefLangNorwegian = 8, // NO 10
+ EPrefLangFinnish = 9, // FI 9
+ EPrefLangAmerican = 10, // EN
+ EPrefLangPortuguese = 13, // PT 8
+ EPrefLangTurkish = 14, // TR 12
+ EPrefLangIcelandic = 15, // IS 36
+ EPrefLangRussian = 16, // RU 35
+ EPrefLangHungarian = 17, // HU 13
+ EPrefLangDutch = 18, // NL 5
+ EPrefLangCzech = 25, // CS 32
+ EPrefLangSlovak = 26, // SK
+ EPrefLangPolish = 27, // PL 14
+ EPrefLangSlovenian = 28, // SL
+ EPrefLangTaiwanChinese = 29, // TC
+ EPrefLangHongKongChinese = 30, // HK
+ EPrefLangPrcChinese = 31, // ZH
+ EPrefLangJapanese = 32, // JA
+ EPrefLangThai = 33, // TH
+ EPrefLangArabic = 37, // AR 34
+ EPrefLangTagalog = 39, // TL
+ EPrefLangBulgarian = 42, // BG
+ EPrefLangCatalan = 44, // CA
+ EPrefLangCroatian = 45, // HR
+ EPrefLangEstonian = 49, // ET
+ EPrefLangFarsi = 50, // FA
+ EPrefLangCanadianFrench = 51, // CF
+ EPrefLangGreek = 54, // EL 11
+ EPrefLangHebrew = 57, // IW 33
+ EPrefLangHindi = 58, // HI
+ EPrefLangIndonesian = 59, // IN
+ EPrefLangKorean = 65, // KO
+ EPrefLangLatvian = 67, // LV
+ EPrefLangLithuanian = 68, // LT
+ EPrefLangMalay = 70, // MS
+ EPrefLangMarathi = 72, // MR
+ EPrefLangBrazilianPortuguese = 76, // BP
+ EPrefLangRomanian = 78, // RO
+ EPrefLangSerbian = 79, // SR
+ EPrefLangLatinAmericanSpanish = 83, // LS
+ EPrefLangUkrainian = 93, // UK
+ EPrefLangUrdu = 94, // UR
+ EPrefLangVietnamese = 96, // VI
+ EPrefLangBasque = 102, // EU
+ EPrefLangGalician = 103 // GL
};
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationcommands.inl Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationcommands.inl Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,9 @@
* Contributors:
*
* Description:
-* Name : startupadaptationcommands.inl
-* Part of : System Startup / Starter
* Interface : Domain, Startup Adaptation API
* Implementation for inline functions of classes defined in
* startupadaptationcommands.h.
-* Version : %version: 2 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationevents.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationevents.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,24 +12,12 @@
* Contributors:
*
* Description:
-* Name : startupadaptationevents.h
-* Part of : System Startup / Starter
* Interface : Domain, Startup Adaptation API
* This header file defines the startup adaptation API events
* and their parameters.
* This file contains the following sections:
* - Event definitions
* - Event parameter definitions
-* Version : %version: 5 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationobserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupadaptationobserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,9 @@
* Contributors:
*
* Description:
-* Name : startupadaptationobserver.h
-* Part of : System Startup / Starter
* Interface : Domain, Startup Adaptation API
* This header file defines the startup adaptation API observer
* interface used to return responses and deliver events.
-* Version : %version: ou1s60rt#5 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.1
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupdomainpskeys.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupdomainpskeys.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : startupdomainpskeys.h
-* Part of : System Startup / Starter
* Interface : Domain, System State API
* This file contains Domain Publish & Subscribe definitions of Startup subsystem.
-* Version : %version: ou1s60rt#12 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
@@ -46,6 +34,21 @@
static const TUid KPSUidStartup = { 0x101F8766 };
+
+// =============================================================================
+// SIM Utils API
+// =============================================================================
+
+// Use TUid KPSUidStartup = { 0x101F8766 };
+
+/**
+* Note: Refer simutils.h for actual definitions.
+*/
+//const TUint32 KPSSimStatus = 0x00000031;
+//const TUint32 KPSSimOwned = 0x00000032;
+//const TUint32 KPSSimChanged = 0x00000033;
+
+
// =============================================================================
// System State API
// =============================================================================
@@ -271,6 +274,22 @@
};
// =============================================================================
+// Security Event SUP
+// =============================================================================
+/**
+* To be used by security event SUP to decide whether an event to be ignored or not
+*/
+
+// Use TUid KPSUidStartup = { 0x101F8766 };
+const TUint32 KIgnoreSecurityEvent = 0x00000302;
+enum TPSIgnoreSecurityEvent
+ {
+ EPSIgnoreSecurityEventUninitialized = KStartupEnumerationFirstValue,
+ EPSIgnoreSecurityEventEPin1Required,
+ EPSIgnoreSecurityEventEPhonePasswordRequired
+ };
+
+// =============================================================================
// Wakeup Alarm API
// =============================================================================
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupreason.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupreason.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,8 @@
* Contributors:
*
* Description:
-* Name : startupreason.h
-* Part of : System Startup / Starter
* Interface : Domain, Startup Reason API
* Contains enumeration of valid system startup reasons.
-* Version : %version: 2 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.1
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecnoterequestqueue.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecnoterequestqueue.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecnoterequestqueue.h
-* Part of : System Startup / StrtSecObs
* Declaration of CStrtSecNoteRequestQueue class
-* Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
-*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecphaseobserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecphaseobserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,19 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecphaseobserver.h
-* Part of : System Startup / StrtSecObs
* Declaration of CStrtSecPhaseObserver class
-* Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecuritynotetype.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecuritynotetype.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,19 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritynotetype.h
-* Part of : System Startup / StrtSecNote
* Definition of TStrtSecurityNoteType enumeration.
-* Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecuritystatus.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecuritystatus.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritystatus.h
-* Part of : System Startup / Starter
-* Interface : None
* TStrtSecurityStatus enumeration.
-* Version : %version: ou1s60rt#4 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.1
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecurityeventobserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecurityeventobserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,24 +11,11 @@
// Contributors:
//
// Description:
-// Name : strtsecurityeventobserver.cpp
-// Part of : System Startup / StrtSecObs
// Implementation of CStrtSecurityEventObserver class
-// Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1.1
-// Nokia Core OS *
-// File renamed from strtsecurityeventobserver.cpp to ssmsecurityeventobserver.cpp as part of Core OS transfer.
//
-
+#include <ssm/startupdomainpskeys.h>
#include "strtsecphaseobserver.h"
#include "ssmsecurityeventobserver.h"
#include "ssmsecuritynotecontroller.h"
@@ -139,8 +126,24 @@
switch (iEvent)
{
case RMobilePhone::EPin1Required:
- SimCodeRequest(ESecCodePIN1);
+ {
+ TInt pSIgnorePin1RequiredEvent( EPSIgnoreSecurityEventUninitialized );
+
+ //Get the KIgnoreSecurityEvent PS value
+ TInt err = RProperty::Get( KPSUidStartup, KIgnoreSecurityEvent, pSIgnorePin1RequiredEvent );
+ DEBUGPRINT2A("Getting KIgnoreSecurityEvent completed with %d ", err);
+ //Ignore the event only when KIgnoreSecurityEvent value is EPSIgnoreSecurityEventEPin1Required
+ if( KErrNone == err && EPSIgnoreSecurityEventEPin1Required == pSIgnorePin1RequiredEvent )
+ {
+ err = RProperty::Set( KPSUidStartup, KIgnoreSecurityEvent, EPSIgnoreSecurityEventUninitialized );
+ DEBUGPRINT2A("Setting KIgnoreSecurityEvent completed with %d ", err);
+ }
+ else
+ {
+ SimCodeRequest(ESecCodePIN1);
+ }
break;
+ }
case RMobilePhone::EPuk1Required:
SimCodeRequest(ESecCodePUK1);
break;
@@ -151,8 +154,24 @@
SimCodeRequest(ESecCodePUK2);
break;
case RMobilePhone::EPhonePasswordRequired:
- SecCodeRequest(ESecCodePasswd);
+ {
+ TInt pSIgnorePhonePasswordRequiredEvent( EPSIgnoreSecurityEventUninitialized );
+
+ //Get the KCancelSecurityNotifier PS value
+ TInt err = RProperty::Get( KPSUidStartup, KIgnoreSecurityEvent, pSIgnorePhonePasswordRequiredEvent );
+ DEBUGPRINT2A("Getting KIgnoreSecurityEvent completed with %d ", err);
+ //Ignore the event only when KIgnoreSecurityEvent value is EPSIgnoreSecurityEventEPhonePasswordRequired
+ if( KErrNone == err && EPSIgnoreSecurityEventEPhonePasswordRequired == pSIgnorePhonePasswordRequiredEvent )
+ {
+ err = RProperty::Set( KPSUidStartup, KIgnoreSecurityEvent, EPSIgnoreSecurityEventUninitialized );
+ DEBUGPRINT2A("Setting KIgnoreSecurityEvent completed with %d ", err);
+ }
+ else
+ {
+ SecCodeRequest(ESecCodePasswd);
+ }
break;
+ }
case RMobilePhone::EPin1Verified:
CodeVerifyIndication(ESecCodePIN1);
break;
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecuritynotecontroller.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecuritynotecontroller.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsecuritynotecontroller.cpp
-// Part of : System Startup / StrtSecObs
// Implementation of CStrtSecurityNoteController class
-// Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1.1
-// Nokia Core OS *
-// File renamed from strtsecuritynotecontroller.cpp to ssmsecuritynotecontroller.cpp as part of Core OS transfer.
//
@@ -33,6 +20,9 @@
#include "ssmsecuritynotecontroller.h"
#include "ssmsecuritychecknotifier.h"
#include "ssmdebug.h"
+#include "ssmpanic.h"
+#include <ssm/ssmstatemanager.h>
+#include <ssm/startupreason.h>
CStrtSecurityNoteController* CStrtSecurityNoteController::NewL()
{
@@ -89,6 +79,36 @@
SetActive();
}
}
+#ifdef _DEBUG
+TInt CStrtSecurityNoteController::RunError(TInt aError)
+#else
+TInt CStrtSecurityNoteController::RunError(TInt)
+#endif // _DEBUG
+ {
+ DEBUGPRINT2A("CStrtSecurityNoteController RunL completed with error %d", aError);
+#ifdef _DEBUG
+ PanicNow(KPanicSecurityNoteController, aError);
+#else
+ RSsmStateManager session;
+ TInt errorCode = session.Connect();
+ if ( KErrNone == errorCode )
+ {
+ TSsmStateTransition stateinfo( ESsmShutdown, KSsmAnySubState, EUnknownReset );
+ errorCode = session.RequestStateTransition( stateinfo );
+ if( KErrNone != errorCode )
+ {
+ PanicNow(KPanicSecurityNoteController, errorCode);
+ }
+ session.Close();
+ }
+ else
+ {
+ PanicNow(KPanicSecurityNoteController, errorCode);
+ }
+#endif //_DEBUG
+
+ return KErrNone;
+ }
CStrtSecurityNoteController::CStrtSecurityNoteController()
: CActive( EPriorityStandard ),
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsimstatusobserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsimstatusobserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -155,10 +155,16 @@
*
* @internalComponent
*/
+#ifdef _DEBUG
TInt CSsmSimStatusObserver::RunError(TInt aError)
+#else
+TInt CSsmSimStatusObserver::RunError(TInt)
+#endif // _DEBUG
{
DEBUGPRINT2A("CSsmSimStatusObserver RunError received error: %d", aError);
- return aError;
+ //Errors are thrown if SWP transitions are not allowed.
+ //So, handles such errors gracefully.
+ return KErrNone;
}
/**
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/src/strtsecnoterequestqueue.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/src/strtsecnoterequestqueue.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,19 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsecnoterequestqueue.cpp
-// Part of : System Startup / StrtSecObs
// Implementation of CStrtSecNoteRequestQueue class
-// Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1.1
-// Nokia Core OS *
//
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/src/strtsecphaseobserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/src/strtsecphaseobserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,19 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsecphaseobserver.cpp
-// Part of : System Startup / StrtSecObs
// Implementation of CStrtSecPhaseObserver class
-// Version : %version: 1 % << Don't touch! Updated by Synergy at check-out.
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1.1
-// Nokia Core OS *
//
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/bwins/ssmuiproviderdllswitchu.def Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/bwins/ssmuiproviderdllswitchu.def Thu Jun 24 11:22:10 2010 +0100
@@ -26,3 +26,5 @@
call_vector_25 @ 25 NONAME
call_vector_26 @ 26 NONAME
call_vector_27 @ 27 NONAME
+ call_vector_28 @ 28 NONAME
+ call_vector_29 @ 29 NONAME
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/bwins/ssmuiproviderdllu.def Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/bwins/ssmuiproviderdllu.def Thu Jun 24 11:22:10 2010 +0100
@@ -26,3 +26,5 @@
?ValidateRTCPropertyKey@CSsmUiSpecific@@SAIXZ @ 25 NONAME ; unsigned int CSsmUiSpecific::ValidateRTCPropertyKey(void)
?ValidateRTCPropertyCategory@CSsmUiSpecific@@SA?AVTUid@@XZ @ 26 NONAME ; class TUid CSsmUiSpecific::ValidateRTCPropertyCategory(void)
?PhoneMemoryRootDriveId@CSsmUiSpecific@@SAHXZ @ 27 NONAME ; int CSsmUiSpecific::PhoneMemoryRootDriveId(void)
+ ?ReservePhoneMemorySpace@CSsmUiSpecific@@QAEHXZ @ 28 NONAME ; int CSsmUiSpecific::ReservePhoneMemorySpace(void)
+ ?FreeReservedPhoneMemorySpace@CSsmUiSpecific@@QAEHH@Z @ 29 NONAME ; int CSsmUiSpecific::FreeReservedPhoneMemorySpace(int)
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/eabi/ssmuiproviderdllu.def Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/eabi/ssmuiproviderdllu.def Thu Jun 24 11:22:10 2010 +0100
@@ -28,3 +28,5 @@
_ZN14CSsmUiSpecific22ValidateRTCPropertyKeyEv @ 27 NONAME
_ZN14CSsmUiSpecific27ValidateRTCPropertyCategoryEv @ 28 NONAME
_ZN14CSsmUiSpecific22PhoneMemoryRootDriveIdEv @ 29 NONAME
+ _ZN14CSsmUiSpecific23ReservePhoneMemorySpaceEv @ 30 NONAME
+ _ZN14CSsmUiSpecific28FreeReservedPhoneMemorySpaceEi @ 31 NONAME
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/group/ssmuiproviderdlldefault.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/group/ssmuiproviderdlldefault.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -44,5 +44,6 @@
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
LIBRARY euser.lib
+LIBRARY efsrv.lib
SMPSAFE
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/cmddevicesecuritycheck.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/cmddevicesecuritycheck.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtdevlockcheck.h
-* Part of : System Startup / StrtDevLockPlg
* Declaration of CStrtDevLockCheck class.
-* Version : %version: 1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.2
-* Nokia Core OS *
-* File renamed from strtdevlockcheck.h to cmddevicesecuritycheck.h as part of Core OS transfer.
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/cmdsimsecuritycheck.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/cmdsimsecuritycheck.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritychecktask.h
-* Part of : System Startup / Starter
* Declaration of CStrtSecurityCheckTask class
-* Version : %version: ou1s60rt#5.1.1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from strtsecuritychecktask.h to cmdsimsecuritycheck.h as part of Core OS transfer.
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/securitynoteobserver.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/securitynoteobserver.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritynoteobserver.h
-* Part of : System Startup / Starter
-* Interface : None
* Declaration of CStrtSecurityNoteObserver class.
-* Version : %version: ou1s60rt#4 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from strtsecuritynoteobserver.h to securitynoteobserver.h as part of Core OS transfer.
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmrefcustomcmdcommon.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmrefcustomcmdcommon.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritychecktask.h
-* Part of : System Startup / Starter
* Declaration of CStrtSecurityCheckTask class
-* Version : %version: ou1s60rt#5.1.1 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from strtsecuritychecktask.h to ssmrefcustomcmdcommon.h as part of Core OS transfer.
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmsecuritychecknotifier.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmsecuritychecknotifier.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,21 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsecuritynote.h
-* Part of : System Startup / Starter
-* Interface : None
* Declaration of CStrtSecurityNote class.
-* Version : %version: ou1s60rt#4 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
-* File renamed from strtsecuritynote.h to ssmsecuritychecknotifier.h as part of Core OS transfer.
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdll.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdll.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -25,6 +25,7 @@
#include <e32def.h>
#include <e32cmn.h>
#include <e32base.h>
+#include <f32file.h>
class CSsmUiSpecific : public CBase
{
@@ -56,12 +57,17 @@
IMPORT_C static TUint ValidateRTCPropertyKey();
IMPORT_C static TUid ValidateRTCPropertyCategory();
IMPORT_C static TInt PhoneMemoryRootDriveId();
+ IMPORT_C TInt ReservePhoneMemorySpace();
+ IMPORT_C TInt FreeReservedPhoneMemorySpace(const TInt aSpaceToFree);
private:
CSsmUiSpecific();
+ void ConstructL();
private:
TStrtSecurityStatus iStrtSecurityStatus;
TInt iReferenceCount;
+ RFs iReservedPhoneMemoryFs;
+ TInt iReservedPhoneMemory;
};
#endif // __SSMUIPROVIDERDLL_H__
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdllswitch_stubs.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/ssmuiproviderdllswitch_stubs.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -266,7 +266,25 @@
_asm mov eax, 27
_asm jmp common_dispatch
}
+
+__declspec(dllexport)
+__declspec(naked)
+void call_vector_28 ()
+ {
+ //TInt ReservePhoneMemorySpace()
+ _asm mov eax, 28
+ _asm jmp common_dispatch
+ }
+
+__declspec(dllexport)
+__declspec(naked)
+void call_vector_29 ()
+ {
+ //TInt FreeReservedPhoneMemorySpace(const TInt aSpaceToFree)
+ _asm mov eax, 29
+ _asm jmp common_dispatch
+ }
}
-#define MAX_ORDINAL 27
+#define MAX_ORDINAL 29
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/swppolicy_simstatus.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/inc/swppolicy_simstatus.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -12,20 +12,7 @@
* Contributors:
*
* Description:
-* Name : strtsimstatusmgr.h
-* Part of : System Startup / Starter
-* Interface : None
* Declaration of TStrtSimStatusMgr class.
-* Version : %version: ou1s60rt#7 %
-* This material, including documentation and any related computer
-* programs, is protected by copyright controlled by Nokia. All
-* rights are reserved. Copying, including reproducing, storing,
-* adapting or translating, any or all of this material requires the
-* prior written consent of Nokia. This material also contains
-* confidential information which may not be disclosed to others
-* without the prior written consent of Nokia.
-* Template version: 4.0
-* Nokia Core OS *
*
*/
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/cmddevicesecuritycheck.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/cmddevicesecuritycheck.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtdevlockcheck.cpp
-// Part of : System Startup / StrtDevLockPlg
// Implementation of CStrtDevLockCheck class.
-// Version : %version: 1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1.1
-// Nokia Core OS *
-// File renamed from strtdevlockcheck.cpp to cmddevicesecuritycheck.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/cmdsimsecuritycheck.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/cmdsimsecuritycheck.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsecuritychecktask.cpp
-// Part of : System Startup / Starter
// Implementation of CStrtSecurityCheckTask class
-// Version : %version: ou1s60rt#7.1.1 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from strtsecuritychecktask.cpp to cmdsimsecuritycheck.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/securitynoteobserver.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/securitynoteobserver.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsecuritynoteobserver.cpp
-// Part of : System Startup / Starter
// Implementation of CStrtSecurityNoteObserver class.
-// Version : %version: 3 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from strtsecuritynoteobserver.cpp to securitynoteobserver.cpp as part of Core OS transfer.
//
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmsecuritychecknotifier.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmsecuritychecknotifier.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,20 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsecuritynote.cpp
-// Part of : System Startup / Starter
// Implementation of CStrtSecurityNote class.
-// Version : %version: 4 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
-// File renamed from strtsecuritynote.cpp to ssmsecuritychecknotifier.cpp as part of Core OS transfer.
//
@@ -42,7 +29,8 @@
#include <ssm/ssmstateawaresession.h>
#include <e32def.h>
#include <startupdomaindefs.h>
-#include <etelmm.h>
+#include <etelmm.h>
+#include <ctsydomainpskeys.h>
static TBool NoteTypeToEvent(
TInt& aEventCode, const TStrtSecurityNoteType aNoteType )
@@ -215,8 +203,15 @@
TBool isDlgCancellable;
//Is system in start up state
-
- iAfterStartup = (currentState.MainState() == ESsmStartup) ? EFalse : ETrue;
+ if ( currentState.MainState() == ESsmStartup )
+ {
+ //TSsmStartupSubStateExt::ESsmStateNonCritical
+ iAfterStartup = ( 0x34 == currentState.SubState() ) ? ETrue : EFalse;
+ }
+ else
+ {
+ iAfterStartup = ETrue;
+ }
//Close the state aware session
ssmStateAwareSession.Close();
@@ -248,10 +243,26 @@
}
else if (iCmdState == EEmergencyCallIsActive && iStatus.Int() != KErrCancel)
{
- // Emergency call activated from the security note dialog has
- // finished. Show the note again.
- DEBUGPRINT1A("ECall Ended and restarting pin notifier");
- StartNotifier();
+ TInt value = -1;
+ const TInt errorcode = iSsmEmergencyCallProperty.Get( value );
+ DEBUGPRINT3A("iSsmEmergencyCallProperty.Get() has returned value %d and errorcode %d", value , errorcode);
+ if (KErrNone == errorcode)
+ {
+ // Compare the property value with EPSCTsyCallStateNone. This indicates the call has finished.
+ if (EPSCTsyCallStateNone == value)
+ {
+ // Emergency call activated from the security note dialog has
+ // finished. Show the note again.
+ DEBUGPRINT1A("ECall Ended and restarting pin notifier");
+ StartNotifier();
+ }
+ else
+ {
+ //Subscribe to the property again if the property key value is not yet set to EPSCTsyCallStateNone.
+ iSsmEmergencyCallProperty.Subscribe(iStatus);
+ SetActive();
+ }
+ }
}
else
{
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdlldefault.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmuiproviderdlldefault.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -21,7 +21,7 @@
#include "ssmuiproviderdll.h"
#include "ssmpanic.h"
#include <e32property.h>
-#include <f32file.h>
+#include "ssmdebug.h"
const TUid KPSStartupUid = {0x2000E65E};
const TUid KSecurityPinNotifierUid = {0x2000E667};
@@ -37,17 +37,20 @@
const TUint KRFStatusPropertyKey = 0x2001D2A9;
const TUid KValidateRTCPropertyCategory = {0x2000D75B};
const TUint KValidateRTCPropertyKey = 0x2001D2AB;
+//Number of clusterSize to be reserve for phone memory space
+const TInt KNumberOfCluster = 2;
_LIT(KTsyModuleName, "mm.tsy");
_LIT(KTsyPhoneName, "GsmPhone1");
CSsmUiSpecific::CSsmUiSpecific()
-: iReferenceCount(1)
+: iReferenceCount(1), iReservedPhoneMemory(0)
{
}
EXPORT_C CSsmUiSpecific::~CSsmUiSpecific()
{
+ iReservedPhoneMemoryFs.Close();
}
EXPORT_C TUid CSsmUiSpecific::StartupPSUid()
@@ -95,7 +98,7 @@
//Instantiate CSsmUiSpecific if TLS is null
self = new (ELeave) CSsmUiSpecific();
CleanupStack::PushL(self);
-
+ self->ConstructL();
//Copy CSsmUiSpecific pointer in TLS
User::LeaveIfError(Dll::SetTls(self));
CleanupStack::Pop(self);
@@ -203,3 +206,73 @@
return EDriveC;
}
+/**
+Leaving construction inside ConstructL
+*/
+void CSsmUiSpecific::ConstructL()
+ {
+ User::LeaveIfError( iReservedPhoneMemoryFs.Connect() );
+ }
+
+/**
+Reserve two ClusterSize in Phone Memory Space on H/W
+and 512 bytes for __WINS__
+@return KErrNone if successful or systemwide error
+*/
+EXPORT_C TInt CSsmUiSpecific::ReservePhoneMemorySpace()
+ {
+ TVolumeIOParamInfo volumeParamInfo;
+ const TInt phoneMemoryDriveID = PhoneMemoryRootDriveId();
+ TInt errorCode = iReservedPhoneMemoryFs.VolumeIOParam(phoneMemoryDriveID, volumeParamInfo);
+ if( KErrNone == errorCode )
+ {
+#ifdef __WINS__
+ //512 bytes for __WINS__
+ const TInt reservedMemory = 512;
+#else
+ //Reserving two clusterSize Phone memory
+ const TInt reservedMemory = KNumberOfCluster * (volumeParamInfo.iClusterSize);
+#endif //__WINS__
+ errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace(phoneMemoryDriveID, reservedMemory);
+
+ if ( KErrNone == errorCode )
+ {
+ iReservedPhoneMemory = reservedMemory;
+ }
+ }
+ return errorCode;
+ }
+
+/**
+Free reserved bytes from Phone Memory Space. If aSpaceToFree is 0 bytes
+then free complete reserved memory
+@param aSpaceToFree request to free memory
+@return KErrNone if successful or systemwide error
+*/
+EXPORT_C TInt CSsmUiSpecific::FreeReservedPhoneMemorySpace(const TInt aSpaceToFree)
+ {
+ TInt errorCode(KErrGeneral);
+ DEBUGPRINT3A("Reserved memory is = %d bytes, Request to free memory is = %d bytes", iReservedPhoneMemory, aSpaceToFree);
+ if(0 < iReservedPhoneMemory)
+ {
+ if(0 == aSpaceToFree)
+ {
+ //Free complete reserved phone memory
+ errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace( PhoneMemoryRootDriveId(), 0 );
+ DEBUGPRINT2A("Freeing memory completed with = %d", errorCode);
+ iReservedPhoneMemory = 0;
+ }
+ else
+ {
+ TInt newReserveSize = iReservedPhoneMemory - aSpaceToFree;
+ newReserveSize = newReserveSize >= 0 ? newReserveSize : 0;
+ errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace( PhoneMemoryRootDriveId(), newReserveSize );
+ DEBUGPRINT2A("Freeing partial phone memory completed with = %d", errorCode);
+ if(KErrNone == errorCode)
+ {
+ iReservedPhoneMemory = newReserveSize;
+ }
+ }
+ }
+ return errorCode;
+ }
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/swppolicy_simstatus.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/swppolicy_simstatus.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -11,19 +11,7 @@
// Contributors:
//
// Description:
-// Name : strtsimstatusmgr.cpp
-// Part of : System Startup / Starter
// Implementation of TStrtSimStatusMgr class.
-// Version : %version: 7 %
-// This material, including documentation and any related computer
-// programs, is protected by copyright controlled by Nokia. All
-// rights are reserved. Copying, including reproducing, storing,
-// adapting or translating, any or all of this material requires the
-// prior written consent of Nokia. This material also contains
-// confidential information which may not be disclosed to others
-// without the prior written consent of Nokia.
-// Template version: 4.1
-// Nokia Core OS *
//
@@ -37,6 +25,7 @@
#include "ssmuiproviderdll.h"
#include "swppolicy_simstatus.h"
+#include "ssmdebug.h"
#include <ssm/ssmswppolicy.h>
#include <ssm/ssmstatemanager.h>
@@ -221,9 +210,20 @@
{
(void)aSwp;
(void)aSeverity;
+ (void)aError;
TRequestStatus* rs = &aStatus;
+#if defined(_DEBUG)
+ if(KErrNone != aError)
+ {
+ DEBUGPRINT3A("ERROR: Request SwP change for SIM status (SwP key %d) completed with error %d", aSwp.Key(), aError);
+ }
+ //Complete the status with the error which inturn panics SSM server
User::RequestComplete(rs, aError);
+#else // _DEBUG
+ //Completing the status with KErrNone to avoid panic in SSM server
+ User::RequestComplete(rs, KErrNone);
+#endif // _DEBUG
}
void CSimStatuspolicy::HandleCleReturnValueCancel()
--- a/sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/group/app-framework_ssrefplugins.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component app-framework_ssrefplugins
source \sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins
binary \sf\os\devicesrv\sysstatemgmt\systemstatereferenceplugins\group all
--- a/sysstatemgmt/systemstatereferenceplugins/localinc/ssmpanic.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/localinc/ssmpanic.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -48,6 +48,7 @@
_LIT(KPanicSsmUiSpecific, "CSsmUiSpecific");
_LIT(KPanicCustomCmdDeviceSecurityCheck, "CCustomCmdDeviceSecurityCheck");
_LIT(KPanicSecurityCheckNotifier, "CSsmSecurityCheckNotifier");
+_LIT(KPanicSecurityNoteController, "CStrtSecurityNoteController");
/** Defines all possible panic codes within System State Management component
--- a/sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/tclayer_server.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tclayer/group/tclayer_server.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -141,4 +141,8 @@
//Needed for security event observer
SOURCE ssmsecuritychecknotifier.cpp
+//Needed for security note controller
+SOURCEPATH ../../../localsrc
+SOURCE ssmpanic.cpp
+
SMPSAFE
Binary file sysstatemgmt/systemstatereferenceplugins/test/tintcustcmd/group/101F8762.txt has changed
Binary file sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/group/101F8762.txt has changed
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/inc/tcmd_step_publishstartupmode.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/inc/tcmd_step_publishstartupmode.h Thu Jun 24 11:22:10 2010 +0100
@@ -25,12 +25,13 @@
#include <test/testexecutestepbase.h>
-_LIT(KTCCustomCmdTestPublishStartupMode, "CCustomCmdTestPublishStartupMode");
+_LIT(KTestPublishStartupModeWithCap, "TestPublishStartupModeWithCap");
+_LIT(KTestPublishStartupModeWithoutCap,"TestPublishStartupModeWithoutCap");
class CCustomCmdTestPublishStartupMode: public CTestStep
{
public:
- CCustomCmdTestPublishStartupMode();
+ CCustomCmdTestPublishStartupMode(const TDesC& aTestStepName);
~CCustomCmdTestPublishStartupMode();
//from CTestStep
@@ -48,6 +49,7 @@
CActiveScheduler* iActiveScheduler;
CAsyncCallBack* iAsyncStopScheduler;
TRequestStatus iRequestStatus;
+ const TDesC& iTestStepName;
};
#endif // __TCMD_STEP_PUBLISHSTARTUPMODE_H__
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_publishstartupmode.script Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_publishstartupmode.script Thu Jun 24 11:22:10 2010 +0100
@@ -19,11 +19,10 @@
START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0022
//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0022
-//! @SYMPREQ PREQ1871
//! @SYMTestType UT
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
-//! @SYMTestCaseDesc Tests the behaviour of CCustomCmdPublishStartupMode.
+//! @SYMTestCaseDesc Tests the behaviour of CCustomCmdPublishStartupMode with all the required capabilities (PowerMgmt,ProtServ & WriteDeviceData).
//! Tests the cancel behaviour of CCustomCmdPublishStartupMode.
//! @SYMTestActions doTestCreateExecuteAndDestroyL() The test performs operations on a CCustomCmdPublishStartupMode object, namely calling the following methods:
//! 1. NewL - Creating the object
@@ -37,6 +36,59 @@
//! 4. ExecuteCancel - Cancels the custom command
//! 5. Close - Closes the custom command
//! @SYMTestExpectedResults Command should execute normally and should complete with KErrNone.
-RUN_TEST_STEP 100 tunitcustcmd_server CCustomCmdTestPublishStartupMode
+RUN_TEST_STEP 100 tunitcustcmd_server TestPublishStartupModeWithCap
END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0022
+RUN_PROGRAM 50 setcap.exe tunitcustcmd_server.exe 000024 tunitcustcmd_server_WithoutCap1.exe
+
+LOAD_SUITE tunitcustcmd_server_WithoutCap1
+
+START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0032
+//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0032
+//! @TaskID bh1sosd4#32
+//! @SYMTestType UT
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//! @SYMTestCaseDesc Tests whether setting the Central Repository key 101f8762 fails without proper write capabilities (without ProtServ capability)
+//! @SYMTestActions doTestStepPreambleL() The test performs operations on a CRepository object, namely calling the following methods:
+//! 1. NewL - Creating the object
+//! 2. Set - Setting the Central Repository key
+//! @SYMTestExpectedResults Setting the Central Repository key 101f8762 should fail & complete with KErrPermissionDenied.
+RUN_TEST_STEP 100 tunitcustcmd_server_WithoutCap1 TestPublishStartupModeWithoutCap
+END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0032
+
+RUN_PROGRAM 50 setcap.exe tunitcustcmd_server.exe 000120 tunitcustcmd_server_WithoutCap2.exe
+
+LOAD_SUITE tunitcustcmd_server_WithoutCap2
+
+START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0033
+//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0033
+//! @TaskID bh1sosd4#32
+//! @SYMTestType UT
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//! @SYMTestCaseDesc Tests whether setting the Central repository key 101f8762 fails without write capabilities (without PowerMgmt capability)
+//! @SYMTestActions doTestStepPreambleL() The test performs operations on a CRepository object, namely calling the following methods:
+//! 1. NewL - Creating the object
+//! 2. Set - Setting the Central Repository key
+//! @SYMTestExpectedResults Setting the Central Repository key 101f8762 should fail & complete with KErrPermissionDenied.
+RUN_TEST_STEP 100 tunitcustcmd_server_WithoutCap2 TestPublishStartupModeWithoutCap
+END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0033
+
+RUN_PROGRAM 50 setcap.exe tunitcustcmd_server.exe 000104 tunitcustcmd_server_WithoutCap3.exe
+
+LOAD_SUITE tunitcustcmd_server_WithoutCap3
+
+START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0034
+//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0034
+//! @TaskID bh1sosd4#32
+//! @SYMTestType UT
+//! @SYMTestPriority High
+//! @SYMTestStatus Implemented
+//! @SYMTestCaseDesc Tests whether setting the Central repository key 101f8762 fails without write capabilities (without WriteDeviceData capability)
+//! @SYMTestActions doTestStepPreambleL() The test performs operations on a CRepository object, namely calling the following methods:
+//! 1. NewL - Creating the object
+//! 2. Set - Setting the Central Repository key
+//! @SYMTestExpectedResults Setting the Central Repository key 101f8762 should fail & complete with KErrPermissionDenied.
+RUN_TEST_STEP 100 tunitcustcmd_server_WithoutCap3 TestPublishStartupModeWithoutCap
+END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0034
\ No newline at end of file
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_server.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_server.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -126,10 +126,14 @@
{
testStep = new CCustomCmdTestCoopSysStateChange();
}
- else if (aStepName == KTCCustomCmdTestPublishStartupMode)
+ else if (aStepName == KTestPublishStartupModeWithCap)
{
- testStep = new CCustomCmdTestPublishStartupMode();
+ testStep = new CCustomCmdTestPublishStartupMode(KTestPublishStartupModeWithCap);
}
+ else if (aStepName == KTestPublishStartupModeWithoutCap)
+ {
+ testStep = new CCustomCmdTestPublishStartupMode(KTestPublishStartupModeWithoutCap);
+ }
else if (aStepName == KTCCustomCmdTestPublishSimOwnedAndChanged)
{
testStep = new CCustomCmdTestPublishSimOwnedAndChanged();
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_publishstartupmode.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_publishstartupmode.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -32,6 +32,7 @@
#include <ssm/startupdomainpskeys.h>
#include <ssm/starterdomaincrkeys.h>
#include <e32property.h>
+#include <e32cmn.h>
#include <centralrepository.h>
//Exe name which defines startup PS keys
@@ -44,12 +45,19 @@
delete iAsyncStopScheduler;
}
-CCustomCmdTestPublishStartupMode::CCustomCmdTestPublishStartupMode()
+CCustomCmdTestPublishStartupMode::CCustomCmdTestPublishStartupMode(const TDesC& aTestStepName):iTestStepName(aTestStepName)
{
- SetTestStepName(KTCCustomCmdTestPublishStartupMode);
+ if (iTestStepName == KTestPublishStartupModeWithCap)
+ {
+ SetTestStepName(KTestPublishStartupModeWithCap);
+ }
+ else
+ {
+ SetTestStepName(KTestPublishStartupModeWithoutCap);
+ }
}
-//
+
static TInt CallBackL(TAny* aCCustomCmdTestPublishStartupMode)
{
//Call back function to stop active scheduler
@@ -74,32 +82,35 @@
TVerdict CCustomCmdTestPublishStartupMode::doTestStepPreambleL()
{
- INFO_PRINTF1(_L("doTestStepPreambleL"));
- //Create and install active scheduler
- iActiveScheduler = new(ELeave) CActiveScheduler;
- CActiveScheduler::Install (iActiveScheduler);
-
- //Needed for calling callback for stopping active scheduler
- iAsyncStopScheduler = new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
-
- INFO_PRINTF1(_L("Define global startup mode property"));
-
- RProcess process;
- //Start the test exe which defines startup related property keys
- TInt err = process.Create(KExeToDefineStartUpPS, KStartUpPSKeys());
- INFO_PRINTF2(_L("Define global startup mode property process created with %d"), err);
- TEST(KErrNone == err);
- User::LeaveIfError(err);
- process.Resume();
-
- process.Rendezvous(iRequestStatus);
- User::WaitForRequest(iRequestStatus);
- TEST(KErrNone == iRequestStatus.Int());
-
- //Kill the define startup ps process
- process.Kill(KErrNone);
- process.Close();
-
+ INFO_PRINTF1(_L("doTestStepPreambleL"));
+ if (iTestStepName == KTestPublishStartupModeWithCap)
+ {
+ RProcess process;
+ CleanupClosePushL(process);
+ //Create and install active scheduler
+ iActiveScheduler = new(ELeave) CActiveScheduler;
+ CActiveScheduler::Install (iActiveScheduler);
+
+ //Needed for calling callback for stopping active scheduler
+ iAsyncStopScheduler = new(ELeave) CAsyncCallBack(CActive::EPriorityIdle);
+
+ INFO_PRINTF1(_L("Define global startup mode property"));
+
+ //Start the test exe which defines startup related property keys
+ TInt err = process.Create(KExeToDefineStartUpPS, KStartUpPSKeys());
+ INFO_PRINTF2(_L("Define global startup mode property process created with %d"), err);
+ TEST(KErrNone == err);
+ User::LeaveIfError(err);
+ process.Resume();
+
+ process.Rendezvous(iRequestStatus);
+ User::WaitForRequest(iRequestStatus);
+ TEST(KErrNone == iRequestStatus.Int());
+
+ //Kill the define startup ps process
+ process.Kill(KErrNone);
+ CleanupStack::PopAndDestroy(&process);
+ }
return CTestStep::doTestStepPreambleL();
}
@@ -112,13 +123,30 @@
{
INFO_PRINTF1(_L("Entering test for publish startup mode custom command"));
__UHEAP_MARK;
-
- TRAPD(err, doTestCreateExecuteAndDestroyL());
- TEST(err == KErrNone);
-
- TRAP(err, doTestFactoryCreateAndExecuteCancelL());
- TEST(err == KErrNone);
-
+ RProcess process(KCurrentProcessHandle);
+ if(!(process.HasCapability(ECapabilityPowerMgmt) &&
+ process.HasCapability(ECapabilityWriteDeviceData)&&
+ process.HasCapability(ECapabilityProtServ)))
+ {
+ TUid KCentRepId = {0x101f8762};
+ CRepository* repository = NULL;
+ repository = CRepository::NewL(KCentRepId);
+
+ TInt ret = repository->Set(KStartupReason, ENormalStartup);
+ delete repository;
+ INFO_PRINTF3(_L("Setting Central Repository key 101f8762 Return value = %d Expected value = %d"),ret, KErrPermissionDenied);
+ TEST(ret == KErrPermissionDenied);
+ }
+ else
+ {
+ TRAPD(err, doTestCreateExecuteAndDestroyL());
+ TEST(err == KErrNone);
+
+ TRAP(err, doTestFactoryCreateAndExecuteCancelL());
+ TEST(err == KErrNone);
+
+
+ }
__UHEAP_MARKEND;
INFO_PRINTF1(_L("Leaving test for publish startup mode custom command"));
return TestStepResult();
@@ -138,8 +166,10 @@
TUid KCentRepId = {0x101f8762};
CRepository* repository = CRepository::NewL(KCentRepId);
TInt ret = repository->Set(KStartupReason, ENormalStartup);
- delete repository;
-
+ delete repository;
+ INFO_PRINTF3(_L("Setting Central Repository key 101f8762 Return value = %d Expected value = %d"),ret, KErrNone);
+ TEST(ret == KErrNone);
+
TInt startUpMode = -1;
//Setting inital value of startUpMode as -1
--- a/sysstatemgmt/sysuiprovider/inc/ssmuispecific.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/sysuiprovider/inc/ssmuispecific.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -168,18 +168,36 @@
*/
IMPORT_C static TInt PhoneMemoryRootDriveId();
+ /**
+ Reserve two ClusterSize in Phone Memory Space on H/W
+ and 512 bytes for __WINS__
+ @return KErrNone if successful or systemwide error
+ */
+ IMPORT_C TInt ReservePhoneMemorySpace();
+
+ /**
+ Free reserved bytes from Phone Memory Space. If aSpaceToFree is 0 bytes
+ then free complete reserved memory
+ @param aSpaceToFree request to free memory
+ @return KErrNone if successful or systemwide error
+ */
+ IMPORT_C TInt FreeReservedPhoneMemorySpace(const TInt aSpaceToFree);
+
private:
/**
* Constructor.
*/
CSsmUiSpecific();
+
+ void ConstructL();
private: // data
TStrtSecurityStatus iStrtSecurityStatus;
TInt iReferenceCount;
-
+ RFs iReservedPhoneMemoryFs;
+ TInt iReservedPhoneMemory;
};
#endif // SSMUISPECIFIC_H
--- a/sysstatemgmt/sysuiprovider/src/ssmuispecific.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/sysuiprovider/src/ssmuispecific.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -36,6 +36,8 @@
// Type definitions for a buffer containing a drive id (drive letter + :).
const TInt KDriveIdLength = 2;
+//Number of clusterSize to be reserve for phone memory space
+const TInt KNumberOfCluster = 2;
typedef TBuf<KDriveIdLength> TDriveId;
// ======== MEMBER FUNCTIONS ========
@@ -47,6 +49,7 @@
EXPORT_C CSsmUiSpecific::~CSsmUiSpecific()
{
FUNC_LOG;
+ iReservedPhoneMemoryFs.Close();
}
@@ -68,6 +71,7 @@
{
self = new ( ELeave ) CSsmUiSpecific;
CleanupStack::PushL( self );
+ self->ConstructL();
User::LeaveIfError( Dll::SetTls( self ) );
CleanupStack::Pop( self );
}
@@ -431,7 +435,76 @@
// CSsmUiSpecific::CSsmUiSpecific
// ---------------------------------------------------------------------------
//
-CSsmUiSpecific::CSsmUiSpecific() : iReferenceCount( 1 )
+CSsmUiSpecific::CSsmUiSpecific() : iReferenceCount(1), iReservedPhoneMemory(0)
{
FUNC_LOG;
+ }
+/**
+Leaving construction inside ConstructL
+*/
+void CSsmUiSpecific::ConstructL()
+ {
+ FUNC_LOG;
+
+ User::LeaveIfError( iReservedPhoneMemoryFs.Connect() );
}
+
+/**
+ReservePhoneMemorySpace
+*/
+EXPORT_C TInt CSsmUiSpecific::ReservePhoneMemorySpace()
+ {
+ FUNC_LOG;
+ TVolumeIOParamInfo volumeParamInfo;
+ const TInt phoneMemoryDriveID = PhoneMemoryRootDriveId();
+ TInt errorCode = iReservedPhoneMemoryFs.VolumeIOParam(phoneMemoryDriveID, volumeParamInfo);
+ if( KErrNone == errorCode )
+ {
+#ifdef __WINS__
+ //512 bytes for __WINS__
+ const TInt reservedMemory = 512;
+#else
+ //Reserving two clusterSize Phone memory
+ const TInt reservedMemory = KNumberOfCluster * (volumeParamInfo.iClusterSize);
+#endif //__WINS__
+ errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace(phoneMemoryDriveID, reservedMemory);
+
+ if ( KErrNone == errorCode )
+ {
+ iReservedPhoneMemory = reservedMemory;
+ }
+ }
+ return errorCode;
+ }
+
+/**
+FreeReservedPhoneMemorySpace
+*/
+EXPORT_C TInt CSsmUiSpecific::FreeReservedPhoneMemorySpace(const TInt aSpaceToFree)
+ {
+ FUNC_LOG;
+ TInt errorCode(KErrGeneral);
+ INFO_2("Reserved memory is = %d bytes, Request to free memory is = %d bytes", iReservedPhoneMemory, aSpaceToFree);
+ if(0 < iReservedPhoneMemory)
+ {
+ if(0 == aSpaceToFree)
+ {
+ //Free complete reserved phone memory
+ errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace( PhoneMemoryRootDriveId(), 0 );
+ INFO_1("Freeing memory completed with = %d", errorCode);
+ iReservedPhoneMemory = 0;
+ }
+ else
+ {
+ TInt newReserveSize = iReservedPhoneMemory - aSpaceToFree;
+ newReserveSize = newReserveSize >= 0 ? newReserveSize : 0;
+ errorCode = iReservedPhoneMemoryFs.ReserveDriveSpace( PhoneMemoryRootDriveId(), newReserveSize );
+ INFO_1("Freeing partial phone memory completed with = %d", errorCode);
+ if(KErrNone == errorCode)
+ {
+ iReservedPhoneMemory = newReserveSize;
+ }
+ }
+ }
+ return errorCode;
+ }
--- a/sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-// CLASS HEADER
-#include "MT_SysLangUtil.h"
-
-// EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <EUnitDecorators.h>
-#include <syslangutil.h>
-
-// CONSTRUCTION
-MT_SysLangUtil* MT_SysLangUtil::NewL()
- {
- MT_SysLangUtil* self = MT_SysLangUtil::NewLC();
- CleanupStack::Pop();
- return self;
- }
-
-MT_SysLangUtil* MT_SysLangUtil::NewLC()
- {
- MT_SysLangUtil* self = new( ELeave ) MT_SysLangUtil();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor (virtual by CBase)
-MT_SysLangUtil::~MT_SysLangUtil()
- {
- Teardown();
- }
-
-// Default constructor
-MT_SysLangUtil::MT_SysLangUtil()
- {
- }
-
-// Second phase construct
-void MT_SysLangUtil::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-// METHODS
-void MT_SysLangUtil::SetupL()
- {
- User::LeaveIfError( iFs.Connect() );
- }
-
-void MT_SysLangUtil::Teardown()
- {
- iFs.Close();
- }
-
-void MT_SysLangUtil::T_SysLangUtil_IsValidLanguageL()
- {
- // Get default language
- TInt language = 0;
- TInt result = SysLangUtil::GetDefaultLanguage( language );
- EUNIT_ASSERT_EQUALS( result, KErrNone );
-
- // Default language should be valid language
- TBool valid = SysLangUtil::IsValidLanguage( language );
- EUNIT_ASSERT( valid );
-
- // Default language should be valid language
- valid = SysLangUtil::IsValidLanguage( language, &iFs );
- EUNIT_ASSERT( valid );
- }
-
-void MT_SysLangUtil::T_SysLangUtil_GetDefaultLanguageL()
- {
- // Get default language
- TInt language = 0;
- TInt result = SysLangUtil::GetDefaultLanguage( language );
- EUNIT_ASSERT_EQUALS( result, KErrNone );
-
- result = SysLangUtil::GetDefaultLanguage( language, &iFs );
- EUNIT_ASSERT_EQUALS( result, KErrNone );
- }
-
-void MT_SysLangUtil::T_SysLangUtil_GetInstalledLanguagesL()
- {
- // Create array for languages
- CArrayFixFlat<TInt>* array = new( ELeave ) CArrayFixFlat<TInt>( 3 );
- CleanupStack::PushL( array );
-
- // Get installed languages
- TInt res = SysLangUtil::GetInstalledLanguages( array );
- EUNIT_ASSERT_EQUALS( res, KErrNone );
-
- array->Reset();
- res = SysLangUtil::GetInstalledLanguages( array, &iFs );
- EUNIT_ASSERT_EQUALS( res, KErrNone );
-
- TInt count = array->Count();
- EUNIT_ASSERT( count > 0 );
-
- // Assert that each received language is a valid language
- for( TInt i = 0; i < count; ++i )
- {
- EUNIT_ASSERT( SysLangUtil::IsValidLanguage( array->At( i ) ) );
- }
-
- CleanupStack::PopAndDestroy( array );
- }
-
-void MT_SysLangUtil::T_SysLangUtil_RestoreSIMLanguageL()
- {
- // Get default language
- TInt language = 0;
- TInt result = SysLangUtil::GetDefaultLanguage( language );
- EUNIT_ASSERT_EQUALS( result, KErrNone );
-
- // Default language should be valid language
- TInt res = SysLangUtil::RestoreSIMLanguage( language );
- EUNIT_ASSERT_EQUALS( res, KErrNone );
-
- // Default language should be valid language
- res = SysLangUtil::RestoreSIMLanguage( language, &iFs );
- EUNIT_ASSERT_EQUALS( res, KErrNone );
- }
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- MT_SysLangUtil,
- "SysLangUtil API Test",
- "MODULE" )
-
-EUNIT_TEST(
- "#1 Test IsValidLanguage()",
- "SysLangUtil",
- "IsValidLanguage",
- "FUNCTIONALITY",
- SetupL, T_SysLangUtil_IsValidLanguageL, Teardown)
-
-EUNIT_TEST(
- "#2 Test GetDefaultLanguage()",
- "SysLangUtil",
- "GetDefaultLanguage",
- "FUNCTIONALITY",
- SetupL, T_SysLangUtil_GetDefaultLanguageL, Teardown)
-
-EUNIT_TEST(
- "#3 Test GetInstalledLanguages()",
- "SysLangUtil",
- "GetInstalledLanguages",
- "FUNCTIONALITY",
- SetupL, T_SysLangUtil_GetInstalledLanguagesL, Teardown)
-
-EUNIT_TEST(
- "#4 Test RestoreSIMLanguage()",
- "SysLangUtil",
- "RestoreSIMLanguage",
- "FUNCTIONALITY",
- SetupL, T_SysLangUtil_RestoreSIMLanguageL, Teardown)
-EUNIT_END_TEST_TABLE
--- a/sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil.h Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-#ifndef __MT_SYSLANGUTIL_H__
-#define __MT_SYSLANGUTIL_H__
-
-// EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-#include <EUnitDecorators.h>
-#include <f32file.h>
-
-// CLASS DEFINITION
-/**
- * SysLangUtil API test
- */
-NONSHARABLE_CLASS( MT_SysLangUtil )
- : public CEUnitTestSuiteClass
- {
- public: // Constructors and destructors
- /**
- * Two phase construction
- */
- static MT_SysLangUtil* NewL();
- static MT_SysLangUtil* NewLC();
- /**
- * Destructor
- */
- ~MT_SysLangUtil();
-
- private: // Constructors and destructors
- MT_SysLangUtil();
- void ConstructL();
-
- private: // New methods
- void SetupL();
- void Teardown();
- void T_SysLangUtil_IsValidLanguageL();
- void T_SysLangUtil_GetDefaultLanguageL();
- void T_SysLangUtil_GetInstalledLanguagesL();
- void T_SysLangUtil_RestoreSIMLanguageL();
-
- private: // Data
- EUNIT_DECLARE_TEST_TABLE;
-
- // Own: file server session
- RFs iFs;
- };
-
-#endif // __MT_SYSLANGUTIL_H__
--- a/sysstatemgmt/tsrc/public/basic/MT_SysLangUtil/MT_SysLangUtil_DllMain.cpp Fri May 28 14:18:28 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-// CLASS HEADER
-#include "MT_SysLangUtil.h"
-
-// EXTERNAL INCLUDES
-#include <CEUnitTestSuite.h>
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- return MT_SysLangUtil::NewL();
- }
--- a/sysstatemgmt/tsrc/public/basic/bwins/mt_rstartersessionU.DEF Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/tsrc/public/basic/bwins/mt_rstartersessionU.DEF Thu Jun 24 11:22:10 2010 +0100
@@ -1,2 +1,3 @@
EXPORTS
- ?CreateTestSuiteL@@YAPAVMEUnitTest@@XZ @ 1 NONAME ; class MEUnitTest * __cdecl CreateTestSuiteL(void)
+ ?LibEntryL@@YAPAVMT_RStarterSession@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class MT_RStarterSession * LibEntryL(class CTestModuleIf &)
+
--- a/sysstatemgmt/tsrc/public/basic/eabi/mt_rstartersessionU.DEF Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/tsrc/public/basic/eabi/mt_rstartersessionU.DEF Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,3 @@
EXPORTS
- _Z16CreateTestSuiteLv @ 1 NONAME
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
--- a/sysstatemgmt/tsrc/public/basic/group/bld.inf Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/tsrc/public/basic/group/bld.inf Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,19 +11,20 @@
*
* Contributors:
*
-* Description:
+* Description: Unit test code for RStarterSession class
*
*/
-
-
PRJ_PLATFORMS
ARMV5 GCCE WINSCW
PRJ_EXPORTS
+PRJ_TESTEXPORTS
+../init/mt_rstartersession.ini /epoc32/winscw/c/testframework/mt_rstartersession.ini
+../rom/mt_rstartersession.iby CORE_OS_LAYER_IBY_EXPORT_PATH( mt_rstartersession.iby )
+
PRJ_MMPFILES
-
PRJ_TESTMMPFILES
mt_rstartersession.mmp
--- a/sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.mmp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.mmp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,33 +11,30 @@
*
* Contributors:
*
-* Description:
+* Description: Unit test code for RStarterSession class
*
*/
-
#include <platform_paths.hrh>
TARGET MT_RStarterSession.dll
TARGETTYPE dll
-UID 0x1000af5a 0x01700000
+UID 0x1000008D 0x101FB3E7
+VENDORID VID_DEFAULT
CAPABILITY ALL -TCB
-VENDORID VID_DEFAULT
SOURCEPATH ../mt_rstartersession
SOURCE MT_RStarterSession.cpp
-SOURCE MT_RStarterSession_DllMain.cpp
USERINCLUDE ../mt_rstartersession
-SYSTEMINCLUDE /epoc32/include/digia/eunit
+OS_LAYER_SYSTEMINCLUDE
OS_LAYER_SYSTEMINCLUDE
-LIBRARY EUnit.lib
-LIBRARY EUnitUtil.lib
LIBRARY euser.lib
+LIBRARY stiftestinterface.lib
LIBRARY StarterClient.lib
SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/tsrc/public/basic/group/mt_rstartersession.pkg Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,29 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: Unit test code for RStarterSession class
+;
+;Languages
+&EN
+
+#{"mt_rstartersession"},(0x101FB3A7),1,0,0,TYPE=SA
+
+;Localised Vendor name
+%{"mt_rstartersession EN"}
+
+; Vendor name
+: "mt_rstartersession"
+
+"\epoc32\release\armv5\urel\MT_RStarterSession.dll" - "c:\sys\bin\MT_RStarterSession.dll"
+"..\init\MT_RStarterSession.ini"-"c:\testframework\MT_RStarterSession.ini"
+
--- a/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.cpp Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.cpp Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Unit test code for RStarterSession class
*
*/
@@ -20,30 +20,30 @@
#include "MT_RStarterSession.h"
// EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <EUnitDecorators.h>
+#include <stifparser.h>
+#include <stiftestinterface.h>
// INTERNAL INCLUDES
#include <starterclient.h>
#include <starter.hrh>
-// CONSTRUCTION
-MT_RStarterSession* MT_RStarterSession::NewL()
+// ---------------------------------------------------------
+// MT_RStarterSession::LibEntryL
+// Returns: Poiter to MT_RStarterSession class
+// ---------------------------------------------------------
+EXPORT_C MT_RStarterSession* LibEntryL( CTestModuleIf& aTestModuleIf )
{
- MT_RStarterSession* self = MT_RStarterSession::NewLC();
- CleanupStack::Pop();
-
- return self;
+ RDebug::Printf("MT_RStarterSession* LibEntryL");
+ MT_RStarterSession* libEntry( MT_RStarterSession::NewL( aTestModuleIf ) );
+ return libEntry;
}
-MT_RStarterSession* MT_RStarterSession::NewLC()
+// CONSTRUCTION
+MT_RStarterSession* MT_RStarterSession::NewL(CTestModuleIf& aTestModuleIf)
{
- MT_RStarterSession* self = new( ELeave ) MT_RStarterSession();
- CleanupStack::PushL( self );
-
- self->ConstructL();
-
+ RDebug::Printf("MT_RStarterSession* NewL");
+ MT_RStarterSession* self = new ( ELeave ) MT_RStarterSession( aTestModuleIf );
return self;
}
@@ -54,28 +54,163 @@
}
// Default constructor
-MT_RStarterSession::MT_RStarterSession()
+MT_RStarterSession::MT_RStarterSession(CTestModuleIf& /*aTestModuleIf*/)
{
}
-// Second phase construct
-void MT_RStarterSession::ConstructL()
+// -----------------------------------------------------------------------------
+// MT_SysLangUtil::Case
+// Returns a test case by number.
+//
+// This function contains an array of all available test cases
+// i.e pair of case name and test function. If case specified by parameter
+// aCaseNumber is found from array, then that item is returned.
+//
+// The reason for this rather complicated function is to specify all the
+// test cases only in one place. It is not necessary to understand how
+// function pointers to class member functions works when adding new test
+// cases. See function body for instructions how to add new test case.
+// -----------------------------------------------------------------------------
+//
+const TCaseInfo MT_RStarterSession::Case( const TInt aCaseNumber ) const
{
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
+
+ /**
+ * To add new test cases, implement new test case function and add new
+ * line to KCases array specify the name of the case and the function
+ * doing the test case
+ * In practice, do following
+ * 1) Make copy of existing test case function and change its name
+ * and functionality. Note that the function must be added to
+ * CenRepNotifyHandlerTest.cpp file and to CenRepNotifyHandlerTest.h
+ * header file.
+ * 2) Add entry to following KCases array either by using FUNCENTRY or
+ * ENTRY macro.
+ * ENTRY macro takes two parameters: test case name and test case
+ * function name.
+ * FUNCENTRY macro takes only test case function name as a parameter and uses
+ * that as a test case name and test case function name.
+ */
+ RDebug::Printf("MT_RStarterSession* case");
+ static TCaseInfoInternal const KCases[] =
+ {
+ // To add new test cases, add new items to this array
+ ENTRY( "1 [RStarterSession] Test ConectL", &MT_RStarterSession::T_RStarterSession_Connect ),
+ ENTRY( "2 [RStarterSession] Test SetState to Normal", &MT_RStarterSession::T_RStarterSession_SetStateToNormal),
+ ENTRY( "3 [RStarterSession] Test SetStateti Alarm", &MT_RStarterSession::T_RStarterSession_SetStateToAlarm),
+ ENTRY( "4 [RStarterSession] Test SetState to Charging", &MT_RStarterSession::T_RStarterSession_SetStateToCharging),
+ ENTRY( "5 [RStarterSession] Test SetState to OffLine", &MT_RStarterSession::T_RStarterSession_SetStateToOffLine),
+ ENTRY( "6 [RStarterSession] Test SetState to BTSap", &MT_RStarterSession::T_RStarterSession_SetStateToBTSap),
+ ENTRY( "7 [RStarterSession] Test ResetNetwork", &MT_RStarterSession::T_RStarterSession_ResetNetwork),
+ ENTRY( "8 [RStarterSession] Test IsRTCTimeValid", &MT_RStarterSession::T_RStarterSession_IsRTCTimeValid),
+ ENTRY( "9 [RStarterSession] Test ActivateRfForEmergencyCall", &MT_RStarterSession::T_RStarterSession_ActivateRfForEmergencyCall ),
+ ENTRY( "10 [RStarterSession] Test DeactivateRfAfterEmergencyCall", &MT_RStarterSession::T_RStarterSession_DeactivateRfAfterEmergencyCall),
+ ENTRY( "11 [RStarterSession] Test EndSplashScreen", &MT_RStarterSession::T_RStarterSession_EndSplashScreen),
+ ENTRY( "12 [RStarterSession] Test Reset", &MT_RStarterSession::T_RStarterSession_Reset),
+ ENTRY( "13 [RStarterSession] Test Shutdown", &MT_RStarterSession:: T_RStarterSession_Shutdown)
+ };
+
+ // Verify that case number is valid
+ if( (TUint) aCaseNumber >= sizeof( KCases ) / sizeof( TCaseInfoInternal ) )
+ {
+ // Invalid case, construct empty object
+ TCaseInfo null( (const TText*) L"" );
+ null.iMethod = NULL;
+ return null;
+ }
+
+ // Construct TCaseInfo object and return it
+ TCaseInfo tmp ( KCases[aCaseNumber].iCaseName );
+ tmp.iMethod = KCases[aCaseNumber].iMethod;
+ tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
+ tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
+ tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
+
+ return tmp;
+ }
+
+// -----------------------------------------------------------------------------
+// MT_SysLangUtil::GetTestCasesL
+// GetTestCases is used to inquire test cases from the Test Module. Test
+// cases are stored to array of test cases. The Test Framework will be
+// the owner of the data in the RPointerArray after GetTestCases return
+// and it does the memory deallocation.
+// -----------------------------------------------------------------------------
+//
+TInt MT_RStarterSession::GetTestCasesL( const TFileName& /*aConfig*/,
+ RPointerArray<TTestCaseInfo>& aTestCases )
+ {
+ RDebug::Printf("MT_RStarterSession* gettestcase");
+ // Loop through all test cases and create new
+ // TTestCaseInfo items and append items to aTestCase array
+ for( TInt i = 0; Case(i).iMethod != NULL; i++ )
+ {
+
+ // Allocate new TTestCaseInfo from heap for a testcase definition.
+ TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo;
+
+ // PushL TTestCaseInfo to CleanupStack.
+ CleanupStack::PushL( newCase );
+
+ // Set number for the testcase.
+ // When the testcase is run, this comes as a parameter to RunTestCaseL.
+ newCase->iCaseNumber = i;
+
+ // Set title for the test case. This is shown in UI to user.
+ newCase->iTitle.Copy( Case(i).iCaseName );
+
+ // Append TTestCaseInfo to the testcase array. After appended
+ // successfully the TTestCaseInfo object is owned (and freed)
+ // by the TestServer.
+ User::LeaveIfError(aTestCases.Append ( newCase ) );
+
+ // Pop TTestCaseInfo from the CleanupStack.
+ CleanupStack::Pop( newCase );
+ }
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
+// MT_SysLangUtil::RunTestCaseL
+// RunTestCaseL is used to run an individual test case specified
+// by aTestCase. Test cases that can be run may be requested from
+// Test Module by GetTestCases method before calling RunTestCase.
+// -----------------------------------------------------------------------------
+//
+TInt MT_RStarterSession::RunTestCaseL( const TInt aCaseNumber,
+ const TFileName& /*aConfig*/,
+ TTestResult& aResult )
+ {
+
+ // Return value
+ TInt execStatus = KErrNone;
+
+ // Get the pointer to test case function
+ TCaseInfo tmp = Case ( aCaseNumber );
+
+ // Check that case number was valid
+ if ( tmp.iMethod != NULL )
+ {
+ // Valid case was found, call it via function pointer
+ iMethod = tmp.iMethod;
+ execStatus = ( this->*iMethod )( aResult );
+ }
+ else
+ {
+ // Valid case was not found, return error.
+ execStatus = KErrNotFound;
+ }
+
+ // Return case execution status (not the result of the case execution)
+ return execStatus;
}
// METHODS
-
-
-void MT_RStarterSession::SetupEmptyL( )
- {
- }
void MT_RStarterSession::SetupL( )
{
- iRStarterSession.Connect();
+ TInt err = iRStarterSession.Connect();
+ RDebug::Print(_L("MT_RStarterSession* SetupL Connected to RStarterSession with % error"),err);
}
void MT_RStarterSession::Teardown( )
@@ -83,221 +218,195 @@
iRStarterSession.Close();
}
-void MT_RStarterSession::TeardownEmpty( )
- {
- }
-
-void MT_RStarterSession::T_RStarterSession_ConnectL( )
+TInt MT_RStarterSession::T_RStarterSession_Connect( TTestResult& aResult )
{
RStarterSession session;
TInt err = session.Connect();
- EUNIT_PRINT( _L("Connect() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value");
-
+ if ( err != KErrNone )
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_Connect" );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
session.Close();
- }
-
-void MT_RStarterSession::T_RStarterSession_SetStateL( )
- {
- // Perhaps test also other values...
- TInt err = iRStarterSession.SetState( RStarterSession::ENormal );
- EUNIT_PRINT( _L("SetState() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value");
- }
-
-void MT_RStarterSession::T_RStarterSession_ResetL( )
- {
- // Perhaps test also other values...
- iRStarterSession.Reset( (RStarterSession::TResetReason)-1 );
- }
-
-void MT_RStarterSession::T_RStarterSession_ShutdownL( )
- {
- EUNIT_PRINT( _L("Calling Shutdown()") );
- iRStarterSession.Shutdown( );
- }
-
-void MT_RStarterSession::T_RStarterSession_ResetNetworkL( )
- {
- TInt err = iRStarterSession.ResetNetwork( );
- EUNIT_PRINT( _L("ResetNetwork() err = %d"), err );
-
- EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value");
- }
-
-void MT_RStarterSession::T_RStarterSession_IsRTCTimeValidL( )
- {
- TBool valid = iRStarterSession.IsRTCTimeValid();
- EUNIT_PRINT( _L("IsRTCTimeValid() returned = %d"), valid );
- }
-
-void MT_RStarterSession::T_RStarterSession_ActivateRfForEmergencyCallL( )
- {
- TInt err = iRStarterSession.ActivateRfForEmergencyCall( );
- EUNIT_PRINT( _L("ActivateRfForEmergencyCall() err = %d"), err );
- // Do not check the return value since in some cases it is normal that
- // KErrGeneral(-2) is returned
- //EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+ return err;
}
-void MT_RStarterSession::T_RStarterSession_DeactivateRfAfterEmergencyCallL( )
+TInt MT_RStarterSession::T_RStarterSession_SetStateToNormal( TTestResult& aResult )
{
- TInt err = iRStarterSession.DeactivateRfAfterEmergencyCall( );
- EUNIT_PRINT( _L("DeactivateRfAfterEmergencyCall() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+ SetupL();
+ // State transition from Normal to normal
+ TInt err = iRStarterSession.SetState( RStarterSession::ENormal );
+
+ if ( (err != KErrArgument) && (err != KErrGeneral) && (err != KErrNone))
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateToNormal " );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return KErrNone;
+ }
- // Activate RF again
- err = iRStarterSession.ActivateRfForEmergencyCall( );
- EUNIT_PRINT( _L("ActivateRfForEmergencyCall() err = %d"), err );
- // Do not check the return value since in some cases it is normal that
- // KErrGeneral(-2) is returned
- //EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
- }
+TInt MT_RStarterSession::T_RStarterSession_SetStateToAlarm( TTestResult& aResult )
+ {
+ SetupL();
+ // State transition from normal to Alarm
+ TInt err = iRStarterSession.SetState( RStarterSession::EAlarm );
-void MT_RStarterSession::T_RStarterSession_EndSplashScreenL( )
- {
- TInt err = iRStarterSession.EndSplashScreen( );
- EUNIT_PRINT( _L("EndSplashScreen() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrNone, "Incorrect return value" );
+ if ( err != KErrNotSupported )
+ {
+ _LIT( KDescription, "Incorrect return value T_RStarterSession_SetStateToAlarm" );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return KErrNone;
}
-
-void MT_RStarterSession::T_RStarterSession_AddItemInStartListLL( )
+
+TInt MT_RStarterSession::T_RStarterSession_SetStateToCharging( TTestResult& aResult )
{
- TPtrC8 md5hash( KNullDesC8 );
- TInt err = iRStarterSession.AddItemInStartListL(
- KNullDesC,
- EMonNone,
- EExecutableType,
- 0,
- md5hash );
- EUNIT_PRINT( _L("AddItemInStartListL() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrPermissionDenied, "Incorrect return value. SID check has failed" );
+ SetupL();
+ // State transition from normal to ECharging
+ TInt err = iRStarterSession.SetState( RStarterSession::ECharging );
+
+ if ( err != KErrNotSupported )
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateEToCharging " );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return KErrNone;
}
-
-void MT_RStarterSession::T_RStarterSession_AddItemInStartListL2L( )
+
+TInt MT_RStarterSession::T_RStarterSession_SetStateToOffLine( TTestResult& aResult )
{
- TInt err = iRStarterSession.AddItemInStartListL(
- KNullDesC,
- EMonNone,
- EExecutableType,
- 0 );
- EUNIT_PRINT( _L("AddItemInStartListL() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrPermissionDenied, "Incorrect return value. SID check has failed" );
+ SetupL();
+ // State transition from normal to EOffline
+ TInt err = iRStarterSession.SetState( RStarterSession::EOffline );
+
+ if ( err != KErrNone )
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateTOOffLine " );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return err;
}
-
-void MT_RStarterSession::T_RStarterSession_RemoveItemFromStartListLL( )
+
+TInt MT_RStarterSession::T_RStarterSession_SetStateToBTSap( TTestResult& aResult )
{
- TInt err = iRStarterSession.RemoveItemFromStartListL( KNullDesC );
- EUNIT_PRINT( _L("RemoveItemFromStartListL() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrPermissionDenied, "Incorrect return value. SID check has failed" );
+ SetupL();
+ // State transition from ENormal to EBTSap
+ TInt err = iRStarterSession.SetState( RStarterSession::EBTSap );
+
+ if ( err != KErrNone )
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_SetStateToBTSap " );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return err;
}
-void MT_RStarterSession::T_RStarterSession_SearchStartlistLL( )
+TInt MT_RStarterSession::T_RStarterSession_Reset( TTestResult& aResult )
+ {
+ SetupL();
+ // Other values will be tested in BAT testing (Manual testing)...
+ iRStarterSession.Reset( (RStarterSession::TResetReason)-1 );
+ // Make request and ignore return value
+ _LIT( KDescription, "T_RStarterSession_Reset - Calling Reset()" );
+ aResult.SetResult( KErrNone, KDescription );
+ Teardown();
+ return KErrNone;
+ }
+
+TInt MT_RStarterSession::T_RStarterSession_Shutdown(TTestResult& aResult )
{
- TInt err = iRStarterSession.SearchStartlistL( KNullDesC );
- EUNIT_PRINT( _L("SearchStartlistL() err = %d"), err );
- EUNIT_ASSERT_DESC( err == KErrPermissionDenied, "Incorrect return value. SID check has failed" );
+ SetupL();
+ iRStarterSession.Shutdown( );
+ _LIT( KDescription, "T_RStarterSession_Shutdown - Calling Shutdown()" );
+ aResult.SetResult( KErrNone, KDescription );
+ Teardown();
+ return KErrNone;
+ }
+
+TInt MT_RStarterSession::T_RStarterSession_ResetNetwork(TTestResult& aResult )
+ {
+ SetupL();
+ TInt err = iRStarterSession.ResetNetwork( );
+ if ( err != KErrNone )
+ {
+ _LIT( KDescription, "T_RStarterSession_ResetNetwork - Incorrect return value in " );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return err;
}
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- MT_RStarterSession,
- "Add test suite description here.",
- "UNIT" )
-
-EUNIT_TEST(
- "Connect - test0",
- "RStarterSession",
- "Connect - test0",
- "FUNCTIONALITY",
- SetupEmptyL, T_RStarterSession_ConnectL, TeardownEmpty)
-
-EUNIT_TEST(
- "SetState - test1",
- "RStarterSession",
- "SetState - test1",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_SetStateL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_IsRTCTimeValid(TTestResult& aResult )
+ {
+ SetupL();
+ TBool valid = iRStarterSession.IsRTCTimeValid();
+ if ( !valid )
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_IsRTCTimeValid " );
+ aResult.SetResult( valid, KDescription );
+ return valid;
+ }
+ Teardown();
+ return KErrNone;
+ }
-EUNIT_TEST(
- "Reset - test2",
- "RStarterSession",
- "Reset - test2",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_ResetL, Teardown)
-
-EUNIT_TEST(
- "ResetNetwork - test4",
- "RStarterSession",
- "ResetNetwork - test4",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_ResetNetworkL, Teardown)
-
-EUNIT_TEST(
- "IsRTCTimeValid - test5",
- "RStarterSession",
- "IsRTCTimeValid - test5",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_IsRTCTimeValidL, Teardown)
-
-EUNIT_TEST(
- "ActivateRfForEmergencyCall - test6",
- "RStarterSession",
- "ActivateRfForEmergencyCall - test6",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_ActivateRfForEmergencyCallL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_ActivateRfForEmergencyCall(TTestResult& aResult )
+ {
+ SetupL();
+ TInt err = iRStarterSession.ActivateRfForEmergencyCall( );
+
+ if (( err != KErrNone) && (err != KErrGeneral))
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_ActivateRfForEmergencyCall" );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return err;
+ }
-EUNIT_TEST(
- "DeactivateRfAfterEmergencyCall - test7",
- "RStarterSession",
- "DeactivateRfAfterEmergencyCall - test7",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_DeactivateRfAfterEmergencyCallL, Teardown)
-
-EUNIT_TEST(
- "EndSplashScreen - test8",
- "RStarterSession",
- "EndSplashScreen - test8",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_EndSplashScreenL, Teardown)
-
-EUNIT_TEST(
- "AddItemInStartListL - test9",
- "RStarterSession",
- "AddItemInStartListL - test9",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_AddItemInStartListLL, Teardown)
+TInt MT_RStarterSession::T_RStarterSession_DeactivateRfAfterEmergencyCall( TTestResult& aResult )
+ {
+ SetupL();
+ TInt err = iRStarterSession.DeactivateRfAfterEmergencyCall( );
-EUNIT_TEST(
- "AddItemInStartListL - test10",
- "RStarterSession",
- "AddItemInStartListL - test10",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_AddItemInStartListL2L, Teardown)
-
-EUNIT_TEST(
- "RemoveItemFromStartListL - test11",
- "RStarterSession",
- "RemoveItemFromStartListL - test11",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_RemoveItemFromStartListLL, Teardown)
+ if (( err != KErrNone) && (err != KErrGeneral))
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_DeactivateRfAfterEmergencyCall" );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ // Activate RF again
+ err = iRStarterSession.ActivateRfForEmergencyCall( );
+ Teardown();
+ return err;
+ }
-EUNIT_TEST(
- "SearchStartlistL - test12",
- "RStarterSession",
- "SearchStartlistL - test12",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_SearchStartlistLL, Teardown)
-/*
-EUNIT_TEST(
- "Shutdown - test3",
- "RStarterSession",
- "Shutdown - test3",
- "FUNCTIONALITY",
- SetupL, T_RStarterSession_ShutdownL, Teardown)*/
-
-EUNIT_END_TEST_TABLE
+TInt MT_RStarterSession::T_RStarterSession_EndSplashScreen( TTestResult& aResult )
+ {
+ SetupL();
+ TInt err = iRStarterSession.EndSplashScreen( );
+ if ( err != KErrNone )
+ {
+ _LIT( KDescription, "Incorrect return value in T_RStarterSession_EndSplashScreen" );
+ aResult.SetResult( err, KDescription );
+ return err;
+ }
+ Teardown();
+ return err;
+ }
-// END OF FILE
+//END OF FILE
--- a/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.h Fri May 28 14:18:28 2010 +0100
+++ b/sysstatemgmt/tsrc/public/basic/mt_rstartersession/MT_RStarterSession.h Thu Jun 24 11:22:10 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,39 +11,50 @@
*
* Contributors:
*
-* Description:
+* Description: Unit test code for RStarterSession class
*
*/
-
-
#ifndef __MT_RSTARTERSESSION_H__
#define __MT_RSTARTERSESSION_H__
+#if defined (_MSC_VER) && (_MSC_VER >= 1000)
+#pragma once
+#endif
+// Function pointer related internal definitions
+#ifndef __GCC32__
+#define GETPTR
+#else
+#define GETPTR &
+#endif
+#define ENTRY(str,func) {_S(str), GETPTR func,0,0,0}
+#define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0}
+
// EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-#include <EUnitDecorators.h>
-
+#include <stiftestmodule.h>
// INTERNAL INCLUDES
#include <starterclient.h>
-// FORWARD DECLARATIONS
-
-
+// FORWARD DECLARATIONS
+class TCaseInfo;
+class MT_RStarterSession;
+// DESCRIPTION
+// This a Test Module interface template
+// that does not really do anything.
+typedef TInt ( MT_RStarterSession::*TestFunction )( TTestResult& );
// CLASS DEFINITION
/**
*
*/
NONSHARABLE_CLASS( MT_RStarterSession )
- : public CEUnitTestSuiteClass
+ : public CTestModuleBase
{
public: // Constructors and destructors
/**
* Two phase construction
*/
- static MT_RStarterSession* NewL();
- static MT_RStarterSession* NewLC();
+ static MT_RStarterSession* NewL(CTestModuleIf& aTestModuleIf);
/**
* Destructor
*/
@@ -51,35 +62,85 @@
private: // Constructors and destructors
- MT_RStarterSession();
- void ConstructL();
+ MT_RStarterSession( CTestModuleIf& aTestModuleIf );
+
+ /**
+ * Function returning test case name and pointer to test case function
+ */
+ const TCaseInfo Case( const TInt aCaseNumber ) const;
+
+ public: // Functions from base classes
+ // @see CTestModuleBase
+ virtual TInt GetTestCasesL( const TFileName& aTestCaseFile,
+ RPointerArray<TTestCaseInfo>& aTestCases );
+
+ // @see CTestModuleBase
+ virtual TInt RunTestCaseL( const TInt aCaseNumber,
+ const TFileName& aTestCaseFile,
+ TTestResult& aResult );
+
private: // New methods
void SetupL();
- void SetupEmptyL();
void Teardown();
- void TeardownEmpty();
- void T_RStarterSession_ConnectL();
- void T_RStarterSession_SetStateL();
- void T_RStarterSession_ResetL();
- void T_RStarterSession_ShutdownL();
- void T_RStarterSession_ResetNetworkL();
- void T_RStarterSession_IsRTCTimeValidL();
- void T_RStarterSession_ActivateRfForEmergencyCallL();
- void T_RStarterSession_DeactivateRfAfterEmergencyCallL();
- void T_RStarterSession_EndSplashScreenL();
- void T_RStarterSession_AddItemInStartListLL();
- void T_RStarterSession_AddItemInStartListL2L();
- void T_RStarterSession_RemoveItemFromStartListLL();
- void T_RStarterSession_SearchStartlistLL();
+ TInt T_RStarterSession_Connect(TTestResult& aResult);
+ TInt T_RStarterSession_SetState(TTestResult& aResult);
+ TInt T_RStarterSession_SetStateToNormal(TTestResult& aResult);
+ TInt T_RStarterSession_SetStateToAlarm(TTestResult& aResult);
+ TInt T_RStarterSession_SetStateToCharging(TTestResult& aResult);
+ TInt T_RStarterSession_SetStateToOffLine(TTestResult& aResult);
+ TInt T_RStarterSession_SetStateToBTSap(TTestResult& aResult);
+ TInt T_RStarterSession_Reset(TTestResult& aResult);
+ TInt T_RStarterSession_Shutdown(TTestResult& aResult);
+ TInt T_RStarterSession_ResetNetwork(TTestResult& aResult);
+ TInt T_RStarterSession_IsRTCTimeValid(TTestResult& aResult);
+ TInt T_RStarterSession_ActivateRfForEmergencyCall(TTestResult& aResult);
+ TInt T_RStarterSession_DeactivateRfAfterEmergencyCall(TTestResult& aResult);
+ TInt T_RStarterSession_EndSplashScreen(TTestResult& aResult);
private: // Data
-
+ TestFunction iMethod;
RStarterSession iRStarterSession;
- EUNIT_DECLARE_TEST_TABLE;
+
+ };
+
+// Function pointer related internal definitions
+
+// Hack around known GCC bug.
+#ifndef __GCC32__
+ #define GETPTR
+#else
+ #define GETPTR &
+#endif
+
+// An internal structure containing a test case name and
+// the pointer to function doing the test
+class TCaseInfoInternal
+ {
+ public:
+ const TText* iCaseName;
+ TestFunction iMethod;
+ TBool iIsOOMTest;
+ TInt iFirstMemoryAllocation;
+ TInt iLastMemoryAllocation;
+ };
+
+// An internal structure containing a test case name and
+// the pointer to function doing the test
+class TCaseInfo
+ {
+ public:
+ TPtrC iCaseName;
+ TestFunction iMethod;
+ TBool iIsOOMTest;
+ TInt iFirstMemoryAllocation;
+ TInt iLastMemoryAllocation;
+ TCaseInfo( const TText* a ) : iCaseName( ( TText* ) a )
+ {
+ };
};
#endif // __MT_RSTARTERSESSION_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysstatemgmt/tsrc/public/basic/rom/mt_rstartersession.iby Thu Jun 24 11:22:10 2010 +0100
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit test code for RStarterSession class
+* Image description file for rstartersession test
+*
+*/
+
+#ifndef MT_RSTARTERSESSION_IBY
+#define MT_RSTARTERSESSION_IBY
+
+file=ABI_DIR\BUILD_DIR\MT_RStarterSession.dll SHARED_LIB_DIR\MT_RStarterSession.dll
+
+#endif // MT_RSTARTERSESSION_IBY
\ No newline at end of file
--- a/systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp Fri May 28 14:18:28 2010 +0100
+++ b/systemhealthmanagement/systemhealthmgr/group/app-framework_shma.mrp Thu Jun 24 11:22:10 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
component app-framework_shma
source \sf\os\devicesrv\systemhealthmanagement\systemhealthmgr
binary \sf\os\devicesrv\systemhealthmanagement\systemhealthmgr\group all
--- a/systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss Fri May 28 14:18:28 2010 +0100
+++ b/systemhealthmanagement/systemhealthmgr/test/testappgood/shmatestappgood_reg.rss Thu Jun 24 11:22:10 2010 +0100
@@ -29,4 +29,4 @@
// filename of application binary (minus extension)
app_file="shmatestappgood";
}
-
\ No newline at end of file
+