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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef REMCONCOREAPITARGETOBSERVER_H
23 #define REMCONCOREAPITARGETOBSERVER_H
26 #include <remconcoreapi.h>
29 Clients must implement this interface in order to instantiate objects of type
30 CRemConCoreApiTarget. This interface passes incoming commands from RemCon to
32 In order to minimise the number of virtual functions the client has to
33 implement, (a) they aren't pure, and (b) most commands are presented via
34 'Command' with an operation ID.
35 Commands which are associated with command-specific data come instead through
36 specific methods, e.g. 'Play', which comes with a play speed.
37 Incoming commands are given to client via the MRemConCoreApiTargetObserver mixin.
38 Having received a command, the client is obliged to send a response.
39 A client can only have one send outstanding at any time.
40 If commands come in quickly, the client is responsible for queueing its responses to them.
41 Note that each command delivered to a target involves memory allocated in the server’s heap,
42 which is only released on client closure or when a response is sent.
44 class MRemConCoreApiTargetObserver
48 A command has been received.
49 @param aOperationId The operation ID of the command.
50 @param aButtonAct The button action associated with the command.
52 IMPORT_C virtual void MrccatoCommand(TRemConCoreApiOperationId aOperationId,
53 TRemConCoreApiButtonAction aButtonAct);
56 A 'play' command has been received.
57 @param aSpeed The playback speed.
58 @param aButtonAct The button action associated with the command.
60 IMPORT_C virtual void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed,
61 TRemConCoreApiButtonAction aButtonAct);
64 A 'tune function' command has been received.
65 @param aTwoPart If EFalse, only aMajorChannel is to be used. Otherwise,
66 both aMajorChannel and aMinorChannel are to be used.
67 @param aMajorChannel The major channel number.
68 @param aMinorChannel The minor channel number.
69 @param aButtonAct The button action associated with the command.
71 IMPORT_C virtual void MrccatoTuneFunction(TBool aTwoPart,
74 TRemConCoreApiButtonAction aButtonAct);
77 A 'select disk function' has been received.
78 @param aDisk The disk.
79 @param aButtonAct The button action associated with the command.
81 IMPORT_C virtual void MrccatoSelectDiskFunction(TUint aDisk,
82 TRemConCoreApiButtonAction aButtonAct);
85 A 'select AV input function' has been received.
86 @param aAvInputSignalNumber The AV input.
87 @param aButtonAct The button action associated with the command.
89 IMPORT_C virtual void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber,
90 TRemConCoreApiButtonAction aButtonAct);
93 A 'select audio input function' has been received.
94 @param aAudioInputSignalNumber The audio input.
95 @param aButtonAct The button action associated with the command.
97 IMPORT_C virtual void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber,
98 TRemConCoreApiButtonAction aButtonAct);
101 #endif // REMCONCOREAPITARGETOBSERVER_H