|
1 /* |
|
2 * Copyright (c) 2005 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: View for setting call image. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PSLNCALLIMAGEPLUGIN_H |
|
20 #define PSLNCALLIMAGEPLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknsettingpage.h> |
|
24 #include <pslnfwbaseview.h> |
|
25 #include <ConeResLoader.h> |
|
26 #include <pslnfwplugininterface.h> |
|
27 #include <centralrepository.h> |
|
28 #include <mpslnfwmsklabelobserver.h> |
|
29 |
|
30 //CONSTANTS |
|
31 const TUid KPslnCallImagePluginUid = { 0x102818EF }; |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CAknViewAppUi; |
|
35 class CPslnCallImagePluginContainer; |
|
36 class CPslnCallImagePluginDRM; |
|
37 |
|
38 // CLASS DEFINITION |
|
39 /** |
|
40 * CPslnCallImagePlugin view class for call image settings |
|
41 * @since Series 60_3.2 |
|
42 * |
|
43 */ |
|
44 class CPslnCallImagePlugin : public CPslnFWBaseView, |
|
45 public MPslnFWMSKObserver |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Symbian OS two-phased constructor |
|
51 * @return Psln AI skinning view. |
|
52 */ |
|
53 static CPslnCallImagePlugin* NewL( TAny* aAppUi ); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 */ |
|
58 ~CPslnCallImagePlugin(); |
|
59 |
|
60 public: // From CPslnFWnInterface |
|
61 |
|
62 /** |
|
63 * @see CPslnFWPluginInterface. |
|
64 */ |
|
65 void GetCaptionL( TDes& aCaption ) const; |
|
66 |
|
67 |
|
68 /** |
|
69 * @see CPslnFWPluginInterface. |
|
70 */ |
|
71 void GetTabTextL( TDes& aCaption ) const; |
|
72 |
|
73 /** |
|
74 * @see CPslnFWPluginInterface. |
|
75 */ |
|
76 CGulIcon* CreateIconL(); |
|
77 |
|
78 /** |
|
79 * @see CPslnFWPluginInterface. |
|
80 */ |
|
81 void GetLocationTypeAndIndex( |
|
82 TPslnFWLocationType& aType, |
|
83 TInt& aIndex ) const; |
|
84 |
|
85 public: // from AknView |
|
86 |
|
87 /** |
|
88 * Returns view id. |
|
89 * @return TUid |
|
90 */ |
|
91 TUid Id() const; |
|
92 |
|
93 /** |
|
94 * Handles commands. |
|
95 * @param aCommand Command to be handled. |
|
96 * |
|
97 */ |
|
98 void HandleCommandL( TInt aCommand ); |
|
99 |
|
100 public: // new |
|
101 |
|
102 /** |
|
103 * Get CPslnCallImagePlugin's container. |
|
104 * @return pointer to container. |
|
105 */ |
|
106 CPslnCallImagePluginContainer* Container(); |
|
107 |
|
108 /** |
|
109 * From MPslnFWMSKObserver. |
|
110 * Checks if the MSK label needs to be adjusted. |
|
111 */ |
|
112 void CheckMiddleSoftkeyLabelL(); |
|
113 |
|
114 protected: // From CAknView |
|
115 |
|
116 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
117 TUid aCustomMessageId, |
|
118 const TDesC8& aCustomMessage ); |
|
119 void DoDeactivate(); |
|
120 |
|
121 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
122 |
|
123 protected: |
|
124 |
|
125 /** |
|
126 * C++ default constructor. |
|
127 */ |
|
128 CPslnCallImagePlugin( CAknViewAppUi* aAppUi ); |
|
129 |
|
130 /** |
|
131 * Symbian OS default constructor. |
|
132 * |
|
133 */ |
|
134 void ConstructL(); |
|
135 |
|
136 private: // from CPslnFWBaseView |
|
137 |
|
138 /** |
|
139 * @see CPslnFWBaseView. |
|
140 */ |
|
141 void NewContainerL(); |
|
142 |
|
143 /** |
|
144 * @see CPslnFWBaseView. |
|
145 */ |
|
146 void HandleListBoxSelectionL(); |
|
147 |
|
148 /** |
|
149 * @see CPslnFWBaseView. |
|
150 */ |
|
151 void SetTitlePaneL( TInt& aResourceId ); |
|
152 |
|
153 private: |
|
154 |
|
155 void HandleImageErrorsL( TInt aError ); |
|
156 |
|
157 void SetCallImageL(); |
|
158 |
|
159 TInt SetCallImagePath( const TDesC& aImagePath ); |
|
160 |
|
161 void SetCallImageSettingL( const TInt aValue ); |
|
162 |
|
163 TInt SetPathL( const TDesC& aPath ); |
|
164 |
|
165 void RemoveCommandFromMSK(); |
|
166 |
|
167 private: |
|
168 |
|
169 // Resource loader. |
|
170 RConeResourceLoader iResourceLoader; |
|
171 |
|
172 // Resource loader for common psln resources. |
|
173 RConeResourceLoader iResourceLoaderCommon; |
|
174 |
|
175 // Resource loader for Psln app resources. |
|
176 RConeResourceLoader iResourceLoaderPsln; |
|
177 |
|
178 // Application UI pointer (not owned) |
|
179 CAknViewAppUi* iAppUi; |
|
180 |
|
181 // Call Image Plugin |
|
182 CPslnCallImagePluginDRM* iVerifier; |
|
183 }; |
|
184 |
|
185 #endif //PSLNCALLIMAGEPLUGIN_H |
|
186 |
|
187 // End of File |