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 class CStartAndMonitorDevSoundThread;
27 class CMMFAudioServer : public CMmfIpcServer
33 static CMMFAudioServer* NewL();
35 CMmfIpcSession* NewSessionL(const TVersion &aVersion) const;
36 void IncrementSessionId();
37 void DecrementSessionId();
39 void IncrementDevSoundCount();
40 void DecrementDevSoundCount();
42 void SendEventToClient(TInt aSessionToAlert, TInt aSessionToBeLaunched);
43 void LaunchRequest(TInt aSessionId);
44 //CAudioPolicy* AudioPolicy() {return iAudioPolicy;};
45 TInt AudioServerSessionId() {return iAudioServerSessionId;};
46 TInt StartDevSoundServerL(TName& aDevSoundName) const;
47 RServer2& PolicyServerHandle();
50 class CDelayAudioServerShutDown : public CActive
54 static CDelayAudioServerShutDown* NewL();
55 ~CDelayAudioServerShutDown();
57 void SetDelay(TTimeIntervalMicroSeconds32 aDelay);
60 CDelayAudioServerShutDown();
67 RTimer iShutDownTimer; // Has
75 TInt iAudioServerSessionId;
77 TInt iSessionToBeLaunched;
79 CDelayAudioServerShutDown* iDelayAudioServerShutDown;
80 mutable RPointerArray<CStartAndMonitorDevSoundThread> iDevSoundServList;
81 RServer2 iPolicyServerHandle;
84 class CStartAndMonitorDevSoundThread: public CActive
87 static CStartAndMonitorDevSoundThread* NewL(CMMFAudioServer* aAudioServer);
88 ~CStartAndMonitorDevSoundThread();
89 TInt StartDevSoundServerL(RMessage2& aMessage, TName& aDevSoundName, TInt aUniqueNum);
92 CStartAndMonitorDevSoundThread(CMMFAudioServer* aAudioServer);
99 CMMFAudioServer* iAudioServer;
102 #include "MmfBtAudioServer.inl"