ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp
changeset 59 16ed8d08d0b1
parent 54 997a02608b3a
child 65 478bc57ad291
equal deleted inserted replaced
54:997a02608b3a 59:16ed8d08d0b1
  1083         else
  1083         else
  1084             {
  1084             {
  1085             childPart = GetMessagePartL( (*cEntry)[0].Id(), aMailBoxId, aMessageId );
  1085             childPart = GetMessagePartL( (*cEntry)[0].Id(), aMailBoxId, aMessageId );
  1086             if( childPart )
  1086             if( childPart )
  1087                 {
  1087                 {
  1088                 aParts.Append( childPart );
  1088                 aParts.AppendL( childPart );
  1089                 }
  1089                 }
  1090             }
  1090             }
  1091         }
  1091         }
  1092     CleanupStack::PopAndDestroy( cEntry );
  1092     CleanupStack::PopAndDestroy( cEntry );
  1093     }
  1093     }
  1145             }
  1145             }
  1146 
  1146 
  1147         // Insert the new child part to the result array
  1147         // Insert the new child part to the result array
  1148         if ( childPart )
  1148         if ( childPart )
  1149             {
  1149             {
  1150             aParts.Insert( childPart, position );
  1150             aParts.InsertL( childPart, position );
  1151             childPart = NULL;
  1151             childPart = NULL;
  1152             }
  1152             }
  1153         }
  1153         }
  1154     CleanupStack::PopAndDestroy( cEntry );
  1154     CleanupStack::PopAndDestroy( cEntry );
  1155     }
  1155     }
  1540             {
  1540             {
  1541             CImMimeHeader* mimeHeader = CImMimeHeader::NewLC();
  1541             CImMimeHeader* mimeHeader = CImMimeHeader::NewLC();
  1542             mimeHeader->RestoreL( *store );
  1542             mimeHeader->RestoreL( *store );
  1543 
  1543 
  1544             TInt count = mimeHeader->ContentTypeParams().MdcaCount();
  1544             TInt count = mimeHeader->ContentTypeParams().MdcaCount();
  1545             INFO_1("# of CT params: %d", count);
  1545             //INFO_1("# of CT params: %d", count);
  1546             for ( TInt i = 0; i < count; i++ )
  1546             for ( TInt i = 0; i < count; i++ )
  1547                 {
  1547                 {
  1548                 TPtrC8 key8 = mimeHeader->ContentTypeParams().MdcaPoint( i );
  1548                 TPtrC8 key8 = mimeHeader->ContentTypeParams().MdcaPoint( i );
  1549                 INFO_1("%S", &key8);
  1549                 //INFO_1("%S", &key8);
  1550                 TPtr16 keyUppercase16 = HBufC::NewLC( key8.Length() )->Des();
  1550                 TPtr16 keyUppercase16 = HBufC::NewLC( key8.Length() )->Des();
  1551                 keyUppercase16.Copy( key8 );
  1551                 keyUppercase16.Copy( key8 );
  1552                 keyUppercase16.UpperCase();
  1552                 keyUppercase16.UpperCase();
  1553                 if ( keyUppercase16.Compare( KCharsetTag ) == 0 &&
  1553                 if ( keyUppercase16.Compare( KCharsetTag ) == 0 &&
  1554                      count >= i+1 ) // prevent possible indexing over array limits
  1554                      count >= i+1 ) // prevent possible indexing over array limits