First public contribution.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #include <mmf/common/mmffourcc.h>
19 #include <mmf/common/mmfcontrollerframeworkbase.h>
23 MDataSource* CMMFUrlSource::NewSourceL()
25 CMMFUrlSource* self = new(ELeave) CMMFUrlSource;
26 return STATIC_CAST(MDataSource*, self);
29 CMMFUrlSource::CMMFUrlSource() :
30 MDataSource(KUidMmfUrlSource)
34 void CMMFUrlSource::ConstructSourceL(const TDesC8& aInitData)
36 RDesReadStream stream(aInitData);
37 CleanupClosePushL(stream);
39 CMMFUrlParams* params = CMMFUrlParams::NewLC(stream);
41 iUrl = params->Url().AllocL();
42 iIAPId = params->IAPId();
43 iUseIAPId = params->UseIAPId();
45 CleanupStack::PopAndDestroy(2);//params, stream
48 CMMFUrlSource::~CMMFUrlSource()
53 TFourCC CMMFUrlSource::SourceDataTypeCode(TMediaId /*aMediaId*/)
55 return KMMFFourCCCodeNULL;
58 TInt CMMFUrlSource::SetSourceDataTypeCode(TFourCC /*aSourceFourCC*/, TMediaId /*aMediaId*/)
60 return KErrNotSupported;
63 void CMMFUrlSource::FillBufferL(CMMFBuffer* /*aBuffer*/, MDataSink* /*aConsumer*/,TMediaId /*aMediaId*/)
65 User::Leave(KErrNotSupported);
68 void CMMFUrlSource::BufferEmptiedL(CMMFBuffer* /*aBuffer*/)
70 User::Leave(KErrNotSupported);
73 TBool CMMFUrlSource::CanCreateSourceBuffer()
78 CMMFBuffer* CMMFUrlSource::CreateSourceBufferL(TMediaId /*aMediaId*/, TBool& /*aReference*/)
80 User::Leave(KErrNotSupported);
84 CMMFBuffer* CMMFUrlSource::CreateSourceBufferL(TMediaId /*aMediaId*/, CMMFBuffer& /*aSinkBuffer*/, TBool& /*aReference*/)
86 User::Leave(KErrNotSupported);
90 TInt CMMFUrlSource::SourceThreadLogon(MAsyncEventHandler& /*aEventHandler*/)
92 return KErrNotSupported;
95 void CMMFUrlSource::SourceThreadLogoff()
99 void CMMFUrlSource::NegotiateSourceL(MDataSink& /* aDataSink*/)
101 User::Leave(KErrNotSupported);
104 TBool CMMFUrlSource::SourceSampleConvert()
109 void CMMFUrlSource::SourcePrimeL()
111 User::Leave(KErrNotSupported);
114 void CMMFUrlSource::SourcePlayL()
116 User::Leave(KErrNotSupported);
119 void CMMFUrlSource::SourcePauseL()
121 User::Leave(KErrNotSupported);
124 void CMMFUrlSource::SourceStopL()
126 User::Leave(KErrNotSupported);
129 void CMMFUrlSource::SetSourcePrioritySettings(const TMMFPrioritySettings& /*aPrioritySettings*/)
133 void CMMFUrlSource::SourceCustomCommand(TMMFMessage& aMessage)
135 aMessage.Complete(KErrNotSupported);
141 MDataSink* CMMFUrlSink::NewSinkL()
143 CMMFUrlSink* self = new(ELeave) CMMFUrlSink;
144 return STATIC_CAST(MDataSink*, self);
147 CMMFUrlSink::CMMFUrlSink() :
148 MDataSink(KUidMmfUrlSink)
152 void CMMFUrlSink::ConstructSinkL(const TDesC8& aInitData)
154 RDesReadStream stream(aInitData);
155 CleanupClosePushL(stream);
157 CMMFUrlParams* params = CMMFUrlParams::NewLC(stream);
159 iUrl = params->Url().AllocL();
160 iIAPId = params->IAPId();
161 iUseIAPId = params->UseIAPId();
163 CleanupStack::PopAndDestroy(2);//params, stream
166 CMMFUrlSink::~CMMFUrlSink()
171 TFourCC CMMFUrlSink::SinkDataTypeCode(TMediaId /*aMediaId*/)
173 return KMMFFourCCCodeNULL;
176 TInt CMMFUrlSink::SetSinkDataTypeCode(TFourCC /*aSinkFourCC*/, TMediaId /*aMediaId*/)
178 return KErrNotSupported;
181 void CMMFUrlSink::EmptyBufferL(CMMFBuffer* /*aBuffer*/, MDataSource* /*aSupplier*/, TMediaId /*aMediaId*/)
183 User::Leave(KErrNotSupported);
186 void CMMFUrlSink::BufferFilledL(CMMFBuffer* /*aBuffer*/)
188 User::Leave(KErrNotSupported);
191 TBool CMMFUrlSink::CanCreateSinkBuffer()
196 CMMFBuffer* CMMFUrlSink::CreateSinkBufferL(TMediaId /*aMediaId*/, TBool& /*aReference*/)
198 User::Leave(KErrNotSupported);
202 TInt CMMFUrlSink::SinkThreadLogon(MAsyncEventHandler& /*aEventHandler*/)
204 return KErrNotSupported;
207 void CMMFUrlSink::SinkThreadLogoff()
211 void CMMFUrlSink::NegotiateL(MDataSource& /* aDataSource*/)
213 User::Leave(KErrNotSupported);
216 void CMMFUrlSink::SinkPrimeL()
218 User::Leave(KErrNotSupported);
221 void CMMFUrlSink::SinkPlayL()
223 User::Leave(KErrNotSupported);
226 void CMMFUrlSink::SinkPauseL()
228 User::Leave(KErrNotSupported);
231 void CMMFUrlSink::SinkStopL()
233 User::Leave(KErrNotSupported);
236 void CMMFUrlSink::SetSinkPrioritySettings(const TMMFPrioritySettings& /*aPrioritySettings*/)
240 void CMMFUrlSink::SinkCustomCommand(TMMFMessage& aMessage)
242 aMessage.Complete(KErrNotSupported);