summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2025-12-01 20:23:02 +0100
committerAndreas Fankhauser hiddenalpha.ch2025-12-01 20:23:02 +0100
commitd945987cdac264f10e4b3cb5b24e1e663fbe533f (patch)
tree1cf845edce83ac6b6796a65f95cce57297a1c91e /include
parent4690dae81f4b99bee1704be547651d590bb465a8 (diff)
downloadQntan-d945987cdac264f10e4b3cb5b24e1e663fbe533f.tar.gz
Qntan-d945987cdac264f10e4b3cb5b24e1e663fbe533f.zip
Kludge-around with 'FileSystem' impl. Quite useless so far.
Diffstat (limited to 'include')
-rw-r--r--include/qntan/Qntan.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h
index 6f5a7fa..0b8a4c9 100644
--- a/include/qntan/Qntan.h
+++ b/include/qntan/Qntan.h
@@ -57,6 +57,7 @@ struct Qntan_Executor;
struct Qntan_Scheduler;
struct Qntan_IoMux;
struct Qntan_File;
+struct Qntan_FileSystem;
struct Qntan_FourierTransform;
struct Qntan_Process;
struct Qntan_HshTbl;
@@ -431,6 +432,7 @@ struct Qntan_File {
void (*truncate)( struct Qntan_File**, int64_t size,
void(*onDone)(int,Qntan_Cls), Qntan_Cls );
/* TODO doc
+ * TODO There's a duplicate in 'FileSystem' of this function.
* WARN: size MUST be zero. Any other value is UB! (aka reserved for
* future specifications)
*/
@@ -445,6 +447,65 @@ struct Qntan_File {
+struct Qntan_FileSystem {
+ /* VFS (VirtualFileSystem)
+ * WARN: Heavily experimental API!
+ * TODO: Review/fix/adjust/tune function signatures.
+ */
+// void (*getattr)( struct Qntan_FileSystem**, const char*path,
+// void(*onDone)(int, struct stat*buf, Qntan_Cls), Qntan_Cls);
+// /* Get detail information of a file/dir.
+// * 'buf' is only valid until return from 'onDone'.
+// */
+// void (*mkdir)( struct Qntan_FileSystem**, char const*path, mode_t,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls );
+// /**/
+// void (*rmdir)( struct Qntan_FileSystem**, const char*path,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls );
+// /**/
+// void (*open)( struct Qntan_FileSystem**, const char*path,
+// struct fuse_file_info*, void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// void (*create)( struct Qntan_FileSystem**, const char*path, mode_t mode,
+// struct fuse_file_info*, void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// void (*unlink)( struct Qntan_FileSystem**, const char*path,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// void (*truncate)( struct Qntan_FileSystem**, char const*path, off_t size,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /* TODO There's a duplicate in 'File' of this function.
+// */
+// void (*rename)( struct Qntan_FileSystem**, char const*from, char const*to,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// void (*chmod)( struct Qntan_FileSystem**, char const*path, mode_t,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// void (*chown)( struct Qntan_FileSystem**, char const*path, uid_t, gid_t,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// void (*utimens)( struct Qntan_FileSystem**, char const*path, const struct timespec,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls );
+// /**/
+// void (*release)( struct Qntan_FileSystem**, char const*path, struct fuse_file_info*,
+// void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+// /* TODO what about 'close()' ? */
+// void (*fsync)( struct Qntan_FileSystem**, char const*path, int isdatasync,
+// struct fuse_file_info*, void(*onDone)(int, Qntan_Cls), Qntan_Cls);
+// /**/
+};
+
+
+
+
+
+
+
+
+
+
#ifndef Qntan_FourierTransform_transform
# define Qntan_FourierTransform_transform(A, ...) (*A)->transform(A, __VA_ARGS__)
#endif