williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef REMCONCOREAPITARGETOBSERVER_H williamr@2: #define REMCONCOREAPITARGETOBSERVER_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: /** williamr@2: Clients must implement this interface in order to instantiate objects of type williamr@2: CRemConCoreApiTarget. This interface passes incoming commands from RemCon to williamr@2: the client. williamr@2: In order to minimise the number of virtual functions the client has to williamr@2: implement, (a) they aren't pure, and (b) most commands are presented via williamr@2: 'Command' with an operation ID. williamr@2: Commands which are associated with command-specific data come instead through williamr@2: specific methods, e.g. 'Play', which comes with a play speed. williamr@2: Incoming commands are given to client via the MRemConCoreApiTargetObserver mixin. williamr@2: Having received a command, the client is obliged to send a response. williamr@2: A client can only have one send outstanding at any time. williamr@2: If commands come in quickly, the client is responsible for queueing its responses to them. williamr@2: Note that each command delivered to a target involves memory allocated in the server’s heap, williamr@2: which is only released on client closure or when a response is sent. williamr@2: */ williamr@2: class MRemConCoreApiTargetObserver williamr@2: { williamr@2: public: williamr@2: /** williamr@2: A command has been received. williamr@2: @param aOperationId The operation ID of the command. williamr@2: @param aButtonAct The button action associated with the command. williamr@2: */ williamr@4: IMPORT_C virtual void MrccatoCommand(TRemConCoreApiOperationId aOperationId, williamr@2: TRemConCoreApiButtonAction aButtonAct); williamr@2: williamr@2: /** williamr@2: A 'play' command has been received. williamr@2: @param aSpeed The playback speed. williamr@2: @param aButtonAct The button action associated with the command. williamr@2: */ williamr@4: IMPORT_C virtual void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, williamr@2: TRemConCoreApiButtonAction aButtonAct); williamr@2: williamr@2: /** williamr@2: A 'tune function' command has been received. williamr@2: @param aTwoPart If EFalse, only aMajorChannel is to be used. Otherwise, williamr@2: both aMajorChannel and aMinorChannel are to be used. williamr@2: @param aMajorChannel The major channel number. williamr@2: @param aMinorChannel The minor channel number. williamr@2: @param aButtonAct The button action associated with the command. williamr@2: */ williamr@4: IMPORT_C virtual void MrccatoTuneFunction(TBool aTwoPart, williamr@2: TUint aMajorChannel, williamr@2: TUint aMinorChannel, williamr@2: TRemConCoreApiButtonAction aButtonAct); williamr@2: williamr@2: /** williamr@2: A 'select disk function' has been received. williamr@2: @param aDisk The disk. williamr@2: @param aButtonAct The button action associated with the command. williamr@2: */ williamr@4: IMPORT_C virtual void MrccatoSelectDiskFunction(TUint aDisk, williamr@2: TRemConCoreApiButtonAction aButtonAct); williamr@2: williamr@2: /** williamr@2: A 'select AV input function' has been received. williamr@2: @param aAvInputSignalNumber The AV input. williamr@2: @param aButtonAct The button action associated with the command. williamr@2: */ williamr@4: IMPORT_C virtual void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber, williamr@2: TRemConCoreApiButtonAction aButtonAct); williamr@2: williamr@2: /** williamr@2: A 'select audio input function' has been received. williamr@2: @param aAudioInputSignalNumber The audio input. williamr@2: @param aButtonAct The button action associated with the command. williamr@2: */ williamr@4: IMPORT_C virtual void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber, williamr@2: TRemConCoreApiButtonAction aButtonAct); williamr@2: }; williamr@2: williamr@2: #endif // REMCONCOREAPITARGETOBSERVER_H