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