1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmresourcemgmt/mmresctrl/inc/mmrcclientsession.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,71 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef MMRCCLIENTSESSION_H__
1.20 +#define MMRCCLIENTSESSION_H__
1.21 +
1.22 +#include "mmrcclientserver.h"
1.23 +
1.24 +#include <e32std.h>
1.25 +#include <e32base.h>
1.26 +#include <a3f/a3fbase.h>
1.27 +#include "mmrcclientserver.h"
1.28 +
1.29 +class MLogicalChain;
1.30 +class MAudioContext;
1.31 +class MMultimediaResourceControlObserver;
1.32 +class CMMRCClientSideServerRequestToAdaptationAO;
1.33 +class CAudioContext;
1.34 +
1.35 +NONSHARABLE_CLASS(RMMRCClientSession) : public RSessionBase
1.36 + {
1.37 +public:
1.38 + RMMRCClientSession();
1.39 + RMMRCClientSession::~RMMRCClientSession();
1.40 +
1.41 + TInt StartServer();
1.42 + TInt Open(MMultimediaResourceControlObserver& aCallback);
1.43 + TUint64 LogOn(TProcessId aProcessId);
1.44 + void Close();
1.45 +
1.46 + void InitializeServerL(RHandleBase& aMsgQueueHandle);
1.47 + TInt SendResourceRequest(MLogicalChain* aCurrent, MLogicalChain* aDesired, CAudioContext* aContext);
1.48 + void ResourceRequestResponse(MLogicalChain* aChainResponse, TMMRCServerToClientMessageResults aResult, TInt aError);
1.49 +
1.50 + //for notification
1.51 + TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData);
1.52 + TInt CancelRegisterAsClient(TUid aEventType);
1.53 + TInt WillResumePlay();
1.54 +
1.55 + void ResetMessages();
1.56 +private:
1.57 + //void SendRequestResourceDataL();
1.58 +
1.59 +private:
1.60 + RThread iServerThread;
1.61 + TRequestStatus *iCallingStatus;
1.62 +
1.63 + //owned
1.64 + MLogicalChain* iLogicalChainLastCommited;
1.65 + MLogicalChain* iLogicalChainRequested;
1.66 + CMMRCClientSideServerRequestToAdaptationAO* iMMRCClientSideServerRequestToAdaptationAO;
1.67 +
1.68 + //not owned
1.69 + MMultimediaResourceControlObserver* iObserver;
1.70 +
1.71 + TInt iCurrentRequestId;
1.72 + };
1.73 +
1.74 +#endif //__MMRCCLIENTSESSION_H__