multimediacommsengine/tsrc/MMCTestDriver/MCETester/src/TCmdDeleteProperty.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "MCEConstants.h"
       
    21 #include "TCmdDeleteProperty.h"
       
    22 #include "CTcMCEContext.h"
       
    23 #include "mcetesterpskeys.h"
       
    24 
       
    25 #include <e32property.h>
       
    26 
       
    27 void TCmdDeleteProperty::ExecuteL()
       
    28 	{	
       
    29     // ---------- Setup --------------------------------------------------------
       
    30     
       
    31     //Getting Uids and value
       
    32     TInt iUid = ExtractIntegerL( KParamPropertyUid, 0, EFalse );
       
    33     TInt iKey = ExtractIntegerL( KParamPropertyKey, 0, ETrue );
       
    34     TUid uidkey = KUidMceTesterPSKeys;
       
    35     if (iUid!=0)
       
    36         {
       
    37         uidkey = TUid::Uid( iUid );
       
    38         }
       
    39 
       
    40     // ---------- Execution ----------------------------------------------------
       
    41     User::LeaveIfError(RProperty::Delete( uidkey, iKey ));
       
    42 	
       
    43     
       
    44     // ---------- Response creation --------------------------------------------
       
    45 	}
       
    46 	
       
    47 TBool TCmdDeleteProperty::Match( const TTcIdentifier& aId )
       
    48 	{
       
    49 	return TTcMceCommandBase::Match( aId, _L8("DeleteProperty") );
       
    50 	}
       
    51 
       
    52 TTcCommandBase* TCmdDeleteProperty::CreateL( MTcTestContext& aContext )
       
    53 	{
       
    54 	return new( ELeave ) TCmdDeleteProperty( aContext );
       
    55 	}