|
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 "TCmdDisableProfile.h" |
|
20 #include "CTcSIPProfileContainer.h" |
|
21 |
|
22 #include <sipmanagedprofile.h> |
|
23 #include <sipmanagedprofileregistry.h> |
|
24 #include <sipprofile.h> |
|
25 #include <sipprofiletypeinfo.h> |
|
26 |
|
27 |
|
28 /** |
|
29 * INPUT: |
|
30 * Headers: - |
|
31 * Parameters: |
|
32 * IDs: ProfileId, RegistryId |
|
33 * |
|
34 * OUTPUT: |
|
35 * Parameters: - |
|
36 * IDs: - |
|
37 */ |
|
38 void TCmdDisableProfile::ExecuteL() |
|
39 { |
|
40 // -- Setup --------------------------------------------------------------- |
|
41 |
|
42 // Get selected registry |
|
43 CTcSIPProfileContainer& container = SelectProfileL(); |
|
44 |
|
45 // Get profile from the profile registry |
|
46 CSIPProfile& profile = GetProfileL( container ); |
|
47 |
|
48 // -- Execution ----------------------------------------------------------- |
|
49 |
|
50 // Disable profile |
|
51 User::LeaveIfError( container.ProfileRegistry().Disable( profile ) ); |
|
52 |
|
53 // -- Response creation --------------------------------------------------- |
|
54 } |
|
55 |
|
56 |
|
57 TBool TCmdDisableProfile::Match( const TTcIdentifier& aId ) |
|
58 { |
|
59 return TTcSIPCommandBase::Match( aId, _L8("DisableProfile") ); |
|
60 } |
|
61 |
|
62 TTcCommandBase* TCmdDisableProfile::CreateL( MTcTestContext& aContext ) |
|
63 { |
|
64 return new( ELeave ) TCmdDisableProfile( aContext ); |
|
65 } |
|
66 |
|
67 |