installationservices/switestfw/test/rtautils/rightsDbStep.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:05:20 +0300
changeset 25 98b66e4fb0be
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* archivestep.cpp
*
*/


#include <f32file.h>
#include <test/testexecutelog.h>
#include <apmstd.h>
#include <caf/caf.h>
#include "rightsDbStep.h"
#include "rtarights.h"

using namespace ReferenceTestAgent;

CClearRightsDb::~CClearRightsDb()
	{
	}

CClearRightsDb::CClearRightsDb(CRTAUtilsServer& aParent) : iParent(aParent)
	{
	SetTestStepName(KClearRightsDb);
	}


TVerdict CClearRightsDb::doTestStepL()
	{
	SetTestStepResult(EFail);

	__UHEAP_MARK;	
	
	INFO_PRINTF1(_L("Clearing Rights Database"));

	RRtaRights rightsServer;
	User::LeaveIfError(rightsServer.Connect());
	CleanupClosePushL(rightsServer);
	
	rightsServer.ClearAllRightsL();
	
	CleanupStack::PopAndDestroy(&rightsServer);

	SetTestStepResult(EPass);

	__UHEAP_MARKEND;

	return TestStepResult();
	}