60 #include <AknPhoneNumberGrouping.h> |
61 #include <AknPhoneNumberGrouping.h> |
61 #include <AknPhoneNumberTextUtils.h> |
62 #include <AknPhoneNumberTextUtils.h> |
62 #include <AknPhoneNumberEditor.h> |
63 #include <AknPhoneNumberEditor.h> |
63 #include <aknnoteattributes.h> |
64 #include <aknnoteattributes.h> |
64 #include <eikdialg.h> |
65 #include <eikdialg.h> |
|
66 #include <eikmenup.h> |
65 |
67 |
66 #include <bctestdomnotifier.rsg> |
68 #include <bctestdomnotifier.rsg> |
67 #include "PslnModel.h" |
|
68 #include "bctestdomnotifiercase.h" |
69 #include "bctestdomnotifiercase.h" |
69 #include "bctestdomnotifiercontainer.h" |
70 #include "bctestdomnotifiercontainer.h" |
70 #include "bctestdomnotifier.hrh" |
71 #include "bctestdomnotifier.hrh" |
71 #include "bctestdomnotifierview.h" |
72 #include "bctestdomnotifierview.h" |
72 #include "bctestdomnotifierapp.h" |
73 #include "bctestdomnotifierapp.h" |
|
74 |
|
75 _LIT( KCAknNotifierAppServerAppUi, "App server error" ); |
73 |
76 |
74 // ======== MEMBER FUNCTIONS ======== |
77 // ======== MEMBER FUNCTIONS ======== |
75 // --------------------------------------------------------------------------- |
78 // --------------------------------------------------------------------------- |
76 // Symbian 2nd static Constructor |
79 // Symbian 2nd static Constructor |
77 // --------------------------------------------------------------------------- |
80 // --------------------------------------------------------------------------- |
120 // |
123 // |
121 void CBCDomainTestNotifierCase::BuildScriptL() |
124 void CBCDomainTestNotifierCase::BuildScriptL() |
122 { |
125 { |
123 // Add script as your need. |
126 // Add script as your need. |
124 AddTestL( DELAY(1), LeftCBA, KeyOK, LeftCBA, Down, KeyOK, LeftCBA, Down, |
127 AddTestL( DELAY(1), LeftCBA, KeyOK, LeftCBA, Down, KeyOK, LeftCBA, Down, |
125 Down, KeyOK, RightCBA, LeftCBA, Down, Down, Down, KeyOK, RightCBA, |
128 Down, KeyOK, DELAY(3), RightCBA, LeftCBA, Down, Down, Down, KeyOK, DELAY(3), RightCBA, |
126 TEND ); |
129 TEND ); |
127 } |
130 } |
128 |
131 |
129 // --------------------------------------------------------------------------- |
132 // --------------------------------------------------------------------------- |
130 // CBCDomainTestNotifierCase::RunL |
133 // CBCDomainTestNotifierCase::RunL |
203 RFile rfile; |
208 RFile rfile; |
204 _LIT( KFilePath, "c:\\BCTestLog\\test.txt" ); |
209 _LIT( KFilePath, "c:\\BCTestLog\\test.txt" ); |
205 rfile.Create( fs, KFilePath, EFileWrite | EFileShareAny ); |
210 rfile.Create( fs, KFilePath, EFileWrite | EFileShareAny ); |
206 CleanupClosePushL( rfile ); |
211 CleanupClosePushL( rfile ); |
207 |
212 |
208 CAiwGenericParamList* aiwparalist = CAiwGenericParamList::NewL(); |
213 // CAiwGenericParamList* aiwparalist = CAiwGenericParamList::NewL(); |
209 CPslnModel* psmodel= CPslnModel::NewL(); |
214 // CPslnModel* psmodel= CPslnModel::NewL(); |
210 MAknServerAppExitObserver* serappexit = |
215 // MAknServerAppExitObserver* serappexit = |
211 static_cast<MAknServerAppExitObserver*> ( psmodel ); |
216 // static_cast<MAknServerAppExitObserver*> ( psmodel ); |
212 |
217 // |
213 CAknOpenFileService* fileserv = NULL; |
218 // CAknOpenFileService* fileserv = NULL; |
214 TRAPD( err, fileserv = CAknOpenFileService::NewL( |
219 // TRAPD( err, fileserv = CAknOpenFileService::NewL( |
215 KFilePath, serappexit, aiwparalist ) ); |
220 // KFilePath, serappexit, aiwparalist ) ); |
216 _LIT( KCAknOpenFileServiceNewL, "CAknOpenFileService::NewL()" ); |
221 // _LIT( KCAknOpenFileServiceNewL, "CAknOpenFileService::NewL()" ); |
217 AssertTrueL( ETrue, KCAknOpenFileServiceNewL ); |
222 // AssertTrueL( ETrue, KCAknOpenFileServiceNewL ); |
218 |
223 // delete fileserv; |
219 |
224 // fileserv = NULL; |
220 TUid KUid = { 0xA0004001 }; |
225 // |
221 TInt err1; |
226 // TUid KUid = { 0xA0004001 }; |
222 TRAP( err1, fileserv = CAknOpenFileService::NewL( |
227 // TInt err1; |
223 KUid, rfile, serappexit, aiwparalist ) ); |
228 // TRAP( err1, fileserv = CAknOpenFileService::NewL( |
224 _LIT( KCAknOpenFileServiceNewLOver, "CAknOpenFileService::NewL()" ); |
229 // KUid, rfile, serappexit, aiwparalist ) ); |
225 AssertTrueL( ETrue, KCAknOpenFileServiceNewLOver ); |
230 // _LIT( KCAknOpenFileServiceNewLOver, "CAknOpenFileService::NewL()" ); |
226 CleanupStack::PopAndDestroy(); |
231 // AssertTrueL( ETrue, KCAknOpenFileServiceNewLOver ); |
227 delete fileserv; |
232 // |
228 delete psmodel; |
233 // CleanupStack::PopAndDestroy(); // rfile |
229 delete aiwparalist; |
234 // delete fileserv; |
230 |
235 // delete psmodel; |
231 |
236 // delete aiwparalist; |
232 _LIT( KCAknNotifierAppServerAppUi,"CAknNotifierAppServerAppUi" ); |
237 // _LIT( KCAknNotifierAppServerAppUi,"CAknNotifierAppServerAppUi" ); |
233 |
|
234 // AknNotiferAppServerApplication.h |
238 // AknNotiferAppServerApplication.h |
235 |
239 |
236 CBCNotifierAppServer *notifierapp = new ( ELeave ) |
240 CBCNotifierAppServer *notifierapp = new ( ELeave ) |
237 CBCNotifierAppServer(); |
241 CBCNotifierAppServer(); |
238 CleanupStack::PushL( notifierapp ); |
242 CleanupStack::PushL( notifierapp ); |
284 AssertTrueL( ETrue, KSetManager ); |
288 AssertTrueL( ETrue, KSetManager ); |
285 |
289 |
286 notifier->EikSrvBlocked(); |
290 notifier->EikSrvBlocked(); |
287 AssertTrueL( ETrue, KEikSrvBlocked ); |
291 AssertTrueL( ETrue, KEikSrvBlocked ); |
288 |
292 |
289 |
293 //notifier->SuppressAppSwitching( ETrue ); |
290 /* |
294 //_LIT( KSuppressAppSwitching, "SuppressAppSwitching" ); |
291 notifier = new ( ELeave ) CAknNotifierAppServerAppUi(); |
295 //AssertTrueL( ETrue, KSuppressAppSwitching ); |
292 CleanupStack::PushL( notifier ); |
|
293 notifier->SuppressAppSwitching( EFalse ); |
|
294 CleanupStack::Pop(); */ |
|
295 |
|
296 |
296 |
297 // AknNotiferAppServer.h |
297 // AknNotiferAppServer.h |
298 _LIT( KNotiServer, "CAknNotifierAppServer"); |
298 _LIT( KNotiServer, "CAknNotifierAppServer"); |
299 _LIT( KStartNotifierL, "StartNotifierL"); |
299 _LIT( KStartNotifierL, "StartNotifierL"); |
300 _LIT( KUpdateNotifierL, "UpdateNotifierL"); |
300 _LIT( KUpdateNotifierL, "UpdateNotifierL"); |
302 _LIT( KStartNotifierAndGetResponseL, "StartNotifierAndGetResponseL"); |
302 _LIT( KStartNotifierAndGetResponseL, "StartNotifierAndGetResponseL"); |
303 _LIT( KAppendNotifierLibNameL, "AppendNotifierLibNameL"); |
303 _LIT( KAppendNotifierLibNameL, "AppendNotifierLibNameL"); |
304 _LIT( KSetImplementationFinderL, "SetImplementationFinderL"); |
304 _LIT( KSetImplementationFinderL, "SetImplementationFinderL"); |
305 _LIT( KUnbalanceReferenceCountForNotif, "UnbalanceReferenceCountForNotif"); |
305 _LIT( KUnbalanceReferenceCountForNotif, "UnbalanceReferenceCountForNotif"); |
306 _LIT( KCreateServiceL, "CreateServiceL"); |
306 _LIT( KCreateServiceL, "CreateServiceL"); |
307 _LIT( KLoadNotifiersL, "LoadNotifiersL"); |
|
308 _LIT( KCAknNotifierAppServerDestroy, "SCAknNotifierAppServerDestroy" ); |
307 _LIT( KCAknNotifierAppServerDestroy, "SCAknNotifierAppServerDestroy" ); |
309 _LIT( KUpdateNotifierAndGetResponseL, "UpdateNotifierAndGetResponseL" ); |
308 _LIT( KUpdateNotifierAndGetResponseL, "UpdateNotifierAndGetResponseL" ); |
310 |
309 //////////////////////////////////////////////////////////////////////////////////////////////// |
311 CAknNotifierAppServer *notiserver = new ( ELeave ) CAknNotifierAppServer(); |
310 CAknNotifierAppServer *notiserver = new ( ELeave ) CAknNotifierAppServer(); |
312 CleanupStack::PushL( notiserver ); |
311 CleanupStack::PushL( notiserver ); |
313 AssertNotNullL( notiserver, KNotiServer ); |
312 AssertNotNullL( notiserver, KNotiServer ); |
|
313 |
|
314 _LIT(KLabName, "ictsuiutilsnotif.dll"); |
|
315 //_LIT(KLabName, "aknoldstylenotif.dll"); |
|
316 notiserver->AppendNotifierLibNameL( KLabName ); |
|
317 AssertTrueL( ETrue,KAppendNotifierLibNameL ); |
|
318 |
|
319 //TRAP( err, notiserver->LoadNotifiersL() ); |
|
320 //AssertTrueL( ETrue,KLoadNotifiersL ); |
314 |
321 |
315 TBuf8<32> bf; |
322 TBuf8<32> bf; |
|
323 TInt err; |
316 TRAP( err,notiserver->StartNotifierL( |
324 TRAP( err,notiserver->StartNotifierL( |
317 KUidBCDomainTestNotifier, bf, bf ) ); |
325 KUidBCDomainTestNotifier, bf, bf ) ); |
318 AssertTrueL( ETrue,KStartNotifierL ); |
326 AssertTrueL( ETrue,KStartNotifierL ); |
319 |
327 |
320 TRAP( err, notiserver->UpdateNotifierL( |
328 TRAP( err, notiserver->UpdateNotifierL( |
328 TInt replyslot = 1; |
336 TInt replyslot = 1; |
329 TRAP( err, notiserver->StartNotifierAndGetResponseL( |
337 TRAP( err, notiserver->StartNotifierAndGetResponseL( |
330 KUidBCDomainTestNotifier, bf, msg, replyslot ) ); |
338 KUidBCDomainTestNotifier, bf, msg, replyslot ) ); |
331 AssertTrueL( ETrue, KStartNotifierAndGetResponseL ); |
339 AssertTrueL( ETrue, KStartNotifierAndGetResponseL ); |
332 |
340 |
333 TBuf<32> libaryname; |
|
334 notiserver->AppendNotifierLibNameL( libaryname ); |
|
335 AssertTrueL( ETrue,KAppendNotifierLibNameL ); |
|
336 |
341 |
337 MNotifLibraryOwningServer* pFinder = NULL; |
342 MNotifLibraryOwningServer* pFinder = NULL; |
338 notiserver->SetImplementationFinderL( pFinder ); |
343 notiserver->SetImplementationFinderL( pFinder ); |
339 AssertTrueL( ETrue, KSetImplementationFinderL ); |
344 AssertTrueL( ETrue, KSetImplementationFinderL ); |
340 |
345 |
341 notiserver->UnbalanceReferenceCountForNotif( |
346 notiserver->UnbalanceReferenceCountForNotif( |
342 KUidBCDomainTestNotifier, EFalse ); |
347 KUidBCDomainTestNotifier, EFalse ); |
343 AssertTrueL( ETrue,KUnbalanceReferenceCountForNotif ); |
348 AssertTrueL( ETrue,KUnbalanceReferenceCountForNotif ); |
344 |
349 |
345 //notifier->UpdateNotifierAndGetResponseL( ## Since 3.2 |
|
346 // KUidBCDomainTestNotifier, bf, msg, replyslot ); |
|
347 |
|
348 TRAP( err, notiserver->CreateServiceL( KUidBCDomainTestNotifier ) ); |
350 TRAP( err, notiserver->CreateServiceL( KUidBCDomainTestNotifier ) ); |
349 AssertTrueL( ETrue, KCreateServiceL ); |
351 AssertTrueL( ETrue, KCreateServiceL ); |
350 |
352 |
351 TRAP( err, notiserver->LoadNotifiersL() ); |
353 |
352 AssertTrueL( ETrue,KLoadNotifiersL ); |
|
353 |
354 |
354 TRAP( err, notiserver->UpdateNotifierAndGetResponseL( |
355 TRAP( err, notiserver->UpdateNotifierAndGetResponseL( |
355 KUidBCDomainTestNotifier, bf, msg, replyslot ) ); |
356 KUidBCDomainTestNotifier, bf, msg, replyslot ) ); |
356 AssertTrueL( ETrue, KUpdateNotifierAndGetResponseL ); |
357 AssertTrueL( ETrue, KUpdateNotifierAndGetResponseL ); |
|
358 |
357 CleanupStack::PopAndDestroy( notiserver ); |
359 CleanupStack::PopAndDestroy( notiserver ); |
358 AssertTrueL( ETrue,KCAknNotifierAppServerDestroy ); |
360 AssertTrueL( ETrue,KCAknNotifierAppServerDestroy ); |
359 |
361 //////////////////////////////////////////////////////////////////////////////////// |
360 // AknNotifierAppServerSession.h |
362 // AknNotifierAppServerSession.h |
361 // aknnotifiercontrollerutilities.h |
363 // aknnotifiercontrollerutilities.h |
362 |
364 |
363 CAknNotifierControllerUtility* ntf = |
365 CAknNotifierControllerUtility* ntf = |
364 new ( ELeave )CAknNotifierControllerUtility(0); |
366 new ( ELeave )CAknNotifierControllerUtility(0); |
612 _LIT( KCAknNotifierWrapper, "CAknNotifierWrapper::StartNotifierL(4)" ); |
611 _LIT( KCAknNotifierWrapper, "CAknNotifierWrapper::StartNotifierL(4)" ); |
613 AssertTrueL( ETrue, KCAknNotifierWrapper ); |
612 AssertTrueL( ETrue, KCAknNotifierWrapper ); |
614 _LIT( KCAknNotifierWrapper2, "CAknNotifierWrapper::StartNotifierL(2)" ); |
613 _LIT( KCAknNotifierWrapper2, "CAknNotifierWrapper::StartNotifierL(2)" ); |
615 AssertTrueL( ETrue, KCAknNotifierWrapper2 ); |
614 AssertTrueL( ETrue, KCAknNotifierWrapper2 ); |
616 |
615 |
617 |
|
618 |
|
619 // AknSignalNotify.h |
616 // AknSignalNotify.h |
620 //NewL & constructor are Privat |
|
621 } |
617 } |
622 |
618 |
623 // --------------------------------------------------------------------------- |
619 // --------------------------------------------------------------------------- |
624 // CBCDomainTestNotifierCase::TestOtherL |
620 // CBCDomainTestNotifierCase::TestOtherL |
625 // --------------------------------------------------------------------------- |
621 // --------------------------------------------------------------------------- |
626 // |
622 // |
627 void CBCDomainTestNotifierCase::TestOtherL() |
623 void CBCDomainTestNotifierCase::TestOtherL() |
628 { |
624 { |
|
625 |
629 // AknMarqueeControl.h |
626 // AknMarqueeControl.h |
630 |
627 |
631 _LIT( KCAknMarqueeControl, "CAknMarqueeControl" ); |
628 _LIT( KCAknMarqueeControl, "CAknMarqueeControl" ); |
632 _LIT( KStart, "Start" ); |
629 _LIT( KStart, "Start" ); |
633 _LIT( KReset, "Reset" ); |
630 _LIT( KReset, "Reset" ); |
634 _LIT( KStop, "Stop" ); |
631 _LIT( KStop, "Stop" ); |
635 _LIT( KIsMarqueeOn, "IsMarqueeOn" ); |
632 _LIT( KIsMarqueeOn, "IsMarqueeOn" ); |
636 _LIT( KDrawText,"DrawText" ); |
|
637 _LIT( KUseLogicalToVisualConversion, "UseLogicalToVisualConversion" ); |
633 _LIT( KUseLogicalToVisualConversion, "UseLogicalToVisualConversion" ); |
638 _LIT( KSetSpeedInPixels, "SetSpeedInPixels" ); |
634 _LIT( KSetSpeedInPixels, "SetSpeedInPixels" ); |
639 _LIT( KSetDelay, "SetDelay" ); |
635 _LIT( KSetDelay, "SetDelay" ); |
640 _LIT( KSetInterval, "SetInterval" ); |
636 _LIT( KSetInterval, "SetInterval" ); |
641 _LIT( KSetLoops, "SetLoops" ); |
637 _LIT( KSetLoops, "SetLoops" ); |
675 |
671 |
676 marcontrol->SetContainerWindowL( *iContainer ); |
672 marcontrol->SetContainerWindowL( *iContainer ); |
677 CWindowGc& gc = marcontrol->SystemGc(); |
673 CWindowGc& gc = marcontrol->SystemGc(); |
678 |
674 |
679 marcontrol->DrawText( gc, rect, txt, baselineoffset, align, *font ); |
675 marcontrol->DrawText( gc, rect, txt, baselineoffset, align, *font ); |
680 AssertTrueL( ETrue, KDrawText ); |
676 //marcontrol->DrawText( gc, rect, textlayout, txt, font ); |
681 iContainer->DrawNow(); |
677 |
682 AssertTrueL( ETrue, KDrawText ); |
678 CleanupStack::PopAndDestroy( marcontrol ); |
683 |
|
684 CleanupStack::PopAndDestroy(); |
|
685 AssertTrueL( ETrue, KSCAknMarqueeControlDestroy ); |
679 AssertTrueL( ETrue, KSCAknMarqueeControlDestroy ); |
686 |
680 |
687 // AknMediatorFacade.h |
681 // AknMediatorFacade.h |
688 CEikDialog *dialog = new ( ELeave ) CEikDialog(); |
682 CEikDialog *dialog = new ( ELeave ) CEikDialog(); |
689 CleanupStack::PushL( dialog ); |
683 CleanupStack::PushL( dialog ); |
716 |
711 |
717 mediatorFacade->SetObserver( NULL ); |
712 mediatorFacade->SetObserver( NULL ); |
718 _LIT( KCMFacadeSetObserver, "CAknMediatorFacade::SetObserver()" ); |
713 _LIT( KCMFacadeSetObserver, "CAknMediatorFacade::SetObserver()" ); |
719 AssertTrueL( ETrue, KCMFacadeSetObserver ); |
714 AssertTrueL( ETrue, KCMFacadeSetObserver ); |
720 |
715 |
721 CleanupStack::PopAndDestroy( 2 );// mediatorFacade, dialog |
716 CleanupStack::PopAndDestroy( mediatorFacade ); |
|
717 CleanupStack::PopAndDestroy( dialog ); |
|
718 |
722 // aknlistloadertfx.h |
719 // aknlistloadertfx.h |
723 _LIT( KTfxApiInternal, "TfxApiInternal" ); |
720 _LIT( KTfxApiInternal, "TfxApiInternal" ); |
724 _LIT( KTfxApi, "TfxApi" ); |
721 _LIT( KTfxApi, "TfxApi" ); |
725 _LIT( KRemoveTfxGc, "RemoveTfxGc" ); |
722 _LIT( KRemoveTfxGc, "RemoveTfxGc" ); |
726 _LIT( KCreateTfxGc, "CreateTfxGc" ); |
723 _LIT( KInvalidateAll, "InvalidateAll" ); |
727 |
724 |
728 CAknListLoader::TfxApiInternal( &gc ); |
725 CAknListLoader::TfxApiInternal( &gc ); |
729 AssertTrueL( ETrue, KTfxApiInternal ); |
726 AssertTrueL( ETrue, KTfxApiInternal ); |
730 CAknListLoader::TfxApi( &gc ); |
727 CAknListLoader::TfxApi( &gc ); |
731 AssertTrueL( ETrue, KTfxApi ); |
728 AssertTrueL( ETrue, KTfxApi ); |
732 CAknListLoader::RemoveTfxGc( &gc ); |
729 |
733 AssertTrueL( ETrue, KRemoveTfxGc ); |
|
734 |
730 |
735 CAknDialog* dlg = new ( ELeave ) CAknDialog(); |
731 CAknDialog* dlg = new ( ELeave ) CAknDialog(); |
736 CEikMenuPane* menupane = NULL; |
732 CleanupStack::PushL( dlg ); |
|
733 CEikMenuPane* menupane = new (ELeave) CEikMenuPane(dlg); |
|
734 CleanupStack::PushL( menupane ); |
737 TInt topindex = 0; |
735 TInt topindex = 0; |
738 TInt itemsthatfitinview = 1; |
736 TInt itemsthatfitinview = 1; |
739 CAknListLoader::CreateTfxGc( *menupane, topindex, itemsthatfitinview ); |
737 CAknListLoader::CreateTfxGc( *menupane, topindex, itemsthatfitinview ); |
740 |
738 |
741 CDesCArray* txtarray = CEikonEnv::Static()->ReadDesCArrayResourceL( |
739 |
742 R_BCTESTDOMNOTIFIER_CBA_OPTIONS_NEXT ); |
740 //CDesCArray* txtarray = new (ELeave) CDesCArraySeg(1); |
743 CleanupStack::PushL( txtarray ); |
741 //CleanupStack::PushL( txtarray ); |
744 |
742 //TBuf<32> item( KStart ); |
745 CTextListBoxModel* model = new( ELeave ) CTextListBoxModel(); |
743 //txtarray->AppendL( item ); |
746 CleanupStack::PushL( model ); |
744 |
747 model->ConstructL( txtarray ); |
745 |
748 |
746 //CTextListBoxModel* model = new( ELeave ) CTextListBoxModel(); |
749 CTextListItemDrawer* drawer = new( ELeave ) CTextListItemDrawer(); |
747 //CleanupStack::PushL( model ); |
750 CleanupStack::PushL( drawer ); |
748 //model->ConstructL(); |
751 drawer->ConstructL( CEikonEnv::Static()->NormalFont() ); |
749 |
752 |
750 |
753 CEikListBox* lstbox = new ( ELeave ) CEikListBox(); |
751 //CTextListItemDrawer* drawer = new( ELeave ) CTextListItemDrawer(); |
754 CleanupStack::PushL( lstbox ); |
752 //CleanupStack::PushL( drawer ); |
755 |
753 //drawer->ConstructL( CEikonEnv::Static()->NormalFont() ); |
756 TGulBorder tborder( TGulBorder::ESingleGray ); |
754 |
757 lstbox->ConstructL( model, drawer, iContainer, tborder, |
755 //CEikListBox* lstbox = new ( ELeave ) CEikListBox(); |
758 EAknListBoxSelectionList | EAknListBoxViewerFlags ); |
756 //CleanupStack::PushL( lstbox ); |
759 |
757 |
760 CAknListLoader::CreateTfxGc( *lstbox ); |
758 //TGulBorder tborder( TGulBorder::ESingleGray ); |
761 AssertTrueL( ETrue, KCreateTfxGc ); |
759 //lstbox->ConstructL( iContainer ); |
762 |
760 // EAknListBoxSelectionList | EAknListBoxViewerFlags ); |
763 CleanupStack::PopAndDestroy( lstbox ); |
761 |
764 CleanupStack::Pop( drawer ); |
762 //CAknListLoader::CreateTfxGc( *lstbox ); |
765 CleanupStack::Pop( model ); |
763 //AssertTrueL( ETrue, KCreateTfxGc ); |
766 CleanupStack::Pop( txtarray ); |
764 |
767 delete dlg; |
765 |
768 |
766 |
|
767 CAknListLoader::RemoveTfxGc( &gc ); |
|
768 AssertTrueL( ETrue, KRemoveTfxGc ); |
|
769 |
|
770 |
|
771 CAknListLoader::InvalidateAll(); |
|
772 AssertTrueL( ETrue, KInvalidateAll ); |
|
773 |
|
774 //CleanupStack::PopAndDestroy( lstbox ); |
|
775 //CleanupStack::PopAndDestroy( drawer ); |
|
776 //CleanupStack::PopAndDestroy( model ); |
|
777 //CleanupStack::PopAndDestroy( txtarray ); |
|
778 |
|
779 CleanupStack::PopAndDestroy( menupane); |
|
780 CleanupStack::PopAndDestroy( dlg ); |
769 // AknReadingConverter.h |
781 // AknReadingConverter.h |
770 _LIT( KCReadingConverter, "CReadingConverter" ); |
782 _LIT( KCReadingConverter, "CReadingConverter" ); |
771 _LIT( KHandleCompletionOfTransactionL, "HandleCompletionOfTransactionL" ); |
783 _LIT( KHandleCompletionOfTransactionL, "HandleCompletionOfTransactionL" ); |
772 _LIT( KMainEditor, "MainEditor" ); |
784 _LIT( KMainEditor, "MainEditor" ); |
773 _LIT( KReadingEditor, "ReadingEditor" ); |
785 _LIT( KReadingEditor, "ReadingEditor" ); |
774 _LIT( KSetReadingEditor, "SetReadingEditor" ); |
786 _LIT( KSetReadingEditor, "SetReadingEditor" ); |
775 _LIT( KSetMainEditor, "SetMainEditor" ); |
787 _LIT( KSetMainEditor, "SetMainEditor" ); |
776 |
788 |
|
789 |
777 CReadingConverter* rdconver = CReadingConverter::NewL(); |
790 CReadingConverter* rdconver = CReadingConverter::NewL(); |
778 CleanupStack::PushL( rdconver ); |
791 CleanupStack::PushL( rdconver ); |
779 AssertNotNullL( rdconver, KCReadingConverter ); |
792 AssertNotNullL( rdconver, KCReadingConverter ); |
780 CleanupStack::PopAndDestroy(); |
793 CleanupStack::PopAndDestroy(); |
781 |
794 |
797 |
810 |
798 rdconver->SetMainEditor( *maineditor ); |
811 rdconver->SetMainEditor( *maineditor ); |
799 AssertTrueL( ETrue, KSetMainEditor ); |
812 AssertTrueL( ETrue, KSetMainEditor ); |
800 |
813 |
801 CleanupStack::PopAndDestroy( rdconver ); |
814 CleanupStack::PopAndDestroy( rdconver ); |
802 AssertTrueL( ETrue, KSetMainEditor ); |
|
803 |
815 |
804 // aknMemoryCardDialog.h |
816 // aknMemoryCardDialog.h |
805 _LIT( KCAknMemoryCardDialog, "CAknMemoryCardDialog" ); |
817 _LIT( KCAknMemoryCardDialog, "CAknMemoryCardDialog" ); |
806 _LIT( KSetSelfPointer, "SetSelfPointer" ); |
818 _LIT( KSetSelfPointer, "SetSelfPointer" ); |
807 _LIT( KUnlockCardLD, "UnlockCardLD" ); |
819 _LIT( KUnlockCardLD, "UnlockCardLD" ); |
808 _LIT( KNotifierArray, "notifierarray " ); |
820 _LIT( KNotifierArray, "NotifierArray" ); |
809 |
821 |
810 CAknMemoryCardDialog* memdlg = CAknMemoryCardDialog::NewLC(); |
822 CAknMemoryCardDialog* memdlg = CAknMemoryCardDialog::NewLC(); |
811 AssertTrueL( ETrue, KCAknMemoryCardDialog ); |
823 AssertTrueL( ETrue, KCAknMemoryCardDialog ); |
812 |
824 |
813 CArrayPtr<MEikSrvNotifierBase2>* notifies = NotifierArray(); |
825 CArrayPtr<MEikSrvNotifierBase2>* notifies = NotifierArray(); |
814 //notifies = NotifierArray(); |
|
815 AssertTrueL( ETrue, KNotifierArray ); |
826 AssertTrueL( ETrue, KNotifierArray ); |
816 |
827 |
817 memdlg->SetSelfPointer( &memdlg ); |
828 memdlg->SetSelfPointer( &memdlg ); |
818 AssertTrueL( ETrue, KSetSelfPointer ); |
829 AssertTrueL( ETrue, KSetSelfPointer ); |
819 memdlg->UnlockCardLD( EDriveE ); |
830 memdlg->UnlockCardLD( EDriveE ); |
866 _LIT( KCharsThatFitOnRight, "CharsThatFitOnRight" ); |
877 _LIT( KCharsThatFitOnRight, "CharsThatFitOnRight" ); |
867 |
878 |
868 TBuf<32> tbuf( KNumberGroup ); |
879 TBuf<32> tbuf( KNumberGroup ); |
869 const CFont *tfont = CEikonEnv::Static()->NormalFont(); |
880 const CFont *tfont = CEikonEnv::Static()->NormalFont(); |
870 CArrayFix<TPtrC>* ary = new ( ELeave ) CArrayFixFlat<TPtrC>( 32 ); |
881 CArrayFix<TPtrC>* ary = new ( ELeave ) CArrayFixFlat<TPtrC>( 32 ); |
|
882 CleanupStack::PushL( ary ); |
871 TPtrC tptr( tbuf ); |
883 TPtrC tptr( tbuf ); |
872 |
884 |
873 AknPhoneNumberTextUtils::WrapPhoneNumberToArrayL( |
885 AknPhoneNumberTextUtils::WrapPhoneNumberToArrayL( |
874 tarea, 2, 16, *tfont, *ary ); |
886 tarea, 2, 16, *tfont, *ary ); |
875 AssertTrueL( ETrue, KWrapPhonenumberToArrayL ); |
887 AssertTrueL( ETrue, KWrapPhonenumberToArrayL ); |
876 AknPhoneNumberTextUtils::ClipLineOnLeft( tptr, tbuf, 1, *tfont ); |
888 AknPhoneNumberTextUtils::ClipLineOnLeft( tptr, tbuf, 1, *tfont ); |
877 AssertTrueL( ETrue, KClipLineOnLeft ); |
889 AssertTrueL( ETrue, KClipLineOnLeft ); |
878 AknPhoneNumberTextUtils::CharsThatFitOnRight( tarea, 2, *tfont ); |
890 AknPhoneNumberTextUtils::CharsThatFitOnRight( tarea, 2, *tfont ); |
879 AssertTrueL( ETrue, KCharsThatFitOnRight ); |
891 AssertTrueL( ETrue, KCharsThatFitOnRight ); |
880 delete ary; |
892 CleanupStack::PopAndDestroy( ary ); |
|
893 //delete ary; |
881 |
894 |
882 // AknPhoneNumberEditor.h |
895 // AknPhoneNumberEditor.h |
883 _LIT( KCAknPhoneNumberEditor, "CAknPhoneNumberEditor" ); |
|
884 _LIT( KConstructFromResourceL, "ConstructFromResourceL" ); |
896 _LIT( KConstructFromResourceL, "ConstructFromResourceL" ); |
885 _LIT( KFormat, "Format" ); |
897 _LIT( KFormat, "Format" ); |
886 _LIT( KWouldTextFitInFormat, "WouldTextFitInFormat" ); |
898 _LIT( KWouldTextFitInFormat, "WouldTextFitInFormat" ); |
887 _LIT( KCurrentFormatIndex, "CurrentFormatIndex" ); |
899 _LIT( KCurrentFormatIndex, "CurrentFormatIndex" ); |
888 _LIT( KSetFormat, "SetFormat" ); |
900 _LIT( KSetFormat, "SetFormat" ); |
889 _LIT( KText, "Text" ); |
901 _LIT( KText, "Text" ); |
890 _LIT( KSizeChanged, "SizeChanged" ); |
902 _LIT( KSizeChanged, "SizeChanged" ); |
891 _LIT( KMinimumSize, "MinimumSize" ); |
903 _LIT( KMinimumSize, "MinimumSize" ); |
892 _LIT( KInputCapabilities, "InputCapabilities" ); |
904 _LIT( KInputCapabilities, "InputCapabilities" ); |
893 _LIT( KDrawNow, " draw() " ); |
|
894 _LIT( KTextLength, "TextLength" ); |
905 _LIT( KTextLength, "TextLength" ); |
895 _LIT( KCursorPos, "CursorPos" ); |
906 _LIT( KCursorPos, "CursorPos" ); |
896 _LIT( KSelectionLength, "SelectionLength" ); |
907 _LIT( KSelectionLength, "SelectionLength" ); |
897 _LIT( KSelection, "Selection" ); |
908 _LIT( KSelection, "Selection" ); |
898 _LIT( KClearSelectionL, "ClearSelectionL" ); |
909 _LIT( KClearSelectionL, "ClearSelectionL" ); |
914 _LIT( KOfferKeyEventL, "OfferKeyEventL" ); |
925 _LIT( KOfferKeyEventL, "OfferKeyEventL" ); |
915 _LIT( KFocusChanged, "FocusChanged" ); |
926 _LIT( KFocusChanged, "FocusChanged" ); |
916 _LIT( KCAknPhoneNumberEditorDestroy, "KCAknPhoneNumberEditorDestroy" ); |
927 _LIT( KCAknPhoneNumberEditorDestroy, "KCAknPhoneNumberEditorDestroy" ); |
917 _LIT( KCAknPhoneNumberEditorDraw, "Draw" ); |
928 _LIT( KCAknPhoneNumberEditorDraw, "Draw" ); |
918 |
929 |
919 CAknPhoneNumberEditor* phonenumeditor = new ( ELeave ) CAknPhoneNumberEditor; |
930 CAknPhoneNumberEditor* phonenumeditor = |
920 AssertNotNullL( phonenumeditor,KCAknPhoneNumberEditor ); |
931 new ( ELeave ) CAknPhoneNumberEditor; |
|
932 CleanupStack::PushL( phonenumeditor ); |
|
933 //AssertNotNullL( phonenumeditor,KCAknPhoneNumberEditor ); |
921 phonenumeditor->SetContainerWindowL( *iContainer ); |
934 phonenumeditor->SetContainerWindowL( *iContainer ); |
922 TResourceReader reader; |
935 TResourceReader reader; |
923 CEikonEnv::Static()->CreateResourceReaderLC( reader, |
936 CEikonEnv::Static()->CreateResourceReaderLC( reader, |
924 R_PHONEEDAPP_RESEDIT ); |
937 R_PHONEEDAPP_RESEDIT ); |
|
938 |
|
939 |
925 phonenumeditor->ConstructFromResourceL( reader ); |
940 phonenumeditor->ConstructFromResourceL( reader ); |
926 AssertTrueL( ETrue,KConstructFromResourceL ); |
941 AssertTrueL( ETrue,KConstructFromResourceL ); |
|
942 CleanupStack::PopAndDestroy();//reader |
|
943 |
927 phonenumeditor->Format( 0 ); |
944 phonenumeditor->Format( 0 ); |
928 AssertTrueL( ETrue, KFormat ); |
945 AssertTrueL( ETrue, KFormat ); |
929 |
946 |
930 iContainer->SetControl( phonenumeditor ); //Draw() function will be called. |
947 //Draw() function will be called. |
|
948 iContainer->SetControl( phonenumeditor ); |
931 AssertTrueL( ETrue, KCAknPhoneNumberEditorDraw ); |
949 AssertTrueL( ETrue, KCAknPhoneNumberEditorDraw ); |
932 |
950 |
933 TInt tcount = phonenumeditor->CountFormats(); |
951 TInt tcount = phonenumeditor->CountFormats(); |
934 phonenumeditor->WouldTextFitInFormat( tcount-1 ); |
952 phonenumeditor->WouldTextFitInFormat( tcount-1 ); |
935 AssertTrueL( ETrue, KWouldTextFitInFormat ); |
953 AssertTrueL( ETrue, KWouldTextFitInFormat ); |
965 phonenumeditor->SelectAllL(); |
981 phonenumeditor->SelectAllL(); |
966 AssertTrueL( ETrue, KSelectAllL ); |
982 AssertTrueL( ETrue, KSelectAllL ); |
967 phonenumeditor->GetText( tarea ); |
983 phonenumeditor->GetText( tarea ); |
968 AssertTrueL( ETrue, KGetText ); |
984 AssertTrueL( ETrue, KGetText ); |
969 HBufC* temp = phonenumeditor->GetTextInHBufL(); |
985 HBufC* temp = phonenumeditor->GetTextInHBufL(); |
|
986 CleanupStack::PushL( temp ); |
970 AssertTrueL( ETrue, KGetTextInHBufL ); |
987 AssertTrueL( ETrue, KGetTextInHBufL ); |
971 delete temp; |
988 CleanupStack::PopAndDestroy( temp ); |
972 |
989 |
973 phonenumeditor->SetTextL( &tarea ); |
990 phonenumeditor->SetTextL( &tarea ); |
974 AssertTrueL( ETrue, KSetTextL ); |
991 AssertTrueL( ETrue, KSetTextL ); |
975 |
992 |
976 phonenumeditor->SetText( tarea ); |
993 phonenumeditor->SetText( tarea ); |
977 AssertTrueL( ETrue, KSetText ); |
994 AssertTrueL( ETrue, KSetText ); |
|
995 |
978 phonenumeditor->CancelFepTransaction(); |
996 phonenumeditor->CancelFepTransaction(); |
979 AssertTrueL( ETrue, KCancelFepTransaction ); |
997 AssertTrueL( ETrue, KCancelFepTransaction ); |
980 |
998 |
981 phonenumeditor->UpdateScrollBarsL(); |
999 phonenumeditor->UpdateScrollBarsL(); |
982 AssertTrueL( ETrue, KUpdateScrollBarsL ); |
1000 AssertTrueL( ETrue, KUpdateScrollBarsL ); |
983 CEikScrollBarFrame* pScrBar = phonenumeditor->CreateScrollBarFrameL(); |
1001 CEikScrollBarFrame* pScrBar = phonenumeditor->CreateScrollBarFrameL(); |
|
1002 CleanupStack::PushL( pScrBar ); |
984 AssertTrueL( ETrue, KCreateScrollBarFrameL ); |
1003 AssertTrueL( ETrue, KCreateScrollBarFrameL ); |
985 delete pScrBar; |
1004 CleanupStack::PopAndDestroy( pScrBar ); |
986 phonenumeditor->LineCursorWidth(); |
1005 phonenumeditor->LineCursorWidth(); |
987 AssertTrueL( ETrue, KLineCursorWidth ); |
1006 AssertTrueL( ETrue, KLineCursorWidth ); |
988 phonenumeditor->Margins(); |
1007 phonenumeditor->Margins(); |
989 AssertTrueL( ETrue, KMargins ); |
1008 AssertTrueL( ETrue, KMargins ); |
990 |
1009 |
1025 _LIT( KUnlockCardLD, "UnlockCardLD" ); |
1045 _LIT( KUnlockCardLD, "UnlockCardLD" ); |
1026 |
1046 |
1027 CAknPhoneNumberEditor* phonenumeditor = new ( ELeave ) CAknPhoneNumberEditor; |
1047 CAknPhoneNumberEditor* phonenumeditor = new ( ELeave ) CAknPhoneNumberEditor; |
1028 AssertNotNullL( phonenumeditor, KCAknPhoneNumberEditor ); |
1048 AssertNotNullL( phonenumeditor, KCAknPhoneNumberEditor ); |
1029 |
1049 |
1030 phonenumeditor->ConstructL( 30, 3, 3, KString ); |
1050 phonenumeditor->SetContainerWindowL( *iContainer ); |
|
1051 phonenumeditor->ConstructL( 30, 3, 3, KString); |
1031 AssertTrueL( ETrue, KConstructL ); |
1052 AssertTrueL( ETrue, KConstructL ); |
1032 |
1053 |
1033 const CFont *tfont = CEikonEnv::Static()->NormalFont(); |
1054 const CFont *tfont = CEikonEnv::Static()->NormalFont(); |
1034 CAknPhoneNumberEditor::TFormat tformat( CAknPhoneNumberEditor::TFormat( |
1055 CAknPhoneNumberEditor::TFormat tformat( CAknPhoneNumberEditor::TFormat( |
1035 TRect( 10, 10, 70, 55 ), 0, 3, 3, 15, tfont ) ); |
1056 TRect( 10, 10, 70, 55 ), 0, 3, 3, 15, tfont ) ); |
1042 CEikonEnv::Static()->CreateResourceReaderLC( reader, |
1063 CEikonEnv::Static()->CreateResourceReaderLC( reader, |
1043 R_NUMBER_FIELD_FORM ); |
1064 R_NUMBER_FIELD_FORM ); |
1044 CAknPhoneNumberEditor::TFormat readformat( reader ); |
1065 CAknPhoneNumberEditor::TFormat readformat( reader ); |
1045 AssertTrueL( ETrue, KTFormat ); |
1066 AssertTrueL( ETrue, KTFormat ); |
1046 |
1067 |
1047 CleanupStack::PopAndDestroy( ); |
1068 CleanupStack::PopAndDestroy( );//reader |
|
1069 delete phonenumeditor; |
1048 AssertTrueL( ETrue, KCAknPhoneNumberEditorDestroy ); |
1070 AssertTrueL( ETrue, KCAknPhoneNumberEditorDestroy ); |
1049 delete phonenumeditor; |
1071 |
1050 |
1072 |
1051 CAknNoteAttributes::GetSkinnedBitmapID( 0 ); |
1073 CAknNoteAttributes::GetSkinnedBitmapID( 0 ); |
1052 AssertTrueL( ETrue, KGetSkinnedBitmapID ); |
1074 AssertTrueL( ETrue, KGetSkinnedBitmapID ); |
1053 |
1075 |
1054 //aknmemorycarddialog.h |
1076 //aknmemorycarddialog.h |
1055 |
|
1056 CAknMemoryCardDialog* memdlg = CAknMemoryCardDialog::NewLC(); |
1077 CAknMemoryCardDialog* memdlg = CAknMemoryCardDialog::NewLC(); |
1057 AssertNotNullL( memdlg, KCAknMemoryCardDialog ); |
1078 AssertNotNullL( memdlg, KCAknMemoryCardDialog ); |
1058 |
1079 |
1059 memdlg->UnlockCardLD( ETrue ); |
1080 memdlg->UnlockCardLD( ETrue ); |
1060 AssertTrueL( ETrue, KUnlockCardLD ); |
1081 AssertTrueL( ETrue, KUnlockCardLD ); |