home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / eclcinfo.hpp < prev    next >
C/C++ Source or Header  |  2002-02-28  |  3KB  |  67 lines

  1. //-------------------------------------------------------------------------------
  2. // Module:  eclcinfo.hpp
  3. //-------------------------------------------------------------------------------
  4. //
  5. // Description:  ECLConnection class header file.  Base class for all PCOMM 
  6. //               session-specific objects (e.g. PS, OIA, etc).  Can also be 
  7. //               used stand-alone to query the status of a particular host 
  8. //               connection.
  9. //
  10. //-------------------------------------------------------------------------------
  11. // Copyright Notice: IBM Personal Communication/3270 Version 4.3
  12. //                   (C) COPYRIGHT IBM CORP. 1989,1998 - PROGRAM PROPERTY
  13. //                   OF IBM ALL RIGHTS RESERVED
  14. //-------------------------------------------------------------------------------
  15. #include "eclall.hpp"
  16. #ifndef _HSINFO_HPP_
  17. #define _HSINFO_HPP_
  18.  
  19. #define ENCRYPTION_NONE       0x00                                         
  20. #define ENCRYPTION_NOKEY      0x01                                         
  21. #define ENCRYPTION_40BIT      0x02                                         
  22. #define ENCRYPTION_56BIT      0x04                                         
  23. #define ENCRYPTION_128BIT     0x08                                         
  24. #define ENCRYPTION_168BIT     0x10                                         
  25.  
  26. class ECLConnData;                          // Forward declaration 
  27. class DllExport ECLConnection: public ECLBase
  28. {
  29.  
  30.   private: // Class private data
  31.     ECLConnData *ConnPd;                
  32.  
  33.  
  34.   private: // Constructors and operators not allowed on this object
  35.     ECLConnection();
  36.     ECLConnection(const ECLConnection &From);
  37.     ECLConnection& operator= (const ECLConnection &From);
  38.  
  39.   public:
  40.  
  41.     ECLConnection(long ConnHandle);         // Construct from connection handle
  42.     ECLConnection(char ConnName);           // Construct from connection name
  43.     ~ECLConnection();
  44.  
  45.     // Information functions
  46.     long  GetHandle() const;                // Connection handle
  47.     int   GetConnType() const;              // Connection type (HOSTTYPE_* constant)
  48.     char  GetName() const;                  // EHLLAPI short name
  49.     unsigned int GetCodePage() const;       // Connection code page
  50.     BOOL  IsStarted() const;                // Connection is running?
  51.     BOOL  IsCommStarted() const;            // Connection connected to a host?
  52.     BOOL  IsAPIEnabled() const;             // Connection is enabled for APIs?
  53.     BOOL  IsReady() const;                  // Started & CommStarted & APIEnabled?
  54.     BOOL  IsDBCSHost() const;               // Host code page is known DBCS code page
  55.  
  56.     // Communications functions
  57.     void StartCommunication();              // Start communications with host
  58.     void StopCommunication();               // Stop communications with host
  59.     void RegisterCommEvent(ECLCommNotify *CommNotifyClass, BOOL InitEvent=TRUE);
  60.     void UnregisterCommEvent(ECLCommNotify *CommNotifyClass);
  61.     int GetEncryptionLevel()const;                                         
  62. };
  63.  
  64. typedef ECLConnection * PECLConnection;
  65.  
  66. #endif //_HSINFO_HPP_
  67.