1/**************************************************************************/
2/* PLGCNX.H */
3/* Copyright to the author: Olivier Bertrand 2000-2014 */
4/* */
5/* This is the connection DLL's declares. */
6/**************************************************************************/
7#if !defined(_PLGCNX_H)
8#define _PLGCNX_H
9
10#define MAXMSGLEN 65512 /* Default max length of cnx message */
11#define MAXERRMSG 512 /* Max length of error messages */
12#define MAXMESSAGE 256 /* Max length of returned messages */
13#define MAXDBNAME 128 /* Max length of DB related names */
14
15/**************************************************************************/
16/* API Function return codes. */
17/**************************************************************************/
18enum FNRC {RC_LICENSE = 7, /* PLGConnect prompt for license key */
19 RC_PASSWD = 6, /* PLGConnect prompt for User/Pwd */
20 RC_SUCWINFO = 5, /* Succes With Info return code */
21 RC_SOCKET = 4, /* RC from PLGConnect to socket DLL */
22 RC_PROMPT = 3, /* Intermediate prompt return */
23 RC_CANCEL = 2, /* Command was cancelled by user */
24 RC_PROGRESS = 1, /* Intermediate progress info */
25 RC_SUCCESS = 0, /* Successful function (must be 0) */
26 RC_MEMORY = -1, /* Storage allocation error */
27 RC_TRUNCATED = -2, /* Result has been truncated */
28 RC_TIMEOUT = -3, /* Connection timeout occurred */
29 RC_TOOBIG = -4, /* Data is too big for connection */
30 RC_KEY = -5, /* Null ptr to key in Connect */
31 /* or bad key in other functions */
32 RC_MAXCONN = -6, /* Too many conn's for one process */
33 RC_MAXCLIENT = -7, /* Too many clients for one system */
34 RC_SYNCHRO = -8, /* Synchronization error */
35 RC_SERVER = -9, /* Error related to the server */
36 RC_MAXCOL = -10, /* Result has too many columns */
37 RC_LAST = -10}; /* Other error codes are < this and */
38 /* are system errors. */
39
40/**************************************************************************/
41/* Standard function return codes. */
42/**************************************************************************/
43#if !defined(RC_OK_DEFINED)
44#define RC_OK_DEFINED
45enum RCODE {RC_OK = 0, /* No error return code */
46 RC_NF = 1, /* Not found return code */
47 RC_EF = 2, /* End of file return code */
48 RC_FX = 3, /* Error return code */
49 RC_INFO = 4}; /* Success with info */
50#endif // !RC_OK_DEFINED
51
52/**************************************************************************/
53/* Index of info values within the info int integer array. */
54/**************************************************************************/
55enum INFO {INDX_RC, /* Index of PlugDB return code field */
56 INDX_TIME, /* Index of elapsed time in millisec */
57 INDX_CHG, /* Index of Language or DB changed */
58 INDX_RSAV, /* Index of Result Set availability */
59 INDX_TYPE, /* Index of returned data type field */
60 INDX_LINE, /* Index of number of lines field */
61 INDX_LEN, /* Index of line length field */
62 INDX_SIZE, /* Index of returned data size field */
63 INDX_MAX}; /* Size of info array */
64
65#endif /* !_PLGCNX_H */
66
67/* ------------------------- End of Plgcnx.h ---------------------------- */
68