home *** CD-ROM | disk | FTP | other *** search
/ CICA 1994 September / CICA_Shareware_for_Windows_Walnut_Creek_September_1994.iso / win3 / demo / gcp_24.exe / GCP_CLNT.HP_ / GCP_CLNT.HP
Text File  |  1994-03-16  |  5KB  |  188 lines

  1.       /********************************************************************
  2.         *                                                                  *
  3.         *   Source File: GCP_EVAL.hpp                                           *
  4.         *   Date:        Fri Feb 28 14:56:07 1992                          *
  5.       *                                                                  *
  6.         ********************************************************************/
  7.  
  8. _CLASSDEF (CGcpApp);
  9. _CLASSDEF (CGcpWnd);
  10. _CLASSDEF (TConnectUdpDlg);
  11. _CLASSDEF (TConnectTcpDlg);
  12. _CLASSDEF (TConnectTelnetDlg);
  13. _CLASSDEF (TConnectTftpDlg);
  14. _CLASSDEF (TBufferDlg);
  15. _CLASSDEF (TFileDlg);
  16. _CLASSDEF (CTelnetCommandsDlg);
  17.  
  18. class CGcpApp : public CWinApp
  19. {
  20. public:
  21.     CString ClassName;
  22.     CGcpApp();
  23.     ~CGcpApp();
  24.     BOOL InitInstance();
  25. };
  26.  
  27. // Declare TAboutDlg, a CDialog descendant
  28. class CAboutDlg : public CDialog
  29. {
  30. public:
  31.     CAboutDlg(PCGcpWnd AParent, LPSTR AName);
  32.     ~CAboutDlg() {};
  33.    afx_msg void OnLButtonDown (UINT, CPoint);
  34.     DECLARE_MESSAGE_MAP();
  35. };
  36.  
  37.  
  38. // Declare TConnectTelnetDlg, a CDialog descendant
  39. class TConnectTelnetDlg : public CDialog
  40. {
  41. public:
  42.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  43.     TConnectTelnetDlg(PCGcpWnd AParent, LPSTR AName);
  44.     ~TConnectTelnetDlg() {};
  45.     void OnOK (void);
  46.     void OnCancel(void);
  47.     afx_msg void OnListen (void);
  48.     DECLARE_MESSAGE_MAP();
  49. };
  50.  
  51. // Declare CTelnetCommandsDlg, a CDialog descendant
  52. class CTelnetCommandsDlg : public CDialog
  53. {
  54.     int Encode(const unsigned char far *, unsigned char far *, int, int);
  55.     int Decode(const unsigned char far *, unsigned char far *, int, int);
  56.     static int CommandsReceived;
  57. public:
  58.     BOOL OnInitDialog(void);
  59.     GCP_TELNET_PARAMS Telnet;
  60.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  61.     CTelnetCommandsDlg(PCGcpWnd AParent, GCP_TELNET_PARAMS &Params);
  62.     CTelnetCommandsDlg(PCGcpWnd AParent);
  63.     ~CTelnetCommandsDlg() {};
  64.     void OnOK (void);
  65. };
  66.  
  67. // Declare TConnectTcpDlg, a CDialog descendant
  68. class TConnectTcpDlg : public CDialog
  69.     {
  70. public:
  71.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  72.     TConnectTcpDlg(PCGcpWnd AParent, LPSTR AName);
  73.     ~TConnectTcpDlg() {};
  74.     void OnOK (void);
  75.     void OnCancel(void);
  76.     afx_msg void OnListen (void);
  77.     DECLARE_MESSAGE_MAP();
  78. };
  79.  
  80. // Declare TConnectTftpDlg, a CDialog descendant
  81. class TConnectTftpDlg : public CDialog
  82.     {
  83. public:
  84.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  85.     TConnectTftpDlg(PCGcpWnd AParent, LPSTR AName);
  86.     ~TConnectTftpDlg() {};
  87.     void OnOK (void);
  88.     void OnCancel(void);
  89.     afx_msg void OnListen (void);
  90.     DECLARE_MESSAGE_MAP();
  91. };
  92.  
  93. // Declare TConnectUdpDlg, a CDialog descendant
  94. class TConnectUdpDlg : public CDialog
  95. {
  96. public:
  97.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  98.     void OnOK (void);
  99.     void OnCancel(void);
  100.     TConnectUdpDlg(PCGcpWnd AParent, LPSTR AName);
  101.     ~TConnectUdpDlg() {};
  102. };
  103.  
  104. // Declare TBufferDlg, a CDialog descendant
  105. class TBufferDlg : public CDialog
  106. {
  107. public:
  108.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  109.     TBufferDlg(PCGcpWnd AParent, LPSTR AName);
  110.     ~TBufferDlg() {};
  111.     void OnOK(void);
  112.     void OnCancel(void);  
  113.     afx_msg void BroadcastCheck(void);
  114.    afx_msg void AddressSelect(void);
  115.     DECLARE_MESSAGE_MAP();
  116. };
  117.  
  118.  
  119. // Declare TFileDlg, a CDialog descendant
  120. class TFileDlg : public CDialog
  121. {
  122.     afx_msg void OnGetFile(void);
  123.     afx_msg void OnPutFile(void);
  124.     DECLARE_MESSAGE_MAP();
  125. public:
  126.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  127.     TFileDlg(PCGcpWnd AParent, LPSTR AName);
  128.     ~TFileDlg() {};
  129.     void OnCancel();
  130. };
  131.  
  132. // Declare THostTableDlg, a CDialog descendant
  133. class THostTableDlg : public CDialog
  134. {
  135. public:
  136.     PCGcpWnd GetParent(void) {return (PCGcpWnd)CDialog::GetParent();}
  137.     THostTableDlg(PCGcpWnd AParent, LPSTR AName);
  138.     ~THostTableDlg() {};
  139.     BOOL OnInitDialog();
  140. };
  141.  
  142. // Declare CGcpWnd, a TWindow descendant
  143. class CGcpWnd : public CFrameWnd
  144. {
  145.     // Modeless dialog boxes
  146.     //TPhoneDlg PhoneDlg;
  147.     PTFileDlg pFileDlg;
  148.     PTBufferDlg pBufferDlg;
  149.     PTConnectTcpDlg pConnectTcpDlg;
  150.     PTConnectTelnetDlg pConnectTelnetDlg;
  151.     PTConnectUdpDlg pConnectUdpDlg;
  152.     PTConnectTftpDlg pConnectTftpDlg;
  153. //    PCTelnetCommandsDlg pTelnetCmdDlg;
  154.  
  155.     void TranslateMessage(char *theOutput,GCP_COMMAND MsgType);
  156.     void TranslateType(char *theOutput,GCP_SESSION_TYPE Type);
  157.     void ShowData(GCP_COMMAND, GCP_SESSION_TYPE);
  158.     void Append(LPSTR DisplayString);
  159.     void FormatError(GCP_ERROR,char *);
  160.     CEdit EditWnd;
  161.     afx_msg void OnSize(UINT, int, int);
  162.     afx_msg void OnClose (void);
  163.     afx_msg LONG SendCallback (WPARAM, LPARAM);
  164.     afx_msg LONG PostCallback (WPARAM, LPARAM);
  165.     afx_msg void OnShow(void);
  166.     afx_msg void OnHide (void);
  167.     afx_msg void OnTelnet (void);
  168.     afx_msg void OnTcp (void);
  169.     afx_msg void OnTftp (void);
  170.     afx_msg void OnUdp (void);
  171.     afx_msg void OnBuffer (void);
  172.     afx_msg void OnFile (void);
  173.     afx_msg void OnAgentClose (void);
  174.     afx_msg void OnAgentAbort (void);
  175.     afx_msg void OnHostTable (void);
  176.     afx_msg void OnLocalHost (void);
  177.     afx_msg void OnAbout (void);
  178.     afx_msg void OnIndex (void);
  179.     afx_msg void OnTelnetCmd (void);
  180.     DECLARE_MESSAGE_MAP();
  181. public:
  182.     BOOL Closing;
  183.     GCP_STATUS        Status;                            // Area for data
  184.     GCP_ERROR ShowData(GCP_ERROR ReturnValue, LPSTR DisplayString);
  185.     CGcpWnd();
  186.     ~CGcpWnd();
  187. };
  188.