]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/fs/ufs/StoreFSufs.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_FS_UFS_STOREFSUFS_H
10 #define SQUID_SRC_FS_UFS_STOREFSUFS_H
13 \defgroup UFS UFS Storage Filesystem
17 #include "StoreFileSystem.h"
26 \ingroup UFS, FileSystems
28 * Core UFS class. This template provides compile time aliases for
29 * ufs/aufs/diskd to ease configuration conversion - each becomes a
30 * StoreFS module whose createSwapDir method parameterises the common
31 * UFSSwapDir with an IO module instance.
33 template <class TheSwapDir
>
34 class StoreFSufs
: public StoreFileSystem
37 static StoreFileSystem
&GetInstance();
38 StoreFSufs(char const *DefaultModuleType
, char const *label
);
39 ~StoreFSufs() override
{}
41 /* StoreFileSystem API */
42 const char *type() const override
;
43 SwapDir
*createSwapDir() override
;
47 char const *moduleName
;
52 StoreFSufs
<C
>::StoreFSufs(char const *defaultModuleName
, char const *aLabel
) : IO(nullptr), moduleName(defaultModuleName
), label(aLabel
)
59 StoreFSufs
<C
>::type() const
66 StoreFSufs
<C
>::createSwapDir()
68 C
*result
= new C(type(), moduleName
);
75 #endif /* SQUID_SRC_FS_UFS_STOREFSUFS_H */