Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef LIBPQ_H
00015 #define LIBPQ_H
00016
00017 #include <sys/types.h>
00018 #include <netinet/in.h>
00019
00020 #include "lib/stringinfo.h"
00021 #include "libpq/libpq-be.h"
00022
00023
00024
00025
00026
00027
00028
00029 typedef struct
00030 {
00031 int len;
00032 int isint;
00033 union
00034 {
00035 int *ptr;
00036 int integer;
00037 } u;
00038 } PQArgBlock;
00039
00040
00041
00042
00043
00044
00045
00046
00047 extern int StreamServerPort(int family, char *hostName,
00048 unsigned short portNumber, char *unixSocketDir,
00049 pgsocket ListenSocket[], int MaxListen);
00050 extern int StreamConnection(pgsocket server_fd, Port *port);
00051 extern void StreamClose(pgsocket sock);
00052 extern void TouchSocketFiles(void);
00053 extern void pq_init(void);
00054 extern void pq_comm_reset(void);
00055 extern int pq_getbytes(char *s, size_t len);
00056 extern int pq_getstring(StringInfo s);
00057 extern int pq_getmessage(StringInfo s, int maxlen);
00058 extern int pq_getbyte(void);
00059 extern int pq_peekbyte(void);
00060 extern int pq_getbyte_if_available(unsigned char *c);
00061 extern int pq_putbytes(const char *s, size_t len);
00062 extern int pq_flush(void);
00063 extern int pq_flush_if_writable(void);
00064 extern bool pq_is_send_pending(void);
00065 extern int pq_putmessage(char msgtype, const char *s, size_t len);
00066 extern void pq_putmessage_noblock(char msgtype, const char *s, size_t len);
00067 extern void pq_startcopyout(void);
00068 extern void pq_endcopyout(bool errorAbort);
00069
00070
00071
00072
00073 extern char *ssl_cert_file;
00074 extern char *ssl_key_file;
00075 extern char *ssl_ca_file;
00076 extern char *ssl_crl_file;
00077
00078 extern int secure_initialize(void);
00079 extern bool secure_loaded_verify_locations(void);
00080 extern void secure_destroy(void);
00081 extern int secure_open_server(Port *port);
00082 extern void secure_close(Port *port);
00083 extern ssize_t secure_read(Port *port, void *ptr, size_t len);
00084 extern ssize_t secure_write(Port *port, void *ptr, size_t len);
00085
00086 #endif