]> git.ipfire.org Git - thirdparty/squid.git/blame - src/store/forward.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / store / forward.h
CommitLineData
2745fea5 1/*
5b74111a 2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
2745fea5
AR
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#ifndef SQUID_STORE_FORWARD_H
10#define SQUID_STORE_FORWARD_H
11
351c3eb4
SK
12// bug 4610 see comments 22-38
13// Nasty hack, but it turns out C++ allows int32_t to be
14// unsigned when used as a bitmask (as sfile* are later)
15#if INT_MAX == INT32_MAX
16typedef signed int signed_int32_t;
17#elif SHORT_MAX == INT32_MAX
18typedef signed short int signed_int32_t;
19#else
20#error I do not know how to typedef a signed 32bit integer.
21#endif
22typedef signed_int32_t sfileno;
2745fea5
AR
23typedef signed int sdirno;
24
25/// maximum number of entries per cache_dir
26enum { SwapFilenMax = 0xFFFFFF }; // keep in sync with StoreEntry::swap_filen
27
28/// Store key.
29typedef unsigned char cache_key;
30
31class StoreSearch;
32class StoreClient;
33class StoreEntry;
34class MemStore;
35class Transients;
36
37namespace Store
38{
7d84d4ca
SM
39class Storage;
40class Controller;
41class Controlled;
42class Disks;
43class Disk;
44class DiskConfig;
45
46typedef ::StoreEntry Entry;
47typedef ::MemStore Memory;
48typedef ::Transients Transients;
2745fea5
AR
49} // namespace Store
50
51// TODO: Remove these once all code has been transitioned to Store namespace.
52typedef Store::Controller StoreController;
53typedef Store::Disks StoreHashIndex;
54typedef Store::Disk SwapDir;
55template <class C> class RefCount;
56typedef RefCount<Store::Disk> SwapDirPointer;
57
58#endif /* SQUID_STORE_FORWARD_H */
59