1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
103 { |
103 { |
104 return iSyncPhase; |
104 return iSyncPhase; |
105 } |
105 } |
106 |
106 |
107 |
107 |
108 // ----------------------------------------------------------------------------- |
|
109 // SetProgress |
|
110 // |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 void CIAUpdateFWSyncState::SetProgress(TInt aCount) |
|
114 { |
|
115 iProgressCount = aCount; |
|
116 } |
|
117 |
108 |
118 // ----------------------------------------------------------------------------- |
|
119 // IncreaseProgress |
|
120 // |
|
121 // ----------------------------------------------------------------------------- |
|
122 // |
|
123 void CIAUpdateFWSyncState::IncreaseProgress() |
|
124 { |
|
125 if (iProgressCount < iTotalProgressCount) |
|
126 { |
|
127 iProgressCount++; |
|
128 } |
|
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // Progress |
|
133 // |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 TInt CIAUpdateFWSyncState::Progress() |
|
137 { |
|
138 return iProgressCount; |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // SetTotalProgress |
|
143 // |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 void CIAUpdateFWSyncState::SetTotalProgress(TInt aCount) |
|
147 { |
|
148 iTotalProgressCount = aCount; |
|
149 } |
|
150 |
|
151 // ----------------------------------------------------------------------------- |
|
152 // TotalProgress |
|
153 // |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 TInt CIAUpdateFWSyncState::TotalProgress() |
|
157 { |
|
158 return iTotalProgressCount; |
|
159 } |
|
160 |
|
161 // ----------------------------------------------------------------------------- |
|
162 // SetContent |
|
163 // |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 void CIAUpdateFWSyncState::SetContent(const TDesC& aContent) |
|
167 { |
|
168 TUtil::StrCopy(iSyncContent, aContent); |
|
169 } |
|
170 |
|
171 // ----------------------------------------------------------------------------- |
|
172 // Content |
|
173 // |
|
174 // ----------------------------------------------------------------------------- |
|
175 // |
|
176 const TDesC& CIAUpdateFWSyncState::Content() |
|
177 { |
|
178 return iSyncContent; |
|
179 } |
|
180 |
|
181 // ----------------------------------------------------------------------------- |
|
182 // ResetProgress |
|
183 // |
|
184 // ----------------------------------------------------------------------------- |
|
185 // |
|
186 void CIAUpdateFWSyncState::ResetProgress() |
|
187 { |
|
188 iProgressCount = 0; |
|
189 iTotalProgressCount = 0; |
|
190 iSyncContent = KNullDesC; |
|
191 } |
|
192 |
|
193 // ----------------------------------------------------------------------------- |
|
194 // ProgressKnown |
|
195 // |
|
196 // ----------------------------------------------------------------------------- |
|
197 // |
|
198 TBool CIAUpdateFWSyncState::ProgressKnown() |
|
199 { |
|
200 if (iTotalProgressCount == -1 ) |
|
201 { |
|
202 return EFalse; |
|
203 } |
|
204 |
|
205 return ETrue; |
|
206 } |
|
207 |
|
208 |
|