sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "mmfurl.h" sl@0: sl@0: sl@0: MDataSource* CMMFUrlSource::NewSourceL() sl@0: { sl@0: CMMFUrlSource* self = new(ELeave) CMMFUrlSource; sl@0: return STATIC_CAST(MDataSource*, self); sl@0: } sl@0: sl@0: CMMFUrlSource::CMMFUrlSource() : sl@0: MDataSource(KUidMmfUrlSource) sl@0: { sl@0: } sl@0: sl@0: void CMMFUrlSource::ConstructSourceL(const TDesC8& aInitData) sl@0: { sl@0: RDesReadStream stream(aInitData); sl@0: CleanupClosePushL(stream); sl@0: sl@0: CMMFUrlParams* params = CMMFUrlParams::NewLC(stream); sl@0: sl@0: iUrl = params->Url().AllocL(); sl@0: iIAPId = params->IAPId(); sl@0: iUseIAPId = params->UseIAPId(); sl@0: sl@0: CleanupStack::PopAndDestroy(2);//params, stream sl@0: } sl@0: sl@0: CMMFUrlSource::~CMMFUrlSource() sl@0: { sl@0: delete iUrl; sl@0: } sl@0: sl@0: TFourCC CMMFUrlSource::SourceDataTypeCode(TMediaId /*aMediaId*/) sl@0: { sl@0: return KMMFFourCCCodeNULL; sl@0: } sl@0: sl@0: TInt CMMFUrlSource::SetSourceDataTypeCode(TFourCC /*aSourceFourCC*/, TMediaId /*aMediaId*/) sl@0: { sl@0: return KErrNotSupported; sl@0: } sl@0: sl@0: void CMMFUrlSource::FillBufferL(CMMFBuffer* /*aBuffer*/, MDataSink* /*aConsumer*/,TMediaId /*aMediaId*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSource::BufferEmptiedL(CMMFBuffer* /*aBuffer*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: TBool CMMFUrlSource::CanCreateSourceBuffer() sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: CMMFBuffer* CMMFUrlSource::CreateSourceBufferL(TMediaId /*aMediaId*/, TBool& /*aReference*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: return NULL; sl@0: } sl@0: sl@0: CMMFBuffer* CMMFUrlSource::CreateSourceBufferL(TMediaId /*aMediaId*/, CMMFBuffer& /*aSinkBuffer*/, TBool& /*aReference*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: return NULL; sl@0: } sl@0: sl@0: TInt CMMFUrlSource::SourceThreadLogon(MAsyncEventHandler& /*aEventHandler*/) sl@0: { sl@0: return KErrNotSupported; sl@0: } sl@0: sl@0: void CMMFUrlSource::SourceThreadLogoff() sl@0: { sl@0: } sl@0: sl@0: void CMMFUrlSource::NegotiateSourceL(MDataSink& /* aDataSink*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: TBool CMMFUrlSource::SourceSampleConvert() sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: void CMMFUrlSource::SourcePrimeL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSource::SourcePlayL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSource::SourcePauseL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSource::SourceStopL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSource::SetSourcePrioritySettings(const TMMFPrioritySettings& /*aPrioritySettings*/) sl@0: { sl@0: } sl@0: sl@0: void CMMFUrlSource::SourceCustomCommand(TMMFMessage& aMessage) sl@0: { sl@0: aMessage.Complete(KErrNotSupported); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: MDataSink* CMMFUrlSink::NewSinkL() sl@0: { sl@0: CMMFUrlSink* self = new(ELeave) CMMFUrlSink; sl@0: return STATIC_CAST(MDataSink*, self); sl@0: } sl@0: sl@0: CMMFUrlSink::CMMFUrlSink() : sl@0: MDataSink(KUidMmfUrlSink) sl@0: { sl@0: } sl@0: sl@0: void CMMFUrlSink::ConstructSinkL(const TDesC8& aInitData) sl@0: { sl@0: RDesReadStream stream(aInitData); sl@0: CleanupClosePushL(stream); sl@0: sl@0: CMMFUrlParams* params = CMMFUrlParams::NewLC(stream); sl@0: sl@0: iUrl = params->Url().AllocL(); sl@0: iIAPId = params->IAPId(); sl@0: iUseIAPId = params->UseIAPId(); sl@0: sl@0: CleanupStack::PopAndDestroy(2);//params, stream sl@0: } sl@0: sl@0: CMMFUrlSink::~CMMFUrlSink() sl@0: { sl@0: delete iUrl; sl@0: } sl@0: sl@0: TFourCC CMMFUrlSink::SinkDataTypeCode(TMediaId /*aMediaId*/) sl@0: { sl@0: return KMMFFourCCCodeNULL; sl@0: } sl@0: sl@0: TInt CMMFUrlSink::SetSinkDataTypeCode(TFourCC /*aSinkFourCC*/, TMediaId /*aMediaId*/) sl@0: { sl@0: return KErrNotSupported; sl@0: } sl@0: sl@0: void CMMFUrlSink::EmptyBufferL(CMMFBuffer* /*aBuffer*/, MDataSource* /*aSupplier*/, TMediaId /*aMediaId*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSink::BufferFilledL(CMMFBuffer* /*aBuffer*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: TBool CMMFUrlSink::CanCreateSinkBuffer() sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: CMMFBuffer* CMMFUrlSink::CreateSinkBufferL(TMediaId /*aMediaId*/, TBool& /*aReference*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: return NULL; sl@0: } sl@0: sl@0: TInt CMMFUrlSink::SinkThreadLogon(MAsyncEventHandler& /*aEventHandler*/) sl@0: { sl@0: return KErrNotSupported; sl@0: } sl@0: sl@0: void CMMFUrlSink::SinkThreadLogoff() sl@0: { sl@0: } sl@0: sl@0: void CMMFUrlSink::NegotiateL(MDataSource& /* aDataSource*/) sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSink::SinkPrimeL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSink::SinkPlayL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSink::SinkPauseL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSink::SinkStopL() sl@0: { sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: void CMMFUrlSink::SetSinkPrioritySettings(const TMMFPrioritySettings& /*aPrioritySettings*/) sl@0: { sl@0: } sl@0: sl@0: void CMMFUrlSink::SinkCustomCommand(TMMFMessage& aMessage) sl@0: { sl@0: aMessage.Complete(KErrNotSupported); sl@0: } sl@0: