-
Notifications
You must be signed in to change notification settings - Fork 2
/
gd_private.h
47 lines (34 loc) · 973 Bytes
/
gd_private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* global data shared with all plugins
* qianfan Zhao <qianfanguijin@163.com>
*/
#ifndef IMGEDITOR_GLOBAL_PRIVATE_H
#define IMGEDITOR_GLOBAL_PRIVATE_H
#include <stdint.h>
#include <unistd.h>
#define MAX_VIRTUAL_FILE 32
struct virtual_file {
int fd;
off64_t start_offset;
int64_t total_length;
int used;
};
struct disk_partitions;
#define GD_MAX_PARTITIONS 8
struct imgeditor;
#define GD_MAX_IMGEDITOR 64
struct global_data {
int verbose_level;
size_t active_partitions;
struct disk_partitions *disk_parts_array[GD_MAX_PARTITIONS];
size_t export_imgeditor_counts;
struct imgeditor *export_imgeditors[GD_MAX_IMGEDITOR];
struct virtual_file vfps[MAX_VIRTUAL_FILE];
};
struct global_data *imgeditor_get_gd(void);
int imgeditor_core_setup_gd(void);
int imgeditor_plugin_setup_gd(void);
void imgeditor_free_gd(void);
void gd_export_imgeditor(struct imgeditor *);
struct imgeditor *gd_get_imgeditor(const char *name);
#endif