]> git.ipfire.org Git - thirdparty/squid.git/blob - src/typedefs.h
Boilerplate: update copyright blurbs on src/
[thirdparty/squid.git] / src / typedefs.h
1 /*
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #include "enums.h"
10 #include "rfc1035.h"
11
12 #ifndef SQUID_TYPEDEFS_H
13 #define SQUID_TYPEDEFS_H
14
15 typedef int32_t sfileno;
16 typedef signed int sdirno;
17
18 typedef uint32_t nfmark_t;
19 typedef unsigned char tos_t;
20
21 typedef struct {
22 size_t bytes;
23 size_t kb;
24 } kb_t;
25
26 typedef struct _CommWriteStateData CommWriteStateData;
27
28 #if SQUID_SNMP
29 #include "cache_snmp.h"
30 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
31 #endif
32
33 typedef void FREE(void *);
34 typedef void CBDUNL(void *);
35 typedef void FOCB(void *, int fd, int errcode);
36 typedef void PF(int, void *);
37
38 /* disk.c / diskd.c callback typedefs */
39 typedef void DRCB(int, const char *buf, int size, int errflag, void *data);
40 /* Disk read CB */
41 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
42 typedef void DOCB(int, int errflag, void *data); /* disk open CB */
43 typedef void DCCB(int, int errflag, void *data); /* disk close CB */
44 typedef void DUCB(int errflag, void *data); /* disk unlink CB */
45 typedef void DTCB(int errflag, void *data); /* disk trunc CB */
46
47 class DnsLookupDetails;
48 typedef void FQDNH(const char *, const DnsLookupDetails &details, void *);
49 typedef void IDCB(const char *ident, void *data);
50
51 #include "anyp/ProtocolType.h"
52 class CachePeer;
53 typedef void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data);
54
55 /* in wordlist.h */
56
57 class wordlist;
58 typedef void UH(void *data, wordlist *);
59 typedef int READ_HANDLER(int, char *, int);
60 typedef int WRITE_HANDLER(int, const char *, int);
61
62 typedef int QS(const void *, const void *); /* qsort */
63 typedef void STABH(void *);
64 typedef void ERCB(int fd, void *, size_t);
65 class StoreEntry;
66 typedef void OBJH(StoreEntry *);
67 typedef void SIGHDLR(int sig);
68 typedef void STVLDCB(void *, int, int);
69 typedef int HLPSAVAIL(void *);
70 typedef void HLPSONEQ(void *);
71 typedef void HLPCMDOPTS(int *argc, char **argv);
72 typedef void IDNSCB(void *, const rfc1035_rr *, int, const char *);
73
74 /* MD5 cache keys */
75 typedef unsigned char cache_key;
76
77 /* in case we want to change it later */
78 typedef ssize_t mb_size_t;
79
80 typedef int STDIRSELECT(const StoreEntry *);
81
82 /*Use uint64_t to store miliseconds*/
83 typedef uint64_t time_msec_t;
84 #endif /* SQUID_TYPEDEFS_H */