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.
sl@0
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef __MMFDEVSOUNDSERVER_H__
sl@0
    17
#define __MMFDEVSOUNDSERVER_H__
sl@0
    18
sl@0
    19
#include <e32base.h>
sl@0
    20
#include <e32def.h>
sl@0
    21
#include <e32std.h>
sl@0
    22
#include <mmf/common/mmfipc.h>
sl@0
    23
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
sl@0
    24
#include <mmf/common/mmfipcserver.h>
sl@0
    25
#endif
sl@0
    26
#include "MmfBtAudioServer.h"
sl@0
    27
sl@0
    28
sl@0
    29
class CMMFDevSoundServer; // declared here.
sl@0
    30
sl@0
    31
NONSHARABLE_CLASS( CMMFDevSoundServer ): public CMmfIpcServer
sl@0
    32
/**
sl@0
    33
*@internalTechnology
sl@0
    34
*/
sl@0
    35
	{
sl@0
    36
public:
sl@0
    37
	IMPORT_C static CMMFDevSoundServer* NewL(CMMFAudioServer* aAudioServer, TProcessId& aClientPID);
sl@0
    38
	~CMMFDevSoundServer();
sl@0
    39
	CMmfIpcSession* NewSessionL(const TVersion &aVersion) const;
sl@0
    40
	void IncrementSessionId();
sl@0
    41
	void DecrementSessionId();
sl@0
    42
	void SendEventToClient(TInt aSessionToAlert, TInt aSessionToBeLaunched);
sl@0
    43
	void LaunchRequest(TInt aSessionId);
sl@0
    44
	TInt DevSoundSessionId() {return iDevSoundSessionId;};
sl@0
    45
	TBool CheckClientCapabilities();
sl@0
    46
	void SetClientCapabilitiesL(TThreadId aTid);
sl@0
    47
	
sl@0
    48
	IMPORT_C static TInt StartThread(TAny* aParams);
sl@0
    49
sl@0
    50
private:
sl@0
    51
sl@0
    52
	CMMFDevSoundServer(CMMFAudioServer* aAudioServer, TProcessId& aClientPID);
sl@0
    53
	void ConstructL();
sl@0
    54
sl@0
    55
	class CDelayDevSoundShutDown : public CActive
sl@0
    56
        {
sl@0
    57
    public:
sl@0
    58
        // Construct/destruct
sl@0
    59
        static CDelayDevSoundShutDown* NewL();
sl@0
    60
        ~CDelayDevSoundShutDown(); 
sl@0
    61
        // Request
sl@0
    62
        void SetDelay(TTimeIntervalMicroSeconds32 aDelay);   
sl@0
    63
    private:
sl@0
    64
        // Construct/destruct
sl@0
    65
        CDelayDevSoundShutDown();
sl@0
    66
        void ConstructL();
sl@0
    67
    
sl@0
    68
        // From CActive
sl@0
    69
        void RunL();
sl@0
    70
        void DoCancel();   
sl@0
    71
    private:
sl@0
    72
        RTimer iTimer;      // Has
sl@0
    73
        };
sl@0
    74
sl@0
    75
sl@0
    76
private:
sl@0
    77
	TInt iDevSoundSessionId;	
sl@0
    78
	TInt iSessionToBeLaunched;
sl@0
    79
	TProcessId iClientPID;
sl@0
    80
	TBool iClientHasCaps;
sl@0
    81
	CDelayDevSoundShutDown* iDelayDevSoundShutDown;
sl@0
    82
	CMMFAudioServer* iAudioServer;
sl@0
    83
	};
sl@0
    84
sl@0
    85
sl@0
    86
#endif