47 CMccSecureInterface& aSecureInterface) |
47 CMccSecureInterface& aSecureInterface) |
48 : iManager( aManager ), |
48 : iManager( aManager ), |
49 iSession( aSession ), |
49 iSession( aSession ), |
50 iSecureInterface(aSecureInterface), |
50 iSecureInterface(aSecureInterface), |
51 iKeyNeedUpdated( ETrue ), |
51 iKeyNeedUpdated( ETrue ), |
52 iCryptoContextUpdate (EFalse), |
52 iCryptoContextUpdate (EFalse ), |
53 iLSReadyToBind ( ETrue ), |
53 iLSReadyToBind ( EFalse ), |
54 iStringTable( NULL ) |
54 iStringTable( NULL ) |
55 { |
55 { |
56 |
56 |
57 } |
57 } |
58 |
58 |
431 TInt CMceSecureMediaSession::BindStreamCrypto( ) |
431 TInt CMceSecureMediaSession::BindStreamCrypto( ) |
432 |
432 |
433 { |
433 { |
434 MCEMM_DEBUG("CMceSecureDesStream::BindStreamCrypto(), Entry"); |
434 MCEMM_DEBUG("CMceSecureDesStream::BindStreamCrypto(), Entry"); |
435 TInt err(KErrNone); |
435 TInt err(KErrNone); |
436 if (iLSReadyToBind && iSession.iClientCryptoSuites.Count()) |
436 if (iSession.iClientCryptoSuites.Count()) |
437 { |
437 { |
438 for (TInt i=0; i<iSession.MccStreams().Count(); i++) |
438 for (TInt i=0; i<iSession.MccStreams().Count(); i++) |
439 { |
439 { |
440 CMceSrvStream* stream = iSession.MccStreams()[i]; |
440 CMceSrvStream* stream = iSession.MccStreams()[i]; |
441 MCEMM_DEBUG_DVALUE(" CMceSrvStream id =", stream->Data().Id().iId ); |
441 MCEMM_DEBUG_DVALUE(" CMceSrvStream id =", stream->Data().Id().iId ); |
442 MCEMM_DEBUG_DVALUE(" App id", stream->Data().Id().iAppId ); |
442 MCEMM_DEBUG_DVALUE(" App id", stream->Data().Id().iAppId ); |
443 TInt secStreamCount = iMceSecureDesStreams.Count(); |
443 TInt secStreamCount = iMceSecureDesStreams.Count(); |
444 for (TInt j=0; j<secStreamCount; j++) |
444 for (TInt j=0; j<secStreamCount; j++) |
445 { |
445 { |
446 CMceSecureDesStream* secureStream=iMceSecureDesStreams[j]; |
446 CMceSecureDesStream* secureStream=iMceSecureDesStreams[j]; |
447 MCEMM_DEBUG_DVALUE(" SrvStream id in SecureStream ", secureStream->MediaStream().Id().iId); |
447 MCEMM_DEBUG_DVALUE(" SrvStream id in SecureStream ", secureStream->MediaStream().Id().iId); |
448 MCEMM_DEBUG_DVALUE(" App id in SecureStream ", secureStream->MediaStream().Id().iAppId); |
448 MCEMM_DEBUG_DVALUE(" App id in SecureStream ", secureStream->MediaStream().Id().iAppId); |
449 if(secureStream->iWaitingBinding) |
449 if (stream->Data().Id()== secureStream->MediaStream().Id() || |
450 { |
450 ( stream->Data().BoundStream() && |
451 if (stream->Data().Id()== secureStream->MediaStream().Id() || |
451 stream->Data().iLinkedStream->Id() == secureStream->MediaStream().Id() ) ) |
452 ( stream->Data().BoundStream() && |
452 { |
453 stream->Data().iLinkedStream->Id() == secureStream->MediaStream().Id() ) ) |
453 //bind |
454 { |
454 if( secureStream->iWaitingBinding ) |
455 //bind |
455 { |
456 err = secureStream->BindCrypto(*stream); |
456 secureStream->BindCrypto(*stream); |
457 } |
457 } |
458 } |
458 } |
459 } |
459 } |
460 } |
460 } |
461 } |
461 } |
462 MCEMM_DEBUG("CMceSecureDesStream::BindStreamCrypto(), Exit"); |
462 MCEMM_DEBUG("CMceSecureDesStream::BindStreamCrypto(), Exit"); |
463 return err; |
463 return err; |
464 } |
464 } |