tldm-universe/Ardent/UV/gcidir/include/api_public.h
2024-09-09 17:51:08 -04:00

303 lines
16 KiB
C
Executable File

/******************************************************************************
*
* api_public.h - public include file for both ends of the Intercall api
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 04/01/98 22815 RJE Added Teminos security functionality
* 11/31/97 22201 AGM Added LOCAL_CONNECTION_STRING
* 06/02/97 20104 DW Prepare NLS errors to match new NLS locale codes
* 05/27/97 20104 DW Fix IK_mark tokens to match UniVerse NLSsetsrvmap
* 03/07/97 20104 DW Added NLS tokens.
* 07/16/96 18856 ALC Changed meaning of 80011 and 80019. 8011 is now a
* failure to login (login id or password incorrect)
* 80019 is a password expired failure.
* 06/06/96 18451 DJD CHhanged EXTERN's so it will build on 16bit clients.
* 05/15/95 18451 DJD Added support for NT Port.
* 05/01/96 18115 DJD Added IE_CREATE_FAILED
* 03/28/96 18208 AGM Add IE_SR_SELECT_FAIL
* 03/26/96 18189 DJD Added error for icsessioninfo
* 02/01/96 18025 DJD InterCall 2.1 functionality.
* 12/05/95 17162 AGM Add old IE_ tokens for compatibility
* 11/23/95 17162 DJD Added another one line fix
* 11/08/95 17162 DJD Added login and account code.
* 10/26/95 17162 DJD Changes for new execute.
* 01/04/95 17162 GMM Module Created (based on icerrors.h)
*
******************************************************************************/
/* execute special control codes */
#define ENDOFEXECUTE 0x03
#define INPUTEXECUTE 0x04
/* Communication tokens */
#define UVCS_SOCKREAD 1
#define UVCS_PIPEREAD 2
#define UVCS_INTERNAL_PACKET 3
/* The magic string that is put into the username field when a UNIX host
requires a direct connection to its local UNIX server. The colons in
this string guarentee that this can never match a valid unix users
name. */
#define LOCAL_CONNECTION_STRING ":local:"
/* Platform dependant defines */
#ifdef MSWIN
#define PIPEHANDLE HANDLE
#else
#define PIPEHANDLE int
#endif
/* api function prototypes */
#ifdef MSWIN
extern int api_pipe_write(PIPEHANDLE, char *, unsigned int);
extern int api_pipe_read(PIPEHANDLE, char *, unsigned int);
extern int create_api_pipe(PIPEHANDLE);
extern void close_api_pipe(PIPEHANDLE);
#else
extern int api_pipe_write();
extern int api_pipe_read();
extern int create_api_pipe();
extern void close_api_pipe();
#endif
/* Define the tokens common to both client and server */
#define IK_DATA 0 /* Open the data portion */
#define IK_DICT 1 /* Open the dictionary portion */
#define IK_DELETE 0 /* Release any locks on that record during DELETE*/
#define IK_DELETEW 1 /* Release any locks on that record during DELETE + wait for lock in the first place */
#define IK_DELETEU 3 /* Retain any locks during DELETE*/
#define IK_READ 0 /* READ without locking */
#define IK_READU 2 /* READU lock */
#define IK_READUW 3 /* READU lock + wait for lock to clear */
#define IK_READL 4 /* READL lock */
#define IK_READLW 5 /* READL lock + wait for lock to clear */
#define IK_WAIT 1 /* An additive value to IK$READU and IK$READL*/
#define IK_WRITE 0 /* Release the lock during WRITE*/
#define IK_WRITEW 1 /* Release the lock during WRITE + wait for lock in the first place*/
#define IK_WRITEU 5 /* Retain the lock during WRITE */
#define IK_WRITEUW 6 /* Retain the lock during WRITE + wait for lock in the first place */
/* Transaction support */
#define IK_START 1 /* Starts a transaction */
#define IK_COMMIT 2 /* Commits a transaction */
#define IK_ROLLBACK 3 /* Rolls back a transaction */
/* NLS Mark keys, status and macros */
#define IK_MARK_MIN 1
#define IK_IM 6
#define IK_AM 5
#define IK_VM 4
#define IK_SM 3
#define IK_TM 2
#define IK_NULL 1
#define IK_MARK_MAX 6
#define NUMICMARKS 6 /* number of NLS marks stored - IM,FM,VM,SVM,TM,sqlNULL */
#define IE_NLS_DEFAULT 1 /* NLS status: default used */
#define IE_NLS_BAD_MARKS 2 /* NLS status: marks are not distinct */
/* will be ...
#define ICMAPNLSERROR(err) ( (err) == NLSE_NLS_NOT_ENABLED ? IE_NO_NLS :\
(err) == NLSE_MAP_NOT_FOUND ? IE_MAP_NOT_FOUND :\
(err) == NLSE_LOC_NOT_ENABLED ? IE_NO_LOCALE :\
(err) == NLSE_LOC_NOT_FOUND ? IE_LOCALE_NOT_FOUND :\
(err) == NLSE_LCERR_INVALIDCATEGORY ? IE_CATEGORY_NOT_FOUND :\
(err) )
*/
/* unfortunately these clash at the oment */
#define ICMAPNLSERROR(err) ( (err) == NLSE_NLS_NOT_ENABLED ? IE_NO_NLS :\
(err) == NLSE_MAP_NOT_FOUND ? IE_MAP_NOT_FOUND :\
(err) == NLSLCERR_NOTIMPLEMENTED ? IE_NO_LOCALE :\
(err) == NLSLCERR_NOTFOUND ? IE_LOCALE_NOT_FOUND :\
(err) == NLSLCERR_INVALIDCATEGORY ? IE_CATEGORY_NOT_FOUND :\
(err) )
/* AT Variable code's for GET/SET */
#define IK_AT_LOGNAME 1
#define IK_AT_PATH 2
#define IK_AT_USERNO 3
#define IK_AT_WHO 4
#define IK_AT_TRANSACTION 5
#define IK_AT_DATA_PENDING 6
#define IK_AT_USER_RETURN_CODE 7
#define IK_AT_SYSTEM_RETURN_CODE 8
#define IK_AT_NULL_STR 9
#define IK_AT_SCHEMA 10
#define IK_AT_TRANSACTION_LEVEL 11
/* Error numbers. */
/* Numbers relating to the C library on the PC. */
/* These are adapted from the file errno.h. */
#define IE_PC_CLIB_FIRST 14000 /* First error number in range */
#define IE_ENOENT 14002 /* No such file or directory */
#define IE_EIO 14005 /* I/O error */
#define IE_EBADF 14009 /* Bad file number */
#define IE_ENOMEM 14012 /* No memory available */
#define IE_EACCES 14013 /* Permission denied */
#define IE_EINVAL 14022 /* Invalid argument */
#define IE_ENFILE 14023 /* File table overflow */
#define IE_EMFILE 14024 /* Too many open files */
#define IE_ENOSPC 14028 /* No space left on device */
/* Numbers relating to the Virtual Socket Library on the PC. */
#define IE_BW_NETDOWN 14550 /* Network is down */
#define IE_BW_NETUNREACH 14551 /* Network is unreachable */
#define IE_BW_TIMEDOUT 14560 /* Connection timed out */
#define IE_BW_CONNREFUSED 14561 /* Connection refused */
#define IE_BW_HOSTUNREACH 14565 /* Host is unreachable */
#define IE_BW_USERS 14568 /* Too many users */
#define IE_COMMFILE_SECURITY 14593 /* Unable to read the command file, possible security breach */
/* Errors generatd from library routine calls */
#define IE_ALI 22000 /* Already initialised */
#define IE_BFN 22001 /* bad field number (READV, WRITEV...)*/
#define IE_BTS 22002 /* buffer.size too small or not valid number*/
#define IE_IID 22003 /* Illegal record ID */
#define IE_LRR 22004 /* last record read (READNEXT) */
#define IE_NFI 22005 /* file.tag is not a file identifier*/
#define IE_NIN 22006 /* Client library not initialised for this task*/
#define IE_NLK 22007 /* The file was not locked by your process*/
#define IE_NPI 22008 /* Prime INFORMATION is not available*/
#define IE_STR 22009 /* The FILEINFO result is a string.*/
#define IE_MEM 22010 /* no memory to DIM an array (OPEN)*/
#define IE_RLS 22011 /* Error releasing memory */
#define IE_BPF 22012 /* Bad Partitioned file */
#define IE_ALG 22013 /* Bad Partitioning algorithm */
#define IE_NUP 22014 /* Non-unique Part number */
#define IE_DNA 22015 /* Dynt not available */
/* Generic and visible file system errors */
#define IE_RNF 30001 /* Record not found */
#define IE_LCK 30002 /* File or record is locked by another user*/
#define IE_PAR 30010 /* Bad parameter */
#define IE_KEY 30011 /* Bad key */
#define IE_UFI 30086 /* Unimplemented FILEINFO request*/
#define IE_BIL 30094 /* Bad ID length */
#define IE_FIFS 30095 /* Fileid is incorrect for session */
#define IE_USC 30096 /* Unsupport Server command, functions not availble let */
#define IE_SELFAIL 30097 /* Select Failed */
#define IE_LOCKINVALID 30098 /* Lock number provided is invalid */
#define IE_SEQOPENED 30099 /* Filed opened for sequential access and hashed access tried */
#define IE_HASHOPENED 30100 /* Filed opened for hashed access and sequential access tried */
#define IE_SEEKFAILED 30101 /* Seek command failed */
#define IE_DATUMERROR 30102 /* Internal datum error */
#define IE_INVALIDATKEY 30103 /* Invalid Key used for GET/SET at variables */
#define IE_INVALIDFILEINFOKEY 30104 /* FILEINFO Key out of range */
#define IE_UNABLETOLOADSUB 30105 /* Unable to load subroutine on host */
#define IE_BADNUMARGS 30106 /* Bad number of arguments for subroutine, either too many or not enough */
#define IE_SUBERROR 30107 /* Subroutine failed to complete suceesfully */
#define IE_ITYPEFTC 30108 /* IType failed to complete correctly */
#define IE_ITYPEFAILEDTOLOAD 30109 /* IType failed to load */
#define IE_ITYPENOTCOMPILED 30110 /* The IType has not been compiled */
#define IE_BADITYPE 30111 /* It is not an itype or the itype is corrupt */
#define IE_INVALIDFILENAME 30112 /* Filename is null */
#define IE_WEOFFAILED 30113 /* Weofseq failed */
#define IE_EXECUTEISACTIVE 30114 /* An execute is currently active */
#define IE_EXECUTENOTACTIVE 30115 /* An execute is currently active */
#define IE_BADEXECUTESTATUS 30116 /* Internal execute error, execute has not return an expected status */
#define IE_INVALIDBLOCKSIZE 30117 /* Blocksize is invalid for call */
#define IE_BAD_CONTROL_CODE 30118 /* Bad trans control code */
#define IE_BAD_EXEC_CODE 30119 /* Execute did not send returncodes bad to client correctly */
#define IE_BAD_TTY_DUP 30120 /* failure to dup ttys */
#define IE_BAD_TX_KEY 30121 /* Bad Transaction Key */
#define IE_TX_COMMIT_FAILED 30122 /* Transaction commit has failed */
#define IE_TX_ROLLBACK_FAILED 30123 /* Transaction rollback has failed */
#define IE_TX_ACTIVE 30124 /* A Transaction is active so this action is forbidden */
#define IE_CANT_ACCESS_PF 30125 /* Can not access part files */
#define IE_FAIL_TO_CANCEL 30126 /* Failed to cancel the execute */
#define IE_INVALID_INFO_KEY 30127 /* Invalid session info key */
#define IE_CREATE_FAILED 30128 /* create of sequential file failed */
#define IE_DUPHANDLE_FAILED 30129 /* Failed to duplicate a pipe handle */
/* Errors for the Client/Server interface */
#define IE_LNA 33200 /* Select list not active */
#define IE_PAR1 33201 /* Bad parameter 1 */
#define IE_PAR2 33202 /* Bad parameter 2 */
#define IE_PAR3 33203 /* Bad parameter 3 */
#define IE_PAR4 33204 /* Bad parameter 4 */
#define IE_PAR5 33205 /* Bad parameter 5 */
#define IE_PAR6 33206 /* Bad parameter 6 */
#define IE_PAR7 33207 /* Bad parameter 7 */
#define IE_PAR8 33208 /* Bad parameter 8 */
#define IE_PAR9 33209 /* Bad parameter 9 */
#define IE_BSLN 33211 /* Bad select list number */
#define IE_BPID 33212 /* Bad partfile id */
#define IE_BAK 33213 /* Bad AK file */
#define IE_NO_VOC 39003 /* can't open the VOC file */
#define IE_SOCKET_CLOSED 39115 /* Host has closed socket */
#define IE_BAD_HOST_NAME 39116 /* Failed to get address for this host*/
#define IE_FATAL 39117 /* Fatal error */
#define IE_BAD_ERROR 39118 /* Bad error number from host, i.e. error 0*/
#define IE_AT_INPUT 39119 /* Server waiting for input */
#define IE_SESSION_NOT_OPEN 39120 /* Session is not opened when an action has be tried on it */
#define IE_UVEXPIRED 39121 /* The Universe license has expired */
#define IE_CSVERSION 39122 /* Client or server is out of date Client/server functions have been updated*/
#define IE_COMMSVERSION 39123 /* Client or server is out of date comms support has been updated */
#define IE_BADSIG 39124 /* Incorrect client/server being commuincated with */
#define IE_BADDIR 39125 /* The dicteroy you are connecting to, either is not a universe account or does not exist */
#define IE_SERVERERR 39126 /* An error has occurred on the server when trying to transmit an error code to the client */
#define IE_BAD_UVHOME 39127 /* Unable to get the uv home coorectly */
#define IE_INVALIDPATH 39128 /* Bad path found UV.ACCOUNTS file */
#define IE_INVALIDACCOUNT 39129 /* Account name given is not an account */
#define IE_BAD_UVACCOUNT_FILE 39130 /* UV.ACCOUNT file could not be found to opened */
#define IE_FTA_NEW_ACCOUNT 39131 /* Failed to attach to the account specified */
#define IE_NOT_UVACCOUNT 39132 /* not a valid universe account */
#define IE_FTS_TERMINAL 39133 /* failed to setup the terminal for server */
#define IE_ULR 39134 /* user limited reached */
#define IE_NO_NLS 39135 /* NLS not available */
#define IE_MAP_NOT_FOUND 39136 /* NLS map not found */
#define IE_NO_LOCALE 39137 /* NLS locale support not available */
#define IE_LOCALE_NOT_FOUND 39138 /* NLS locale not found */
#define IE_CATEGORY_NOT_FOUND 39139 /* NLS locale catagory not found */
#define IE_SR_CREATE_PIPE_FAIL 39200 /* Server failed to create the slave pipes */
#define IE_SR_SOCK_CON_FAIL 39201 /* Server failed to connect to socket */
#define IE_SR_GA_FAIL 39202 /* Slave failed to give server the Go Ahead message */
#define IE_SR_MEMALLOC_FAIL 39203 /* Failed to allocate memory for the message from the slave */
#define IE_SR_SLAVE_EXEC_FAIL 39204 /* The slave failed to start correctly */
#define IE_SR_PASS_TO_SLAVE_FAIL 39205 /* Failed to the pass the message to the slave correctly */
#define IE_SR_EXEC_ALLOC_FAIL 39206 /* Server failed to allocate the memory for the execute buffer correctly */
#define IE_SR_SLAVE_READ_FAIL 39207 /* Failed to read from the slave correctly */
#define IE_SR_REPLY_WRITE_FAIL 39208 /* Failed to write the reply to the slave (ic_inputreply) */
#define IE_SR_SIZE_READ_FAIL 39209 /* Failed to read the size of the message from the slave */
#define IE_SR_SELECT_FAIL 39210 /* Server failed to select() on input channel */
#define IE_SR_SELECT_TIMEOUT 39211 /* The select has timed out */
#define IE_BAD_LOGINNAME 80011 /* Incorrect login name or password provided */
#define IE_BAD_PASSWORD 80019 /* Password has expired */
/* End of File */