|
1 /* |
|
2 * Copyright (c) 2007-2007 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: CIAUpdateRestartInfo |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "iaupdaterestartinfo.h" |
|
22 #include "iaupdatependingnodesfile.h" |
|
23 #include "iaupdaterresultsfile.h" |
|
24 |
|
25 |
|
26 EXPORT_C CIAUpdateRestartInfo* CIAUpdateRestartInfo::NewL() |
|
27 { |
|
28 CIAUpdateRestartInfo* self = |
|
29 CIAUpdateRestartInfo::NewLC(); |
|
30 CleanupStack::Pop( self ); |
|
31 return self; |
|
32 } |
|
33 |
|
34 |
|
35 EXPORT_C CIAUpdateRestartInfo* CIAUpdateRestartInfo::NewLC() |
|
36 { |
|
37 CIAUpdateRestartInfo* self = |
|
38 new( ELeave) CIAUpdateRestartInfo(); |
|
39 CleanupStack::PushL( self ); |
|
40 self->ConstructL(); |
|
41 return self; |
|
42 } |
|
43 |
|
44 |
|
45 CIAUpdateRestartInfo::CIAUpdateRestartInfo() |
|
46 : CBase() |
|
47 { |
|
48 |
|
49 } |
|
50 |
|
51 |
|
52 void CIAUpdateRestartInfo::ConstructL() |
|
53 { |
|
54 iPendingNodesFile = |
|
55 CIAUpdatePendingNodesFile::NewL(); |
|
56 iPendingNodesFile->ReadDataL(); |
|
57 |
|
58 iResultsFile = |
|
59 CIAUpdaterResultsFile::NewL(); |
|
60 iResultsFile->ReadDataL(); |
|
61 } |
|
62 |
|
63 |
|
64 EXPORT_C CIAUpdateRestartInfo::~CIAUpdateRestartInfo() |
|
65 { |
|
66 delete iPendingNodesFile; |
|
67 delete iResultsFile; |
|
68 } |
|
69 |
|
70 |
|
71 EXPORT_C void CIAUpdateRestartInfo::DeleteFiles() |
|
72 { |
|
73 iPendingNodesFile->RemoveFile(); |
|
74 iResultsFile->RemoveFile(); |
|
75 } |
|
76 |
|
77 |
|
78 EXPORT_C CIAUpdatePendingNodesFile& CIAUpdateRestartInfo::PendingNodesFile() |
|
79 { |
|
80 return *iPendingNodesFile; |
|
81 } |
|
82 |
|
83 |
|
84 EXPORT_C CIAUpdaterResultsFile& CIAUpdateRestartInfo::ResultsFile() |
|
85 { |
|
86 return *iResultsFile; |
|
87 } |