applayerprotocols/ftpengine/consui/CONSOLE.H
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 /**
       
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Author:	Philippe Gabriel
       
    16 * Console active object
       
    17 * Buffers input from the keyboard and reports a command line
       
    18 * terminated by a return key
       
    19 * 
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  @file Console.h
       
    27  @internalComponent
       
    28 */
       
    29 
       
    30 #if !defined(__CONSOLE_H__)
       
    31 #define __CONSOLE_H__
       
    32 #include <e32base.h>
       
    33 #include <e32test.h>
       
    34 
       
    35 //////////////////////////////////////////////////////////////
       
    36 // Definitions
       
    37 //////////////////////////////////////////////////////////////
       
    38 
       
    39 /**
       
    40 The set of chars we accept as an input
       
    41 @internalComponent
       
    42 */
       
    43 // character '£' is recognized as invalid multibyte character sequence on Linux build => replaced with '\xA3'
       
    44 _LIT(KAlphabet," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<>\\\",./?:@~;'#!\xA3$%^&*()_+-=");
       
    45 class MCmdConsoleReport
       
    46 /**
       
    47 @internalComponent
       
    48 */
       
    49 {
       
    50 public:
       
    51 virtual void CmdReady(void)=0;
       
    52 virtual void Escape(void)=0;
       
    53 };
       
    54 class CmdConsole : public CActive
       
    55 /**
       
    56 @internalComponent
       
    57 */
       
    58 {
       
    59 public:
       
    60 	CmdConsole(MCmdConsoleReport*,CConsoleBase*);
       
    61 	static CmdConsole* NewL(MCmdConsoleReport*,CConsoleBase*);
       
    62 	~CmdConsole(void);
       
    63 	void Start(void);
       
    64 	void Reset(void);
       
    65 	TDes& FetchCmd(void);
       
    66 	
       
    67 protected:
       
    68 	void RunL();
       
    69     void DoCancel(void);
       
    70 private:
       
    71 	void ConstructL(void);
       
    72 	MCmdConsoleReport* iNotifier;
       
    73 	CConsoleBase* iConsole;
       
    74 	TBuf<512> iCmdBuffer;
       
    75 	TBool	iAcceptInput;
       
    76 };
       
    77 #endif