|
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 "SIPConstants.h" |
|
20 #include "TCmdDestroyProfile.h" |
|
21 |
|
22 #include <sipmanagedprofile.h> |
|
23 #include <sipmanagedprofileregistry.h> |
|
24 #include <sipprofile.h> |
|
25 #include <sipprofiletypeinfo.h> |
|
26 |
|
27 #include "CTcSIPProfileContainer.h" |
|
28 |
|
29 /** |
|
30 * INPUT: |
|
31 * Headers: - |
|
32 * Parameters: |
|
33 * IDs: ProfileId, RegistryId |
|
34 * |
|
35 * OUTPUT: |
|
36 * Parameters: - |
|
37 * IDs: - |
|
38 */ |
|
39 void TCmdDestroyProfile::ExecuteL() |
|
40 { |
|
41 // -- Setup --------------------------------------------------------------- |
|
42 |
|
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 |
|
51 // Deleting profile from the persistent storage |
|
52 container.ManagedProfileRegistry().DestroyL( profile ); |
|
53 |
|
54 // -- Response creation --------------------------------------------------- |
|
55 |
|
56 } |
|
57 |
|
58 |
|
59 TBool TCmdDestroyProfile::Match( const TTcIdentifier& aId ) |
|
60 { |
|
61 return TTcSIPCommandBase::Match( aId, _L8("DestroyProfile") ); |
|
62 } |
|
63 |
|
64 TTcCommandBase* TCmdDestroyProfile::CreateL( MTcTestContext& aContext ) |
|
65 { |
|
66 return new( ELeave ) TCmdDestroyProfile( aContext ); |
|
67 } |
|
68 |
|
69 |