Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / include / libpq / libpq.h
blobc7e7161536bb0800eb51165eaab4e522f1a0274c
1 /*-------------------------------------------------------------------------
3 * libpq.h
4 * POSTGRES LIBPQ buffer structure definitions.
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
14 #ifndef LIBPQ_H
15 #define LIBPQ_H
17 #include <sys/types.h>
18 #include <netinet/in.h>
20 #include "lib/stringinfo.h"
21 #include "libpq/libpq-be.h"
23 /* ----------------
24 * PQArgBlock
25 * Information (pointer to array of this structure) required
26 * for the PQfn() call. (This probably ought to go somewhere else...)
27 * ----------------
29 typedef struct
31 int len;
32 int isint;
33 union
35 int *ptr; /* can't use void (dec compiler barfs) */
36 int integer;
37 } u;
38 } PQArgBlock;
41 * External functions.
45 * prototypes for functions in pqcomm.c
47 extern int StreamServerPort(int family, char *hostName,
48 unsigned short portNumber, char *unixSocketName, int ListenSocket[],
49 int MaxListen);
50 extern int StreamConnection(int server_fd, Port *port);
51 extern void StreamClose(int sock);
52 extern void TouchSocketFile(void);
53 extern void pq_init(void);
54 extern void pq_comm_reset(void);
55 extern int pq_getbytes(char *s, size_t len);
56 extern int pq_getstring(StringInfo s);
57 extern int pq_getmessage(StringInfo s, int maxlen);
58 extern int pq_getbyte(void);
59 extern int pq_peekbyte(void);
60 extern int pq_putbytes(const char *s, size_t len);
61 extern int pq_flush(void);
62 extern int pq_putmessage(char msgtype, const char *s, size_t len);
63 extern void pq_startcopyout(void);
64 extern void pq_endcopyout(bool errorAbort);
67 * prototypes for functions in be-secure.c
69 extern int secure_initialize(void);
70 extern bool secure_loaded_verify_locations(void);
71 extern void secure_destroy(void);
72 extern int secure_open_server(Port *port);
73 extern void secure_close(Port *port);
74 extern ssize_t secure_read(Port *port, void *ptr, size_t len);
75 extern ssize_t secure_write(Port *port, void *ptr, size_t len);
77 #endif /* LIBPQ_H */