allows to repeat option --ldpaths
[src/app-framework-binder.git] / src / afb-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 /*
20  * other definitions --------------------------------------------------- 
21  */
22
23 struct afb_config_list {
24         struct afb_config_list *next;
25         char *value;
26 };
27
28 // main config structure
29 struct afb_config {
30         char *console;          // console device name (can be a file or a 
31         // tty)
32         int httpdPort;
33         char *rootdir;          // base dir for files
34         char *roothttp;         // directory for http files
35         char *rootbase;         // Angular HTML5 base URL
36         char *rootapi;          // Base URL for REST APIs
37         char *sessiondir;       // where to store mixer session files
38         char *token;            // initial authentication token [default
39         // NULL no session]
40         int background;         // run in backround mode
41         int readyfd;            // a #fd to signal when ready to serve
42         int cacheTimeout;
43         int apiTimeout;
44         int cntxTimeout;        // Client Session Context timeout
45         int nbSessionMax;       // max count of sessions
46         int mode;               // mode of listening
47         int aliascount;
48         int tracereq;
49         struct afb_config_list *aliases;
50         struct afb_config_list *dbus_clients;
51         struct afb_config_list *dbus_servers;
52         struct afb_config_list *ws_clients;
53         struct afb_config_list *ws_servers;
54         struct afb_config_list *so_bindings;
55         struct afb_config_list *ldpaths;
56 };
57
58 extern struct afb_config *afb_config_parse_arguments(int argc, char **argv);