|
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 * Observes Remote Controller Framework for volume key presses. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef IMAGEEDITORVOLKEYOBSERVER_H |
|
22 #define IMAGEEDITORVOLKEYOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <RemConCoreApiTargetObserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CRemConInterfaceSelector; |
|
29 class CRemConCoreApiTarget; |
|
30 class CImageEditorRemConKeyResponse; |
|
31 |
|
32 /** |
|
33 * Observer interface for volume key events |
|
34 * |
|
35 * since @3.1 |
|
36 * |
|
37 */ |
|
38 class MImageEditorVolumeKeyObserver |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Report volume keys events to observer |
|
43 * @since 3.1 |
|
44 * @param aOperationId Volume key up Volume key down event |
|
45 * @param aButtonAct button action (press, release, click) |
|
46 */ |
|
47 virtual void HandleVolumeKeyEvent( TRemConCoreApiOperationId aOperationId, |
|
48 TRemConCoreApiButtonAction aButtonAct ) = 0; |
|
49 }; |
|
50 |
|
51 // CLASS DECLARATION |
|
52 |
|
53 /** |
|
54 * Observes Remote Controller Framework |
|
55 * |
|
56 * @since 3.1 |
|
57 */ |
|
58 class CImageEditorRemConObserver |
|
59 : public CBase, public MRemConCoreApiTargetObserver |
|
60 { |
|
61 public: // Constructors and destructor |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 * @param aZoomPane zoom pane instance |
|
66 * @return new instance. |
|
67 */ |
|
68 static CImageEditorRemConObserver* NewL( MImageEditorVolumeKeyObserver& aObserver ); |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 ~CImageEditorRemConObserver(); |
|
74 |
|
75 public: // New functions |
|
76 |
|
77 protected: |
|
78 |
|
79 /** |
|
80 * from MRemConCoreApiTargetObserver interface class. |
|
81 * A command has been received. |
|
82 * @param aOperationId The operation ID of the command. |
|
83 * @param aButtonAct The button action associated with the command. |
|
84 */ |
|
85 void MrccatoCommand( TRemConCoreApiOperationId aOperationId, |
|
86 TRemConCoreApiButtonAction aButtonAct ); |
|
87 |
|
88 /** |
|
89 * from MRemConCoreApiTargetObserver interface class. |
|
90 * not used |
|
91 */ |
|
92 void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, |
|
93 TRemConCoreApiButtonAction aButtonAct); |
|
94 |
|
95 /** |
|
96 * from MRemConCoreApiTargetObserver interface class. |
|
97 * not used |
|
98 */ |
|
99 void MrccatoTuneFunction(TBool aTwoPart, |
|
100 TUint aMajorChannel, |
|
101 TUint aMinorChannel, |
|
102 TRemConCoreApiButtonAction aButtonAct); |
|
103 |
|
104 /** |
|
105 * from MRemConCoreApiTargetObserver interface class. |
|
106 * not used |
|
107 */ |
|
108 void MrccatoSelectDiskFunction(TUint aDisk, |
|
109 TRemConCoreApiButtonAction aButtonAct); |
|
110 |
|
111 /** |
|
112 * from MRemConCoreApiTargetObserver interface class. |
|
113 * not used |
|
114 */ |
|
115 void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber, |
|
116 TRemConCoreApiButtonAction aButtonAct); |
|
117 |
|
118 /** |
|
119 * from MRemConCoreApiTargetObserver interface class. |
|
120 * not used |
|
121 */ |
|
122 void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber, |
|
123 TRemConCoreApiButtonAction aButtonAct); |
|
124 |
|
125 private: |
|
126 |
|
127 /** |
|
128 * C++ default constructor. |
|
129 * @since 3.1 |
|
130 * @param aZoomPane instance of zoom pane |
|
131 */ |
|
132 CImageEditorRemConObserver( MImageEditorVolumeKeyObserver& aObserver ); |
|
133 |
|
134 /** |
|
135 * By default Symbian 2nd phase constructor is private. |
|
136 */ |
|
137 void ConstructL(); |
|
138 |
|
139 private: // Data |
|
140 |
|
141 // Remote Controller |
|
142 CRemConInterfaceSelector* iInterfaceSelector; |
|
143 |
|
144 // Remote Controller |
|
145 CRemConCoreApiTarget* iCoreTarget; |
|
146 |
|
147 // Key response |
|
148 CImageEditorRemConKeyResponse* iActiveRemCon; |
|
149 |
|
150 // zoom pane |
|
151 MImageEditorVolumeKeyObserver& iObserver; |
|
152 }; |
|
153 |
|
154 #endif // IMAGEEDITORVOLKEYOBSERVER_H |
|
155 |
|
156 // End of File |