bluetooth/btstack/eirman/eirmanserver.h
changeset 0 29b1cd4cb562
child 23 32ba20339036
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2007-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 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef _EIRMANSERVER_H
       
    22 #define _EIRMANSERVER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class CEirManSession;
       
    27 class CEirManager;
       
    28 class MHCICommandQueue;
       
    29 class CLinkMgrProtocol;
       
    30 
       
    31 enum TEirFeatureState
       
    32 	{
       
    33 	EEirFeaturePending = 0,
       
    34 	EEirFeatureReady = 1,
       
    35 	EEirFeatureNotSupported = 2,
       
    36 	};
       
    37 
       
    38 /**
       
    39 The EIR Manager server class.
       
    40 */
       
    41 NONSHARABLE_CLASS(CEirManServer) : public CPolicyServer
       
    42 	{
       
    43 public:
       
    44 	static CEirManServer* NewL(MHCICommandQueue& aCommandQueue, CLinkMgrProtocol& aLinkMgrProtocol);
       
    45 	~CEirManServer();
       
    46 	
       
    47 	inline CEirManager& EirManager() const;
       
    48 	
       
    49 	void AddSession();
       
    50 	void DropSession();
       
    51 	void NotifyFeaturesReady();
       
    52 	TEirFeatureState EirFeatureState();
       
    53 
       
    54 private:
       
    55 	CEirManServer(MHCICommandQueue& aCommandQueue, CLinkMgrProtocol& aLinkMgrProtocol);
       
    56 	void ConstructL();
       
    57 
       
    58 	// from CPolicyServer
       
    59 	virtual CSession2* NewSessionL(const TVersion &aVersion, const RMessage2& aMessage) const;
       
    60 	TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
       
    61 	
       
    62 private:
       
    63 	// unowned
       
    64 	MHCICommandQueue&	iCommandQueue;
       
    65 	CLinkMgrProtocol& 	iLinkMgrProtocol;
       
    66 	//owned
       
    67 	CEirManager* 		iEirManager;
       
    68 	TInt				iSessionCount;
       
    69 	TBool				iIsFeaturesReady;
       
    70 	TBool				iIsEirSupported;
       
    71 	};
       
    72 #include "eirmanserver.inl"
       
    73 
       
    74 #endif // _EIRMANSERVER_H
       
    75