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