diff -r 05bc53fe583b -r 83ca720e2b9a dbcreator/commsdatcreator/Src/cdcprocessordn.cpp --- a/dbcreator/commsdatcreator/Src/cdcprocessordn.cpp Tue Aug 31 15:35:44 2010 +0300 +++ b/dbcreator/commsdatcreator/Src/cdcprocessordn.cpp Wed Sep 01 12:23:51 2010 +0100 @@ -145,16 +145,7 @@ break; } } - if (dnId == -1) - { - iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName ); - CLOG_WRITE( "Destinaton created without dnId."); - } - else - { - iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName, dnId); - CLOG_WRITE_FORMAT( "Destinaton created. dnId:%d", dnId); - } + CreateDestination(dnId); } HBufC *destName( NULL ); @@ -187,6 +178,17 @@ } } break; + case EDN_Icon: + { + TPtrC16 iconPtr = ptrTag->Right( ptrTag->Length() ); + TLex16 lex( iconPtr ); + TUint32 icon( 0 ); + if ( lex.Val( icon, EDecimal ) == KErrNone ) + { + iDestination.SetIconL( icon ); + } + } + break; case EDN_Metadata: { if( !ptrTag->Compare( KPurposeUnknown ) ) @@ -457,4 +459,34 @@ CleanupStack::PopAndDestroy( tmp ); // Removes tmp. } +// --------------------------------------------------------- +// CProcessorDN::CreateDestination +// --------------------------------------------------------- +// +void CProcessorDN::CreateDestination(TInt aDnId) + { + if (aDnId == -1) + { + iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName ); + CLOG_WRITE( "Destinaton created without dnId."); + } + else + { + TRAPD( err, iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName, aDnId ) ); + switch ( err ) + { + case KErrNone: + CLOG_WRITE_FORMAT( "Destination created. dnId:%d", aDnId); + break; + case KErrAlreadyExists: + CLOG_WRITE_FORMAT( "Destination already exists dnId:%d. Creation failed.", aDnId); + iDestination = iCmManager->DestinationL( aDnId ); + break; + default: + CLOG_WRITE( "Destination reading failed."); + break; + } + } + } + // End of File.