|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Utility class for meta data gathering for audio files |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UPNPMETADATAUTILITY_H |
|
19 #define UPNPMETADATAUTILITY_H |
|
20 |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CMetaDataUtility; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Meta data utility to support UPnP tag information creation |
|
33 * |
|
34 * @lib upnputilities.lib |
|
35 * @since S60 3.0 |
|
36 */ |
|
37 class CUPnPMetaDataUtility : public CBase |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 IMPORT_C static CUPnPMetaDataUtility* NewL(); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 IMPORT_C virtual ~CUPnPMetaDataUtility(); |
|
50 |
|
51 public: // New functions |
|
52 |
|
53 /** |
|
54 * Loads Meta data from given file into internal data structures. |
|
55 * Leaves in case of error |
|
56 * - KErrAccessDenied = File is DRM protected |
|
57 * - KErrNotSupported = Unknown file, meta data cannot be retrieved |
|
58 * @since Series 60 3.0 |
|
59 * @param aFileName reference to music file |
|
60 * @return none |
|
61 */ |
|
62 IMPORT_C void LoadMetaDataL( const TDesC& aFileName ); |
|
63 |
|
64 /** |
|
65 * Returns title information of the file. |
|
66 * @since Series 60 3.0 |
|
67 * @param none |
|
68 * @return TDesC& reference to title |
|
69 */ |
|
70 IMPORT_C const TDesC& Title() const; |
|
71 |
|
72 /** |
|
73 * Returns artist information of the file. |
|
74 * @since Series 60 3.0 |
|
75 * @param none |
|
76 * @return TDesC& reference to artist name |
|
77 */ |
|
78 IMPORT_C const TDesC& Artist() const; |
|
79 |
|
80 /** |
|
81 * Returns album information of the file. |
|
82 * @since Series 60 3.0 |
|
83 * @param none |
|
84 * @return TDesC& reference to album name |
|
85 */ |
|
86 IMPORT_C const TDesC& Album() const; |
|
87 |
|
88 /** |
|
89 * Returns genre information of the file. |
|
90 * @since Series 60 3.0 |
|
91 * @param none |
|
92 * @return TDesC& reference to genre name |
|
93 */ |
|
94 IMPORT_C const TDesC& Genre() const; |
|
95 |
|
96 /** |
|
97 * Returns date information of the file. |
|
98 * @since Series 60 3.0 |
|
99 * @param none |
|
100 * @return TDesC& reference to date |
|
101 */ |
|
102 IMPORT_C const TDesC& Date() const; |
|
103 |
|
104 /** |
|
105 * Loads Title from given file into internal data structures. |
|
106 * Leaves in case of error |
|
107 * - KErrAccessDenied = File is DRM protected |
|
108 * - KErrNotSupported = Unknown file, meta data cannot be retrieved |
|
109 * @since Series 60 3.0 |
|
110 * @param aFileName reference to music file |
|
111 * @return none |
|
112 */ |
|
113 IMPORT_C void LoadTitleL( const TDesC& aFileName ); |
|
114 |
|
115 private: |
|
116 |
|
117 /** |
|
118 * C++ default constructor. |
|
119 */ |
|
120 CUPnPMetaDataUtility(); |
|
121 |
|
122 /** |
|
123 * By default Symbian 2nd phase constructor is private. |
|
124 */ |
|
125 void ConstructL(); |
|
126 |
|
127 /** |
|
128 * Reset member variables |
|
129 */ |
|
130 void Reset(); |
|
131 |
|
132 private: // Data |
|
133 |
|
134 // Meta data information |
|
135 HBufC* iTitle; // owned |
|
136 HBufC* iArtist; // owned |
|
137 HBufC* iAlbum; // owned |
|
138 HBufC* iGenre; // owned |
|
139 HBufC* iDate; // owned |
|
140 |
|
141 // Utility class |
|
142 CMetaDataUtility* iMetaDataUtility; // owned |
|
143 }; |
|
144 |
|
145 #endif // UPNPMETADATAUTILITY_H |
|
146 |
|
147 // End of File |