|
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 MAIL_LOADSTATEMACHINE_H |
|
21 #define MAIL_LOADSTATEMACHINE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "MMailStateMachine.h" |
|
26 //#include <?include_file> |
|
27 |
|
28 // CONSTANTS |
|
29 //const ?type ?constant_var = ?constant; |
|
30 |
|
31 // MACROS |
|
32 //#define ?macro ?macro_def |
|
33 |
|
34 // DATA TYPES |
|
35 //enum ?declaration |
|
36 //typedef ?declaration |
|
37 //extern ?data_type; |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 //?type ?function_name(?arg_list); |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 class MMailAppUiInterface; |
|
44 class CMailMessage; |
|
45 class MLoadState; |
|
46 |
|
47 // CLASS DECLARATION |
|
48 |
|
49 /** |
|
50 * CLoadStateMachine |
|
51 * Loads mail message asynchronous parts. |
|
52 * |
|
53 * @since Series 60 3.0 |
|
54 */ |
|
55 class CLoadStateMachine : public CActive, MStateMachine |
|
56 { |
|
57 public: |
|
58 static CLoadStateMachine* NewL( |
|
59 MMailAppUiInterface* aAppUI, |
|
60 CMailMessage& aMessage ); |
|
61 |
|
62 // Start operation |
|
63 void StartL(); |
|
64 /// Destructor |
|
65 ~CLoadStateMachine(); |
|
66 protected: // Functions from base classes |
|
67 void DoCancel(); |
|
68 void RunL(); // complete and select next state; |
|
69 TInt RunError(TInt aError); |
|
70 |
|
71 void SetIdArray( RPointerArray<HBufC>* aIdArray ); |
|
72 RPointerArray<HBufC>* GetIdArray(); |
|
73 |
|
74 private: |
|
75 /// Ctor |
|
76 CLoadStateMachine( |
|
77 MMailAppUiInterface* aAppUI, |
|
78 CMailMessage& aMessage ); |
|
79 void ConstructL(); |
|
80 |
|
81 private: // Data |
|
82 /// Ref: app UI call back |
|
83 MMailAppUiInterface* iAppUI; |
|
84 /// Ref to mail message |
|
85 CMailMessage& iMessage; |
|
86 /// Own: current state |
|
87 MLoadState* iState; |
|
88 /// Own: id array |
|
89 RPointerArray<HBufC>* iIdArray; |
|
90 }; |
|
91 |
|
92 |
|
93 |
|
94 #endif // MAIL_LOADSTATEMACHINE_H |
|
95 |
|
96 // End of File |