omadrm/drmplugins/drmromtm/uiData/src/RoMtmDat.cpp
changeset 0 95b198f216e5
child 12 8a03a285ab14
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2002 - 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:  Rights Object MTM UI Data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // Standard includes
       
    20 #if !defined(__COEMAIN_H__)
       
    21 #include <coemain.h>	// CCoeEnv
       
    22 #endif
       
    23 
       
    24 // Messaging includes
       
    25 #if !defined(__MTCLBASE_H__)
       
    26 #include <mtclbase.h> 
       
    27 #endif
       
    28 #if !defined(__MSVSTD_HRH__)
       
    29 #include <msvstd.hrh>
       
    30 #endif
       
    31 #if !defined(__MTMDEF_HRH__)
       
    32 #include <mtmdef.hrh>
       
    33 #endif
       
    34 #if !defined(__MSVUIDS_H__)
       
    35 #include <msvuids.h>
       
    36 #endif
       
    37 #if !defined(__MSVIDS_H__)
       
    38 #include <msvids.h>
       
    39 #endif
       
    40 
       
    41 #include <msvapi.h>
       
    42 #include <RoMtmUi.rsg>
       
    43 #include <muiu.mbg>
       
    44 #include <mtmuids.h>
       
    45 #include <MTMUIDEF.HRH>
       
    46 #include <StringResourceReader.h>
       
    47 #include <avkon.rsg>
       
    48 #include <data_caging_path_literals.hrh>
       
    49 
       
    50 #include <stringloader.h>
       
    51 #include <aknsutils.h>
       
    52 #include <aknsconstants.h>//skinned icon ids
       
    53 
       
    54 #ifdef RD_MULTIPLE_DRIVE
       
    55 #include <DriveInfo.h>
       
    56 #endif
       
    57 
       
    58 #include "RoMtmDat.h"
       
    59 #include "RoMtmDaC.h"
       
    60 #include "RoMtmCommon.h"
       
    61 
       
    62 // EXTERNAL DATA STRUCTURES
       
    63 // EXTERNAL FUNCTION PROTOTYPES  
       
    64 // CONSTANTS
       
    65 // MACROS
       
    66 // LOCAL CONSTANTS AND MACROS
       
    67 // MODULE DATA STRUCTURES
       
    68 // LOCAL FUNCTION PROTOTYPES
       
    69 // FORWARD DECLARATIONS
       
    70 
       
    71 // Constants
       
    72 #ifndef RD_MULTIPLE_DRIVE
       
    73 _LIT( KDriveZ, "z:" );                                      
       
    74 #endif
       
    75 
       
    76 _LIT( KRoMtmUdResourceFile, "RoMtmUi.RSC" );
       
    77 
       
    78 
       
    79 
       
    80 // ============================= LOCAL FUNCTIONS ===============================
       
    81 
       
    82 
       
    83 EXPORT_C CBaseMtmUiData* NewMtmUiDataLayerL( CRegisteredMtmDll& aRegisteredDll )
       
    84 // Factory function
       
    85 	{
       
    86 	return CRightsObjectMtmUiData::NewL( aRegisteredDll );
       
    87 	}
       
    88 
       
    89 
       
    90 
       
    91 
       
    92 // ============================ MEMBER FUNCTIONS ===============================
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 // CRightsObjectMtmUiDataSessionObserver::CRightsObjectMtmUiDataSessionObserver
       
    96 // C++ default constructor can NOT contain any code, that
       
    97 // might leave.
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 CRightsObjectMtmUiDataSessionObserver::CRightsObjectMtmUiDataSessionObserver()
       
   101 	{
       
   102     }
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // CRightsObjectMtmUiDataSessionObserver::NewL
       
   106 // Two-phased constructor.
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 CRightsObjectMtmUiDataSessionObserver* 
       
   110     CRightsObjectMtmUiDataSessionObserver::NewL()
       
   111 	{
       
   112 	CRightsObjectMtmUiDataSessionObserver* self = 
       
   113         new ( ELeave ) CRightsObjectMtmUiDataSessionObserver();
       
   114 	CleanupStack::PushL( self );
       
   115 	self->ConstructL();
       
   116 	CleanupStack::Pop( self );
       
   117 	return self;
       
   118 	}
       
   119 
       
   120 // Destructor
       
   121 CRightsObjectMtmUiDataSessionObserver::~CRightsObjectMtmUiDataSessionObserver()
       
   122 	{ 
       
   123 	}
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 // CRightsObjectMtmUiDataSessionObserver::ConstructL
       
   127 // -----------------------------------------------------------------------------
       
   128 //
       
   129 void CRightsObjectMtmUiDataSessionObserver::ConstructL()
       
   130     {
       
   131     }
       
   132 
       
   133 // -----------------------------------------------------------------------------
       
   134 // CRightsObjectMtmUiDataSessionObserver::HandleSessionEventL
       
   135 // -----------------------------------------------------------------------------
       
   136 //
       
   137 void CRightsObjectMtmUiDataSessionObserver::HandleSessionEventL(
       
   138     TMsvSessionEvent aEvent, 
       
   139     TAny* aArg1, 
       
   140     TAny* /*aArg2*/, 
       
   141     TAny* /*aArg3*/ )
       
   142     {
       
   143     
       
   144 #ifdef RD_MULTIPLE_DRIVE
       
   145     _LIT(KRoHandlerTriggerFilePath, "%c:\\system\\data\\"); 
       
   146 #else
       
   147     _LIT(KRoHandlerTriggerFilePath, "c:\\system\\data\\");
       
   148 #endif
       
   149    
       
   150     if (aEvent == EMsvEntriesDeleted)
       
   151         {
       
   152         TFileName fileName;
       
   153         CMsvEntrySelection* selection = STATIC_CAST( CMsvEntrySelection*, aArg1 );
       
   154         RFs fs;
       
   155         User::LeaveIfError(fs.Connect());
       
   156         CleanupClosePushL(fs);
       
   157         for (TInt i = 0;i<selection->Count();i++)
       
   158             {
       
   159             
       
   160 #ifndef RD_MULTIPLE_DRIVE
       
   161     
       
   162             _LIT(KFile,"%S%u.tri");
       
   163             fileName.Format(KFile,&KRoHandlerTriggerFilePath,selection->At(i));
       
   164             fs.Delete(fileName);
       
   165     
       
   166 #else //RD_MULTIPLE_DRIVE
       
   167     
       
   168             TInt driveNumber( -1 );
       
   169             TChar driveLetter;
       
   170             DriveInfo::GetDefaultDrive( DriveInfo::EDefaultSystem, driveNumber );
       
   171 	        fs.DriveToChar( driveNumber, driveLetter );
       
   172 	
       
   173 	        TFileName roHandlerTriggerFilePath;
       
   174 	        roHandlerTriggerFilePath.Format( 
       
   175 	                    KRoHandlerTriggerFilePath, (TUint)driveLetter );
       
   176     
       
   177             _LIT(KFile,"%S%u.tri");
       
   178             fileName.Format( 
       
   179                         KFile, &roHandlerTriggerFilePath, selection->At(i) );
       
   180             fs.Delete(fileName);
       
   181     
       
   182 #endif
       
   183             
       
   184             
       
   185             }
       
   186         CleanupStack::PopAndDestroy(&fs);
       
   187         }
       
   188     }
       
   189 
       
   190 // ============================ MEMBER FUNCTIONS ===============================
       
   191 
       
   192 // -----------------------------------------------------------------------------
       
   193 // CRightsObjectMtmUiData::CRightsObjectMtmUiData
       
   194 // C++ default constructor can NOT contain any code, that
       
   195 // might leave.
       
   196 // -----------------------------------------------------------------------------
       
   197 //
       
   198 CRightsObjectMtmUiData::CRightsObjectMtmUiData( CRegisteredMtmDll& aRegisteredDll )
       
   199 	:	CBaseMtmUiData( aRegisteredDll )
       
   200 	{
       
   201     }
       
   202 
       
   203 // -----------------------------------------------------------------------------
       
   204 // CRightsObjectMtmUiData::NewL
       
   205 // Two-phased constructor.
       
   206 // -----------------------------------------------------------------------------
       
   207 //
       
   208 CRightsObjectMtmUiData* 
       
   209     CRightsObjectMtmUiData::NewL( CRegisteredMtmDll& aRegisteredDll )
       
   210 	{
       
   211 	CRightsObjectMtmUiData* base = 
       
   212         new ( ELeave ) CRightsObjectMtmUiData( aRegisteredDll );
       
   213 	CleanupStack::PushL( base );
       
   214 	base->ConstructL();
       
   215 	CleanupStack::Pop();
       
   216 	return base;
       
   217 	}
       
   218 
       
   219 // Destructor
       
   220 CRightsObjectMtmUiData::~CRightsObjectMtmUiData()
       
   221 	{ 
       
   222     delete iSession;
       
   223     delete iObserver;
       
   224 	}
       
   225 
       
   226 
       
   227 void CRightsObjectMtmUiData::ConstructL()
       
   228 	{ 
       
   229     CBaseMtmUiData::ConstructL();
       
   230     iObserver = CRightsObjectMtmUiDataSessionObserver::NewL();
       
   231     iSession = CMsvSession::OpenSyncL( *iObserver );
       
   232     }
       
   233 
       
   234 /*************************************
       
   235 *
       
   236 *		MTM-specific functionality 
       
   237 *
       
   238 **************************************/
       
   239 
       
   240 // -----------------------------------------------------------------------------
       
   241 // CRightsObjectMtmUiData::GetResourceFileName
       
   242 // 
       
   243 // Gets the resource file name. 
       
   244 //
       
   245 // -----------------------------------------------------------------------------
       
   246 //
       
   247 void CRightsObjectMtmUiData::GetResourceFileName( TFileName& aFileName ) const
       
   248 // Resource file loading
       
   249 	{ 
       
   250 #ifndef RD_MULTIPLE_DRIVE
       
   251     
       
   252     aFileName = KDriveZ;
       
   253     
       
   254 #else //RD_MULTIPLE_DRIVE
       
   255     
       
   256     _LIT( KDrive, "%c:");
       
   257     TInt driveNumber( -1 );
       
   258     TChar driveLetter;
       
   259     DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRom, driveNumber );
       
   260 	
       
   261 	iCoeEnv->FsSession().DriveToChar( driveNumber, driveLetter );
       
   262 	
       
   263     aFileName.Format( KDrive, (TUint)driveLetter );
       
   264     
       
   265 #endif
       
   266 	
       
   267 	aFileName.Append( KDC_MTM_RESOURCE_DIR );
       
   268    	aFileName.Append( KRoMtmUdResourceFile );
       
   269 	}
       
   270 
       
   271 // -----------------------------------------------------------------------------
       
   272 // CRightsObjectMtmUiData::PopulateArraysL
       
   273 // 
       
   274 // Initialises bitmaps and function information. 
       
   275 //
       
   276 // -----------------------------------------------------------------------------
       
   277 //
       
   278 void CRightsObjectMtmUiData::PopulateArraysL()
       
   279 // Initialise bitmaps and function information 
       
   280 	{
       
   281     CreateSkinnedBitmapsL( KBitmapArraySize );
       
   282 	}
       
   283 
       
   284 // -----------------------------------------------------------------------------
       
   285 // CRightsObjectMtmUiData::PopulateArraysL
       
   286 // 
       
   287 // Not supported
       
   288 //
       
   289 // -----------------------------------------------------------------------------
       
   290 //
       
   291 TInt CRightsObjectMtmUiData::OperationSupportedL( 
       
   292 										TInt /*aOperationId*/ , 
       
   293 										const TMsvEntry& /*aContext*/ 
       
   294 										) const
       
   295 // Context-sensitive operation query 
       
   296 	{
       
   297 	return R_ROUD_NOT_SUPPORTED;
       
   298 	}
       
   299 
       
   300 // -----------------------------------------------------------------------------
       
   301 // CRightsObjectMtmUiData::QueryCapability
       
   302 // 
       
   303 // Queries if the MTM supports a particular capability, specified by a UID. 
       
   304 //
       
   305 // -----------------------------------------------------------------------------
       
   306 //
       
   307 TInt CRightsObjectMtmUiData::QueryCapability( TUid aCapability , TInt& aResponse ) const
       
   308 // Query for capability 
       
   309 	{
       
   310 	switch ( aCapability.iUid )
       
   311 		{
       
   312 		case KUidMtmQueryMaxBodySizeValue:
       
   313 		case KUidMtmQueryMaxTotalMsgSizeValue:
       
   314 			{
       
   315 			aResponse = KMaxRoMessageSize;
       
   316 			break;
       
   317 			}
       
   318 		case KUidMtmQuerySupportedBodyValue:
       
   319 			{
       
   320 			aResponse = KMtm7BitBody | KMtm8BitBody | 
       
   321 						   KMtm16BitBody | KMtmBinaryBody;
       
   322 			break;
       
   323 			}
       
   324 		// Supported non-valued capabilities
       
   325 		// boolean returns
       
   326 		case KUidMtmQuerySupportSubjectValue:
       
   327 		case KUidMtmQueryOffLineAllowedValue:
       
   328 			{
       
   329 			aResponse=ETrue;
       
   330 			break;		
       
   331 			}
       
   332 		default:
       
   333 			return KErrNotSupported;
       
   334 		};
       
   335 	return KErrNone;
       
   336 	}
       
   337 
       
   338 
       
   339 // -----------------------------------------------------------------------------
       
   340 // CRightsObjectMtmUiData::ContextIcon
       
   341 // 
       
   342 // Gets an array of bitmaps relevant to the passed context entry. 
       
   343 //
       
   344 // -----------------------------------------------------------------------------
       
   345 //
       
   346 const CBaseMtmUiData::CBitmapArray& CRightsObjectMtmUiData::ContextIcon(
       
   347 											const TMsvEntry& aContext ,
       
   348 											TInt /*aStateFlags*/
       
   349 											) const
       
   350 // Get context-specific icon
       
   351 	{
       
   352     return *iIconArrays->At( aContext.Unread() ? 0 : 1 );
       
   353 	}
       
   354 
       
   355 //
       
   356 // Context-specific information
       
   357 //
       
   358 
       
   359 // -----------------------------------------------------------------------------
       
   360 // CRightsObjectMtmUiData::CanOpenEntryL
       
   361 // 
       
   362 // Tests if an entry can be opened.
       
   363 //
       
   364 // -----------------------------------------------------------------------------
       
   365 //
       
   366 TBool CRightsObjectMtmUiData::CanOpenEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const
       
   367 	{
       
   368 	aReasonResourceId=0;
       
   369 	if ( aContext.iType != KUidMsvMessageEntry )
       
   370 		{
       
   371 		aReasonResourceId = R_ROUD_ONLY_MESSAGES;
       
   372 		return KErrNotSupported;
       
   373 		}
       
   374 	else
       
   375 		{
       
   376 		return KErrNone;		
       
   377 		}
       
   378 	}
       
   379 
       
   380 // -----------------------------------------------------------------------------
       
   381 // CRightsObjectMtmUiData::CanCloseEntryL
       
   382 // 
       
   383 // Not supported
       
   384 //
       
   385 // -----------------------------------------------------------------------------
       
   386 //
       
   387 TBool CRightsObjectMtmUiData::CanCloseEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   388 	{
       
   389 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   390 	return KErrNotSupported;
       
   391 	}
       
   392 
       
   393 // -----------------------------------------------------------------------------
       
   394 // CRightsObjectMtmUiData::CanViewEntryL
       
   395 // 
       
   396 // Tests if an entry can be viewed.
       
   397 //
       
   398 // -----------------------------------------------------------------------------
       
   399 //
       
   400 TBool CRightsObjectMtmUiData::CanViewEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const
       
   401 	{
       
   402 	aReasonResourceId=0;
       
   403 	if ( aContext.iType != KUidMsvMessageEntry )
       
   404 		{
       
   405 		aReasonResourceId = R_ROUD_ONLY_MESSAGES;
       
   406 		return KErrNotSupported;
       
   407 		}
       
   408 	else
       
   409 		{
       
   410 		return KErrNone;		
       
   411 		}
       
   412 	}
       
   413 
       
   414 // -----------------------------------------------------------------------------
       
   415 // CRightsObjectMtmUiData::CanEditEntryL
       
   416 // 
       
   417 // Not supported
       
   418 //
       
   419 // -----------------------------------------------------------------------------
       
   420 //
       
   421 TBool CRightsObjectMtmUiData::CanEditEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   422 	{
       
   423 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   424 	return KErrNotSupported;
       
   425 	}
       
   426 
       
   427 // -----------------------------------------------------------------------------
       
   428 // CRightsObjectMtmUiData::CanDeleteFromEntryL
       
   429 // 
       
   430 // Not supported
       
   431 //
       
   432 // -----------------------------------------------------------------------------
       
   433 //
       
   434 TBool CRightsObjectMtmUiData::CanDeleteFromEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   435 	{
       
   436 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   437 	return KErrNotSupported;
       
   438 	}
       
   439 
       
   440 // -----------------------------------------------------------------------------
       
   441 // CRightsObjectMtmUiData::CanCopyMoveToEntryL
       
   442 // 
       
   443 // Not supported
       
   444 //
       
   445 // -----------------------------------------------------------------------------
       
   446 //
       
   447 TBool CRightsObjectMtmUiData::CanCopyMoveToEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   448 	{
       
   449 	aReasonResourceId = KErrNone;
       
   450 	return KErrNone;
       
   451 	}
       
   452 
       
   453 // -----------------------------------------------------------------------------
       
   454 // CRightsObjectMtmUiData::CanCopyMoveFromEntryL
       
   455 // 
       
   456 // Not supported
       
   457 //
       
   458 // -----------------------------------------------------------------------------
       
   459 //
       
   460 TBool CRightsObjectMtmUiData::CanCopyMoveFromEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   461 	{
       
   462 	aReasonResourceId = KErrNone;
       
   463 	return KErrNone;
       
   464 	}
       
   465 
       
   466 
       
   467 // -----------------------------------------------------------------------------
       
   468 // CRightsObjectMtmUiData::CanReplyToEntryL
       
   469 // 
       
   470 // Not supported
       
   471 //
       
   472 // -----------------------------------------------------------------------------
       
   473 //
       
   474 TBool CRightsObjectMtmUiData::CanReplyToEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   475 //
       
   476 // MTM UI does not support replying.
       
   477 //
       
   478     {
       
   479 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   480 	return KErrNotSupported;
       
   481     }
       
   482 
       
   483 // -----------------------------------------------------------------------------
       
   484 // CRightsObjectMtmUiData::CanForwardEntryL
       
   485 // 
       
   486 // Not supported
       
   487 //
       
   488 // -----------------------------------------------------------------------------
       
   489 //
       
   490 TBool CRightsObjectMtmUiData::CanForwardEntryL( const TMsvEntry& /*aContext*/ , TInt& aReasonResourceId ) const
       
   491 //
       
   492 // MTM UI does not supports forwarding.
       
   493 //
       
   494     {
       
   495 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   496 	return KErrNotSupported;
       
   497     }
       
   498 
       
   499 // -----------------------------------------------------------------------------
       
   500 // CRightsObjectMtmUiData::CanCreateEntryL
       
   501 // 
       
   502 // Not supported
       
   503 //
       
   504 // -----------------------------------------------------------------------------
       
   505 //
       
   506 TBool CRightsObjectMtmUiData::CanCreateEntryL( const TMsvEntry& /*aParent*/ , TMsvEntry& /*aNewEntry*/ , 
       
   507 									  TInt& aReasonResourceId ) const
       
   508 	{
       
   509 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   510 	return KErrNotSupported;
       
   511 	}
       
   512 
       
   513 // -----------------------------------------------------------------------------
       
   514 // CRightsObjectMtmUiData::CanDeleteServiceL
       
   515 // 
       
   516 // Not supported
       
   517 //
       
   518 // -----------------------------------------------------------------------------
       
   519 //
       
   520 TBool CRightsObjectMtmUiData::CanDeleteServiceL( 
       
   521     const TMsvEntry& /*aService*/, 
       
   522     TInt& aReasonResourceId ) const
       
   523 	{
       
   524 	aReasonResourceId = R_ROUD_ONLY_MESSAGES;
       
   525 	return KErrNotSupported;
       
   526 	}
       
   527 
       
   528 // -----------------------------------------------------------------------------
       
   529 // CRightsObjectMtmUiData::CanCancelL
       
   530 // 
       
   531 // Not supported
       
   532 //
       
   533 // -----------------------------------------------------------------------------
       
   534 //
       
   535 TBool CRightsObjectMtmUiData::CanCancelL( 
       
   536     const TMsvEntry& /*aContext*/ , 
       
   537     TInt& aReasonResourceId ) const
       
   538 	{
       
   539 	aReasonResourceId = R_ROUD_NOT_SUPPORTED;
       
   540 	return KErrNotSupported;	
       
   541 	}
       
   542 
       
   543 // -----------------------------------------------------------------------------
       
   544 // CRightsObjectMtmUiData::StatusTextL
       
   545 // 
       
   546 // Not supported
       
   547 //
       
   548 // -----------------------------------------------------------------------------
       
   549 //
       
   550 HBufC* CRightsObjectMtmUiData::StatusTextL( const TMsvEntry& /*aContext*/ ) const
       
   551 	{
       
   552     return NULL;
       
   553 	}
       
   554 
       
   555 
       
   556 // ---------------------------------------------------------
       
   557 // CRightsObjectMtmUiData::CreateSkinnedBitmapsL
       
   558 //
       
   559 // ---------------------------------------------------------
       
   560 void CRightsObjectMtmUiData::CreateSkinnedBitmapsL( TInt aNumZoomStates )
       
   561     {
       
   562     MAknsSkinInstance* skins = AknsUtils::SkinInstance();
       
   563     TAknsItemID id;
       
   564     CFbsBitmap* bitmap;
       
   565     CFbsBitmap* bitmapMask;
       
   566     CBitmapArray* array = NULL;
       
   567     TParse tp;
       
   568     tp.Set( KRoMtmUiDataBitmapFile, &KDC_APP_BITMAP_DIR, NULL );
       
   569 
       
   570     array = new(ELeave) CArrayPtrFlat<CFbsBitmap>( aNumZoomStates );
       
   571     CleanupStack::PushL( array );
       
   572     
       
   573     id.Set( KAknsIIDQgnPropMcePushUnread );
       
   574 
       
   575     AknsUtils::CreateIconL( skins, id, bitmap,
       
   576         bitmapMask, tp.FullName(), EMbmMuiuQgn_prop_mce_push_unread,
       
   577         EMbmMuiuQgn_prop_mce_push_unread_mask );
       
   578              
       
   579     array->AppendL( bitmap );
       
   580     bitmap = 0;
       
   581     array->AppendL( bitmapMask );
       
   582     bitmapMask = 0;
       
   583     iIconArrays->AppendL( array );
       
   584     CleanupStack::Pop(); //array
       
   585     
       
   586     array = new(ELeave) CArrayPtrFlat<CFbsBitmap>( aNumZoomStates );
       
   587     CleanupStack::PushL( array );
       
   588     
       
   589     id.Set( KAknsIIDQgnPropMcePushRead );
       
   590 
       
   591     AknsUtils::CreateIconL( skins, id, bitmap,
       
   592         bitmapMask, tp.FullName(), EMbmMuiuQgn_prop_mce_push_read,
       
   593         EMbmMuiuQgn_prop_mce_push_read_mask );
       
   594              
       
   595     array->AppendL( bitmap );
       
   596     bitmap = 0;
       
   597     array->AppendL( bitmapMask );
       
   598     bitmapMask = 0;
       
   599     iIconArrays->AppendL( array );
       
   600     CleanupStack::Pop(); //array
       
   601     }