home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / pcsapi32.h < prev    next >
Text File  |  2002-02-28  |  8KB  |  155 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*  Module Name     : PCSAPI32.H                                             */
  4. /*                                                                           */
  5. /*  Description     : 32 Bit PCSAPI Return Codes and Routines                */
  6. /*                                                                           */
  7. /*  Copyright Notice: IBM eNetwork Personal Communication                    */
  8. /*                    (C) COPYRIGHT IBM CORP. 1984,1997 - PROGRAM PROPERTY   */
  9. /*                    OF IBM ALL RIGHTS RESERVED                             */
  10. /*                                                                           */
  11. /*---------------------------------------------------------------------------*/
  12. /*  Function:                                                                */
  13. /*                                                                           */
  14. /*    Define the PCSAPI return code constants and the external               */
  15. /*    routines.                                                              */
  16. /*                                                                           */
  17. /*****************************************************************************/
  18. /* V4.2 changes:                                                             */
  19. /*   - Added pcsQuerySessionList() function and data structures              */
  20. /*   - Added ordinal entry point values for dynamic loading of PCSAPI32.DLL  */
  21. /*   - Added #define's for pcsStartSession() window-status parameter.        */
  22. /* V4.3 changes:                                                             */
  23. /*   - Added pcsSetLinkTimeout() function                                    */
  24. /* $A1                             Add symbols for PCSAPI RexxHLLAPI support */
  25. /* Defects                                                                   */
  26. /* ==========================================================================*/
  27. /*  flag   Defect#    rls  date    name description of change                */
  28. /*  $P1    DF45036   4.20 05/17/99 CIL  pcsConnectSession fails              */
  29. /*  $P2    AXA DCR   5.02 20010105 eeg  pcsQueryConnectionInfo               */
  30. /*****************************************************************************/
  31.  
  32. #ifdef __cplusplus                     /* C++ compiler                       */
  33.   extern "C" {
  34. #endif
  35.  
  36. /*--------------------------------------------------------------------------*/
  37. /*  General Purpose Definition                                              */
  38. /*--------------------------------------------------------------------------*/
  39. #define MAXPATHLEN                    256
  40.  
  41. /*--------------------------------------------------------------------------*/
  42. /*  Definition for Query Session Status                                     */
  43. /*--------------------------------------------------------------------------*/
  44.  
  45. #define PCS_SESSION_STARTED          0x00000001
  46. #define PCS_SESSION_ONLINE           0x00000002
  47. #define PCS_SESSION_API_ENABLED      0x00000004
  48. #define PCS_SESSION_INTERIM_STATE    0x00000008                    //@P1a
  49.  
  50. /*--------------------------------------------------------------------------*/
  51. /*  Definition for Start Session                                            */
  52. /*--------------------------------------------------------------------------*/
  53.  
  54. #define PCS_HIDE                     0
  55. #define PCS_SHOW                     1
  56. #define PCS_MINIMIZE                 2
  57. #define PCS_MAXIMIZE                 3
  58.  
  59. #define PCS_SUCCESSFUL               0
  60. #define PCS_INVALID_ID               1
  61. #define PCS_USED_ID                  2
  62. #define PCS_INVALID_PROFILE          3
  63. #define PCS_SYSTEM_ERROR             9
  64.  
  65. /*--------------------------------------------------------------------------*/
  66. /*  Definition for Stop Session                                             */
  67. /*--------------------------------------------------------------------------*/
  68.  
  69. #define PCS_SAVE_AS_PROFILE          0
  70. #define PCS_SAVE_ON_EXIT             1
  71. #define PCS_NOSAVE_ON_EXIT           2
  72.  
  73. // @A1+ [ added PCSAPI symbols ]
  74. /*--------------------------------------------------------------------------*/
  75. /*  Symbol definitions for RexxHLLAPI support                               */
  76. /*--------------------------------------------------------------------------*/
  77.  
  78. #define PCSAPI_START_SESSION            140     /* Rexx - pcsStartSession    */
  79. #define PCSAPI_STOP_SESSION             141     /* Rexx - pcsStopSession     */
  80. #define PCSAPI_START_COMMUNICATION      142     /* Rexx - pcsStartCommunicati*/
  81. #define PCSAPI_STOP_COMMUNICATION       143     /* Rexx - pcsStopCommunicatio*/
  82. #define PCSAPI_QUERY_SESSLIST           144     /* Rexx - pcsQuerySessionList*/
  83. #define PCSAPI_QUERY_EMULATOR_STAT      145     /* Rexx - pcsQueryEmulatorSta*/
  84. #define PCSAPI_QUERY_WS_PROFILE         146     /* Rexx - pcsQueryWSProfile  */
  85. // @A1+ [ end ]
  86.  
  87. /*--------------------------------------------------------------------------*/
  88. /*  Definition for Query Session List (added V4.2)                          */
  89. /*--------------------------------------------------------------------------*/
  90.  
  91. typedef union _SESSNAME {   // Name field of SessInfo structure
  92.   char ShortName;           // Short session ID (A-Z)
  93.   ULONG Handle;             // Session handle
  94.   } SESSNAME;
  95.  
  96. typedef struct _SESSINFO {  // Description of a single session
  97.   SESSNAME Name;            // Session name (ID or handle)
  98.   ULONG    Status;          // Session status (PCS_SESSION_* bit flags)
  99.   } SESSINFO;
  100.  
  101. typedef struct _CONNECTIONINFO { // Description of a connection
  102.   char hostName[63];             // telnet host name
  103.   char reserved1[1];             // reserved
  104.   int  portNumber;               // host port number
  105.   char luName[17];               // LU name
  106.   char reserved2[3];             // reserved
  107.   BOOL sslIndicator;             // Secure Connection indicator
  108.   char reserved3[256];           // reserved
  109.   } CONNECTIONINFO;
  110.  
  111. /*--------------------------------------------------------------------------*/
  112. /*  Function Prototypes                                                     */
  113. /*--------------------------------------------------------------------------*/
  114. #if defined(__OS2__)
  115.   #define PCSAPI_ENTRY APIENTRY
  116. #else
  117.   #define PCSAPI_ENTRY WINAPI
  118. #endif
  119.  
  120. ULONG PCSAPI_ENTRY pcsQueryEmulatorStatus(char);
  121. BOOL  PCSAPI_ENTRY pcsQueryWorkstationProfile(char, PSZ);
  122. ULONG PCSAPI_ENTRY pcsStartSession(PSZ, char, USHORT);
  123. BOOL  PCSAPI_ENTRY pcsStopSession(char, USHORT);
  124. BOOL  PCSAPI_ENTRY pcsConnectSession(char);
  125. BOOL  PCSAPI_ENTRY pcsDisconnectSession(char);
  126. ULONG PCSAPI_ENTRY pcsQuerySessionList(ULONG Count, SESSINFO *SessList); // Added V4.2
  127. #if defined(_V43)
  128. ULONG PCSAPI_ENTRY pcsSetLinkTimeout(char, USHORT); // Added V4.3
  129. #endif
  130. #if defined(_V50)
  131. BOOL  PCSAPI_ENTRY pcsQueryConnectionInfo(char, CONNECTIONINFO *);  // @P2A
  132. #endif
  133.  
  134. /*--------------------------------------------------------------------------*/
  135. /*  Ordinal numbers for function entry points                               */
  136. /*--------------------------------------------------------------------------*/
  137.  
  138. #define ord_pcsQueryEmulatorStatus     3
  139. #define ord_pcsQueryWorkstationProfile 4
  140. #define ord_pcsStartSession            5
  141. #define ord_pcsStopSession             6
  142. #define ord_pcsConnectSession          7
  143. #define ord_pcsDisconnectSession       8
  144. #define ord_pcsQuerySessionList        9
  145. #if defined(_V43)
  146. #define ord_pcsSetLinkTimeout          10
  147. #endif
  148. #if defined(_V50)
  149. #define ord_pcsQueryConnectionInfo     11
  150. #endif
  151.  
  152. #ifdef __cplusplus
  153.   }
  154. #endif
  155.