bluetooth/gavdp/test/tavsrcController.h
branchRCL_3
changeset 24 e9b924a62a66
parent 0 29b1cd4cb562
equal deleted inserted replaced
23:5b153be919d4 24:e9b924a62a66
       
     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 #ifndef TAVSRCCONTROLLER_H
       
    17 #define TAVSRCCONTROLLER_H
       
    18 
       
    19 #include "tavsrcConsole.h"
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <btextnotifiers.h>
       
    23 #include <remconcoreapicontrollerobserver.h>
       
    24 
       
    25 class CRemConInterfaceSelector;
       
    26 class CRemConCoreApiController;
       
    27 
       
    28 class CTavsrcController : public CActive, public MRemConCoreApiControllerObserver
       
    29 	{
       
    30 public:
       
    31 	static CTavsrcController* NewL(CRemConInterfaceSelector& aIfSel, CActiveConsole& aConsole);
       
    32 	~CTavsrcController();
       
    33 
       
    34 	TInt Command(TRemConCoreApiOperationId aOpId);
       
    35 	void MrccacoResponse(TRemConCoreApiOperationId aOperationId, TInt aError);
       
    36 
       
    37 private:
       
    38 	CTavsrcController(CRemConInterfaceSelector& aIfSel, CActiveConsole& aConsole);
       
    39 	void ConstructL();
       
    40 		
       
    41 	void RunL();
       
    42 	void DoCancel();
       
    43 
       
    44 	void ConnectL();
       
    45 	void IssueCommand(TRemConCoreApiOperationId aOpId);
       
    46 		
       
    47 private:
       
    48 	enum TTavsrcControllerState
       
    49 		{
       
    50 		EControllerConnected,
       
    51 		EControllerNotConnected,
       
    52 		ESearchingForDevice,
       
    53 		};
       
    54 
       
    55 private:
       
    56 	TTavsrcControllerState	  iState;
       
    57 	CRemConInterfaceSelector* iSelector;
       
    58 	TBool                     iGoConnectionOrientedSent;
       
    59 	CRemConCoreApiController* iCoreController;
       
    60 	TUint					  iNumRemotes;	
       
    61 	TRemConCoreApiOperationId iOutstandingOperation;
       
    62 	CActiveConsole&			  iConsole;
       
    63 	RNotifier 				  iNotify;
       
    64 	TBTDeviceSelectionParamsPckg iPckg;
       
    65 	TBTDeviceResponseParamsPckg iResPckg;
       
    66 	};
       
    67 
       
    68 #endif // TAVSRCCONTROLLER_H