Add management of version and new decoder signature.
[src/low-level-can-generator.git] / src / main.hpp
1 /*
2  * Copyright (C) 2015, 20"IoT.bzh"
3  * Author "Romain Forlot" <romain.forlot@iot.bzh>
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *       http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 struct afb_config_list {
19                 struct afb_config_list *next;
20                 char *value;
21 };
22
23 // main config structure
24 struct afb_config {
25                 char *console;          // console device name (can be a file or a tty)
26                 char *rootdir;          // base dir for files
27                 char *roothttp;         // directory for http files
28                 char *rootbase;         // Angular HTML5 base URL
29                 char *rootapi;          // Base URL for REST APIs
30                 char *workdir;          // where to run the program
31                 char *uploaddir;        // where to store transient files
32                 char *token;            // initial authentication token [default NULL no session]
33
34                 struct afb_config_list *aliases;
35                 struct afb_config_list *dbus_clients;
36                 struct afb_config_list *dbus_servers;
37                 struct afb_config_list *ws_clients;
38                 struct afb_config_list *ws_servers;
39                 struct afb_config_list *so_bindings;
40                 struct afb_config_list *ldpaths;
41
42                 char **exec;
43
44                 int httpdPort;
45                 int background;         // run in backround mode
46                 int cacheTimeout;
47                 int apiTimeout;
48                 int cntxTimeout;        // Client Session Context timeout
49                 int nbSessionMax;       // max count of sessions
50                 int mode;               // mode of listening
51                 int tracereq;
52                 int noHttpd;
53 };
54
55 extern struct afb_config *parse_arguments(int argc, char **argv);