sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __MMFDEVSOUNDSERVER_H__ sl@0: #define __MMFDEVSOUNDSERVER_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS sl@0: #include sl@0: #endif sl@0: #include "MmfBtAudioServer.h" sl@0: sl@0: sl@0: class CMMFDevSoundServer; // declared here. sl@0: sl@0: NONSHARABLE_CLASS( CMMFDevSoundServer ): public CMmfIpcServer sl@0: /** sl@0: *@internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: IMPORT_C static CMMFDevSoundServer* NewL(CMMFAudioServer* aAudioServer, TProcessId& aClientPID); sl@0: ~CMMFDevSoundServer(); sl@0: CMmfIpcSession* NewSessionL(const TVersion &aVersion) const; sl@0: void IncrementSessionId(); sl@0: void DecrementSessionId(); sl@0: void SendEventToClient(TInt aSessionToAlert, TInt aSessionToBeLaunched); sl@0: void LaunchRequest(TInt aSessionId); sl@0: TInt DevSoundSessionId() {return iDevSoundSessionId;}; sl@0: TBool CheckClientCapabilities(); sl@0: void SetClientCapabilitiesL(TThreadId aTid); sl@0: sl@0: IMPORT_C static TInt StartThread(TAny* aParams); sl@0: sl@0: private: sl@0: sl@0: CMMFDevSoundServer(CMMFAudioServer* aAudioServer, TProcessId& aClientPID); sl@0: void ConstructL(); sl@0: sl@0: class CDelayDevSoundShutDown : public CActive sl@0: { sl@0: public: sl@0: // Construct/destruct sl@0: static CDelayDevSoundShutDown* NewL(); sl@0: ~CDelayDevSoundShutDown(); sl@0: // Request sl@0: void SetDelay(TTimeIntervalMicroSeconds32 aDelay); sl@0: private: sl@0: // Construct/destruct sl@0: CDelayDevSoundShutDown(); sl@0: void ConstructL(); sl@0: sl@0: // From CActive sl@0: void RunL(); sl@0: void DoCancel(); sl@0: private: sl@0: RTimer iTimer; // Has sl@0: }; sl@0: sl@0: sl@0: private: sl@0: TInt iDevSoundSessionId; sl@0: TInt iSessionToBeLaunched; sl@0: TProcessId iClientPID; sl@0: TBool iClientHasCaps; sl@0: CDelayDevSoundShutDown* iDelayDevSoundShutDown; sl@0: CMMFAudioServer* iAudioServer; sl@0: }; sl@0: sl@0: sl@0: #endif