All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DocumentPreviewCache.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2020 by PDFTron Systems 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 
12 namespace pdftron {
13  namespace PDF {
14 
45 {
46 public:
56  };
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 GetBitmapWithPath(const UString &filepath, UInt32 min_x_size, UInt32 min_y_size, PreviewHandler proc, void *custom_data)
TRN_UInt64 UInt64
Definition: BasicTypes.h:21
void(* PreviewHandler)(preview_result result, const char *utf8_filepath, void *custom_data)
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
The thumbnail could not be retrieved.
static void CancelRequest(const UString &filepath)
Successful retrieval of the thumbnail.
The request was cancelled before it was processed.
static void IrrelevantChangeMade(const UString &filepath)
static void Initialize(UInt64 max_cache_bytes, double max_disk_percentage)
Failure due to encountering a PDF package.