mmresourcemgmt/mmresctrl/inc/mmrcclientsession.h
changeset 0 40261b775718
child 10 faf4b9dea6fa
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2006-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 MMRCCLIENTSESSION_H__
       
    17 #define MMRCCLIENTSESSION_H__
       
    18 
       
    19 #include "mmrcclientserver.h"
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include <a3f/a3fbase.h>
       
    24 #include "mmrcclientserver.h"
       
    25 
       
    26 class MLogicalChain;
       
    27 class MAudioContext;
       
    28 class MMultimediaResourceControlObserver;
       
    29 class CMMRCClientSideServerRequestToAdaptationAO;
       
    30 class CAudioContext;
       
    31 
       
    32 NONSHARABLE_CLASS(RMMRCClientSession) : public RSessionBase
       
    33 	{
       
    34 public:
       
    35 	RMMRCClientSession();
       
    36 	RMMRCClientSession::~RMMRCClientSession();
       
    37 
       
    38 	TInt StartServer();
       
    39 	TInt Open(MMultimediaResourceControlObserver& aCallback);
       
    40 	TUint64 LogOn(TProcessId aProcessId);
       
    41 	void Close();
       
    42 
       
    43 	void InitializeServerL(RHandleBase& aMsgQueueHandle);
       
    44 	TInt SendResourceRequest(MLogicalChain* aCurrent, MLogicalChain* aDesired, CAudioContext* aContext);
       
    45 	void ResourceRequestResponse(MLogicalChain* aChainResponse, TMMRCServerToClientMessageResults aResult, TInt aError);
       
    46 	
       
    47 	//for notification
       
    48 	TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData);
       
    49 	TInt CancelRegisterAsClient(TUid aEventType);
       
    50 	TInt WillResumePlay();
       
    51 
       
    52 	void ResetMessages();
       
    53 private:
       
    54 	//void SendRequestResourceDataL();
       
    55 
       
    56 private:
       
    57 	RThread iServerThread;
       
    58 	TRequestStatus *iCallingStatus;
       
    59 
       
    60 	//owned
       
    61 	MLogicalChain* iLogicalChainLastCommited;
       
    62 	MLogicalChain* iLogicalChainRequested;
       
    63 	CMMRCClientSideServerRequestToAdaptationAO* iMMRCClientSideServerRequestToAdaptationAO;
       
    64 
       
    65 	//not owned
       
    66 	MMultimediaResourceControlObserver* iObserver;
       
    67 
       
    68 	TInt iCurrentRequestId;
       
    69 	};
       
    70 
       
    71 #endif //__MMRCCLIENTSESSION_H__