|
1 /* |
|
2 * Copyright (c) 2007 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 listen list type settings from CenRep |
|
16 * (KCRUidMuiuSettings / KMuiuMailMessageListType ) |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef __MCELISTBOXTYPEOBSERVER_H__ |
|
23 #define __MCELISTBOXTYPEOBSERVER_H__ |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CRepository; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 |
|
34 class MMceListboxTypeObserver |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Called when setting value changes |
|
39 * @param aListboxType: new value |
|
40 */ |
|
41 virtual void ListboxTypeChangedL() = 0; |
|
42 }; |
|
43 |
|
44 enum TMceMessageListType |
|
45 { |
|
46 EMceListTypeOneRow = 0, |
|
47 EMceListTypeTwoRow |
|
48 }; |
|
49 |
|
50 /** |
|
51 * CMceListboxTypeObserver |
|
52 * |
|
53 * |
|
54 */ |
|
55 class CMceListboxTypeObserver : public CActive |
|
56 { |
|
57 public: // Constructors and destructor |
|
58 |
|
59 /** |
|
60 * Constructor |
|
61 * @param aObserver: observer, which is notified |
|
62 * when setting value changes. |
|
63 */ |
|
64 static CMceListboxTypeObserver* NewL( |
|
65 MMceListboxTypeObserver& aObserver, |
|
66 TUint32 aSetting ); |
|
67 private: |
|
68 |
|
69 /** |
|
70 * C++ constructor. |
|
71 */ |
|
72 CMceListboxTypeObserver( |
|
73 MMceListboxTypeObserver& aObserver, |
|
74 TUint32 aSetting ); |
|
75 |
|
76 /** |
|
77 * Symbian constructor |
|
78 */ |
|
79 void ConstructL( ); |
|
80 |
|
81 |
|
82 public: |
|
83 |
|
84 /** |
|
85 * Destructor. |
|
86 */ |
|
87 virtual ~CMceListboxTypeObserver(); |
|
88 |
|
89 public: // New functions |
|
90 /** |
|
91 * @return: current listbox type (one row / two row) |
|
92 * TODO: enum for that? |
|
93 */ |
|
94 TInt ListboxType() const; |
|
95 |
|
96 private: // Functions from CActive |
|
97 /** |
|
98 * From CActive |
|
99 */ |
|
100 virtual void DoCancel(); |
|
101 |
|
102 /** |
|
103 * From CActive |
|
104 */ |
|
105 virtual void RunL(); |
|
106 |
|
107 /** |
|
108 * From CActive |
|
109 */ |
|
110 virtual TInt RunError( TInt aError ); |
|
111 |
|
112 private: //Data |
|
113 MMceListboxTypeObserver& iObserver; |
|
114 TInt iListType; |
|
115 CRepository* iRepository; |
|
116 TUint32 iSetting; |
|
117 }; |
|
118 |
|
119 #endif // __MCELISTBOXTYPEOBSERVER_H__ |
|
120 |
|
121 // End of File |