1//========================================================================
2//
3// FILECacheLoader.h
4//
5// This file is licensed under the GPLv2 or later
6//
7// Copyright 2010 Hib Eris <hib@hiberis.nl>
8// Copyright 2010, 2022 Albert Astals Cid <aacid@kde.org>
9// Copyright 2021 Christian Persch <chpe@src.gnome.org>
10//
11//========================================================================
12
13#ifndef FILECACHELOADER_H
14#define FILECACHELOADER_H
15
16#include "CachedFile.h"
17
18#include <cstdio>
19
20class POPPLER_PRIVATE_EXPORT FILECacheLoader : public CachedFileLoader
21{
22 FILE *file = stdin;
23
24public:
25 FILECacheLoader() = default;
26 ~FILECacheLoader() override;
27
28 explicit FILECacheLoader(FILE *fileA) : file(fileA) { }
29
30 size_t init(CachedFile *cachedFile) override;
31 int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override;
32};
33
34#endif
35

source code of poppler/poppler/FILECacheLoader.h