filehandling/htmltorichtextconverter/tsrc/CHtmlToCrtConvActive.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     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 #ifndef __CHTMLTOCRTCONVACTIVE_H__
       
    17 #define __CHTMLTOCRTCONVACTIVE_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <e32cons.h>
       
    21 #include <e32std.h>
       
    22 #include <f32file.h>
       
    23 #include <txtrich.h> 
       
    24 #include <txtfrmat.h>
       
    25 #include <conarc.h>
       
    26 #include <s32stor.h>
       
    27 #include <s32file.h>
       
    28 
       
    29 class CHtmlToCrtConverter;
       
    30 
       
    31 //=========================
       
    32 // CActiveConv
       
    33 //=========================
       
    34 class CActiveConv : public CActive
       
    35 	{
       
    36 public:
       
    37 	static CActiveConv* NewL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL);
       
    38 	~CActiveConv();
       
    39 
       
    40 	//from CActive
       
    41 	virtual void DoCancel();
       
    42 	virtual void RunL();
       
    43 	void StartConversionL();
       
    44 
       
    45 private:
       
    46 	CActiveConv(MConverterUiObserver* aObserver);
       
    47 	void ConstructL(const TFileName& aSourceFile, const TFileName& aTargetFile);
       
    48 
       
    49 private:
       
    50 	CConverterBase* iConverter;
       
    51 	MConverterUiObserver* iObserver;
       
    52 	HBufC* iSourceFile;
       
    53 	HBufC* iTargetFile;
       
    54 	};
       
    55 
       
    56 //=========================
       
    57 // CTestScheduler
       
    58 //=========================
       
    59 class CTestScheduler : public CActiveScheduler
       
    60  {
       
    61 public:
       
    62 	
       
    63 	virtual void Error(TInt anError) const;
       
    64 	TInt GetError();
       
    65 
       
    66 private:
       
    67 	
       
    68 	TInt iError;
       
    69  };
       
    70 
       
    71 //=========================
       
    72 // CConversionObserver
       
    73 //=========================
       
    74 class CConversionObserver : public CBase, public MConverterUiObserver
       
    75 	{
       
    76 public:
       
    77 	static CConversionObserver* NewLC();
       
    78 	~CConversionObserver();
       
    79 
       
    80 	//from MConverterUiObserver
       
    81 	void MaxSteps(TInt aMax, TInt aObject);
       
    82 	TInt Result(TInt aResult, TInt aObject); // Passes in a TResult, returns a TAction
       
    83 	HBufC* QueryPasswordL(const TDesC& aClue);
       
    84 
       
    85 private:
       
    86 	HBufC* iCharsetName;
       
    87 	};
       
    88 
       
    89 #endif