|
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: MpEngineFactory stub for testing mpvolumeslider |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPENGINEFACTORY_H |
|
19 #define MPENGINEFACTORY_H |
|
20 |
|
21 #include <QObject> |
|
22 |
|
23 #include "mpcommondefs.h" |
|
24 |
|
25 enum MediaCommandReceived{ |
|
26 CmdNone, |
|
27 CmdPlay, |
|
28 CmdPause, |
|
29 CmdPlayPause, |
|
30 CmdStop, |
|
31 CmdSkipForward, |
|
32 CmdStartSeekForward, |
|
33 CmdStopSeeking, |
|
34 CmdSkipBackward, |
|
35 CmdStartSeekBackward, |
|
36 CmdIncreaseVolume, |
|
37 CmdDecreaseVolume, |
|
38 CmdSetVolumeLevel, |
|
39 CmdMuteVolume, |
|
40 CmdUnmuteVolume |
|
41 }; |
|
42 |
|
43 enum MediaPropertyRequested{ |
|
44 PropNone, |
|
45 PropVolumeLevelMax, |
|
46 PropVolumeLevel, |
|
47 PropVolumeMuteState |
|
48 }; |
|
49 |
|
50 class MpEngine : public QObject |
|
51 { |
|
52 Q_OBJECT |
|
53 |
|
54 public: |
|
55 // Stub functions |
|
56 MpEngine(); |
|
57 |
|
58 public: |
|
59 // Playback related |
|
60 void play(); |
|
61 void pause(); |
|
62 void playPause(); |
|
63 void stop(); |
|
64 void skipForward(); |
|
65 void startSeekForward(); |
|
66 void stopSeeking(); |
|
67 void skipBackward(); |
|
68 void startSeekBackward(); |
|
69 void getMaxVolume(); |
|
70 void getVolume(); |
|
71 void increaseVolume(); |
|
72 void decreaseVolume(); |
|
73 void setVolume( int value ); |
|
74 void getMuteState(); |
|
75 void mute(); |
|
76 void unmute(); |
|
77 |
|
78 signals: |
|
79 void volumePropertyChanged( MpCommon::MpVolumeProperty property, int value ); |
|
80 |
|
81 public: |
|
82 MediaCommandReceived iMediaCommandReceived; |
|
83 QList<MediaPropertyRequested> iMediaPropertyRequested; |
|
84 int iCommandValue; |
|
85 |
|
86 }; |
|
87 |
|
88 class MpEngineFactory : public QObject |
|
89 { |
|
90 Q_OBJECT |
|
91 |
|
92 public: |
|
93 // Stub functions |
|
94 private: |
|
95 explicit MpEngineFactory(); |
|
96 |
|
97 public: |
|
98 virtual ~MpEngineFactory(); |
|
99 static MpEngineFactory * instance(); |
|
100 static MpEngine *sharedEngine(); |
|
101 static void close(); |
|
102 |
|
103 private: |
|
104 MpEngine *mSharedEngine; |
|
105 |
|
106 }; |
|
107 |
|
108 |
|
109 #endif // MPENGINEFACTORY_H |