VTClientSession.h
上传用户:wsk323
上传日期:2007-01-05
资源大小:403k
文件大小:3k
- /*---------------------------------------------------------------------------
- Copyright: E. Brady Trexler
- Creation: March 1998
- Description: VTClientSession -- a VCL form using a TnCnx component from
- F. Piette. Basically, this class reads data coming from
- the TnCnx socket.
- Legal issues: Copyright (C) 1998 by E. Brady Trexler
- This software is provided 'as-is', without any express or
- implied warranty. In no event will the author be held liable
- for any damages arising from the use of this software.
- Permission is granted to anyone to use this software for any
- purpose, excluding commercial applications, and to alter it
- and redistribute it freely, subject to the following
- restrictions:
- 1. The origin of this software must not be misrepresented,
- you must not claim that you wrote the original software.
- If you use this software in a product, an acknowledgment
- in the product documentation would be appreciated but is
- not required.
- 2. Altered source versions must be plainly marked as such, and
- must not be misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source
- distribution.
- Updates:
- ---------------------------------------------------------------------------*/
- //---------------------------------------------------------------------------
- #ifndef VTClientSessionH
- #define VTClientSessionH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include "TnCnx.hpp"
- #include <ExtCtrls.hpp>
- //---------------------------------------------------------------------------
- class TVTClient : public TForm
- {
- __published: // IDE-managed Components
- TTnCnx *TnCnx;
- TTimer *TimeOutTimer;
- void __fastcall TnCnxDataAvailable(TTnCnx *Sender, PChar Buffer,
- int Len);
- void __fastcall TnCnxDisplay(TTnCnx *Sender, AnsiString Str);
- void __fastcall TnCnxEndOfRecord(TObject *Sender);
- void __fastcall TnCnxLocalEcho(TObject *Sender);
- void __fastcall TnCnxSendLoc(TObject *Sender);
- void __fastcall TnCnxSessionClosed(TTnCnx *Sender, WORD Error);
- void __fastcall TnCnxSessionConnected(TTnCnx *Sender, WORD Error);
- void __fastcall TnCnxTermType(TObject *Sender);
- void __fastcall TimeOutTimerTimer(TObject *Sender);
- private: // User declarations
- public: // User declarations
- AnsiString FCommand;
- void __fastcall ProcessChar(char Ch);
- void __fastcall CommandInterpreter();
- __fastcall TVTClient(TComponent* Owner);
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TVTClient *VTClient;
- extern PACKAGE HANDLE hSaveStdin, hSaveStdout, hSaveStderr;
- //---------------------------------------------------------------------------
- #endif