|         |      1 /* | 
|         |      2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). | 
|         |      3 * All rights reserved. | 
|         |      4 * This component and the accompanying materials are made available | 
|         |      5 * under the terms of "Eclipse Public License v1.0" | 
|         |      6 * which accompanies this distribution, and is available | 
|         |      7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". | 
|         |      8 * | 
|         |      9 * Initial Contributors: | 
|         |     10 * Nokia Corporation - initial contribution. | 
|         |     11 * | 
|         |     12 * Contributors: | 
|         |     13 * | 
|         |     14 * Description:  Async load state machine | 
|         |     15 * | 
|         |     16 */ | 
|         |     17  | 
|         |     18  | 
|         |     19  | 
|         |     20 #ifndef CHTML_MAIL_LOADSTATEMACHINE_H | 
|         |     21 #define CHTML_MAIL_LOADSTATEMACHINE_H | 
|         |     22  | 
|         |     23 //  INCLUDES | 
|         |     24 #include <e32base.h> | 
|         |     25 #include "CHtmlMailLoadStateMachine.h" | 
|         |     26  | 
|         |     27 // FORWARD DECLARATIONS | 
|         |     28 class MMailAppUiInterface; | 
|         |     29 class CMailMessage; | 
|         |     30 class MLoadState; | 
|         |     31 class CMailHtmlBodyControl; | 
|         |     32  | 
|         |     33 // CLASS DECLARATION | 
|         |     34  | 
|         |     35 /** | 
|         |     36 *  CHtmlLoadStateMachine | 
|         |     37 *  Loads html mail message asynchronous parts. | 
|         |     38 * | 
|         |     39 *  @since Series 60 3.0 | 
|         |     40 */	 | 
|         |     41 class CHtmlLoadStateMachine : public CActive | 
|         |     42 	{ | 
|         |     43 	public: | 
|         |     44 		static CHtmlLoadStateMachine* NewL(  | 
|         |     45 			MMailAppUiInterface* aAppUI,  | 
|         |     46 			CMailMessage& aMessage, | 
|         |     47 			CMailHtmlBodyControl& aHtmlControl ); | 
|         |     48 			 | 
|         |     49 		// Start operation | 
|         |     50 		void StartL(); | 
|         |     51 		/// Destructor | 
|         |     52 		~CHtmlLoadStateMachine(); | 
|         |     53 	protected: // Functions from base classes	 | 
|         |     54 		void DoCancel(); | 
|         |     55 		void RunL(); // complete and select next state; | 
|         |     56 		TInt RunError(TInt aError); | 
|         |     57 	     | 
|         |     58 	private: | 
|         |     59 		/// Ctor | 
|         |     60 		CHtmlLoadStateMachine(  | 
|         |     61 			MMailAppUiInterface* aAppUI,  | 
|         |     62 			CMailMessage& aMessage, | 
|         |     63 			CMailHtmlBodyControl& aHtmlControl ); | 
|         |     64 		void ConstructL(); | 
|         |     65  | 
|         |     66 	private: // Data | 
|         |     67 	    /// Ref: app UI call back | 
|         |     68 	    MMailAppUiInterface* iAppUI; | 
|         |     69 	    /// Ref to mail message | 
|         |     70 	    CMailMessage& iMessage;  | 
|         |     71 	    /// Ref to html control | 
|         |     72 	    CMailHtmlBodyControl& iHtmlControl; 	     | 
|         |     73 	    /// Own: current state | 
|         |     74 	    MLoadState* iState;		     | 
|         |     75 	}; | 
|         |     76  | 
|         |     77  | 
|         |     78  | 
|         |     79 #endif // CHTML_MAIL_LOADSTATEMACHINE_H    | 
|         |     80              | 
|         |     81 // End of File |