]>
Commit | Line | Data |
---|---|---|
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 | |
16 | typedef signed int signed_int32_t; | |
17 | #elif SHORT_MAX == INT32_MAX | |
18 | typedef signed short int signed_int32_t; | |
19 | #else | |
20 | #error I do not know how to typedef a signed 32bit integer. | |
21 | #endif | |
22 | typedef signed_int32_t sfileno; | |
2745fea5 AR |
23 | typedef signed int sdirno; |
24 | ||
25 | /// maximum number of entries per cache_dir | |
26 | enum { SwapFilenMax = 0xFFFFFF }; // keep in sync with StoreEntry::swap_filen | |
27 | ||
28 | /// Store key. | |
29 | typedef unsigned char cache_key; | |
30 | ||
31 | class StoreSearch; | |
32 | class StoreClient; | |
33 | class StoreEntry; | |
34 | class MemStore; | |
35 | class Transients; | |
36 | ||
37 | namespace Store | |
38 | { | |
7d84d4ca SM |
39 | class Storage; |
40 | class Controller; | |
41 | class Controlled; | |
42 | class Disks; | |
43 | class Disk; | |
44 | class DiskConfig; | |
45 | ||
46 | typedef ::StoreEntry Entry; | |
47 | typedef ::MemStore Memory; | |
48 | typedef ::Transients Transients; | |
2745fea5 AR |
49 | } // namespace Store |
50 | ||
51 | // TODO: Remove these once all code has been transitioned to Store namespace. | |
52 | typedef Store::Controller StoreController; | |
53 | typedef Store::Disks StoreHashIndex; | |
54 | typedef Store::Disk SwapDir; | |
55 | template <class C> class RefCount; | |
56 | typedef RefCount<Store::Disk> SwapDirPointer; | |
57 | ||
58 | #endif /* SQUID_STORE_FORWARD_H */ | |
59 |