37
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Class for handling messages from Engine and from all inputs to the
|
|
16 |
* states.
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef __CPHONEREMOTECONTROLHANDLER_H
|
|
22 |
#define __CPHONEREMOTECONTROLHANDLER_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include <remconcoreapitargetobserver.h>
|
|
26 |
#include <e32base.h>
|
|
27 |
#include "mphonestatemachine.h"
|
|
28 |
|
|
29 |
|
|
30 |
// FORWARD DECLARATIONS
|
|
31 |
class CRemConInterfaceSelector;
|
|
32 |
class CRemConCoreApiTarget;
|
|
33 |
class MPhoneStateMachine;
|
|
34 |
class CPhoneHandler;
|
|
35 |
|
|
36 |
// CLASS DECLARATION
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Class for handling messages from Engine and from all inputs to the states
|
|
40 |
*/
|
|
41 |
class CPhoneRemoteControlHandler :
|
|
42 |
public CBase,
|
|
43 |
public MRemConCoreApiTargetObserver
|
|
44 |
{
|
|
45 |
public:
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Two-phased constructor
|
|
49 |
* @param aStateMachine: reference to Phone UI state machine
|
|
50 |
* @return an instance of class CPhoneRemoteControlHandler
|
|
51 |
*/
|
|
52 |
static CPhoneRemoteControlHandler* NewL(
|
|
53 |
MPhoneStateMachine* aStateMachine );
|
|
54 |
/*
|
|
55 |
* Destructor.
|
|
56 |
*/
|
|
57 |
virtual ~CPhoneRemoteControlHandler();
|
|
58 |
|
|
59 |
protected:
|
|
60 |
|
|
61 |
/**
|
|
62 |
* @see MRemConCoreApiTargetObserver.
|
|
63 |
*
|
|
64 |
* A command has been received.
|
|
65 |
* @param aOperationId The operation ID of the command.
|
|
66 |
* @param aButtonAct The button action associated with the command.
|
|
67 |
*/
|
|
68 |
void MrccatoCommand(
|
|
69 |
TRemConCoreApiOperationId aOperationId,
|
|
70 |
TRemConCoreApiButtonAction aButtonAct);
|
|
71 |
|
|
72 |
private:
|
|
73 |
|
|
74 |
/**
|
|
75 |
* By default EPOC constructor is private.
|
|
76 |
*/
|
|
77 |
CPhoneRemoteControlHandler( MPhoneStateMachine* aStateMachine );
|
|
78 |
|
|
79 |
/**
|
|
80 |
* ConstructL()
|
|
81 |
*/
|
|
82 |
virtual void ConstructL();
|
|
83 |
|
|
84 |
/**
|
|
85 |
* Catch button timer event. Current remote operation is repeated
|
|
86 |
* @param aAny
|
|
87 |
*/
|
|
88 |
static TInt DoHandleButtonRepeat( TAny* aAny );
|
|
89 |
|
|
90 |
private: // Data
|
|
91 |
|
|
92 |
/** Remote Controller */
|
|
93 |
CRemConInterfaceSelector* iInterfaceSelector;
|
|
94 |
|
|
95 |
/** Remote Controller */
|
|
96 |
CRemConCoreApiTarget* iCoreTarget;
|
|
97 |
|
|
98 |
/** Current Remote Controller operation */
|
|
99 |
TRemConCoreApiOperationId iOperationId;
|
|
100 |
|
|
101 |
/** Current Remote Controller button act */
|
|
102 |
TRemConCoreApiButtonAction iButtonAct;
|
|
103 |
|
|
104 |
/** Button repeat timer */
|
|
105 |
CPeriodic* iButtonRepeatTimer;
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Handle to State machine
|
|
109 |
*/
|
|
110 |
MPhoneStateMachine* iStateMachine;
|
|
111 |
|
|
112 |
/** Phone Handler */
|
|
113 |
CPhoneHandler* iPhoneHandler;
|
|
114 |
|
|
115 |
};
|
|
116 |
|
|
117 |
#endif // __CPhoneRemoteControlHandler_H
|
|
118 |
|
|
119 |
// End of File
|