equal
deleted
inserted
replaced
574 // |
574 // |
575 void CMPXMetaDataHandlerImp::MrcmitoGetCurrentlyPlayingMetadata( |
575 void CMPXMetaDataHandlerImp::MrcmitoGetCurrentlyPlayingMetadata( |
576 TMediaAttributeIter& aAttributeIter ) |
576 TMediaAttributeIter& aAttributeIter ) |
577 { |
577 { |
578 MPX_FUNC( "CMPXMetaDataHandlerImp::MrcmitoGetCurrentlyPlayingMetadata" ); |
578 MPX_FUNC( "CMPXMetaDataHandlerImp::MrcmitoGetCurrentlyPlayingMetadata" ); |
579 const TInt KMaxMediaAttrLen = 50; // Replace with suitable value |
579 const TInt KMaxMediaAttrLen = 300; // >110 is required for AVRCP fragmentation |
580 TBuf8<KMaxMediaAttrLen> attrBuf; |
580 TBuf8<KMaxMediaAttrLen> attrBuf; |
581 TMediaAttributeId attrId; |
581 TMediaAttributeId attrId; |
582 aAttributeIter.Start(); |
582 aAttributeIter.Start(); |
583 while( aAttributeIter.Next( attrId ) ) |
583 while( aAttributeIter.Next( attrId ) ) |
584 { |
584 { |
648 detail->Des().NumUC( val ); |
648 detail->Des().NumUC( val ); |
649 } |
649 } |
650 } |
650 } |
651 if( detail ) |
651 if( detail ) |
652 { |
652 { |
653 if( CnvUtfConverter::ConvertFromUnicodeToUtf8( attrBuf, *detail ) ) |
653 const TInt returnValue = CnvUtfConverter::ConvertFromUnicodeToUtf8( attrBuf, *detail ); |
654 { |
654 if ( returnValue == CnvUtfConverter::EErrorIllFormedInput) |
655 attrBuf.Zero(); // Check if this generates the right response |
655 { |
|
656 MPX_DEBUG1( "CMPXMetaDataHandlerImp::MrcmitoGetCurrentlyPlayingMetadata - Illformed string, sending zero length response" ); |
|
657 attrBuf.Zero(); |
|
658 } |
|
659 else if ( returnValue > 0 ) |
|
660 { |
|
661 MPX_DEBUG1( "CMPXMetaDataHandlerImp::MrcmitoGetCurrentlyPlayingMetadata - Could not convert whole string, sending converted fragment" ); |
656 } |
662 } |
657 } |
663 } |
658 if( val ) |
664 if( val ) |
659 { |
665 { |
660 delete detail; |
666 delete detail; |