|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Active object to load mtm's background after mce start. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MCEIDLEMTMLOADER_H__ |
|
22 #define __MCEIDLEMTMLOADER_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <MsgArrays.h> |
|
27 #include "MsgFunctionInfo.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CMceIdleMtmLoader |
|
35 * |
|
36 * |
|
37 */ |
|
38 class CMceIdleMtmLoader : public CActive |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * C++ constructor. |
|
44 */ |
|
45 CMceIdleMtmLoader( |
|
46 CMtmStore& aMtmStore, |
|
47 CUidNameArray& aMsgTypesWritePopup, |
|
48 CUidNameArray& aMsgTypesWriteSubmenu, |
|
49 CUidNameArray& aMsgTypesSettings, |
|
50 CMsgFuncArray& aMTMFunctionsArray, |
|
51 CMtmUiDataRegistry& aUiRegistry ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CMceIdleMtmLoader(); |
|
57 |
|
58 public: // New functions |
|
59 |
|
60 /** |
|
61 * Starts loading of MTMs |
|
62 * @param aSession: session to message server |
|
63 * @param aAudioMsgEnabled: to check whether audio message is enabled or not |
|
64 * @param aPostcardEnabled: to check whether audio message is enabled or not |
|
65 */ |
|
66 void StartL(CMsvSession& aSession, TBool aAudioMsgEnabled, TBool aPostcardEnabled); // CR : 401-1806 |
|
67 |
|
68 /** |
|
69 * Complete synchronously. Loads rest of the MTMs immediately. |
|
70 * @param aAudioMsgEnabled: to check whether audio message is enabled or not |
|
71 * @param aPostcardEnabled: to check whether audio message is enabled or not |
|
72 */ |
|
73 void FinishL(TBool aAudioMsgEnabled, TBool aPostcardEnabled); // CR : 401-1806 |
|
74 |
|
75 |
|
76 private: // Functions from CActive |
|
77 /** |
|
78 * From CActive |
|
79 */ |
|
80 virtual void DoCancel(); |
|
81 |
|
82 /** |
|
83 * From CActive |
|
84 */ |
|
85 virtual void RunL(); |
|
86 |
|
87 private: // New functions |
|
88 |
|
89 /** |
|
90 * Requests next mtm to be loaded. |
|
91 */ |
|
92 void QueueLoad(); |
|
93 |
|
94 /** |
|
95 * Load one mtm |
|
96 * @param aMtmType: mtm to load. |
|
97 */ |
|
98 void LoadMtmL( TUid aMtmType ); |
|
99 |
|
100 /** |
|
101 * Changes array order: sms, mms, email, others... |
|
102 */ |
|
103 void SortAndChangeSmsMmsEmailFirstL(); |
|
104 |
|
105 /** |
|
106 * Places given mtm first in the array. |
|
107 * @param aArray: reference to array |
|
108 * @param aMsgType: mtm to changed to the first. |
|
109 */ |
|
110 void ChangeMsgTypeTopL( CUidNameArray& aArray, TUid aMsgType ) const; |
|
111 |
|
112 private: //Data |
|
113 CMtmDllRegistry& iUiRegistry; |
|
114 CMtmStore& iMtmStore; |
|
115 CUidNameArray& iMsgTypesWritePopup; |
|
116 CUidNameArray& iMsgTypesWriteSubmenu; |
|
117 CUidNameArray& iMsgTypesSettings; |
|
118 CMsgFuncArray& iMTMFunctionsArray; |
|
119 TInt iRegMtmIndex; |
|
120 TBool iAudioMsgEnabled ; // CR : 401-1806 |
|
121 TBool iPostcardEnabled ; // CR : 401-1806 |
|
122 }; |
|
123 |
|
124 #endif // __MCEIDLEMTMLOADER_H__ |
|
125 |
|
126 // End of File |