1 /* |
|
2 * Copyright (c) 2002 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: CMMAAudioStreamMetaDataControl is a concrete class for getting |
|
15 * metadata from an audio media. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CMMAAUDIOSTREAMMETADATACONTROL_H |
|
20 #define CMMAAUDIOSTREAMMETADATACONTROL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <mmfcontroller.h> |
|
24 #include <MetaDataUtility.h> |
|
25 #include <MetaDataFieldContainer.h> |
|
26 #include "cmmametadatacontrol.h" |
|
27 |
|
28 // Constants |
|
29 _LIT(KMetaDataSongTitle, "title"); |
|
30 _LIT(KMetaDataArtist, "author"); |
|
31 _LIT(KMetaDataAlbum, "album"); |
|
32 _LIT(KMetaDataYear, "year of recording"); |
|
33 _LIT(KMetaDataComment, "comment"); |
|
34 _LIT(KMetaDataAlbumTrack, "album track"); |
|
35 _LIT(KMetaDataGenre, "genre"); |
|
36 _LIT(KMetaDataComposer, "composer"); |
|
37 _LIT(KMetaDataCopyright, "copyright"); |
|
38 _LIT(KMetaDataOriginalArtist, "original artist"); |
|
39 _LIT(KMetaDataUrl, "url"); |
|
40 _LIT(KMetaDataUserUrl, "user url"); |
|
41 _LIT(KMetaDataJpeg, "front jpeg"); |
|
42 _LIT(KMetaDataVendor, "vendor"); |
|
43 _LIT(KMetaDataRating, "rating"); |
|
44 _LIT(KMetaDataUniqueFileIdentifier, "unique file identifier"); |
|
45 _LIT(KMetaDataDuration, "duration"); |
|
46 _LIT(KMetaDataDate, "date"); |
|
47 |
|
48 const TInt KKeyStringMaxLength = 60; |
|
49 |
|
50 |
|
51 // CLASS DECLARATION |
|
52 /** |
|
53 * This is a concrete class for getting metadata from an audio media. |
|
54 * |
|
55 * |
|
56 */ |
|
57 |
|
58 NONSHARABLE_CLASS(CMMAAudioStreamMetaDataControl): public CMMAMetaDataControl |
|
59 { |
|
60 public: |
|
61 CMMAAudioStreamMetaDataControl(CMetaDataUtility* aMetadaDataUtility); |
|
62 ~CMMAAudioStreamMetaDataControl(); |
|
63 |
|
64 protected: // from CMMAMetaDataControl |
|
65 |
|
66 TInt KeyCountL(); |
|
67 HBufC* KeyL(TInt aIndex); |
|
68 |
|
69 HBufC* KeyValueL(const TDesC& aKey); |
|
70 |
|
71 private: // new methods |
|
72 HBufC* GetKeyL(TMetaDataFieldId aFieldId); |
|
73 TMetaDataFieldId GetFieldId(const TDesC& aKey, TBool& aCompare); |
|
74 |
|
75 private: // data owned |
|
76 CMetaDataUtility* iMetaDataUtility; |
|
77 |
|
78 }; |
|
79 |
|
80 #endif // CMMAAUDIOSTREAMMETADATACONTROL_H |
|