1 /* |
|
2 * Copyright (c) 2006-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: Capsulating sql items |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef __CMSQLAUDIOITEM_H |
|
24 #define __CMSQLAUDIOITEM_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 #include "cmsqlgenericitem.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 /** |
|
33 * CCmSqlAudioItem class |
|
34 * Capsulating sql items |
|
35 * @lib cmcommon.lib |
|
36 * @since S60 v3.0 |
|
37 */ |
|
38 class CCmSqlAudioItem : public CCmSqlGenericItem |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /* Constructors and destructor. */ |
|
44 |
|
45 /** |
|
46 * Creates new CCmSqlAudioItem class. |
|
47 * @param None |
|
48 * @return pointer to CCmSqlAudioItem class |
|
49 */ |
|
50 IMPORT_C static CCmSqlAudioItem* NewL(); |
|
51 |
|
52 /** |
|
53 * Creates new CCmSqlAudioItem class and |
|
54 * leaves the instance in the cleanup stack. |
|
55 * @return pointer to CCmSqlAudioItem class |
|
56 */ |
|
57 IMPORT_C static CCmSqlAudioItem* NewLC(); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 IMPORT_C virtual ~CCmSqlAudioItem(); |
|
63 |
|
64 public: |
|
65 |
|
66 /** |
|
67 * Sets artist id |
|
68 * @since Series 60 3.1 |
|
69 * @param aArtistId, artist Id |
|
70 * @return None |
|
71 */ |
|
72 IMPORT_C void SetArtistId( const TInt64 aArtistId ); |
|
73 |
|
74 /** |
|
75 * Sets album id |
|
76 * @since Series 60 3.1 |
|
77 * @param aAlbumId, Album Id |
|
78 * @return None |
|
79 */ |
|
80 IMPORT_C void SetAlbumId( const TInt64 aAlbumId ); |
|
81 |
|
82 /** |
|
83 * Sets genre id |
|
84 * @since Series 60 3.1 |
|
85 * @param aGenreId, Genre Id |
|
86 * @return None |
|
87 */ |
|
88 IMPORT_C void SetGenreId( const TInt64 aGenreId ); |
|
89 |
|
90 /** |
|
91 * Sets duration |
|
92 * @since Series 60 3.1 |
|
93 * @param aDuration, duration |
|
94 * @return None |
|
95 */ |
|
96 IMPORT_C void SetDuration( const TInt aDuration ); |
|
97 |
|
98 /** |
|
99 * Sets bitrate |
|
100 * @since Series 60 3.1 |
|
101 * @param aBitrate, Bitrate |
|
102 * @return None |
|
103 */ |
|
104 IMPORT_C void SetBitrate( const TInt aBitrate ); |
|
105 |
|
106 /** |
|
107 * Sets track number |
|
108 * @since Series 60 3.1 |
|
109 * @param aTrackNumber, Track number |
|
110 * @return None |
|
111 */ |
|
112 IMPORT_C void SetTrackNumber( const TInt aTrackNumber ); |
|
113 |
|
114 /** |
|
115 * Sets albumarturi number |
|
116 * @since Series 60 3.1 |
|
117 * @param aAlbumArtUri, album art uri |
|
118 * @return None |
|
119 */ |
|
120 IMPORT_C void SetAlbumArtUriL( const TDesC8& aAlbumArtUri ); |
|
121 |
|
122 /** |
|
123 * Gets artist id |
|
124 * @since Series 60 3.1 |
|
125 * @param None |
|
126 * @return artist id |
|
127 */ |
|
128 IMPORT_C TInt64 ArtistId() const; |
|
129 |
|
130 /** |
|
131 * Gets album id |
|
132 * @since Series 60 3.1 |
|
133 * @param None |
|
134 * @return album id |
|
135 */ |
|
136 IMPORT_C TInt64 AlbumId() const; |
|
137 |
|
138 /** |
|
139 * Gets genre id |
|
140 * @since Series 60 3.1 |
|
141 * @param None |
|
142 * @return genre id |
|
143 */ |
|
144 IMPORT_C TInt64 GenreId() const; |
|
145 |
|
146 /** |
|
147 * Gets duration of the item ( in seconds ) |
|
148 * @since Series 60 3.1 |
|
149 * @param None |
|
150 * @return duration |
|
151 */ |
|
152 IMPORT_C TInt Duration() const; |
|
153 |
|
154 /** |
|
155 * Gets bitrate of the item ( bits/sec ) |
|
156 * @since Series 60 3.1 |
|
157 * @param None |
|
158 * @return bitrate |
|
159 */ |
|
160 IMPORT_C TInt Bitrate() const; |
|
161 |
|
162 /** |
|
163 * Gets track number |
|
164 * @since Series 60 3.1 |
|
165 * @param None |
|
166 * @return track number |
|
167 */ |
|
168 IMPORT_C TInt TrackNumber() const; |
|
169 |
|
170 /** |
|
171 * Gets album art uri of the item |
|
172 * @since Series 60 3.1 |
|
173 * @return Album art uri |
|
174 */ |
|
175 IMPORT_C TDesC8& AlbumArtUri() const; |
|
176 |
|
177 protected: |
|
178 |
|
179 /** |
|
180 * Constructor. |
|
181 */ |
|
182 CCmSqlAudioItem(); |
|
183 |
|
184 /** |
|
185 * Second-phase constructor. |
|
186 */ |
|
187 void ConstructL(); |
|
188 |
|
189 |
|
190 private: // data |
|
191 |
|
192 // Artist id |
|
193 TInt64 iArtistId; |
|
194 |
|
195 // Album id |
|
196 TInt64 iAlbumId; |
|
197 |
|
198 // Genre id |
|
199 TInt64 iGenreId; |
|
200 |
|
201 // Duration in seconds |
|
202 TInt iDuration; |
|
203 |
|
204 // Bitrate in bits/sec |
|
205 TInt iBitrate; |
|
206 |
|
207 // Track number |
|
208 TInt iTrackNumber; |
|
209 |
|
210 // Album art uri |
|
211 HBufC8* iAlbumArtUri; // owned |
|
212 |
|
213 }; |
|
214 |
|
215 #endif // __CMSQLAUDIOITEM_H |
|