76 { |
84 { |
77 MSRPLOG("CMSRPSessionImplementation::Ctor"); |
85 MSRPLOG("CMSRPSessionImplementation::Ctor"); |
78 } |
86 } |
79 |
87 |
80 |
88 |
81 void CMSRPSessionImplementation::ConstructL( const TUint aIapId ) |
89 void CMSRPSessionImplementation::ConstructL( const TUint aIapId, const TDesC8& aSessionId ) |
82 { |
90 { |
83 MSRPLOG("CMSRPSessionImplementation::ConstructL enter"); |
91 MSRPLOG("CMSRPSessionImplementation::ConstructL enter"); |
84 |
92 |
85 MSRPStrings::OpenL(); |
93 MSRPStrings::OpenL(); |
86 iMSRPSession = new ( ELeave ) RMSRPSession(); |
94 iMSRPSession = new ( ELeave ) RMSRPSession(); |
87 |
95 |
88 User::LeaveIfError(iMSRPSession->CreateServerSubSession( iRMSRP, aIapId ) ); |
96 User::LeaveIfError(iMSRPSession->CreateServerSubSession( iRMSRP, aIapId, aSessionId ) ); |
89 MSRPLOG("Sub session opened successfully!"); |
97 MSRPLOG("Sub session opened successfully!"); |
90 |
98 |
91 RBuf8 sessionID; |
|
92 sessionID.CreateL( KMaxLengthOfSessionId ); |
|
93 CleanupClosePushL( sessionID ); |
|
94 |
|
95 RBuf8 localHost; |
99 RBuf8 localHost; |
96 localHost.CreateL( KMaxLengthOfHost ); |
100 localHost.CreateL( KMaxLengthOfHost ); |
97 CleanupClosePushL( localHost ); |
101 CleanupClosePushL( localHost ); |
98 |
102 |
99 iMSRPSession->GetLocalPathL( localHost, sessionID ); |
103 iMSRPSession->GetLocalPathL( localHost ); |
100 |
104 |
101 iLocalMsrpPath.CreateL( KMsrpUriScheme, KMsrpFixedLength + localHost.Length() + sessionID.Length() ); |
105 iLocalMsrpPath.CreateL( KMsrpUriScheme, KMsrpFixedLength + localHost.Length() + aSessionId.Length() ); |
102 |
106 |
103 iLocalMsrpPath.Append( localHost ); |
107 iLocalMsrpPath.Append( localHost ); |
104 iLocalMsrpPath.Append( KColon ); |
108 iLocalMsrpPath.Append( KColon ); |
105 iLocalMsrpPath.AppendNum( KMsrpPort ); |
109 iLocalMsrpPath.AppendNum( KMsrpPort ); |
106 iLocalMsrpPath.Append( KForwardSlash ); |
110 iLocalMsrpPath.Append( KForwardSlash ); |
107 iLocalMsrpPath.Append( sessionID ); |
111 iLocalMsrpPath.Append( aSessionId ); |
108 iLocalMsrpPath.Append( KSemicolon ); |
112 iLocalMsrpPath.Append( KSemicolon ); |
109 iLocalMsrpPath.Append( KTransport ); |
113 iLocalMsrpPath.Append( KTransport ); |
110 |
114 |
111 |
115 |
112 iConnectionListener = CMSRPConnectionListener::NewL( |
116 iConnectionListener = CMSRPConnectionListener::NewL( |
113 *this, *iMSRPSession ); |
117 *this, *iMSRPSession ); |
|
118 iSendResultListener = CMSRPSendResultListener::NewL( |
|
119 *this, *iMSRPSession, aSessionId ); |
114 iIncomingListener = CMSRPIncomingListener::NewL( |
120 iIncomingListener = CMSRPIncomingListener::NewL( |
115 *this, *iMSRPSession ); |
121 *this, *iMSRPSession ); |
116 iSendResultListener = CMSRPSendResultListener::NewL( |
|
117 *this, *iMSRPSession, sessionID ); |
|
118 |
122 |
119 CleanupStack::PopAndDestroy(2); //sessionID and localHost |
123 CleanupStack::PopAndDestroy( ); // localHost |
120 MSRPLOG("CMSRPSessionImplementation::ConstructL exit"); |
124 MSRPLOG("CMSRPSessionImplementation::ConstructL exit"); |
121 } |
125 } |
122 |
126 |
123 |
127 |
124 CMSRPSessionImplementation::~CMSRPSessionImplementation() |
128 CMSRPSessionImplementation::~CMSRPSessionImplementation() |
125 { |
129 { |
126 MSRPLOG("CMSRPSessionImplementation::Dtor Entered"); |
130 MSRPLOG("CMSRPSessionImplementation::Dtor Entered"); |
127 |
131 |
128 MSRPStrings::Close(); |
132 MSRPStrings::Close(); |
129 iLocalMsrpPath.Close(); |
133 iLocalMsrpPath.Close(); |
130 iRemoteMsrpPath.Close(); |
134 iRemoteMsrpPath.Close(); |
131 |
135 |
132 delete iConnectionListener; |
136 delete iConnectionListener; |
246 if ( CMSRPMessage::IsMessage( aIncomingMessage ) ) |
249 if ( CMSRPMessage::IsMessage( aIncomingMessage ) ) |
247 { |
250 { |
248 CMSRPMessage* message = NULL; |
251 CMSRPMessage* message = NULL; |
249 message = CMSRPMessage::InternalizeL( readStream ); |
252 message = CMSRPMessage::InternalizeL( readStream ); |
250 CleanupStack::PushL(message); |
253 CleanupStack::PushL(message); |
|
254 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, content = %d", message->IsContent() ) |
|
255 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, FN = %S", &message->GetFileName() ) |
251 |
256 |
252 HBufC8* messageContent = NULL; |
257 HBufC8* contentType = NULL; |
253 if(message->IsContent()) |
258 if( message->IsContent() ) |
254 { |
259 { |
255 messageContent = HBufC8::NewL(message->Content().Length()); |
260 HBufC8* messageContent = NULL; |
256 CleanupStack::PushL( messageContent ); |
261 if ( message->Content().Length() ) |
257 *messageContent = message->Content(); |
262 { |
|
263 messageContent = HBufC8::NewL(message->Content().Length()); |
|
264 CleanupStack::PushL( messageContent ); |
|
265 *messageContent = message->Content(); |
|
266 } |
|
267 else |
|
268 { |
|
269 messageContent = HBufC8::NewL(KNullDesC8().Length()); |
|
270 CleanupStack::PushL( messageContent ); |
|
271 *messageContent = KNullDesC8(); |
|
272 } |
|
273 |
|
274 if( message->ContentTypeHeader() ) |
|
275 { |
|
276 contentType = message->ContentTypeHeader()->ToTextValueLC(); |
|
277 CleanupStack::Pop(); |
|
278 } |
|
279 |
|
280 iSessionObserver.IncomingMessageInBuffer( messageContent, contentType, aStatus ); |
|
281 CleanupStack::Pop( messageContent ); |
258 } |
282 } |
259 else |
283 else |
260 { |
284 { |
261 messageContent = HBufC8::NewL(KNullDesC8().Length()); |
285 if( message->ContentTypeHeader() ) |
262 CleanupStack::PushL( messageContent ); |
286 { |
263 *messageContent = KNullDesC8(); |
287 contentType = message->ContentTypeHeader()->ToTextValueLC(); |
264 } |
288 CleanupStack::Pop(); |
265 |
289 } |
266 iSessionObserver.IncomingMessage( messageContent, aStatus ); |
290 iSessionObserver.IncomingMessageInFile( message->GetFileName(), contentType, aStatus ); |
267 CleanupStack::Pop( messageContent ); |
291 } |
268 CleanupStack::PopAndDestroy(message); |
292 CleanupStack::PopAndDestroy( message ); |
|
293 } |
|
294 else if ( CMSRPReport::IsReport( aIncomingMessage ) ) |
|
295 { |
|
296 CMSRPReport* report = CMSRPReport::InternalizeL( readStream ); |
|
297 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, status = %d", report->StatusHeader()->StatusCode() ) |
|
298 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, startpos = %d", report->ByteRangeHeader()->StartPosition() ) |
|
299 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, endpos = %d", report->ByteRangeHeader()->EndPosition() ) |
|
300 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, total = %d", report->ByteRangeHeader()->TotalLength() ) |
|
301 |
|
302 iSessionObserver.IncomingReport( |
|
303 report->StatusHeader()->StatusCode(), |
|
304 report->ByteRangeHeader()->StartPosition(), |
|
305 report->ByteRangeHeader()->EndPosition(), |
|
306 report->ByteRangeHeader()->TotalLength() ); |
|
307 delete report; |
269 } |
308 } |
270 else |
309 else |
271 { |
310 { |
272 User::Leave( KErrArgument ); |
311 User::Leave( KErrArgument ); |
273 } |
312 } |
274 |
313 |
275 MSRPLOG( "CMSRPSessionImplementation::HandleIncomingMessageL exit" ) |
314 MSRPLOG( "CMSRPSessionImplementation::HandleIncomingMessageL exit" ) |
276 } |
315 } |
277 |
316 |
278 void CMSRPSessionImplementation::ReceiveProgress(TInt aBytesReceived, TInt aTotalBytes) |
317 |
279 { |
318 void CMSRPSessionImplementation::ReceiveProgress( |
280 iSessionObserver.FileReceiveProgress(aBytesReceived, aTotalBytes); |
319 const TDesC8& aMessageId, |
281 } |
320 TInt aBytesReceived, |
282 |
321 TInt aTotalBytes ) |
283 void CMSRPSessionImplementation::SendProgress(TInt aBytesSent, TInt aTotalBytes) |
322 { |
284 { |
323 iSessionObserver.ReceiveProgress( aMessageId, aBytesReceived, aTotalBytes); |
285 iSessionObserver.FileSendProgress(aBytesSent, aTotalBytes); |
324 } |
286 } |
325 |
|
326 |
|
327 void CMSRPSessionImplementation::SendProgress( |
|
328 const TDesC8& aMessageId, |
|
329 TInt aBytesSent, |
|
330 TInt aTotalBytes ) |
|
331 { |
|
332 iSessionObserver.SendProgress( aMessageId, aBytesSent, aTotalBytes); |
|
333 } |
|
334 |
287 |
335 |
288 CMSRPMessage* CMSRPSessionImplementation::CreateMsrpMessageL( |
336 CMSRPMessage* CMSRPSessionImplementation::CreateMsrpMessageL( |
289 const TDesC8& aMessage, const TDesC8& aToPath, |
337 const TDesC8& aMessage, const TDesC8& aToPath, |
290 const TDesC8& aFromPath, const TDesC8& aMimeType ) |
338 const TDesC8& aFromPath, const TDesC8& aMimeType ) |
291 { |
339 { |
427 MSRPLOG( "CMSRPSessionImplementation::CancelSendingL " ) |
470 MSRPLOG( "CMSRPSessionImplementation::CancelSendingL " ) |
428 // then let's send a message to server to cancel sending |
471 // then let's send a message to server to cancel sending |
429 User::LeaveIfError( iMSRPSession->CancelSending( aMessageId ) ); |
472 User::LeaveIfError( iMSRPSession->CancelSending( aMessageId ) ); |
430 } |
473 } |
431 |
474 |
|
475 void CMSRPSessionImplementation::CancelReceivingL( TDesC8& aMessageId ) |
|
476 { |
|
477 MSRPLOG( "CMSRPSessionImplementation::CancelReceivingL " ) |
|
478 // then let's send a message to server to cancel receiving |
|
479 User::LeaveIfError( iMSRPSession->CancelReceiving( aMessageId ) ); |
|
480 } |
432 |
481 |
433 void CMSRPSessionImplementation::SendStatusL( TInt aStatus, const TDesC8& aMessageid ) |
482 void CMSRPSessionImplementation::SendStatusL( TInt aStatus, const TDesC8& aMessageid ) |
434 { |
483 { |
435 MSRPLOG2( "CMSRPSessionImplementation::SendStatus = %d", aStatus ) |
484 MSRPLOG2( "CMSRPSessionImplementation::SendStatus = %d", aStatus ) |
436 if(isReceiveFile || isSendFile ) |
485 for ( TInt i = 0; i < iSentMessages.Count(); i++ ) |
437 { |
486 { |
438 if(isReceiveFile) |
487 HBufC8* messageid = iSentMessages[ i ]->MessageIdHeader()->ToTextValueLC(); |
439 { |
488 if ( *messageid == aMessageid ) |
440 iSessionObserver.ReceiveFileNotification( aStatus ); |
489 { |
441 |
490 // match |
442 } |
491 delete iSentMessages[ i ]; |
443 if(isSendFile) |
492 iSentMessages.Remove( i ); |
444 { |
493 iSessionObserver.SendResult( aStatus, aMessageid ); |
445 iSessionObserver.SendFileNotification( aStatus ); |
|
446 } |
|
447 } |
|
448 else |
|
449 { |
|
450 for ( TInt i = 0; i < iSentMessages.Count(); i++ ) |
|
451 { |
|
452 HBufC8* messageid = iSentMessages[ i ]->MessageIdHeader()->ToTextValueLC(); |
|
453 if ( *messageid == aMessageid ) |
|
454 { |
|
455 // match |
|
456 delete iSentMessages[ i ]; |
|
457 iSentMessages.Remove( i ); |
|
458 iSessionObserver.SendResult( aStatus, aMessageid ); |
|
459 CleanupStack::PopAndDestroy(messageid); // messageid from above |
|
460 break; |
|
461 } |
|
462 CleanupStack::PopAndDestroy(messageid); // messageid from above |
494 CleanupStack::PopAndDestroy(messageid); // messageid from above |
463 } |
495 break; |
464 } |
496 } |
465 |
497 CleanupStack::PopAndDestroy(messageid); // messageid from above |
|
498 } |
|
499 |
466 MSRPLOG( "CMSRPSessionImplementation::SendStatus exit" ) |
500 MSRPLOG( "CMSRPSessionImplementation::SendStatus exit" ) |
467 } |
501 } |
468 |
502 |
469 void CMSRPSessionImplementation::HandleConnectionErrors( TInt aErrorStatus ) |
503 void CMSRPSessionImplementation::HandleConnectionErrors( TInt aErrorStatus ) |
470 { |
504 { |
471 MSRPLOG2( "CMSRPSessionImplementation::HandleConnectionErrors Error = %d", aErrorStatus ) |
505 MSRPLOG2( "CMSRPSessionImplementation::HandleConnectionErrors Error = %d", aErrorStatus ) |
472 iSessionObserver.ListenPortFailure(aErrorStatus); |
506 iSessionObserver.ConnectStatus(aErrorStatus); |
473 |
507 } |
474 } |
508 |
475 |
509 |
476 void CMSRPSessionImplementation::SendFileL(const TFileName& aFileName, const TDesC8& aMimeType) |
510 HBufC8* CMSRPSessionImplementation::SendFileL(const TFileName& aFileName, const TDesC8& aMimeType) |
477 { |
511 { |
478 MSRPLOG( "CMSRPSessionImplementation::SendFileL enter" ); |
512 MSRPLOG( "CMSRPSessionImplementation::SendFileL enter" ); |
479 |
513 |
480 if(aFileName.Length() && !aMimeType.Length()) |
514 if(aFileName.Length() && !aMimeType.Length()) |
481 { |
515 { |
482 User::Leave( KErrArgument ); |
516 User::Leave( KErrArgument ); |
483 } |
517 } |
484 isSendFile = ETrue; |
518 CMSRPMessage* file = SetFileParamsL( aFileName,iRemoteMsrpPath, iLocalMsrpPath,aMimeType ); |
485 CMSRPMessage* iFile = SetFileParamsL(aFileName,iRemoteMsrpPath, iLocalMsrpPath,aMimeType ); |
519 CleanupStack::PushL( file ); |
486 |
520 |
487 //Set progress indication |
521 iSentMessages.AppendL( file ); |
488 iFile->SetNotifyProgress(iProgress); |
522 CleanupStack::Pop(); // file |
489 |
523 |
490 CBufSeg* buf = CBufSeg::NewL( 100 ); // expandsize to 100 |
524 CBufSeg* buf = CBufSeg::NewL( KBufExpandSize ); |
491 |
525 |
492 //todo need to check what's optimal value here |
526 //todo need to check what's optimal value here |
493 CleanupStack::PushL( buf ); |
527 CleanupStack::PushL( buf ); |
494 RBufWriteStream writeStr( *buf ); |
528 RBufWriteStream writeStr( *buf ); |
495 CleanupClosePushL( writeStr ); |
529 CleanupClosePushL( writeStr ); |
496 iFile->ExternalizeL( writeStr ); |
530 file->ExternalizeL( writeStr ); |
497 writeStr.CommitL(); |
531 writeStr.CommitL(); |
498 |
532 |
499 // MSRP message externalized to buffer, now let's move it to flat buffer |
533 // MSRP message externalized to buffer, now let's move it to flat buffer |
500 if ( buf->Size() > KMaxLengthOfIncomingMessageExt ) |
534 if ( buf->Size() > KMaxLengthOfIncomingMessageExt ) |
501 { |
535 { |
502 // invalid message size |
536 // invalid message size |
503 User::Leave( KErrArgument ); |
537 User::Leave( KErrArgument ); |
504 } |
538 } |
505 |
539 |
506 buf->Read( 0, iExtMessageBuffer, buf->Size() ); |
540 buf->Read( 0, iExtMessageBuffer, buf->Size() ); |
|
541 HBufC8* messageId = file->MessageIdHeader()->ToTextValueLC(); |
|
542 CleanupStack::Pop(); // messageid |
507 CleanupStack::PopAndDestroy( 2 ); // buf, writestream |
543 CleanupStack::PopAndDestroy( 2 ); // buf, writestream |
508 |
544 CleanupStack::PushL( messageId ); |
509 delete iFile; |
545 |
510 iFile = NULL; |
|
511 // send the filename |
546 // send the filename |
512 User::LeaveIfError( iMSRPSession->SendFileL( iExtMessageBuffer ) ); |
547 User::LeaveIfError( iMSRPSession->SendMessage( iExtMessageBuffer ) ); |
513 MSRPLOG( "CMSRPSessionImplementation::SendFileL exit" ); |
548 CleanupStack::Pop( messageId ); |
|
549 |
|
550 MSRPLOG( "CMSRPSessionImplementation::SendFileL exit" ); |
|
551 return messageId; |
514 } |
552 } |
515 |
|
516 void CMSRPSessionImplementation::ReceiveFileL(const TFileName& aFileName,const TInt aFileSize, const TDesC8& aMimeType) |
|
517 { |
|
518 MSRPLOG( "CMSRPSessionImplementation::ReceiveFileL enter" ); |
|
519 isReceiveFile = ETrue; |
|
520 if(aFileName.Length() && !aMimeType.Length()) |
|
521 { |
|
522 User::Leave( KErrArgument ); |
|
523 } |
|
524 CMSRPMessage* iFile = SetFileParamsL(aFileName,iRemoteMsrpPath, iLocalMsrpPath,aMimeType ); |
|
525 |
|
526 //Set FileSize |
|
527 iFile->SetFileSize(aFileSize); |
|
528 |
|
529 //Set progress indication |
|
530 iFile->SetNotifyProgress(iProgress); |
|
531 |
|
532 CBufSeg* buf = CBufSeg::NewL( 100 ); // expandsize to 100 |
|
533 |
|
534 //todo need to check what's optimal value here |
|
535 CleanupStack::PushL( buf ); |
|
536 RBufWriteStream writeStr( *buf ); |
|
537 CleanupClosePushL( writeStr ); |
|
538 iFile->ExternalizeL( writeStr ); |
|
539 writeStr.CommitL(); |
|
540 |
|
541 // MSRP message externalized to buffer, now let's move it to flat buffer |
|
542 if ( buf->Size() > KMaxLengthOfIncomingMessageExt ) |
|
543 { |
|
544 // invalid message size |
|
545 User::Leave( KErrArgument ); |
|
546 } |
|
547 |
|
548 buf->Read( 0, iExtMessageBuffer, buf->Size() ); |
|
549 CleanupStack::PopAndDestroy( 2 ); // buf, writestream |
|
550 |
|
551 delete iFile; |
|
552 iFile = NULL; |
|
553 // send the filename |
|
554 User::LeaveIfError( iMSRPSession->ReceiveFileL( iExtMessageBuffer ) ); |
|
555 |
|
556 |
|
557 } |
|
558 |
553 |
559 CMSRPMessage* CMSRPSessionImplementation::SetFileParamsL(const TFileName& aFileName,const TDesC8& aToPath, |
554 CMSRPMessage* CMSRPSessionImplementation::SetFileParamsL(const TFileName& aFileName,const TDesC8& aToPath, |
560 const TDesC8& aFromPath, |
555 const TDesC8& aFromPath, |
561 const TDesC8& aMimeType ) |
556 const TDesC8& aMimeType ) |
562 { |
557 { |
563 MSRPLOG( "CMSRPSessionImplementation::SetFileParamsL enter" ); |
558 MSRPLOG( "CMSRPSessionImplementation::SetFileParamsL enter" ); |
564 |
559 |
565 CMSRPMessage* msrpMessage = new ( ELeave ) CMSRPMessage(); |
560 CMSRPMessage* msrpMessage = new ( ELeave ) CMSRPMessage(); |
566 CleanupStack::PushL( msrpMessage ); |
561 CleanupStack::PushL( msrpMessage ); |
567 |
562 |
568 //set filename |
563 //set filename |
569 msrpMessage->SetFileName( aFileName ); |
564 msrpMessage->SetFileName( aFileName ); |
570 |
565 |
571 //set to path |
566 //set to path |
572 CMSRPToPathHeader* toPath = CMSRPToPathHeader::DecodeL( aToPath ); |
567 CMSRPToPathHeader* toPath = CMSRPToPathHeader::DecodeL( aToPath ); |
573 msrpMessage->SetToPathHeader( toPath ); |
568 msrpMessage->SetToPathHeader( toPath ); |
574 |
569 |
575 //set from path |
570 //set from path |
576 CMSRPFromPathHeader* fromPath = CMSRPFromPathHeader::DecodeL( aFromPath ); |
571 CMSRPFromPathHeader* fromPath = CMSRPFromPathHeader::DecodeL( aFromPath ); |
577 msrpMessage->SetFromPathHeader( fromPath ); |
572 msrpMessage->SetFromPathHeader( fromPath ); |
578 |
573 |
579 //set content type |
574 //set content type |
580 if(aMimeType.Length()) |
575 if(aMimeType.Length()) |
581 { |
576 { |
582 CMSRPContentTypeHeader* contentType = CMSRPContentTypeHeader::NewL( aMimeType ); |
577 CMSRPContentTypeHeader* contentType = CMSRPContentTypeHeader::NewL( aMimeType ); |
583 msrpMessage->SetContentTypeHeader( contentType ); |
578 msrpMessage->SetContentTypeHeader( contentType ); |
584 } |
579 } |
585 |
580 |
586 //set message id header |
581 //set message id header |
587 TTime now; |
582 TTime now; |
588 now.HomeTime(); |
583 now.HomeTime(); |
589 TInt64 seed = now.Int64(); |
584 TInt64 seed = now.Int64(); |
590 // Create a random number as the session ID |
585 // Create a random number as the session ID |
591 TInt random = Math::Rand( seed ); |
586 TInt random = Math::Rand( seed ); |
592 TBuf8< 100 > idString; |
587 TBuf8< 100 > idString; |
593 idString.AppendNum( random ); |
588 idString.AppendNum( random ); |
594 CMSRPMessageIdHeader* messageIdHeader = CMSRPMessageIdHeader::NewL( idString ); |
589 CMSRPMessageIdHeader* messageIdHeader = CMSRPMessageIdHeader::NewL( idString ); |
595 msrpMessage->SetMessageIdHeader( messageIdHeader ); |
590 msrpMessage->SetMessageIdHeader( messageIdHeader ); |
596 |
591 |
597 // success report header |
592 // success report header |
598 if( iSuccessReport != ENo ) |
593 if( iSuccessReport != ENo ) |
599 { |
594 { |
600 RStringF string = MSRPStrings::StringF( MSRPStrConsts::EYes ); |
595 RStringF string = MSRPStrings::StringF( MSRPStrConsts::EYes ); |
601 CMSRPSuccessReportHeader* successReportHeader = CMSRPSuccessReportHeader::NewL( string ); |
596 CMSRPSuccessReportHeader* successReportHeader = CMSRPSuccessReportHeader::NewL( string ); |
602 msrpMessage->SetSuccessReportHeader( successReportHeader ); |
597 msrpMessage->SetSuccessReportHeader( successReportHeader ); |
603 } |
598 } |
604 |
599 |
605 // failure report header |
600 // failure report header |
606 if( iFailureReport != EYes ) |
601 if( iFailureReport != EYes ) |
607 { |
602 { |
608 RStringF string; |
603 RStringF string; |
609 CleanupClosePushL(string); |
604 CleanupClosePushL(string); |
610 if( iFailureReport == ENo ) |
605 if( iFailureReport == ENo ) |
611 { |
606 { |
612 string = MSRPStrings::StringF( MSRPStrConsts::ENo ); |
607 string = MSRPStrings::StringF( MSRPStrConsts::ENo ); |
613 } |
608 } |
614 else |
609 else |
615 { |
610 { |
616 string = MSRPStrings::StringF( MSRPStrConsts::EPartial ); |
611 string = MSRPStrings::StringF( MSRPStrConsts::EPartial ); |
617 } |
612 } |
618 CMSRPFailureReportHeader* failureReportHeader = CMSRPFailureReportHeader::NewL( string ); |
613 CMSRPFailureReportHeader* failureReportHeader = CMSRPFailureReportHeader::NewL( string ); |
619 msrpMessage->SetFailureReportHeader( failureReportHeader ); |
614 msrpMessage->SetFailureReportHeader( failureReportHeader ); |
620 CleanupStack::PopAndDestroy(); // string |
615 CleanupStack::PopAndDestroy(); // string |
621 } |
616 } |
622 |
617 |
623 CleanupStack::Pop(msrpMessage); // msrpMessage |
618 CleanupStack::Pop(msrpMessage); // msrpMessage |
624 |
619 |
625 MSRPLOG( "CMSRPSessionImplementation::SetFileParamsL enter" ); |
620 MSRPLOG( "CMSRPSessionImplementation::SetFileParamsL enter" ); |
626 return msrpMessage; |
621 return msrpMessage; |
627 } |
622 } |
628 |
623 |
629 |
624 |
630 void CMSRPSessionImplementation::NotifyProgress(TBool aFlag) |
625 void CMSRPSessionImplementation::NotifyProgress(TBool aFlag) |
631 { |
626 { |
632 iProgress = aFlag; |
627 iMSRPSession->SetProgressReports( aFlag ); |
633 } |
628 } |
|
629 |
|
630 // End of file |