|
1 /* |
|
2 * Copyright (c) 2009 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: Playback Data provider for playback view. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPPLAYBACKDATA_H |
|
19 #define MPPLAYBACKDATA_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QString> |
|
23 #include <QPixmap> |
|
24 |
|
25 #include <hbicon.h> |
|
26 |
|
27 //forward declartions |
|
28 |
|
29 class MpPlaybackData : public QObject |
|
30 { |
|
31 Q_OBJECT |
|
32 |
|
33 public: |
|
34 |
|
35 enum SimplifiedState { |
|
36 NotPlaying, |
|
37 Playing, |
|
38 Paused, |
|
39 Stopped |
|
40 }; |
|
41 |
|
42 explicit MpPlaybackData( QObject *parent=0 ); |
|
43 virtual ~MpPlaybackData(); |
|
44 |
|
45 int duration() const; |
|
46 int position() const; |
|
47 |
|
48 const QString& title() const; |
|
49 const QString& artist() const; |
|
50 const QString& album() const; |
|
51 const QString& uri() const; |
|
52 void albumArt( HbIcon& icon ) const; |
|
53 int albumId(); |
|
54 bool setId( int id ); |
|
55 int id(); |
|
56 bool realAudio(); |
|
57 MpPlaybackData::SimplifiedState playbackState() const; |
|
58 |
|
59 void commitPlaybackInfo(); |
|
60 void resetData(); |
|
61 |
|
62 signals: |
|
63 |
|
64 void durationChanged(); |
|
65 void positionChanged(); |
|
66 void albumArtReady(); |
|
67 void playbackStateChanged(); |
|
68 void playbackInfoChanged(); |
|
69 |
|
70 public: |
|
71 |
|
72 int mReqId; |
|
73 |
|
74 int mDuration; |
|
75 int mPosition; |
|
76 QString mTitle; |
|
77 QString mAlbum; |
|
78 QString mArtist; |
|
79 QString mUri; |
|
80 int mAlbumId; |
|
81 int mId; |
|
82 HbIcon mAlbumArt; |
|
83 SimplifiedState mPlaybackState; |
|
84 bool mRealAudio; |
|
85 }; |
|
86 |
|
87 #endif // MPPLAYBACKDATA_H |