1 remconcoreapitargetobserver.h |
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedAll |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef REMCONCOREAPITARGETOBSERVER_H |
|
25 #define REMCONCOREAPITARGETOBSERVER_H |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <remconcoreapi.h> |
|
29 |
|
30 /** |
|
31 Clients must implement this interface in order to instantiate objects of type |
|
32 CRemConCoreApiTarget. This interface passes incoming commands from RemCon to |
|
33 the client. |
|
34 In order to minimise the number of virtual functions the client has to |
|
35 implement, (a) they aren't pure, and (b) most commands are presented via |
|
36 'Command' with an operation ID. |
|
37 Commands which are associated with command-specific data come instead through |
|
38 specific methods, e.g. 'Play', which comes with a play speed. |
|
39 Incoming commands are given to client via the MRemConCoreApiTargetObserver mixin. |
|
40 Having received a command, the client is obliged to send a response. |
|
41 A client can only have one send outstanding at any time. |
|
42 If commands come in quickly, the client is responsible for queueing its responses to them. |
|
43 Note that each command delivered to a target involves memory allocated in the server’s heap, |
|
44 which is only released on client closure or when a response is sent. |
|
45 */ |
|
46 class MRemConCoreApiTargetObserver |
|
47 { |
|
48 public: |
|
49 /** |
|
50 A command has been received. |
|
51 @param aOperationId The operation ID of the command. |
|
52 @param aButtonAct The button action associated with the command. |
|
53 */ |
|
54 virtual void MrccatoCommand(TRemConCoreApiOperationId aOperationId, |
|
55 TRemConCoreApiButtonAction aButtonAct); |
|
56 |
|
57 /** |
|
58 A 'play' command has been received. |
|
59 @param aSpeed The playback speed. |
|
60 @param aButtonAct The button action associated with the command. |
|
61 */ |
|
62 virtual void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, |
|
63 TRemConCoreApiButtonAction aButtonAct); |
|
64 |
|
65 /** |
|
66 A 'tune function' command has been received. |
|
67 @param aTwoPart If EFalse, only aMajorChannel is to be used. Otherwise, |
|
68 both aMajorChannel and aMinorChannel are to be used. |
|
69 @param aMajorChannel The major channel number. |
|
70 @param aMinorChannel The minor channel number. |
|
71 @param aButtonAct The button action associated with the command. |
|
72 */ |
|
73 virtual void MrccatoTuneFunction(TBool aTwoPart, |
|
74 TUint aMajorChannel, |
|
75 TUint aMinorChannel, |
|
76 TRemConCoreApiButtonAction aButtonAct); |
|
77 |
|
78 /** |
|
79 A 'select disk function' has been received. |
|
80 @param aDisk The disk. |
|
81 @param aButtonAct The button action associated with the command. |
|
82 */ |
|
83 virtual void MrccatoSelectDiskFunction(TUint aDisk, |
|
84 TRemConCoreApiButtonAction aButtonAct); |
|
85 |
|
86 /** |
|
87 A 'select AV input function' has been received. |
|
88 @param aAvInputSignalNumber The AV input. |
|
89 @param aButtonAct The button action associated with the command. |
|
90 */ |
|
91 virtual void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber, |
|
92 TRemConCoreApiButtonAction aButtonAct); |
|
93 |
|
94 /** |
|
95 A 'select audio input function' has been received. |
|
96 @param aAudioInputSignalNumber The audio input. |
|
97 @param aButtonAct The button action associated with the command. |
|
98 */ |
|
99 virtual void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber, |
|
100 TRemConCoreApiButtonAction aButtonAct); |
|
101 }; |
|
102 |
|
103 #endif // REMCONCOREAPITARGETOBSERVER_H |