|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef DMHREMCONTARGET_H |
|
23 #define DMHREMCONTARGET_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <remconcoreapitargetobserver.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CRemConCoreApiTarget; |
|
30 class CRemConInterfaceSelector; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 class MMGXMediakeyObserver |
|
35 { |
|
36 public: |
|
37 |
|
38 virtual void HandleVolumeUpL() = 0; |
|
39 virtual void HandleVolumeDownL() = 0; |
|
40 |
|
41 }; |
|
42 |
|
43 /** |
|
44 * mgx listener for RemCon commands. |
|
45 */ |
|
46 class CMGXRemConTarget : public CBase, public MRemConCoreApiTargetObserver |
|
47 { |
|
48 public: // Methods |
|
49 |
|
50 // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Static constructor. |
|
54 */ |
|
55 static CMGXRemConTarget* NewL(MMGXMediakeyObserver* aObserver); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CMGXRemConTarget(); |
|
61 |
|
62 // Methods from base classes |
|
63 |
|
64 /** |
|
65 * From MRemConCoreApiTargetObserver MrccatoCommand. |
|
66 * A command has been received. |
|
67 * @param aOperationId The operation ID of the command. |
|
68 * @param aButtonAct The button action associated with the command. |
|
69 */ |
|
70 void MrccatoCommand(TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct); |
|
71 |
|
72 /** |
|
73 * From MRemConCoreApiTargetObserver MrccatoPlay. |
|
74 * A 'play' command has been received. |
|
75 * @param aSpeed The playback speed. |
|
76 * @param aButtonAct The button action associated with the command. |
|
77 */ |
|
78 void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, TRemConCoreApiButtonAction aButtonAct); |
|
79 |
|
80 /** |
|
81 * From MRemConCoreApiTargetObserver MrccatoTuneFunction. |
|
82 * A 'tune function' command has been received. |
|
83 * @param aTwoPart If EFalse, only aMajorChannel is to be used. Otherwise, |
|
84 * both aMajorChannel and aMinorChannel are to be used. |
|
85 * @param aMajorChannel The major channel number. |
|
86 * @param aMinorChannel The minor channel number. |
|
87 * @param aButtonAct The button action associated with the command. |
|
88 */ |
|
89 void MrccatoTuneFunction(TBool aTwoPart, TUint aMajorChannel, TUint aMinorChannel, TRemConCoreApiButtonAction aButtonAct); |
|
90 |
|
91 /** |
|
92 * From MRemConCoreApiTargetObserver MrccatoSelectDiskFunction. |
|
93 * A 'select disk function' has been received. |
|
94 * @param aDisk The disk. |
|
95 * @param aButtonAct The button action associated with the command. |
|
96 */ |
|
97 void MrccatoSelectDiskFunction(TUint aDisk, TRemConCoreApiButtonAction aButtonAct); |
|
98 |
|
99 /** |
|
100 * From MRemConCoreApiTargetObserver MrccatoSelectAvInputFunction. |
|
101 * A 'select AV input function' has been received. |
|
102 * @param aAvInputSignalNumber The AV input. |
|
103 * @param aButtonAct The button action associated with the command. |
|
104 */ |
|
105 void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber, TRemConCoreApiButtonAction aButtonAct); |
|
106 |
|
107 /** |
|
108 * From MRemConCoreApiTargetObserver MrccatoSelectAudioInputFunction. |
|
109 * A 'select audio input function' has been received. |
|
110 * @param aAudioInputSignalNumber The audio input. |
|
111 * @param aButtonAct The button action associated with the command. |
|
112 */ |
|
113 void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber, TRemConCoreApiButtonAction aButtonAct); |
|
114 |
|
115 protected: // Methods |
|
116 |
|
117 private: //Methods |
|
118 |
|
119 /** |
|
120 * C++ default constructor. |
|
121 */ |
|
122 CMGXRemConTarget(MMGXMediakeyObserver* aObserver); |
|
123 |
|
124 /** |
|
125 * By default Symbian 2nd phase constructor is private. |
|
126 */ |
|
127 void ConstructL(); |
|
128 |
|
129 |
|
130 private: // Data |
|
131 |
|
132 MMGXMediakeyObserver* iObserver; |
|
133 /** RemCon interface selector. */ |
|
134 CRemConInterfaceSelector* iInterfaceSelector; |
|
135 /** RemCon Core API target class. */ |
|
136 CRemConCoreApiTarget* iCoreTarget; |
|
137 }; |
|
138 |
|
139 #endif //MMENUREMCONTARGET_H |
|
140 |
|
141 // End of File |