sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsimstatusobserver.cpp
changeset 45 c6215323ad55
parent 0 4e1aa6a622a0
child 61 8cb079868133
equal deleted inserted replaced
44:2c28af138640 45:c6215323ad55
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   183 	{
   183 	{
   184 	INFO_PRINTF1(_L("Entering test for change and owned parts of SSM SIM status observer/cmd"));
   184 	INFO_PRINTF1(_L("Entering test for change and owned parts of SSM SIM status observer/cmd"));
   185 	__UHEAP_MARK;
   185 	__UHEAP_MARK;
   186 	
   186 	
   187 	// Delete any existing defines, ignore return value
   187 	// Delete any existing defines, ignore return value
   188 	(void) RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimChanged);
   188 	TInt err1 = RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimChanged);
   189 	(void) RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimOwned);
   189 	TInt err2 = RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimOwned);
       
   190 	INFO_PRINTF3(_L("Value of err1 & err2 = %d & %d"), err1, err2);
   190 	TInt err = KErrNone;
   191 	TInt err = KErrNone;
   191 	
   192 	
   192 	INFO_PRINTF1(_L("Constructing SSM SIM publish cmd"));	
   193 	INFO_PRINTF1(_L("Constructing SSM SIM publish cmd"));	
   193 	CCustomCmdPublishSimOwnedAndChanged* simCustomCmd = CCustomCmdPublishSimOwnedAndChanged::NewL();
   194 	CCustomCmdPublishSimOwnedAndChanged* simCustomCmd = CCustomCmdPublishSimOwnedAndChanged::NewL();
   194 	CleanupReleasePushL(*simCustomCmd);	
   195 	CleanupReleasePushL(*simCustomCmd);	
   228 	simCustomCmd->Initialize(NULL);
   229 	simCustomCmd->Initialize(NULL);
   229 	CleanupClosePushL(*simCustomCmd);
   230 	CleanupClosePushL(*simCustomCmd);
   230 	
   231 	
   231 	INFO_PRINTF1(_L("Initializing SSM SIM status observer without defining SIM changed property"));
   232 	INFO_PRINTF1(_L("Initializing SSM SIM status observer without defining SIM changed property"));
   232 	err = RProperty::Define(CSsmUiSpecific::StartupPSUid(), KPSSimOwned, RProperty::EInt);
   233 	err = RProperty::Define(CSsmUiSpecific::StartupPSUid(), KPSSimOwned, RProperty::EInt);
       
   234 	INFO_PRINTF2(_L("Define returns err = %d") ,err);
   233 	TEST(err == KErrNone);
   235 	TEST(err == KErrNone);
   234 	simCustomCmd->Execute(emptyBuf, iRequestStatus);
   236 	simCustomCmd->Execute(emptyBuf, iRequestStatus);
   235 	
   237 	
   236 	INFO_PRINTF1(_L("Adding callback"));
   238 	INFO_PRINTF1(_L("Adding callback"));
   237 	iAsyncStopScheduler->CallBack();
   239 	iAsyncStopScheduler->CallBack();