1 /*------------------------------------------------------------------------- 2 * 3 * pgtclId.h 4 * 5 * Contains Tcl "channel" interface routines, plus useful routines 6 * to convert between strings and pointers. These are needed because 7 * everything in Tcl is a string, but in C, pointers to data structures 8 * are needed. 9 * 10 * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group 11 * Portions Copyright (c) 1994, Regents of the University of California 12 * 13 * $Id: pgtclId.h 107 2007-07-06 02:17:41Z lbayuk $ 14 * 15 *------------------------------------------------------------------------- 16 */ 17 18 extern void PgSetConnectionId(Tcl_Interp *interp, PGconn *conn); 19 20 #define DRIVER_OUTPUT_PROTO ClientData cData, CONST84 char *buf, int bufSize, \ 21 int *errorCodePtr 22 #define DRIVER_INPUT_PROTO ClientData cData, char *buf, int bufSize, \ 23 int *errorCodePtr 24 #define DRIVER_DEL_PROTO ClientData cData, Tcl_Interp *interp 25 26 extern PGconn *PgGetConnectionId(Tcl_Interp *interp, CONST84 char *id, 27 Pg_ConnectionId **); 28 extern int PgDelConnectionId(DRIVER_DEL_PROTO); 29 extern int PgOutputProc(DRIVER_OUTPUT_PROTO); 30 extern int PgInputProc(DRIVER_INPUT_PROTO); 31 extern int PgSetResultId(Tcl_Interp *interp, CONST84 char *connid, 32 PGresult *res); 33 extern PGresult *PgGetResultId(Tcl_Interp *interp, CONST84 char *id); 34 extern void PgDelResultId(Tcl_Interp *interp, CONST84 char *id); 35 extern int PgGetConnByResultId(Tcl_Interp *interp, CONST84 char *resid); 36 extern void PgStartNotifyEventSource(Pg_ConnectionId * connid); 37 extern void PgStopNotifyEventSource(Pg_ConnectionId * connid, char allevents); 38 extern void PgNotifyTransferEvents(Pg_ConnectionId * connid); 39 extern void PgConnLossTransferEvents(Pg_ConnectionId * connid); 40 extern void PgNotifyInterpDelete(ClientData clientData, Tcl_Interp *interp); 41 42 extern void PgClearResultCallback(Pg_ConnectionId *conn); 43 44 extern Tcl_ChannelType Pg_ConnType; 45