ipsservices/ipssossettings/src/ipssetdataapi.cpp
branchRCL_3
changeset 80 726fba06891a
parent 70 968773a0b6ef
equal deleted inserted replaced
73:c8382f7b54ef 80:726fba06891a
   662         TImImap4GetPartialMailInfo& aInfo, CImImap4Settings& aImap4Settings )
   662         TImImap4GetPartialMailInfo& aInfo, CImImap4Settings& aImap4Settings )
   663 
   663 
   664     {
   664     {
   665     FUNC_LOG;
   665     FUNC_LOG;
   666     TInt sizeLimit = aImap4Settings.BodyTextSizeLimit();
   666     TInt sizeLimit = aImap4Settings.BodyTextSizeLimit();
   667     
   667 
   668     TInt limit(KMaxTInt);
   668     TInt limit( KMaxTInt );
   669     CRepository* centRep = NULL;
   669     CRepository* centRep = NULL;
   670     TRAP_IGNORE( centRep = CRepository::NewL( KFreestyleEmailCenRep ) );
   670     TRAP_IGNORE( centRep = CRepository::NewL( KFreestyleEmailCenRep ) );
   671     if (NULL != centRep)
   671     if ( NULL != centRep )
   672         {
   672         {
   673         //not necessary to push centRep as no leave function is called
   673         // not necessary to push centRep as no leave function is called
   674         TInt err = centRep->Get(KFreestyleMaxBodySize, limit);
   674         TInt err = centRep->Get( KFreestyleMaxBodySize, limit );
   675         limit *= KKilo;
   675         limit *= KKilo;
   676         if (limit == 0 || err)
   676         if ( limit == 0 || err )
   677             {
   677             {
   678             limit = KMaxTInt;
   678             limit = KMaxTInt;
   679             }
   679             }
   680         //free
   680         // free
   681         delete centRep;
   681         delete centRep;
   682         centRep = NULL;		
   682         centRep = NULL;		
   683         }//end if (NULL != centRep)
   683         }
   684 
   684 
   685     if ( sizeLimit == KIpsSetDataHeadersOnly )
   685     if ( sizeLimit == KIpsSetDataHeadersOnly )
   686         {
   686         {
   687         aInfo.iTotalSizeLimit = KIpsSetDataHeadersOnly;
   687         aInfo.iTotalSizeLimit = KIpsSetDataHeadersOnly;
   688         }
   688         }