]> git.ipfire.org Git - thirdparty/squid.git/blob - src/typedefs.h
Remove unnecessary typedefs.h:DTCB
[thirdparty/squid.git] / src / typedefs.h
1 /*
2 * Copyright (C) 1996-2015 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
11 #ifndef SQUID_TYPEDEFS_H
12 #define SQUID_TYPEDEFS_H
13
14 typedef int32_t sfileno;
15 typedef signed int sdirno;
16
17 typedef uint32_t nfmark_t;
18 typedef unsigned char tos_t;
19
20 typedef struct {
21 size_t bytes;
22 size_t kb;
23 } kb_t;
24
25 typedef struct _CommWriteStateData CommWriteStateData;
26
27 #if SQUID_SNMP
28 #include "cache_snmp.h"
29 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
30 #endif
31
32 typedef void FREE(void *);
33 typedef void PF(int, void *);
34
35 /* disk.c / diskd.c callback typedefs */
36 typedef void DRCB(int, const char *buf, int size, int errflag, void *data);
37 /* Disk read CB */
38 typedef void DWCB(int, int, size_t, void *); /* disk write CB */
39 typedef void DOCB(int, int errflag, void *data); /* disk open CB */
40 typedef void DCCB(int, int errflag, void *data); /* disk close CB */
41 typedef void DUCB(int errflag, void *data); /* disk unlink CB */
42
43 namespace Dns
44 {
45 class LookupDetails;
46 }
47 typedef void FQDNH(const char *, const Dns::LookupDetails &details, void *);
48
49 #include "anyp/ProtocolType.h"
50 class CachePeer;
51 typedef void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data);
52
53 /* in wordlist.h */
54
55 class wordlist;
56 typedef void UH(void *data, wordlist *);
57
58 /**
59 * READ_HANDLER functions return < 0 if, and only if, they fail with an error.
60 * On error, they must pass back an error code in 'errno'.
61 */
62 typedef int READ_HANDLER(int, char *, int);
63
64 /**
65 * WRITE_HANDLER functions return < 0 if, and only if, they fail with an error.
66 * On error, they must pass back an error code in 'errno'.
67 */
68 typedef int WRITE_HANDLER(int, const char *, int);
69
70 typedef int QS(const void *, const void *); /* qsort */
71 typedef void STABH(void *);
72 typedef void ERCB(int fd, void *, size_t);
73 class StoreEntry;
74 typedef void SIGHDLR(int sig);
75 typedef void STVLDCB(void *, int, int);
76 typedef int HLPSAVAIL(void *);
77 typedef void HLPSONEQ(void *);
78 typedef void HLPCMDOPTS(int *argc, char **argv);
79
80 /* MD5 cache keys */
81 typedef unsigned char cache_key;
82
83 /* in case we want to change it later */
84 typedef ssize_t mb_size_t;
85
86 typedef int STDIRSELECT(const StoreEntry *);
87
88 /*Use uint64_t to store miliseconds*/
89 typedef uint64_t time_msec_t;
90 #endif /* SQUID_TYPEDEFS_H */
91