os/mm/devsound/sounddevbt/PlatSec/src/Server/AudioServer/MmfBtDevSoundServer.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __MMFDEVSOUNDSERVER_H__
    17 #define __MMFDEVSOUNDSERVER_H__
    18 
    19 #include <e32base.h>
    20 #include <e32def.h>
    21 #include <e32std.h>
    22 #include <mmf/common/mmfipc.h>
    23 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
    24 #include <mmf/common/mmfipcserver.h>
    25 #endif
    26 #include "MmfBtAudioServer.h"
    27 
    28 
    29 class CMMFDevSoundServer; // declared here.
    30 
    31 NONSHARABLE_CLASS( CMMFDevSoundServer ): public CMmfIpcServer
    32 /**
    33 *@internalTechnology
    34 */
    35 	{
    36 public:
    37 	IMPORT_C static CMMFDevSoundServer* NewL(CMMFAudioServer* aAudioServer, TProcessId& aClientPID);
    38 	~CMMFDevSoundServer();
    39 	CMmfIpcSession* NewSessionL(const TVersion &aVersion) const;
    40 	void IncrementSessionId();
    41 	void DecrementSessionId();
    42 	void SendEventToClient(TInt aSessionToAlert, TInt aSessionToBeLaunched);
    43 	void LaunchRequest(TInt aSessionId);
    44 	TInt DevSoundSessionId() {return iDevSoundSessionId;};
    45 	TBool CheckClientCapabilities();
    46 	void SetClientCapabilitiesL(TThreadId aTid);
    47 	
    48 	IMPORT_C static TInt StartThread(TAny* aParams);
    49 
    50 private:
    51 
    52 	CMMFDevSoundServer(CMMFAudioServer* aAudioServer, TProcessId& aClientPID);
    53 	void ConstructL();
    54 
    55 	class CDelayDevSoundShutDown : public CActive
    56         {
    57     public:
    58         // Construct/destruct
    59         static CDelayDevSoundShutDown* NewL();
    60         ~CDelayDevSoundShutDown(); 
    61         // Request
    62         void SetDelay(TTimeIntervalMicroSeconds32 aDelay);   
    63     private:
    64         // Construct/destruct
    65         CDelayDevSoundShutDown();
    66         void ConstructL();
    67     
    68         // From CActive
    69         void RunL();
    70         void DoCancel();   
    71     private:
    72         RTimer iTimer;      // Has
    73         };
    74 
    75 
    76 private:
    77 	TInt iDevSoundSessionId;	
    78 	TInt iSessionToBeLaunched;
    79 	TProcessId iClientPID;
    80 	TBool iClientHasCaps;
    81 	CDelayDevSoundShutDown* iDelayDevSoundShutDown;
    82 	CMMFAudioServer* iAudioServer;
    83 	};
    84 
    85 
    86 #endif