tldm-universe/Ardent/UV/gcidir/include/localsrv.h

118 lines
3.8 KiB
C
Raw Normal View History

2024-09-09 21:51:08 +00:00
#ifndef localsrv_h
#define localsrv_h
/******************************************************************************
*
* Header file for local uniVerse server modules
*
* 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 intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 08/11/99 24446 SAP Port Linux to 9.5.1
* 10/14/98 23801 SAP Change copyrights.
* 06/08/98 21794 CSM Store client uci version in login block
* 08/08/96 18994 ENF Save/set the empty_null bit
* 06/25/96 18696 MGM Set layer.type in ESTABLISH_LAYER
* 04/22/96 18242 ENF Fix warning messages out of ESTABLISH_LAYER
* 04/16/96 18162 MJC LAYER macros set layer_count instead of shm_err
* 11/27/95 17689 ENF Rename LGIFLAGS => LGIBFLAGS
* 05/09/95 16358 AGM Rename FCONTROL as it clashes with NT system name
* 05/05/95 15921 ENF Allow ^C abort to work properly locally
* 04/25/95 15921 ENF Initial submission.
*
*****************************************************************************/
/*** Definitions for the local uniVerse server ***/
/*** Define constants for RPC operations ***/
#define UVSRV_LOGON 1
#define UVSRV_OPEN 2
#define UVSRV_ASSOCIATE 3
#define UVSRV_CANCEL 4
#define UVSRV_CLOSE 5
#define UVSRV_COMMIT 6
#define UVSRV_ROLLBACK 7
#define UVSRV_ERRORMESSAGE 8
#define UVSRV_EXEC 9
#define UVSRV_LOGOFF 10
#define UVSRV_DEFINE 11
#define UVSRV_BIND 12
#define UVSRV_nDESCRIBE 13
#define UVSRV_FETCH 14
#define UVSRV_TXBEGIN 15
/*** Define some macros for dealing with the layer structures ***/
#define ESTABLISH_LAYER(errloc) if ((msg_no = UVSETJMP(layer.env)))\
goto errloc;\
else\
{\
SQLsrverr.layer_count++;\
saved_empty_null = SQLsrverr.srverrflg.empty_null;\
if (empty_null) SQLsrverr.srverrflg.empty_null = 1;\
layer.fatal = 0;\
layer.warning = 0;\
layer.type = L_CLIENT;\
layer_setup(&layer);\
}
#define RESET_LAYER layer_reset(&layer);\
SQLsrverr.srverrflg.empty_null = saved_empty_null; \
SQLsrverr.layer_count--;
#define RESET_LAYER_ERR(cp) unload_err( cp );\
SQLsrverr.layer_count--;\
SQLsrverr.srverrflg.empty_null = saved_empty_null; \
layer_reset(&layer);\
if (Ttype == LOCAL_TRANSPORT && \
msg_no >= 50001 && msg_no <= 50003) fatal_error(msg_no);
/*** Define a CursorInfoBlock (CIB). It serves to link together all the
*** cursors a client may open.
***/
typedef struct cib
{
SQLCURSOR *sqlcp;
UCIRefNum lognum;
struct cib *next;
} CIB;
/*** Define Login Block Flags ***/
typedef struct
{
BITMAP
manualmode:1, /* 1=> we're in manual mode */
isaschema:1; /* 1=> account we're connected to is a schema */
} LGIBFLAGS;
/*** Define a Login Block used to describe things about the connection
*** to a client. Each client connection has one login block.
***/
typedef struct lib
{
char *uid; /* Name of server user id */
char *acct; /* Account string from client */
CIB *cib; /* List of cursors we allocated */
FETCHCTRL fctrl; /* Fetch control area */
LGIBFLAGS libflags; /* Flags block */
SQLCURSOR localcp; /* Cursor for when none is allocated */
int localconnect; /* Local connect established flag */
int lognum; /* login ref num */
int savedisolevel; /* Saved isolation level for auto-commit mode */
short client_version; /* UCI (also for BCI) version of the client */
struct lib *next; /* In case we ever need > 1 */
} LIB;
#endif /* end of localsrv_h define */