emailservices/emailframework/src/CFSMailBrand.cpp
changeset 18 578830873419
parent 0 8466d47a6819
child 20 ecc8def7944a
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
    14 * Description: This file implements class CFSMailBrand.
    14 * Description: This file implements class CFSMailBrand.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
       
    19 #include <nmcommonheaders.h>
    19 #include "emailtrace.h"
    20 #include "emailtrace.h"
    20 #include <barsread.h>
    21 #include <barsread.h>
    21 #include <AknIconUtils.h>
       
    22 #include <gulicon.h>
    22 #include <gulicon.h>
    23 #include <centralrepository.h>
    23 #include <centralrepository.h>
    24 //<cmail>
    24 //<cmail>
    25 #include "FreestyleEmailCenRepKeys.h"
    25 //#include "freestyleemailcenrepkeys.h"
    26 //</cmail>
    26 //</cmail>
    27 
    27 
    28 #include "CFSMailBrand.h"
    28 #include "CFSMailBrand.h"
    29 
    29 
    30 const TInt KElementArrayGranularity = 5;
    30 const TInt KElementArrayGranularity = 5;
    31 const TInt KMaxStringLenFromCenrep = 256;
       
    32 const TInt KMaxDesLen = 256;
    31 const TInt KMaxDesLen = 256;
    33 _LIT(KSpace, " ");
    32 _LIT(KSpace, " ");
    34 // -----------------------------------------------------------------------------
    33 // -----------------------------------------------------------------------------
    35 // CFSMailBrand::NewL
    34 // CFSMailBrand::NewL
    36 // -----------------------------------------------------------------------------
    35 // -----------------------------------------------------------------------------
    65 // -----------------------------------------------------------------------------
    64 // -----------------------------------------------------------------------------
    66 // CFSMailBrand::ConstructFromCenrepL
    65 // CFSMailBrand::ConstructFromCenrepL
    67 // -----------------------------------------------------------------------------
    66 // -----------------------------------------------------------------------------
    68 void CFSMailBrand::ConstructFromCenrepL( )
    67 void CFSMailBrand::ConstructFromCenrepL( )
    69     {
    68     {
       
    69     /*
    70     FUNC_LOG;
    70     FUNC_LOG;
    71     
    71     
    72     TBuf<KMaxStringLenFromCenrep> tBuf; // Temporary buffer
    72     TBuf<KMaxStringLenFromCenrep> tBuf; // Temporary buffer
    73     HBufC*    mailboxName;
    73     HBufC*    mailboxName;
    74 
    74 
   124             iTextElements->AppendL( newMailboxNameElement );
   124             iTextElements->AppendL( newMailboxNameElement );
   125             }
   125             }
   126         CleanupStack::PopAndDestroy( mailboxName );
   126         CleanupStack::PopAndDestroy( mailboxName );
   127         CleanupStack::PopAndDestroy( repository );
   127         CleanupStack::PopAndDestroy( repository );
   128         }
   128         }
       
   129         */
   129    }
   130    }
   130 
   131 
   131 // -----------------------------------------------------------------------------
   132 // -----------------------------------------------------------------------------
   132 // CFSMailBrand::ConstructFromResourceL
   133 // CFSMailBrand::ConstructFromResourceL
   133 // -----------------------------------------------------------------------------
   134 // -----------------------------------------------------------------------------
   302             Dll::FileName( dllFileName );
   303             Dll::FileName( dllFileName );
   303 		 	TParse parse;
   304 		 	TParse parse;
   304 		    User::LeaveIfError( parse.Set( *iIconFilePath, &dllFileName, NULL) );
   305 		    User::LeaveIfError( parse.Set( *iIconFilePath, &dllFileName, NULL) );
   305 		    TFileName iconFileName( parse.FullName() );
   306 		    TFileName iconFileName( parse.FullName() );
   306                 
   307                 
   307                 
   308             // Get icon and mask with above info
   308             AknIconUtils::CreateIconLC( icon,
   309 		    
   309                                         mask,
       
   310                                         iconFileName,
       
   311                                         element.iIconId,
       
   312                                         element.iMaskId );
       
   313             CGulIcon* gulIcon = CGulIcon::NewL( icon, mask );
   310             CGulIcon* gulIcon = CGulIcon::NewL( icon, mask );
   314 
   311 
   315             CleanupStack::Pop( 2 ); // icon, mask
   312             CleanupStack::Pop( 2 ); // icon, mask
   316             
   313             
   317             return gulIcon;
   314             return gulIcon;