]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/DiskIO/DiskDaemon/DiskdFile.h
2 * Copyright (C) 1996-2022 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 /* DEBUG: section 79 Squid-side DISKD I/O functions. */
11 #ifndef __STORE_DISKDFILE_H__
12 #define __STORE_DISKDFILE_H__
15 #include "DiskIO/DiskFile.h"
17 class DiskdIOStrategy
;
24 class DiskdFile
: public DiskFile
26 CBDATA_CLASS(DiskdFile
);
29 DiskdFile(char const *path
, DiskdIOStrategy
*);
30 ~DiskdFile() override
;
31 void open(int flags
, mode_t aMode
, RefCount
<IORequestor
> callback
) override
;
32 void create(int flags
, mode_t aMode
, RefCount
<IORequestor
> callback
) override
;
33 void read(ReadRequest
*) override
;
34 void write(WriteRequest
*) override
;
35 void close() override
;
36 bool error() const override
;
37 bool canRead() const override
;
38 bool ioInProgress() const override
;
41 int getID() const {return id
;}
43 void completed(diomsg
*);
50 RefCount
<IORequestor
> ioRequestor
;
51 void openDone(diomsg
*);
52 void createDone (diomsg
*);
53 void readDone (diomsg
*);
54 void writeDone (diomsg
*);
55 void closeDone (diomsg
*);
58 bool canNotifyClient() const;