00001 /* 00002 MODULE NAME eci_channel.h 00003 00004 DESCRIPTIVE NAME ECI Version 2.1 Channels and Containers 00005 Application Programming Interface 00006 00007 Service level: V8.0.0.1 00008 00009 Licensed Materials - Property of IBM 00010 00011 "Restricted Materials of IBM" 00012 00013 5724-I81 5725-B65 5655-W10 00014 00015 (c) Copyright IBM Corp. 2010 All Rights Reserved. 00016 00017 US Government Users Restricted Rights - Use, duplication or 00018 disclosure restricted by GSA ADP Schedule Contract with 00019 IBM Corp. 00020 00021 Status: Version 8 Release 0 00022 00023 00024 NOTES :- 00025 00026 This header file is provided with the CICS Transaction Gateway. These 00027 products are available for a number of different operating environments 00028 and to ensure the correct sections of this header are included, one of 00029 the following constants must be defined prior to inclusion: 00030 00031 CICS_W32 - if building a Windows application 00032 CICS_AIX - if building an AIX application 00033 CICS_SOL - if building a Solaris application 00034 CICS_HPUX - if building an HPUX application 00035 CICS_LNX if building a Linux application 00036 CICS_HPIT and CICS_HPUX - 00037 if building an HPUX application on Itanium 00038 */ 00045 #ifndef _ECI_CHANNEL_H 00046 #define _ECI_CHANNEL_H 00047 00048 #include <stdlib.h> 00049 00050 #if defined (CICS_W32) || defined(CICS_WNT) 00051 #define CICSCALL __cdecl 00052 #else 00053 #define CICSCALL 00054 #endif 00055 00056 00057 #if defined(CICS_AIX) 00058 #pragma options align=packed 00059 #elif defined(CICS_HPUX) 00060 #pragma pack 1 00061 #else 00062 #pragma pack(1) 00063 #endif 00064 00065 00066 00068 typedef struct _ECI_Channel_t* ECI_ChannelToken_t; 00069 00071 #define ECI_NULL_CHANNELTOKEN (ECI_ChannelToken_t) NULL 00072 00073 00075 typedef enum { 00076 00078 ECI_BIT = 0x01, 00079 00081 ECI_CHAR = 0x02 00082 00083 } ECI_CONTAINER_TYPE; 00084 00085 00087 typedef struct { 00088 00089 #define ECI_CONTAINERNAME_LENGTH 16 00090 00091 char name[ECI_CONTAINERNAME_LENGTH + 1]; 00092 00094 ECI_CONTAINER_TYPE type; 00095 00099 int ccsid; 00100 00102 size_t dataLength; 00103 00104 } ECI_CONTAINER_INFO; 00105 00106 00107 #define ECI_CHANNELNAME_LENGTH 16 00108 00109 00151 int CICSCALL ECI_createChannel(const char* name, 00152 ECI_ChannelToken_t* tokPtr); 00153 00171 int CICSCALL ECI_deleteChannel(ECI_ChannelToken_t* tokPtr); 00172 00173 00185 int CICSCALL ECI_deleteAllChannels(); 00186 00187 00207 int CICSCALL ECI_getChannelName(ECI_ChannelToken_t chanTok, 00208 char* nameBuffer); 00209 00210 00235 int CICSCALL ECI_getFirstContainer(ECI_ChannelToken_t chanTok, 00236 ECI_CONTAINER_INFO* infoPtr); 00237 00238 00276 int CICSCALL ECI_getNextContainer(ECI_ChannelToken_t chanTok, 00277 ECI_CONTAINER_INFO* infoPtr); 00278 00279 00335 int CICSCALL ECI_createContainer(ECI_ChannelToken_t chanTok, 00336 const char* name, 00337 ECI_CONTAINER_TYPE type, 00338 const int ccsid, 00339 const void* data, 00340 size_t dataLength); 00341 00342 00360 int CICSCALL ECI_deleteContainer(ECI_ChannelToken_t chanTok, 00361 const char* name); 00362 00363 00384 int CICSCALL ECI_getContainerInfo(ECI_ChannelToken_t chanTok, 00385 const char* name, 00386 ECI_CONTAINER_INFO* infoPtr); 00387 00388 00421 int CICSCALL ECI_getContainerData(ECI_ChannelToken_t chanTok, 00422 const char* name, 00423 void* buffer, 00424 size_t length, 00425 size_t offset, 00426 size_t* bytesReadPtr); 00427 00428 00456 int CICSCALL ECI_setContainerData(ECI_ChannelToken_t chanTok, 00457 const char* name, 00458 const void* data, 00459 size_t dataLength); 00460 00461 00463 #define ECI_NO_ERROR 0 00464 00466 #define ECI_ERR_INVALID_DATA_LENGTH -1 00467 00469 #define ECI_ERR_SYSTEM_ERROR -9 00470 00472 #define ECI_ERR_INVALID_CHANNEL -50 00473 00475 #define ECI_ERR_INVALID_NAME -51 00476 00478 #define ECI_ERR_NULLCHANNELPTR -52 00479 00481 #define ECI_ERR_CHANNELLOCKFAIL -53 00482 00484 #define ECI_ERR_ENDOFCONTAINERS -54 00485 00487 #define ECI_ERR_NULLINFOPTR -55 00488 00490 #define ECI_ERR_INVALID_TYPE -56 00491 00493 #define ECI_ERR_CONTAINER_NOTFOUND -58 00494 00496 #define ECI_ERR_CONTAINER_EXISTS -59 00497 00499 #define ECI_ERR_COMMAREA_AND_CHANNEL -60 00500 00502 #define ECI_ERR_NULLPTR -109 00503 00506 #define ECI_ERR_MEMORY_SHORTAGE -111 00507 00509 #define ECI_ERR_LOCKFAIL -121 00510 00511 00512 00513 #if defined(CICS_AIX) 00514 #pragma options align=reset 00515 #elif defined(CICS_HPUX) && defined(__cplusplus) 00516 #pragma pack 00517 #elif defined(CICS_HPUX) && defined(CICS_HPIT) 00518 #pragma pack 00519 #elif defined(CICS_HPUX) 00520 #pragma HP_ALIGN HPUX_NATURAL 00521 #else 00522 #pragma pack() 00523 #endif 00524 00525 00526 #endif /* _ECI_CHANNEL_H */ 00527
© Copyright IBM Corporation 2006, 2010. All rights reserved.
For legal information, see http://www.ibm.com/legal/copytrade.shtml