diff -r 000000000000 -r 40261b775718 imagingandcamerafws/imagingfws/ImageProcessor/src/imageprocessorprogressinfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingandcamerafws/imagingfws/ImageProcessor/src/imageprocessorprogressinfo.cpp Tue Feb 02 01:56:55 2010 +0200 @@ -0,0 +1,66 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include +#include +#include "imageprocessorimpl.h" +#include +#include "imageprocessormain.h" + +namespace ImageProcessor + { + +TProgressInfo::TProgressInfo(Plugin::MProgressInfo& aProgressInfoImpl, CImageProcessorImpl& aImageProcessorImpl) +:iImageProcessorImpl(aImageProcessorImpl), + iProgressInfoImpl(aProgressInfoImpl), + iReserved(0) + { + } + +/** +Gets the current iteration count. + +@return the current iteration value. +*/ +EXPORT_C TInt TProgressInfo::CurrentIterationL() const + { + __ASSERT_ALWAYS(iImageProcessorImpl.IsInputSet(), User::Leave(KErrNotReady)); + return iProgressInfoImpl.CurrentIterationL(); + } + +/** +Gets the total number of iterations expected to complete the task. + +@return the total number of expected iterations. +*/ +EXPORT_C TInt TProgressInfo::NumberOfIterationsL() const + { + __ASSERT_ALWAYS(iImageProcessorImpl.IsInputSet(), User::Leave(KErrNotReady)); + return iProgressInfoImpl.NumberOfIterationsL(); + } + +/** +Gets access to custom extension. +*/ +EXPORT_C TAny* TProgressInfo::Extension(TUid aExtension) const + { + __ASSERT_ALWAYS(((iImageProcessorImpl.State() != CImgProcessor::EUninitialized) && (iImageProcessorImpl.State() != CImgProcessor::EInitializing)), Panic(EPanicProgressInfoNotAvailable)); + return iProgressInfoImpl.Extension(aExtension); + } + + }//namespace ImageProcessor + +//EOF