2021-07-21 16:04:18 +01:00
|
|
|
/*
|
|
|
|
* config.h
|
|
|
|
*
|
2023-04-08 12:42:22 +01:00
|
|
|
* Copyright (c) 2020-2023, DarkMatterCore <pabloacurielz@gmail.com>.
|
2021-07-21 16:04:18 +01:00
|
|
|
*
|
|
|
|
* This file is part of nxdumptool (https://github.com/DarkMatterCore/nxdumptool).
|
|
|
|
*
|
|
|
|
* nxdumptool is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* nxdumptool is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef __CONFIG_H__
|
|
|
|
#define __CONFIG_H__
|
|
|
|
|
2021-08-07 09:42:03 +01:00
|
|
|
#include "nxdt_json.h"
|
2021-07-25 06:37:13 +01:00
|
|
|
|
2021-07-21 16:04:18 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum {
|
2022-09-12 19:19:10 +01:00
|
|
|
ConfigOutputStorage_SdCard = 0,
|
|
|
|
ConfigOutputStorage_UsbHost = 1,
|
2023-07-17 00:03:05 +01:00
|
|
|
ConfigOutputStorage_Count = 2 ///< Total values supported by this enum.
|
2022-09-12 19:19:10 +01:00
|
|
|
} ConfigOutputStorage;
|
2021-07-21 16:04:18 +01:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
ConfigChecksumLookupMethod_None = 0,
|
|
|
|
ConfigChecksumLookupMethod_NSWDB = 1,
|
|
|
|
ConfigChecksumLookupMethod_NoIntro = 2,
|
2023-07-17 00:03:05 +01:00
|
|
|
ConfigChecksumLookupMethod_Count = 3 ///< Total values supported by this enum.
|
2021-07-21 16:04:18 +01:00
|
|
|
} ConfigChecksumLookupMethod;
|
|
|
|
|
|
|
|
/// Initializes the configuration interface.
|
|
|
|
bool configInitialize(void);
|
|
|
|
|
|
|
|
/// Closes the configuration interface.
|
|
|
|
void configExit(void);
|
|
|
|
|
2023-11-26 21:54:25 +00:00
|
|
|
/// Resets settings to their default values.
|
|
|
|
void configResetSettings(void);
|
|
|
|
|
2021-07-21 16:04:18 +01:00
|
|
|
/// Getters and setters for various data types.
|
|
|
|
/// Path elements must be separated using forward slashes.
|
|
|
|
|
|
|
|
bool configGetBoolean(const char *path);
|
|
|
|
void configSetBoolean(const char *path, bool value);
|
|
|
|
|
|
|
|
int configGetInteger(const char *path);
|
|
|
|
void configSetInteger(const char *path, int value);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __CONFIG_H__ */
|