1//========================================================================
2//
3// CurlCachedFile.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//
10//========================================================================
11
12#ifndef CURLCACHELOADER_H
13#define CURLCACHELOADER_H
14
15#include "poppler-config.h"
16#include "CachedFile.h"
17
18#include <curl/curl.h>
19
20//------------------------------------------------------------------------
21
22class CurlCachedFileLoader : public CachedFileLoader
23{
24
25public:
26 explicit CurlCachedFileLoader(const std::string &urlA);
27 ~CurlCachedFileLoader() override;
28 size_t init(CachedFile *cachedFile) override;
29 int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override;
30
31private:
32 const std::string url;
33 CachedFile *cachedFile;
34 CURL *curl;
35};
36
37#endif
38

source code of poppler/poppler/CurlCachedFile.h