Last change
on this file since 608709f was
37e91b2,
checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago
|
#971 rename sources folder to src
Use the same folder as in ogClient.
|
-
Property mode set to
100644
|
File size:
1.8 KB
|
Line | |
---|
1 | #ifndef _OG_JSON_H |
---|
2 | #define _OG_JSON_H |
---|
3 | |
---|
4 | #include <jansson.h> |
---|
5 | #include "schedule.h" |
---|
6 | |
---|
7 | int og_json_parse_string(json_t *element, const char **str); |
---|
8 | int og_json_parse_uint(json_t *element, uint32_t *integer); |
---|
9 | int og_json_parse_bool(json_t *element, bool *value); |
---|
10 | |
---|
11 | #define OG_PARAM_PART_NUMBER (1UL << 0) |
---|
12 | #define OG_PARAM_PART_CODE (1UL << 1) |
---|
13 | #define OG_PARAM_PART_FILESYSTEM (1UL << 2) |
---|
14 | #define OG_PARAM_PART_SIZE (1UL << 3) |
---|
15 | #define OG_PARAM_PART_FORMAT (1UL << 4) |
---|
16 | #define OG_PARAM_PART_DISK (1UL << 5) |
---|
17 | #define OG_PARAM_PART_OS (1UL << 6) |
---|
18 | #define OG_PARAM_PART_USED_SIZE (1UL << 7) |
---|
19 | |
---|
20 | struct og_partition { |
---|
21 | const char *disk; |
---|
22 | const char *number; |
---|
23 | const char *code; |
---|
24 | const char *size; |
---|
25 | const char *filesystem; |
---|
26 | const char *format; |
---|
27 | const char *os; |
---|
28 | const char *used_size; |
---|
29 | }; |
---|
30 | |
---|
31 | #define OG_PARTITION_MAX 4 |
---|
32 | |
---|
33 | int og_json_parse_partition(json_t *element, struct og_partition *part, |
---|
34 | uint64_t required_flags); |
---|
35 | |
---|
36 | #define OG_CLIENTS_MAX 4096 |
---|
37 | |
---|
38 | struct og_sync_params { |
---|
39 | const char *sync; |
---|
40 | const char *diff; |
---|
41 | const char *remove; |
---|
42 | const char *compress; |
---|
43 | const char *cleanup; |
---|
44 | const char *cache; |
---|
45 | const char *cleanup_cache; |
---|
46 | const char *remove_dst; |
---|
47 | const char *diff_id; |
---|
48 | const char *diff_name; |
---|
49 | const char *path; |
---|
50 | const char *method; |
---|
51 | }; |
---|
52 | |
---|
53 | struct og_msg_params { |
---|
54 | const char *ips_array[OG_CLIENTS_MAX]; |
---|
55 | const char *mac_array[OG_CLIENTS_MAX]; |
---|
56 | unsigned int ips_array_len; |
---|
57 | const char *wol_type; |
---|
58 | char run_cmd[4096]; |
---|
59 | const char *disk; |
---|
60 | const char *partition; |
---|
61 | const char *repository; |
---|
62 | const char *name; |
---|
63 | const char *id; |
---|
64 | const char *code; |
---|
65 | const char *type; |
---|
66 | const char *profile; |
---|
67 | const char *cache; |
---|
68 | const char *cache_size; |
---|
69 | bool echo; |
---|
70 | struct og_partition partition_setup[OG_PARTITION_MAX]; |
---|
71 | struct og_sync_params sync_setup; |
---|
72 | struct og_schedule_time time; |
---|
73 | const char *task_id; |
---|
74 | uint64_t flags; |
---|
75 | }; |
---|
76 | |
---|
77 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.