mobilemessaging/mmsui/mtmsrc/MmsMtmUiData.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 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:  
       
    15 *       Provides MMS MTM UI data methods.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include "MmsMtmUiData.h"
       
    23 
       
    24 #include <mtclbase.h>
       
    25 #include <eikon.rsg>
       
    26 #include <data_caging_path_literals.hrh> 
       
    27 
       
    28 #include <coemain.h>
       
    29 #include <AknsUtils.h>
       
    30 #include <AknsConstants.h>
       
    31 #include <AknUtils.h>
       
    32 
       
    33 #include <mtmuids.h>
       
    34 #include <msvids.h>
       
    35 #include <msvuids.h>
       
    36 #include <mtmuidef.hrh>
       
    37 
       
    38 #include <MmsUi.rsg>
       
    39 #include <muiu.mbg>                         // for MMS icon bitmaps
       
    40 #include <avkon.rsg>
       
    41 #include "MmsMtmUiPanic.h"
       
    42 #include "MmsMtmConst.h"
       
    43 #include <mmsconst.h>                       // for KUidMsgTypeMultimedia
       
    44 #include <mmsmsventry.h>
       
    45 #include "MmsMtmUi.h"           //  IsUpload()
       
    46 
       
    47 #include <StringLoader.h>           // StringLoader
       
    48 
       
    49 // Features
       
    50 #include <featmgr.h>    
       
    51 #include <bldvariant.hrh>
       
    52 
       
    53 #include <messagingvariant.hrh> // for messaging features
       
    54  #include <centralrepository.h>    // link against centralrepository.lib
       
    55  #include <MmsEngineInternalCRKeys.h>
       
    56  #include <messaginginternalcrkeys.h> // for Central Repository keys
       
    57 
       
    58 // CONSTANTS
       
    59 const TInt KDateSize = 30;
       
    60 const TInt KMmsReadIconIndex = 0;
       
    61 const TInt KMmsUnreadIconIndex = 1;
       
    62 const TInt KMmsPostcardIconIndex = 2;
       
    63 const TInt KAmsListenedIconIndex = 3;
       
    64 const TInt KAmsNotListenedIconIndex = 4;
       
    65 
       
    66 // MACROS
       
    67 // LOCAL CONSTANTS AND MACROS
       
    68 // MODULE DATA STRUCTURES
       
    69 // LOCAL FUNCTION PROTOTYPES
       
    70 
       
    71 // ==================== LOCAL FUNCTIONS ====================
       
    72 
       
    73 // ---------------------------------------------------------
       
    74 // NewMmsMtmUiDataL
       
    75 // Factory function
       
    76 // ---------------------------------------------------------
       
    77 //
       
    78 EXPORT_C CBaseMtmUiData* NewMmsMtmUiDataL( CRegisteredMtmDll& aRegisteredDll )
       
    79     {
       
    80     return CMmsMtmUiData::NewL( aRegisteredDll );
       
    81     }
       
    82 
       
    83 
       
    84 // ================= MEMBER FUNCTIONS =======================
       
    85 
       
    86 // ---------------------------------------------------------
       
    87 // CMmsMtmUiData::CMmsMtmUiData
       
    88 // C++ constructor
       
    89 // ---------------------------------------------------------
       
    90 //
       
    91 CMmsMtmUiData::CMmsMtmUiData( CRegisteredMtmDll& aRegisteredDll )
       
    92     :   CBaseMtmUiData( aRegisteredDll )
       
    93     {
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------
       
    97 // CMmsMtmUiData::ConstructL
       
    98 // Symbian OS default constructor can leave.
       
    99 // ---------------------------------------------------------
       
   100 //
       
   101 void CMmsMtmUiData::ConstructL()
       
   102     {
       
   103     CBaseMtmUiData::ConstructL();
       
   104     TInt features(0);
       
   105     CRepository* repository = CRepository::NewL( KCRUidMuiuVariation );
       
   106     repository->Get( KMuiuMmsFeatures, features );
       
   107     delete repository;
       
   108 
       
   109     if ( features & KMmsFeatureIdDeliveryStatusDialog ) 
       
   110         {
       
   111         iDeliveryStatusSupported = ETrue;
       
   112         }
       
   113     }
       
   114 
       
   115 
       
   116 // ---------------------------------------------------------
       
   117 // CMmsMtmUiData::NewL
       
   118 // Two-phased constructor.
       
   119 // ---------------------------------------------------------
       
   120 //
       
   121 CMmsMtmUiData* CMmsMtmUiData::NewL( CRegisteredMtmDll& aRegisteredDll )
       
   122     {
       
   123     LOGTEXT( _L8( "MmsMtmUiData::NewL" ) );
       
   124     CMmsMtmUiData* self = new ( ELeave ) CMmsMtmUiData( aRegisteredDll );
       
   125     
       
   126     CleanupStack::PushL( self );
       
   127     self->ConstructL();
       
   128     CleanupStack::Pop(); //self
       
   129 
       
   130     return self;
       
   131     }
       
   132 
       
   133     
       
   134 // ---------------------------------------------------------
       
   135 // CMmsMtmUiData::~CMmsMtmUiData
       
   136 // Destructor.
       
   137 // ---------------------------------------------------------
       
   138 //
       
   139 CMmsMtmUiData::~CMmsMtmUiData()
       
   140     {
       
   141     }
       
   142 
       
   143 
       
   144 // ---------------------------------------------------------
       
   145 // CMmsMtmUiData::OperationSupportedL
       
   146 // ---------------------------------------------------------
       
   147 //
       
   148 TInt CMmsMtmUiData::OperationSupportedL(
       
   149     TInt aFunctionId,
       
   150     const TMsvEntry& aContext ) const
       
   151     {
       
   152     if ( aFunctionId == KMtmUiFunctionDeliveryStatus )
       
   153         {
       
   154         if (    iDeliveryStatusSupported
       
   155             &&  ( aContext.iMtmData2 & KMmsDeliveryStatusMask) != KMmsDeliveryStatusNotRequested 
       
   156             &&  aContext.iType == KUidMsvMessageEntry )
       
   157             {
       
   158             LOGTEXT( _L8( "MmsMtmUiData - Delivery Status supported" ) );
       
   159             return 0;   
       
   160             }
       
   161         LOGTEXT( _L8( "MmsMtmUiData - Delivery Status not supported" ) );
       
   162         return R_EIK_TBUF_NOT_AVAILABLE; 
       
   163         }
       
   164     // Only Message Info for messages is a supported operation
       
   165     else if ( aFunctionId == KMtmUiFunctionMessageInfo )
       
   166         {
       
   167         if ( aContext.iType == KUidMsvMessageEntry )
       
   168             {
       
   169             LOGTEXT( _L8( "MmsMtmUiData - Operation Message Info supported" ) );
       
   170             return 0;
       
   171             }
       
   172         LOGTEXT( _L8( "MmsMtmUiData - Operation Message Info not supported" ) );
       
   173         return R_EIK_TBUF_NOT_AVAILABLE; 
       
   174         }
       
   175 
       
   176     LOGTEXT( _L8( "MmsMtmUiData - Unknown operation not supported" ) );
       
   177     return R_EIK_TBUF_NOT_AVAILABLE;
       
   178     }
       
   179 
       
   180 
       
   181 // ---------------------------------------------------------
       
   182 // CMmsMtmUiData::QueryCapability
       
   183 // The default UI capability checker (UI MTM may have also minimal
       
   184 // UI specific checks also)
       
   185 // ---------------------------------------------------------
       
   186 //
       
   187 TInt CMmsMtmUiData::QueryCapability(
       
   188     TUid aFunctionId,
       
   189     TInt& aResponse ) const
       
   190     {
       
   191     TInt error = KErrNone;
       
   192 
       
   193     switch ( aFunctionId.iUid )
       
   194         {
       
   195         // Supported:
       
   196         case KUidMtmQueryMaxTotalMsgSizeValue:
       
   197             aResponse = KMaxTInt;
       
   198             break;
       
   199         case KUidMsvMtmQueryViewerUidValue:
       
   200             aResponse = KMmsViewer;
       
   201             break;
       
   202         case KUidMsvMtmQuerySupportLinks: // flow through
       
   203         case KUidMsvMtmUiQueryMessagingInitialisation: // flow through. This is also in UI MTM!
       
   204         case KUidMsvMtmQueryFactorySettings: // This is also in UI MTM!
       
   205         case KUidMtmQuerySupportAttachmentsValue:
       
   206         case KUidMtmQueryCanSendMsgValue:
       
   207         case KUidMtmQueryCanReceiveMsgValue:
       
   208         case KUidMsvMtmQueryMessageInfo:
       
   209             break;
       
   210 
       
   211         default:
       
   212             // All others - Not Supported. At least these:
       
   213             //KUidMtmQuerySupportedBodyValue: text part(s) are attachments!
       
   214             //KUidMtmQueryMaxBodySizeValue: texts part(s) are attachments!
       
   215             //KUidMtmQuerySupportSubjectValue: subject is supported in Viewer, but not in Editor
       
   216             //KUidMsvMtmUiQueryCanPrintPreviewMsgValue: no printing in Series 60
       
   217             //KUidMsvMtmUiQueryCanPrintMsgValue: no printing in Series 60
       
   218             //KUidMtmQueryMaxRecipientCountValue
       
   219             //KUidMtmQuerySupportsBioMsgValue
       
   220             //KUidMtmQuerySendAsRequiresRenderedImageValue
       
   221             //KUidMtmQuerySendAsRenderingUidValue
       
   222             //KUidMsvMtmUiQueryExtendedOpenProgress
       
   223             //KUidMsvMtmUiQueryExtendedGetMailProgress
       
   224             //KUidMsvMtmUiQueryConnectionOrientedServices
       
   225             //KUidMsvMtmUiQueryServiceAttributes
       
   226             //KUidMsvMtmUiQueryCanGetNew
       
   227             //KUidMsvMtmUiQueryCanOpenServiceOnAction
       
   228             //KUidMtmQueryOffLineAllowedValue
       
   229             //KUidMtmQuerySupportsSchedulingValue
       
   230             //KUidMtmQuerySupportsFolderValue
       
   231 
       
   232             error = KErrNotSupported;
       
   233         }
       
   234     LOGTEXT2( _L16( "MmsMtmUiData - QueryCapability: %d" ), error );
       
   235     return error;   
       
   236     }
       
   237 
       
   238 
       
   239 
       
   240 // ---------------------------------------------------------
       
   241 // CMmsMtmUiData::ContextIcon
       
   242 // Returns the array of icons relevant to given entry
       
   243 // ---------------------------------------------------------
       
   244 //
       
   245 const CMmsMtmUiData::CBitmapArray& CMmsMtmUiData::ContextIcon(
       
   246     const TMsvEntry& aContext,
       
   247     TInt /*aStateFlags*/ ) const
       
   248     {
       
   249     //    Return the set of icons (i.e. different sizes) appropriate to the current context
       
   250     __ASSERT_DEBUG( aContext.iMtm == KUidMsgTypeMultimedia, Panic( EMmsWrongMtm ) );
       
   251     __ASSERT_DEBUG( aContext.iType.iUid != KUidMsvFolderEntryValue, Panic( EMmsFoldersNotSupported ) );
       
   252     __ASSERT_DEBUG( aContext.iType.iUid != KUidMsvAttachmentEntryValue, Panic( EMmsNoIconForAttachment ) );
       
   253 
       
   254     TInt bmpIndex(0);   
       
   255     // Changes for the cr # 401-1806
       
   256     TRAP_IGNORE( FeatureManager::InitializeLibL() );
       
   257     if( FeatureManager::FeatureSupported( KFeatureIdMmsPostcard ) && CMmsMtmUi::IsPostcard( aContext  ) )
       
   258         // Postcard does not request delivery report
       
   259         {
       
   260         bmpIndex = KMmsPostcardIconIndex;
       
   261         LOGTEXT( _L8( "MmsMtmUiData::ContextIcon() - bmpIndex = KMmsPostcardIconIndex;" ) );
       
   262         }
       
   263 	// Context icon is called for read/unread audio message icons
       
   264    	else if( FeatureManager::FeatureSupported( KFeatureIdAudioMessaging ) && CMmsMtmUi::IsAudioMessage( aContext ) )
       
   265 		{
       
   266 		bmpIndex = aContext.Unread() ? KAmsNotListenedIconIndex : KAmsListenedIconIndex;
       
   267 		}
       
   268    		
       
   269     // Context icon is called for read/unread icons    
       
   270     else
       
   271         {
       
   272         bmpIndex = aContext.Unread() ? KMmsUnreadIconIndex : KMmsReadIconIndex;
       
   273         LOGTEXT( _L8( "MmsMtmUiData::ContextIcon() - bmpIndex = aContext.Unread() ? KMmsUnreadIconIndex : KMmsReadIconIndex;" ) );
       
   274         }
       
   275     FeatureManager::UnInitializeLib();
       
   276     return *iIconArrays->At( bmpIndex );
       
   277     }
       
   278 
       
   279 // ---------------------------------------------------------
       
   280 // CMmsMtmUiData::CanCreateEntryL
       
   281 // ---------------------------------------------------------
       
   282 //
       
   283 TBool CMmsMtmUiData::CanCreateEntryL(
       
   284     const TMsvEntry& /*aParent*/,
       
   285     TMsvEntry& /*aNewEntry*/,
       
   286     TInt& aReasonResourceId ) const
       
   287     {
       
   288     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   289     return EFalse;
       
   290     }
       
   291 
       
   292 // ---------------------------------------------------------
       
   293 // CMmsMtmUiData::CanOpenEntryL
       
   294 // ---------------------------------------------------------
       
   295 //
       
   296 TBool CMmsMtmUiData::CanOpenEntryL(
       
   297     const TMsvEntry& /*aContext*/,
       
   298     TInt& aReasonResourceId ) const
       
   299     {
       
   300     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   301     return EFalse;
       
   302     }
       
   303 
       
   304 // ---------------------------------------------------------
       
   305 // CMmsMtmUiData::CanCloseEntryL
       
   306 // ---------------------------------------------------------
       
   307 //
       
   308 TBool CMmsMtmUiData::CanCloseEntryL(
       
   309     const TMsvEntry& /*aContext*/,
       
   310     TInt& aReasonResourceId ) const
       
   311     {
       
   312     aReasonResourceId=R_EIK_TBUF_NOT_AVAILABLE;
       
   313     return EFalse;
       
   314     }
       
   315 
       
   316 // ---------------------------------------------------------
       
   317 // CMmsMtmUiData::CanViewEntryL
       
   318 // ---------------------------------------------------------
       
   319 //
       
   320 TBool CMmsMtmUiData::CanViewEntryL(
       
   321     const TMsvEntry& /*aContext*/,
       
   322     TInt& aReasonResourceId ) const
       
   323     {
       
   324     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   325     return EFalse;
       
   326     }
       
   327 
       
   328 // ---------------------------------------------------------
       
   329 // CMmsMtmUiData::CanEditEntryL
       
   330 // ---------------------------------------------------------
       
   331 //
       
   332 TBool CMmsMtmUiData::CanEditEntryL(
       
   333     const TMsvEntry& /*aContext*/,
       
   334     TInt& aReasonResourceId ) const
       
   335     {
       
   336     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   337     return EFalse;
       
   338     }
       
   339 
       
   340 // ---------------------------------------------------------
       
   341 // CMmsMtmUiData::CanDeleteFromEntryL
       
   342 // ---------------------------------------------------------
       
   343 //
       
   344 TBool CMmsMtmUiData::CanDeleteFromEntryL(
       
   345     const TMsvEntry& /*aContext*/,
       
   346     TInt& aReasonResourceId ) const
       
   347     {
       
   348     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   349     return EFalse;
       
   350     }
       
   351 
       
   352 // ---------------------------------------------------------
       
   353 // CMmsMtmUiData::CanDeleteServiceL
       
   354 // ---------------------------------------------------------
       
   355 //
       
   356 TBool CMmsMtmUiData::CanDeleteServiceL(
       
   357     const TMsvEntry& /*aService*/,
       
   358     TInt& aReasonResourceId ) const
       
   359     {
       
   360     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   361     return EFalse;
       
   362     }
       
   363 
       
   364 // ---------------------------------------------------------
       
   365 // CMmsMtmUiData::CanCopyMoveToEntryL
       
   366 // ---------------------------------------------------------
       
   367 //
       
   368 TBool CMmsMtmUiData::CanCopyMoveToEntryL(
       
   369     const TMsvEntry& /*aContext*/,
       
   370     TInt& aReasonResourceId ) const
       
   371     {
       
   372     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   373     return EFalse;
       
   374     }
       
   375 
       
   376 // ---------------------------------------------------------
       
   377 // CMmsMtmUiData::CanCopyMoveFromEntryL
       
   378 // ---------------------------------------------------------
       
   379 //
       
   380 TBool CMmsMtmUiData::CanCopyMoveFromEntryL(
       
   381     const TMsvEntry& /*aContext*/,
       
   382     TInt& aReasonResourceId ) const
       
   383     {
       
   384     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   385     return EFalse;
       
   386     }
       
   387 
       
   388 // ---------------------------------------------------------
       
   389 // CMmsMtmUiData::CanReplyToEntryL
       
   390 // ---------------------------------------------------------
       
   391 //
       
   392 TBool CMmsMtmUiData::CanReplyToEntryL(
       
   393     const TMsvEntry& aContext,
       
   394     TInt& aReasonResourceId ) const
       
   395     {
       
   396     __ASSERT_DEBUG( aContext.iMtm == KUidMsgTypeMultimedia, Panic( EMmsWrongMtm ) );
       
   397     if ( aContext.iMtm == KUidMsgTypeMultimedia
       
   398         && aContext.iType == KUidMsvMessageEntry
       
   399         && aContext.ReadOnly()
       
   400         && aContext.iDetails.Length()
       
   401         && !CMmsMtmUi::IsUpload( aContext )
       
   402         && static_cast<const TMmsMsvEntry&>( aContext ).IsMobileTerminated() )
       
   403         {
       
   404         return ETrue;
       
   405         }
       
   406     else
       
   407         {
       
   408         aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   409         return EFalse;
       
   410         }
       
   411     }
       
   412 
       
   413 // ---------------------------------------------------------
       
   414 // CMmsMtmUiData::CanForwardEntryL
       
   415 // ---------------------------------------------------------
       
   416 //
       
   417 TBool CMmsMtmUiData::CanForwardEntryL(
       
   418     const TMsvEntry& /*aContext*/,
       
   419     TInt& aReasonResourceId ) const
       
   420     {
       
   421     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   422     return EFalse;
       
   423     }
       
   424 
       
   425 // ---------------------------------------------------------
       
   426 // CMmsMtmUiData::CanCancelL
       
   427 // ---------------------------------------------------------
       
   428 //
       
   429 TBool CMmsMtmUiData::CanCancelL(
       
   430     const TMsvEntry& /*aContext*/,
       
   431     TInt& aReasonResourceId ) const
       
   432     {
       
   433     aReasonResourceId = R_EIK_TBUF_NOT_AVAILABLE;
       
   434     return EFalse;
       
   435     }
       
   436 
       
   437 // ---------------------------------------------------------
       
   438 // CMmsMtmUiData::StatusTextL
       
   439 // Shows the text in outbox
       
   440 // ---------------------------------------------------------
       
   441 //
       
   442 HBufC* CMmsMtmUiData::StatusTextL( const TMsvEntry& aContext ) const
       
   443     {
       
   444     TInt res = 0;
       
   445     TUint sendingState = aContext.SendingState();
       
   446 
       
   447     switch ( sendingState )
       
   448         {
       
   449         case KMsvSendStateFailed:
       
   450             res = R_MMS_OUTBOX_STATUS_FAILED;
       
   451             break;
       
   452 
       
   453         case KMsvSendStateSent:             // sent -> moving to sent items
       
   454         case KMsvSendStateNotApplicable:    // not set in mmsengine
       
   455             res = 0;
       
   456             break;
       
   457 
       
   458         case KMsvSendStateWaiting:
       
   459         case KMsvSendStateScheduled:        // not set in mmsengine
       
   460             res = R_MMS_OUTBOX_STATUS_WAITING;
       
   461             break;
       
   462 
       
   463         case KMsvSendStateSending:          // sending in progress.
       
   464             res = R_MMS_OUTBOX_STATUS_SENDING;
       
   465             break;
       
   466 
       
   467         case KMsvSendStateUponRequest:      // not set in mmsengine
       
   468         case KMsvSendStateSuspended:        // not set in mmsengine
       
   469             res = R_MMS_OUTBOX_STATUS_SUSPENDED;
       
   470             break;
       
   471 
       
   472         case KMsvSendStateResend:           // not set in mmsengine
       
   473             res = R_MMS_OUTBOX_STATUS_RESEND;
       
   474             break;
       
   475 
       
   476         case KMsvSendStateUnknown:
       
   477         default:
       
   478             // This state is set at start - ignore
       
   479             break;
       
   480         }
       
   481     
       
   482     if ( !res )
       
   483         {
       
   484         return HBufC::NewL( 0 );
       
   485         }
       
   486 
       
   487     if ( sendingState == KMsvSendStateResend )
       
   488         {
       
   489         // Time is UTC time
       
   490         TTime resendTime = aContext.iDate;
       
   491         CMmsMtmUi::ConvertUtcToLocalTime( resendTime );
       
   492         
       
   493         HBufC* format = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO );
       
   494         TBuf<KDateSize> bufTimeFormatted;
       
   495         resendTime.FormatL( bufTimeFormatted, format->Des() );
       
   496 
       
   497         CleanupStack::PopAndDestroy(); //format
       
   498 
       
   499         AknTextUtils::LanguageSpecificNumberConversion( bufTimeFormatted );
       
   500         return StringLoader::LoadL( res, bufTimeFormatted );
       
   501         }
       
   502     else
       
   503         {
       
   504         return StringLoader::LoadL( res );
       
   505         }
       
   506     }
       
   507 
       
   508 // ---------------------------------------------------------
       
   509 // CMmsMtmUiData::PopulateArraysL
       
   510 // Populate MTM specific arrays: functions and bitmaps
       
   511 // ---------------------------------------------------------
       
   512 //
       
   513 void CMmsMtmUiData::PopulateArraysL()
       
   514     {
       
   515     ReadFunctionsFromResourceFileL( R_MMS_MTM_FUNCTION_ARRAY );
       
   516     // Populate bitmap array
       
   517     TParse fileParse;
       
   518     fileParse.Set( KMmsMtmUiBitmapFile, &KDC_APP_BITMAP_DIR, NULL );
       
   519     CreateSkinnedBitmapsL(
       
   520         fileParse.FullName(), 
       
   521         EMbmMuiuQgn_prop_mce_mms_read, 
       
   522         EMbmMuiuQgn_prop_mce_mms_unread_mask );
       
   523     CreateSkinnedBitmapsL(
       
   524         fileParse.FullName(), 
       
   525         EMbmMuiuQgn_prop_mce_postcard, 
       
   526         EMbmMuiuQgn_prop_mce_postcard_mask );
       
   527         
       
   528     CreateSkinnedBitmapsL(
       
   529         fileParse.FullName(), 
       
   530         EMbmMuiuQgn_prop_mce_audio,
       
   531         EMbmMuiuQgn_prop_mce_audio_unread_mask );   
       
   532     }
       
   533 
       
   534 // ---------------------------------------------------------
       
   535 // CMmsMtmUiData::CreateSkinnedBitmapsL
       
   536 // Populate MTM specific bitmaps
       
   537 // ---------------------------------------------------------
       
   538 //
       
   539 void CMmsMtmUiData::CreateSkinnedBitmapsL( const TDesC& aBitmapFile,
       
   540                                           TInt aStartBitmap,
       
   541                                           TInt aEndBitmap )
       
   542     {
       
   543     CBitmapArray* array = NULL;
       
   544     for ( TInt i = aStartBitmap; i <= aEndBitmap; i += KMmsNumberOfZoomStates )
       
   545         {
       
   546         array = new( ELeave ) CArrayPtrFlat<CFbsBitmap>( KMmsNumberOfZoomStates );
       
   547         CleanupStack::PushL( array );
       
   548 
       
   549         TAknsItemID skinId;
       
   550         switch ( i )
       
   551             {
       
   552             case EMbmMuiuQgn_prop_mce_mms_read:
       
   553                 {
       
   554                 skinId.Set( KAknsIIDQgnPropMceMmsRead );
       
   555                 break;
       
   556                 }
       
   557             case EMbmMuiuQgn_prop_mce_mms_unread:
       
   558                 {
       
   559                 skinId.Set( KAknsIIDQgnPropMceMmsUnread );
       
   560                 break;
       
   561                 }
       
   562             case EMbmMuiuQgn_prop_mce_postcard:
       
   563                 {
       
   564                 skinId.Set( KAknsIIDQgnPropMcePostcard );
       
   565                 break;
       
   566                 }            
       
   567             case EMbmMuiuQgn_prop_mce_audio:
       
   568 				{
       
   569             	skinId.Set( KAknsIIDQgnPropMceAudio );
       
   570                 break;
       
   571 				}
       
   572            	case EMbmMuiuQgn_prop_mce_audio_unread:
       
   573 				{
       
   574             	skinId.Set( KAknsIIDQgnPropMceAudioUnread );
       
   575                 break;
       
   576 				}
       
   577             default:
       
   578                 {
       
   579                 User::Leave( KErrNotFound );
       
   580                 break;
       
   581                 }
       
   582             }
       
   583 
       
   584         CFbsBitmap* bitmap = NULL;
       
   585         CFbsBitmap* mask = NULL;
       
   586         AknsUtils::CreateIconL(
       
   587             AknsUtils::SkinInstance(),
       
   588             skinId,
       
   589             bitmap,
       
   590             mask,
       
   591             aBitmapFile,
       
   592             i,
       
   593             i + 1 );
       
   594 
       
   595         CleanupStack::PushL( bitmap );
       
   596         CleanupStack::PushL( mask );        
       
   597         array->AppendL( bitmap );
       
   598         CleanupStack::Pop();
       
   599         array->AppendL( mask );
       
   600         CleanupStack::Pop();
       
   601 
       
   602         iIconArrays->AppendL( array );
       
   603         CleanupStack::Pop();// array
       
   604         }
       
   605     }
       
   606 
       
   607 // ---------------------------------------------------------
       
   608 // CMmsMtmUiData::GetResourceFileName
       
   609 // Self explanatory.
       
   610 // ---------------------------------------------------------
       
   611 //
       
   612 void CMmsMtmUiData::GetResourceFileName( TFileName& aFileName ) const
       
   613     {
       
   614     aFileName = KMmsMtmResourceFile; 
       
   615     }
       
   616 
       
   617 
       
   618 // ================= OTHER EXPORTED FUNCTIONS ==============
       
   619 
       
   620 //  End of File