diff -r 000000000000 -r a2952bb97e68 mpx/playbackframework/playbackengine/src/mpxplaybackplugininfo.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mpx/playbackframework/playbackengine/src/mpxplaybackplugininfo.cpp Thu Dec 17 08:55:47 2009 +0200 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Derived plugin info class for playback tags +* +*/ + + +// INCLUDE FILES +#include +#include +#include +#include +#include "mpxplaybackplugininfo.h" + +_LIT8(KMPXPluginSupportedInterfacesTag, "" ); + +// --------------------------------------------------------------------------- +// Constructor +// --------------------------------------------------------------------------- +// +CMPXPlaybackPluginInfo::CMPXPlaybackPluginInfo() + { + + } + + +// --------------------------------------------------------------------------- +// 2nd phase constructor +// --------------------------------------------------------------------------- +// +void CMPXPlaybackPluginInfo::ConstructL( const CImplementationInformation& aData ) + { + iSupportedInterfaces = new(ELeave)CDesCArrayFlat(KMPXArrayGranularity); + + // Base constructor + CMPXPluginInfo::ConstructL( aData ); + } + +// --------------------------------------------------------------------------- +// Two-Phased constructor +// --------------------------------------------------------------------------- +// +CMPXPlaybackPluginInfo* CMPXPlaybackPluginInfo::NewL( + const CImplementationInformation& aData ) + { + CMPXPlaybackPluginInfo* self = new( ELeave ) CMPXPlaybackPluginInfo; + CleanupStack::PushL( self ); + self->ConstructL( aData ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Two-phased constructor +// --------------------------------------------------------------------------- +// +CMPXPlaybackPluginInfo* CMPXPlaybackPluginInfo::NewLC( + const CImplementationInformation& aData ) + { + CMPXPlaybackPluginInfo* self = new( ELeave ) CMPXPlaybackPluginInfo; + CleanupStack::PushL( self ); + self->ConstructL( aData ); + return self; + } + +// --------------------------------------------------------------------------- +// Virtual destructor +// --------------------------------------------------------------------------- +// +CMPXPlaybackPluginInfo::~CMPXPlaybackPluginInfo() + { + delete iSupportedInterfaces; + } + +// --------------------------------------------------------------------------- +// Extended tag parsing functionality +// --------------------------------------------------------------------------- +// +void CMPXPlaybackPluginInfo::ProcessTaggedDataExL( const TDesC8& aTag, + const TDesC8& aData) + { + if( aTag == KMPXPluginSupportedInterfacesTag ) + { + ExtractSupportedInterfacesL( aData ); + } + } + +// --------------------------------------------------------------------------- +// Get the list of supported interfaces +// --------------------------------------------------------------------------- +// +const CDesCArray& CMPXPlaybackPluginInfo::SupportedInterfaces() const + { + return *iSupportedInterfaces; + } + +// --------------------------------------------------------------------------- +// Process the non-cacheable attributes +// --------------------------------------------------------------------------- +// +void CMPXPlaybackPluginInfo::ExtractSupportedInterfacesL( const TDesC8& aData ) + { + iSupportedInterfaces->Reset(); + ExtractIntoArrayL(aData, iSupportedInterfaces); + } + +// END OF FILE