multimediacommsengine/tsrc/testdriver/siptester/src/TCmdUpdateProfile.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 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 #include "CTcSIPContext.h"
       
    19 #include "TCmdUpdateProfile.h"
       
    20 #include "CTcSIPProfileContainer.h"
       
    21 
       
    22 #include <sipprofile.h>
       
    23 #include <sipmanagedprofile.h>
       
    24 #include <sipmanagedprofileregistry.h>
       
    25 #include <sipprofiletypeinfo.h>
       
    26 
       
    27 /**
       
    28  * INPUT:
       
    29  *   Headers:		-
       
    30  *   Parameters:	Type*, IapId*, AORs*, PrivateIdentity*, Name*, SigComp*, 
       
    31  *					AutoRegistration*, SecurityNegotiation*, Server*,
       
    32  *					ServerParameter*, ServerExtensionParameter*, 
       
    33  *					ExtensionParameter*, Default*
       
    34  *   IDs:			ProfileId, RegistryId
       
    35  *
       
    36  * OUTPUT:
       
    37  *   Parameters:	-
       
    38  *   IDs:			-
       
    39  */
       
    40 void TCmdUpdateProfile::ExecuteL()
       
    41 	{
       
    42 	// -- Setup ---------------------------------------------------------------
       
    43 	// Get selected registry
       
    44     CTcSIPProfileContainer& container = SelectProfileL();
       
    45 
       
    46 	// Get profile from the profile registry
       
    47 	CSIPManagedProfile& profile = GetManagedProfileL( container );
       
    48 
       
    49 	// -- Execution -----------------------------------------------------------
       
    50 	SetProfileParamsL( &profile );
       
    51 
       
    52 	// Saving the profile
       
    53 	container.ManagedProfileRegistry().SaveL( profile );
       
    54 
       
    55 	// -- Response creation ---------------------------------------------------
       
    56     
       
    57 	AddProfileIdResponseL( profile );	
       
    58 	}
       
    59 
       
    60 
       
    61 TBool TCmdUpdateProfile::Match( const TTcIdentifier& aId )
       
    62 	{
       
    63 	return TTcSIPCommandBase::Match( aId, _L8("UpdateProfile") );
       
    64 	}
       
    65 
       
    66 TTcCommandBase* TCmdUpdateProfile::CreateL( MTcTestContext& aContext )
       
    67 	{
       
    68 	return new( ELeave ) TCmdUpdateProfile( aContext );
       
    69 	}