|
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: Header file for the CUpnpNoteHandler class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef UPNP_COMMAND_NOTE_HANDLER_TASK_H |
|
20 #define UPNP_COMMAND_NOTE_HANDLER_TASK_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CAknWaitDialog; |
|
27 |
|
28 /** |
|
29 * This class does all UI note handling of UpnpCommand component. |
|
30 * |
|
31 * @since S60 3.2 |
|
32 */ |
|
33 class CUpnpNoteHandler : public CBase |
|
34 { |
|
35 public: // Construction methods |
|
36 |
|
37 /** |
|
38 * Creates a new CUpnpNoteHandler instance. |
|
39 * |
|
40 * @since S60 3.2 |
|
41 * @return a new instance of CUpnpNoteHandler |
|
42 */ |
|
43 static CUpnpNoteHandler* NewL(); |
|
44 |
|
45 public: // Business logic methods |
|
46 |
|
47 /** |
|
48 * Run the "Connecting" wait note. |
|
49 * |
|
50 * @since Series 60 3.2 |
|
51 * @return TInt return value |
|
52 */ |
|
53 TInt RunConnectingWaitNote(); |
|
54 |
|
55 /** |
|
56 * Closes the currently displaying wait note. |
|
57 * |
|
58 * @since Series 60 3.2 |
|
59 */ |
|
60 void CloseWaitNote(); |
|
61 |
|
62 /** |
|
63 * Show "DRM protected files not supported." info note. |
|
64 * |
|
65 * @since Series 60 3.2 |
|
66 */ |
|
67 void ShowDrmNoteL(); |
|
68 |
|
69 /** |
|
70 * Show "Connection lost." info note. |
|
71 * |
|
72 * @since Series 60 3.2 |
|
73 */ |
|
74 void ShowConnectionLostNoteL(); |
|
75 |
|
76 /** |
|
77 * Show info note when local MS fails to start |
|
78 * |
|
79 * @since Series 60 3.2 |
|
80 */ |
|
81 void ShowLocalMSStartErrorNoteL(); |
|
82 |
|
83 /** |
|
84 * Show "N File copied." info note. |
|
85 * |
|
86 * @since Series 60 3.2 |
|
87 */ |
|
88 void ShowCopyInfoNoteL( TInt aCount, const TDesC& aServerName ); |
|
89 |
|
90 /** |
|
91 * Show "N Files moved." info note. |
|
92 * |
|
93 * @since Series 60 3.2 |
|
94 */ |
|
95 void ShowMoveInfoNoteL( TInt aCount, const TDesC& aServerName ); |
|
96 |
|
97 /** |
|
98 * Show "Copy failed." info note. |
|
99 * |
|
100 * @since Series 60 3.2 |
|
101 */ |
|
102 void ShowCopyErrorNoteL(); |
|
103 |
|
104 /** |
|
105 * Show "Move failed" info note. |
|
106 * |
|
107 * @since Series 60 3.2 |
|
108 */ |
|
109 void ShowMoveErrorNoteL(); |
|
110 |
|
111 /** |
|
112 * Show "Connection lost" info note. |
|
113 * |
|
114 * @since Series 60 3.2 |
|
115 */ |
|
116 void ShowCopyDisconnectionErrorNoteL(); |
|
117 |
|
118 /** |
|
119 * Show "Connection lost" info note. |
|
120 * |
|
121 * @since Series 60 3.2 |
|
122 */ |
|
123 void ShowMoveDisconnectionErrorNoteL(); |
|
124 |
|
125 /** |
|
126 * Show "Playback failed" info note. |
|
127 * |
|
128 * @since Series 60 3.2 |
|
129 */ |
|
130 void ShowPlaybackFailedNoteL(); |
|
131 |
|
132 /** |
|
133 * Reset iDrmNoteShown |
|
134 * |
|
135 * @since Series 60 3.2 |
|
136 */ |
|
137 void ResetDrmNoteCount(); |
|
138 |
|
139 public: // Public destructor |
|
140 |
|
141 /** |
|
142 * Destructor. |
|
143 */ |
|
144 virtual ~CUpnpNoteHandler(); |
|
145 |
|
146 private: // Businnes l |
|
147 |
|
148 /** |
|
149 * Runs general wait note. |
|
150 * |
|
151 * @since Series 60 3.2 |
|
152 * @return TInt return value |
|
153 */ |
|
154 TInt RunWaitNote( TInt aResource ); |
|
155 |
|
156 /** |
|
157 * Show error note |
|
158 * |
|
159 * @since Series 60 3.2 |
|
160 */ |
|
161 void ShowErrorNoteL( TInt aResource ); |
|
162 |
|
163 /** |
|
164 * Show info note |
|
165 * |
|
166 * @since Series 60 3.2 |
|
167 */ |
|
168 void ShowInfoNoteL( const TDesC& aText ); |
|
169 |
|
170 private: // Private construct/destruct methods |
|
171 |
|
172 /** |
|
173 * Perform the first phase of two phase construction. |
|
174 * |
|
175 * @since S60 3.2 |
|
176 */ |
|
177 CUpnpNoteHandler(); |
|
178 |
|
179 /** |
|
180 * Perform the second phase of two phase construction. Reserves the |
|
181 * Upnp Fw resources (they are released when the task is destroyed). |
|
182 */ |
|
183 void ConstructL(); |
|
184 |
|
185 private: // Data members |
|
186 |
|
187 /** |
|
188 * Currently showing wait note. Owned. |
|
189 */ |
|
190 CAknWaitDialog* iWaitNote; |
|
191 |
|
192 /** |
|
193 * The resource file offset. |
|
194 */ |
|
195 TInt iResFileOffset; |
|
196 |
|
197 /** |
|
198 * A boolean value indicating the state of the DRM note showing. |
|
199 * The note is shown only once per session. |
|
200 */ |
|
201 TBool iDrmNoteShown; |
|
202 |
|
203 }; |
|
204 |
|
205 #endif // UPNP_COMMAND_NOTE_HANDLER_TASK_H |
|
206 |
|
207 // End of File |