1 /** @file con_config.h  Config file IO.
2  * @ingroup console
3  *
4  * @authors Copyright © 2003-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
5  * @authors Copyright © 2006-2014 Daniel Swanson <danij@dengine.net>
6  *
7  * @par License
8  * GPL: http://www.gnu.org/licenses/gpl.html
9  *
10  * <small>This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by the
12  * Free Software Foundation; either version 2 of the License, or (at your
13  * option) any later version. This program is distributed in the hope that it
14  * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details. You should have received a copy of the GNU
17  * General Public License along with this program; if not, see:
18  * http://www.gnu.org/licenses</small>
19  */
20 
21 #ifndef DENG_CONSOLE_CONFIG_H
22 #define DENG_CONSOLE_CONFIG_H
23 
24 #include "dd_share.h"
25 
26 #include <de/File>
27 #include <de/NativePath>
28 
29 // Flags for Con_ParseCommands:
30 #define CPCF_SILENT                 0x1
31 #define CPCF_ALLOW_SAVE_STATE       0x2
32 #define CPCF_ALLOW_SAVE_BINDINGS    0x4
33 
34 void Con_SetAllowed(int flags);
35 
36 bool Con_ParseCommands(de::NativePath const &nativePath, int flags = 0);
37 
38 bool Con_ParseCommands(de::File const &file, int flags = 0);
39 
40 void Con_SetDefaultPath(de::Path const &path);
41 
42 /**
43  * Saves all bindings, aliases and archiveable console variables.
44  * The output file is a collection of console commands.
45  */
46 void Con_SaveDefaults();
47 
48 void Con_SaveDefaultsIfChanged();
49 
50 D_CMD(WriteConsole);
51 
52 #endif // DENG_CONSOLE_CONFIG_H
53