bluetooth/btstack/eirman/eirmansession.h
changeset 0 29b1cd4cb562
child 17 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 _EIRMANSESSION_H
       
    22 #define _EIRMANSESSION_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <e32std.h>
       
    26 #include <bluetooth/eirmanshared.h>
       
    27 #include "eirmanager.h"
       
    28 
       
    29 class CEirManServer;
       
    30 
       
    31 NONSHARABLE_CLASS(CEirManSession) : public CSession2, public MEirManagerNotifiee
       
    32 	{
       
    33 public:
       
    34 	static CEirManSession* NewL(CEirManServer& aServer);
       
    35 	~CEirManSession();
       
    36 	void NotifyEirFeatureState(TInt aResult);
       
    37 private:
       
    38 	CEirManSession(CEirManServer& aServer);
       
    39 	void ConstructL();
       
    40 
       
    41 	// ServiceL handlers
       
    42 	void RegisterTag(const RMessage2& aMessage);
       
    43 	TInt RegisterSpaceAvailableListener(const RMessage2& aMessage, TBool& aComplete);
       
    44 	TInt CancelSpaceAvailableListener();
       
    45 	TInt SetData(const RMessage2& aMessage);
       
    46 	TInt NewData(const RMessage2& aMessage);
       
    47 	
       
    48 	void CompleteSpaceAvailableRequest(TUint aBytesAvailable);
       
    49 	void DeregisterTag();
       
    50 
       
    51 private: // CSession2 virtuals
       
    52 	virtual void ServiceL(const RMessage2& aMessage);
       
    53 
       
    54 private: // from MEirManagerNotifiee
       
    55 	virtual void MemnEirBlockAvailable(TEirTag aTag, TUint aSpaceForTag);
       
    56 
       
    57 private:
       
    58 	CEirManServer& 		iEirManServer; // unowned
       
    59 	TEirTag 			iEirTag;
       
    60 	TEirTag				iPendingEirTag;
       
    61 	TUint 				iLastSpaceOffered;
       
    62 	TBool 				iSpaceAvailableListenerOutstanding;
       
    63 	RMessage2			iRegisterMessage;
       
    64 	RMessage2			iDataAvailableListenerMessage;
       
    65 	};
       
    66 
       
    67 #endif // _EIRMANSESSION_H
       
    68