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: mpxplaybackutility stub for testing mpmediakeyhandler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MMPXPLAYBACKUTILITY_H |
|
20 #define MMPXPLAYBACKUTILITY_H |
|
21 |
|
22 |
|
23 #include <mpxplaybackframeworkdefs.h> // KPbModeDefault, TMPXPlaybackCommand |
|
24 #include <e32base.h> // CBase |
|
25 |
|
26 |
|
27 class MpMediaKeyHandlerPrivate; |
|
28 |
|
29 class MMPXPlaybackUtility : public CActive |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 static int getCount(); |
|
35 static void setNewLLeave(); |
|
36 static void NewLLeaveIfDesiredL(); |
|
37 static void setAddObserverLLeave(); |
|
38 static void AddObserverLLeaveIfDesiredL(); |
|
39 static void setRemoveObserverLLeave(); |
|
40 static void RemoveObserverLLeaveIfDesiredL(); |
|
41 static void setCommandLLeave(); |
|
42 static void CommandLLeaveIfDesiredL(); |
|
43 static void setStateLLeave(); |
|
44 static void StateLLeaveIfDesiredL(); |
|
45 static void setPlaying(); |
|
46 |
|
47 public: |
|
48 |
|
49 static MMPXPlaybackUtility* UtilityL(const TUid& aModeId = KPbModeDefault); |
|
50 virtual ~MMPXPlaybackUtility(); |
|
51 |
|
52 void Close(); |
|
53 void AddObserverL(MpMediaKeyHandlerPrivate& aObs); |
|
54 void RemoveObserverL(MpMediaKeyHandlerPrivate& aObs); |
|
55 void CommandL(TMPXPlaybackCommand aCmd, TInt aData = 0); |
|
56 |
|
57 TMPXPlaybackState StateL() const; |
|
58 |
|
59 protected: |
|
60 |
|
61 // from CActive |
|
62 virtual void DoCancel(); |
|
63 virtual void RunL(); |
|
64 |
|
65 private: |
|
66 |
|
67 MMPXPlaybackUtility(); |
|
68 |
|
69 private: |
|
70 |
|
71 MpMediaKeyHandlerPrivate* iObserver; |
|
72 TInt iVolume; |
|
73 TBool iVolumeUp; |
|
74 |
|
75 }; |
|
76 |
|
77 #endif // MMPXPLAYBACKUTILITY_H |
|
78 |
|
79 // End of File |
|