273 Commits

Author SHA1 Message Date
9841c3f29c refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-24 11:59:06 -05:00
b72baf2c65 fix 2025-03-24 11:53:03 -05:00
6244a587db fix 2025-03-24 11:50:52 -05:00
cd41e026ee return available drive letters on windows 2025-03-24 11:35:36 -05:00
10829fc9d9 return available drive letters on windows 2025-03-24 11:23:36 -05:00
4f69ec5f10 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-23 18:24:37 -05:00
5dc3a0239f fix release
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-23 10:05:31 -05:00
6b18a72b95 fix missing method
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-03-23 07:19:37 -05:00
0e8e56ad90 fix available port detection
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-03-23 06:24:21 -05:00
e53acf799a prevent overlapping api ports 2025-03-22 16:39:32 -05:00
c2eaa92f4a formatting 2025-03-22 15:53:23 -05:00
13eab49207 release global lock before elevating process 2025-03-22 15:52:30 -05:00
616dca89ca acquire global lock first 2025-03-22 15:50:43 -05:00
9626f383d3 refactor 2025-03-22 15:48:29 -05:00
a262a79eb2 fix 2025-03-22 15:45:46 -05:00
f9ec02bf3f fix 2025-03-22 15:43:45 -05:00
e6793f0d6c fix 2025-03-22 15:38:43 -05:00
0d972b0b75 fix 2025-03-22 15:34:55 -05:00
60f0e3dbc1 refactor 2025-03-22 15:29:08 -05:00
630c3463d8 prevent overlapping api ports 2025-03-22 15:27:50 -05:00
e3d036fcb8 clear mount location if in use
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 13:12:32 -05:00
143a41588f fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 10:57:46 -05:00
9fd5b7c03f clear mount list on login failure
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 09:50:24 -05:00
6137b69bd3 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 09:24:40 -05:00
c52c919607 remove advanced from add
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 07:38:16 -05:00
58841986f3 added logoff button
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-22 07:37:09 -05:00
874f5319fd layout changes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 07:25:15 -05:00
c05b4f6652 fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 02:52:48 -05:00
aad26b8529 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 02:23:13 -05:00
e4f59dadfb refactoring
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 02:20:03 -05:00
f8b1b8ad37 return unauthorized when decryption fails 2025-03-22 01:47:40 -05:00
03c8f3461e continue authentication 2025-03-22 01:42:20 -05:00
5b09333f0d partial logon support
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-22 01:25:30 -05:00
40e57f3262 remove debug logging
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 22:31:36 -05:00
959d904961 fork() on linux
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 22:30:11 -05:00
d301e8d871 prefer execvp and _spawnv
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 22:04:45 -05:00
1cc3e6baf0 added show/hide password buttons
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 17:56:31 -05:00
f5b912b16f updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 17:39:39 -05:00
29f7a78dcc fix password
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 17:29:58 -05:00
56d5a57831 fix add mount
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-21 10:48:10 -05:00
972927b2ac refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-20 22:06:22 -05:00
42c25b73e7 removed debugPrint 2025-03-20 22:00:00 -05:00
ea876bd55c refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-20 21:56:22 -05:00
6d2023ba1b fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-20 21:52:18 -05:00
164f8ffc7c fix mount settings encrypt
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-20 20:53:36 -05:00
a28151068a refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-20 18:39:42 -05:00
674a5a6fe1 prompt for password once 2025-03-20 18:37:03 -05:00
d9b8a60055 prompt for password once 2025-03-20 18:36:10 -05:00
6570438872 fix 2025-03-20 18:19:59 -05:00
12ef6910ed fix 2025-03-20 18:15:31 -05:00
225a5cedc5 don't decrypt empty values
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-20 17:56:11 -05:00
b42dc4e942 fix 2025-03-20 17:51:21 -05:00
b72744716d prompt password
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-20 17:33:32 -05:00
1b6237b9fc fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-20 17:04:13 -05:00
bdb8f0aac9 fix
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-03-20 13:49:11 -05:00
29fb70149c encrypt/decrypt secret data 2025-03-20 12:59:23 -05:00
4b45e71193 encrypt/decrypt secret data 2025-03-20 12:54:43 -05:00
0101e92d97 fix 2025-03-20 11:39:35 -05:00
ba5bde24e1 fix 2025-03-20 09:33:10 -05:00
40d71223ae remove passwords from api calls 2025-03-20 09:12:50 -05:00
e73fb02101 remove passwords from api calls 2025-03-20 08:55:10 -05:00
7f300b33c8 remove passwords from api calls 2025-03-20 08:51:50 -05:00
c4c509790d remove passwords from api calls 2025-03-20 08:32:20 -05:00
1ac64c9d82 remove passwords from api calls 2025-03-20 08:09:45 -05:00
c037fd5657 remove passwords from api calls 2025-03-20 08:08:43 -05:00
9b9929e69d remove passwords from api calls 2025-03-20 08:05:00 -05:00
5104af84dc added sodium support
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-19 09:01:05 -05:00
ab42289792 formatting
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-19 08:38:05 -05:00
0e4ebd7742 added sodium support 2025-03-19 08:34:34 -05:00
ea912b38a3 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-19 08:20:15 -05:00
f015647b71 refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-19 08:17:04 -05:00
bced895ea1 fix mounting across multiple instances
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-19 08:13:14 -05:00
901000a085 refactor 2025-03-19 07:44:07 -05:00
d5242c2e6c refactor 2025-03-19 07:43:47 -05:00
7c4cba6797 fix json parsing 2025-03-19 07:41:59 -05:00
10a0e926ad fix 2025-03-18 14:11:48 -05:00
9fcc50fcc3 wait for mount/unmount to complete
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-18 07:47:40 -05:00
d57fa022d8 wait for mount/unmount to complete 2025-03-18 07:30:54 -05:00
ee1638e1dd return null
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-17 13:51:09 -05:00
d125cb47d6 fix route 2025-03-17 13:35:08 -05:00
16bb4fe472 mount status fix 2025-03-17 13:18:36 -05:00
984f4e0bc9 windows fixes 2025-03-17 13:08:01 -05:00
439be1dea8 windows fixes 2025-03-17 12:54:38 -05:00
c9281c9bcd windows fixes 2025-03-17 12:50:16 -05:00
b15393bacf updated README.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 16:44:22 -05:00
f3c0f4978f updated README.md
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-16 16:42:42 -05:00
78ba8553a9 updated README.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 16:41:46 -05:00
2cc646390a revert image 2025-03-16 16:35:38 -05:00
87f5b0f953 updated README.md 2025-03-16 16:34:47 -05:00
c60bb651df revert 2025-03-16 16:33:23 -05:00
6fb8053e43 updated README.md 2025-03-16 16:32:50 -05:00
4c18088bd1 updated README.md 2025-03-16 16:31:00 -05:00
a5eb168032 updated README.md
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-16 16:29:21 -05:00
187e2454ca updated README.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 16:23:34 -05:00
931c861850 remove mount locations
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 15:56:22 -05:00
2a1abd0bb0 save ui settings
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 15:52:46 -05:00
c75ce9ad21 save ui settings 2025-03-16 15:41:50 -05:00
9afc8e3cb6 save ui settings 2025-03-16 15:31:34 -05:00
56beeacbb3 updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 09:50:35 -05:00
4253700fe7 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 08:16:00 -05:00
2d638d6335 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 08:13:41 -05:00
7823627340 added portal settings screen 2025-03-16 08:11:04 -05:00
e7accd1cc1 added portal settings screen 2025-03-16 08:09:42 -05:00
9b5d642106 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 07:09:10 -05:00
e167079e5d layout changes
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-16 07:08:02 -05:00
1081ff0b19 added setting description
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-16 06:53:06 -05:00
c720181208 refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build started...
2025-03-16 06:27:37 -05:00
d7a0fd9d8c fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 23:45:19 -05:00
2a7a409506 fix 2025-03-15 23:38:00 -05:00
97310e2ba9 handle reset
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-15 23:28:52 -05:00
54fe6d7bab fix 2025-03-15 23:24:51 -05:00
f70044b9a8 fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 23:10:30 -05:00
ea30396e49 refactor 2025-03-15 23:09:04 -05:00
985e503c21 updated CHANGELOG.md 2025-03-15 23:07:34 -05:00
b959af26c4 refactor 2025-03-15 23:04:18 -05:00
0add5ec944 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 22:56:23 -05:00
cd9ad1e322 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 22:50:33 -05:00
ca8de7f87d refactor 2025-03-15 22:45:26 -05:00
2ff72eebce refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 22:31:21 -05:00
97fce78370 refactor 2025-03-15 22:22:28 -05:00
21af9be9a8 refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-15 22:20:38 -05:00
23de275e11 remote mount provider support
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 22:18:42 -05:00
28cfcc0344 remote mount provider support 2025-03-15 22:01:29 -05:00
30a91e1cb2 remote mount provider support 2025-03-15 21:56:10 -05:00
b2d4baa903 remote mount provider support 2025-03-15 21:52:01 -05:00
d3070ffee1 ui changes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 21:37:47 -05:00
abd7e24b5e refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 19:20:58 -05:00
462ebe6fcf detect port availability 2025-03-15 19:18:35 -05:00
b93e2978b0 cleanup
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 19:01:29 -05:00
ece002f25b fixes 2025-03-15 19:00:17 -05:00
b9f5f774e2 display error if mount location is not found 2025-03-15 18:43:43 -05:00
52d210974b display error if mount location is not found 2025-03-15 18:34:49 -05:00
7605be809c per-instance locking
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 18:25:03 -05:00
d0f2f78698 handle mount location not found 2025-03-15 18:14:21 -05:00
69c574b906 ignore existing
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 13:31:08 -05:00
67a669ee17 refactor 2025-03-15 13:24:36 -05:00
c82f07056d refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-15 13:20:53 -05:00
196d721005 reset on error
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 13:17:54 -05:00
532dd3c417 ui changes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 11:35:15 -05:00
c4b4bc9b49 ui changes 2025-03-15 11:33:00 -05:00
343ac025d5 cleanup 2025-03-15 11:25:51 -05:00
d08fd52e51 refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-15 11:22:03 -05:00
05f323665a refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-15 10:59:01 -05:00
349bede3b3 fixes 2025-03-15 10:57:56 -05:00
1a7dc51c4b fixes 2025-03-15 09:13:18 -05:00
d209b52848 prevent duplicates 2025-03-15 08:42:11 -05:00
492ccfbdfb fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 21:20:35 -05:00
678dfd6c8b fix 2025-03-14 21:17:37 -05:00
bc146a48a7 fix 2025-03-14 21:12:10 -05:00
04523df564 refactor 2025-03-14 21:03:30 -05:00
b1a31b230a refactor 2025-03-14 20:59:45 -05:00
fe08e274ec don't allow mount until state is determined 2025-03-14 20:57:44 -05:00
33e0066b4c synchronous command 2025-03-14 20:49:14 -05:00
ce814e96a6 mount fixes
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-14 20:46:30 -05:00
7dd56cf715 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 20:38:21 -05:00
79262ef862 update default credentials
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 20:13:32 -05:00
e270867bf2 fix 2025-03-14 20:07:05 -05:00
6b629b81b4 removed logging
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-14 19:59:13 -05:00
812f68422b fix 2025-03-14 19:57:16 -05:00
76c105286f Create management portal in Flutter #39 2025-03-14 19:55:32 -05:00
cd9ac4a02f add mount via ui 2025-03-14 19:33:05 -05:00
6d09b2549e layout changes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 19:19:36 -05:00
69f27b2e69 Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 19:08:44 -05:00
7cbf1a3937 Create management portal in Flutter #39 2025-03-14 19:06:25 -05:00
dc817797f3 Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 18:57:33 -05:00
71789f6cdb Create management portal in Flutter #39 2025-03-14 18:57:04 -05:00
6e8f843252 Create management portal in Flutter #39 2025-03-14 18:54:31 -05:00
f72f86d8ae Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 18:48:34 -05:00
45ea5bab8f Create management portal in Flutter #39 2025-03-14 18:41:53 -05:00
9d083a1d93 Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 16:18:35 -05:00
85beb3dfea refactor 2025-03-14 16:17:25 -05:00
3eb4ad85d3 revert 2025-03-14 15:53:45 -05:00
e45119bbbf Create management portal in Flutter #39 2025-03-14 15:52:09 -05:00
4326169186 Create management portal in Flutter #39 2025-03-14 15:48:37 -05:00
e32233a936 Create management portal in Flutter #39 2025-03-14 15:45:07 -05:00
6e8273f9bc Create management portal in Flutter #39 2025-03-14 15:43:33 -05:00
863e316b8a Create management portal in Flutter #39 2025-03-14 15:40:14 -05:00
07311cd710 Create management portal in Flutter #39 2025-03-14 15:28:56 -05:00
637f123c24 Create management portal in Flutter #39 2025-03-14 15:24:01 -05:00
6602e7eff6 Create management portal in Flutter #39 2025-03-14 15:22:07 -05:00
0fd2dc3ddb Create management portal in Flutter #39
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-14 14:54:40 -05:00
d920a55fc0 Create management portal in Flutter #39 2025-03-14 14:47:23 -05:00
edd27e3e34 Create management portal in Flutter #39 2025-03-14 14:33:55 -05:00
6a8a163d0a update
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-14 11:02:16 -05:00
99fa7ffc15 update
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-03-14 10:54:34 -05:00
957c1f5256 update 2025-03-14 10:53:35 -05:00
0214bcff6d updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-03-14 10:33:26 -05:00
9173ff8d4d updates
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-03-14 10:07:28 -05:00
302cd43a03 update 2025-03-14 10:07:20 -05:00
fe51811b39 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-07 12:32:23 -06:00
35e52d50a7 Create management portal in Flutter #39 2025-03-07 12:31:33 -06:00
eb7bfdddd1 Create management portal in Flutter #39 2025-03-07 12:31:00 -06:00
be6ee3ba07 refactor 2025-03-07 11:39:01 -06:00
4dbe4a30b4 refactor 2025-03-07 11:38:42 -06:00
1d37822451 Create management portal in Flutter #39 2025-03-07 11:36:43 -06:00
5ed74aa5af refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-06 15:13:35 -06:00
94073fe1f1 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-06 14:05:11 -06:00
992a02a6ee refactor 2025-03-06 14:04:05 -06:00
6f45848db4 refactor 2025-03-06 13:46:39 -06:00
918d7172ec refactor 2025-03-06 12:51:29 -06:00
8da6008e29 Create management portal in Flutter #39 2025-03-06 12:50:31 -06:00
d2065af398 Create management portal in Flutter #39 2025-03-06 11:58:18 -06:00
b4fd093e7c Create management portal in Flutter #39 2025-03-06 11:51:39 -06:00
5e47cdb861 Create management portal in Flutter #39 2025-03-06 11:40:08 -06:00
eb8f66ebe9 Create management portal in Flutter #39 2025-03-06 11:32:25 -06:00
72a2567c83 Create management portal in Flutter #39 2025-03-06 10:03:35 -06:00
c1e5bd6b0b Create management portal in Flutter #39 2025-03-06 08:53:36 -06:00
02157d21ea Create management portal in Flutter #39 2025-03-06 08:44:17 -06:00
0318489b6c Create management portal in Flutter #39 2025-03-06 08:19:30 -06:00
847bf68f85 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-05 20:38:15 -06:00
6e42899dd3 Create management portal in Flutter #39 2025-03-05 20:26:44 -06:00
35a794106b Create management portal in Flutter #39
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-03-05 20:25:51 -06:00
c54838ad6f fix display
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-05 20:21:51 -06:00
58fde34cfe Create management portal in Flutter #39 2025-03-05 20:19:42 -06:00
3a72563a5c Create management portal in Flutter #39 2025-03-05 19:59:49 -06:00
9e2ad81cff updates
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-05 14:43:42 -06:00
18a66953f2 fix initial file creation
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-05 14:34:31 -06:00
b2c0f44a7d fix initial file creation 2025-03-05 14:24:17 -06:00
791472455a create root directory 2025-03-05 14:11:30 -06:00
8638de87f9 save on error 2025-03-05 14:10:09 -06:00
9409622fef Create management portal in Flutter #39 2025-03-05 14:03:11 -06:00
f2db24b239 Create management portal in Flutter #39 2025-03-05 10:46:00 -06:00
199aea55be Create management portal in Flutter #39 2025-03-05 10:41:25 -06:00
8a18e7a4c9 Create management portal in Flutter #39 2025-03-05 10:31:18 -06:00
dce856b2be Require --name,-na option for encryption provider 2025-03-05 09:45:50 -06:00
51ee46e279 Create management portal in Flutter #39 2025-03-05 09:34:57 -06:00
a0bf5ec3d2 Require --name,-na option for encryption provider 2025-03-05 08:20:24 -06:00
b74160bfb3 Create management portal in Flutter #39 2025-03-05 08:17:27 -06:00
e35f43af97 Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-04 19:45:43 -06:00
e9d65bb566 Create management portal in Flutter #39 2025-03-04 19:43:17 -06:00
15f6b116cc Create management portal in Flutter #39 2025-03-04 19:42:13 -06:00
71f3567375 Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-04 14:48:37 -06:00
865ed5f0c1 Create management portal in Flutter #39 2025-03-04 14:02:28 -06:00
661f57d599 refactor 2025-03-04 13:34:02 -06:00
badd098fe0 Create management portal in Flutter #39 2025-03-04 13:32:15 -06:00
820617b3ff refactor 2025-03-04 13:06:23 -06:00
717b461eaf Create management portal in Flutter #39 2025-03-04 12:57:59 -06:00
4b3890809d updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-03 19:58:15 -06:00
d9cd2aa88a Create management portal in Flutter (#40)
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
Reviewed-on: #40
2025-03-03 19:56:56 -06:00
c59c846856 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-03-01 11:22:49 -06:00
1a400cac8d updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-03-01 11:18:01 -06:00
57b956b60c updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-02-28 18:29:32 -06:00
b95d69ccb8 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-02-28 17:44:08 -06:00
d90a0eab3d updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-02-28 17:35:05 -06:00
c6448cc64c updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-02-28 15:01:54 -06:00
514e9535e2 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-02-28 13:37:36 -06:00
14cee39a20 fix
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-02-28 12:10:32 -06:00
2c510346f2 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-02-28 11:06:47 -06:00
1560804df8 fixed config name
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-24 09:49:26 -06:00
cc3c0febc3 updated README.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 18:23:04 -06:00
0458f12e17 Update README.md 2025-02-23 18:21:57 -06:00
ae43cedb45 Update README.md 2025-02-23 18:21:15 -06:00
191eb1620b Update README.md
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-02-23 18:20:52 -06:00
9c648583fb Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 18:19:52 -06:00
14d78d0b65 cleanup
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 16:34:12 -06:00
54efde0497 Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 16:31:33 -06:00
5f593ab86d Complete initial v2.0 documentation #33 2025-02-23 16:30:23 -06:00
feb09746f5 Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 11:19:16 -06:00
faad98c11e Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 11:18:18 -06:00
12f04c6064 revert
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 00:32:04 -06:00
ca307c3bf2 update
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 00:29:44 -06:00
ac6f4bcade Complete initial v2.0 documentation #33
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-02-23 00:27:11 -06:00
9d48cd97e3 Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 00:20:51 -06:00
6c6fb0554f updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-23 00:01:24 -06:00
a134f01436 updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-22 23:56:21 -06:00
44c33652fa cleanup 2025-02-22 23:55:46 -06:00
131c36415d Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-22 23:06:38 -06:00
9456c8b1d2 Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-22 23:00:26 -06:00
b8c62612d8 refactor 2025-02-22 22:01:37 -06:00
521874a56f Complete initial v2.0 documentation #33
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-22 19:59:22 -06:00
f41ad47262 updated CHANGES.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-02-22 11:36:20 -06:00
8bb2eeb88c updated CHANGELOG.md
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-02-22 10:07:52 -06:00
b1aca46034 updated version 2025-02-22 09:58:57 -06:00
232 changed files with 4003 additions and 5373 deletions

View File

@ -17,7 +17,6 @@ bugprone
cflags cflags
chrono chrono
cmake_current_source_dir cmake_current_source_dir
coinit_apartmentthreaded
comdlg32 comdlg32
cppcoreguidelines cppcoreguidelines
cppdbg cppdbg
@ -116,7 +115,6 @@ googletest
gpath gpath
gtest_version gtest_version
has_setxattr has_setxattr
hkey
httpapi httpapi
httplib httplib
icudata icudata
@ -146,7 +144,6 @@ libuuid_include_dirs
libvlc libvlc
linkflags linkflags
localappdata localappdata
lpbyte
lptr lptr
lpwstr lpwstr
markdownlint markdownlint

36
.vimspector.json Normal file
View File

@ -0,0 +1,36 @@
{
"configurations": {
"UnixDebug": {
"adapter": "vscode-cpptools",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/build/debug/repertory",
"args": ["-f", "/home/sgraves/mnt"],
"cwd": "${workspaceRoot}/build/debug",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"stopAtEntry": true,
"logging": {
"engineLogging": false
}
}
},
"UnixDebugTest": {
"adapter": "vscode-cpptools",
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/build/debug/unittests",
"args": ["--gtest_filter=file_manager.can_close_after_download_timeout"],
"cwd": "${workspaceRoot}/build",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"stopAtEntry": true,
"logging": {
"engineLogging": false
}
}
}
}
}

View File

@ -1,41 +1,18 @@
# Changelog # Changelog
## v2.0.6-release ## v2.0.5-rc
### Issues ### Issues
* ~~\#12 [Unit Test] Complete all providers unit tests~~ * ~~\#12 [Unit Test] Complete all providers unit tests~~
* ~~\#21 [Unit Test] Complete WinFSP unit tests~~ * ~~\#21 [Unit Test] Complete WinFSP unit tests~~
* ~~\#22 [Unit Test] Complete FUSE unit tests~~ * ~~\#22 [Unit Test] Complete FUSE unit tests~~
* ~~\#33 Complete initial v2.0 documentation~~
* \#42 [bug] Remote mount directory listing on Windows connected to Linux is failing
* \#43 [bug] Directories are not importing properly for Sia
* \#44 [bug] Windows-to-Linux remote mount ignores `CREATE_NEW`
* \#45 [bug] Windows-to-Linux remote mount is not handling attempts to remove a non-empty directory properly
* \#46 [bug] Changes to maximum cache size should be updated live
* \#47 [bug] Windows-to-Linux remote mount is allowing directory rename when directory is not empty
* \#48 [bug] Windows-to-Linux remote mount overlapped I/O is not detecting EOF for read operations
* \#49 [ui] Implement provider test button
### Changes from v2.0.5-rc
* Drive letters in UI should always be lowercase
* Fixed WinFSP directory rename for non-empty directories
* Migrated to v2 error handling
## v2.0.5-rc
<!-- markdownlint-disable-next-line -->
### Issues
* \#39 Create management portal in Flutter * \#39 Create management portal in Flutter
### Changes from v2.0.4-rc ### Changes from v2.0.4-rc
* Continue documentation updates * Continue documentation updates
* Fixed `-status` command erasing active mount information * Prevent overlapping `repertory` `ApiPort`'s
* Fixed overlapping HTTP REST API port's
* Refactored/fixed instance locking
* Removed passwords and secret key values from API calls * Removed passwords and secret key values from API calls
* Renamed setting `ApiAuth` to `ApiPassword` * Renamed setting `ApiAuth` to `ApiPassword`
* Require `--name,-na` option for encryption provider * Require `--name,-na` option for encryption provider
@ -93,7 +70,6 @@
## v2.0.2-rc ## v2.0.2-rc
<!-- markdownlint-disable-next-line -->
### BREAKING CHANGES ### BREAKING CHANGES
* Refactored `config.json` - will need to verify configuration settings prior to mounting * Refactored `config.json` - will need to verify configuration settings prior to mounting

View File

@ -1,20 +1,20 @@
set(BINUTILS_HASH ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237) set(BINUTILS_HASH b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365)
set(BOOST_HASH 3621533e820dcab1e8012afd583c0c73cf0f77694952b81352bf38c1488f9cb4)
set(BOOST2_HASH 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca) set(BOOST2_HASH 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca)
set(CPP_HTTPLIB_HASH 18064587e0cc6a0d5d56d619f4cbbcaba47aa5d84d86013abbd45d95c6653866) set(BOOST_HASH f55c340aa49763b1925ccf02b2e83f35fdcf634c9d5164a2acb87540173c741d)
set(CURL_HASH ccc5ba45d9f5320c70ffb24e5411b66ba55ea1f333bf78be0963ed90a9328699) set(CPP_HTTPLIB_HASH c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608)
set(EXPAT_HASH 85372797ff0673a8fc4a6be16466bb5a0ca28c0dcf3c6f7ac1686b4a3ba2aabb) set(CURL_HASH 6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f)
set(GCC_HASH 51b9919ea69c980d7a381db95d4be27edf73b21254eb13d752a08003b4d013b1) set(EXPAT_HASH 372b18f6527d162fa9658f1c74d22a37429b82d822f5a1e1fc7e00f6045a06a2)
set(GCC_HASH 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293)
set(GTEST_HASH 78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399) set(GTEST_HASH 78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399)
set(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2) set(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2)
set(JSON_HASH 4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187) set(JSON_HASH 0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406)
set(LIBSODIUM_HASH 8e5aeca07a723a27bbecc3beef14b0068d37e7fc0e97f51b3f1c82d2a58005c1) set(LIBSODIUM_HASH 8e5aeca07a723a27bbecc3beef14b0068d37e7fc0e97f51b3f1c82d2a58005c1)
set(MINGW_HASH cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f) set(MINGW_HASH cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f)
set(OPENSSL_HASH 344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0) set(OPENSSL_HASH 002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3)
set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591) set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591)
set(PUGIXML_HASH 655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a) set(PUGIXML_HASH 655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a)
set(ROCKSDB_HASH 3fdc9ca996971c4c039959866382c4a3a6c8ade4abf888f3b2ff77153e07bf28) set(ROCKSDB_HASH fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724)
set(SPDLOG_HASH 7a80896357f3e8e920e85e92633b14ba0f229c506e6f978578bdc35ba09e9a5d) set(SPDLOG_HASH 25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc)
set(SQLITE_HASH 6cebd1d8403fc58c30e93939b246f3e6e58d0765a5cd50546f16c00fd805d2c3) set(SQLITE_HASH 6cebd1d8403fc58c30e93939b246f3e6e58d0765a5cd50546f16c00fd805d2c3)
set(STDUUID_HASH b1176597e789531c38481acbbed2a6894ad419aab0979c10410d59eb0ebf40d3) set(STDUUID_HASH b1176597e789531c38481acbbed2a6894ad419aab0979c10410d59eb0ebf40d3)
set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c) set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c)

View File

@ -1,27 +1,28 @@
set(BINUTILS_VERSION 2.44) set(BINUTILS_VERSION 2.43)
set(BOOST_MAJOR_VERSION 1)
set(BOOST_MINOR_VERSION 88)
set(BOOST_PATCH_VERSION 0)
set(BOOST2_MAJOR_VERSION 1) set(BOOST2_MAJOR_VERSION 1)
set(BOOST2_MINOR_VERSION 76) set(BOOST2_MINOR_VERSION 76)
set(BOOST2_PATCH_VERSION 0) set(BOOST2_PATCH_VERSION 0)
set(CPP_HTTPLIB_VERSION 0.20.0) set(BOOST_MAJOR_VERSION 1)
set(CURL_VERSION 8.13.0) set(BOOST_MINOR_VERSION 87)
set(CURL2_VERSION 8_13_0) set(BOOST_PATCH_VERSION 0)
set(EXPAT_VERSION 2.7.1) set(CPP_HTTPLIB_VERSION 0.19.0)
set(EXPAT2_VERSION 2_7_1) set(CURL2_VERSION 8_12_1)
set(GCC_VERSION 15.1.0) set(CURL_VERSION 8.12.1)
set(EXPAT2_VERSION 2_6_4)
set(EXPAT_VERSION 2.6.4)
set(GCC_VERSION 14.2.0)
set(GTEST_VERSION 1.16.0) set(GTEST_VERSION 1.16.0)
set(ICU_VERSION 76-1) set(ICU_VERSION 76-1)
set(JSON_VERSION 3.12.0) set(JSON_VERSION 3.11.3)
set(LIBSODIUM_VERSION 1.0.20) set(LIBSODIUM_VERSION 1.0.20)
set(MESA_VERSION 23.3.3)
set(MINGW_VERSION 12.0.0) set(MINGW_VERSION 12.0.0)
set(OPENSSL_VERSION 3.5.0) set(OPENSSL_VERSION 3.4.1)
set(PKG_CONFIG_VERSION 0.29.2) set(PKG_CONFIG_VERSION 0.29.2)
set(PUGIXML_VERSION 1.15) set(PUGIXML_VERSION 1.15)
set(ROCKSDB_VERSION 10.0.1) set(ROCKSDB_VERSION 9.10.0)
set(SPDLOG_VERSION 1.15.2) set(SPDLOG_VERSION 1.15.1)
set(SQLITE_VERSION 3490100)
set(SQLITE2_VERSION 3.49.1) set(SQLITE2_VERSION 3.49.1)
set(SQLITE_VERSION 3490100)
set(STDUUID_VERSION 1.2.3) set(STDUUID_VERSION 1.2.3)
set(ZLIB_VERSION 1.3.1) set(ZLIB_VERSION 1.3.1)

View File

@ -10,7 +10,7 @@ PROJECT_DESC="Mount utility for Sia and S3"
PROJECT_MAJOR_VERSION=2 PROJECT_MAJOR_VERSION=2
PROJECT_MINOR_VERSION=0 PROJECT_MINOR_VERSION=0
PROJECT_REVISION_VERSION=6 PROJECT_REVISION_VERSION=5
PROJECT_RELEASE_NUM=0 PROJECT_RELEASE_NUM=0
PROJECT_RELEASE_ITER=rc PROJECT_RELEASE_ITER=rc
@ -21,7 +21,6 @@ PROJECT_PUBLIC_KEY=${DEVELOPER_PUBLIC_KEY}
PROJECT_FLUTTER_BASE_HREF="/ui/" PROJECT_FLUTTER_BASE_HREF="/ui/"
PROJECT_ENABLE_V2_ERRORS=ON
PROJECT_ENABLE_WIN32_LONG_PATH_NAMES=OFF PROJECT_ENABLE_WIN32_LONG_PATH_NAMES=OFF
PROJECT_ENABLE_BACKWARD_CPP=OFF PROJECT_ENABLE_BACKWARD_CPP=OFF

View File

@ -351,9 +351,9 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./expat-${MY_EXPAT_VERSION}.tar.gz.sha
ARG FONTCONFIG_VERSION ARG FONTCONFIG_VERSION
ENV MY_FONTCONFIG_VERSION=${FONTCONFIG_VERSION} ENV MY_FONTCONFIG_VERSION=${FONTCONFIG_VERSION}
RUN if [ -f "/3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.xz" ]; then \ RUN if [ -f "/3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./fontconfig-${MY_FONTCONFIG_VERSION}.tar.xz.sha256 && cd - \ cd /3rd_party && sha256sum -c ./fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvJf /3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.xz \ && tar xvzf /3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz \
&& cd fontconfig-${MY_FONTCONFIG_VERSION} \ && cd fontconfig-${MY_FONTCONFIG_VERSION} \
&& meson setup \ && meson setup \
--cross-file ${MY_TOOLCHAIN_FILE_MESON} \ --cross-file ${MY_TOOLCHAIN_FILE_MESON} \

View File

@ -53,6 +53,9 @@ private:
std::optional<host_config> host_config_; std::optional<host_config> host_config_;
std::optional<s3_config> s3_config_; std::optional<s3_config> s3_config_;
private:
bool use_s3_path_style_{false};
public: public:
[[nodiscard]] static auto create_curl() -> CURL *; [[nodiscard]] static auto create_curl() -> CURL *;
@ -64,7 +67,8 @@ public:
const host_config &cfg) const host_config &cfg)
-> std::string; -> std::string;
[[nodiscard]] static auto create_host_config(const s3_config &cfg) [[nodiscard]] static auto create_host_config(const s3_config &cfg,
bool use_s3_path_style)
-> host_config; -> host_config;
[[nodiscard]] static auto url_encode(CURL *curl, const std::string &data, [[nodiscard]] static auto url_encode(CURL *curl, const std::string &data,
@ -221,7 +225,8 @@ public:
} }
if (curl_code != CURLE_OK) { if (curl_code != CURLE_OK) {
event_system::instance().raise<curl_error>(curl_code, function_name, url); event_system::instance().raise<curl_error>(curl_code, function_name,
url);
return false; return false;
} }
@ -233,6 +238,8 @@ public:
} }
public: public:
void enable_s3_path_style(bool enable) override;
[[nodiscard]] auto make_request(const curl::requests::http_delete &del, [[nodiscard]] auto make_request(const curl::requests::http_delete &del,
long &response_code, long &response_code,
stop_type &stop_requested) const stop_type &stop_requested) const

View File

@ -34,29 +34,28 @@ struct i_http_comm {
INTERFACE_SETUP(i_http_comm); INTERFACE_SETUP(i_http_comm);
public: public:
virtual void enable_s3_path_style(bool enable) = 0;
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
make_request(const curl::requests::http_delete &del, long &response_code, make_request(const curl::requests::http_delete &del, long &response_code,
stop_type &stop_requested) const -> bool = 0; stop_type &stop_requested) const -> bool = 0;
[[nodiscard]] virtual auto make_request(const curl::requests::http_get &get, [[nodiscard]] virtual auto
long &response_code, make_request(const curl::requests::http_get &get, long &response_code,
stop_type &stop_requested) const stop_type &stop_requested) const -> bool = 0;
-> bool = 0;
[[nodiscard]] virtual auto make_request(const curl::requests::http_head &head, [[nodiscard]] virtual auto
long &response_code, make_request(const curl::requests::http_head &head, long &response_code,
stop_type &stop_requested) const stop_type &stop_requested) const -> bool = 0;
-> bool = 0;
[[nodiscard]] virtual auto make_request(const curl::requests::http_post &post, [[nodiscard]] virtual auto
long &response_code, make_request(const curl::requests::http_post &post, long &response_code,
stop_type &stop_requested) const stop_type &stop_requested) const -> bool = 0;
-> bool = 0;
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
make_request(const curl::requests::http_put_file &put_file, make_request(const curl::requests::http_put_file &put_file,
long &response_code, stop_type &stop_requested) const long &response_code,
-> bool = 0; stop_type &stop_requested) const -> bool = 0;
}; };
} // namespace repertory } // namespace repertory

View File

@ -94,7 +94,7 @@ private:
bool shutdown_ = false; bool shutdown_ = false;
private: private:
static constexpr auto min_pool_size = 10U; static constexpr const auto min_pool_size = 10U;
public: public:
void execute(const std::string &client_id, std::uint64_t thread_id, void execute(const std::string &client_id, std::uint64_t thread_id,

View File

@ -54,13 +54,12 @@ REPERTORY_IGNORE_WARNINGS_DISABLE()
using namespace std::chrono_literals; using namespace std::chrono_literals;
using json = nlohmann::json; using json = nlohmann::json;
inline constexpr std::string_view REPERTORY{"repertory"}; inline constexpr const std::string_view REPERTORY = "repertory";
inline constexpr std::string_view REPERTORY_DATA_NAME{"repertory2"}; inline constexpr const std::wstring_view REPERTORY_W = L"repertory";
inline constexpr std::wstring_view REPERTORY_W{L"repertory"};
inline constexpr std::uint64_t REPERTORY_CONFIG_VERSION{2ULL}; inline constexpr const std::uint64_t REPERTORY_CONFIG_VERSION = 2ULL;
inline constexpr std::string_view REPERTORY_MIN_REMOTE_VERSION{"2.0.0"}; inline constexpr const std::string_view REPERTORY_DATA_NAME = "repertory2";
inline constexpr std::string_view RENTERD_MIN_VERSION{"2.0.0"}; inline constexpr const std::string_view REPERTORY_MIN_REMOTE_VERSION = "2.0.0";
#define REPERTORY_INVALID_HANDLE INVALID_HANDLE_VALUE #define REPERTORY_INVALID_HANDLE INVALID_HANDLE_VALUE
@ -222,11 +221,11 @@ using WCHAR = wchar_t;
#define MAX_PATH 260 #define MAX_PATH 260
#define STATUS_SUCCESS std::uint32_t{0U}
#define STATUS_ACCESS_DENIED std::uint32_t{0xC0000022L} #define STATUS_ACCESS_DENIED std::uint32_t{0xC0000022L}
#define STATUS_DEVICE_BUSY std::uint32_t{0x80000011L} #define STATUS_DEVICE_BUSY std::uint32_t{0x80000011L}
#define STATUS_DEVICE_INSUFFICIENT_RESOURCES std::uint32_t{0xC0000468L} #define STATUS_DEVICE_INSUFFICIENT_RESOURCES std::uint32_t{0xC0000468L}
#define STATUS_DIRECTORY_NOT_EMPTY std::uint32_t{0xC0000101L} #define STATUS_DIRECTORY_NOT_EMPTY std::uint32_t{0xC0000101L}
#define STATUS_END_OF_FILE std::uint32_t{0xC0000011L}
#define STATUS_FILE_IS_A_DIRECTORY std::uint32_t{0xC00000BAL} #define STATUS_FILE_IS_A_DIRECTORY std::uint32_t{0xC00000BAL}
#define STATUS_FILE_TOO_LARGE std::uint32_t{0xC0000904L} #define STATUS_FILE_TOO_LARGE std::uint32_t{0xC0000904L}
#define STATUS_INSUFFICIENT_RESOURCES std::uint32_t{0xC000009AL} #define STATUS_INSUFFICIENT_RESOURCES std::uint32_t{0xC000009AL}
@ -235,13 +234,11 @@ using WCHAR = wchar_t;
#define STATUS_INVALID_HANDLE std::uint32_t{0xC0000006L} #define STATUS_INVALID_HANDLE std::uint32_t{0xC0000006L}
#define STATUS_INVALID_IMAGE_FORMAT std::uint32_t{0xC000007BL} #define STATUS_INVALID_IMAGE_FORMAT std::uint32_t{0xC000007BL}
#define STATUS_INVALID_PARAMETER std::uint32_t{0xC000000DL} #define STATUS_INVALID_PARAMETER std::uint32_t{0xC000000DL}
#define STATUS_NOT_IMPLEMENTED std::uint32_t{0xC0000002L}
#define STATUS_NO_MEMORY std::uint32_t{0xC0000017L} #define STATUS_NO_MEMORY std::uint32_t{0xC0000017L}
#define STATUS_OBJECT_NAME_COLLISION std::uint32_t{0xC0000035L} #define STATUS_NOT_IMPLEMENTED std::uint32_t{0xC0000002L}
#define STATUS_OBJECT_NAME_EXISTS std::uint32_t{0x40000000L} #define STATUS_OBJECT_NAME_EXISTS std::uint32_t{0x40000000L}
#define STATUS_OBJECT_NAME_NOT_FOUND std::uint32_t{0xC0000034L} #define STATUS_OBJECT_NAME_NOT_FOUND std::uint32_t{0xC0000034L}
#define STATUS_OBJECT_PATH_INVALID std::uint32_t{0xC0000039L} #define STATUS_OBJECT_PATH_INVALID std::uint32_t{0xC0000039L}
#define STATUS_SUCCESS std::uint32_t{0U}
#define STATUS_UNEXPECTED_IO_ERROR std::uint32_t{0xC00000E9L} #define STATUS_UNEXPECTED_IO_ERROR std::uint32_t{0xC00000E9L}
#define CONVERT_STATUS_NOT_IMPLEMENTED(e) \ #define CONVERT_STATUS_NOT_IMPLEMENTED(e) \

View File

@ -50,14 +50,14 @@ public:
[[nodiscard]] auto fill_buffer(const remote::file_offset &offset, [[nodiscard]] auto fill_buffer(const remote::file_offset &offset,
fuse_fill_dir_t filler_function, void *buffer, fuse_fill_dir_t filler_function, void *buffer,
populate_stat_callback populate_stat) -> int; populate_stat_callback populate_stat) -> int;
#endif // !defined(_WIN32) #endif
[[nodiscard]] auto get(std::size_t offset, std::string &item) -> int; [[nodiscard]] auto get(std::size_t offset, std::string &item) -> int;
[[nodiscard]] auto get_count() const -> std::size_t { return items_.size(); } [[nodiscard]] auto get_count() const -> std::size_t { return items_.size(); }
[[nodiscard]] auto get_directory_item(std::size_t offset, directory_item &di) [[nodiscard]] auto get_directory_item(std::size_t offset,
-> api_error; directory_item &di) -> api_error;
[[nodiscard]] auto get_directory_item(const std::string &api_path, [[nodiscard]] auto get_directory_item(const std::string &api_path,
directory_item &di) -> api_error; directory_item &di) -> api_error;
@ -71,8 +71,8 @@ public:
auto operator=(const directory_iterator &iterator) noexcept auto operator=(const directory_iterator &iterator) noexcept
-> directory_iterator &; -> directory_iterator &;
auto operator=(directory_iterator &&iterator) noexcept auto
-> directory_iterator &; operator=(directory_iterator &&iterator) noexcept -> directory_iterator &;
auto operator=(directory_item_list list) noexcept -> directory_iterator &; auto operator=(directory_item_list list) noexcept -> directory_iterator &;
}; };

View File

@ -61,7 +61,7 @@ private:
static auto instance() -> fuse_base &; static auto instance() -> fuse_base &;
private: private:
struct fuse_operations fuse_ops_{}; struct fuse_operations fuse_ops_ {};
private: private:
[[nodiscard]] auto [[nodiscard]] auto
@ -78,9 +78,9 @@ private:
static void execute_void_callback(std::string_view function_name, static void execute_void_callback(std::string_view function_name,
const std::function<void()> &cb); const std::function<void()> &cb);
static auto execute_void_pointer_callback(std::string_view function_name, static auto
const std::function<void *()> &cb) execute_void_pointer_callback(std::string_view function_name,
-> void *; const std::function<void *()> &cb) -> void *;
void raise_fuse_event(std::string_view function_name, void raise_fuse_event(std::string_view function_name,
std::string_view api_path, int ret, std::string_view api_path, int ret,
@ -91,22 +91,22 @@ private:
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] static auto chflags_(const char *path, uint32_t flags) -> int; [[nodiscard]] static auto chflags_(const char *path, uint32_t flags) -> int;
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] static auto chmod_(const char *path, mode_t mode, [[nodiscard]] static auto chmod_(const char *path, mode_t mode,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto chmod_(const char *path, mode_t mode) -> int; [[nodiscard]] static auto chmod_(const char *path, mode_t mode) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] static auto chown_(const char *path, uid_t uid, gid_t gid, [[nodiscard]] static auto chown_(const char *path, uid_t uid, gid_t gid,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto chown_(const char *path, uid_t uid, gid_t gid) [[nodiscard]] static auto chown_(const char *path, uid_t uid,
-> int; gid_t gid) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] static auto create_(const char *path, mode_t mode, [[nodiscard]] static auto create_(const char *path, mode_t mode,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
@ -114,19 +114,19 @@ private:
static void destroy_(void *ptr); static void destroy_(void *ptr);
[[nodiscard]] static auto fallocate_(const char *path, int mode, off_t offset, [[nodiscard]] static auto fallocate_(const char *path, int mode, off_t offset,
off_t length, struct fuse_file_info *fi) off_t length,
-> int; struct fuse_file_info *fi) -> int;
#if FUSE_USE_VERSION < 30 #if FUSE_USE_VERSION < 30
[[nodiscard]] static auto fgetattr_(const char *path, struct stat *st, [[nodiscard]] static auto fgetattr_(const char *path, struct stat *st,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#endif // FUSE_USE_VERSION < 30 #endif
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] static auto fsetattr_x_(const char *path, [[nodiscard]] static auto fsetattr_x_(const char *path,
struct setattr_x *attr, struct setattr_x *attr,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#endif // defined(__APPLE__) #endif // __APPLE__
[[nodiscard]] static auto fsync_(const char *path, int datasync, [[nodiscard]] static auto fsync_(const char *path, int datasync,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
@ -137,27 +137,27 @@ private:
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] static auto getattr_(const char *path, struct stat *st, [[nodiscard]] static auto getattr_(const char *path, struct stat *st,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto getattr_(const char *path, struct stat *st) -> int; [[nodiscard]] static auto getattr_(const char *path, struct stat *st) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] static auto getxtimes_(const char *path, [[nodiscard]] static auto getxtimes_(const char *path,
struct timespec *bkuptime, struct timespec *bkuptime,
struct timespec *crtime) -> int; struct timespec *crtime) -> int;
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] static auto init_(struct fuse_conn_info *conn, [[nodiscard]] static auto init_(struct fuse_conn_info *conn,
struct fuse_config *cfg) -> void *; struct fuse_config *cfg) -> void *;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto init_(struct fuse_conn_info *conn) -> void *; [[nodiscard]] static auto init_(struct fuse_conn_info *conn) -> void *;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] static auto mkdir_(const char *path, mode_t mode) -> int; [[nodiscard]] static auto mkdir_(const char *path, mode_t mode) -> int;
[[nodiscard]] static auto open_(const char *path, struct fuse_file_info *fi) [[nodiscard]] static auto open_(const char *path,
-> int; struct fuse_file_info *fi) -> int;
[[nodiscard]] static auto opendir_(const char *path, [[nodiscard]] static auto opendir_(const char *path,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
@ -171,12 +171,12 @@ private:
fuse_fill_dir_t fuse_fill_dir, fuse_fill_dir_t fuse_fill_dir,
off_t offset, struct fuse_file_info *fi, off_t offset, struct fuse_file_info *fi,
fuse_readdir_flags flags) -> int; fuse_readdir_flags flags) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto readdir_(const char *path, void *buf, [[nodiscard]] static auto readdir_(const char *path, void *buf,
fuse_fill_dir_t fuse_fill_dir, fuse_fill_dir_t fuse_fill_dir,
off_t offset, struct fuse_file_info *fi) off_t offset,
-> int; struct fuse_file_info *fi) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] static auto release_(const char *path, [[nodiscard]] static auto release_(const char *path,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
@ -187,9 +187,9 @@ private:
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] static auto rename_(const char *from, const char *to, [[nodiscard]] static auto rename_(const char *from, const char *to,
unsigned int flags) -> int; unsigned int flags) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto rename_(const char *from, const char *to) -> int; [[nodiscard]] static auto rename_(const char *from, const char *to) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] static auto rmdir_(const char *path) -> int; [[nodiscard]] static auto rmdir_(const char *path) -> int;
@ -199,36 +199,35 @@ private:
char *value, size_t size, char *value, size_t size,
uint32_t position) -> int; uint32_t position) -> int;
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] static auto getxattr_(const char *path, const char *name, [[nodiscard]] static auto getxattr_(const char *path, const char *name,
char *value, size_t size) -> int; char *value, size_t size) -> int;
#endif // defined(__APPLE__) #endif // __APPLE__
[[nodiscard]] static auto listxattr_(const char *path, char *buffer, [[nodiscard]] static auto listxattr_(const char *path, char *buffer,
size_t size) -> int; size_t size) -> int;
[[nodiscard]] static auto removexattr_(const char *path, const char *name) [[nodiscard]] static auto removexattr_(const char *path,
-> int; const char *name) -> int;
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] static auto setxattr_(const char *path, const char *name, [[nodiscard]] static auto setxattr_(const char *path, const char *name,
const char *value, size_t size, int flags, const char *value, size_t size, int flags,
uint32_t position) -> int; uint32_t position) -> int;
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] static auto setxattr_(const char *path, const char *name, [[nodiscard]] static auto setxattr_(const char *path, const char *name,
const char *value, size_t size, int flags) const char *value, size_t size,
-> int; int flags) -> int;
#endif // defined(__APPLE__) #endif // __APPLE__
#endif // defined(HAS_SETXATTR) #endif // HAS_SETXATTR
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] static auto setattr_x_(const char *path, struct setattr_x *attr) [[nodiscard]] static auto setattr_x_(const char *path,
-> int; struct setattr_x *attr) -> int;
[[nodiscard]] static auto setbkuptime_(const char *path, [[nodiscard]] static auto
const struct timespec *bkuptime) setbkuptime_(const char *path, const struct timespec *bkuptime) -> int;
-> int;
[[nodiscard]] static auto setchgtime_(const char *path, [[nodiscard]] static auto setchgtime_(const char *path,
const struct timespec *chgtime) -> int; const struct timespec *chgtime) -> int;
@ -238,20 +237,20 @@ private:
[[nodiscard]] static auto setvolname_(const char *volname) -> int; [[nodiscard]] static auto setvolname_(const char *volname) -> int;
[[nodiscard]] static auto statfs_x_(const char *path, struct statfs *stbuf) [[nodiscard]] static auto statfs_x_(const char *path,
-> int; struct statfs *stbuf) -> int;
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] static auto statfs_(const char *path, struct statvfs *stbuf) [[nodiscard]] static auto statfs_(const char *path,
-> int; struct statvfs *stbuf) -> int;
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] static auto truncate_(const char *path, off_t size, [[nodiscard]] static auto truncate_(const char *path, off_t size,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto truncate_(const char *path, off_t size) -> int; [[nodiscard]] static auto truncate_(const char *path, off_t size) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] static auto unlink_(const char *path) -> int; [[nodiscard]] static auto unlink_(const char *path) -> int;
@ -259,18 +258,18 @@ private:
[[nodiscard]] static auto utimens_(const char *path, [[nodiscard]] static auto utimens_(const char *path,
const struct timespec tv[2], const struct timespec tv[2],
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] static auto utimens_(const char *path, [[nodiscard]] static auto utimens_(const char *path,
const struct timespec tv[2]) -> int; const struct timespec tv[2]) -> int;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] static auto write_(const char *path, const char *buffer, [[nodiscard]] static auto write_(const char *path, const char *buffer,
size_t write_size, off_t write_offset, size_t write_size, off_t write_offset,
struct fuse_file_info *fi) -> int; struct fuse_file_info *fi) -> int;
protected: protected:
[[nodiscard]] virtual auto access_impl(std::string /*api_path*/, int /*mask*/) [[nodiscard]] virtual auto access_impl(std::string /*api_path*/,
-> api_error { int /*mask*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -279,40 +278,37 @@ protected:
uint32_t /*flags*/) -> api_error { uint32_t /*flags*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] virtual auto chmod_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
mode_t /*mode*/, chmod_impl(std::string /*api_path*/, mode_t /*mode*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else //FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto chmod_impl(std::string /*api_path*/, [[nodiscard]] virtual auto chmod_impl(std::string /*api_path*/,
mode_t /*mode*/) -> api_error { mode_t /*mode*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] virtual auto chown_impl(std::string /*api_path*/, uid_t /*uid*/, [[nodiscard]] virtual auto
gid_t /*gid*/, chown_impl(std::string /*api_path*/, uid_t /*uid*/, gid_t /*gid*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto chown_impl(std::string /*api_path*/, uid_t /*uid*/, [[nodiscard]] virtual auto chown_impl(std::string /*api_path*/, uid_t /*uid*/,
gid_t /*gid*/) -> api_error { gid_t /*gid*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] virtual auto create_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
mode_t /*mode*/, create_impl(std::string /*api_path*/, mode_t /*mode*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -320,87 +316,81 @@ protected:
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
fallocate_impl(std::string /*api_path*/, int /*mode*/, off_t /*offset*/, fallocate_impl(std::string /*api_path*/, int /*mode*/, off_t /*offset*/,
off_t /*length*/, struct fuse_file_info * /*fi*/) off_t /*length*/,
-> api_error { struct fuse_file_info * /*fi*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto fgetattr_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct stat * /*st*/, fgetattr_impl(std::string /*api_path*/, struct stat * /*st*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] virtual auto fsetattr_x_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct setattr_x * /*attr*/, fsetattr_x_impl(std::string /*api_path*/, struct setattr_x * /*attr*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // defined(__APPLE__) #endif // __APPLE__
[[nodiscard]] virtual auto fsync_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
int /*datasync*/, fsync_impl(std::string /*api_path*/, int /*datasync*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#if FUSE_USE_VERSION < 30 #if FUSE_USE_VERSION < 30
[[nodiscard]] virtual auto ftruncate_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
off_t /*size*/, ftruncate_impl(std::string /*api_path*/, off_t /*size*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION < 30 #endif
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] virtual auto getattr_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct stat * /*st*/, getattr_impl(std::string /*api_path*/, struct stat * /*st*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto getattr_impl(std::string /*api_path*/, [[nodiscard]] virtual auto getattr_impl(std::string /*api_path*/,
struct stat * /*st*/) -> api_error { struct stat * /*st*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] virtual auto getxtimes_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct timespec * /*bkuptime*/, getxtimes_impl(std::string /*api_path*/, struct timespec * /*bkuptime*/,
struct timespec * /*crtime*/) struct timespec * /*crtime*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
virtual auto init_impl(struct fuse_conn_info *conn, struct fuse_config *cfg) virtual auto init_impl(struct fuse_conn_info *conn,
-> void *; struct fuse_config *cfg) -> void *;
#else // FUSE_USE_VERSION < 30 #else
virtual auto init_impl(struct fuse_conn_info *conn) -> void *; virtual auto init_impl(struct fuse_conn_info *conn) -> void *;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] virtual auto mkdir_impl(std::string /*api_path*/, [[nodiscard]] virtual auto mkdir_impl(std::string /*api_path*/,
mode_t /*mode*/) -> api_error { mode_t /*mode*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto open_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct fuse_file_info * /*fi*/) open_impl(std::string /*api_path*/,
-> api_error { struct fuse_file_info * /*fi*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto opendir_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct fuse_file_info * /*fi*/) opendir_impl(std::string /*api_path*/,
-> api_error { struct fuse_file_info * /*fi*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -415,28 +405,28 @@ protected:
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
readdir_impl(std::string /*api_path*/, void * /*buf*/, readdir_impl(std::string /*api_path*/, void * /*buf*/,
fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/, fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/,
struct fuse_file_info * /*fi*/, fuse_readdir_flags /*flags*/) struct fuse_file_info * /*fi*/,
-> api_error { fuse_readdir_flags /*flags*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
readdir_impl(std::string /*api_path*/, void * /*buf*/, readdir_impl(std::string /*api_path*/, void * /*buf*/,
fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/, fuse_fill_dir_t /*fuse_fill_dir*/, off_t /*offset*/,
struct fuse_file_info * /*fi*/) -> api_error { struct fuse_file_info * /*fi*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] virtual auto release_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct fuse_file_info * /*fi*/) release_impl(std::string /*api_path*/,
-> api_error { struct fuse_file_info * /*fi*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto releasedir_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct fuse_file_info * /*fi*/) releasedir_impl(std::string /*api_path*/,
-> api_error { struct fuse_file_info * /*fi*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -446,13 +436,13 @@ protected:
unsigned int /*flags*/) -> api_error { unsigned int /*flags*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto rename_impl(std::string /*from_api_path*/, [[nodiscard]] virtual auto
std::string /*to_api_path*/) rename_impl(std::string /*from_api_path*/,
-> api_error { std::string /*to_api_path*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] virtual auto rmdir_impl(std::string /*api_path*/) -> api_error { [[nodiscard]] virtual auto rmdir_impl(std::string /*api_path*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
@ -466,14 +456,14 @@ protected:
int & /*attribute_size*/) -> api_error { int & /*attribute_size*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
getxattr_impl(std::string /*api_path*/, const char * /*name*/, getxattr_impl(std::string /*api_path*/, const char * /*name*/,
char * /*value*/, size_t /*size*/, int & /*attribute_size*/) char * /*value*/, size_t /*size*/,
-> api_error { int & /*attribute_size*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // defined(__APPLE__) #endif // __APPLE__
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
listxattr_impl(std::string /*api_path*/, char * /*buffer*/, size_t /*size*/, listxattr_impl(std::string /*api_path*/, char * /*buffer*/, size_t /*size*/,
@ -481,9 +471,9 @@ protected:
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto removexattr_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
const char * /*name*/) removexattr_impl(std::string /*api_path*/,
-> api_error { const char * /*name*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -495,20 +485,21 @@ protected:
uint32_t /*position*/) -> api_error { uint32_t /*position*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // !defined (__APPLE__) #else // __APPLE__
[[nodiscard]] virtual auto [[nodiscard]] virtual auto setxattr_impl(std::string /*api_path*/,
setxattr_impl(std::string /*api_path*/, const char * /*name*/, const char * /*name*/,
const char * /*value*/, size_t /*size*/, int /*flags*/) const char * /*value*/,
-> api_error { size_t /*size*/,
int /*flags*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // defined (__APPLE__) #endif // __APPLE__
#endif // defined(HAS_SETXATTR) #endif // HAS_SETXATTR
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] virtual auto setattr_x_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct setattr_x * /*attr*/) setattr_x_impl(std::string /*api_path*/,
-> api_error { struct setattr_x * /*attr*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -519,74 +510,72 @@ protected:
} }
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
setchgtime_impl(std::string /*api_path*/, const struct timespec * /*chgtime*/) setchgtime_impl(std::string /*api_path*/,
-> api_error { const struct timespec * /*chgtime*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto setcrtime_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
const struct timespec * /*crtime*/) setcrtime_impl(std::string /*api_path*/,
-> api_error { const struct timespec * /*crtime*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto setvolname_impl(const char * /*volname*/) [[nodiscard]] virtual auto
-> api_error { setvolname_impl(const char * /*volname*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
[[nodiscard]] virtual auto statfs_x_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct statfs * /*stbuf*/) statfs_x_impl(std::string /*api_path*/,
-> api_error { struct statfs * /*stbuf*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] virtual auto statfs_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
struct statvfs * /*stbuf*/) statfs_impl(std::string /*api_path*/,
-> api_error { struct statvfs * /*stbuf*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] virtual auto truncate_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
off_t /*size*/, truncate_impl(std::string /*api_path*/, off_t /*size*/,
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto truncate_impl(std::string /*api_path*/, [[nodiscard]] virtual auto truncate_impl(std::string /*api_path*/,
off_t /*size*/) -> api_error { off_t /*size*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] virtual auto unlink_impl(std::string /*api_path*/) [[nodiscard]] virtual auto
-> api_error { unlink_impl(std::string /*api_path*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] virtual auto utimens_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
const struct timespec /*tv*/[2], utimens_impl(std::string /*api_path*/, const struct timespec /*tv*/[2],
struct fuse_file_info * /*fi*/) struct fuse_file_info * /*fi*/) -> api_error {
-> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] virtual auto utimens_impl(std::string /*api_path*/, [[nodiscard]] virtual auto
const struct timespec /*tv*/[2]) utimens_impl(std::string /*api_path*/,
-> api_error { const struct timespec /*tv*/[2]) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
write_impl(std::string /*api_path*/, const char * /*buffer*/, write_impl(std::string /*api_path*/, const char * /*buffer*/,
size_t /*write_size*/, off_t /*write_offset*/, size_t /*write_size*/, off_t /*write_offset*/,
struct fuse_file_info * /*fi*/, std::size_t & /*bytes_written*/) struct fuse_file_info * /*fi*/,
-> api_error { std::size_t & /*bytes_written*/) -> api_error {
return api_error::not_implemented; return api_error::not_implemented;
} }
@ -614,5 +603,5 @@ public:
}; };
} // namespace repertory } // namespace repertory
#endif // !defined(_WIN32) #endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_ #endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_

View File

@ -73,95 +73,92 @@ private:
protected: protected:
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto chflags_impl(std::string api_path, uint32_t flags) [[nodiscard]] auto chflags_impl(std::string api_path,
-> api_error override; uint32_t flags) -> api_error override;
#endif // defined(__APPLE__{} #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode, [[nodiscard]] auto
struct fuse_file_info *file_info) chmod_impl(std::string api_path, mode_t mode,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] auto chmod_impl(std::string api_path, mode_t mode) [[nodiscard]] auto chmod_impl(std::string api_path,
-> api_error override; mode_t mode) -> api_error override;
#endif // FUSE_USE_VERSION >= 30 #endif
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid, [[nodiscard]] auto
struct fuse_file_info *file_info) chown_impl(std::string api_path, uid_t uid, gid_t gid,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] auto chown_impl(std::string api_path, uid_t uid, gid_t gid) [[nodiscard]] auto chown_impl(std::string api_path, uid_t uid,
-> api_error override; gid_t gid) -> api_error override;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] auto create_impl(std::string api_path, mode_t mode, [[nodiscard]] auto
struct fuse_file_info *file_info) create_impl(std::string api_path, mode_t mode,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
void destroy_impl(void *ptr) override; void destroy_impl(void *ptr) override;
[[nodiscard]] auto fallocate_impl(std::string api_path, int mode, [[nodiscard]] auto
off_t offset, off_t length, fallocate_impl(std::string api_path, int mode, off_t offset, off_t length,
struct fuse_file_info *file_info) struct fuse_file_info *file_info) -> api_error override;
-> api_error override;
[[nodiscard]] auto fgetattr_impl(std::string api_path, struct stat *unix_st, [[nodiscard]] auto
struct fuse_file_info *file_info) fgetattr_impl(std::string api_path, struct stat *unix_st,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto fsetattr_x_impl(std::string api_path, [[nodiscard]] auto
struct setattr_x *attr, fsetattr_x_impl(std::string api_path, struct setattr_x *attr,
struct fuse_file_info *file_info) struct fuse_file_info *file_info) -> api_error override;
-> api_error override; #endif // __APPLE__
#endif // defined(__APPLE__)
[[nodiscard]] auto fsync_impl(std::string api_path, int datasync, [[nodiscard]] auto
struct fuse_file_info *file_info) fsync_impl(std::string api_path, int datasync,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#if FUSE_USE_VERSION < 30 #if FUSE_USE_VERSION < 30
[[nodiscard]] auto ftruncate_impl(std::string api_path, off_t size, [[nodiscard]] auto
struct fuse_file_info *file_info) ftruncate_impl(std::string api_path, off_t size,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#endif // FUSE_USE_VERSION < 30 #endif
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st, [[nodiscard]] auto
struct fuse_file_info *file_info) getattr_impl(std::string api_path, struct stat *unix_st,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] auto getattr_impl(std::string api_path, struct stat *unix_st) [[nodiscard]] auto getattr_impl(std::string api_path,
-> api_error override; struct stat *unix_st) -> api_error override;
#endif // FUSE_USE_VERSION >= 30 #endif
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto getxtimes_impl(std::string api_path, [[nodiscard]] auto
struct timespec *bkuptime, getxtimes_impl(std::string api_path, struct timespec *bkuptime,
struct timespec *crtime) struct timespec *crtime) -> api_error override;
-> api_error override; #endif // __APPLE__
#endif // defined(__APPLE__)
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
auto init_impl(struct fuse_conn_info *conn, struct fuse_config *cfg) auto init_impl(struct fuse_conn_info *conn,
-> void * override; struct fuse_config *cfg) -> void * override;
#else // FUSE_USE_VERSION < 30 #else
auto init_impl(struct fuse_conn_info *conn) -> void * override; auto init_impl(struct fuse_conn_info *conn) -> void * override;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] auto mkdir_impl(std::string api_path, mode_t mode) [[nodiscard]] auto mkdir_impl(std::string api_path,
-> api_error override; mode_t mode) -> api_error override;
void notify_fuse_main_exit(int &ret) override; void notify_fuse_main_exit(int &ret) override;
[[nodiscard]] auto open_impl(std::string api_path, [[nodiscard]] auto
struct fuse_file_info *file_info) open_impl(std::string api_path,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
[[nodiscard]] auto opendir_impl(std::string api_path, [[nodiscard]] auto
struct fuse_file_info *file_info) opendir_impl(std::string api_path,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
[[nodiscard]] auto read_impl(std::string api_path, char *buffer, [[nodiscard]] auto read_impl(std::string api_path, char *buffer,
size_t read_size, off_t read_offset, size_t read_size, off_t read_offset,
@ -169,124 +166,121 @@ protected:
std::size_t &bytes_read) -> api_error override; std::size_t &bytes_read) -> api_error override;
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto readdir_impl(std::string api_path, void *buf, [[nodiscard]] auto
fuse_fill_dir_t fuse_fill_dir, off_t offset, readdir_impl(std::string api_path, void *buf, fuse_fill_dir_t fuse_fill_dir,
struct fuse_file_info *file_info, off_t offset, struct fuse_file_info *file_info,
fuse_readdir_flags flags) fuse_readdir_flags flags) -> api_error override;
-> api_error override; #else
#else // FUSE_USE_VERSION < 30 [[nodiscard]] auto
[[nodiscard]] auto readdir_impl(std::string api_path, void *buf, readdir_impl(std::string api_path, void *buf, fuse_fill_dir_t fuse_fill_dir,
fuse_fill_dir_t fuse_fill_dir, off_t offset, off_t offset,
struct fuse_file_info *file_info) struct fuse_file_info *file_info) -> api_error override;
-> api_error override; #endif
#endif // FUSE_USE_VERSION >= 30
[[nodiscard]] auto release_impl(std::string api_path, [[nodiscard]] auto
struct fuse_file_info *file_info) release_impl(std::string api_path,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
[[nodiscard]] auto releasedir_impl(std::string api_path, [[nodiscard]] auto
struct fuse_file_info *file_info) releasedir_impl(std::string api_path,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto rename_impl(std::string from_api_path, [[nodiscard]] auto rename_impl(std::string from_api_path,
std::string to_api_path, unsigned int flags) std::string to_api_path,
-> api_error override; unsigned int flags) -> api_error override;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] auto rename_impl(std::string from_api_path, [[nodiscard]] auto rename_impl(std::string from_api_path,
std::string to_api_path) -> api_error override; std::string to_api_path) -> api_error override;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] auto rmdir_impl(std::string api_path) -> api_error override; [[nodiscard]] auto rmdir_impl(std::string api_path) -> api_error override;
#if defined(HAS_SETXATTR) #if defined(HAS_SETXATTR)
[[nodiscard]] auto getxattr_common(std::string api_path, const char *name, [[nodiscard]] auto getxattr_common(std::string api_path, const char *name,
char *value, size_t size, char *value, size_t size,
int &attribute_size, uint32_t *position) int &attribute_size,
-> api_error; uint32_t *position) -> api_error;
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name, [[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
char *value, size_t size, uint32_t position, char *value, size_t size, uint32_t position,
int &attribute_size) -> api_error override; int &attribute_size) -> api_error override;
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] auto getxattr_impl(std::string api_path, const char *name, [[nodiscard]] auto getxattr_impl(std::string api_path, const char *name,
char *value, size_t size, char *value, size_t size,
int &attribute_size) -> api_error override; int &attribute_size) -> api_error override;
#endif // defined(__APPLE__) #endif // __APPLE__
[[nodiscard]] auto listxattr_impl(std::string api_path, char *buffer, [[nodiscard]] auto listxattr_impl(std::string api_path, char *buffer,
size_t size, int &required_size, size_t size, int &required_size,
bool &return_size) -> api_error override; bool &return_size) -> api_error override;
[[nodiscard]] auto removexattr_impl(std::string api_path, const char *name) [[nodiscard]] auto removexattr_impl(std::string api_path,
-> api_error override; const char *name) -> api_error override;
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto setxattr_impl(std::string api_path, const char *name, [[nodiscard]] auto setxattr_impl(std::string api_path, const char *name,
const char *value, size_t size, int flags, const char *value, size_t size, int flags,
uint32_t position) -> api_error override; uint32_t position) -> api_error override;
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] auto setxattr_impl(std::string api_path, const char *name, [[nodiscard]] auto setxattr_impl(std::string api_path, const char *name,
const char *value, size_t size, int flags) const char *value, size_t size,
-> api_error override; int flags) -> api_error override;
#endif // defined(__APPLE__) #endif // __APPLE__
#endif // defined(HAS_SETXATTR{} #endif // HAS_SETXATTR
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto setattr_x_impl(std::string api_path, [[nodiscard]] auto
struct setattr_x *attr) setattr_x_impl(std::string api_path,
-> api_error override; struct setattr_x *attr) -> api_error override;
[[nodiscard]] auto setbkuptime_impl(std::string api_path, [[nodiscard]] auto
const struct timespec *bkuptime) setbkuptime_impl(std::string api_path,
-> api_error override; const struct timespec *bkuptime) -> api_error override;
[[nodiscard]] auto setchgtime_impl(std::string api_path, [[nodiscard]] auto
const struct timespec *chgtime) setchgtime_impl(std::string api_path,
-> api_error override; const struct timespec *chgtime) -> api_error override;
[[nodiscard]] auto setcrtime_impl(std::string api_path, [[nodiscard]] auto
const struct timespec *crtime) setcrtime_impl(std::string api_path,
-> api_error override; const struct timespec *crtime) -> api_error override;
[[nodiscard]] auto setvolname_impl(const char *volname) -> api_error override; [[nodiscard]] auto setvolname_impl(const char *volname) -> api_error override;
[[nodiscard]] auto statfs_x_impl(std::string api_path, struct statfs *stbuf) [[nodiscard]] auto statfs_x_impl(std::string api_path,
-> api_error override; struct statfs *stbuf) -> api_error override;
#else // !defined(__APPLE__) #else // __APPLE__
[[nodiscard]] auto statfs_impl(std::string api_path, struct statvfs *stbuf) [[nodiscard]] auto statfs_impl(std::string api_path,
-> api_error override; struct statvfs *stbuf) -> api_error override;
#endif // defined(__APPLE__) #endif // __APPLE__
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size, [[nodiscard]] auto
struct fuse_file_info *file_info) truncate_impl(std::string api_path, off_t size,
-> api_error override; struct fuse_file_info *file_info) -> api_error override;
#else // FUSE_USE_VERSION < 30 #else
[[nodiscard]] auto truncate_impl(std::string api_path, off_t size) [[nodiscard]] auto truncate_impl(std::string api_path,
-> api_error override; off_t size) -> api_error override;
#endif // FUSE_USE_VERSION >= 30 #endif
[[nodiscard]] auto unlink_impl(std::string api_path) -> api_error override; [[nodiscard]] auto unlink_impl(std::string api_path) -> api_error override;
#if FUSE_USE_VERSION >= 30 #if FUSE_USE_VERSION >= 30
[[nodiscard]] auto utimens_impl(std::string api_path, [[nodiscard]] auto
const struct timespec tv[2], utimens_impl(std::string api_path, const struct timespec tv[2],
struct fuse_file_info *file_info) struct fuse_file_info *file_info) -> api_error override;
-> api_error override; #else
#else // FUSE_USE_VERSION < 30 [[nodiscard]] auto
[[nodiscard]] auto utimens_impl(std::string api_path, utimens_impl(std::string api_path,
const struct timespec tv[2]) const struct timespec tv[2]) -> api_error override;
-> api_error override; #endif
#endif // FUSE_USE_VERSION >= 30
[[nodiscard]] auto write_impl(std::string api_path, const char *buffer, [[nodiscard]] auto
size_t write_size, off_t write_offset, write_impl(std::string api_path, const char *buffer, size_t write_size,
struct fuse_file_info *file_info, off_t write_offset, struct fuse_file_info *file_info,
std::size_t &bytes_written) std::size_t &bytes_written) -> api_error override;
-> api_error override;
public: public:
[[nodiscard]] auto get_directory_item_count(const std::string &api_path) const [[nodiscard]] auto get_directory_item_count(const std::string &api_path) const
@ -295,17 +289,16 @@ public:
[[nodiscard]] auto get_directory_items(const std::string &api_path) const [[nodiscard]] auto get_directory_items(const std::string &api_path) const
-> directory_item_list override; -> directory_item_list override;
[[nodiscard]] auto get_file_size(const std::string &api_path) const [[nodiscard]] auto
-> std::uint64_t override; get_file_size(const std::string &api_path) const -> std::uint64_t override;
[[nodiscard]] auto get_item_meta(const std::string &api_path, [[nodiscard]] auto
api_meta_map &meta) const get_item_meta(const std::string &api_path,
-> api_error override; api_meta_map &meta) const -> api_error override;
[[nodiscard]] auto get_item_meta(const std::string &api_path, [[nodiscard]] auto
const std::string &name, get_item_meta(const std::string &api_path, const std::string &name,
std::string &value) const std::string &value) const -> api_error override;
-> api_error override;
[[nodiscard]] auto get_total_drive_space() const -> std::uint64_t override; [[nodiscard]] auto get_total_drive_space() const -> std::uint64_t override;
@ -316,24 +309,21 @@ public:
void get_volume_info(UINT64 &total_size, UINT64 &free_size, void get_volume_info(UINT64 &total_size, UINT64 &free_size,
std::string &volume_label) const override; std::string &volume_label) const override;
[[nodiscard]] auto is_processing(const std::string &api_path) const [[nodiscard]] auto
-> bool override; is_processing(const std::string &api_path) const -> bool override;
[[nodiscard]] auto rename_directory(const std::string &from_api_path, [[nodiscard]] auto
const std::string &to_api_path) rename_directory(const std::string &from_api_path,
-> int override; const std::string &to_api_path) -> int override;
[[nodiscard]] auto rename_file(const std::string &from_api_path, [[nodiscard]] auto rename_file(const std::string &from_api_path,
const std::string &to_api_path, bool overwrite) const std::string &to_api_path,
-> int override; bool overwrite) -> int override;
void set_item_meta(const std::string &api_path, const std::string &key, void set_item_meta(const std::string &api_path, const std::string &key,
const std::string &value) override; const std::string &value) override;
void set_item_meta(const std::string &api_path,
const api_meta_map &meta) override;
}; };
} // namespace repertory } // namespace repertory
#endif // !defined(_WIN32) #endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_ #endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_

View File

@ -43,17 +43,16 @@ public:
auto operator=(fuse_drive_base &&) -> fuse_drive_base & = delete; auto operator=(fuse_drive_base &&) -> fuse_drive_base & = delete;
protected: protected:
[[nodiscard]] auto access_impl(std::string api_path, int mask) [[nodiscard]] auto access_impl(std::string api_path,
-> api_error override; int mask) -> api_error override;
protected: protected:
[[nodiscard]] auto check_access(const std::string &api_path, int mask) const [[nodiscard]] auto check_access(const std::string &api_path,
-> api_error; int mask) const -> api_error;
[[nodiscard]] auto [[nodiscard]] auto check_and_perform(
check_and_perform(const std::string &api_path, int parent_mask, const std::string &api_path, int parent_mask,
const std::function<api_error(api_meta_map &meta)> &action) const std::function<api_error(api_meta_map &meta)> &action) -> api_error;
-> api_error;
[[nodiscard]] auto get_current_gid() const -> gid_t; [[nodiscard]] auto get_current_gid() const -> gid_t;
@ -63,63 +62,58 @@ protected:
[[nodiscard]] auto get_effective_uid() const -> uid_t; [[nodiscard]] auto get_effective_uid() const -> uid_t;
[[nodiscard]] static auto check_open_flags(int flags, int mask, [[nodiscard]] static auto
const api_error &fail_error) check_open_flags(int flags, int mask,
-> api_error; const api_error &fail_error) -> api_error;
[[nodiscard]] auto check_owner(const api_meta_map &meta) const -> api_error; [[nodiscard]] auto check_owner(const api_meta_map &meta) const -> api_error;
[[nodiscard]] static auto check_readable(int flags, [[nodiscard]] static auto
const api_error &fail_error) check_readable(int flags, const api_error &fail_error) -> api_error;
-> api_error;
[[nodiscard]] static auto check_writeable(int flags, [[nodiscard]] static auto
const api_error &fail_error) check_writeable(int flags, const api_error &fail_error) -> api_error;
-> api_error;
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] static auto get_flags_from_meta(const api_meta_map &meta) [[nodiscard]] static auto
-> __uint32_t; get_flags_from_meta(const api_meta_map &meta) -> __uint32_t;
#endif // defined(__APPLE__) #endif // __APPLE__
[[nodiscard]] static auto get_gid_from_meta(const api_meta_map &meta) [[nodiscard]] static auto
-> gid_t; get_gid_from_meta(const api_meta_map &meta) -> gid_t;
[[nodiscard]] static auto get_mode_from_meta(const api_meta_map &meta) [[nodiscard]] static auto
-> mode_t; get_mode_from_meta(const api_meta_map &meta) -> mode_t;
static void get_timespec_from_meta(const api_meta_map &meta, static void get_timespec_from_meta(const api_meta_map &meta,
const std::string &name, const std::string &name,
struct timespec &ts); struct timespec &ts);
[[nodiscard]] static auto get_uid_from_meta(const api_meta_map &meta) [[nodiscard]] static auto
-> uid_t; get_uid_from_meta(const api_meta_map &meta) -> uid_t;
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto parse_xattr_parameters(const char *name, [[nodiscard]] auto
const uint32_t &position, parse_xattr_parameters(const char *name, const uint32_t &position,
std::string &attribute_name, std::string &attribute_name,
const std::string &api_path) const std::string &api_path) -> api_error;
-> api_error; #else
#else // !defined(__APPLE__) [[nodiscard]] auto
[[nodiscard]] auto parse_xattr_parameters(const char *name, parse_xattr_parameters(const char *name, std::string &attribute_name,
std::string &attribute_name, const std::string &api_path) -> api_error;
const std::string &api_path) #endif
-> api_error;
#endif // defined(__APPLE__)
#if defined(__APPLE__) #if defined(__APPLE__)
[[nodiscard]] auto [[nodiscard]] auto
parse_xattr_parameters(const char *name, const char *value, size_t size, parse_xattr_parameters(const char *name, const char *value, size_t size,
const uint32_t &position, std::string &attribute_name, const uint32_t &position, std::string &attribute_name,
const std::string &api_path) -> api_error; const std::string &api_path) -> api_error;
#else // !defined(__APPLE__) #else
[[nodiscard]] auto parse_xattr_parameters(const char *name, const char *value, [[nodiscard]] auto
size_t size, parse_xattr_parameters(const char *name, const char *value, size_t size,
std::string &attribute_name, std::string &attribute_name,
const std::string &api_path) const std::string &api_path) -> api_error;
-> api_error; #endif
#endif // defined(__APPLE__)
static void populate_stat(const std::string &api_path, static void populate_stat(const std::string &api_path,
std::uint64_t size_or_count, std::uint64_t size_or_count,
@ -131,13 +125,13 @@ protected:
struct timespec &ts); struct timespec &ts);
public: public:
[[nodiscard]] auto check_owner(const std::string &api_path) const [[nodiscard]] auto
-> api_error override; check_owner(const std::string &api_path) const -> api_error override;
[[nodiscard]] auto check_parent_access(const std::string &api_path, [[nodiscard]] auto check_parent_access(const std::string &api_path,
int mask) const -> api_error override; int mask) const -> api_error override;
}; };
} // namespace repertory } // namespace repertory
#endif // !defined(_WIN32) #endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_ #endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_

View File

@ -30,32 +30,29 @@ class i_fuse_drive {
INTERFACE_SETUP(i_fuse_drive); INTERFACE_SETUP(i_fuse_drive);
public: public:
[[nodiscard]] virtual auto check_owner(const std::string &api_path) const [[nodiscard]] virtual auto
-> api_error = 0; check_owner(const std::string &api_path) const -> api_error = 0;
[[nodiscard]] virtual auto check_parent_access(const std::string &api_path,
int mask) const
-> api_error = 0;
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
get_directory_item_count(const std::string &api_path) const check_parent_access(const std::string &api_path,
-> std::uint64_t = 0; int mask) const -> api_error = 0;
[[nodiscard]] virtual auto get_directory_item_count(
const std::string &api_path) const -> std::uint64_t = 0;
[[nodiscard]] virtual auto get_directory_items(
const std::string &api_path) const -> directory_item_list = 0;
[[nodiscard]] virtual auto [[nodiscard]] virtual auto
get_directory_items(const std::string &api_path) const get_file_size(const std::string &api_path) const -> std::uint64_t = 0;
-> directory_item_list = 0;
[[nodiscard]] virtual auto get_file_size(const std::string &api_path) const [[nodiscard]] virtual auto
-> std::uint64_t = 0; get_item_meta(const std::string &api_path,
api_meta_map &meta) const -> api_error = 0;
[[nodiscard]] virtual auto get_item_meta(const std::string &api_path, [[nodiscard]] virtual auto
api_meta_map &meta) const get_item_meta(const std::string &api_path, const std::string &name,
-> api_error = 0; std::string &value) const -> api_error = 0;
[[nodiscard]] virtual auto get_item_meta(const std::string &api_path,
const std::string &name,
std::string &value) const
-> api_error = 0;
[[nodiscard]] virtual auto get_total_drive_space() const -> std::uint64_t = 0; [[nodiscard]] virtual auto get_total_drive_space() const -> std::uint64_t = 0;
@ -66,12 +63,12 @@ public:
virtual void get_volume_info(UINT64 &total_size, UINT64 &free_size, virtual void get_volume_info(UINT64 &total_size, UINT64 &free_size,
std::string &volume_label) const = 0; std::string &volume_label) const = 0;
[[nodiscard]] virtual auto is_processing(const std::string &api_path) const [[nodiscard]] virtual auto
-> bool = 0; is_processing(const std::string &api_path) const -> bool = 0;
[[nodiscard]] virtual auto rename_directory(const std::string &from_api_path, [[nodiscard]] virtual auto
const std::string &to_api_path) rename_directory(const std::string &from_api_path,
-> int = 0; const std::string &to_api_path) -> int = 0;
[[nodiscard]] virtual auto rename_file(const std::string &from_api_path, [[nodiscard]] virtual auto rename_file(const std::string &from_api_path,
const std::string &to_api_path, const std::string &to_api_path,
@ -80,11 +77,8 @@ public:
virtual void set_item_meta(const std::string &api_path, virtual void set_item_meta(const std::string &api_path,
const std::string &key, const std::string &key,
const std::string &value) = 0; const std::string &value) = 0;
virtual void set_item_meta(const std::string &api_path,
const api_meta_map &meta) = 0;
}; };
} // namespace repertory } // namespace repertory
#endif // !defined(_WIN32) #endif
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_ #endif // REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_

View File

@ -38,12 +38,10 @@ public:
private: private:
const app_config &config_; const app_config &config_;
packet_client packet_client_; packet_client packet_client_;
remote::user_id uid_{0}; remote::user_id uid_ = 0;
remote::group_id gid_{0}; remote::group_id gid_ = 0;
public: public:
[[nodiscard]] auto check() -> packet::error_type;
[[nodiscard]] auto fuse_access(const char *path, const std::int32_t &mask) [[nodiscard]] auto fuse_access(const char *path, const std::int32_t &mask)
-> packet::error_type override; -> packet::error_type override;
@ -53,9 +51,9 @@ public:
[[nodiscard]] auto fuse_chmod(const char *path, const remote::file_mode &mode) [[nodiscard]] auto fuse_chmod(const char *path, const remote::file_mode &mode)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_chown(const char *path, const remote::user_id &uid, [[nodiscard]] auto
const remote::group_id &gid) fuse_chown(const char *path, const remote::user_id &uid,
-> packet::error_type override; const remote::group_id &gid) -> packet::error_type override;
[[nodiscard]] auto fuse_destroy() -> packet::error_type override; [[nodiscard]] auto fuse_destroy() -> packet::error_type override;
@ -69,23 +67,21 @@ public:
const remote::file_handle &handle) const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_fsetattr_x(const char *path, [[nodiscard]] auto fuse_fsetattr_x(
const remote::setattr_x &attr, const char *path, const remote::setattr_x &attr,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto fuse_fsync(const char *path, const std::int32_t &datasync, [[nodiscard]] auto
const remote::file_handle &handle) fuse_fsync(const char *path, const std::int32_t &datasync,
-> packet::error_type override; const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_ftruncate(const char *path, [[nodiscard]] auto fuse_ftruncate(
const remote::file_offset &size, const char *path, const remote::file_offset &size,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto fuse_getattr(const char *path, remote::stat &st, [[nodiscard]] auto
bool &directory) fuse_getattr(const char *path, remote::stat &st,
-> packet::error_type override; bool &directory) -> packet::error_type override;
/*[[nodiscard]] packet::error_type fuse_getxattr(const char *path, const char /*[[nodiscard]] packet::error_type fuse_getxattr(const char *path, const char
*name, char *value, const remote::file_size &size) override ; *name, char *value, const remote::file_size &size) override ;
@ -94,10 +90,9 @@ public:
*name, char *value, const remote::file_size &size, std::uint32_t position) *name, char *value, const remote::file_size &size, std::uint32_t position)
override ;*/ override ;*/
[[nodiscard]] auto fuse_getxtimes(const char *path, [[nodiscard]] auto
remote::file_time &bkuptime, fuse_getxtimes(const char *path, remote::file_time &bkuptime,
remote::file_time &crtime) remote::file_time &crtime) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto fuse_init() -> packet::error_type override; [[nodiscard]] auto fuse_init() -> packet::error_type override;
@ -112,27 +107,25 @@ public:
[[nodiscard]] auto [[nodiscard]] auto
fuse_create(const char *path, const remote::file_mode &mode, fuse_create(const char *path, const remote::file_mode &mode,
const remote::open_flags &flags, remote::file_handle &handle) const remote::open_flags &flags,
-> packet::error_type override; remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_open(const char *path, [[nodiscard]] auto
const remote::open_flags &flags, fuse_open(const char *path, const remote::open_flags &flags,
remote::file_handle &handle) remote::file_handle &handle) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto fuse_read(const char *path, char *buffer, [[nodiscard]] auto
const remote::file_size &read_size, fuse_read(const char *path, char *buffer, const remote::file_size &read_size,
const remote::file_offset &read_offset, const remote::file_offset &read_offset,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto fuse_rename(const char *from, const char *to) [[nodiscard]] auto fuse_rename(const char *from,
-> packet::error_type override; const char *to) -> packet::error_type override;
[[nodiscard]] auto [[nodiscard]] auto
fuse_readdir(const char *path, const remote::file_offset &offset, fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_handle &handle, std::string &item_path) const remote::file_handle &handle,
-> packet::error_type override; std::string &item_path) -> packet::error_type override;
[[nodiscard]] auto fuse_release(const char *path, [[nodiscard]] auto fuse_release(const char *path,
const remote::file_handle &handle) const remote::file_handle &handle)
@ -146,8 +139,8 @@ public:
* char *name) override * char *name) override
* ;*/ * ;*/
[[nodiscard]] auto fuse_rmdir(const char *path) [[nodiscard]] auto
-> packet::error_type override; fuse_rmdir(const char *path) -> packet::error_type override;
[[nodiscard]] auto fuse_setattr_x(const char *path, remote::setattr_x &attr) [[nodiscard]] auto fuse_setattr_x(const char *path, remote::setattr_x &attr)
-> packet::error_type override; -> packet::error_type override;
@ -164,8 +157,8 @@ public:
const remote::file_time &crtime) const remote::file_time &crtime)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_setvolname(const char *volname) [[nodiscard]] auto
-> packet::error_type override; fuse_setvolname(const char *volname) -> packet::error_type override;
[[nodiscard]] /*packet::error_type fuse_setxattr(const char *path, const char [[nodiscard]] /*packet::error_type fuse_setxattr(const char *path, const char
*name, const char *value, const remote::file_size &size, const std::int32_t *name, const char *value, const remote::file_size &size, const std::int32_t
@ -176,48 +169,45 @@ public:
std::int32_t &flags, std::uint32_t position) override ;*/ std::int32_t &flags, std::uint32_t position) override ;*/
[[nodiscard]] auto [[nodiscard]] auto
fuse_statfs(const char *path, std::uint64_t frsize, remote::statfs &st) fuse_statfs(const char *path, std::uint64_t frsize,
-> packet::error_type override; remote::statfs &st) -> packet::error_type override;
[[nodiscard]] auto fuse_statfs_x(const char *path, std::uint64_t bsize, [[nodiscard]] auto
remote::statfs_x &st) fuse_statfs_x(const char *path, std::uint64_t bsize,
-> packet::error_type override; remote::statfs_x &st) -> packet::error_type override;
[[nodiscard]] auto fuse_truncate(const char *path, [[nodiscard]] auto
const remote::file_offset &size) fuse_truncate(const char *path,
-> packet::error_type override; const remote::file_offset &size) -> packet::error_type override;
[[nodiscard]] auto fuse_unlink(const char *path) [[nodiscard]] auto
-> packet::error_type override; fuse_unlink(const char *path) -> packet::error_type override;
[[nodiscard]] auto fuse_utimens(const char *path, const remote::file_time *tv, [[nodiscard]] auto
std::uint64_t op0, std::uint64_t op1) fuse_utimens(const char *path, const remote::file_time *tv, std::uint64_t op0,
-> packet::error_type override; std::uint64_t op1) -> packet::error_type override;
[[nodiscard]] auto fuse_write(const char *path, const char *buffer, [[nodiscard]] auto
const remote::file_size &write_size, fuse_write(const char *path, const char *buffer,
const remote::file_offset &write_offset, const remote::file_size &write_size,
const remote::file_handle &handle) const remote::file_offset &write_offset,
-> packet::error_type override; const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_write_base64(const char *path, const char *buffer, [[nodiscard]] auto fuse_write_base64(
const remote::file_size &write_size, const char *path, const char *buffer, const remote::file_size &write_size,
const remote::file_offset &write_offset, const remote::file_offset &write_offset,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto json_create_directory_snapshot(const std::string &path, [[nodiscard]] auto json_create_directory_snapshot(
json &json_data) const std::string &path, json &json_data) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto json_read_directory_snapshot( [[nodiscard]] auto json_read_directory_snapshot(
const std::string &path, const remote::file_handle &handle, const std::string &path, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override; std::uint32_t page, json &json_data) -> packet::error_type override;
[[nodiscard]] auto [[nodiscard]] auto json_release_directory_snapshot(
json_release_directory_snapshot(const std::string &path, const std::string &path,
const remote::file_handle &handle) const remote::file_handle &handle) -> packet::error_type override;
-> packet::error_type override;
void set_fuse_uid_gid(const remote::user_id &uid, void set_fuse_uid_gid(const remote::user_id &uid,
const remote::group_id &gid) override; const remote::group_id &gid) override;

View File

@ -59,8 +59,7 @@ private:
static void populate_stat(const struct stat64 &unix_st, remote::stat &r_stat); static void populate_stat(const struct stat64 &unix_st, remote::stat &r_stat);
[[nodiscard]] auto update_to_windows_format(const std::string &root_api_path, [[nodiscard]] auto update_to_windows_format(json &item) -> json &;
json &item) -> json &;
public: public:
// FUSE Layer // FUSE Layer

View File

@ -29,92 +29,87 @@ class i_remote_instance : public virtual i_remote_json {
INTERFACE_SETUP(i_remote_instance); INTERFACE_SETUP(i_remote_instance);
public: public:
[[nodiscard]] virtual auto winfsp_can_delete(PVOID file_desc, PWSTR file_name) virtual auto winfsp_can_delete(PVOID file_desc, PWSTR file_name)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, virtual auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
UINT32 flags, BOOLEAN &was_deleted) BOOLEAN &was_deleted) -> packet::error_type = 0;
virtual auto winfsp_close(PVOID file_desc) -> packet::error_type = 0;
virtual auto winfsp_create(PWSTR file_name, UINT32 create_options,
UINT32 granted_access, UINT32 file_attributes,
UINT64 allocation_size, PVOID *file_desc,
remote::file_info *file_info,
std::string &normalized_name, BOOLEAN &exists)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_close(PVOID file_desc) virtual auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto virtual auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr)
winfsp_create(PWSTR file_name, UINT32 create_options, UINT32 granted_access,
UINT32 file_attributes, UINT64 allocation_size,
PVOID *file_desc, remote::file_info *file_info,
std::string &normalized_name, BOOLEAN &exists)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_flush(PVOID file_desc, virtual auto winfsp_get_file_info(PVOID file_desc,
remote::file_info *file_info) remote::file_info *file_info)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr) virtual auto
-> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_get_file_info(PVOID file_desc,
remote::file_info *file_info)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
winfsp_get_security_by_name(PWSTR file_name, PUINT32 file_attributes, winfsp_get_security_by_name(PWSTR file_name, PUINT32 file_attributes,
std::uint64_t *security_descriptor_size, std::uint64_t *security_descriptor_size,
std::wstring &str_descriptor) std::wstring &str_descriptor)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_get_volume_info(UINT64 &total_size, virtual auto winfsp_get_volume_info(UINT64 &total_size, UINT64 &free_size,
UINT64 &free_size, std::string &volume_label)
std::string &volume_label)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_mounted(const std::wstring &location) virtual auto winfsp_mounted(const std::wstring &location)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto virtual auto winfsp_open(PWSTR file_name, UINT32 create_options,
winfsp_open(PWSTR file_name, UINT32 create_options, UINT32 granted_access, UINT32 granted_access, PVOID *file_desc,
PVOID *file_desc, remote::file_info *file_info, remote::file_info *file_info,
std::string &normalized_name) -> packet::error_type = 0; std::string &normalized_name)
[[nodiscard]] virtual auto
winfsp_overwrite(PVOID file_desc, UINT32 file_attributes,
BOOLEAN replace_file_attributes, UINT64 allocation_size,
remote::file_info *file_info) -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_read(PVOID file_desc, PVOID buffer,
UINT64 offset, UINT32 length,
PUINT32 bytes_transferred)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_read_directory(PVOID file_desc, virtual auto winfsp_overwrite(PVOID file_desc, UINT32 file_attributes,
PWSTR pattern, PWSTR marker, BOOLEAN replace_file_attributes,
json &itemList) UINT64 allocation_size,
remote::file_info *file_info)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_rename(PVOID file_desc, PWSTR file_name, virtual auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset,
PWSTR new_file_name, UINT32 length, PUINT32 bytes_transferred)
BOOLEAN replace_if_exists)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto virtual auto winfsp_read_directory(PVOID file_desc, PWSTR pattern,
winfsp_set_basic_info(PVOID file_desc, UINT32 file_attributes, PWSTR marker, json &itemList)
UINT64 creation_time, UINT64 last_access_time,
UINT64 last_write_time, UINT64 change_time,
remote::file_info *file_info) -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_set_file_size(PVOID file_desc,
UINT64 new_size,
BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto winfsp_unmounted(const std::wstring &location) virtual auto winfsp_rename(PVOID file_desc, PWSTR file_name,
PWSTR new_file_name, BOOLEAN replace_if_exists)
-> packet::error_type = 0; -> packet::error_type = 0;
[[nodiscard]] virtual auto virtual auto winfsp_set_basic_info(PVOID file_desc, UINT32 file_attributes,
winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length, UINT64 creation_time,
BOOLEAN write_to_end, BOOLEAN constrained_io, UINT64 last_access_time,
PUINT32 bytes_transferred, remote::file_info *file_info) UINT64 last_write_time, UINT64 change_time,
remote::file_info *file_info)
-> packet::error_type = 0;
virtual auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type = 0;
virtual auto winfsp_unmounted(const std::wstring &location)
-> packet::error_type = 0;
virtual auto winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset,
UINT32 length, BOOLEAN write_to_end,
BOOLEAN constrained_io, PUINT32 bytes_transferred,
remote::file_info *file_info)
-> packet::error_type = 0; -> packet::error_type = 0;
}; };

View File

@ -44,105 +44,93 @@ private:
#if defined(_WIN32) #if defined(_WIN32)
#define to_handle(x) (x) #define to_handle(x) (x)
#else // !defined(_WIN32) #else // !defined(_WIN32)
[[nodiscard]] static auto to_handle(PVOID file_desc) -> native_handle; static auto to_handle(PVOID file_desc) -> native_handle;
#endif // defined(_WIN32) #endif // defined(_WIN32)
public: public:
[[nodiscard]] auto check() -> packet::error_type; auto json_create_directory_snapshot(const std::string &path, json &json_data)
[[nodiscard]] auto json_create_directory_snapshot(const std::string &path,
json &json_data)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto json_read_directory_snapshot( auto json_read_directory_snapshot(const std::string &path,
const std::string &path, const remote::file_handle &handle, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override; std::uint32_t page, json &json_data)
[[nodiscard]] auto
json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_can_delete(PVOID file_desc, PWSTR file_name) auto json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, auto winfsp_can_delete(PVOID file_desc, PWSTR file_name)
UINT32 flags, BOOLEAN &was_deleted)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_close(PVOID file_desc) auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
BOOLEAN &was_deleted) -> packet::error_type override;
auto winfsp_close(PVOID file_desc) -> packet::error_type override;
auto winfsp_create(PWSTR file_name, UINT32 create_options,
UINT32 granted_access, UINT32 attributes,
UINT64 allocation_size, PVOID *file_desc,
remote::file_info *file_info, std::string &normalized_name,
BOOLEAN &exists) -> packet::error_type override;
auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr)
winfsp_create(PWSTR file_name, UINT32 create_options, UINT32 granted_access,
UINT32 attributes, UINT64 allocation_size, PVOID *file_desc,
remote::file_info *file_info, std::string &normalized_name,
BOOLEAN &exists) -> packet::error_type override;
[[nodiscard]] auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr) auto winfsp_get_file_info(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_get_file_info(PVOID file_desc, auto winfsp_get_security_by_name(PWSTR file_name, PUINT32 attributes,
remote::file_info *file_info) std::uint64_t *descriptor_size,
std::wstring &string_descriptor)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_get_security_by_name( auto winfsp_get_volume_info(UINT64 &total_size, UINT64 &free_size,
PWSTR file_name, PUINT32 attributes, std::uint64_t *descriptor_size, std::string &volume_label)
std::wstring &string_descriptor) -> packet::error_type override;
[[nodiscard]] auto winfsp_get_volume_info(UINT64 &total_size,
UINT64 &free_size,
std::string &volume_label)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_mounted(const std::wstring &location) auto winfsp_mounted(const std::wstring &location)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_open(PWSTR file_name, UINT32 create_options, auto winfsp_open(PWSTR file_name, UINT32 create_options,
UINT32 granted_access, PVOID *file_desc, UINT32 granted_access, PVOID *file_desc,
remote::file_info *file_info, remote::file_info *file_info, std::string &normalized_name)
std::string &normalized_name)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_overwrite(PVOID file_desc, UINT32 attributes, auto winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, BOOLEAN replace_attributes, UINT64 allocation_size,
UINT64 allocation_size, remote::file_info *file_info)
remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
UINT32 length, PUINT32 bytes_transferred) PUINT32 bytes_transferred) -> packet::error_type override;
auto winfsp_read_directory(PVOID file_desc, PWSTR pattern, PWSTR marker,
json &itemList) -> packet::error_type override;
auto winfsp_rename(PVOID file_desc, PWSTR file_name, PWSTR new_file_name,
BOOLEAN replace_if_exists) -> packet::error_type override;
auto winfsp_set_basic_info(PVOID file_desc, UINT32 attributes,
UINT64 creation_time, UINT64 last_access_time,
UINT64 last_write_time, UINT64 change_time,
remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_read_directory(PVOID file_desc, PWSTR pattern, auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
PWSTR marker, json &itemList) BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_rename(PVOID file_desc, PWSTR file_name, auto winfsp_unmounted(const std::wstring &location)
PWSTR new_file_name,
BOOLEAN replace_if_exists)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_set_basic_info( auto winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
PVOID file_desc, UINT32 attributes, UINT64 creation_time, BOOLEAN write_to_end, BOOLEAN constrained_io,
UINT64 last_access_time, UINT64 last_write_time, UINT64 change_time, PUINT32 bytes_transferred, remote::file_info *file_info)
remote::file_info *file_info) -> packet::error_type override;
[[nodiscard]] auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type override;
[[nodiscard]] auto winfsp_unmounted(const std::wstring &location)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
BOOLEAN write_to_end, BOOLEAN constrained_io,
PUINT32 bytes_transferred, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
}; };
} // namespace remote_winfsp } // namespace remote_winfsp

View File

@ -58,46 +58,41 @@ private:
public: public:
// FUSE Layer // FUSE Layer
[[nodiscard]] auto fuse_access(const char *path, const std::int32_t &mask) auto fuse_access(const char *path, const std::int32_t &mask)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_chflags(const char *path, std::uint32_t flags) auto fuse_chflags(const char *path, std::uint32_t flags)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_chmod(const char *path, const remote::file_mode &mode) auto fuse_chmod(const char *path, const remote::file_mode &mode)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_chown(const char *path, const remote::user_id &uid, auto fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid) const remote::group_id &gid) -> packet::error_type override;
-> packet::error_type override;
[[nodiscard]] auto fuse_destroy() -> packet::error_type override; auto fuse_destroy() -> packet::error_type override;
/*packet::error_type fuse_fallocate(const char *path, const std::int32_t /*packet::error_type fuse_fallocate(const char *path, const std::int32_t
&mode, const remote::file_offset &offset, const remote::file_offset &mode, const remote::file_offset &offset, const remote::file_offset
&length, const remote::file_handle &handle) override ;*/ &length, const remote::file_handle &handle) override ;*/
[[nodiscard]] auto fuse_fgetattr(const char *path, remote::stat &r_stat, auto fuse_fgetattr(const char *path, remote::stat &r_stat, bool &directory,
bool &directory, const remote::file_handle &handle)
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_fsetattr_x(const char *path, auto fuse_fsetattr_x(const char *path, const remote::setattr_x &attr,
const remote::setattr_x &attr, const remote::file_handle &handle)
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_fsync(const char *path, const std::int32_t &datasync, auto fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle) const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_ftruncate(const char *path, auto fuse_ftruncate(const char *path, const remote::file_offset &size,
const remote::file_offset &size, const remote::file_handle &handle)
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_getattr(const char *path, remote::stat &r_stat, auto fuse_getattr(const char *path, remote::stat &r_stat, bool &directory)
bool &directory)
-> packet::error_type override; -> packet::error_type override;
/*packet::error_type fuse_getxattr(const char *path, const char *name, char /*packet::error_type fuse_getxattr(const char *path, const char *name, char
@ -106,90 +101,77 @@ public:
packet::error_type fuse_getxattrOSX(const char *path, const char *name, char packet::error_type fuse_getxattrOSX(const char *path, const char *name, char
*value, const remote::file_size &size, std::uint32_t position) override ;*/ *value, const remote::file_size &size, std::uint32_t position) override ;*/
[[nodiscard]] auto fuse_getxtimes(const char *path, auto fuse_getxtimes(const char *path, remote::file_time &bkuptime,
remote::file_time &bkuptime, remote::file_time &crtime) -> packet::error_type override;
remote::file_time &crtime)
-> packet::error_type override;
[[nodiscard]] auto fuse_init() -> packet::error_type override; auto fuse_init() -> packet::error_type override;
/*packet::error_type fuse_listxattr(const char *path, char *buffer, /*packet::error_type fuse_listxattr(const char *path, char *buffer,
const remote::file_size &size) override const remote::file_size &size) override
;*/ ;*/
[[nodiscard]] auto fuse_mkdir(const char *path, const remote::file_mode &mode) auto fuse_mkdir(const char *path, const remote::file_mode &mode)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_opendir(const char *path, remote::file_handle &handle) auto fuse_opendir(const char *path, remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto auto fuse_create(const char *path, const remote::file_mode &mode,
fuse_create(const char *path, const remote::file_mode &mode, const remote::open_flags &flags, remote::file_handle &handle)
const remote::open_flags &flags, remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_open(const char *path, auto fuse_open(const char *path, const remote::open_flags &flags,
const remote::open_flags &flags, remote::file_handle &handle) -> packet::error_type override;
remote::file_handle &handle)
auto fuse_read(const char *path, char *buffer,
const remote::file_size &read_size,
const remote::file_offset &read_offset,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_read(const char *path, char *buffer, auto fuse_rename(const char *from, const char *to)
const remote::file_size &read_size,
const remote::file_offset &read_offset,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_rename(const char *from, const char *to) auto fuse_write(const char *path, const char *buffer,
const remote::file_size &write_size,
const remote::file_offset &write_offset,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_write(const char *path, const char *buffer, auto fuse_write_base64(const char *path, const char *buffer,
const remote::file_size &write_size, const remote::file_size &write_size,
const remote::file_offset &write_offset, const remote::file_offset &write_offset,
const remote::file_handle &handle) const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_write_base64(const char *path, const char *buffer, auto fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_size &write_size, const remote::file_handle &handle, std::string &item_path)
const remote::file_offset &write_offset,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto auto fuse_release(const char *path, const remote::file_handle &handle)
fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_handle &handle, std::string &item_path)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_release(const char *path, auto fuse_releasedir(const char *path, const remote::file_handle &handle)
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto fuse_releasedir(const char *path,
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
/*packet::error_type fuse_removexattr(const char *path, const char *name) /*packet::error_type fuse_removexattr(const char *path, const char *name)
* override ;*/ * override ;*/
[[nodiscard]] auto fuse_rmdir(const char *path) auto fuse_rmdir(const char *path) -> packet::error_type override;
auto fuse_setattr_x(const char *path, remote::setattr_x &attr)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_setattr_x(const char *path, remote::setattr_x &attr) auto fuse_setbkuptime(const char *path, const remote::file_time &bkuptime)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_setbkuptime(const char *path, auto fuse_setchgtime(const char *path, const remote::file_time &chgtime)
const remote::file_time &bkuptime)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_setchgtime(const char *path, auto fuse_setcrtime(const char *path, const remote::file_time &crtime)
const remote::file_time &chgtime)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_setcrtime(const char *path, auto fuse_setvolname(const char *volname) -> packet::error_type override;
const remote::file_time &crtime)
-> packet::error_type override;
[[nodiscard]] auto fuse_setvolname(const char *volname)
-> packet::error_type override;
/*packet::error_type fuse_setxattr(const char *path, const char *name, const /*packet::error_type fuse_setxattr(const char *path, const char *name, const
char *value, const remote::file_size &size, const std::int32_t &flags) char *value, const remote::file_size &size, const std::int32_t &flags)
@ -199,123 +181,109 @@ public:
char *value, const remote::file_size &size, const std::int32_t &flags, char *value, const remote::file_size &size, const std::int32_t &flags,
std::uint32_t position) override ;*/ std::uint32_t position) override ;*/
[[nodiscard]] auto fuse_statfs(const char *path, std::uint64_t frsize, auto fuse_statfs(const char *path, std::uint64_t frsize,
remote::statfs &r_stat) remote::statfs &r_stat) -> packet::error_type override;
auto fuse_statfs_x(const char *path, std::uint64_t bsize,
remote::statfs_x &r_stat) -> packet::error_type override;
auto fuse_truncate(const char *path, const remote::file_offset &size)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto fuse_statfs_x(const char *path, std::uint64_t bsize, auto fuse_unlink(const char *path) -> packet::error_type override;
remote::statfs_x &r_stat)
-> packet::error_type override;
[[nodiscard]] auto fuse_truncate(const char *path, auto fuse_utimens(const char *path, const remote::file_time *tv,
const remote::file_offset &size) std::uint64_t op0, std::uint64_t op1)
-> packet::error_type override;
[[nodiscard]] auto fuse_unlink(const char *path)
-> packet::error_type override;
[[nodiscard]] auto fuse_utimens(const char *path, const remote::file_time *tv,
std::uint64_t op0, std::uint64_t op1)
-> packet::error_type override; -> packet::error_type override;
void set_fuse_uid_gid(const remote::user_id & /* uid */, void set_fuse_uid_gid(const remote::user_id & /* uid */,
const remote::group_id & /* gid */) override {} const remote::group_id & /* gid */) override {}
// JSON Layer // JSON Layer
[[nodiscard]] auto json_create_directory_snapshot(const std::string &path, auto json_create_directory_snapshot(const std::string &path, json &json_data)
json &json_data)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto json_read_directory_snapshot( auto json_read_directory_snapshot(const std::string &path,
const std::string &path, const remote::file_handle &handle, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override; std::uint32_t page, json &json_data)
-> packet::error_type override;
[[nodiscard]] auto auto json_release_directory_snapshot(const std::string &path,
json_release_directory_snapshot(const std::string &path, const remote::file_handle &handle)
const remote::file_handle &handle)
-> packet::error_type override; -> packet::error_type override;
// WinFSP Layer // WinFSP Layer
[[nodiscard]] auto winfsp_can_delete(PVOID file_desc, PWSTR file_name) auto winfsp_can_delete(PVOID file_desc, PWSTR file_name)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
UINT32 flags, BOOLEAN &was_deleted) BOOLEAN &was_deleted) -> packet::error_type override;
auto winfsp_close(PVOID file_desc) -> packet::error_type override;
auto winfsp_create(PWSTR file_name, UINT32 create_options,
UINT32 granted_access, UINT32 attributes,
UINT64 allocation_size, PVOID *file_desc,
remote::file_info *file_info, std::string &normalized_name,
BOOLEAN &exists) -> packet::error_type override;
auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_close(PVOID file_desc) auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto auto winfsp_get_file_info(PVOID file_desc, remote::file_info *file_info)
winfsp_create(PWSTR file_name, UINT32 create_options, UINT32 granted_access,
UINT32 attributes, UINT64 allocation_size, PVOID *file_desc,
remote::file_info *file_info, std::string &normalized_name,
BOOLEAN &exists) -> packet::error_type override;
[[nodiscard]] auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr) auto winfsp_get_security_by_name(PWSTR file_name, PUINT32 attributes,
std::uint64_t *descriptor_size,
std::wstring &string_descriptor)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_get_file_info(PVOID file_desc, auto winfsp_get_volume_info(UINT64 &total_size, UINT64 &free_size,
remote::file_info *file_info) std::string &volume_label)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_get_security_by_name( auto winfsp_mounted(const std::wstring &location)
PWSTR file_name, PUINT32 attributes, std::uint64_t *descriptor_size,
std::wstring &string_descriptor) -> packet::error_type override;
[[nodiscard]] auto winfsp_get_volume_info(UINT64 &total_size,
UINT64 &free_size,
std::string &volume_label)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_mounted(const std::wstring &location) auto winfsp_open(PWSTR file_name, UINT32 create_options,
UINT32 granted_access, PVOID *file_desc,
remote::file_info *file_info, std::string &normalized_name)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_open(PWSTR file_name, UINT32 create_options, auto winfsp_overwrite(PVOID file_desc, UINT32 attributes,
UINT32 granted_access, PVOID *file_desc, BOOLEAN replace_attributes, UINT64 allocation_size,
remote::file_info *file_info, remote::file_info *file_info)
std::string &normalized_name)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_overwrite(PVOID file_desc, UINT32 attributes, auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
BOOLEAN replace_attributes, PUINT32 bytes_transferred) -> packet::error_type override;
UINT64 allocation_size,
remote::file_info *file_info) auto winfsp_read_directory(PVOID file_desc, PWSTR pattern, PWSTR marker,
json &item_list) -> packet::error_type override;
auto winfsp_rename(PVOID file_desc, PWSTR file_name, PWSTR new_file_name,
BOOLEAN replace_if_exists) -> packet::error_type override;
auto winfsp_set_basic_info(PVOID file_desc, UINT32 attributes,
UINT64 creation_time, UINT64 last_access_time,
UINT64 last_write_time, UINT64 change_time,
remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
UINT32 length, PUINT32 bytes_transferred) BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_read_directory(PVOID file_desc, PWSTR pattern, auto winfsp_unmounted(const std::wstring &location)
PWSTR marker, json &item_list)
-> packet::error_type override; -> packet::error_type override;
[[nodiscard]] auto winfsp_rename(PVOID file_desc, PWSTR file_name, auto winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
PWSTR new_file_name, BOOLEAN write_to_end, BOOLEAN constrained_io,
BOOLEAN replace_if_exists) PUINT32 bytes_transferred, remote::file_info *file_info)
-> packet::error_type override;
[[nodiscard]] auto winfsp_set_basic_info(
PVOID file_desc, UINT32 attributes, UINT64 creation_time,
UINT64 last_access_time, UINT64 last_write_time, UINT64 change_time,
remote::file_info *file_info) -> packet::error_type override;
[[nodiscard]] auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type override;
[[nodiscard]] auto winfsp_unmounted(const std::wstring &location)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
BOOLEAN write_to_end, BOOLEAN constrained_io,
PUINT32 bytes_transferred, remote::file_info *file_info)
-> packet::error_type override; -> packet::error_type override;
}; };
} // namespace remote_winfsp } // namespace remote_winfsp

View File

@ -35,8 +35,9 @@ public:
~logging_consumer(); ~logging_consumer();
private: private:
static constexpr std::uint8_t MAX_LOG_FILES{5U}; static constexpr const std::uint8_t MAX_LOG_FILES{5U};
static constexpr std::uint64_t MAX_LOG_FILE_SIZE{1024ULL * 1024ULL * 5ULL}; static constexpr const std::uint64_t MAX_LOG_FILE_SIZE{1024ULL * 1024ULL *
5ULL};
private: private:
static void process_event(const i_event &evt); static void process_event(const i_event &evt);

View File

@ -27,7 +27,7 @@ class i_event;
class event_system final { class event_system final {
private: private:
static constexpr std::uint8_t max_queue_retry{ static constexpr const std::uint8_t max_queue_retry{
30U, 30U,
}; };
@ -35,7 +35,7 @@ private:
std::thread::hardware_concurrency() * 4U, std::thread::hardware_concurrency() * 4U,
}; };
static constexpr std::chrono::seconds queue_wait_secs{ static constexpr const std::chrono::seconds queue_wait_secs{
5s, 5s,
}; };

View File

@ -33,8 +33,8 @@ struct curl_error final : public i_event {
function_name(std::string{function_name_}), function_name(std::string{function_name_}),
url(std::move(url_)) {} url(std::move(url_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"curl_error"}; static constexpr const std::string_view name{"curl_error"};
CURLcode code{}; CURLcode code{};
std::string function_name; std::string function_name;

View File

@ -31,8 +31,8 @@ struct debug_log final : public i_event {
debug_log(std::string_view function_name_, std::string msg_) debug_log(std::string_view function_name_, std::string msg_)
: function_name(std::string(function_name_)), msg(std::move(msg_)) {} : function_name(std::string(function_name_)), msg(std::move(msg_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"debug_log"}; static constexpr const std::string_view name{"debug_log"};
std::string function_name; std::string function_name;
std::string msg; std::string msg;

View File

@ -34,8 +34,8 @@ struct directory_remove_failed final : public i_event {
error(error_), error(error_),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"directory_remove_failed"}; static constexpr const std::string_view name{"directory_remove_failed"};
std::string api_path; std::string api_path;
api_error error{}; api_error error{};

View File

@ -32,8 +32,8 @@ struct directory_removed final : public i_event {
: api_path(std::move(api_path_)), : api_path(std::move(api_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"directory_removed"}; static constexpr const std::string_view name{"directory_removed"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct directory_removed_externally final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"directory_removed_externally"}; static constexpr const std::string_view name{"directory_removed_externally"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -34,8 +34,8 @@ struct download_begin final : public i_event {
dest_path(std::move(dest_path_)), dest_path(std::move(dest_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"download_begin"}; static constexpr const std::string_view name{"download_begin"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -35,8 +35,8 @@ struct download_end final : public i_event {
error(error_), error(error_),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"download_end"}; static constexpr const std::string_view name{"download_end"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -35,8 +35,8 @@ struct download_progress final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
progress(progress_) {} progress(progress_) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"download_progress"}; static constexpr const std::string_view name{"download_progress"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -35,8 +35,8 @@ struct download_restore_failed final : public i_event {
error(std::move(error_)), error(std::move(error_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"download_restore_failed"}; static constexpr const std::string_view name{"download_restore_failed"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -34,8 +34,8 @@ struct download_restored final : public i_event {
dest_path(std::move(dest_path_)), dest_path(std::move(dest_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"download_restored"}; static constexpr const std::string_view name{"download_restored"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -36,8 +36,8 @@ struct download_resume_add_failed final : public i_event {
error(std::move(error_)), error(std::move(error_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"download_resume_add_failed"}; static constexpr const std::string_view name{"download_resume_add_failed"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -34,8 +34,8 @@ struct download_resume_added final : public i_event {
dest_path(std::move(dest_path_)), dest_path(std::move(dest_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"download_resume_added"}; static constexpr const std::string_view name{"download_resume_added"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -34,8 +34,8 @@ struct download_resume_removed final : public i_event {
dest_path(std::move(dest_path_)), dest_path(std::move(dest_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"download_resume_removed"}; static constexpr const std::string_view name{"download_resume_removed"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -35,8 +35,8 @@ struct download_type_selected final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
type(type_) {} type(type_) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"download_type_selected"}; static constexpr const std::string_view name{"download_type_selected"};
std::string api_path; std::string api_path;
std::string dest_path; std::string dest_path;

View File

@ -35,8 +35,8 @@ struct drive_mount_failed final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
mount_location(std::move(mount_location_)) {} mount_location(std::move(mount_location_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"drive_mount_failed"}; static constexpr const std::string_view name{"drive_mount_failed"};
NTSTATUS error{}; NTSTATUS error{};
std::string function_name; std::string function_name;

View File

@ -34,8 +34,8 @@ struct drive_mount_result final : public i_event {
mount_location(std::move(mount_location_)), mount_location(std::move(mount_location_)),
result(std::move(result_)) {} result(std::move(result_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"drive_mount_result"}; static constexpr const std::string_view name{"drive_mount_result"};
std::string function_name; std::string function_name;
std::string mount_location; std::string mount_location;

View File

@ -32,8 +32,8 @@ struct drive_mounted final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
mount_location(std::move(mount_location_)) {} mount_location(std::move(mount_location_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"drive_mounted"}; static constexpr const std::string_view name{"drive_mounted"};
std::string function_name; std::string function_name;
std::string mount_location; std::string mount_location;

View File

@ -31,8 +31,8 @@ struct drive_stop_timed_out final : public i_event {
drive_stop_timed_out(std::string_view function_name_) drive_stop_timed_out(std::string_view function_name_)
: function_name(std::string(function_name_)) {} : function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"drive_stop_timed_out"}; static constexpr const std::string_view name{"drive_stop_timed_out"};
std::string function_name; std::string function_name;

View File

@ -33,8 +33,8 @@ struct drive_unmount_pending final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
mount_location(std::move(mount_location_)) {} mount_location(std::move(mount_location_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"drive_unmount_pending"}; static constexpr const std::string_view name{"drive_unmount_pending"};
std::string function_name; std::string function_name;
std::string mount_location; std::string mount_location;

View File

@ -32,8 +32,8 @@ struct drive_unmounted final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
mount_location(std::move(mount_location_)) {} mount_location(std::move(mount_location_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"drive_unmounted"}; static constexpr const std::string_view name{"drive_unmounted"};
std::string function_name; std::string function_name;
std::string mount_location; std::string mount_location;

View File

@ -31,8 +31,8 @@ struct event_level_changed final : public i_event {
event_level_changed(std::string_view function_name_, event_level new_level_) event_level_changed(std::string_view function_name_, event_level new_level_)
: function_name(std::string(function_name_)), new_level(new_level_) {} : function_name(std::string(function_name_)), new_level(new_level_) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"event_level_changed"}; static constexpr const std::string_view name{"event_level_changed"};
std::string function_name; std::string function_name;
event_level new_level{}; event_level new_level{};

View File

@ -32,8 +32,8 @@ struct file_pinned final : public i_event {
: api_path(std::move(api_path_)), : api_path(std::move(api_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"file_pinned"}; static constexpr const std::string_view name{"file_pinned"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -34,8 +34,8 @@ struct file_remove_failed final : public i_event {
error(error_), error(error_),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"file_remove_failed"}; static constexpr const std::string_view name{"file_remove_failed"};
std::string api_path; std::string api_path;
api_error error{}; api_error error{};

View File

@ -32,8 +32,8 @@ struct file_removed final : public i_event {
: api_path(std::move(api_path_)), : api_path(std::move(api_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"file_removed"}; static constexpr const std::string_view name{"file_removed"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct file_removed_externally final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"file_removed_externally"}; static constexpr const std::string_view name{"file_removed_externally"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -32,8 +32,8 @@ struct file_unpinned final : public i_event {
: api_path(std::move(api_path_)), : api_path(std::move(api_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"file_unpinned"}; static constexpr const std::string_view name{"file_unpinned"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -37,8 +37,8 @@ struct file_upload_completed final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"file_upload_completed"}; static constexpr const std::string_view name{"file_upload_completed"};
std::string api_path; std::string api_path;
bool cancelled{}; bool cancelled{};

View File

@ -35,8 +35,8 @@ struct file_upload_failed final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"file_upload_failed"}; static constexpr const std::string_view name{"file_upload_failed"};
std::string api_path; std::string api_path;
std::string error; std::string error;

View File

@ -34,8 +34,8 @@ struct file_upload_not_found final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"file_upload_not_found"}; static constexpr const std::string_view name{"file_upload_not_found"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -34,8 +34,8 @@ struct file_upload_queued final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"file_upload_queued"}; static constexpr const std::string_view name{"file_upload_queued"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -32,8 +32,8 @@ struct file_upload_removed final : public i_event {
: api_path(std::move(api_path_)), : api_path(std::move(api_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"file_upload_removed"}; static constexpr const std::string_view name{"file_upload_removed"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct file_upload_retry final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"file_upload_retry"}; static constexpr const std::string_view name{"file_upload_retry"};
std::string api_path; std::string api_path;
api_error error{}; api_error error{};

View File

@ -35,8 +35,8 @@ struct filesystem_item_added final : public i_event {
directory(directory_), directory(directory_),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"filesystem_item_added"}; static constexpr const std::string_view name{"filesystem_item_added"};
std::string api_parent; std::string api_parent;
std::string api_path; std::string api_path;

View File

@ -37,8 +37,8 @@ struct filesystem_item_closed final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::trace}; static constexpr const event_level level{event_level::trace};
static constexpr std::string_view name{"filesystem_item_closed"}; static constexpr const std::string_view name{"filesystem_item_closed"};
std::string api_path; std::string api_path;
bool changed{}; bool changed{};

View File

@ -35,8 +35,8 @@ struct filesystem_item_evicted final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"filesystem_item_evicted"}; static constexpr const std::string_view name{"filesystem_item_evicted"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -39,8 +39,8 @@ struct filesystem_item_handle_closed final : public i_event {
handle(handle_), handle(handle_),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::trace}; static constexpr const event_level level{event_level::trace};
static constexpr std::string_view name{"filesystem_item_handle_closed"}; static constexpr const std::string_view name{"filesystem_item_handle_closed"};
std::string api_path; std::string api_path;
bool changed{}; bool changed{};

View File

@ -37,8 +37,8 @@ struct filesystem_item_handle_opened final : public i_event {
handle(handle_), handle(handle_),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::trace}; static constexpr const event_level level{event_level::trace};
static constexpr std::string_view name{"filesystem_item_handle_opened"}; static constexpr const std::string_view name{"filesystem_item_handle_opened"};
std::string api_path; std::string api_path;
bool directory{}; bool directory{};

View File

@ -36,8 +36,8 @@ struct filesystem_item_opened final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::trace}; static constexpr const event_level level{event_level::trace};
static constexpr std::string_view name{"filesystem_item_opened"}; static constexpr const std::string_view name{"filesystem_item_opened"};
std::string api_path; std::string api_path;
bool directory{}; bool directory{};

View File

@ -32,8 +32,8 @@ struct fuse_args_parsed final : public i_event {
fuse_args_parsed(std::string_view args_, std::string_view function_name_) fuse_args_parsed(std::string_view args_, std::string_view function_name_)
: args(std::move(args_)), function_name(std::string{function_name_}) {} : args(std::move(args_)), function_name(std::string{function_name_}) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"fuse_args_parsed"}; static constexpr const std::string_view name{"fuse_args_parsed"};
std::string args; std::string args;
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct fuse_event final : public i_event {
error(error_), error(error_),
function_name(std::string{function_name_}) {} function_name(std::string{function_name_}) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"fuse_event"}; static constexpr const std::string_view name{"fuse_event"};
std::string api_path; std::string api_path;
std::int32_t error{}; std::int32_t error{};

View File

@ -1,68 +0,0 @@
/*
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_TYPES_INFO_LOG_HPP_
#define REPERTORY_INCLUDE_EVENTS_TYPES_INFO_LOG_HPP_
#include "events/i_event.hpp"
#include "types/repertory.hpp"
namespace repertory {
struct info_log final : public i_event {
info_log() = default;
info_log(std::string_view function_name_, std::string msg_)
: function_name(std::string(function_name_)), msg(std::move(msg_)) {}
static constexpr event_level level{event_level::info};
static constexpr std::string_view name{"info_log"};
std::string function_name;
std::string msg;
[[nodiscard]] auto get_event_level() const -> event_level override {
return level;
}
[[nodiscard]] auto get_name() const -> std::string_view override {
return name;
}
[[nodiscard]] auto get_single_line() const -> std::string override {
return fmt::format("{}|func|{}|msg|{}", name, function_name, msg);
}
};
} // namespace repertory
NLOHMANN_JSON_NAMESPACE_BEGIN
template <> struct adl_serializer<repertory::info_log> {
static void to_json(json &data, const repertory::info_log &value) {
data["function_name"] = value.function_name;
data["msg"] = value.msg;
}
static void from_json(const json &data, repertory::info_log &value) {
data.at("function_name").get_to<std::string>(value.function_name);
data.at("msg").get_to<std::string>(value.msg);
}
};
NLOHMANN_JSON_NAMESPACE_END
#endif // REPERTORY_INCLUDE_EVENTS_TYPES_INFO_LOG_HPP_

View File

@ -34,8 +34,8 @@ struct invalid_cache_size final : public i_event {
function_name(std::string{function_name_}), function_name(std::string{function_name_}),
invalid_size(invalid_size_) {} invalid_size(invalid_size_) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"invalid_cache_size"}; static constexpr const std::string_view name{"invalid_cache_size"};
std::uint64_t cache_size{}; std::uint64_t cache_size{};
std::string function_name; std::string function_name;

View File

@ -32,8 +32,8 @@ struct item_timeout final : public i_event {
: api_path(std::move(api_path_)), : api_path(std::move(api_path_)),
function_name(std::string(function_name_)) {} function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::trace}; static constexpr const event_level level{event_level::trace};
static constexpr std::string_view name{"item_timeout"}; static constexpr const std::string_view name{"item_timeout"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct max_cache_size_reached final : public i_event {
function_name(std::string{function_name_}), function_name(std::string{function_name_}),
max_cache_size(max_cache_size_) {} max_cache_size(max_cache_size_) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"max_cache_size_reached"}; static constexpr const std::string_view name{"max_cache_size_reached"};
std::uint64_t cache_size{}; std::uint64_t cache_size{};
std::string function_name; std::string function_name;

View File

@ -33,8 +33,8 @@ struct orphaned_file_detected final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"orphaned_file_detected"}; static constexpr const std::string_view name{"orphaned_file_detected"};
std::string function_name; std::string function_name;
std::string source_path; std::string source_path;

View File

@ -36,8 +36,8 @@ struct orphaned_file_processing_failed final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{ static constexpr const std::string_view name{
"orphaned_file_processing_failed", "orphaned_file_processing_failed",
}; };

View File

@ -33,8 +33,8 @@ struct orphaned_source_file_detected final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"orphaned_source_file_detected"}; static constexpr const std::string_view name{"orphaned_source_file_detected"};
std::string function_name; std::string function_name;
std::string source_path; std::string source_path;

View File

@ -33,8 +33,8 @@ struct orphaned_source_file_removed final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"orphaned_source_file_removed"}; static constexpr const std::string_view name{"orphaned_source_file_removed"};
std::string function_name; std::string function_name;
std::string source_path; std::string source_path;

View File

@ -34,8 +34,8 @@ struct packet_client_timeout final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
msg(std::move(msg_)) {} msg(std::move(msg_)) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"packet_client_timeout"}; static constexpr const std::string_view name{"packet_client_timeout"};
std::string event_name; std::string event_name;
std::string function_name; std::string function_name;

View File

@ -32,8 +32,8 @@ struct polling_item_begin final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
item_name(std::move(item_name_)) {} item_name(std::move(item_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"polling_item_begin"}; static constexpr const std::string_view name{"polling_item_begin"};
std::string function_name; std::string function_name;
std::string item_name; std::string item_name;

View File

@ -32,8 +32,8 @@ struct polling_item_end final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
item_name(std::move(item_name_)) {} item_name(std::move(item_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"polling_item_end"}; static constexpr const std::string_view name{"polling_item_end"};
std::string function_name; std::string function_name;
std::string item_name; std::string item_name;

View File

@ -35,8 +35,8 @@ struct provider_invalid_version final : public i_event {
required_version(std::move(required_version_)), required_version(std::move(required_version_)),
returned_version(std::move(returned_version_)) {} returned_version(std::move(returned_version_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"provider_invalid_version"}; static constexpr const std::string_view name{"provider_invalid_version"};
std::string function_name; std::string function_name;
std::string required_version; std::string required_version;

View File

@ -34,8 +34,8 @@ struct provider_offline final : public i_event {
host_name_or_ip(std::move(host_name_or_ip_)), host_name_or_ip(std::move(host_name_or_ip_)),
port(port_) {} port(port_) {}
static constexpr event_level level{event_level::warn}; static constexpr const event_level level{event_level::warn};
static constexpr std::string_view name{"provider_offline"}; static constexpr const std::string_view name{"provider_offline"};
std::string function_name; std::string function_name;
std::string host_name_or_ip; std::string host_name_or_ip;

View File

@ -34,8 +34,8 @@ struct provider_upload_begin final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"provider_upload_begin"}; static constexpr const std::string_view name{"provider_upload_begin"};
std::string api_path; std::string api_path;
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct provider_upload_end final : public i_event {
function_name(std::string(function_name_)), function_name(std::string(function_name_)),
source_path(std::move(source_path_)) {} source_path(std::move(source_path_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"provider_upload_end"}; static constexpr const std::string_view name{"provider_upload_end"};
std::string api_path; std::string api_path;
api_error error{}; api_error error{};

View File

@ -35,8 +35,8 @@ struct remote_server_event final : public i_event {
error(error_), error(error_),
function_name(std::string{function_name_}) {} function_name(std::string{function_name_}) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"remote_server_event"}; static constexpr const std::string_view name{"remote_server_event"};
std::string api_path; std::string api_path;
packet::error_type error{}; packet::error_type error{};

View File

@ -31,8 +31,8 @@ struct repertory_exception final : public i_event {
repertory_exception(std::string_view function_name_, std::string msg_) repertory_exception(std::string_view function_name_, std::string msg_)
: function_name(std::string(function_name_)), msg(std::move(msg_)) {} : function_name(std::string(function_name_)), msg(std::move(msg_)) {}
static constexpr event_level level{event_level::error}; static constexpr const event_level level{event_level::error};
static constexpr std::string_view name{"repertory_exception"}; static constexpr const std::string_view name{"repertory_exception"};
std::string function_name; std::string function_name;
std::string msg; std::string msg;

View File

@ -33,8 +33,8 @@ struct service_start_begin final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
service_name(std::move(service_name_)) {} service_name(std::move(service_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"service_start_begin"}; static constexpr const std::string_view name{"service_start_begin"};
std::string function_name; std::string function_name;
std::string service_name; std::string service_name;

View File

@ -32,8 +32,8 @@ struct service_start_end final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
service_name(std::move(service_name_)) {} service_name(std::move(service_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"service_start_end"}; static constexpr const std::string_view name{"service_start_end"};
std::string function_name; std::string function_name;
std::string service_name; std::string service_name;

View File

@ -32,8 +32,8 @@ struct service_stop_begin final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
service_name(std::move(service_name_)) {} service_name(std::move(service_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"service_stop_begin"}; static constexpr const std::string_view name{"service_stop_begin"};
std::string function_name; std::string function_name;
std::string service_name; std::string service_name;

View File

@ -32,8 +32,8 @@ struct service_stop_end final : public i_event {
: function_name(std::string(function_name_)), : function_name(std::string(function_name_)),
service_name(std::move(service_name_)) {} service_name(std::move(service_name_)) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"service_stop_end"}; static constexpr const std::string_view name{"service_stop_end"};
std::string function_name; std::string function_name;
std::string service_name; std::string service_name;

View File

@ -1,68 +0,0 @@
/*
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_TYPES_TRACE_LOG_HPP_
#define REPERTORY_INCLUDE_EVENTS_TYPES_TRACE_LOG_HPP_
#include "events/i_event.hpp"
#include "types/repertory.hpp"
namespace repertory {
struct trace_log final : public i_event {
trace_log() = default;
trace_log(std::string_view function_name_, std::string msg_)
: function_name(std::string(function_name_)), msg(std::move(msg_)) {}
static constexpr event_level level{event_level::trace};
static constexpr std::string_view name{"trace_log"};
std::string function_name;
std::string msg;
[[nodiscard]] auto get_event_level() const -> event_level override {
return level;
}
[[nodiscard]] auto get_name() const -> std::string_view override {
return name;
}
[[nodiscard]] auto get_single_line() const -> std::string override {
return fmt::format("{}|func|{}|msg|{}", name, function_name, msg);
}
};
} // namespace repertory
NLOHMANN_JSON_NAMESPACE_BEGIN
template <> struct adl_serializer<repertory::trace_log> {
static void to_json(json &data, const repertory::trace_log &value) {
data["function_name"] = value.function_name;
data["msg"] = value.msg;
}
static void from_json(const json &data, repertory::trace_log &value) {
data.at("function_name").get_to<std::string>(value.function_name);
data.at("msg").get_to<std::string>(value.msg);
}
};
NLOHMANN_JSON_NAMESPACE_END
#endif // REPERTORY_INCLUDE_EVENTS_TYPES_TRACE_LOG_HPP_

View File

@ -31,8 +31,8 @@ struct unmount_requested final : public i_event {
unmount_requested(std::string_view function_name_) unmount_requested(std::string_view function_name_)
: function_name(std::string(function_name_)) {} : function_name(std::string(function_name_)) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"unmount_requested"}; static constexpr const std::string_view name{"unmount_requested"};
std::string function_name; std::string function_name;

View File

@ -35,8 +35,8 @@ struct unmount_result final : public i_event {
mount_location(std::move(mount_location_)), mount_location(std::move(mount_location_)),
result(result_) {} result(result_) {}
static constexpr event_level level{event_level::info}; static constexpr const event_level level{event_level::info};
static constexpr std::string_view name{"unmount_result"}; static constexpr const std::string_view name{"unmount_result"};
std::string function_name; std::string function_name;
std::string mount_location; std::string mount_location;

View File

@ -1,68 +0,0 @@
/*
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_TYPES_WARN_LOG_HPP_
#define REPERTORY_INCLUDE_EVENTS_TYPES_WARN_LOG_HPP_
#include "events/i_event.hpp"
#include "types/repertory.hpp"
namespace repertory {
struct warn_log final : public i_event {
warn_log() = default;
warn_log(std::string_view function_name_, std::string msg_)
: function_name(std::string(function_name_)), msg(std::move(msg_)) {}
static constexpr event_level level{event_level::warn};
static constexpr std::string_view name{"warn_log"};
std::string function_name;
std::string msg;
[[nodiscard]] auto get_event_level() const -> event_level override {
return level;
}
[[nodiscard]] auto get_name() const -> std::string_view override {
return name;
}
[[nodiscard]] auto get_single_line() const -> std::string override {
return fmt::format("{}|func|{}|msg|{}", name, function_name, msg);
}
};
} // namespace repertory
NLOHMANN_JSON_NAMESPACE_BEGIN
template <> struct adl_serializer<repertory::warn_log> {
static void to_json(json &data, const repertory::warn_log &value) {
data["function_name"] = value.function_name;
data["msg"] = value.msg;
}
static void from_json(const json &data, repertory::warn_log &value) {
data.at("function_name").get_to<std::string>(value.function_name);
data.at("msg").get_to<std::string>(value.msg);
}
};
NLOHMANN_JSON_NAMESPACE_END
#endif // REPERTORY_INCLUDE_EVENTS_TYPES_WARN_LOG_HPP_

View File

@ -35,8 +35,8 @@ struct winfsp_event final : public i_event {
error(error_), error(error_),
function_name(std::string{function_name_}) {} function_name(std::string{function_name_}) {}
static constexpr event_level level{event_level::debug}; static constexpr const event_level level{event_level::debug};
static constexpr std::string_view name{"winfsp_event"}; static constexpr const std::string_view name{"winfsp_event"};
std::string api_path; std::string api_path;
NTSTATUS error{}; NTSTATUS error{};

View File

@ -29,7 +29,7 @@ class app_config;
class cache_size_mgr final { class cache_size_mgr final {
private: private:
static constexpr std::chrono::seconds cache_wait_secs{ static constexpr const std::chrono::seconds cache_wait_secs{
5s, 5s,
}; };

View File

@ -40,7 +40,7 @@ class file_manager final : public i_file_manager, public i_upload_manager {
E_CONSUMER(); E_CONSUMER();
private: private:
static constexpr std::chrono::seconds queue_wait_secs{ static constexpr const std::chrono::seconds queue_wait_secs{
5s, 5s,
}; };

View File

@ -48,7 +48,7 @@ public:
-> ring_buffer_base & = delete; -> ring_buffer_base & = delete;
public: public:
static constexpr auto min_ring_size{5U}; static constexpr const auto min_ring_size{5U};
private: private:
boost::dynamic_bitset<> read_state_; boost::dynamic_bitset<> read_state_;

View File

@ -22,13 +22,6 @@
#ifndef REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_ #ifndef REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_
#define REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_ #define REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_
#include "types/repertory.hpp"
namespace repertory {
[[nodiscard]] auto create_lock_id(provider_type prov,
std::string_view unique_id)->std::string;
}
#if defined(_WIN32) #if defined(_WIN32)
#include "platform/win32_platform.hpp" #include "platform/win32_platform.hpp"
#include "utils/windows.hpp" #include "utils/windows.hpp"

View File

@ -30,44 +30,40 @@ class i_provider;
class lock_data final { class lock_data final {
public: public:
lock_data(provider_type prov, std::string_view unique_id); explicit lock_data(const provider_type &pt, std::string unique_id /*= ""*/);
lock_data(const lock_data &) = delete; lock_data();
lock_data(lock_data &&) = delete;
auto operator=(const lock_data &) -> lock_data & = delete;
auto operator=(lock_data &&) -> lock_data & = delete;
~lock_data(); ~lock_data();
private: private:
std::string mutex_id_; const provider_type pt_;
const std::string unique_id_;
private: const std::string mutex_id_;
int handle_{}; int lock_fd_;
int lock_status_{EWOULDBLOCK}; int lock_status_{EWOULDBLOCK};
private: private:
[[nodiscard]] static auto get_state_directory() -> std::string; [[nodiscard]] static auto get_state_directory() -> std::string;
[[nodiscard]] auto get_lock_data_file() const -> std::string; [[nodiscard]] static auto get_lock_data_file() -> std::string;
[[nodiscard]] auto get_lock_file() const -> std::string; [[nodiscard]] auto get_lock_file() -> std::string;
private: private:
[[nodiscard]] static auto wait_for_lock(int handle, [[nodiscard]] static auto wait_for_lock(int fd,
std::uint8_t retry_count = 30U) std::uint8_t retry_count = 30u)
-> int; -> int;
public: public:
[[nodiscard]] auto get_mount_state(json &mount_state) -> bool; [[nodiscard]] auto get_mount_state(json &mount_state) -> bool;
[[nodiscard]] auto grab_lock(std::uint8_t retry_count = 30U) -> lock_result; [[nodiscard]] auto grab_lock(std::uint8_t retry_count = 30u) -> lock_result;
void release(); void release();
[[nodiscard]] auto set_mount_state(bool active, [[nodiscard]] auto set_mount_state(bool active,
std::string_view mount_location, int pid) const std::string &mount_location, int pid)
-> bool; -> bool;
}; };
@ -83,5 +79,5 @@ public:
const api_file &file) -> api_error; const api_file &file) -> api_error;
} // namespace repertory } // namespace repertory
#endif // !defined(_WIN32) #endif // _WIN32
#endif // REPERTORY_INCLUDE_PLATFORM_UNIXPLATFORM_HPP_ #endif // REPERTORY_INCLUDE_PLATFORM_UNIXPLATFORM_HPP_

View File

@ -23,6 +23,7 @@
#define REPERTORY_INCLUDE_PLATFORM_WINPLATFORM_HPP_ #define REPERTORY_INCLUDE_PLATFORM_WINPLATFORM_HPP_
#if defined(_WIN32) #if defined(_WIN32)
#include "app_config.hpp"
#include "types/repertory.hpp" #include "types/repertory.hpp"
namespace repertory { namespace repertory {
@ -30,32 +31,43 @@ class i_provider;
class lock_data final { class lock_data final {
public: public:
explicit lock_data(provider_type prov, std::string unique_id); explicit lock_data(const provider_type &pt, std::string unique_id /*= ""*/)
lock_data(const lock_data &) = delete; : pt_(pt),
lock_data(lock_data &&) = delete; unique_id_(std::move(unique_id)),
mutex_id_("repertory_" + app_config::get_provider_name(pt) + "_" +
unique_id_),
mutex_handle_(::CreateMutex(nullptr, FALSE, &mutex_id_[0u])) {}
~lock_data(); lock_data()
: pt_(provider_type::sia),
unique_id_(""),
mutex_id_(""),
mutex_handle_(INVALID_HANDLE_VALUE) {}
auto operator=(const lock_data &) -> lock_data & = delete; ~lock_data() { release(); }
auto operator=(lock_data &&) -> lock_data & = delete;
private: private:
std::string mutex_id_; const provider_type pt_;
HANDLE mutex_handle_{INVALID_HANDLE_VALUE}; const std::string unique_id_;
DWORD mutex_state_{WAIT_FAILED}; const std::string mutex_id_;
HANDLE mutex_handle_;
[[nodiscard]] auto get_current_mount_state(json &mount_state) -> bool; DWORD mutex_state_ = WAIT_FAILED;
public: public:
[[nodiscard]] auto get_mount_state(const provider_type &pt,
json &mount_state) -> bool;
[[nodiscard]] auto get_mount_state(json &mount_state) -> bool; [[nodiscard]] auto get_mount_state(json &mount_state) -> bool;
[[nodiscard]] auto grab_lock(std::uint8_t retry_count = 30U) -> lock_result; [[nodiscard]] auto get_unique_id() const -> std::string { return unique_id_; }
[[nodiscard]] auto grab_lock(std::uint8_t retry_count = 30) -> lock_result;
void release(); void release();
[[nodiscard]] auto set_mount_state(bool active, [[nodiscard]] auto set_mount_state(bool active,
std::string_view mount_location, const std::string &mount_location,
std::int64_t pid) -> bool; const std::int64_t &pid) -> bool;
}; };
[[nodiscard]] auto create_meta_attributes( [[nodiscard]] auto create_meta_attributes(

View File

@ -84,8 +84,6 @@ private:
void remove_deleted_files(stop_type &stop_requested); void remove_deleted_files(stop_type &stop_requested);
void remove_expired_files();
public: public:
[[nodiscard]] auto check_version(std::string &required_version, [[nodiscard]] auto check_version(std::string &required_version,
std::string &returned_version) const std::string &returned_version) const

View File

@ -49,28 +49,16 @@ private:
sia_config sia_config_; sia_config sia_config_;
private: private:
[[nodiscard]] auto create_directory_key(const std::string &api_path) const
-> repertory::api_error;
[[nodiscard]] auto ensure_directory_exists(const std::string &api_path) const
-> api_error;
[[nodiscard]] auto get_object_info(const std::string &api_path, [[nodiscard]] auto get_object_info(const std::string &api_path,
json &object_info) const -> api_error; json &object_info) const -> api_error;
[[nodiscard]] auto [[nodiscard]] auto get_object_list(const std::string &api_path,
get_object_list(const std::string &api_path, nlohmann::json &object_list, nlohmann::json &object_list) const -> bool;
std::optional<std::string> marker = std::nullopt) const
-> bool;
[[nodiscard]] auto get_sia_config() const -> const auto & { [[nodiscard]] auto get_sia_config() const -> const auto & {
return sia_config_; return sia_config_;
} }
void iterate_objects(
const std::string &api_path, const json &object_list,
std::function<void(const std::string &, bool, json)> handle_entry) const;
protected: protected:
[[nodiscard]] auto create_directory_impl(const std::string &api_path, [[nodiscard]] auto create_directory_impl(const std::string &api_path,
api_meta_map &meta) api_meta_map &meta)

View File

@ -30,13 +30,8 @@ class app_config;
class server { class server {
public: public:
explicit server(app_config &config); explicit server(app_config &config);
server(const server &) = delete;
server(server &&) = delete;
auto operator=(const server &) -> server & = delete; virtual ~server() { stop(); }
auto operator=(server &&) -> server & = delete;
virtual ~server();
private: private:
app_config &config_; app_config &config_;

View File

@ -24,20 +24,19 @@
#include "types/repertory.hpp" #include "types/repertory.hpp"
inline constexpr auto PACKET_SERVICE_FUSE{1U}; inline constexpr const auto PACKET_SERVICE_FUSE{1U};
inline constexpr auto PACKET_SERVICE_WINFSP{2U}; inline constexpr const auto PACKET_SERVICE_WINFSP{2U};
#if defined(_WIN32) #if defined(_WIN32)
inline constexpr auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_WINFSP}; inline constexpr const auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_WINFSP};
#else // !defined(_WIN32) #else // !defined(_WIN32)
inline constexpr auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_FUSE}; inline constexpr const auto PACKET_SERVICE_FLAGS{PACKET_SERVICE_FUSE};
#endif // defined(_WIN32) #endif // defined(_WIN32)
inline constexpr auto default_remote_directory_page_size{std::size_t(100U)}; constexpr const auto default_remote_client_pool_size{20U};
inline constexpr auto default_remote_client_pool_size{20U}; constexpr const auto default_remote_max_connections{20U};
inline constexpr auto default_remote_max_connections{20U}; constexpr const auto default_remote_receive_timeout_ms{120U * 1000U};
inline constexpr auto default_remote_receive_timeout_ms{120U * 1000U}; constexpr const auto default_remote_send_timeout_ms{30U * 1000U};
inline constexpr auto default_remote_send_timeout_ms{30U * 1000U};
namespace repertory::remote { namespace repertory::remote {
struct remote_config final { struct remote_config final {
@ -218,8 +217,8 @@ struct statfs_x final : public statfs {
#if !defined(_WIN32) #if !defined(_WIN32)
[[nodiscard]] auto create_open_flags(std::uint32_t flags) -> open_flags; [[nodiscard]] auto create_open_flags(std::uint32_t flags) -> open_flags;
[[nodiscard]] auto create_os_open_flags(const open_flags &flags) [[nodiscard]] auto
-> std::uint32_t; create_os_open_flags(const open_flags &flags) -> std::uint32_t;
#endif // !defined(_WIN32) #endif // !defined(_WIN32)
} // namespace repertory::remote } // namespace repertory::remote

Some files were not shown because too many files have changed in this diff Show More