|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <e32std.h> |
|
17 #include <imageprocessor/imageprocessorprogressinfointf.h> |
|
18 #include <imageprocessor/imageprocessorprogressinfo.h> |
|
19 #include "imageprocessorimpl.h" |
|
20 #include <imageprocessor/imageprocessor.h> |
|
21 #include "imageprocessormain.h" |
|
22 |
|
23 namespace ImageProcessor |
|
24 { |
|
25 |
|
26 TProgressInfo::TProgressInfo(Plugin::MProgressInfo& aProgressInfoImpl, CImageProcessorImpl& aImageProcessorImpl) |
|
27 :iImageProcessorImpl(aImageProcessorImpl), |
|
28 iProgressInfoImpl(aProgressInfoImpl), |
|
29 iReserved(0) |
|
30 { |
|
31 } |
|
32 |
|
33 /** |
|
34 Gets the current iteration count. |
|
35 |
|
36 @return the current iteration value. |
|
37 */ |
|
38 EXPORT_C TInt TProgressInfo::CurrentIterationL() const |
|
39 { |
|
40 __ASSERT_ALWAYS(iImageProcessorImpl.IsInputSet(), User::Leave(KErrNotReady)); |
|
41 return iProgressInfoImpl.CurrentIterationL(); |
|
42 } |
|
43 |
|
44 /** |
|
45 Gets the total number of iterations expected to complete the task. |
|
46 |
|
47 @return the total number of expected iterations. |
|
48 */ |
|
49 EXPORT_C TInt TProgressInfo::NumberOfIterationsL() const |
|
50 { |
|
51 __ASSERT_ALWAYS(iImageProcessorImpl.IsInputSet(), User::Leave(KErrNotReady)); |
|
52 return iProgressInfoImpl.NumberOfIterationsL(); |
|
53 } |
|
54 |
|
55 /** |
|
56 Gets access to custom extension. |
|
57 */ |
|
58 EXPORT_C TAny* TProgressInfo::Extension(TUid aExtension) const |
|
59 { |
|
60 __ASSERT_ALWAYS(((iImageProcessorImpl.State() != CImgProcessor::EUninitialized) && (iImageProcessorImpl.State() != CImgProcessor::EInitializing)), Panic(EPanicProgressInfoNotAvailable)); |
|
61 return iProgressInfoImpl.Extension(aExtension); |
|
62 } |
|
63 |
|
64 }//namespace ImageProcessor |
|
65 |
|
66 //EOF |