File: pgtclId.h

package info (click to toggle)
pgtcl 1%3A1.9%2Bgit20120911-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,240 kB
  • ctags: 315
  • sloc: ansic: 4,475; tcl: 634; sh: 149; makefile: 36; sql: 11
file content (50 lines) | stat: -rw-r--r-- 2,071 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*-------------------------------------------------------------------------
 *
 * pgtclId.h
 *
 *	Contains Tcl "channel" interface routines, plus useful routines
 *	to convert between strings and pointers.  These are needed because
 *	everything in Tcl is a string, but in C, pointers to data structures
 *	are needed.
 *
 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * $Id$
 *
 *-------------------------------------------------------------------------
 */

#ifndef CONST84
#     define CONST84
#endif


extern int PgSetConnectionId(Tcl_Interp *interp, PGconn *conn, char *connhandle);

#define DRIVER_OUTPUT_PROTO ClientData cData, CONST84 char *buf, int bufSize, \
	int *errorCodePtr
#define DRIVER_INPUT_PROTO ClientData cData, char *buf, int bufSize, \
	int *errorCodePtr
#define DRIVER_DEL_PROTO ClientData cData, Tcl_Interp *interp

extern PGconn *PgGetConnectionId(Tcl_Interp *interp, CONST84 char *id,
				  Pg_ConnectionId **);
extern int	PgDelConnectionId(DRIVER_DEL_PROTO);
extern int	PgOutputProc(DRIVER_OUTPUT_PROTO);
extern int	PgInputProc(DRIVER_INPUT_PROTO);
extern int	PgSetResultId(Tcl_Interp *interp, CONST84 char *connid, PGresult *res);
extern PGresult *PgGetResultId(Tcl_Interp *interp, CONST84 char *id, Pg_resultid **resultidPtr);
extern void PgDelResultId(Tcl_Interp *interp, CONST84 char *id);
extern int	PgGetConnByResultId(Tcl_Interp *interp, CONST84 char *resid);
extern void PgStartNotifyEventSource(Pg_ConnectionId * connid);
extern void PgStopNotifyEventSource(Pg_ConnectionId * connid, pqbool allevents);
extern void PgNotifyTransferEvents(Pg_ConnectionId * connid);
extern void PgConnLossTransferEvents(Pg_ConnectionId * connid);
extern void PgNotifyInterpDelete(ClientData clientData, Tcl_Interp *interp);

extern int PgConnCmd(ClientData cData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]);
extern void PgDelCmdHandle(ClientData cData);
extern void PgDelResultHandle(ClientData cData);

extern Tcl_ChannelType Pg_ConnType;