1 /* |
|
2 * Copyright (c) 2006 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: This file contains the header file of the CDynamicThemeModifier class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __DYNAMICTHEMEMODIFIER_H__ |
|
20 #define __DYNAMICTHEMEMODIFIER_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <centralrepository.h> |
|
25 #include <cenrepnotifyhandler.h> |
|
26 //#include <xnclient.h> |
|
27 //#include <xncontentaccessclient.h> |
|
28 //#include <xnrequestclient.h> |
|
29 //#include <xnresult.h> |
|
30 |
|
31 |
|
32 //class MAiPSPropertyObserver; |
|
33 |
|
34 namespace AiXmlUiController |
|
35 { |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * This class updates the theme dynamically as it is being somehow modified. |
|
41 * |
|
42 * It connects to XUIKON Content Access API and modifies e.g. NT visibility |
|
43 * in theme level as user changes appropriate setting in GS. Appropriate CenRep |
|
44 * keys are being observed and theme modifications are launched based on changes |
|
45 * in those keys. |
|
46 * |
|
47 * @since S60 3.2 |
|
48 */ |
|
49 class CDynamicThemeModifier : public CBase, |
|
50 public MCenRepNotifyHandlerCallback, |
|
51 public MXnThemeManagementServiceObserver, |
|
52 public MXnContentAccessServiceObserver, |
|
53 public MXnClientRequestServiceObserver |
|
54 |
|
55 { |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 */ |
|
61 static CDynamicThemeModifier* NewL(); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 ~CDynamicThemeModifier(); |
|
67 |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * C++ default constructor. |
|
73 */ |
|
74 CDynamicThemeModifier(); |
|
75 |
|
76 /** |
|
77 * By default Symbian 2nd phase constructor is private. |
|
78 */ |
|
79 void ConstructL(); |
|
80 |
|
81 |
|
82 private: // New methods |
|
83 |
|
84 /** |
|
85 * Load AI2 themes. |
|
86 */ |
|
87 void LoadThemesL(); |
|
88 |
|
89 /** |
|
90 * Load settings from active theme. |
|
91 */ |
|
92 void LoadSettingsFromThemeL(); |
|
93 |
|
94 /** |
|
95 * Handle NT visibility in theme. |
|
96 * @param ETrue for showing NewsTicker, EFalse for hiding it. |
|
97 */ |
|
98 void EnableNewsTickerL( TBool aEnabled ); |
|
99 |
|
100 |
|
101 private: // From base classes |
|
102 |
|
103 void HandleXnClientMessage( TXnServiceCompletedMessage aMessage ); |
|
104 void HandleXnRequestClientMessage( TXnServiceCompletedMessage /*aMessage*/ ) {}; |
|
105 void XnSettingsUpdated() {}; |
|
106 void HandleNotifyInt( TUint32 aId, TInt aNewValue ); |
|
107 |
|
108 |
|
109 |
|
110 private: // Data |
|
111 |
|
112 CArrayPtrFlat<CXnODT>* iThemeArray; |
|
113 CXnClient* iXnClient; |
|
114 CXnContentAccessClient* iXnContentAccessClient; |
|
115 CXnRequestClient* iXnRequestClient; |
|
116 CXnResult* iXnResult; |
|
117 CXnDomDocument* iDomDocument; |
|
118 CXnODT* iOdt; |
|
119 CRepository* iNTCenRep; |
|
120 CRepository* iAiCenRep; |
|
121 CCenRepNotifyHandler* iNTCenRepObserver; |
|
122 TInt iNumberOfHeaders; |
|
123 TInt iEnabledInCenRep; |
|
124 |
|
125 }; |
|
126 |
|
127 } // namespace |
|
128 |
|
129 #endif // __DYNAMICTHEMEMODIFIER_H__ |
|
130 |
|
131 // End of File |
|