FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
persistent.h
1
20#ifndef FREERDP_PERSISTENT_CACHE_H
21#define FREERDP_PERSISTENT_CACHE_H
22
23#include <freerdp/api.h>
24#include <freerdp/types.h>
25#include <freerdp/update.h>
26
27#include <winpr/crt.h>
28#include <winpr/stream.h>
29
30#ifdef __cplusplus
31extern "C"
32{
33#endif
34
35 typedef struct rdp_persistent_cache rdpPersistentCache;
36
37#pragma pack(push, 1)
38
39/* 12 bytes */
40
41 typedef struct
42 {
43 BYTE sig[8];
44 UINT32 flags; /* 0x00000003, 0x00000006 */
46
47/* 12 bytes */
48
49 typedef struct
50 {
51 UINT64 key64;
52 UINT16 width;
53 UINT16 height;
55
56/* 20 bytes */
57
58 typedef struct
59 {
60 UINT64 key64;
61 UINT16 width;
62 UINT16 height;
63 UINT32 size;
64 UINT32 flags; /* 0x00000011 */
66
67#pragma pack(pop)
68
69 typedef struct
70 {
71 UINT64 key64;
72 UINT16 width;
73 UINT16 height;
74 UINT32 size;
75 UINT32 flags;
76 BYTE* data;
78
79 FREERDP_API int persistent_cache_get_version(rdpPersistentCache* persistent);
80 FREERDP_API int persistent_cache_get_count(rdpPersistentCache* persistent);
81
82 FREERDP_API int persistent_cache_read_entry(rdpPersistentCache* persistent,
84 FREERDP_API int persistent_cache_write_entry(rdpPersistentCache* persistent,
85 const PERSISTENT_CACHE_ENTRY* entry);
86
87 FREERDP_API int persistent_cache_open(rdpPersistentCache* persistent, const char* filename,
88 BOOL write, UINT32 version);
89 FREERDP_API int persistent_cache_close(rdpPersistentCache* persistent);
90
91 FREERDP_API void persistent_cache_free(rdpPersistentCache* persistent);
92
93 WINPR_ATTR_MALLOC(persistent_cache_free, 1)
94 FREERDP_API rdpPersistentCache* persistent_cache_new(void);
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* FREERDP_PERSISTENT_CACHE_H */
Definition persistent.h:59
Definition persistent.h:50
Definition persistent.h:70