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

Last change on this file since 1592 was 1592, checked in by Bruno Cornec, 13 years ago
  • use of conf file for mkisofs and cdrecord commands
  • unification of cdr,cdrw and dvd
  • may not compile, modifications will continue
  • Property svn:eol-style set to native
File size: 3.6 KB
Line 
1/* mr_conf.h
2 *
3 * $Id$
4 *
5 * based on parse_conf.h (c)2002-2004 Anton Kulchitsky  mailto:anton@kulchitsky.org
6 * Reviewed for mondorescue (c) 2006-2007 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
17#include "mr_types.h"
18
19/* mondoarchive structure storing conf info
20 * each field of the configuration file should have an entry here
21 */
22struct mr_ar_conf {
23    /* MINDI: ISO image CLI command to use */
24    char *iso_creation_cmd;
25    /* MINDI: ISO image common creation options */
26    char *iso_creation_opt;
27    /* ISO Burning CLI command to use */
28    char *iso_burning_cmd;
29    /* ISO Burning CLI command options */
30    char *iso_burning_opt;
31    /* ISO Burning Speed */
32    int iso_burning_speed;
33    /* Default size of media */
34    int media_size;
35    /* Default device of media */
36    char *media_device;
37    /* Is the CD tray manual ? */
38    bool manual_tray;
39    /* Default log level */
40    int log_level;
41    /* default prefix for ISO names */
42    char *prefix;
43    /* External tape blocksize */
44    int external_tape_blocksize;
45    /* Internal tape blocksize */
46    int internal_tape_blocksize;
47    /* Size in MB of the slices for biggiefiles */
48    int slice_size;
49    /* deplist file used */
50    char *deplist_file;
51    /* Write boot floppies ? */
52    bool write_boot_floppy;
53    /* Create mindi CD ? */
54    bool create_mindi_cd;
55    /* Kernel to use */
56    char *kernel;
57    /* Additional modules to support */
58    char *additional_modules;
59    /* Boot loader to use */
60    char *boot_loader;
61    /* Differential backup ? */
62    bool differential;
63    /* Default compression tool */
64    char *compression_tool;
65    /* Default compression level */
66    int compression_level;
67    /* Paths to exclude from backup */
68    char *exclude_paths;
69    /* Paths to include onto the backup */
70    char *include_paths;
71    /* Which mode should be activated by default*/
72    char *ui_mode;
73    /* Activate automatic restore ? */
74    bool automatic_restore;
75    /* Scratch directory */
76    char *scratch_dir;
77    /* Temporary directory main path */
78    char *tmp_dir;
79    /* Images creation dir */
80    char *images_dir;
81};
82
83/* mondorestore structure storing conf info
84 * each field of the configuration file should have an entry here
85 */
86struct mr_rs_conf {
87    /* Default media size */
88    int media_size;
89    /* Default device of media */
90    char *media_device;
91    /* Is the CD tray manual ? */
92    bool manual_tray;
93    /* Default log level */
94    int log_level;
95    /* default prefix for ISO names */
96    char *prefix;
97    /* External tape blocksize */
98    int external_tape_blocksize;
99    /* Internal tape blocksize */
100    int internal_tape_blocksize;
101    /* Size in MB of the slices for biggiefiles */
102    int slice_size;
103    /* Boot loader to use */
104    char *boot_loader;
105    /* Differential backup ? */
106    bool differential;
107    /* Default compression tool */
108    char *compression_tool;
109    /* Which mode should be activated by default*/
110    char *ui_mode;
111    /* Activate automatic restore ? */
112    bool automatic_restore;
113    /* Images creation dir */
114    char *images_dir;
115};
116
117/* functions (public methods) */
118
119/*initialization and closing*/
120extern int mr_conf_open(const char *filename);
121extern void mr_conf_close(void);
122
123/*read integer number after string str in the current file*/
124extern int mr_conf_iread(const char *field_name);
125
126/*read double/float number after string str in the current file*/
127extern double mr_conf_fread(const char *field_name);
128
129/*read boolean after string str in the current file*/
130extern bool mr_conf_bread(const char *field_name);
131
132/*
133 * read string after string str in the current file.
134 * This function allocates the string which has to be freed later on
135*/
136extern char *mr_conf_sread(const char *field_name);
137
138#endif                          /* MR_CONF_H */
Note: See TracBrowser for help on using the repository browser.