networkcontrol/ipupsplugins/test/te_ipups/src/te_ipups_delete_decision_db.cpp
changeset 14 b33c3d136b7e
parent 1 a579325b79dd
child 18 39bb7c3571e9
equal deleted inserted replaced
1:a579325b79dd 14:b33c3d136b7e
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code 
       
    20 */
       
    21  
       
    22 #include "te_ipups_stepbase.h"
       
    23 #include "te_ipups_delete_decision_db.h"
       
    24  
       
    25 CIpUpsDeleteDecisionDB::CIpUpsDeleteDecisionDB()
       
    26 /**
       
    27  * Constructor
       
    28  */
       
    29 	{
       
    30 	SetTestStepName(KIpUpsDeleteDecisionDB);
       
    31 	}
       
    32 
       
    33 CIpUpsDeleteDecisionDB::~CIpUpsDeleteDecisionDB()
       
    34 /**
       
    35  * Destructor
       
    36  */
       
    37 	{ 	
       
    38 	}
       
    39 
       
    40 TVerdict CIpUpsDeleteDecisionDB::doTestStepPreambleL()
       
    41 /**
       
    42  * @return - TVerdict code
       
    43  */
       
    44 	{	
       
    45  	SetTestStepResult(EPass);
       
    46 	return TestStepResult();
       
    47 	}
       
    48 
       
    49 TVerdict CIpUpsDeleteDecisionDB::doTestStepL()
       
    50 /**
       
    51  * @return - TVerdict code
       
    52  */
       
    53 	{
       
    54 	UserPromptService::RUpsManagement upsManagement;
       
    55 	
       
    56 	//Connect to the UPS Manager
       
    57 	User::LeaveIfError(upsManagement.Connect());
       
    58 	
       
    59 	//Delete the contents of the Decision Database
       
    60  	TRAPD(err, upsManagement.DeleteDatabaseL());
       
    61  	
       
    62  	if (err != KErrNone)
       
    63  		{
       
    64  		ERR_PRINTF2(_L("UPS Database Deletion attempt failed ( %d )"), err);
       
    65  		}
       
    66  	else
       
    67  		{
       
    68  		INFO_PRINTF1(_L("UPS Database Deleted."));
       
    69  		} 	
       
    70  	
       
    71  	SetTestStepError(err);
       
    72  	
       
    73 	return TestStepResult();
       
    74 	}
       
    75 	
       
    76 TVerdict CIpUpsDeleteDecisionDB::doTestStepPostambleL()
       
    77 /**
       
    78  * @return - TVerdict code
       
    79  */
       
    80 	{
       
    81 	return TestStepResult();
       
    82 	}