renamings
[src/app-framework-binder.git] / src / afb-config.h
1 /*
2    local-def.h -- provide a REST/HTTP interface
3
4    Copyright (C) 2015, Fulup Ar Foll
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 */
21 #ifndef LOCAL_DEF_H
22 #define LOCAL_DEF_H
23
24 /* other definitions --------------------------------------------------- */
25
26 // Note: because of a bug in libmagic MAGIC_DB NULL should not be used for default
27 #define MAX_ALIAS 10           // max number of aliases
28
29 #define DEFLT_CNTX_TIMEOUT  3600   // default Client Connection Timeout
30 #define DEFLT_API_TIMEOUT   0      // default Plugin API Timeout [0=NoLimit for Debug Only]
31 #define DEFLT_CACHE_TIMEOUT 100000 // default Static File Chache [Client Side Cache 100000~=1day]
32 #define DEFLT_AUTH_TOKEN    NULL   // expect for debug should == NULL
33 #define DEFLT_HTTP_TIMEOUT  15     // Max MibMicroHttp timeout
34
35 #define CTX_NBCLIENTS   10   // allow a default of 10 authenticated clients
36
37 // main config structure
38 struct afb_config
39 {
40   char *console;           // console device name (can be a file or a tty)
41   int   httpdPort;
42   char *ldpaths;           // list of plugins directories
43   char *rootdir;           // base dir for httpd file download
44   char *rootbase;          // Angular HTML5 base URL
45   char *rootapi;           // Base URL for REST APIs
46   char *sessiondir;        // where to store mixer session files
47   char *token;             // initial authentication token [default NULL no session]
48   int  background;        // run in backround mode
49   int  readyfd;           // a #fd to signal when ready to serve
50   int  cacheTimeout;
51   int  apiTimeout;
52   int  cntxTimeout;        // Client Session Context timeout
53   int mode;           // mode of listening
54   int aliascount;
55   struct {
56          char  *url;
57          char  *path;
58        } aliasdir[MAX_ALIAS];  // alias mapping for icons,apps,...
59 };
60
61 #endif /* LOCAL_DEF_H */