diff -r 000000000000 -r 79dd3e2336a0 mmresourcemgmt/mmresctrl/inc/mmrcclientimplementation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmresourcemgmt/mmresctrl/inc/mmrcclientimplementation.h Fri Oct 08 19:40:43 2010 +0100 @@ -0,0 +1,64 @@ +// Copyright (c) 2006-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 R_MMRCCLIENTIMPLEMENTATION_H +#define R_MMRCCLIENTIMPLEMENTATION_H + +#include +#include +#include +#include + + +#include "mmrcclient.h" +#include "mmrcclientserver.h" +#include "mmrcclientsession.h" +#include "mmrcmsgqueuehandlerobserver.h" + +class MMultimediaResourceControlObserver; +class CMMRCClientMsgQueueHandler; + +NONSHARABLE_CLASS(CMMRCClientImplementation) : public CBase, public MMMRCMsgQueueHandlerObserver + { +public: + static CMMRCClientImplementation* NewL(MMultimediaResourceControlObserver& aCallback); + ~CMMRCClientImplementation(); + + TUint64 LogOn(TProcessId aProcessId); + void Close(); + + TInt SendResourceRequest(MLogicalChain* aLogicalChainLastCommited, MLogicalChain* aLogicalChainRequested, CAudioContext* aContext); + + //for notification + TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData); + TInt CancelRegisterAsClient(TUid aEventType); + TInt WillResumePlay(); + + //from MMMRCMsgQueueHandlerObserver + void HandleMessage(TMMRCQueueItem& aMessage); + + void ResetMessages(); +private: + void ConstructL(); + CMMRCClientImplementation(MMultimediaResourceControlObserver& aCallback); + +private: + MMultimediaResourceControlObserver& iObserver; + RMMRCClientSession iMMRCClientSession; + RMsgQueue iMsgQueue; + CMMRCClientMsgQueueHandler* iMsgClientQueueHandler; + }; + +#endif /* R_MMRCCLIENTIMPLEMENTATION_H */