2 * Copyright (C) 2015-2018 "IoT.bzh"
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 * other definitions ---------------------------------------------------
26 * list of configuration values
28 struct afb_config_list {
29 struct afb_config_list *next;
34 * main config structure
37 char *console; /*< console device name (can be a file or a tty) */
38 char *rootdir; /*< base dir for files */
39 char *roothttp; /*< directory for http files */
40 char *rootbase; /*< Angular HTML5 base URL */
41 char *rootapi; /*< Base URL for REST APIs */
42 char *workdir; /*< where to run the program */
43 char *uploaddir; /*< where to store transient files */
44 char *token; /*< initial authentication token [default NULL no session] */
45 char *name; /*< name to set to the daemon */
47 struct afb_config_list *aliases;
48 #if defined(WITH_DBUS_TRANSPARENCY)
49 struct afb_config_list *dbus_clients;
50 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 struct afb_config_list *weak_ldpaths;
57 struct afb_config_list *calls;
58 struct afb_config_list *auto_api;
66 int session_timeout; /*< session timeout */
67 int max_session_count; /*< max count of sessions */
70 #if defined(KEEP_LEGACY_MODE)
71 int mode; // mode of listening
74 #if !defined(REMOVE_LEGACY_TRACE)
83 unsigned no_ldpaths: 1; /**< disable default ldpaths */
85 unsigned background: 1; /**< run in backround mode */
86 unsigned random_token: 1; /**< expects a random token */
87 #if defined(WITH_MONITORING_OPTION)
88 unsigned monitoring: 1; /**< activates monitoring */
92 extern struct afb_config *afb_config_parse_arguments(int argc, char **argv);
93 extern void afb_config_dump(struct afb_config *config);
94 extern struct json_object *afb_config_json(struct afb_config *config);