Radek Krejci | ed5acc5 | 2019-04-25 15:57:04 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @file configuration.h |
| 3 | * @author Michal Vasko <mvasko@cesnet.cz> |
| 4 | * @brief yanglint configuration header |
| 5 | * |
| 6 | * Copyright (c) 2017 CESNET, z.s.p.o. |
| 7 | * |
| 8 | * This source code is licensed under BSD 3-Clause License (the "License"). |
| 9 | * You may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * https://opensource.org/licenses/BSD-3-Clause |
| 13 | */ |
| 14 | |
| 15 | #ifndef CONFIGURATION_H_ |
| 16 | #define CONFIGURATION_H_ |
| 17 | |
Radek Krejci | ed5acc5 | 2019-04-25 15:57:04 +0200 | [diff] [blame] | 18 | /** |
| 19 | * @brief Finds the current user's yanglint dir |
| 20 | * @return NULL on failure, dynamically allocated yanglint dir path |
| 21 | * otherwise |
| 22 | */ |
| 23 | char *get_yanglint_dir(void); |
| 24 | |
| 25 | /** |
| 26 | * @brief Checks all the relevant files and directories creating any |
| 27 | * that are missing, sets the saved configuration (currently only history) |
| 28 | */ |
| 29 | void load_config(void); |
| 30 | |
| 31 | /** |
| 32 | * @brief Saves the current configuration (currently only history) |
| 33 | */ |
| 34 | void store_config(void); |
| 35 | |
| 36 | #endif /* CONFIGURATION_H_ */ |