sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef MMRCCLIENTSESSION_H__ sl@0: #define MMRCCLIENTSESSION_H__ sl@0: sl@0: #include "mmrcclientserver.h" sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "mmrcclientserver.h" sl@0: sl@0: class MLogicalChain; sl@0: class MAudioContext; sl@0: class MMultimediaResourceControlObserver; sl@0: class CMMRCClientSideServerRequestToAdaptationAO; sl@0: class CAudioContext; sl@0: sl@0: NONSHARABLE_CLASS(RMMRCClientSession) : public RSessionBase sl@0: { sl@0: public: sl@0: RMMRCClientSession(); sl@0: RMMRCClientSession::~RMMRCClientSession(); sl@0: sl@0: TInt StartServer(); sl@0: TInt Open(MMultimediaResourceControlObserver& aCallback); sl@0: TUint64 LogOn(TProcessId aProcessId); sl@0: void Close(); sl@0: sl@0: void InitializeServerL(RHandleBase& aMsgQueueHandle); sl@0: TInt SendResourceRequest(MLogicalChain* aCurrent, MLogicalChain* aDesired, CAudioContext* aContext); sl@0: void ResourceRequestResponse(MLogicalChain* aChainResponse, TMMRCServerToClientMessageResults aResult, TInt aError); sl@0: sl@0: //for notification sl@0: TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData); sl@0: TInt CancelRegisterAsClient(TUid aEventType); sl@0: TInt WillResumePlay(); sl@0: sl@0: void ResetMessages(); sl@0: private: sl@0: //void SendRequestResourceDataL(); sl@0: sl@0: private: sl@0: RThread iServerThread; sl@0: TRequestStatus *iCallingStatus; sl@0: sl@0: //owned sl@0: MLogicalChain* iLogicalChainLastCommited; sl@0: MLogicalChain* iLogicalChainRequested; sl@0: CMMRCClientSideServerRequestToAdaptationAO* iMMRCClientSideServerRequestToAdaptationAO; sl@0: sl@0: //not owned sl@0: MMultimediaResourceControlObserver* iObserver; sl@0: sl@0: TInt iCurrentRequestId; sl@0: }; sl@0: sl@0: #endif //__MMRCCLIENTSESSION_H__