|
1 /* |
|
2 * Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB |
|
3 * |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of the License "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * EmbedDev AB - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef METADATAREADER_H_ |
|
20 #define METADATAREADER_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <mdaaudiosampleplayer.h> |
|
24 #include "ShowInfo.h" |
|
25 #include "MetaDataReaderObserver.h" |
|
26 |
|
27 class CCnvCharacterSetConverter; |
|
28 #define KMetaDataBufferLength 1024 |
|
29 class CMetaDataReader : public CBase, public MMdaAudioPlayerCallback |
|
30 { |
|
31 public: |
|
32 CMetaDataReader(MMetaDataReaderObserver &aObserver, RFs& aFs); |
|
33 void SubmitShowL(CShowInfo *aShowInfo); |
|
34 virtual ~CMetaDataReader(); |
|
35 void ConstructL(); |
|
36 void SetIgnoreTrackNo(TBool aIgnoreTrackNo); |
|
37 |
|
38 protected: |
|
39 void MapcPlayComplete(TInt aError); |
|
40 void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration); |
|
41 static TInt ParseNextShowCallbackL(TAny* aMetaDataReader); |
|
42 private: |
|
43 void ParseNextShowL(); |
|
44 |
|
45 private: |
|
46 CMdaAudioPlayerUtility *iPlayer; |
|
47 RShowInfoArray iShowsToParse; |
|
48 CShowInfo *iShow; |
|
49 MMetaDataReaderObserver &iObserver; |
|
50 TBuf8<KMaxFileName> iTempFileName; |
|
51 TBuf8<KMetaDataBufferLength> iTempDataBuffer; |
|
52 TBuf<KMetaDataBufferLength> iStringBuffer; |
|
53 TBuf<KMetaDataBufferLength> iStringBuffer2; |
|
54 CAsyncCallBack* iParseNextShowCallBack; |
|
55 CCnvCharacterSetConverter* iCharConverter; |
|
56 TUint iLastConverterCharset; |
|
57 TBool iIgnoreTrackNo; |
|
58 RFs &iFs; |
|
59 }; |
|
60 |
|
61 #endif /*METADATAREADER_H_*/ |