sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_ssmsimstatusobserver.cpp
branchRCL_3
changeset 22 8cb079868133
parent 21 ccb4f6b3db21
equal deleted inserted replaced
21:ccb4f6b3db21 22:8cb079868133
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2009 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 	TInt err1 = RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimChanged);
   188 	(void) RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimChanged);
   189 	TInt err2 = RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimOwned);
   189 	(void) RProperty::Delete(CSsmUiSpecific::StartupPSUid(), KPSSimOwned);
   190 	INFO_PRINTF3(_L("Value of err1 & err2 = %d & %d"), err1, err2);
       
   191 	TInt err = KErrNone;
   190 	TInt err = KErrNone;
   192 	
   191 	
   193 	INFO_PRINTF1(_L("Constructing SSM SIM publish cmd"));	
   192 	INFO_PRINTF1(_L("Constructing SSM SIM publish cmd"));	
   194 	CCustomCmdPublishSimOwnedAndChanged* simCustomCmd = CCustomCmdPublishSimOwnedAndChanged::NewL();
   193 	CCustomCmdPublishSimOwnedAndChanged* simCustomCmd = CCustomCmdPublishSimOwnedAndChanged::NewL();
   195 	CleanupReleasePushL(*simCustomCmd);	
   194 	CleanupReleasePushL(*simCustomCmd);	
   229 	simCustomCmd->Initialize(NULL);
   228 	simCustomCmd->Initialize(NULL);
   230 	CleanupClosePushL(*simCustomCmd);
   229 	CleanupClosePushL(*simCustomCmd);
   231 	
   230 	
   232 	INFO_PRINTF1(_L("Initializing SSM SIM status observer without defining SIM changed property"));
   231 	INFO_PRINTF1(_L("Initializing SSM SIM status observer without defining SIM changed property"));
   233 	err = RProperty::Define(CSsmUiSpecific::StartupPSUid(), KPSSimOwned, RProperty::EInt);
   232 	err = RProperty::Define(CSsmUiSpecific::StartupPSUid(), KPSSimOwned, RProperty::EInt);
   234 	INFO_PRINTF2(_L("Define returns err = %d") ,err);
       
   235 	TEST(err == KErrNone);
   233 	TEST(err == KErrNone);
   236 	simCustomCmd->Execute(emptyBuf, iRequestStatus);
   234 	simCustomCmd->Execute(emptyBuf, iRequestStatus);
   237 	
   235 	
   238 	INFO_PRINTF1(_L("Adding callback"));
   236 	INFO_PRINTF1(_L("Adding callback"));
   239 	iAsyncStopScheduler->CallBack();
   237 	iAsyncStopScheduler->CallBack();