27
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-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: Provides audiomessage appui prototypes
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef _AUDIOMESSAGEAPPUI_H
|
|
22 |
#define _AUDIOMESSAGEAPPUI_H
|
|
23 |
|
|
24 |
// includes needed by inline functions:
|
|
25 |
#include <MsgEditorView.h> // CMsgEditorView
|
|
26 |
#include <MsgAddressControl.h> // CMsgAddressControl
|
|
27 |
#include <MsgExpandableControl.h> // CMsgExpandableControl
|
|
28 |
#include <MsgBodyControl.h> // CMsgBodyControl
|
|
29 |
#include "audiomessagedocument.h" // CAudioMessageDocument
|
|
30 |
|
|
31 |
#include <unimodelconst.h>
|
|
32 |
#include <MsgEditorAppUi.h> // CMsgEditorAppUi
|
|
33 |
#include <cenrepnotifyhandler.h> // MCenRepNotifyHandlerCallback
|
|
34 |
#include <MMGFetchVerifier.h> // MMGFetchVerifier
|
|
35 |
#include "amsoperationobserver.h" // MAmsOperationObserver
|
|
36 |
#include "amsvolobserver.h" // MAmsVolumeObserver
|
|
37 |
|
|
38 |
#include "audiomessage.hrh"
|
|
39 |
#include <AknNaviDecoratorObserver.h>
|
|
40 |
#include <eikedwob.h> // for MEikEdwinObserver
|
|
41 |
#include <AknProgressDialog.h> // for MProgressDialogCallback
|
|
42 |
#ifdef RD_SCALABLE_UI_V2
|
|
43 |
#include <akntoolbarobserver.h>
|
|
44 |
#endif
|
|
45 |
|
|
46 |
|
|
47 |
GLREF_C void Panic( TAmsEditorPanic aPanic );
|
|
48 |
|
|
49 |
class CAknTitlePane;
|
|
50 |
class CFindItemMenu;
|
|
51 |
class CMsgVoIPExtension;
|
|
52 |
class CMsgExpandableControl;
|
|
53 |
class CAudioMessageInsertOperation;
|
|
54 |
class CAudioMessageLaunchOperation;
|
|
55 |
class CAudioMessageSaveOperation;
|
|
56 |
class CAudioMessageSendOperation;
|
|
57 |
class CAudioMessageProgressDialog;
|
|
58 |
class CAknNavigationControlContainer;
|
|
59 |
class CAknNavigationDecorator;
|
|
60 |
class CAknIconArray;
|
|
61 |
class CAknIndicatorContainer;
|
|
62 |
class CMessageData;
|
|
63 |
class CSendUi;
|
|
64 |
class CAknLocalScreenClearer;
|
|
65 |
class CAknInputBlock;
|
|
66 |
class CAudioMessageSendReadReportOperation;
|
|
67 |
class CMsgMediaInfo;
|
|
68 |
class CUniAddressHandler;
|
|
69 |
#ifdef RD_SCALABLE_UI_V2
|
|
70 |
class CAknToolbar;
|
|
71 |
#endif
|
|
72 |
|
|
73 |
|
|
74 |
/**
|
|
75 |
* CAudioMessageAppUi
|
|
76 |
*
|
|
77 |
* @lib AudioMessage.exe
|
|
78 |
* @since S60 v3.1
|
|
79 |
*/
|
|
80 |
class CAudioMessageAppUi :
|
|
81 |
public CMsgEditorAppUi,
|
|
82 |
public MCenRepNotifyHandlerCallback,
|
|
83 |
public MMGFetchVerifier,
|
|
84 |
public MAmsOperationObserver,
|
|
85 |
public MAmsVolumeObserver,
|
|
86 |
public MAknNaviDecoratorObserver,
|
|
87 |
public MEikEdwinObserver,
|
|
88 |
public MProgressDialogCallback,
|
|
89 |
#ifdef RD_SCALABLE_UI_V2
|
|
90 |
public MAknToolbarObserver //toolbar
|
|
91 |
#endif
|
|
92 |
{
|
|
93 |
|
|
94 |
private: // Enumerations
|
|
95 |
|
|
96 |
enum TAmsEditorFlags
|
|
97 |
{
|
|
98 |
ELaunchSuccessful = 0x0001,
|
|
99 |
ERunAppShutterAtExit = 0x0002,
|
|
100 |
EEditorClosing = 0x0004,
|
|
101 |
EAutohighLightEnabled = 0x0008,
|
|
102 |
EProgressInUse = 0x0010,
|
|
103 |
EEditorExiting = 0x0020
|
|
104 |
};
|
|
105 |
|
|
106 |
enum TAmsNaviType
|
|
107 |
{
|
|
108 |
EAmsOnlyLength=0,
|
|
109 |
EAmsTextEditorAndLength,
|
|
110 |
EAmsMsgArrows
|
|
111 |
};
|
|
112 |
|
|
113 |
|
|
114 |
public: // Constructors and destructor
|
|
115 |
|
|
116 |
/**
|
|
117 |
* C++ default constructor.
|
|
118 |
*/
|
|
119 |
CAudioMessageAppUi();
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Destructor.
|
|
123 |
*/
|
|
124 |
virtual ~CAudioMessageAppUi();
|
|
125 |
void HandleWsEventL( const TWsEvent& aEvent,CCoeControl* aDestination );
|
|
126 |
|
|
127 |
/**
|
|
128 |
* Removes audiofile.
|
|
129 |
*/
|
|
130 |
void RemoveAudioL( );
|
|
131 |
|
|
132 |
/**
|
|
133 |
* From MAmsVolumeObserver.
|
|
134 |
*
|
|
135 |
* Audio volume changed. Called for by CAudioMessageProgressDlg
|
|
136 |
*/
|
|
137 |
void UpdateNaviVol( TInt aCurrentVolumeValue ) ;
|
|
138 |
TInt GetVolume();
|
|
139 |
/**
|
|
140 |
* From MAmsVolumeObserver.
|
|
141 |
*
|
|
142 |
* Audio routing change. Called for by CAudioMessageProgressDlg
|
|
143 |
*/
|
|
144 |
void SetSpeakerOutput( TBool aEarpiece );
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Saves, if needed and exits
|
|
148 |
*/
|
|
149 |
void ExitAndSaveL( );
|
|
150 |
|
|
151 |
/**
|
|
152 |
* Wrapper on the FetchFileL function of Base Editor.
|
|
153 |
* Called by "Insert" functions.
|
|
154 |
*/
|
|
155 |
TBool FetchFileL( TFileName &aFileName );
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Fetchs voice file handle from msgstore.
|
|
159 |
* Gets duration from CAudioMessageRecorder
|
|
160 |
* and puts it in document object.
|
|
161 |
*/
|
|
162 |
void FetchAudioFileDataL( ) ;
|
|
163 |
|
|
164 |
/**
|
|
165 |
* Callback for CPeriodic
|
|
166 |
*/
|
|
167 |
static TInt DelayedExit( TAny* aThis );
|
|
168 |
|
|
169 |
/**
|
|
170 |
* Tries to exit the application. Called for example by CIdle
|
|
171 |
*/
|
|
172 |
void DoExternalExit( );
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Callback for MProgressDialogCallback
|
|
176 |
*/
|
|
177 |
void DialogDismissedL( TInt /*dismissed*/ );
|
|
178 |
|
|
179 |
// Functions from base classes
|
|
180 |
public:
|
|
181 |
|
|
182 |
/**
|
|
183 |
* From MMsgEditorObserver. Calls DoEditorObserverL()
|
|
184 |
*
|
|
185 |
* For passing events from Base Editor to AudioMessage
|
|
186 |
*/
|
|
187 |
void EditorObserver(
|
|
188 |
TMsgEditorObserverFunc aFunc,
|
|
189 |
TAny* aArg1,
|
|
190 |
TAny* aArg2,
|
|
191 |
TAny* aArg3 );
|
|
192 |
void DoEditorObserverL(
|
|
193 |
TMsgEditorObserverFunc aFunc,
|
|
194 |
TAny* aArg1,
|
|
195 |
TAny* aArg2,
|
|
196 |
TAny* aArg3 );
|
|
197 |
|
|
198 |
/**
|
|
199 |
* From MMGFetchVerifier
|
|
200 |
*/
|
|
201 |
TBool VerifySelectionL( const MDesCArray* aSelectedFiles );
|
|
202 |
|
|
203 |
/**
|
|
204 |
* From MAknNaviDecoratorObserver
|
|
205 |
* Handles the events coming from arrow presses
|
|
206 |
* related to next/previous message
|
|
207 |
*/
|
|
208 |
void HandleNaviDecoratorEventL( TInt aEventID );
|
|
209 |
|
|
210 |
/**
|
|
211 |
* From MEikEdwinObserver
|
|
212 |
*/
|
|
213 |
void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType );
|
|
214 |
|
|
215 |
/**
|
|
216 |
* From MMessageIteratorObserver
|
|
217 |
* @param See documentation of MMessageIteratorObserver
|
|
218 |
*/
|
|
219 |
#ifndef RD_MSG_NAVIPANE_IMPROVEMENT
|
|
220 |
void HandleIteratorEventL( TMessageIteratorEvent aEvent );
|
|
221 |
#endif
|
|
222 |
|
|
223 |
private:
|
|
224 |
|
|
225 |
/**
|
|
226 |
* Notification from central repository
|
|
227 |
*/
|
|
228 |
void HandleNotifyInt( TUint32 aId, TInt aNewValue );
|
|
229 |
|
|
230 |
void DoUpdateSoftKeysL( TInt aSk );
|
|
231 |
void UpdateSoftKeysL( );
|
|
232 |
/**
|
|
233 |
* Sets automatic highlighting on/off.
|
|
234 |
* @param aEnable if ETrue sets automatic highlighting on,
|
|
235 |
* if EFalse sets automatic highlighting off
|
|
236 |
*/
|
|
237 |
void SetFindMode( TBool aEnable );
|
|
238 |
|
|
239 |
/**
|
|
240 |
* From MMsgEditorLauncher
|
|
241 |
*/
|
|
242 |
void LaunchViewL();
|
|
243 |
|
|
244 |
/**
|
|
245 |
* Route key events to view.
|
|
246 |
* @param aKeyEvent key event
|
|
247 |
* @param aType event type
|
|
248 |
* @return response
|
|
249 |
* from CCoeAppUi
|
|
250 |
*/
|
|
251 |
TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
|
|
252 |
|
|
253 |
/**
|
|
254 |
* From CEikAppUi
|
|
255 |
*/
|
|
256 |
void HandleCommandL( TInt aCommand );
|
|
257 |
|
|
258 |
/**
|
|
259 |
* Inits the main menu options
|
|
260 |
* @param aMenuId
|
|
261 |
* @parem aMenuPane
|
|
262 |
*/
|
|
263 |
void DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane );
|
|
264 |
|
|
265 |
/**
|
|
266 |
* From MAmsOperationObserver
|
|
267 |
* Calls DoEditorObserverL()
|
|
268 |
*/
|
|
269 |
void EditorOperationEvent(
|
|
270 |
TAmsOperationType aOperation,
|
|
271 |
TAmsOperationEvent aEvent );
|
|
272 |
/**
|
|
273 |
* Checks the result of the event and shows possible error note.
|
|
274 |
* Calls right function to finalize operation.
|
|
275 |
*/
|
|
276 |
void DoEditorOperationEventL(
|
|
277 |
TAmsOperationType aOperation,
|
|
278 |
TAmsOperationEvent aEvent );
|
|
279 |
|
|
280 |
/**
|
|
281 |
* Called when insert operation finishes. Removes wait note.
|
|
282 |
* Updates navipane, fetch clip duration and so on.
|
|
283 |
* Focuses the right object.
|
|
284 |
*/
|
|
285 |
void DoInsertCompleteL( TBool aErrorNone );
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Called when launch operation finishes. Removes wait note.
|
|
289 |
* Updates navipane, voice clip icon and duration of the clip.
|
|
290 |
* Focuses the right object.
|
|
291 |
*/
|
|
292 |
void DoLaunchCompleteL( TAmsOperationEvent aEvent );
|
|
293 |
/**
|
|
294 |
* Called when save operation finishes.
|
|
295 |
*/
|
|
296 |
void DoSaveCompleteL();
|
|
297 |
|
|
298 |
/**
|
|
299 |
* Called after DoSaveComplete or DialogDismissed
|
|
300 |
*/
|
|
301 |
void DoOpComplete2ndPhaseL();
|
|
302 |
|
|
303 |
/**
|
|
304 |
* Called when send operation finishes. After that application exit
|
|
305 |
*/
|
|
306 |
void DoSendCompleteL();
|
|
307 |
/**
|
|
308 |
* Called when remove operation finishes. Removes wait note, clean
|
|
309 |
* duration and change icon for clipstatus
|
|
310 |
*/
|
|
311 |
void DoRemoveCompleteL();
|
|
312 |
|
|
313 |
/**
|
|
314 |
* Reports errors that appears during insertion to appui
|
|
315 |
*/
|
|
316 |
void ShowInsertErrorsL();
|
|
317 |
|
|
318 |
private:
|
|
319 |
|
|
320 |
/**
|
|
321 |
* By default Symbian OS constructor is private.
|
|
322 |
*/
|
|
323 |
void ConstructL();
|
|
324 |
|
|
325 |
private: // New functions
|
|
326 |
|
|
327 |
/**
|
|
328 |
* Check if message has any data i.e. either in header ("To"),
|
|
329 |
* in message body or as attachments.
|
|
330 |
*
|
|
331 |
* @return ETrue, message empty,
|
|
332 |
* EFalse, message not empty
|
|
333 |
*/
|
|
334 |
TBool IsMessageEmpty() const;
|
|
335 |
|
|
336 |
/**
|
|
337 |
* Updates the address size to CAudioMessageDocument
|
|
338 |
*/
|
|
339 |
void SetAddressSize();
|
|
340 |
|
|
341 |
/**
|
|
342 |
* Updates the address size to CAudioMessageDocument
|
|
343 |
*/
|
|
344 |
void SetBodySize();
|
|
345 |
|
|
346 |
/**
|
|
347 |
* Checks message content and if ok send message
|
|
348 |
*/
|
|
349 |
void DoUserSendL();
|
|
350 |
|
|
351 |
/**
|
|
352 |
* Handles message saving after exit
|
|
353 |
*/
|
|
354 |
void DoMsgSaveExitL();
|
|
355 |
|
|
356 |
/**
|
|
357 |
* Handles delayed (external) exit
|
|
358 |
*/
|
|
359 |
void DoDelayedExitL( TInt aDelayTime );
|
|
360 |
|
|
361 |
/**
|
|
362 |
* Handles message saving after user has pressed close.
|
|
363 |
*/
|
|
364 |
void DoBackSaveL();
|
|
365 |
|
|
366 |
/**
|
|
367 |
* Does actual saving of message to DRAFT folder.
|
|
368 |
*/
|
|
369 |
void DoSaveL();
|
|
370 |
|
|
371 |
/**
|
|
372 |
* Handles user message info command.
|
|
373 |
*/
|
|
374 |
void DoUserMessageInfoL();
|
|
375 |
|
|
376 |
/**
|
|
377 |
* Handles user sending settings command.
|
|
378 |
*/
|
|
379 |
//void DoUserSendingOptionsL();
|
|
380 |
|
|
381 |
/**
|
|
382 |
* Handles audio clip play command
|
|
383 |
* @param none
|
|
384 |
*/
|
|
385 |
void PlayAudioL();
|
|
386 |
|
|
387 |
/**
|
|
388 |
* Handles Delete message commands using by
|
|
389 |
* object CAudioMessaegeInsertOperation.
|
|
390 |
* @param none
|
|
391 |
*/
|
|
392 |
void DeleteMessageL();
|
|
393 |
|
|
394 |
void DoCallToSenderL();
|
|
395 |
|
|
396 |
/**
|
|
397 |
* Creates a media info object from given file and
|
|
398 |
* performs a preliminary check whether it is ok to
|
|
399 |
* insert the given media file.
|
|
400 |
*
|
|
401 |
* The media info object is created to "iInsertingMedia"
|
|
402 |
* member variable.
|
|
403 |
*
|
|
404 |
* @param aFileName Media file to be checked
|
|
405 |
* @return ETrue if media info object was created
|
|
406 |
* EFalse otherwise
|
|
407 |
*/
|
|
408 |
TBool CreateMediaInfoForInsertL( const TDesC& aFileName );
|
|
409 |
|
|
410 |
/**
|
|
411 |
* Checks whether the media object in "iInsertingMedia"
|
|
412 |
* member variable is SuperDistributable or not. If yes
|
|
413 |
* and Full OMA DRM is supported gives "Send without
|
|
414 |
* rights query".
|
|
415 |
*
|
|
416 |
* Deletes the "iInsertingMedia" variable if query is
|
|
417 |
* not accepted.
|
|
418 |
*
|
|
419 |
* @return ETrue, if it is ok to insert the media
|
|
420 |
* EFalse, otherwise (iInsertingMedia deleted!)
|
|
421 |
*/
|
|
422 |
TBool SuperDistributionCheckForInsertL();
|
|
423 |
|
|
424 |
/**
|
|
425 |
* Draws navipane at launch time for viewer mode.
|
|
426 |
*/
|
|
427 |
void InitViewerNaviPaneL();
|
|
428 |
|
|
429 |
/**
|
|
430 |
* Draws navipane at launch time for editor mode.
|
|
431 |
*/
|
|
432 |
void InitEditorNaviPaneL();
|
|
433 |
|
|
434 |
/**
|
|
435 |
* Auxiliary function. Shows a infomation note using notewrappers.
|
|
436 |
*
|
|
437 |
* @param aResourceID
|
|
438 |
* @param aWaiting, is note waiting or not.
|
|
439 |
*/
|
|
440 |
void ShowInformationNoteL(TInt aResourceID, TBool aWaiting );
|
|
441 |
|
|
442 |
/**
|
|
443 |
* Auxiliary function. Shows an eror note using notewrappers.
|
|
444 |
*
|
|
445 |
* @param aResourceID
|
|
446 |
* @param aWaiting, is note waiting or not.
|
|
447 |
*/
|
|
448 |
void ShowErrorNoteL(TInt aResourceID, TBool aWaiting );
|
|
449 |
|
|
450 |
/**
|
|
451 |
* Auxiliary function.
|
|
452 |
* Shows a confirmation query.
|
|
453 |
*
|
|
454 |
* @param aResourceID
|
|
455 |
* @return the return value returned by CAknQueryDialog::ExecuteLD
|
|
456 |
*/
|
|
457 |
TInt ShowConfirmationQueryL( TInt aResourceID );
|
|
458 |
|
|
459 |
|
|
460 |
/**
|
|
461 |
* Shows wait note using CAknWaitDialog.
|
|
462 |
*
|
|
463 |
* @param aResourceID
|
|
464 |
*/
|
|
465 |
TBool ShowWaitNoteL( TInt aResourceId );
|
|
466 |
|
|
467 |
/**
|
|
468 |
* Remove wait note from screen.
|
|
469 |
*/
|
|
470 |
void RemoveWaitNote();
|
|
471 |
|
|
472 |
/**
|
|
473 |
* Handles text addition to model when needed, updates size
|
|
474 |
* when addreses or bodytext edited.
|
|
475 |
*/
|
|
476 |
void HandleCharInputL();
|
|
477 |
|
|
478 |
|
|
479 |
/**
|
|
480 |
* Check if message is forwarded.
|
|
481 |
*
|
|
482 |
* @return ETrue, if is forward.
|
|
483 |
*/
|
|
484 |
TBool IsForward() const;
|
|
485 |
|
|
486 |
/**
|
|
487 |
* Message size according to TS 23.140 v5.5.0
|
|
488 |
*
|
|
489 |
* @return size in bytes
|
|
490 |
*/
|
|
491 |
TInt MessageSizeInBytes();
|
|
492 |
|
|
493 |
/**
|
|
494 |
* Handles selection key press.
|
|
495 |
*/
|
|
496 |
void DoSelectionKeyL();
|
|
497 |
|
|
498 |
/**
|
|
499 |
*
|
|
500 |
*/
|
|
501 |
void FinalizeLaunchL();
|
|
502 |
|
|
503 |
/**
|
|
504 |
*
|
|
505 |
*/
|
|
506 |
TBool ShowLaunchErrorsL( TInt aError );
|
|
507 |
|
|
508 |
/**
|
|
509 |
* Sets an error resource id to be handled later
|
|
510 |
* (usually after LaunchViewL).
|
|
511 |
*
|
|
512 |
* @param aStoreId IN/OUT The correct id is stored here
|
|
513 |
* @param aNewId IN Error id
|
|
514 |
*/
|
|
515 |
void SetErrorResource( TInt& aStoreId, TInt aNewId );
|
|
516 |
|
|
517 |
|
|
518 |
/**
|
|
519 |
* Determines error "priority"
|
|
520 |
*/
|
|
521 |
TInt ErrorPriority( TInt aErrorId );
|
|
522 |
|
|
523 |
|
|
524 |
/**
|
|
525 |
* Checks if phone is in offline mode or not
|
|
526 |
*
|
|
527 |
* @return ETrue if phone is in offline mode
|
|
528 |
* Otherwise EFalse.
|
|
529 |
*/
|
|
530 |
TBool IsPhoneOfflineL() const;
|
|
531 |
|
|
532 |
/**
|
|
533 |
* Checks whether there's enough disk space
|
|
534 |
* to save the message.
|
|
535 |
*
|
|
536 |
* @return ETrue if there is enough disk space.
|
|
537 |
* Otherwise EFalse.
|
|
538 |
*/
|
|
539 |
TBool CanSaveMessageL() const;
|
|
540 |
|
|
541 |
/**
|
|
542 |
* Handles user add recipient command.
|
|
543 |
*/
|
|
544 |
void DoUserAddRecipientL();
|
|
545 |
|
|
546 |
/**
|
|
547 |
* Set sender to "from" -field in viewer.
|
|
548 |
*/
|
|
549 |
void SetSenderL();
|
|
550 |
|
|
551 |
/**
|
|
552 |
* Set sender to "subject" -field in viewer.
|
|
553 |
*/
|
|
554 |
void SetSubjectL();
|
|
555 |
|
|
556 |
/**
|
|
557 |
* Set recipient(s) to "to" -field in viewer.
|
|
558 |
*/
|
|
559 |
void InsertRecipientL();
|
|
560 |
|
|
561 |
/**
|
|
562 |
* Implements reply commands.
|
|
563 |
* Launches AMS/SMS/MMS Editor by utilising SendUI.
|
|
564 |
* @param aCase EReplyViaAMS, EReplyViaSMS or EReplyViaMMS
|
|
565 |
*/
|
|
566 |
void DoReplyViaL( TInt aCase );
|
|
567 |
|
|
568 |
void DoDoReplyViaMessageL( );
|
|
569 |
|
|
570 |
|
|
571 |
/**
|
|
572 |
* Implements forward command.
|
|
573 |
* Launches MMS Editor for replying/forwarding.
|
|
574 |
*/
|
|
575 |
void DoForwardL();
|
|
576 |
|
|
577 |
/**
|
|
578 |
* Launches help application
|
|
579 |
*/
|
|
580 |
void LaunchHelpL();
|
|
581 |
|
|
582 |
/**
|
|
583 |
* Gets help context
|
|
584 |
*/
|
|
585 |
CArrayFix<TCoeHelpContext>* HelpContextL() const;
|
|
586 |
|
|
587 |
/**
|
|
588 |
* Converts number-strings to/from arabic-indic <-> western
|
|
589 |
* NOTE : Leaves string to CleanupStack
|
|
590 |
* @param aOrigNumber contains the number to be converted
|
|
591 |
* @param aDirection EFalse -> western, ETrue -> arabic-indic if needed
|
|
592 |
* @return HBufC* buffer contains converted string
|
|
593 |
*/
|
|
594 |
HBufC* NumberConversionLC( const TDesC& aOrigNumber, TBool aDirection );
|
|
595 |
|
|
596 |
/**
|
|
597 |
* Calls mms mtm ui to launch delivery status dialog after user has choosed
|
|
598 |
* EMmsViewerDeliveryStatus from the options menu.
|
|
599 |
*/
|
|
600 |
void OpenDeliveryPopupL( );
|
|
601 |
|
|
602 |
/**
|
|
603 |
* Implements the move command.
|
|
604 |
* Shows a folder selection dialog
|
|
605 |
* (CMsgFolderSelectionDialog), moves the message
|
|
606 |
* entry into selected folder and exits the viewer.
|
|
607 |
*/
|
|
608 |
void DoMoveMessageL();
|
|
609 |
|
|
610 |
/**
|
|
611 |
* Returns the control id of the currently focused control.
|
|
612 |
* @return Control id of the focused control or
|
|
613 |
* EMsgComponentIdNull if no control focused
|
|
614 |
*/
|
|
615 |
TInt FocusedControlId();
|
|
616 |
|
|
617 |
/**
|
|
618 |
* Active scheduler start for saving
|
|
619 |
*/
|
|
620 |
void BeginActiveWait();
|
|
621 |
|
|
622 |
/**
|
|
623 |
* Active scheduler stop for saving
|
|
624 |
*/
|
|
625 |
void EndActiveWait();
|
|
626 |
|
|
627 |
/**
|
|
628 |
* Creates tabgroup, puts inbox arrows and possible
|
|
629 |
* priority flags
|
|
630 |
* @param aText string in the navipane
|
|
631 |
*
|
|
632 |
*/
|
|
633 |
#ifndef RD_MSG_NAVIPANE_IMPROVEMENT
|
|
634 |
void CreateTabGroupL( const TDesC& aText );
|
|
635 |
#endif //!RD_MSG_NAVIPANE_IMPROVEMENT
|
|
636 |
/**
|
|
637 |
* Checks silent mode.
|
|
638 |
* @return ETrue if handset is silent.
|
|
639 |
*/
|
|
640 |
TBool IsSilentModeL();
|
|
641 |
|
|
642 |
/**
|
|
643 |
* Updates navipane content.
|
|
644 |
*/
|
|
645 |
void UpdateViewerNaviFieldL( );
|
|
646 |
|
|
647 |
/**
|
|
648 |
* Updates navipane content.
|
|
649 |
* @param EAmsOnlyLength=0,EAmsTextEditorAndLength,
|
|
650 |
* EAmsMsgArrows
|
|
651 |
*/
|
|
652 |
void UpdateEditorNaviFieldL( TAmsNaviType aNaviType);
|
|
653 |
|
|
654 |
|
|
655 |
/**
|
|
656 |
* Makes to- field check
|
|
657 |
* @param aModified
|
|
658 |
* @return ETrue if to-fiels is valid, EFalse otherwise
|
|
659 |
*/
|
|
660 |
TBool CheckNamesL( TBool& aModified );
|
|
661 |
|
|
662 |
/**
|
|
663 |
* Shows address info (error) note
|
|
664 |
*
|
|
665 |
* @param aAddress
|
|
666 |
* @param aAlias
|
|
667 |
*/
|
|
668 |
void ShowAddressInfoNoteL( const TDesC& aAddress, const TDesC& aAlias );
|
|
669 |
|
|
670 |
/**
|
|
671 |
* Handles resource change events.
|
|
672 |
*/
|
|
673 |
void HandleResourceChangeL(TInt aType);
|
|
674 |
|
|
675 |
void SetTitleIconL();
|
|
676 |
void SetTitleIconSize();
|
|
677 |
protected:
|
|
678 |
/**
|
|
679 |
* Deletes current entry and then exits.
|
|
680 |
*/
|
|
681 |
void DeleteAndExitL();
|
|
682 |
|
|
683 |
/**
|
|
684 |
* Deletes current entry.
|
|
685 |
*/
|
|
686 |
void DeleteCurrentEntryL();
|
|
687 |
|
|
688 |
/**
|
|
689 |
* Verifies addresses in address control.
|
|
690 |
*
|
|
691 |
* @return ETrue, if verify successful,
|
|
692 |
* EFalse otherwise
|
|
693 |
*/
|
|
694 |
TBool VerifyAddressesL( TBool& aModified );
|
|
695 |
|
|
696 |
private:
|
|
697 |
|
|
698 |
/**
|
|
699 |
* real command handling
|
|
700 |
*/
|
|
701 |
void DoHandleCommandL(TInt aCommand);
|
|
702 |
|
|
703 |
/**
|
|
704 |
* Handles user insert audio command. Creates atta and draws audio
|
|
705 |
* (indicator) to display.
|
|
706 |
*
|
|
707 |
* @param aStatus, EAudioInsert =0,EAudioInserted
|
|
708 |
*/
|
|
709 |
void SetAudioClipIconL( TAmsRecordIconStatus aStatus );
|
|
710 |
|
|
711 |
/**
|
|
712 |
* Saves messages audioclip to user selected folder
|
|
713 |
*/
|
|
714 |
void SaveAudioClipL();
|
|
715 |
|
|
716 |
/**
|
|
717 |
* Call FetchFileL with right parameter
|
|
718 |
* @param aNew, ETrue for recording a new audio clip,
|
|
719 |
* EFalse for fetching an existing one.
|
|
720 |
*/
|
|
721 |
void InsertAudioL( TBool aNew );
|
|
722 |
void DoInsertAudioL( TFileName &aCmdFileName );
|
|
723 |
|
|
724 |
/**
|
|
725 |
* Accessor
|
|
726 |
* Returns To field control
|
|
727 |
* @return Pointer to To control or
|
|
728 |
* NULL if To control does not exist
|
|
729 |
*/
|
|
730 |
CMsgAddressControl* ToCtrl() const;
|
|
731 |
|
|
732 |
/**
|
|
733 |
* Get pointer to From ctrl instance
|
|
734 |
*
|
|
735 |
* @return Pointer to from control or
|
|
736 |
* NULL if from control does not exist
|
|
737 |
*/
|
|
738 |
CMsgAddressControl* FromCtrl() const;
|
|
739 |
|
|
740 |
void SetNaviPaneL();
|
|
741 |
|
|
742 |
void DoEditAmsPriorityL( );
|
|
743 |
|
|
744 |
CAknIconArray* RadioButtonArrayL( );
|
|
745 |
|
|
746 |
void UpdateIndicatorIcons( TMmsMessagePriority aPriority );
|
|
747 |
|
|
748 |
TBool UnsupportedCallTypeOngoingL( /*TBool aShowNote*/ );
|
|
749 |
/**
|
|
750 |
* This method is called if video or VOIP call is ongoing and
|
|
751 |
* information note needs to be shown
|
|
752 |
* @param aResourceId
|
|
753 |
*/
|
|
754 |
static void ShowUnsupportedCallTypeNoteL( TInt aResourceId );
|
|
755 |
TBool CheckIncomingCall( );
|
|
756 |
|
|
757 |
TBool DoEnterKeyL();
|
|
758 |
// Inline functions:
|
|
759 |
|
|
760 |
/**
|
|
761 |
* Get pointer to Subject ctrl instance
|
|
762 |
*
|
|
763 |
* @return Pointer to subject control or
|
|
764 |
* NULL if subject control does not exist
|
|
765 |
*/
|
|
766 |
inline CMsgExpandableControl* SubjectCtrl() const;
|
|
767 |
|
|
768 |
/**
|
|
769 |
* Get pointer to body control
|
|
770 |
*
|
|
771 |
* @return Pointer to body control or
|
|
772 |
* NULL if body control does not exist
|
|
773 |
*/
|
|
774 |
inline CMsgBodyControl* BodyCtrl() const;
|
|
775 |
|
|
776 |
/**
|
|
777 |
* Get pointer to document instance
|
|
778 |
*
|
|
779 |
* @return Pointer to AudioMessageDocument
|
|
780 |
*/
|
|
781 |
inline CAudioMessageDocument* Document() const;
|
|
782 |
|
|
783 |
/**
|
|
784 |
* Check if message header is empty
|
|
785 |
*
|
|
786 |
* @return ETrue, to field is empty,
|
|
787 |
* EFalse, to field has text
|
|
788 |
*/
|
|
789 |
inline TBool IsHeaderEmpty() const;
|
|
790 |
|
|
791 |
/**
|
|
792 |
* Check if message body is empty
|
|
793 |
*
|
|
794 |
* @return ETrue, message body empty,
|
|
795 |
* EFalse, message body not empty
|
|
796 |
*/
|
|
797 |
inline TBool IsBodyEmpty() const;
|
|
798 |
|
|
799 |
/**
|
|
800 |
* Get reference to file session
|
|
801 |
*
|
|
802 |
* @return Reference to file session
|
|
803 |
*/
|
|
804 |
inline RFs& FsSession() const;
|
|
805 |
|
|
806 |
/**
|
|
807 |
* Get senders type
|
|
808 |
*
|
|
809 |
* @return ESenderTypePhoneNumber, ESenderTypeMailAddress,
|
|
810 |
* ESenderTypeNone
|
|
811 |
*/
|
|
812 |
inline TAmsSenderType SenderType();
|
|
813 |
|
|
814 |
/**
|
|
815 |
* Sends read report, if message if new and launch was complete.
|
|
816 |
*/
|
|
817 |
void SendReadReportL( TAmsOperationEvent aEvent );
|
|
818 |
|
|
819 |
/*
|
|
820 |
* Handles zoom change
|
|
821 |
*/
|
|
822 |
void DoHandleLocalZoomChangeL( TInt aCommand );
|
|
823 |
|
|
824 |
#ifdef RD_SCALABLE_UI_V2
|
|
825 |
/**
|
|
826 |
* From MAknToolbarObserver
|
|
827 |
* Should be used to set the properties of some toolbar components
|
|
828 |
* before it is drawn.
|
|
829 |
* @param aResourceId The resource ID for particular toolbar
|
|
830 |
* @param aToolbar The toolbar object pointer
|
|
831 |
*/
|
|
832 |
virtual void DynInitToolbarL( TInt aResourceId,
|
|
833 |
CAknToolbar* aToolbar );
|
|
834 |
|
|
835 |
/**
|
|
836 |
* From MAknToolbarObserver
|
|
837 |
* Handles toolbar events for a certain toolbar item.
|
|
838 |
* @param aCommand The command ID of some toolbar item.
|
|
839 |
*/
|
|
840 |
virtual void OfferToolbarEventL( TInt aCommand );
|
|
841 |
#endif
|
|
842 |
|
|
843 |
#ifdef RD_SCALABLE_UI_V2
|
|
844 |
/**
|
|
845 |
* Sets tool bar item visibilities
|
|
846 |
* @return TBool
|
|
847 |
*/
|
|
848 |
void SetViewerToolBarItemVisibilities();
|
|
849 |
|
|
850 |
/**
|
|
851 |
* Sets tool bar item visibilities
|
|
852 |
* @return TBool
|
|
853 |
*/
|
|
854 |
void SetEditorToolBarItemVisibilities();
|
|
855 |
|
|
856 |
/**
|
|
857 |
* Returns ETrue if the message is self composed and
|
|
858 |
* EFalse otherwise (a received message).
|
|
859 |
* @return ETrue if message is self composed,
|
|
860 |
* EFalse otherwise (received)
|
|
861 |
*/
|
|
862 |
TBool IsOwnMessage( ) const;
|
|
863 |
|
|
864 |
TBool HasSender( ) const;
|
|
865 |
|
|
866 |
void SetFixedToolbarL( const TInt aResId );
|
|
867 |
|
|
868 |
#endif
|
|
869 |
|
|
870 |
/**
|
|
871 |
* Check if find item highlight needs to be enabled on key event.
|
|
872 |
*
|
|
873 |
* @param aKeyEvent key event
|
|
874 |
* @param aType event type
|
|
875 |
* @return ETrue if highlight was enabled,
|
|
876 |
* EFalse otherwise
|
|
877 |
*/
|
|
878 |
TBool CheckFindItemHighlightL( const TKeyEvent& aKeyEvent,
|
|
879 |
TEventCode aType );
|
|
880 |
|
|
881 |
private: // Data
|
|
882 |
/**
|
|
883 |
* For absorbing keypresses
|
|
884 |
* Own.
|
|
885 |
*/
|
|
886 |
CAknInputBlock* iAbsorber;
|
|
887 |
|
|
888 |
/**
|
|
889 |
* For delayed exit
|
|
890 |
* Own.
|
|
891 |
*/
|
|
892 |
CPeriodic* iIdle;
|
|
893 |
CMmsClientMtm* iMtm;
|
|
894 |
CAknWaitDialog* iWaitDialog;
|
|
895 |
TInt iWaitResId;
|
|
896 |
/**
|
|
897 |
* Titlepane
|
|
898 |
* Own.
|
|
899 |
*/
|
|
900 |
CAknTitlePane* iTitlePane;
|
|
901 |
CRepository* iSettingsRepository;
|
|
902 |
CRepository* iAudioMesseageRepository;
|
|
903 |
TUint32 iEditorFlags;
|
|
904 |
TInt iSupportedFeatures;
|
|
905 |
|
|
906 |
/**
|
|
907 |
* For inserting voice
|
|
908 |
* Own.
|
|
909 |
*/
|
|
910 |
CAudioMessageInsertOperation* iInsertOperation;
|
|
911 |
|
|
912 |
/**
|
|
913 |
* For launching
|
|
914 |
* Own.
|
|
915 |
*/
|
|
916 |
CAudioMessageLaunchOperation* iLaunchOperation;
|
|
917 |
|
|
918 |
/**
|
|
919 |
* For saving message
|
|
920 |
* Own.
|
|
921 |
*/
|
|
922 |
CAudioMessageSaveOperation* iSaveOperation;
|
|
923 |
|
|
924 |
/**
|
|
925 |
* For sending message
|
|
926 |
* Own.
|
|
927 |
*/
|
|
928 |
CAudioMessageSendOperation* iSendOperation;
|
|
929 |
|
|
930 |
CMsgMediaInfo* iInsertingMedia;
|
|
931 |
|
|
932 |
CFindItemMenu* iFindItemMenu;
|
|
933 |
|
|
934 |
CActiveSchedulerWait iWait;
|
|
935 |
CAudioMessageProgressDialog* iProgressDlg;
|
|
936 |
|
|
937 |
CUniAddressHandler* iAddressHandler;
|
|
938 |
CAknLocalScreenClearer* iScreenClearer;
|
|
939 |
|
|
940 |
TAmsSenderType iSenderType;
|
|
941 |
HBufC* iAlias;
|
|
942 |
CAknNavigationControlContainer* iNaviPane;
|
|
943 |
TInt iNaviFlags;
|
|
944 |
|
|
945 |
CAknIndicatorContainer* iNavi_length;
|
|
946 |
#ifndef RD_MSG_NAVIPANE_IMPROVEMENT
|
|
947 |
CAknNavigationDecorator* iNavi_next_prev_msg_arrows;
|
|
948 |
#endif
|
|
949 |
CAknNavigationDecorator* iIhfVolumeControl;
|
|
950 |
CAknNavigationDecorator* iHeadsetVolumeControl;
|
|
951 |
CAknNavigationDecorator* iActiveVolumeControl;
|
|
952 |
TInt iCurrentVolume;
|
|
953 |
CCenRepNotifyHandler* iNotifyHandler;
|
|
954 |
CRepository* iCUiRepository;
|
|
955 |
TInt iMyWgId; // Window group id for AudioMessage
|
|
956 |
TInt iFSWindowGroupId;// Window group id for FastSwapWindow
|
|
957 |
TInt iAknNfySrvUi;
|
|
958 |
TInt iSysWgId;
|
|
959 |
TInt32 iVoiceKeyHandle; // Voice key capture handle, must be released
|
|
960 |
TBool iSpeakerEarpiece;
|
|
961 |
TBool iInserting;
|
|
962 |
CMsgVoIPExtension* iMsgVoIPExtension;
|
|
963 |
HBufC* iTimeDuratBase;
|
|
964 |
HBufC* iClipFileName;
|
|
965 |
/// Sends read report
|
|
966 |
CAudioMessageSendReadReportOperation* iSendReadReportOperation;
|
|
967 |
TInt iCurrentSkResId;
|
|
968 |
|
|
969 |
CGulIcon* iAppIcon;
|
|
970 |
|
|
971 |
#ifdef RD_SCALABLE_UI_V2
|
|
972 |
CAknToolbar* iToolbar;
|
|
973 |
#endif
|
|
974 |
};
|
|
975 |
|
|
976 |
#include "audiomessageappui.inl"
|
|
977 |
|
|
978 |
#endif // _AUDIOMESSAGEAPPUI_H
|
|
979 |
|