summaryrefslogtreecommitdiffstats
path: root/src/common/ffdata.h
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
committersumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
commit76424950e373d3b04ac3dd13019151bfba3e8423 (patch)
tree4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/common/ffdata.h
Add the files
Diffstat (limited to 'src/common/ffdata.h')
-rw-r--r--src/common/ffdata.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/common/ffdata.h b/src/common/ffdata.h
new file mode 100644
index 0000000..189c0fa
--- /dev/null
+++ b/src/common/ffdata.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "common/FFstrbuf.h"
+
+typedef enum FF_A_PACKED FFDataResultDocType {
+ FF_RESULT_DOC_TYPE_DEFAULT = 0,
+ FF_RESULT_DOC_TYPE_JSON,
+ FF_RESULT_DOC_TYPE_CONFIG,
+ FF_RESULT_DOC_TYPE_CONFIG_FULL,
+} FFDataResultDocType;
+
+// FFdata aggregates configuration, generation parameters, and output state used by fastfetch.
+// It holds the parsed configuration document, a mutable JSON document for results, and related metadata.
+typedef struct FFdata {
+ yyjson_doc* configDoc; // Parsed JSON configuration document
+ yyjson_mut_doc* resultDoc; // Mutable JSON document for storing results
+ FFstrbuf structure; // Custom output structure from command line
+ FFstrbuf structureDisabled; // Disabled modules in the output structure from command line
+ FFstrbuf genConfigPath; // Path to generate configuration file
+ FFDataResultDocType docType; // Type of result document
+ bool configLoaded;
+} FFdata;