]> git.ipfire.org Git - thirdparty/squid.git/blob - src/typedefs.h
Renamed struct peer to class CachePeer.
[thirdparty/squid.git] / src / typedefs.h
1 /*
2 *
3 * SQUID Web Proxy Cache http://www.squid-cache.org/
4 * ----------------------------------------------------------
5 *
6 * Squid is the result of efforts by numerous individuals from
7 * the Internet community; see the CONTRIBUTORS file for full
8 * details. Many organizations have provided support for Squid's
9 * development; see the SPONSORS file for full details. Squid is
10 * Copyrighted (C) 2001 by the Regents of the University of
11 * California; see the COPYRIGHT file for full details. Squid
12 * incorporates software developed and/or copyrighted by other
13 * sources; see the CREDITS file for full details.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
28 *
29 */
30
31 #include "enums.h"
32 #include "rfc1035.h"
33
34 #ifndef SQUID_TYPEDEFS_H
35 #define SQUID_TYPEDEFS_H
36
37 typedef int32_t sfileno;
38 typedef signed int sdirno;
39
40 typedef uint32_t nfmark_t;
41 typedef unsigned char tos_t;
42
43 typedef struct {
44 size_t bytes;
45 size_t kb;
46 } kb_t;
47
48 typedef struct _CommWriteStateData CommWriteStateData;
49
50 #if USE_SSL
51 typedef struct _sslproxy_cert_sign sslproxy_cert_sign;
52
53 typedef struct _sslproxy_cert_adapt sslproxy_cert_adapt;
54 #endif
55
56 #if SQUID_SNMP
57 #include "snmp_vars.h"
58 #include "cache_snmp.h"
59 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
60
61 typedef struct _snmp_request_t snmp_request_t;
62 #endif
63
64 typedef void FREE(void *);
65 typedef void CBDUNL(void *);
66 typedef void FOCB(void *, int fd, int errcode);
67 typedef void PF(int, void *);
68
69 /* disk.c / diskd.c callback typedefs */
70 typedef void DRCB(int, const char *buf, int size, int errflag, void *data);
71 /* Disk read CB */
72 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
73 typedef void DOCB(int, int errflag, void *data); /* disk open CB */
74 typedef void DCCB(int, int errflag, void *data); /* disk close CB */
75 typedef void DUCB(int errflag, void *data); /* disk unlink CB */
76 typedef void DTCB(int errflag, void *data); /* disk trunc CB */
77
78 class DnsLookupDetails;
79 typedef void FQDNH(const char *, const DnsLookupDetails &details, void *);
80 typedef void IDCB(const char *ident, void *data);
81
82 #include "anyp/ProtocolType.h"
83 class CachePeer;
84 typedef void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data);
85
86 typedef void RH(void *data, char *);
87 /* in wordlist.h */
88
89 class wordlist;
90 typedef void UH(void *data, wordlist *);
91 typedef int READ_HANDLER(int, char *, int);
92 typedef int WRITE_HANDLER(int, const char *, int);
93
94 typedef int QS(const void *, const void *); /* qsort */
95 typedef void STABH(void *);
96 typedef void ERCB(int fd, void *, size_t);
97 class StoreEntry;
98 typedef void OBJH(StoreEntry *);
99 typedef void SIGHDLR(int sig);
100 typedef void STVLDCB(void *, int, int);
101 typedef void HLPCB(void *, char *buf);
102 typedef int HLPSAVAIL(void *);
103 typedef void HLPSONEQ(void *);
104 typedef void HLPCMDOPTS(int *argc, char **argv);
105 typedef void IDNSCB(void *, const rfc1035_rr *, int, const char *);
106
107 /* MD5 cache keys */
108 typedef unsigned char cache_key;
109
110 /* in case we want to change it later */
111 typedef ssize_t mb_size_t;
112
113 typedef int STDIRSELECT(const StoreEntry *);
114
115 /*Use uint64_t to store miliseconds*/
116 typedef uint64_t time_msec_t;
117 #endif /* SQUID_TYPEDEFS_H */