]> git.ipfire.org Git - thirdparty/squid.git/blob - src/typedefs.h
SourceFormat Enforcement
[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 #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
50 #include "anyp/ProtocolType.h"
51 class CachePeer;
52 typedef void IRCB(CachePeer *, peer_t, AnyP::ProtocolType, void *, void *data);
53
54 /* in wordlist.h */
55
56 class wordlist;
57 typedef void UH(void *data, wordlist *);
58 typedef int READ_HANDLER(int, char *, int);
59 typedef int WRITE_HANDLER(int, const char *, int);
60
61 typedef int QS(const void *, const void *); /* qsort */
62 typedef void STABH(void *);
63 typedef void ERCB(int fd, void *, size_t);
64 class StoreEntry;
65 typedef void OBJH(StoreEntry *);
66 typedef void SIGHDLR(int sig);
67 typedef void STVLDCB(void *, int, int);
68 typedef int HLPSAVAIL(void *);
69 typedef void HLPSONEQ(void *);
70 typedef void HLPCMDOPTS(int *argc, char **argv);
71 typedef void IDNSCB(void *, const rfc1035_rr *, int, const char *);
72
73 /* MD5 cache keys */
74 typedef unsigned char cache_key;
75
76 /* in case we want to change it later */
77 typedef ssize_t mb_size_t;
78
79 typedef int STDIRSELECT(const StoreEntry *);
80
81 /*Use uint64_t to store miliseconds*/
82 typedef uint64_t time_msec_t;
83 #endif /* SQUID_TYPEDEFS_H */
84