bluetooth/gavdp/test/tavsrcConsole.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 TAVSRCCONSOLE_H
       
    17 #define TAVSRCCONSOLE_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <e32cons.h>
       
    21 
       
    22 class MActiveConsoleNotify
       
    23 	{
       
    24 public:
       
    25 	virtual void KeyPressed(TChar aKey) =0;
       
    26 	};
       
    27 
       
    28 class CActiveConsole : public CActive
       
    29 	{
       
    30 public:
       
    31 	static CActiveConsole* NewL(MActiveConsoleNotify& aNotify,const TDesC& aTitle,const TSize& aSize);
       
    32 	void RequestKey();
       
    33 	TInt GetIntFromUser();
       
    34 	
       
    35 	inline CConsoleBase& Console() const 
       
    36 		{
       
    37 		return *iConsole;
       
    38 		};
       
    39 
       
    40 	~CActiveConsole();
       
    41 
       
    42 private:
       
    43 	void RunL();
       
    44 	TInt RunError(TInt aError);
       
    45 	void DoCancel();
       
    46 	void DrawCursor();
       
    47 	CActiveConsole(MActiveConsoleNotify& aNotify);
       
    48 	void ConstructL(const TDesC& aTitle,const TSize& aSize);
       
    49 
       
    50 private:
       
    51 	CConsoleBase*	iConsole;
       
    52 	MActiveConsoleNotify&	iNotify;	
       
    53 	};
       
    54 
       
    55 #endif // TAVSRCCONSOLE_H