Loading...
Searching...
No Matches
DocumentPreviewCache.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFDocumentPreviewCache
6#define PDFTRON_H_CPPPDFDocumentPreviewCache
7
8#include <C/PDF/TRN_DocumentPreviewCache.h>
9#include <Common/UString.h>
10#include <Common/Common.h>
11
12namespace pdftron {
13 namespace PDF {
14
45{
46public:
57
65 typedef void(*PreviewHandler) (preview_result result, const char* utf8_filepath, void* custom_data);
66
67
75 static void Initialize(UInt64 max_cache_bytes, double max_disk_percentage);
76
77
91 static void GetBitmapWithPath(const UString& filepath, UInt32 min_x_size, UInt32 min_y_size, PreviewHandler proc, void* custom_data);
92
93
98 static void CancelAllRequests();
99
100
108 static void CancelRequest(const UString& filepath);
109
110
118 static void IrrelevantChangeMade(const UString& filepath);
119
120
125 static void ClearCache();
126};
127
128#include <Impl/DocumentPreviewCache.inl>
129
130 } // PDF
131} // pdftron
132
133#endif // PDFTRON_H_CPPPDFDocumentPreviewCache
static void IrrelevantChangeMade(const UString &filepath)
static void CancelRequest(const UString &filepath)
@ e_package_error
Failure due to encountering a PDF package.
@ e_security_error
Failure due to password restriction.
@ e_cancel
The request was cancelled before it was processed.
@ e_success
Successful retrieval of the thumbnail.
@ e_failure
The thumbnail could not be retrieved.
void(* PreviewHandler)(preview_result result, const char *utf8_filepath, void *custom_data)
static void Initialize(UInt64 max_cache_bytes, double max_disk_percentage)
static void GetBitmapWithPath(const UString &filepath, UInt32 min_x_size, UInt32 min_y_size, PreviewHandler proc, void *custom_data)
TRN_UInt32 UInt32
Definition BasicTypes.h:13
TRN_UInt64 UInt64
Definition BasicTypes.h:21