equal
deleted
inserted
replaced
143 User::Leave(err); |
143 User::Leave(err); |
144 } |
144 } |
145 break; |
145 break; |
146 } |
146 } |
147 } |
147 } |
148 if (dnId == -1) |
148 CreateDestination(dnId); |
149 { |
|
150 iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName ); |
|
151 CLOG_WRITE( "Destinaton created without dnId."); |
|
152 } |
|
153 else |
|
154 { |
|
155 iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName, dnId); |
|
156 CLOG_WRITE_FORMAT( "Destinaton created. dnId:%d", dnId); |
|
157 } |
|
158 } |
149 } |
159 |
150 |
160 HBufC *destName( NULL ); |
151 HBufC *destName( NULL ); |
161 TInt priority = 0; |
152 TInt priority = 0; |
162 RPointerArray<HBufC> names; |
153 RPointerArray<HBufC> names; |
182 iDestinationDropped = ETrue; |
173 iDestinationDropped = ETrue; |
183 } |
174 } |
184 else |
175 else |
185 { |
176 { |
186 destName = ptrTag->AllocLC(); |
177 destName = ptrTag->AllocLC(); |
|
178 } |
|
179 } |
|
180 break; |
|
181 case EDN_Icon: |
|
182 { |
|
183 TPtrC16 iconPtr = ptrTag->Right( ptrTag->Length() ); |
|
184 TLex16 lex( iconPtr ); |
|
185 TUint32 icon( 0 ); |
|
186 if ( lex.Val( icon, EDecimal ) == KErrNone ) |
|
187 { |
|
188 iDestination.SetIconL( icon ); |
187 } |
189 } |
188 } |
190 } |
189 break; |
191 break; |
190 case EDN_Metadata: |
192 case EDN_Metadata: |
191 { |
193 { |
455 CLOG_WRITE( "\t \r\n" ) |
457 CLOG_WRITE( "\t \r\n" ) |
456 |
458 |
457 CleanupStack::PopAndDestroy( tmp ); // Removes tmp. |
459 CleanupStack::PopAndDestroy( tmp ); // Removes tmp. |
458 } |
460 } |
459 |
461 |
|
462 // --------------------------------------------------------- |
|
463 // CProcessorDN::CreateDestination |
|
464 // --------------------------------------------------------- |
|
465 // |
|
466 void CProcessorDN::CreateDestination(TInt aDnId) |
|
467 { |
|
468 if (aDnId == -1) |
|
469 { |
|
470 iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName ); |
|
471 CLOG_WRITE( "Destinaton created without dnId."); |
|
472 } |
|
473 else |
|
474 { |
|
475 TRAPD( err, iDestination = iCmManager->CreateDestinationL( KDefaultDestinationName, aDnId ) ); |
|
476 switch ( err ) |
|
477 { |
|
478 case KErrNone: |
|
479 CLOG_WRITE_FORMAT( "Destination created. dnId:%d", aDnId); |
|
480 break; |
|
481 case KErrAlreadyExists: |
|
482 CLOG_WRITE_FORMAT( "Destination already exists dnId:%d. Creation failed.", aDnId); |
|
483 iDestination = iCmManager->DestinationL( aDnId ); |
|
484 break; |
|
485 default: |
|
486 CLOG_WRITE( "Destination reading failed."); |
|
487 break; |
|
488 } |
|
489 } |
|
490 } |
|
491 |
460 // End of File. |
492 // End of File. |