mmresourcemgmt/mmresctrl/inc/mmrcclientimplementation.h
changeset 0 40261b775718
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 R_MMRCCLIENTIMPLEMENTATION_H
       
    17 #define R_MMRCCLIENTIMPLEMENTATION_H
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <e32base.h>
       
    21 #include <a3f/a3fbase.h>
       
    22 #include <e32msgqueue.h>
       
    23 
       
    24 
       
    25 #include "mmrcclient.h"
       
    26 #include "mmrcclientserver.h"
       
    27 #include "mmrcclientsession.h"
       
    28 #include "mmrcmsgqueuehandlerobserver.h"
       
    29 
       
    30 class MMultimediaResourceControlObserver;
       
    31 class CMMRCClientMsgQueueHandler;
       
    32 
       
    33 NONSHARABLE_CLASS(CMMRCClientImplementation) : public CBase, public MMMRCMsgQueueHandlerObserver
       
    34 	{
       
    35 public:
       
    36 	static CMMRCClientImplementation* NewL(MMultimediaResourceControlObserver& aCallback);
       
    37 	~CMMRCClientImplementation();
       
    38 
       
    39 	TUint64 LogOn(TProcessId aProcessId);
       
    40 	void Close();
       
    41 
       
    42 	TInt SendResourceRequest(MLogicalChain* aLogicalChainLastCommited, MLogicalChain* aLogicalChainRequested, CAudioContext* aContext);
       
    43 	
       
    44 	//for notification
       
    45 	TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData);
       
    46 	TInt CancelRegisterAsClient(TUid aEventType);
       
    47 	TInt WillResumePlay();
       
    48   
       
    49 	//from MMMRCMsgQueueHandlerObserver
       
    50 	void HandleMessage(TMMRCQueueItem& aMessage);
       
    51 
       
    52 	void ResetMessages();
       
    53 private:
       
    54 	void ConstructL();
       
    55 	CMMRCClientImplementation(MMultimediaResourceControlObserver& aCallback);
       
    56 
       
    57 private:
       
    58 	MMultimediaResourceControlObserver& iObserver;
       
    59 	RMMRCClientSession iMMRCClientSession;
       
    60 	RMsgQueue<TMMRCQueueItem> iMsgQueue;
       
    61 	CMMRCClientMsgQueueHandler* iMsgClientQueueHandler;
       
    62 	};
       
    63 
       
    64 #endif  /* R_MMRCCLIENTIMPLEMENTATION_H */