upnpitemutility.cpp File Reference

const TLitC< sizeof(L"upnpavcontrollerhelper.txt")/2 > KComponentLogfile

const TLitC < sizeof(L"upnpavcontrollerhelper.txt")/2 > KComponentLogfile [static]

const TInt KDateStringLength

const TInt KDateStringLength

const TInt KDateTimeStringLength

const TInt KDateTimeStringLength

const TInt KMaxDateStringLength

const TInt KMaxDateStringLength

const TInt KCodeSemicolon

const TInt KCodeSemicolon

const TLitC< sizeof(L":")/2 > KSeparator

const TLitC < sizeof(L":")/2 > KSeparator [static]

const TLitC< sizeof(L"000000")/2 > KNullTime

const TLitC < sizeof(L"000000")/2 > KNullTime [static]

const TLitC8< sizeof("http:const static TLitC8<sizeof( "DLNA.ORG_CI" )> KCiParam ={sizeof( "DLNA.ORG_CI" )-1, "DLNA.ORG_CI" }; EXPORT_C TBool UPnPItemUtility::BelongsToClass( const CUpnpObject& aObject, const TDesC8& aClass ) { TBool beginsWith = ( aObject.ObjectClass().Find( aClass ) == 0 ); return beginsWith; } EXPORT_C void UPnPItemUtility::GetResElements( const CUpnpObject& aObject, RUPnPElementsArray& aResElementsArray ) { const RUPnPElementsArray& array = const_cast<CUpnpObject&>aObject).GetElements(); for( TInt i = 0; i < array.Count(); i++ ) { if( array[ i ]->Name() == KElementRes() ) { aResElementsArray.Append( array[ i ] ); } } } EXPORT_C const CUpnpElement& UPnPItemUtility::ResourceFromItemL( const CUpnpItem& aItem ) { __Dummy_KComponentLogfile();; RUPnPElementsArray elms; GetResElements( aItem, elms ); TInt count = elms.Count(); CUpnpDlnaProtocolInfo* pInfo = 0 ; TBool found = EFalse; TInt i(0); const CUpnpElement* bestCandidate = 0; for( i = 0 ; i < count; i++ ) { if( elms[ i ]->Value().Left( KHttp.iTypeLength ).Compare( KHttp() ) != 0 ) { continue; } const CUpnpAttribute* attr = FindAttributeByName( *elms Value

const TLitC8 < sizeof("http:const static TLitC8 <sizeof( "DLNA.ORG_CI" )> KCiParam ={sizeof( "DLNA.ORG_CI" )-1, "DLNA.ORG_CI" }; EXPORT_C TBool UPnPItemUtility::BelongsToClass( const CUpnpObject & aObject, const TDesC8 & aClass ) { TBool beginsWith = ( aObject.ObjectClass().Find( aClass ) == 0 ); return beginsWith; } EXPORT_C void UPnPItemUtility::GetResElements( const CUpnpObject & aObject, RUPnPElementsArray & aResElementsArray ) { const RUPnPElementsArray & array = const_cast< CUpnpObject &>aObject).GetElements(); for( TInt i = 0; i < array.Count(); i++ ) { if( array[ i ]->Name() == KElementRes () ) { aResElementsArray.Append( array[ i ] ); } } } EXPORT_C const CUpnpElement & UPnPItemUtility::ResourceFromItemL( const CUpnpItem & aItem ) { __Dummy_KComponentLogfile();; RUPnPElementsArray elms; GetResElements( aItem, elms ); TInt count = elms.Count(); CUpnpDlnaProtocolInfo * pInfo = 0 ; TBool found = EFalse; TInt i(0); const CUpnpElement * bestCandidate = 0; for( i = 0 ; i < count; i++ ) { if( elms[ i ]-> Value ().Left( KHttp.iTypeLength ).Compare( KHttp() ) != 0 ) { continue; } const CUpnpAttribute * attr = FindAttributeByName( *elms Value [static]

if(!)

if ( ! pInfo )

Parameters

! pInfo

if((attr->Value().Find(KCiParam())!=KErrNotFound &&pInfo->CiParameter()==EFalse)||attr->Value().Find(KCiParam()))

if ( (attr-> Value ().Find(KCiParam())!= KErrNotFound && pInfo ->CiParameter()==EFalse)||attr-> Value ().Find(KCiParam())  = = KErrNotFound )

Parameters

(attr-> Value ().Find(KCiParam())!= KErrNotFound && pInfo ->CiParameter()==EFalse)||attr-> Value ().Find(KCiParam())  = = KErrNotFound

if(0)

if ( 0  = = bestCandidate )

Parameters

0  = = bestCandidate

delete pInfo

delete pInfo

if(found)

else if ( found )

Parameters

found

Close()

elms Close ( )

if(bestCandidate)

if ( bestCandidate  = =0 )

Parameters

bestCandidate  = =0

return * bestCandidate

return * bestCandidate