source: MondoRescue/branches/stable/mondo/src/include/mr_conf.h@ 1256

Last change on this file since 1256 was 1256, checked in by Bruno Cornec, 17 years ago

Begining of work on conf file introduction in mondo

  • create a new struct mr_ar_conf to store conf info
  • adds a static mr_ar_store_conf function to store conf file info in that struc
  • mondo.conf is now the .dist version
  • md5 not done yet

Not tested may not work at all nor compile

  • Property svn:eol-style set to native
File size: 2.7 KB
RevLine 
[1054]1/* mr_conf.h
2 *
3 * $Id$
4 *
5 * based on parse_conf.h (c)2002-2004 Anton Kulchitsky mailto:anton@kulchitsky.org
6 * Review for mondorescue (c) 2006 Bruno Cornec <bruno@mondorescue.org>
7 *
8 * Header file of mr_conf: a very small and simple
9 * library for mondorescue configuration file reading
10 *
11 * Provided under the GPLv2
12 */
13
14#ifndef MR_CONF_H
15#define MR_CONF_H
16
[1256]17/* mondoarchive structure storing conf info
18 * each field of the configuration file should have an entry here
19 */
20struct mr_ar_conf {
21 /* ISO image CLI command to use */
22 char *iso_creation_cmd;
23 /* ISO image common creation options */
24 char *iso_creation_options;
25 /* ISO Burning CLI command to use */
26 char *iso_burning_cmd;
27 /* ISO Burning CLI command options */
28 char *iso_burning_options;
29 /* ISO Burning Speed */
30 int iso_burning_speed;
31 /* Default size of media */
32 int media_size;
33 /* Default device of media */
34 char *media_device;
35 /* Is the CD tray manual ? */
36 bool manual_tray;
37 /* Default log level */
38 int log_level;
39 /* default prefix for ISO names */
40 char *prefix;
41 /* External tape blocksize */
42 int external_tape_blocksize;
43 /* Internal tape blocksize */
44 int internal_tape_blocksize;
45 /* Size in MB of the slices for biggiefiles */
46 int slice_size;
47 /* deplist file used */
48 char *deplist_file;
49 /* Write boot floppies ? */
50 bool write_boot_floppy;
51 /* Create mindi CD ? */
52 bool create_mindi_cd;
53 /* Kernel to use */
54 char *kernel;
55 /* Additional modules to support */
56 char *additional_modules;
57 /* Boot loader to use */
58 char *boot_loader;
59 /* Differential backup ? */
60 bool differential;
61 /* Default compression tool */
62 char *compression_tool;
63 /* Default compression level */
64 int compression_level;
65 /* Paths to exclude from backup */
66 char *exclude_paths;
67 /* Paths to include onto the backup */
68 char *include_paths;
69 /* Which mode should be activated by default*/
70 char *ui_mode;
71 /* Activate automatic restore ? */
72 bool automatic_restore;
73 /* Scratch directory */
74 char *scratch_dir;
75 /* Temporary directory main path */
76 char *tmp_dir;
77 /* Images creation dir */
78 char *images_dir;
79};
80
[1054]81/* functions (public methods) */
82
83/*initialization and closing*/
84extern int mr_conf_open(const char *filename);
[1064]85extern void mr_conf_close(void);
[1054]86
87/*read integer number after string str in the current file*/
88extern int mr_conf_iread(const char *field_name);
89
90/*read double/float number after string str in the current file*/
91extern double mr_conf_fread(const char *field_name);
92
[1256]93/*read boolean after string str in the current file*/
94extern bool mr_conf_bread(const char *field_name);
95
[1054]96/*
97 * read string after string str in the current file.
98 * This function allocates the string which has to be freed later on
99*/
100extern char *mr_conf_sread(const char *field_name);
101
102#endif /* MR_CONF_H */
Note: See TracBrowser for help on using the repository browser.