239 |
239 |
240 |
240 |
241 void CMSRPSessionImplementation::HandleIncomingMessageL( |
241 void CMSRPSessionImplementation::HandleIncomingMessageL( |
242 const TDesC8& aIncomingMessage, TInt aStatus ) |
242 const TDesC8& aIncomingMessage, TInt aStatus ) |
243 { |
243 { |
244 MSRPLOG( "CMSRPSessionImplementation::HandleIncomingMessageL enter" ) |
244 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL enter, length %d", aIncomingMessage.Length() ) |
245 |
245 |
246 // the incoming buffer must be internalized |
246 // the incoming buffer must be internalized |
247 RDesReadStream readStream( aIncomingMessage ); |
247 RDesReadStream readStream( aIncomingMessage ); |
248 |
248 |
249 if ( CMSRPMessage::IsMessage( aIncomingMessage ) ) |
249 if ( CMSRPMessage::IsMessage( aIncomingMessage ) ) |
250 { |
250 { |
251 CMSRPMessage* message = NULL; |
251 CMSRPMessage* message = NULL; |
252 message = CMSRPMessage::InternalizeL( readStream ); |
252 TRAPD( err, message = CMSRPMessage::InternalizeL( readStream ) ); |
|
253 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL enter internalize err = %d", err ) |
|
254 User::LeaveIfError( err ); |
253 CleanupStack::PushL(message); |
255 CleanupStack::PushL(message); |
254 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, content = %d", message->IsContent() ) |
256 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, content = %d", message->IsContent() ) |
255 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, FN = %S", &message->GetFileName() ) |
257 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, FN = %S", &message->GetFileName() ) |
256 |
258 |
257 HBufC8* contentType = NULL; |
259 HBufC8* contentType = NULL; |
291 } |
293 } |
292 CleanupStack::PopAndDestroy( message ); |
294 CleanupStack::PopAndDestroy( message ); |
293 } |
295 } |
294 else if ( CMSRPReport::IsReport( aIncomingMessage ) ) |
296 else if ( CMSRPReport::IsReport( aIncomingMessage ) ) |
295 { |
297 { |
296 CMSRPReport* report = CMSRPReport::InternalizeL( readStream ); |
298 CMSRPReport* report = NULL; |
|
299 TRAPD( err, report = CMSRPReport::InternalizeL( readStream ) ); |
|
300 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL enter internalize err = %d", err ) |
|
301 User::LeaveIfError( err ); |
297 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, status = %d", report->StatusHeader()->StatusCode() ) |
302 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, status = %d", report->StatusHeader()->StatusCode() ) |
298 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, startpos = %d", report->ByteRangeHeader()->StartPosition() ) |
303 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, startpos = %d", report->ByteRangeHeader()->StartPosition() ) |
299 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, endpos = %d", report->ByteRangeHeader()->EndPosition() ) |
304 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, endpos = %d", report->ByteRangeHeader()->EndPosition() ) |
300 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, total = %d", report->ByteRangeHeader()->TotalLength() ) |
305 MSRPLOG2( "CMSRPSessionImplementation::HandleIncomingMessageL, total = %d", report->ByteRangeHeader()->TotalLength() ) |
301 |
306 |