os/mm/devsound/sounddevbt/PlatSec/src/Server/AudioServer/MmfBtDevSoundServer.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/devsound/sounddevbt/PlatSec/src/Server/AudioServer/MmfBtDevSoundServer.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,86 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __MMFDEVSOUNDSERVER_H__
    1.20 +#define __MMFDEVSOUNDSERVER_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <e32def.h>
    1.24 +#include <e32std.h>
    1.25 +#include <mmf/common/mmfipc.h>
    1.26 +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.27 +#include <mmf/common/mmfipcserver.h>
    1.28 +#endif
    1.29 +#include "MmfBtAudioServer.h"
    1.30 +
    1.31 +
    1.32 +class CMMFDevSoundServer; // declared here.
    1.33 +
    1.34 +NONSHARABLE_CLASS( CMMFDevSoundServer ): public CMmfIpcServer
    1.35 +/**
    1.36 +*@internalTechnology
    1.37 +*/
    1.38 +	{
    1.39 +public:
    1.40 +	IMPORT_C static CMMFDevSoundServer* NewL(CMMFAudioServer* aAudioServer, TProcessId& aClientPID);
    1.41 +	~CMMFDevSoundServer();
    1.42 +	CMmfIpcSession* NewSessionL(const TVersion &aVersion) const;
    1.43 +	void IncrementSessionId();
    1.44 +	void DecrementSessionId();
    1.45 +	void SendEventToClient(TInt aSessionToAlert, TInt aSessionToBeLaunched);
    1.46 +	void LaunchRequest(TInt aSessionId);
    1.47 +	TInt DevSoundSessionId() {return iDevSoundSessionId;};
    1.48 +	TBool CheckClientCapabilities();
    1.49 +	void SetClientCapabilitiesL(TThreadId aTid);
    1.50 +	
    1.51 +	IMPORT_C static TInt StartThread(TAny* aParams);
    1.52 +
    1.53 +private:
    1.54 +
    1.55 +	CMMFDevSoundServer(CMMFAudioServer* aAudioServer, TProcessId& aClientPID);
    1.56 +	void ConstructL();
    1.57 +
    1.58 +	class CDelayDevSoundShutDown : public CActive
    1.59 +        {
    1.60 +    public:
    1.61 +        // Construct/destruct
    1.62 +        static CDelayDevSoundShutDown* NewL();
    1.63 +        ~CDelayDevSoundShutDown(); 
    1.64 +        // Request
    1.65 +        void SetDelay(TTimeIntervalMicroSeconds32 aDelay);   
    1.66 +    private:
    1.67 +        // Construct/destruct
    1.68 +        CDelayDevSoundShutDown();
    1.69 +        void ConstructL();
    1.70 +    
    1.71 +        // From CActive
    1.72 +        void RunL();
    1.73 +        void DoCancel();   
    1.74 +    private:
    1.75 +        RTimer iTimer;      // Has
    1.76 +        };
    1.77 +
    1.78 +
    1.79 +private:
    1.80 +	TInt iDevSoundSessionId;	
    1.81 +	TInt iSessionToBeLaunched;
    1.82 +	TProcessId iClientPID;
    1.83 +	TBool iClientHasCaps;
    1.84 +	CDelayDevSoundShutDown* iDelayDevSoundShutDown;
    1.85 +	CMMFAudioServer* iAudioServer;
    1.86 +	};
    1.87 +
    1.88 +
    1.89 +#endif