51
|
1 |
// Copyright (c) 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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#ifndef PASSTHROUGHHELPER_H
|
|
17 |
#define PASSTHROUGHHELPER_H
|
|
18 |
|
|
19 |
#include <e32base.h>
|
|
20 |
|
|
21 |
class CRcpRouter;
|
|
22 |
class MRemConControlCommandInterface;
|
|
23 |
class CControlCommand;
|
|
24 |
NONSHARABLE_CLASS(CPassthroughHelper) : public CBase
|
|
25 |
{
|
|
26 |
public:
|
|
27 |
static CPassthroughHelper* NewL(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer);
|
|
28 |
~CPassthroughHelper();
|
|
29 |
|
|
30 |
void Disconnect();
|
|
31 |
|
|
32 |
void HandlePassthrough(CControlCommand& aCommand); // FIXME for now
|
|
33 |
private:
|
|
34 |
CPassthroughHelper(CRcpRouter& aRouter, MRemConControlCommandInterface& aCommandInterface, CDeltaTimer& aTimer);
|
|
35 |
void ConstructL();
|
|
36 |
|
|
37 |
void Respond(CControlCommand& aCommand, TInt aErr);
|
|
38 |
void HandledCommand(CControlCommand& aCommand);
|
|
39 |
|
|
40 |
void NewPress(CControlCommand& aCommand);
|
|
41 |
void BalanceHandledCommand(CControlCommand& aCommand);
|
|
42 |
|
|
43 |
// Timer functions
|
|
44 |
void HoldExpiry(CControlCommand& aCommand);
|
|
45 |
void ReleaseExpiry(CControlCommand& aCommand);
|
|
46 |
void StartHoldTimer(CControlCommand& aCommand);
|
|
47 |
void StartReleaseTimer(CControlCommand& aCommand);
|
|
48 |
|
|
49 |
// Delta timer callback functions
|
|
50 |
static TInt HoldExpiry(TAny* aExpiryInfo);
|
|
51 |
static TInt ReleaseExpiry(TAny* aExpiryInfo);
|
|
52 |
|
|
53 |
private:
|
|
54 |
CRcpRouter& iRouter;
|
|
55 |
MRemConControlCommandInterface& iCommandInterface;
|
|
56 |
CDeltaTimer& iTimer;
|
|
57 |
CControlCommand* iPreviousPassthrough;
|
|
58 |
};
|
|
59 |
|
|
60 |
#endif // PASSTHROUGHHELPER_H
|