diff -r 000000000000 -r 2e3d3ce01487 filehandling/htmltorichtextconverter/tsrc/CHtmlToCrtConvActive.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/filehandling/htmltorichtextconverter/tsrc/CHtmlToCrtConvActive.h Tue Feb 02 10:12:00 2010 +0200 @@ -0,0 +1,89 @@ +// 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: +// + +#ifndef __CHTMLTOCRTCONVACTIVE_H__ +#define __CHTMLTOCRTCONVACTIVE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class CHtmlToCrtConverter; + +//========================= +// CActiveConv +//========================= +class CActiveConv : public CActive + { +public: + static CActiveConv* NewL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); + ~CActiveConv(); + + //from CActive + virtual void DoCancel(); + virtual void RunL(); + void StartConversionL(); + +private: + CActiveConv(MConverterUiObserver* aObserver); + void ConstructL(const TFileName& aSourceFile, const TFileName& aTargetFile); + +private: + CConverterBase* iConverter; + MConverterUiObserver* iObserver; + HBufC* iSourceFile; + HBufC* iTargetFile; + }; + +//========================= +// CTestScheduler +//========================= +class CTestScheduler : public CActiveScheduler + { +public: + + virtual void Error(TInt anError) const; + TInt GetError(); + +private: + + TInt iError; + }; + +//========================= +// CConversionObserver +//========================= +class CConversionObserver : public CBase, public MConverterUiObserver + { +public: + static CConversionObserver* NewLC(); + ~CConversionObserver(); + + //from MConverterUiObserver + void MaxSteps(TInt aMax, TInt aObject); + TInt Result(TInt aResult, TInt aObject); // Passes in a TResult, returns a TAction + HBufC* QueryPasswordL(const TDesC& aClue); + +private: + HBufC* iCharsetName; + }; + +#endif