Update contrib.
1 // Copyright (c) 2004-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMFAUDIOSERVER_H__
17 #define __MMFAUDIOSERVER_H__
21 #include <mmf/common/mmfipc.h>
22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
23 #include <mmf/common/mmfipcserver.h>
25 #include "mmfAudioPolicyProxy.h"
27 class CStartAndMonitorDevSoundThread;
28 class RMMFDevSoundServerProxy;
30 class CMMFAudioServer : public CMmfIpcServer
36 static CMMFAudioServer* NewL();
38 CMmfIpcSession* NewSessionL(const TVersion &aVersion) const;
39 void IncrementSessionId();
40 void DecrementSessionId();
42 void IncrementDevSoundCount();
43 void DecrementDevSoundCount();
45 void SendEventToClient(TInt aSessionToAlert, TInt aSessionToBeLaunched);
46 void LaunchRequest(TInt aSessionId);
47 //CAudioPolicy* AudioPolicy() {return iAudioPolicy;};
48 TInt AudioServerSessionId() {return iAudioServerSessionId;};
49 TInt StartDevSoundServer(RMMFDevSoundServerProxy& aDevSoundSessionHandle) const;
50 RServer2& PolicyServerHandle();
53 class CDelayAudioServerShutDown : public CActive
57 static CDelayAudioServerShutDown* NewL();
58 ~CDelayAudioServerShutDown();
60 void SetDelay(TTimeIntervalMicroSeconds32 aDelay);
63 CDelayAudioServerShutDown();
70 RTimer iShutDownTimer; // Has
78 TInt iAudioServerSessionId;
80 TInt iSessionToBeLaunched;
81 CDelayAudioServerShutDown* iDelayAudioServerShutDown;
82 mutable RPointerArray<CStartAndMonitorDevSoundThread> iDevSoundServList;
83 RServer2 iPolicyServerHandle;
84 RMMFAudioPolicyProxy* iAudioPolicyProxy;
87 class CStartAndMonitorDevSoundThread: public CActive
90 static CStartAndMonitorDevSoundThread* NewL(CMMFAudioServer* aAudioServer);
91 ~CStartAndMonitorDevSoundThread();
92 TInt StartDevSoundServer(RMessage2& aMessage, RMMFDevSoundServerProxy& aDevSoundSessionHandle);
95 CStartAndMonitorDevSoundThread(CMMFAudioServer* aAudioServer);
102 CMMFAudioServer* iAudioServer;
106 class RMMFDevSoundServerProxy : public RMmfSessionBase
109 TInt Open(RServer2& aDevSoundServerHandle);
112 #include "MmfAudioServer.inl"