|
1 /* |
|
2 * Copyright (c) 2002 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 of restore factory settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "CPhCntRfsHandlerImpl.h" |
|
21 #include <rfsHandler.h> |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CPhCntRfsHandlerImpl::NewL |
|
27 // Two-phased constructor. |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 CPhCntRfsHandlerImpl* CPhCntRfsHandlerImpl::NewL() |
|
31 { |
|
32 CPhCntRfsHandlerImpl* self = |
|
33 new (ELeave) CPhCntRfsHandlerImpl; |
|
34 |
|
35 return self; |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CPhCntRfsHandlerImpl::~CPhCntRfsHandlerImpl |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CPhCntRfsHandlerImpl::~CPhCntRfsHandlerImpl() |
|
43 { |
|
44 delete iRfsHandler; |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // CPhCntRfsHandlerImpl::ProcessCommandL |
|
49 // --------------------------------------------------------- |
|
50 // |
|
51 void CPhCntRfsHandlerImpl::ProcessCommandL( |
|
52 TRfsCommand aCommand ) |
|
53 { |
|
54 TRfsType type = ERfsDeep; // By default, let's assume deep. |
|
55 |
|
56 switch ( aCommand ) |
|
57 { |
|
58 case ERfsCmdActivateNormal: |
|
59 type = ERfsNormal; |
|
60 // Fall through.. |
|
61 |
|
62 case ERfsCmdActivateDeep: |
|
63 // Create instance of rfs handler |
|
64 if ( !iRfsHandler ) |
|
65 { |
|
66 iRfsHandler = new ( ELeave ) CRfsHandler; |
|
67 } |
|
68 |
|
69 // Activate |
|
70 iRfsHandler->ActivateRfsL( type ); |
|
71 break; |
|
72 |
|
73 case ERfsCmdCancel: |
|
74 { |
|
75 if ( iRfsHandler ) |
|
76 { |
|
77 iRfsHandler->Cancel(); |
|
78 } |
|
79 } |
|
80 break; |
|
81 |
|
82 default: |
|
83 // Do nothing. |
|
84 break; |
|
85 } |
|
86 } |
|
87 |
|
88 // End of File |
|
89 |