|
1 /* |
|
2 * Copyright (c) 2003-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: Base class for all views |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCAVIEW_H |
|
20 #define CCAVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "CCAAppUi.h" |
|
24 #include "CCAUISessionManager.h" |
|
25 #include <aknview.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CCAAppUi; |
|
30 class MCAViewSwitcher; |
|
31 class CCAEngine; |
|
32 class CAknNavigationDecorator; |
|
33 class CCAFadeControl; |
|
34 class CAknIndicatorContainer; |
|
35 class CAknNavigationControlContainer; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Base class for chat application's view-classes |
|
41 * Capsulates common methods |
|
42 * |
|
43 * @lib chat.app |
|
44 * @since 1.2 |
|
45 */ |
|
46 class CCAView : public CAknView |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * C++ default constructor. |
|
52 */ |
|
53 CCAView(); |
|
54 |
|
55 |
|
56 /** |
|
57 * Constructs CCAView-object |
|
58 * @param aAvkonViewResourceId Id of a resource that is used to constuct |
|
59 * this view |
|
60 * @param aViewId View id for view to be constructed |
|
61 * @return Pointer to CCAAppUi |
|
62 */ |
|
63 void BaseConstructL( TInt aAvkonViewResourceId, TUid aViewId ); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~CCAView(); |
|
69 |
|
70 |
|
71 public: // Functions from base classes |
|
72 |
|
73 /** |
|
74 * From CAknView Returns the view's id |
|
75 * @return View-id |
|
76 */ |
|
77 TUid Id() const; |
|
78 |
|
79 public: // New functions |
|
80 |
|
81 /** |
|
82 * Fetches pointer to ChatClient-application's AppUi (CCAAppUi). |
|
83 * @return Pointer to CCAAppUi |
|
84 */ |
|
85 CCAAppUi* CAAppUi() const; |
|
86 |
|
87 /** |
|
88 * Fetches pointer to ChatClient-application's view switcher |
|
89 * @return Pointer to view switcher |
|
90 */ |
|
91 MCAViewSwitcher* CAViewSwitcher() const; |
|
92 |
|
93 /** |
|
94 * Return pointer to application engine |
|
95 * @return Pointer to application engine |
|
96 */ |
|
97 //CCAEngine& CAModel() const; |
|
98 |
|
99 /** |
|
100 * Return pointer to UI Session Manager |
|
101 * @return Pointer to UI Session Manager |
|
102 */ |
|
103 CCAUISessionManager& UISessionManager() const; |
|
104 |
|
105 /** |
|
106 * Returns IMessage indicator |
|
107 * @return handle to imessage indicator |
|
108 */ |
|
109 CCAFadeControl* IMessageIndicator() const; |
|
110 |
|
111 /** |
|
112 * Initialises instant messaging navipane indicator. This is called |
|
113 * when view is activated. |
|
114 */ |
|
115 void InitMessageIndicatorL(); |
|
116 |
|
117 /** |
|
118 * Hides fade text |
|
119 */ |
|
120 void HideFadeText(); |
|
121 |
|
122 /** |
|
123 * Destroys instant messaging indicators. This method is called when |
|
124 * view is deactivated. |
|
125 */ |
|
126 void DestroyMessageIndicator(); |
|
127 |
|
128 /** |
|
129 * Pushes fade text control to navistack |
|
130 */ |
|
131 void PushFadeTextL(); |
|
132 |
|
133 /** |
|
134 * Shows fade text |
|
135 * @param aTextToFade Descriptor that contains message to fade |
|
136 */ |
|
137 void ShowFadeText( const TDesC& aTextToFade ); |
|
138 |
|
139 /** |
|
140 * Shows navipane indicators |
|
141 */ |
|
142 void ShowNavipaneIndicators(); |
|
143 |
|
144 /** |
|
145 * Hides navi pane message info |
|
146 */ |
|
147 void HideNavipaneIndicators(); |
|
148 |
|
149 protected: // New functions |
|
150 |
|
151 /** |
|
152 * Starts fade operation |
|
153 */ |
|
154 void RunFadeText(); |
|
155 |
|
156 /** |
|
157 * Resets the text to fade |
|
158 */ |
|
159 void ResetFadeText(); |
|
160 |
|
161 /** |
|
162 * Launches help application |
|
163 */ |
|
164 void LaunchHelpL(); |
|
165 |
|
166 /** |
|
167 * From CCoeControl |
|
168 * @see CCoeControl |
|
169 */ |
|
170 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
171 |
|
172 |
|
173 /** |
|
174 * Checks if function is supported and if not "not supported" note is |
|
175 * displayed |
|
176 * @param aSupportedFeature |
|
177 * @return ETrue if supported, else EFalse |
|
178 */ |
|
179 TBool IsFunctionSupported( |
|
180 CCAUISessionManager::TSupportedFeature aSupporterFeature ); |
|
181 |
|
182 private: //New functions |
|
183 |
|
184 /** |
|
185 * Creates new IMessage indicator |
|
186 * @return new IMessageIndicator |
|
187 */ |
|
188 CAknNavigationDecorator* CreateIMessageIndicatorL(); |
|
189 |
|
190 private: // Data |
|
191 |
|
192 // View's UID |
|
193 TUid iViewId; |
|
194 |
|
195 //Owns. |
|
196 CAknNavigationDecorator* iDecoratedFadeText; |
|
197 |
|
198 //Doesn't own |
|
199 CAknNavigationControlContainer* iNaviPane; |
|
200 }; |
|
201 |
|
202 #endif // CCAVIEW_H |
|
203 |
|
204 // End of File |