1 
2 /*
3  * s3backer - FUSE-based single file backing store via Amazon S3
4  *
5  * Copyright 2008-2011 Archie L. Cobbs <archie@dellroad.org>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  * 02110-1301, USA.
21  *
22  * In addition, as a special exception, the copyright holders give
23  * permission to link the code of portions of this program with the
24  * OpenSSL library under certain conditions as described in each
25  * individual source file, and distribute linked combinations including
26  * the two.
27  *
28  * You must obey the GNU General Public License in all respects for all
29  * of the code used other than OpenSSL. If you modify file(s) with this
30  * exception, you may extend this exception to your version of the
31  * file(s), but you are not obligated to do so. If you do not wish to do
32  * so, delete this exception statement from your version. If you delete
33  * this exception statement from all source files in the program, then
34  * also delete it here.
35  */
36 
37 /* Overal application configuration info */
38 struct s3b_config {
39 
40     /* Various sub-module configurations */
41     struct block_cache_conf     block_cache;
42     struct fuse_ops_conf        fuse_ops;
43     struct ec_protect_conf      ec_protect;
44     struct http_io_conf         http_io;
45 
46     /* Common/global stuff */
47     const char                  *accessFile;
48     const char                  *mount;
49     char                        description[768];
50     u_int                       block_size;
51     off_t                       file_size;
52     off_t                       num_blocks;
53     int                         debug;
54     int                         erase;
55     int                         reset;
56     int                         quiet;
57     int                         force;
58     int                         test;
59     int                         ssl;
60     int                         no_auto_detect;
61     int                         list_blocks;
62     struct fuse_args            fuse_args;
63     log_func_t                  *log;
64 
65     /* These are only used during command line parsing */
66     const char                  *file_size_str;
67     const char                  *block_size_str;
68     const char                  *password_file;
69     const char                  *max_speed_str[2];
70     int                         encrypt;
71 };
72 
73 extern struct s3b_config *s3backer_get_config(int argc, char **argv);
74 extern struct s3backer_store *s3backer_create_store(struct s3b_config *config);
75 
76