2 * Copyright (c) 1996-2013 by the citadel.org team
4 * This program is open source software. You can redistribute it and/or
5 * modify it under the terms of the GNU General Public License, version 3.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
13 int uds_connectsock(char *);
14 int tcp_connectsock(char *, char *);
15 int serv_getln(char *strbuf, int bufsize);
16 int StrBuf_ServGetln(StrBuf *buf);
19 * parse & check the server reply
21 * Line the line containing the server reply
22 * FullState if you need more than just the major number, this is returns it. Ignored if NULL.
23 * PutImportantMessage if you want to forward the text part of the server reply to the user, specify 1;
24 * the result will be put into the 'Important Message' framework.
25 * MajorOK in case of which major number not to put the ImportantMessage? 0 for all.
27 * returns the most significant digit of the server status
30 int GetServerStatusMsg(StrBuf *Line, long* FullState, int PutImportantMessage, int MajorOK);
33 * to migrate old calls....
35 #define GetServerStatus(a, b) GetServerStatusMsg(a, b, 0, 0)
37 int serv_puts(const char *string);
39 int serv_write(const char *buf, int nbytes);
40 int serv_putbuf(const StrBuf *string);
41 int serv_printf(const char *format,...)__attribute__((__format__(__printf__,1,2)));
42 int serv_read_binary(StrBuf *Ret, size_t total_len, StrBuf *Buf);
43 void serv_read_binary_to_http(StrBuf *MimeType, size_t total_len, int is_static, int detect_mime);
44 int StrBuf_ServGetBLOB(StrBuf *buf, long BlobSize);
45 int StrBuf_ServGetBLOBBuffered(StrBuf *buf, long BlobSize);
46 int read_server_text(StrBuf *Buf, long *nLines);
48 void text_to_server(char *ptr);
49 void text_to_server_qp(const StrBuf *SendMeEncoded);
50 void server_to_text(void);
51 int lingering_close(int fd);