|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Header of FileSource. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FILEDATASOURCE_H |
|
20 #define FILEDATASOURCE_H |
|
21 |
|
22 |
|
23 #include <mmf/server/mmfdatasource.h> |
|
24 #include "FileMultimediaSource.h" |
|
25 |
|
26 class MDataSource; |
|
27 |
|
28 class CFileSource : public MDataSource |
|
29 { |
|
30 public: |
|
31 static CFileSource* NewL( TUid aType ); |
|
32 ~CFileSource(void); |
|
33 |
|
34 // From MDataSource begins |
|
35 TFourCC SourceDataTypeCode(TMediaId aMediaId) ; |
|
36 void FillBufferL( CMMFBuffer* aBuffer, MDataSink* aConsumer, TMediaId aMediaId ) ; |
|
37 void BufferEmptiedL( CMMFBuffer* aBuffer ) ; |
|
38 TBool CanCreateSourceBuffer() ; |
|
39 CMMFBuffer* CreateSourceBufferL( TMediaId aMediaId, TBool &aReference ) ; |
|
40 TInt SourceThreadLogon(MAsyncEventHandler& aEventHandler) ; |
|
41 void SourceThreadLogoff(); |
|
42 void SourcePrimeL(); |
|
43 void SourcePlayL(); |
|
44 void SourceStopL(); |
|
45 void SourceCustomCommand(TMMFMessage& aMessage); |
|
46 void ConstructSourceL(const TDesC8 &aInitData); |
|
47 TUid DataSourceType() const; |
|
48 TInt SetSourceDataTypeCode(TFourCC aSourceFourCC, TMediaId /*aMediaId*/ ); |
|
49 // From MDataSource ends |
|
50 |
|
51 void SetMultimediaSource(CFileMultimediaSource& aMultimediaSource); |
|
52 TDesC8& GetInitData(); |
|
53 private: |
|
54 CFileSource(TUid aType); |
|
55 void ConstructL (void); |
|
56 private: |
|
57 //Data |
|
58 CFileMultimediaSource* iMultiMediaSource; |
|
59 HBufC8* iInitData; |
|
60 |
|
61 }; |
|
62 |
|
63 #endif //FILEDATASOURCE_H |