diff -r 000000000000 -r f63038272f30 bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetoothappprofiles/avrcp/remconbeareravrcp/inc/passthroughhelper.h Mon Jan 18 20:28:57 2010 +0200 @@ -0,0 +1,60 @@ +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef PASSTHROUGHHELPER_H +#define PASSTHROUGHHELPER_H + +#include + +class CRcpRouter; +class CRemConBearerAvrcp; +class CControlCommand; +NONSHARABLE_CLASS(CPassthroughHelper) : public CBase + { +public: + static CPassthroughHelper* NewL(CRcpRouter& aRouter, CRemConBearerAvrcp& aBearer, CDeltaTimer& aTimer); + ~CPassthroughHelper(); + + void Disconnect(); + + void HandlePassthrough(CControlCommand& aCommand); // FIXME for now +private: + CPassthroughHelper(CRcpRouter& aRouter, CRemConBearerAvrcp& aAvrcp, CDeltaTimer& aTimer); + void ConstructL(); + + void Respond(CControlCommand& aCommand, TInt aErr); + void HandledCommand(CControlCommand& aCommand); + + void NewPress(CControlCommand& aCommand); + void BalanceHandledCommand(CControlCommand& aCommand); + + // Timer functions + void HoldExpiry(CControlCommand& aCommand); + void ReleaseExpiry(CControlCommand& aCommand); + void StartHoldTimer(CControlCommand& aCommand); + void StartReleaseTimer(CControlCommand& aCommand); + + // Delta timer callback functions + static TInt HoldExpiry(TAny* aExpiryInfo); + static TInt ReleaseExpiry(TAny* aExpiryInfo); + +private: + CRcpRouter& iRouter; + CRemConBearerAvrcp& iBearer; + CDeltaTimer& iTimer; + CControlCommand* iPreviousPassthrough; + }; + +#endif // PASSTHROUGHHELPER_H