-} option_t;
-
-#define NO_COMPR 0
-#define COMPR_FAST 1
-#define COMPR_BEST 2
-#define COMPR_SERVER_FAST 3
-#define COMPR_SERVER_BEST 4
-#define COMPR_SERVER_CUST 5 /* server-side custom compression */
-#define COMPR_CUST 6 /* client-side custom compression */
-
-#define ENCRYPT_NONE 0 /* no encryption */
-#define ENCRYPT_CUST 1 /* client-side custom encryption */
-#define ENCRYPT_SERV_CUST 2 /* server-side custom encryption */
-
-char *build_exclude(char *disk, char *device, option_t *options, int verbose);
-char *build_include(char *disk, char *device, option_t *options, int verbose);
-void init_options(option_t *options);
-option_t *parse_options(char *str,
- char *disk,
- char *device,
- am_feature_t *features,
- int verbose);
+ int exclude_file;
+ int exclude_list;
+ int exclude_list_glob;
+ int exclude_optional;
+ int collection;
+ int calcsize;
+ int client_estimate;
+ int multi_estimate;
+ int smb_recover_mode;
+ int features;
+ data_path_t data_path_set; /* bitfield of all allowed data-path */
+ recover_path_t recover_path;
+} backup_support_option_t;
+
+typedef struct client_script_result_s {
+ int exit_code;
+ proplist_t proplist;
+ GPtrArray *output;
+ GPtrArray *err;
+} client_script_result_t;
+
+typedef enum {
+ DMP_NORMAL, DMP_IGNORE, DMP_STRANGE, DMP_SIZE, DMP_ERROR
+} dmpline_t;
+
+typedef struct regex_s {
+ char *regex;
+ int srcline;
+ int scale; /* only used for size lines */
+ int field;
+ dmpline_t typ;
+} amregex_t;
+
+#define AM_NORMAL_RE(re) {(re), __LINE__, 0, 0, DMP_NORMAL}
+#define AM_IGNORE_RE(re) {(re), __LINE__, 0, 0, DMP_IGNORE}
+#define AM_STRANGE_RE(re) {(re), __LINE__, 0, 0, DMP_STRANGE}
+#define AM_SIZE_RE(re,s,f) {(re), __LINE__, (s), (f), DMP_SIZE}
+#define AM_ERROR_RE(re) {(re), __LINE__, 0, 0, DMP_ERROR}
+
+char *build_exclude(dle_t *dle, int verbose);
+char *build_include(dle_t *dle, int verbose);
+void parse_options(char *str,
+ dle_t *dle,
+ am_feature_t *features,
+ int verbose);
+
+/* Count the size of an ARGV to store all properties of an application for
+ * a dle. include/exclude options are converted to properties.
+ *
+ * @param dle: the dle
+ * @returns: size of an ARGV needed.
+ */
+int application_property_argv_size(dle_t *dle);
+
+/* Add all properties of an application for a dle to an ARGV.
+ * include/exclude options are converted to properties.
+ *
+ * @param argv_ptr: the ARGV where to store properties.
+ * @param dle: the dle.
+ * @returns: Number of argument added to ARGV.
+ */
+void application_property_add_to_argv(GPtrArray *argv_ptr,
+ dle_t *dle,
+ backup_support_option_t *bsu,
+ am_feature_t *amfeatures);