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: CMMCScBkupStateNotifyAllSnapshotsSupplied implementation |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 #include "CMMCScBkupStateNotifyAllSnapshotsSupplied.h" |
|
20 |
|
21 // System includes |
|
22 #include <e32std.h> |
|
23 |
|
24 // User includes |
|
25 #include "MMCScBkupLogger.h" |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 // ========================= MEMBER FUNCTIONS ================================ |
|
31 |
|
32 // --------------------------------------------------------------------------- |
|
33 // CMMCScBkupStateNotifyAllSnapshotsSupplied::CMMCScBkupStateNotifyAllSnapshotsSupplied() |
|
34 // |
|
35 // C++ constructor. |
|
36 // --------------------------------------------------------------------------- |
|
37 CMMCScBkupStateNotifyAllSnapshotsSupplied::CMMCScBkupStateNotifyAllSnapshotsSupplied( MMMCScBkupDriver& aDriver ) |
|
38 : CMMCScBkupState( aDriver ) |
|
39 { |
|
40 __LOG1("CMMCScBkupStateNotifyAllSnapshotsSupplied::CMMCScBkupStateNotifyAllSnapshotsSupplied() - 0x%08x", StateId().iUid ); |
|
41 } |
|
42 |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // CMMCScBkupStateNotifyAllSnapshotsSupplied::NewL() |
|
46 // |
|
47 // Destructor. |
|
48 // --------------------------------------------------------------------------- |
|
49 CMMCScBkupStateNotifyAllSnapshotsSupplied* CMMCScBkupStateNotifyAllSnapshotsSupplied::NewL( MMMCScBkupDriver& aDriver ) |
|
50 { |
|
51 CMMCScBkupStateNotifyAllSnapshotsSupplied* self = new(ELeave) CMMCScBkupStateNotifyAllSnapshotsSupplied( aDriver); |
|
52 return self; |
|
53 } |
|
54 |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // CMMCScBkupStateNotifyAllSnapshotsSupplied::StateId() |
|
58 // |
|
59 // |
|
60 // --------------------------------------------------------------------------- |
|
61 TMMCScBkupStateId CMMCScBkupStateNotifyAllSnapshotsSupplied::StateId() const |
|
62 { |
|
63 return KMMCScBkupStateIdNotifyAllSnapshotsSupplied; |
|
64 } |
|
65 |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // CMMCScBkupStateNotifyAllSnapshotsSupplied::NextStateId() |
|
69 // |
|
70 // |
|
71 // --------------------------------------------------------------------------- |
|
72 TMMCScBkupStateId CMMCScBkupStateNotifyAllSnapshotsSupplied::NextStateId() const |
|
73 { |
|
74 TMMCScBkupStateId nextState = KMMCScBkupStateIdRequestSizeOfBackupData; |
|
75 // |
|
76 const TMMCScBkupOperationType type = Driver().DrvOperation(); |
|
77 switch(type) |
|
78 { |
|
79 case EMMCScBkupOperationTypeFullBackup: |
|
80 nextState = KMMCScBkupStateIdRequestSizeOfBackupData; |
|
81 break; |
|
82 case EMMCScBkupOperationTypeFullRestore: |
|
83 nextState = KMMCScBkupStateIdArchiveOpSystemData; |
|
84 break; |
|
85 default: |
|
86 ASSERT( EFalse ); |
|
87 break; |
|
88 } |
|
89 // |
|
90 return nextState; |
|
91 } |
|
92 |
|
93 |
|
94 // --------------------------------------------------------------------------- |
|
95 // CMMCScBkupStateNotifyAllSnapshotsSupplied::PerformStateInitL() |
|
96 // |
|
97 // |
|
98 // --------------------------------------------------------------------------- |
|
99 void CMMCScBkupStateNotifyAllSnapshotsSupplied::PerformStateInitL() |
|
100 { |
|
101 Driver().DrvSecureBackupClient().AllSnapshotsSuppliedL(); |
|
102 } |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|