]> granicus.if.org Git - postgresql/blob - src/include/libpq/pqformat.h
Remove cvs keywords from all files.
[postgresql] / src / include / libpq / pqformat.h
1 /*-------------------------------------------------------------------------
2  *
3  * pqformat.h
4  *              Definitions for formatting and parsing frontend/backend messages
5  *
6  * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/libpq/pqformat.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PQFORMAT_H
14 #define PQFORMAT_H
15
16 #include "lib/stringinfo.h"
17
18 extern void pq_beginmessage(StringInfo buf, char msgtype);
19 extern void pq_sendbyte(StringInfo buf, int byt);
20 extern void pq_sendbytes(StringInfo buf, const char *data, int datalen);
21 extern void pq_sendcountedtext(StringInfo buf, const char *str, int slen,
22                                    bool countincludesself);
23 extern void pq_sendtext(StringInfo buf, const char *str, int slen);
24 extern void pq_sendstring(StringInfo buf, const char *str);
25 extern void pq_send_ascii_string(StringInfo buf, const char *str);
26 extern void pq_sendint(StringInfo buf, int i, int b);
27 extern void pq_sendint64(StringInfo buf, int64 i);
28 extern void pq_sendfloat4(StringInfo buf, float4 f);
29 extern void pq_sendfloat8(StringInfo buf, float8 f);
30 extern void pq_endmessage(StringInfo buf);
31
32 extern void pq_begintypsend(StringInfo buf);
33 extern bytea *pq_endtypsend(StringInfo buf);
34
35 extern void pq_puttextmessage(char msgtype, const char *str);
36 extern void pq_putemptymessage(char msgtype);
37
38 extern int      pq_getmsgbyte(StringInfo msg);
39 extern unsigned int pq_getmsgint(StringInfo msg, int b);
40 extern int64 pq_getmsgint64(StringInfo msg);
41 extern float4 pq_getmsgfloat4(StringInfo msg);
42 extern float8 pq_getmsgfloat8(StringInfo msg);
43 extern const char *pq_getmsgbytes(StringInfo msg, int datalen);
44 extern void pq_copymsgbytes(StringInfo msg, char *buf, int datalen);
45 extern char *pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes);
46 extern const char *pq_getmsgstring(StringInfo msg);
47 extern void pq_getmsgend(StringInfo msg);
48
49 #endif   /* PQFORMAT_H */