vcdiff_vfs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Juergen Fitschen
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
18 #ifndef VCDIFF_VFS_H
19 #define VCDIFF_VFS_H
20 
21 #include "vcdiff.h"
22 #include "vfs.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 extern const vcdiff_driver_t vcdiff_vfs_driver;
32 
36 typedef struct {
37  int fd;
38  size_t max_size;
39 } vcdiff_vfs_t;
40 
44 #define VCDIFF_VFS_INIT_MAX_SIZE(FD, SIZE) { .fd = FD, .max_size = SIZE }
45 
49 #define VCDIFF_VFS_INIT(FD) VCDIFF_VFS_INIT_MAX_SIZE(FD, SIZE_MAX)
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif /* VCDIFF_VFS_H */
Context for the underlying file.
Definition: vcdiff_vfs.h:36
size_t max_size
Maximum file size for vcdiff target files.
Definition: vcdiff_vfs.h:38
int fd
File descriptor of the VFS file.
Definition: vcdiff_vfs.h:37
const vcdiff_driver_t vcdiff_vfs_driver
Driver for accessing VFS-based file access.