|
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: mpplaybackdata stub for testing MpNowPlayingWidget |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPPLAYBACKDATA_H |
|
19 #define MPPLAYBACKDATA_H |
|
20 |
|
21 //includes |
|
22 #include <QObject> |
|
23 #include <QMetaType> |
|
24 |
|
25 |
|
26 class MpPlaybackData : public QObject |
|
27 { |
|
28 Q_OBJECT |
|
29 |
|
30 public: |
|
31 |
|
32 enum SimplifiedState { |
|
33 NotPlaying, |
|
34 Playing, |
|
35 Paused, |
|
36 Stopped |
|
37 }; |
|
38 // Test utility functions |
|
39 static int getUpdateCounter(); |
|
40 static void resetUpdateCounter(); |
|
41 void triggerStateUpdate(SimplifiedState state); |
|
42 void triggerLabelsChanged(const QString &title, const QString &artist); |
|
43 |
|
44 // Stub functions |
|
45 explicit MpPlaybackData(); |
|
46 virtual ~MpPlaybackData(); |
|
47 |
|
48 signals: |
|
49 void playbackStateChanged(); |
|
50 void playbackInfoChanged(); |
|
51 |
|
52 public: |
|
53 const QString& title() const; |
|
54 const QString& artist() const; |
|
55 MpPlaybackData::SimplifiedState playbackState() const; |
|
56 |
|
57 private: |
|
58 QString mArtist; |
|
59 QString mTitle; |
|
60 SimplifiedState mPlaybackState; |
|
61 |
|
62 }; |
|
63 |
|
64 #endif // MPPLAYBACKDATA_H |