|
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: Music derivative of the in-memory plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMPXMUSICMEMORYPLUGIN_H |
|
20 #define CMPXMUSICMEMORYPLUGIN_H |
|
21 |
|
22 #include <apgcli.h> |
|
23 #include "mpxinmemoryplugin.h" |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CMPXMetadataExtractor; |
|
27 |
|
28 /** |
|
29 * Music Specific memory plugin |
|
30 * |
|
31 * @lib mpx |
|
32 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CMPXMusicMemoryPlugin ) : public CMPXInMemoryPlugin |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Two-phased constructor |
|
40 * |
|
41 * @param aInitParams, initialization parameter |
|
42 * @return object of constructed |
|
43 */ |
|
44 static CMPXMusicMemoryPlugin* NewL(); |
|
45 |
|
46 /** |
|
47 * destructor |
|
48 */ |
|
49 virtual ~CMPXMusicMemoryPlugin(); |
|
50 |
|
51 private: |
|
52 |
|
53 /** |
|
54 * From CMPXCollectionPlugin |
|
55 * Get the extended properties of the current file (async) |
|
56 * @param aPath: a path |
|
57 * @param aAttrs: array of attributes requested |
|
58 * @param aCaps platsec capabilities of client requesting media; plug-in should also |
|
59 * verify its process capabilities |
|
60 * @aParam aSpecs, specifications for attributes |
|
61 */ |
|
62 void MediaL(const CMPXCollectionPath& aPath, |
|
63 const TArray<TMPXAttribute>& aAttrs, |
|
64 const TArray<TCapability>& aCaps, |
|
65 CMPXAttributeSpecs* aSpecs); |
|
66 |
|
67 /** |
|
68 * Extract metadata for a given media object |
|
69 * metadata will be extracted if a URI exists |
|
70 * @param aUri, uri for the item |
|
71 * @param attrs, attributes requested |
|
72 * @return new CMPXMedia object or NULL if bad |
|
73 */ |
|
74 CMPXMedia* ExtractMetadataL( const TDesC& aUri, |
|
75 const TArray<TMPXAttribute>& aAttrs ); |
|
76 |
|
77 |
|
78 /** |
|
79 * Set all the attributes in CMPXMedia corresponding to KMPXMediaIdDrm |
|
80 * @param aMedia, media to update |
|
81 * @param aDrmAttributes, bitwise or of the flags we want |
|
82 * @param aDrmMedia, aMedia with drm attributes |
|
83 */ |
|
84 void DoSetMediaDrmL(CMPXMedia& aMedia, |
|
85 const TArray<TMPXAttribute>& aAttrs, |
|
86 const TDesC& aLocation ); |
|
87 private: |
|
88 |
|
89 /** |
|
90 * Constructor |
|
91 */ |
|
92 CMPXMusicMemoryPlugin(); |
|
93 |
|
94 /** |
|
95 * 2nd phased constructor |
|
96 */ |
|
97 void ConstructL(); |
|
98 |
|
99 private: // data |
|
100 CMPXMetadataExtractor* iMetadataExtractor; // Metadata extractor |
|
101 RFs iFs; // File Session |
|
102 RApaLsSession iAppArc; // App arc, dummy |
|
103 RArray<TMPXAttribute> iAttributes; // List of attributes to fetch |
|
104 }; |
|
105 |
|
106 #endif // CMPXMUSICMEMORYPLUGIN_H |