supervisor: Make it a HTTP server
[src/app-framework-binder.git] / src / afs-config.h
1 /*
2  * Copyright (C) 2015, 2016, 2017 "IoT.bzh"
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #pragma once
18
19 // main config structure
20 struct afs_config {
21         char *rootdir;          // base dir for files
22         char *roothttp;         // directory for http files
23         char *rootbase;         // Angular HTML5 base URL
24         char *rootapi;          // Base URL for REST APIs
25         char *workdir;          // where to run the program
26         char *uploaddir;        // where to store transient files
27         char *token;            // initial authentication token [default NULL no session]
28         char *name;             /* name to set to the daemon */
29
30         /* integers */
31         int httpdPort;
32         int cacheTimeout;
33         int apiTimeout;
34         int cntxTimeout;        // Client Session Context timeout
35         int nbSessionMax;       // max count of sessions
36 };
37
38 extern struct afs_config *afs_config_parse_arguments(int argc, char **argv);
39 extern void afs_config_dump(struct afs_config *config);
40