FreeRDP
drive_file.h
1 
26 #ifndef FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
27 #define FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
28 
29 #include <winpr/stream.h>
30 #include <winpr/file.h>
31 #include <freerdp/channels/log.h>
32 
33 #define TAG CHANNELS_TAG("drive.client")
34 
35 typedef struct
36 {
37  UINT32 id;
38  BOOL is_dir;
39  HANDLE file_handle;
40  HANDLE find_handle;
41  WIN32_FIND_DATAW find_data;
42  const WCHAR* basepath;
43  WCHAR* fullpath;
44  BOOL delete_pending;
45  UINT32 FileAttributes;
46  UINT32 SharedAccess;
47  UINT32 DesiredAccess;
48  UINT32 CreateDisposition;
49  UINT32 CreateOptions;
50 } DRIVE_FILE;
51 
52 DRIVE_FILE* drive_file_new(const WCHAR* base_path, const WCHAR* path, UINT32 PathWCharLength,
53  UINT32 id, UINT32 DesiredAccess, UINT32 CreateDisposition,
54  UINT32 CreateOptions, UINT32 FileAttributes, UINT32 SharedAccess);
55 BOOL drive_file_free(DRIVE_FILE* file);
56 
57 BOOL drive_file_open(DRIVE_FILE* file);
58 BOOL drive_file_seek(DRIVE_FILE* file, UINT64 Offset);
59 BOOL drive_file_read(DRIVE_FILE* file, BYTE* buffer, UINT32* Length);
60 BOOL drive_file_write(DRIVE_FILE* file, const BYTE* buffer, UINT32 Length);
61 BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, wStream* output);
62 BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length,
63  wStream* input);
64 BOOL drive_file_query_directory(DRIVE_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery,
65  const WCHAR* path, UINT32 PathWCharLength, wStream* output);
66 
67 #endif /* FREERDP_CHANNEL_DRIVE_FILE_H */