596 Commits

Author SHA1 Message Date
0ddc714750 fix test 2024-08-23 19:15:44 -05:00
c0d855de89 fix 2024-08-23 19:14:03 -05:00
707feacc6c fix 2024-08-23 19:04:32 -05:00
0b3e187daa fix 2024-08-23 18:51:04 -05:00
3c0f5c2eff refactor
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-23 18:22:01 -05:00
059c57f1de fix
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-23 18:21:13 -05:00
bb6b90021f refactor
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-23 17:50:38 -05:00
577f362382 spelling
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-23 17:45:52 -05:00
775c893c65 fix 2024-08-23 17:45:19 -05:00
3b904945bb refactor 2024-08-23 17:42:45 -05:00
875517a334 fixes 2024-08-23 17:41:11 -05:00
d810f287c2 fixes 2024-08-23 17:38:52 -05:00
8d12ef22b9 refactor 2024-08-23 17:35:34 -05:00
fc7a7063c2 fix
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-23 17:08:52 -05:00
66311b3f67 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-23 17:07:03 -05:00
7833677738 cleanup 2024-08-23 17:01:05 -05:00
c0be6765ab updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-23 16:54:00 -05:00
46490f9930 refactor
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-23 14:55:08 -05:00
9ede9f5cf5 refactor 2024-08-23 14:54:17 -05:00
00a5f155ad refactor 2024-08-23 14:51:50 -05:00
b6eab4a932 fix 2024-08-23 14:49:27 -05:00
d5d2b6a889 fix 2024-08-23 14:46:26 -05:00
51320f9a09 refactor 2024-08-23 14:39:27 -05:00
31e0b4c5d9 refactor 2024-08-23 14:32:20 -05:00
bc0901f6a2 refactor 2024-08-23 14:25:14 -05:00
3b4c590404 spelling 2024-08-23 14:15:08 -05:00
953684f5a6 fix 2024-08-23 14:13:46 -05:00
989c90bc8d fix 2024-08-23 14:12:29 -05:00
776862d474 updated build system 2024-08-23 14:12:02 -05:00
1ec287f41a refactor 2024-08-23 13:04:03 -05:00
01ed0c65bb refactor 2024-08-23 13:01:57 -05:00
9bed5e961f refactor 2024-08-23 12:54:48 -05:00
f8e7e8f0e3 time fixes 2024-08-23 12:52:42 -05:00
9e9d46a9cd time fixes 2024-08-23 12:41:35 -05:00
f654d269a7 updated build system 2024-08-23 12:35:48 -05:00
c8929fed0b fix 2024-08-23 12:12:05 -05:00
81fbe7a962 updates 2024-08-23 12:08:40 -05:00
3bce0e9c70 refactor 2024-08-23 12:03:40 -05:00
d4f0431cd5 updated build system 2024-08-23 12:01:46 -05:00
52f2b5b118 refactor 2024-08-23 11:35:51 -05:00
dfc8742fcb spelling 2024-08-23 10:23:51 -05:00
cf516d8663 spelling 2024-08-23 10:20:46 -05:00
e8af147805 spelling 2024-08-23 10:19:41 -05:00
2835809e5e refactor 2024-08-23 10:19:01 -05:00
bc0d299b85 refactor 2024-08-23 10:13:32 -05:00
13c136d01e refactor 2024-08-23 10:12:33 -05:00
218326f812 refactor 2024-08-23 10:12:02 -05:00
6dc10d2a11 updated build system 2024-08-23 10:01:31 -05:00
4eff7aae64 updated build system 2024-08-23 09:34:41 -05:00
bc85e34310 updated build system 2024-08-23 08:58:46 -05:00
254578f4ab updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-22 14:55:56 -05:00
d5aa5c124c updated build system 2024-08-22 14:47:43 -05:00
497b424840 updated build system 2024-08-22 14:35:56 -05:00
1236bf1829 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-20 15:02:13 -05:00
aa9c7d1ec1 updated build system 2024-08-20 11:00:37 -05:00
c5d3453c1f refactor 2024-08-20 10:24:11 -05:00
71112d4977 refactor 2024-08-20 10:08:43 -05:00
ba3c6d78cb updated build system 2024-08-20 10:00:11 -05:00
eb3ad67819 updated build system 2024-08-20 09:42:49 -05:00
cc51ae61e4 updated build system 2024-08-20 09:33:09 -05:00
b1fd78ebe3 updated build system 2024-08-20 09:30:41 -05:00
7d0af3fb04 updated build system 2024-08-20 09:16:49 -05:00
f8e9176538 updated build system 2024-08-20 08:57:38 -05:00
734dab801d updated build system 2024-08-20 08:48:29 -05:00
d83de7bb91 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-12 19:35:18 -05:00
52cc40b4cf updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-10 12:27:47 -05:00
1e854aa368 win32 fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-10 12:24:37 -05:00
3b19713111 fuse test changes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-09 20:42:42 -05:00
83e66e2a1d updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-09 11:59:15 -05:00
a9c2af1c5f updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-09 09:33:33 -05:00
74d96745bf fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-08 21:05:22 -05:00
ebe78d1fbd updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-08 20:11:53 -05:00
f2dc325774 updated build system 2024-08-08 19:33:16 -05:00
7977b4b304 updated build system 2024-08-08 19:20:38 -05:00
e1ac9efaaa refactor 2024-08-08 19:03:55 -05:00
0b5efef569 updated build system 2024-08-08 18:59:14 -05:00
6e4ae2896b fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-07 21:07:45 -05:00
ca97620b44 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-07 20:59:13 -05:00
efb2be5839 fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-07 19:58:51 -05:00
33fa52f5a4 updated build system and fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-07 15:01:07 -05:00
eaae2fea77 fixes 2024-08-07 13:12:56 -05:00
b4999323da fix 2024-08-07 11:31:19 -05:00
1cdc174207 fix 2024-08-07 11:27:21 -05:00
8262c2db29 fix 2024-08-07 11:23:24 -05:00
dfd239c30d fix 2024-08-07 11:19:21 -05:00
37b1e156d4 fix 2024-08-07 11:14:31 -05:00
1751847ec2 fix 2024-08-07 11:07:37 -05:00
f878a7b760 refactor 2024-08-07 11:04:21 -05:00
f9a8751a57 fixes 2024-08-07 11:03:35 -05:00
f73c706b8b fix 2024-08-07 10:50:03 -05:00
1f4de69ead fix 2024-08-07 10:42:17 -05:00
2b35df4d64 fix 2024-08-07 10:40:48 -05:00
eddc6bb67c updated build system 2024-08-07 10:38:34 -05:00
9d3e4b8767 fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-05 19:51:50 -05:00
cbb99c7b47 fixes 2024-08-05 19:50:48 -05:00
dca0752189 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-05 19:38:13 -05:00
760a1e4322 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 19:51:35 -05:00
56bc78f63c updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-04 19:18:39 -05:00
60b89c5c08 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 19:12:42 -05:00
fa0f648a0b cleanup
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 18:34:15 -05:00
5592c663a4 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 17:06:00 -05:00
c847353baf updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 16:58:28 -05:00
a140f59acb updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 14:11:39 -05:00
b2eae73fb0 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 13:57:00 -05:00
a34dc8f1f8 updated build system 2024-08-04 13:38:48 -05:00
92e2937a6b updated build system 2024-08-04 13:29:19 -05:00
47757f69bd updated build system 2024-08-04 13:27:55 -05:00
b642294193 updated build system 2024-08-04 13:21:29 -05:00
8075af364f updated build system 2024-08-04 13:18:42 -05:00
3d7285063a updated build system 2024-08-04 13:13:45 -05:00
232420621a updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-04 13:12:16 -05:00
a0432be819 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 12:42:23 -05:00
468093227d updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-04 12:31:36 -05:00
32facdc2ff updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 11:02:17 -05:00
3a719272cb updated build system 2024-08-04 10:37:31 -05:00
9ce4c5a494 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-04 10:30:49 -05:00
15cc7b0b87 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-04 09:55:01 -05:00
6d152181d3 fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-08-03 16:11:25 -05:00
97082fa42c fixes 2024-08-03 16:09:14 -05:00
becd137cf5 updated build system 2024-08-03 15:55:38 -05:00
89fc0fb372 fixes
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-03 15:50:16 -05:00
68d79c73cf updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-03 14:10:15 -05:00
d0e9ed4181 fix 2024-08-03 14:00:14 -05:00
535d2f85ca updated build system 2024-08-03 13:54:18 -05:00
5ec20fbcbd updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-03 13:44:02 -05:00
0225fb8e5d updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-03 12:24:22 -05:00
035f830b71 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-03 12:15:08 -05:00
7a1fb4a790 updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-08-03 11:00:57 -05:00
4939b05ca7 updated build system 2024-08-03 10:57:56 -05:00
2e1f0c8f5f updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-03 10:55:25 -05:00
d8ac596687 updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-08-03 10:33:39 -05:00
1f43ab3bcc updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-03 10:28:17 -05:00
ef9fbf775c fix
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-03 07:37:32 -05:00
d6ff728a4d updated build system 2024-08-03 07:33:30 -05:00
f6ea8f077b updated build system 2024-08-03 07:28:10 -05:00
3e96764fc4 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-03 07:20:37 -05:00
45b21ae0af updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-03 07:19:32 -05:00
490e49406f updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-03 00:04:04 -05:00
36e7d06b39 updated build system 2024-08-03 00:02:12 -05:00
b26b52fd2d updated build system 2024-08-02 23:28:33 -05:00
b35041f1f3 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 23:27:05 -05:00
bf7ba3991f updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 23:11:38 -05:00
30806c6ebd updated build system 2024-08-02 23:07:48 -05:00
29af6e5b7c updated build system 2024-08-02 23:02:32 -05:00
cde0e92591 updated build system 2024-08-02 22:58:05 -05:00
85b28f7ee3 cleanup 2024-08-02 22:45:35 -05:00
df24b99303 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 22:41:42 -05:00
d659a5e04d updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-08-02 22:34:01 -05:00
99c0246720 updated build system 2024-08-02 21:41:44 -05:00
c0dba76ecd fixes 2024-08-02 21:30:17 -05:00
e37a375c18 fix 2024-08-02 21:01:21 -05:00
6718eb374d fix 2024-08-02 20:59:41 -05:00
bba7f10703 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build started...
2024-08-02 19:46:19 -05:00
df947db055 updated build system 2024-08-02 19:43:21 -05:00
256e873e7b updated build system 2024-08-02 19:42:49 -05:00
34bc3b759e updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 19:42:05 -05:00
853aa2784c updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 19:23:42 -05:00
4011ab8080 fix 2024-08-02 19:21:05 -05:00
07eaad7226 update 2024-08-02 18:59:30 -05:00
c743d3c341 updated build system 2024-08-02 18:57:35 -05:00
05a5645f4c update 2024-08-02 18:52:33 -05:00
7aa71fb202 updated build system 2024-08-02 18:52:00 -05:00
6410faa5b4 update
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 18:45:52 -05:00
a3e578240b updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 18:45:17 -05:00
dd492ff52d updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 17:18:09 -05:00
e7b576bc45 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 16:33:52 -05:00
7fcc40d0e1 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 16:22:46 -05:00
e6fc6093b2 added test 2024-08-02 16:10:07 -05:00
73ee70a862 fix 2024-08-02 16:04:04 -05:00
b647053fb9 updated build system 2024-08-02 15:43:36 -05:00
d518e55a67 updated build system 2024-08-02 15:34:01 -05:00
fcd38db2ef updated build system 2024-08-02 15:22:01 -05:00
89cd8c8fd0 test fixes 2024-08-02 15:10:59 -05:00
88c7e7f192 fixs 2024-08-02 14:55:29 -05:00
a00e77d554 refactor 2024-08-02 14:54:29 -05:00
05d5bd9fe5 fixes 2024-08-02 14:46:01 -05:00
e14e7e96c7 updated build system 2024-08-02 14:39:45 -05:00
4b8ac300c8 update 2024-08-02 14:23:36 -05:00
ee9c5fffad fix
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 14:15:56 -05:00
55caf049b1 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 14:09:57 -05:00
4bdaeaa30d refactor 2024-08-02 14:09:20 -05:00
7c58d9c569 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 14:06:25 -05:00
d6b2c1d81e updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 14:02:14 -05:00
4a2acf99a7 updated build system 2024-08-02 13:14:29 -05:00
3567941139 updated build system 2024-08-02 13:10:05 -05:00
50e7fb612c refactor 2024-08-02 13:08:03 -05:00
03dd9ee579 refactor 2024-08-02 13:05:15 -05:00
2a3c6f3522 updated build system 2024-08-02 13:01:00 -05:00
2e46f2fead cleanup 2024-08-02 12:59:29 -05:00
b00b72d70f updated build system 2024-08-02 12:58:44 -05:00
7dbaf9b8d9 updated build system 2024-08-02 12:57:40 -05:00
6b463adbb9 updated build system 2024-08-02 12:53:12 -05:00
cb819d7da6 updated build system 2024-08-02 12:51:39 -05:00
841ba37841 updated build system 2024-08-02 12:50:19 -05:00
7cfefbc512 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 12:47:29 -05:00
9ebba7252c updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 12:37:55 -05:00
835c56330a update
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 12:19:01 -05:00
3e5c70e6b4 refactor 2024-08-02 12:15:15 -05:00
95b88b6ac6 updated build system 2024-08-02 12:11:45 -05:00
c1f39afaa3 updated build system 2024-08-02 12:10:55 -05:00
1893f7204e refactor 2024-08-02 12:05:51 -05:00
4a062abfde updated build system 2024-08-02 12:03:33 -05:00
fb26aa04b6 updated build system 2024-08-02 12:01:25 -05:00
7c538b471d updated build system 2024-08-02 11:56:58 -05:00
c4c1941fc8 updated build system 2024-08-02 11:46:51 -05:00
0ce2be24a3 updated build system 2024-08-02 11:44:51 -05:00
3cf60d0d26 updated build system 2024-08-02 11:34:45 -05:00
7d33ee80d0 update 2024-08-02 11:32:54 -05:00
52ba2de51f refactor 2024-08-02 11:31:59 -05:00
a1b8b57d34 cleanup
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-08-02 11:30:12 -05:00
cf9e0a356c updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-08-02 11:25:14 -05:00
e66b783df8 updated build system 2024-08-02 11:24:30 -05:00
b695200123 updated build system 2024-08-02 11:14:44 -05:00
a383fb405e updated build system 2024-08-02 11:14:28 -05:00
1cebaf83e1 updated build system 2024-08-02 10:57:34 -05:00
4976825bd6 updated build system 2024-08-02 10:56:40 -05:00
098d172f40 updated build system 2024-08-02 10:53:11 -05:00
f4a3c52428 refactor 2024-08-02 10:29:31 -05:00
2d60b637ec refactor 2024-08-02 10:00:14 -05:00
79b16d9a34 refactor 2024-08-02 09:58:16 -05:00
d69f2fd321 refactor 2024-08-02 09:52:12 -05:00
4015c1bb6e refactor 2024-08-02 09:50:53 -05:00
9f76f20ea8 refactor 2024-08-02 09:32:26 -05:00
b399ff3291 refactor 2024-08-02 09:30:41 -05:00
4fafc17b90 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-28 13:31:30 -05:00
f1bb88624b updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-28 12:40:51 -05:00
f950e3192f updated build system 2024-07-28 12:33:26 -05:00
bef2f078e0 updated build system 2024-07-28 12:10:26 -05:00
218053a2be updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-07-28 11:50:19 -05:00
baca904079 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-28 11:48:01 -05:00
b5175cb82b updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-28 09:52:58 -05:00
39888a1ebc updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-28 09:27:35 -05:00
ffea22c71b updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 16:31:45 -05:00
dd15bb2205 updated build system 2024-07-27 15:54:01 -05:00
4b53b5544f updated build system 2024-07-27 15:53:45 -05:00
24ca2d3531 updated build system 2024-07-27 15:27:36 -05:00
5587e3430b updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-07-27 15:15:05 -05:00
0c36669fef updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 15:10:30 -05:00
bbce86cb9d updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 11:24:19 -05:00
ed3a45bfc6 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 10:22:56 -05:00
144fd59c1c updated build system 2024-07-27 10:17:14 -05:00
bdc54d7115 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-07-27 10:11:59 -05:00
aa04371663 updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-07-27 10:00:59 -05:00
78ef412516 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 09:32:01 -05:00
28f7f5cb14 cleanup
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 09:17:34 -05:00
624b92bc97 enable backward-cpp for test 2024-07-27 09:14:51 -05:00
ca799298f4 switch to backward-cpp 2024-07-27 09:13:43 -05:00
42b67a7b61 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 09:00:11 -05:00
4de4386142 fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-27 08:42:14 -05:00
509eeca760 fix test dir
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-07-27 08:38:50 -05:00
1cb9663776 fix
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-07-27 08:36:59 -05:00
26667fdcd6 fix
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-07-27 08:28:23 -05:00
681a3eec53 fixes 2024-07-27 08:23:20 -05:00
2a5df890f7 fix sign 2024-07-27 08:13:23 -05:00
ae0059591c fix directory caching 2024-07-27 08:12:43 -05:00
8655becf1e fix directory caching 2024-07-27 07:54:46 -05:00
2a3a0aa689 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 17:11:48 -05:00
ce417ec7c8 fix
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-07-26 17:08:49 -05:00
4e848a998e fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 16:56:58 -05:00
d89f35775e fix crash
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 16:54:01 -05:00
88ebf72003 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 15:15:28 -05:00
9437b175a2 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 15:08:41 -05:00
302d73a078 unmount if initilization fails 2024-07-26 14:54:05 -05:00
ba7c36e30e updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 14:43:06 -05:00
b4da43c87f added override.sh support
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 12:28:21 -05:00
f5e078ea3d updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 12:21:42 -05:00
8aba39c955 optional stack trace support
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 09:23:21 -05:00
68a5f90715 added cpptrace 2024-07-26 08:07:10 -05:00
f3dfadddfa added cpptrace 2024-07-26 07:54:29 -05:00
f1ec1fd4a6 format log message
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-26 07:22:15 -05:00
cf59db9cee fix logging
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-25 20:42:57 -05:00
e21fbe84ba fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-25 19:02:34 -05:00
1e4d675f76 added todo
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-25 15:02:26 -05:00
e02fe870e9 fix 2024-07-25 14:58:16 -05:00
9ef9250c18 moved event to debug 2024-07-25 14:46:51 -05:00
2e4b9d3787 added flush policy 2024-07-25 14:43:16 -05:00
fd2b3c3239 fix 2024-07-25 14:38:27 -05:00
6640394bd3 fix 2024-07-25 14:21:20 -05:00
84cc726c4f don't register loggers 2024-07-25 14:18:31 -05:00
5d99d21915 refactor 2024-07-25 13:58:27 -05:00
3b8636544a refactor logging 2024-07-25 13:55:30 -05:00
14ce60ab65 fix 2024-07-25 13:38:37 -05:00
7506431b34 fix 2024-07-25 13:31:48 -05:00
8621209eb3 fix 2024-07-25 13:30:48 -05:00
d1fe317fb9 refactor console consumer 2024-07-25 13:24:54 -05:00
a5c47d3f22 updated build system 2024-07-25 13:01:03 -05:00
267c272ce5 changed thread count 2024-07-25 12:31:12 -05:00
7a8ae32b85 refactor 2024-07-25 12:30:16 -05:00
921d404a5a switch to spdlog 2024-07-25 12:28:47 -05:00
de6a7beb5e refactor 2024-07-25 12:17:12 -05:00
5a928208fd added spdlog 2024-07-25 10:55:48 -05:00
92fc163341 fix 2024-07-25 10:47:26 -05:00
ca1e03f3ea logging changes 2024-07-25 10:46:29 -05:00
de8c3ad603 fix 2024-07-25 10:27:25 -05:00
f7d56bdd48 refactor 2024-07-25 10:19:50 -05:00
afc13b45f4 refactor 2024-07-25 10:16:17 -05:00
11d2c3c69e updated build system 2024-07-25 09:31:01 -05:00
356521e176 updated build system 2024-07-25 09:26:32 -05:00
468668e518 updated build system 2024-07-25 07:21:01 -05:00
e53dec7bab updated build system 2024-07-25 07:09:45 -05:00
26cd6de110 updated build system 2024-07-25 06:58:50 -05:00
d1157ca261 updated build system 2024-07-25 06:50:56 -05:00
0d49b49482 updated build system 2024-07-25 06:49:11 -05:00
753820bd81 updated build system 2024-07-25 06:45:38 -05:00
2a98e44a5c updated build system 2024-07-25 06:37:36 -05:00
9650d3f56b updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-24 19:38:51 -05:00
aff308f67d updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-07-24 19:35:43 -05:00
be76d663b5 update
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-07-24 18:27:10 -05:00
160863561f updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-07-23 11:49:23 -05:00
de02fdb812 updated build system 2024-07-23 10:57:31 -05:00
1dda98e337 fix test data location 2024-07-23 09:20:56 -05:00
ccc6afdfa4 updated build system 2024-07-23 09:14:36 -05:00
6b166551af updated build system 2024-07-23 09:11:01 -05:00
90694f816f updated build system 2024-07-23 08:15:44 -05:00
51636fbac3 fix 2024-07-23 08:00:48 -05:00
3c7aa417a9 updated build system 2024-07-23 07:51:09 -05:00
04d560739d updated build system 2024-07-23 07:48:34 -05:00
2c1842f06c updated build system 2024-07-23 07:13:55 -05:00
aba487277c updated build system 2024-07-22 15:26:32 -05:00
1b95d5dfed updated build system 2024-07-22 15:19:43 -05:00
7590fc4f45 fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory/pipeline/head This commit looks good
2024-07-17 17:27:48 -05:00
a409408ac0 fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-07-17 17:21:27 -05:00
b121c9778f fix 2024-07-17 17:19:30 -05:00
d452761ff9 fix permissions
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-07-17 17:08:38 -05:00
dbc5725779 fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-07-17 13:58:31 -05:00
8b6536c55b fix 2024-07-17 13:57:08 -05:00
c7318b0383 const refactor 2024-07-17 13:53:56 -05:00
26fa85e421 updated build system 2024-07-17 12:28:20 -05:00
939742a991 updated build system 2024-07-17 12:22:44 -05:00
6ab7386a79 updated build system 2024-07-17 09:18:04 -05:00
a750cdc3cb updated build system 2024-07-17 09:02:14 -05:00
2f8af0fb08 updated build system 2024-07-17 08:59:06 -05:00
7a9802ccb7 updated build system 2024-07-17 08:05:37 -05:00
d356d04bf5 updated build system 2024-07-17 07:54:51 -05:00
c99c4988ff fix 2024-07-16 14:29:02 -05:00
6c564eb98b updated version.rc 2024-07-16 14:28:17 -05:00
786d8634cf updated build system 2024-07-16 14:17:00 -05:00
70b5204a9f updated build system 2024-07-16 14:00:12 -05:00
1d70309a16 updated build system 2024-07-16 13:50:25 -05:00
b2aba8c447 updated build system 2024-07-16 13:19:07 -05:00
8757b47b35 updated build system 2024-07-16 13:04:21 -05:00
b1a7632536 updated readme 2024-07-16 10:58:53 -05:00
97c73d5358 fix 2024-07-16 10:52:42 -05:00
bb3f05aef1 fix 2024-07-16 10:50:46 -05:00
2001ffc27c fix 2024-07-16 09:51:46 -05:00
bd2dd4035e isolate test directory 2024-07-16 09:46:13 -05:00
7eb793f577 fix test 2024-07-16 09:27:26 -05:00
b05cedb509 refactor 2024-07-16 09:17:59 -05:00
cd484aa7bb isolate test directory 2024-07-16 09:16:59 -05:00
fbfb528adc fix 2024-07-16 09:01:05 -05:00
d9cba7f4cc fix 2024-07-16 08:58:22 -05:00
7d5c5e18c6 isolate test directory 2024-07-16 08:54:41 -05:00
2c0935a771 isolate test directory 2024-07-16 08:13:13 -05:00
5312797b97 refactor 2024-07-16 08:04:49 -05:00
801af6b799 fix test 2024-07-16 07:52:49 -05:00
b42379b519 updated script 2024-07-16 07:51:35 -05:00
8b328b92b1 added post_build.sh 2024-07-16 07:49:16 -05:00
2e6ecf8ddb added test data to distribution 2024-07-16 07:48:13 -05:00
12c7c48b20 updated build system 2024-07-15 13:22:06 -05:00
732a42a073 refactor preprocessor directives 2024-07-15 13:19:27 -05:00
5638d5c010 fix 2024-07-15 13:12:14 -05:00
6a984ac84c refactor proprocessor directives 2024-07-15 12:20:15 -05:00
c1eb6b94ed updated build system 2024-07-15 11:11:11 -05:00
85135b9267 updated build system
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-07-11 20:38:02 -05:00
670c5bac17 updated build system
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-07-11 20:27:02 -05:00
2dab1426b4 fix permissions
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-07-11 19:54:31 -05:00
43004b19c3 updated build system
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-07-11 14:10:43 -05:00
4044d95aaa updated build system 2024-07-11 13:56:36 -05:00
c6024c06ce fix 2024-07-11 13:01:06 -05:00
e56bcb6489 updated build system 2024-07-11 12:31:50 -05:00
d9e0164080 updated build system 2024-07-11 11:42:06 -05:00
b588cd645e updated build system 2024-07-11 09:28:07 -05:00
2c163d7219 updated build system 2024-07-11 09:25:32 -05:00
39c53fe903 updated public key 2024-07-11 09:12:49 -05:00
7b12d8f9e9 updated build system 2024-07-11 07:42:28 -05:00
4649f66c00 updated build system 2024-07-11 07:35:44 -05:00
9648abf4b9 fix
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-07-10 15:16:18 -05:00
cc1246d0f5 moved version.rc.in 2024-07-10 14:59:33 -05:00
726aa43a95 fix 2024-07-10 14:56:09 -05:00
224f983ca8 fix 2024-07-10 14:48:31 -05:00
f962884341 updated build system 2024-07-10 14:46:17 -05:00
6f35cc8bfa remove unused file 2024-07-10 10:14:25 -05:00
c08c9bc216 updated build system 2024-07-09 15:04:45 -05:00
239652be7c updated build system 2024-07-09 14:58:56 -05:00
68c9ec0f82 updated build system 2024-07-09 14:28:39 -05:00
da07122997 updated build system 2024-07-09 13:30:49 -05:00
5fb66dc6ee updated build system 2024-07-09 13:25:46 -05:00
0c414fc8a6 updated build system 2024-07-09 13:12:02 -05:00
097507a2d9 version handling 2024-07-09 12:38:10 -05:00
466b3fcead update build system 2024-07-09 12:22:47 -05:00
81dc6d1269 updated build system 2024-07-09 12:09:52 -05:00
b6c020d35d updated build system 2024-07-09 11:42:30 -05:00
dfbe97988f fixes 2024-07-09 08:37:31 -05:00
cd36679a1c update build system 2024-06-27 12:12:09 -05:00
4d555bce96 updated build system 2024-06-27 12:04:37 -05:00
d96c6012c5 update build system 2024-06-27 08:33:54 -05:00
15793e714d update build system
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 20:17:07 -05:00
437cb94dda fix
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 18:32:21 -05:00
544765e408 refactor 2024-06-07 18:27:29 -05:00
472b1f0da1 fix data directory
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
2024-06-07 18:20:55 -05:00
867b2eee40 added back s3 enable/disable option
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 18:04:33 -05:00
5a30b15d1e update build system
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 16:15:22 -05:00
0f2c507c30 fix
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 16:09:46 -05:00
c545916332 update build system
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 14:42:23 -05:00
ac81f5f624 fix
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 11:48:28 -05:00
50ae7ab558 updated build system 2024-06-07 11:36:15 -05:00
a5e29ed745 build script changes 2024-06-07 11:26:37 -05:00
6d29170342 removed temporary scripts 2024-06-07 11:25:39 -05:00
410314022f updated build system
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
2024-06-07 10:01:58 -05:00
815e00d389 updated cmake
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 09:37:09 -05:00
fbf5455f89 renamed project 2024-06-07 09:34:44 -05:00
8925704555 build system update
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-07 09:32:43 -05:00
462365dc97 updated build system
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-06 18:22:05 -05:00
e73dd52973 updated changelog
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-06-06 14:32:36 -05:00
881eec4e02 updates 2024-06-06 14:31:41 -05:00
bcdfc73767 remove rc 2024-06-06 14:26:16 -05:00
0520aa3d40 fixes 2024-06-06 14:24:28 -05:00
c562d17b78 update 2024-06-06 14:19:30 -05:00
aee68520b3 move to new build system 2024-06-06 14:17:47 -05:00
88d8bf63f5 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-04-21 14:25:00 -05:00
303887ea37 update
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-03-15 18:06:27 -05:00
51d3d33175 changed sqlite db options
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-03-11 09:15:46 -05:00
cdb5ea279d cleanup
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-02-08 22:12:20 -06:00
311e1b318a updated mingw64 docker 2024-02-08 22:06:54 -06:00
31c5b6f1db Merge branch 'development' of https://git.fifthgrid.com/blockstorage/repertory into development
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-02-05 07:21:45 -06:00
a024f81e5d fix runaway thread
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2024-02-03 10:41:38 -06:00
4089fca87c msys2 support 2024-01-30 13:23:14 -06:00
99533a9687 revert
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2024-01-29 11:36:26 -06:00
d175a38ad1 revert
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-01-29 11:30:39 -06:00
28e918be18 fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-01-29 11:22:41 -06:00
b4403ff959 Merge branch 'development' of ssh://git.fifthgrid.com:3022/blockstorage/repertory into development
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-01-29 11:20:47 -06:00
8c548bad92 Merge branch 'development' of ssh://git.fifthgrid.com:3022/blockstorage/repertory into development 2024-01-29 11:18:24 -06:00
6ecad9af72 fix windows build
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2024-01-29 10:54:57 -06:00
df73f9a18f fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-01-29 09:48:02 -06:00
9b453327a8 fix download path
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-01-29 08:00:50 -06:00
071552ffd5 updated zlib
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2024-01-29 07:57:33 -06:00
33a0b4b295 fix unittests link on mingw64
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2024-01-27 12:34:43 -06:00
21bcd0780c fix unittests build on mingw64 2024-01-27 12:31:21 -06:00
f6cdf2914c mingw64 build fixes 2024-01-27 12:21:37 -06:00
7698a62c1f updated mingw64 build 2024-01-27 11:51:35 -06:00
2ae22cdb30 fixes
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-22 21:44:52 -06:00
7705432820 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-20 13:13:52 -06:00
f150832676 default to release 2023-12-20 12:12:22 -06:00
80c9375d65 fix 2023-12-20 12:05:59 -06:00
48ddff9e85 default to release 2023-12-20 11:59:41 -06:00
6f64fe02d5 address compiler warning 2023-12-18 09:15:28 -06:00
61ab4d8d58 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-15 18:52:14 -06:00
3bb962a266 cleanup
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-15 18:46:35 -06:00
c286dc4f5c refactoring
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-15 18:35:07 -06:00
9d36ded2b3 fix
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-15 18:30:33 -06:00
71686405e0 refactoring
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-12-15 17:58:49 -06:00
34c4a9c508 refactoring
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-15 09:01:45 -06:00
effafd3e91 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-14 13:51:48 -06:00
5a61bdf2b0 fix compiler warnings
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-14 13:45:08 -06:00
d21fcfd1c6 windows compiler warnings
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-14 09:37:58 -06:00
fff9a27362 cleanup
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
2023-12-14 09:17:15 -06:00
ad7872a0e3 refactor
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-14 09:11:49 -06:00
f3ea2ccc21 fix warnings 2023-12-14 09:06:30 -06:00
e959a9e795 fix 2023-12-14 09:00:21 -06:00
3fe5eac56d fix 2023-12-14 08:58:33 -06:00
67191be78d fix encryption provider 2023-12-14 08:55:04 -06:00
00cfb67b64 fix file read 2023-12-14 08:46:44 -06:00
35aa8f5a94 fix scripts
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-13 20:12:18 -06:00
f44972b8b3 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-13 15:32:30 -06:00
94675a3011 refactor 2023-12-13 15:22:19 -06:00
7112fbee7e refactor 2023-12-13 15:21:21 -06:00
ff13633962 refactor 2023-12-13 14:57:08 -06:00
cb93e34de0 refactor 2023-12-13 14:53:39 -06:00
883968f53e refactor 2023-12-13 14:50:19 -06:00
d6d4b579c9 fix encryption provider 2023-12-13 13:34:21 -06:00
0e83d84360 fix encription provider 2023-12-13 10:02:05 -06:00
63a6b3bdba address windows compiler warnings
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-12 14:48:52 -06:00
aafa7e112a fix 2023-12-12 13:14:59 -06:00
804eb7aa5a fix 2023-12-12 13:11:46 -06:00
eeba641732 windows build script 2023-12-12 13:06:31 -06:00
932ea6cb1d fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-10 20:04:49 -06:00
dd4724e374 refactor
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-12-10 19:40:38 -06:00
e652c9956e address warnings
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-12-10 17:02:02 -06:00
d11767776e fix
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 16:59:48 -06:00
daefa58c0c code reorg
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-12-10 16:53:54 -06:00
7fe7299e7c refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-10 16:21:01 -06:00
0af9c6e8b0 updated json
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-10 14:27:34 -06:00
b9c2113d43 test refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 14:09:53 -06:00
4fd23de9b6 prepare for 2024
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 14:06:54 -06:00
3b372ebe86 prepare for 2024 2023-12-10 14:06:17 -06:00
d14d149a3b fix test 2023-12-10 14:03:09 -06:00
44acf7dace fix test 2023-12-10 14:02:10 -06:00
da7efdb1a8 cleanup
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 13:41:18 -06:00
444f39f9ff refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 13:38:44 -06:00
fd9c26f016 updated changelog
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 13:03:22 -06:00
7ef9f5cd65 removed binaries
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-12-10 13:02:10 -06:00
d3321b3c57 updated changelog 2023-12-10 12:22:34 -06:00
bbe546008f updated version
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-10 12:19:55 -06:00
5ec91e2d20 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-12-01 11:12:58 -06:00
fbe4df0251 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 17:36:26 -06:00
e5c690eb89 added curl error event
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 16:30:09 -06:00
aeedd114a6 refactoring
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 16:07:16 -06:00
dfa5e0e005 unit tests and fixes
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 13:32:06 -06:00
5911d370e5 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 13:15:16 -06:00
baf769c462 close all files in background
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 13:10:32 -06:00
33e8e0890b test fixes
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 12:54:00 -06:00
e2e82edefb script changes 2023-11-30 10:52:11 -06:00
da1b5c6953 refactor boost build
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 10:44:40 -06:00
629725e262 build fixes
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-30 10:40:29 -06:00
6ba4c0091b fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-30 09:24:51 -06:00
99d5261aab updates 2023-11-30 09:19:09 -06:00
97487cf0c4 updates 2023-11-30 09:18:10 -06:00
8436f2e2bb refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-19 18:02:28 -06:00
310e436163 fix crash
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-19 17:58:51 -06:00
b64477fd7e updated CHANGELOG.md
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-19 11:43:06 -06:00
782da43114 updated CHANGELOG.md
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-19 11:40:40 -06:00
37854b693b refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-19 00:19:28 -06:00
7360b72c7b fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 23:54:51 -06:00
6f68f268c0 fix
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-18 23:54:13 -06:00
983587aeb7 fix deadlock
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 23:53:03 -06:00
ee415d2e4a refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 23:01:49 -06:00
0c075d7fe4 fix
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-18 22:55:50 -06:00
eec3653c6b refactor
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 22:47:07 -06:00
5ac2a24611 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 20:05:34 -06:00
144683d7b3 cleanup
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-18 19:23:52 -06:00
9c917a9119 enable s3 test
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-18 19:08:14 -06:00
dc48b84191 fix truncate
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-18 19:07:53 -06:00
8555d31ddf refactor
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-18 18:19:57 -06:00
cb0dde2a80 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 17:38:48 -06:00
5f5b1f751b fix
Some checks reported errors
BlockStorage/repertory_osx_builds/pipeline/head Something is wrong with the build of this commit
BlockStorage/repertory_linux_builds/pipeline/head Something is wrong with the build of this commit
2023-11-18 17:18:03 -06:00
24c5dad929 fix lib64 directory issue 2023-11-18 17:14:38 -06:00
f0046fcd57 updated ignore list 2023-11-18 17:04:10 -06:00
3c3e415175 refactor 2023-11-18 17:03:42 -06:00
00d3355f43 updated openssl 2023-11-18 16:56:37 -06:00
907a14faff fix tests
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 16:34:40 -06:00
4348e89f99 refactor tests
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-18 15:34:43 -06:00
7a24cc54f8 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-16 08:08:03 -06:00
80f6e3c272 extract common behavior
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-15 20:54:28 -06:00
edb1297c4a fix boost version
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-15 19:56:44 -06:00
1ee157f943 switch to storj for binary hosting
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-15 19:17:21 -06:00
1b2981b06e removed logs
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-14 20:34:43 -06:00
7203fefd33 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-14 20:28:47 -06:00
d808b2dd19 refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-14 20:09:50 -06:00
ee34a1e361 extract common behavior
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-14 19:49:46 -06:00
1766f91697 extract common behavior
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-14 18:35:18 -06:00
b3aa28d085 refactor
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-14 18:26:00 -06:00
a605d7af11 Merge branch 'development' of ssh://git.fifthgrid.com:3022/BlockStorage/repertory into development
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-14 18:24:27 -06:00
19b1a33c48 extract common behavior 2023-11-14 18:20:11 -06:00
04aa511448 Address compiler warnings #10
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 19:44:58 -06:00
8dc3d4466b refactor 2023-11-12 19:43:52 -06:00
0716a58ff0 Address compiler warnings #10
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 19:36:00 -06:00
60052081b4 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 14:36:02 -06:00
f11d49b264 fix test
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-12 14:34:58 -06:00
103dae6d08 unit tests and fixes
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-12 14:33:19 -06:00
821ed7b25e fix test 2023-11-12 14:27:11 -06:00
87f83b6f30 fix test
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 14:08:02 -06:00
ace81d797e cleanup 2023-11-12 14:01:53 -06:00
57ca2c7c6d refactor
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 12:41:18 -06:00
8360d9e045 extract common behavior
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 12:36:44 -06:00
560ffbbb6a fix events
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-12 11:49:03 -06:00
72314606f3 extract common behavior 2023-11-12 11:45:54 -06:00
db009b69dd fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-11 21:24:15 -06:00
3ed99dc0ce cleanup
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-11 21:17:07 -06:00
762a7c99d5 refactor s3 provider
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-11 21:15:08 -06:00
4e62156b70 added read retry to s3 provider
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-11 21:04:21 -06:00
cc49536755 fix
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-11 20:33:57 -06:00
54b844dc3b fix
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
2023-11-11 20:24:21 -06:00
1e8ba13f66 s3 provider fixes
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-11-11 20:21:12 -06:00
93011cee9c refactor s3 provider
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-11-11 19:05:27 -06:00
a474a5c73c refactor s3 provider
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-11-11 18:49:15 -06:00
17b98ca99d refactor
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-11-11 18:31:49 -06:00
281eedb71e refactor s3 provider
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-11-11 16:42:38 -06:00
1ee533591c refactor s3 provider
Some checks failed
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-11-11 16:28:00 -06:00
b87e1df140 refactor s3 provider 2023-11-11 15:35:35 -06:00
f88239a13e updated changelog 2023-11-11 11:52:19 -06:00
68476cbc00 refactor s3 provider 2023-11-11 11:32:14 -06:00
f2c1f64f02 Address compiler warnings #10
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-08 19:53:12 -06:00
a7209184c8 changed number of jobs
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-11-01 13:59:36 -05:00
ba59e29499 fix build
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory/pipeline/head There was a failure building this commit
BlockStorage/repertory_osx_builds/pipeline/head There was a failure building this commit
2023-10-31 16:03:03 -05:00
f94196d865 Address compiler warnings #10
Some checks failed
BlockStorage/repertory_osx/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-30 19:33:18 -05:00
bb5a9f9737 fix
Some checks failed
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx/pipeline/head There was a failure building this commit
2023-10-30 19:08:35 -05:00
4bc5cf7c64 [require c++20] [moved to stduuid]
Some checks failed
BlockStorage/repertory_osx/pipeline/head There was a failure building this commit
BlockStorage/repertory_linux_builds/pipeline/head Build started...
2023-10-30 19:03:12 -05:00
639d14452b Address compiler warnings #10
Some checks failed
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-10-30 13:31:52 -05:00
e7413fb741 Address compiler warnings #10
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-30 12:06:07 -05:00
c0e720498d Address compiler warnings #10
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-30 11:49:56 -05:00
383c3b4be6 Address compiler warnings #10 [Wconversion] 2023-10-30 11:41:45 -05:00
e9b202f5c8 \#10 Address compiler warnings
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-30 11:07:42 -05:00
bc3005a6a4 \#10 Address compiler warnings 2023-10-30 10:59:04 -05:00
8cf19e0594 \#10 Address compiler warnings 2023-10-30 10:54:35 -05:00
b137b57dbc \#10 Address compiler warnings 2023-10-30 10:36:31 -05:00
5dff8927da build win32 last
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-30 10:04:00 -05:00
197e79dd07 fix mingw64 jenkins build
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-30 10:02:55 -05:00
6262aca761 cmake build cleanup
Some checks failed
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-10-29 20:38:13 -05:00
c156ae704b cmake build refactor
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
2023-10-29 20:21:37 -05:00
a67979ec40 cleanup build
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
2023-10-29 20:05:38 -05:00
54bfc11620 fix erroneous nodiscard
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
2023-10-29 19:45:21 -05:00
d33c2cd3a2 removed msvc compilation support
Some checks are pending
BlockStorage/repertory_linux_builds/pipeline/head Build queued...
BlockStorage/repertory_osx/pipeline/head Build queued...
2023-10-29 19:40:29 -05:00
3a5f428fb6 [boost to v1.83.0] [curl to v8.4.0] [libsodium to v1.0.19] [rocksdb to v8.6.7]
Some checks reported errors
BlockStorage/repertory_windows/pipeline/head Something is wrong with the build of this commit
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head There was a failure building this commit
2023-10-29 19:26:09 -05:00
0331152569 add zlib as project dependency
All checks were successful
BlockStorage/repertory_windows/pipeline/head This commit looks good
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-29 19:12:16 -05:00
1b7e854f5f added zlib
All checks were successful
BlockStorage/repertory_windows/pipeline/head This commit looks good
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-29 19:05:40 -05:00
12a945d863 updated version
All checks were successful
BlockStorage/repertory_osx/pipeline/head This commit looks good
BlockStorage/repertory_windows/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
2023-10-29 01:59:00 -05:00
362 changed files with 24060 additions and 30635 deletions

View File

@ -1,30 +1,10 @@
---
Checks: [
'-*',
'clang-diagnostic-*',
'clang-analyzer-*',
'bugprone-*',
'concurrency-*',
'cppcoreguidelines-*',
'modernize-*',
'readability-*',
'-readability-redundant-access-specifiers',
'-readability-function-cognitive-complexity'
]
ExtraArgs: ['-Wno-unknown-warning-option']
Checks: '-*,clang-diagnostic-*,clang-analyzer-*,bugprone-*,concurrency-*,cppcoreguidelines-*,modernize-*,readability-*,-readability-redundant-access-specifiers,-readability-function-cognitive-complexity'
ExtraArgs: '-Wno-unknown-warning-option'
FormatStyle: none
HeaderFileExtensions: ['', 'h','hh','hpp','hxx']
HeaderFilterRegex: ''
ImplementationFileExtensions: ['c','cc','cpp','cxx']
CheckOptions:
- key: MinimumExceptionNameLength
value: 1
- key: MinimumLoopCounterNameLength
value: 3
- key: MinimumParameterNameLength
value: 3
- key: MinimumVariableNameLength
value: 3
User: 'scott.e.graves@protonmail.com'
WarningsAsErrors: ''
...

View File

@ -1,5 +1,4 @@
_lseeki64
_mkgmtime
_sh_denyno
_sh_denyrd
_sh_denyrw
@ -23,7 +22,6 @@ cppflags
cpphttplib
cpptrace
cppvsdbg
create_notraverse
crypto_aead_xchacha20poly1305_ietf_npubbytes
cstdint
cxxflags
@ -31,7 +29,6 @@ cxxstd
d_largefile64_source
d_largefile_source
d_ndebug
dacl_security_information
dbackward_shared
dbghelp
dboost_root
@ -96,8 +93,6 @@ expect_streq
fallocate_impl
fext
fgetattr
fgetattr_impl
filebase
flac_version
flag_nopath
flarge
@ -120,11 +115,9 @@ icui18n
icuuc
iostreams
iphlpapi
jthread
libbitcoin
libbitcoinsystem
libcurl
libdsm
libevent
libexample
libfuse3
@ -139,15 +132,10 @@ libuuid
libuuid_include_dirs
libvlc
linkflags
lptr
lpwstr
markdownlint
mbig
msvc
msvcr120
msys2
mtune
musl-libc
nana
ncrypt
nlohmann_json
@ -159,9 +147,6 @@ oleaut32
openal_version
openssldir
pkgconfig
plarge_integer
plex
println
project_enable_fontconfig
project_enable_gtkmm
project_enable_libdsm
@ -173,15 +158,10 @@ pugixml_project
puint32
pvoid
pwstr
rdrw
remote_winfsp
renterd
richtext
rocksdb_library
rpcrt4
s_igid
s_isvtx
s_iuid
sddl_revision_1
secp256k1
secur32
@ -196,7 +176,6 @@ static-libstdc++
stbuf
stduuid_project
strequal
ularge_integer
uring
userenv
utimens_impl

View File

@ -6,7 +6,7 @@ pipeline {
environment {
DEVELOPER_PRIVATE_KEY = "/.ci/repertory/cert/developer.priv"
DEVELOPER_PUBLIC_KEY = "/.ci/repertory/cert/developer.pub"
PROJECT_TEST_CONFIG_DIR = "/.ci/repertory/test_config"
PROJECT_TEST_DIR = "/.ci/repertory/test"
}
options {
@ -52,7 +52,7 @@ pipeline {
agent any
steps {
sh 'scripts/deliver.sh /mnt/repertory "" "" "" "" 1 1'
sh 'scripts/deliver.sh /mnt/repertory "" "" "" "" 1 0'
sh 'scripts/deliver.sh /mnt/repertory "" aarch64'
sh 'scripts/deliver.sh /mnt/repertory'
}

View File

@ -18,14 +18,14 @@ if vim.env.NV_DARCULA_ENABLE_DAP then
local externalConsole = gos.is_windows
local type = "cppdbg"
local cwd = gpath.create_path("./dist/debug/shared/linux/x86_64/repertory/")
local cwd = gpath.create_path("./build")
dap.configurations.cpp = {
{
name = "Mount",
type = type,
request = "launch",
program = function()
return gpath.create_path(cwd, "bin/repertory")
return gpath.create_path(cwd, "repertory")
end,
cwd = cwd,
stopAtEntry = true,
@ -36,9 +36,8 @@ if vim.env.NV_DARCULA_ENABLE_DAP then
type = type,
request = "launch",
program = function()
return gpath.create_path(cwd, "bin/repertory_test")
return gpath.create_path(cwd, "repertory_tests")
end,
args={"--gtest_filter=utils_db*"},
cwd = cwd,
stopAtEntry = true,
externalConsole=externalConsole,

View File

@ -2,37 +2,19 @@
## v2.0.2-rc
### BREAKING CHANGES
* Refactored `config.json` - will need to verify configuration settings prior to mounting
### Issues
* \#12 \[Unit Test\] Complete all providers unit tests
* \#14 \[Unit Test\] SQLite mini-ORM unit tests and cleanup
* \#16 Add support for bucket name in Sia provider
* \#17 Update to common c++ build system
* A single 64-bit Linux Jenkins server is used to build all Linux and Windows versions
* All dependency sources are now included
* MSVC is no longer supported
* MSYS2 is required for building Windows binaries on Windows
* OS X support is temporarily disabled
* \#19 \[bug\] Rename file is broken for files that are existing
* \#23 \[bug\] Incorrect file size displayed while upload is pending
* \#24 RocksDB implementations should be transactional
* \#25 Writes should block when maximum cache size is reached
* \#26 Complete ring buffer and direct download support
* \#12 [Unit Test] Complete all providers unit tests
* Switched to common build system
### Changes from v2.0.1-rc
* Ability to choose between RocksDB and SQLite databases
* Added direct reads and implemented download fallback
* Corrected file times on S3 and Sia providers
* Corrected handling of `chown()` and `chmod()`
* Fixed erroneous download of chunks after resize
* Updated `JSON for Modern C++` to v3.11.3
## v2.0.1-rc
* Removed legacy win32 build binaries
<!-- markdownlint-disable-next-line -->
### Issues
@ -41,17 +23,16 @@
### Changes from v2.0.0-rc
* Fixed intermittent deadlock on file close
* Refactored Sia, S3 and base provider
* Fixed intermittent deadlock on file close
* Removed MSVC compilation support (MinGW-64 should be used)
* Removed legacy win32 build binaries
* Require `c++20`
* Switched to Storj over Filebase for hosting binaries
* Updated `OpenSSL` to v3.2.0
* Updated `boost` to v1.83.0
* Updated `cpp-httplib` to v0.14.2
* Updated `curl` to v8.4.0
* Updated `libsodium` to v1.0.19
* Updated `OpenSSL` to v3.2.0
## v2.0.0-rc

View File

@ -18,8 +18,6 @@ if(HAS_SETXATTR)
add_definitions(-DHAS_SETXATTR)
endif()
include(cmake/hashes.cmake)
include(cmake/versions.cmake)
include(cmake/arch.cmake)
include(cmake/os.cmake)
@ -34,9 +32,6 @@ endif()
if(PROJECT_IS_MINGW)
add_definitions(-DPROJECT_IS_MINGW)
if(PROJECT_IS_MINGW_UNIX)
add_definitions(-DPROJECT_IS_MINGW_UNIX)
endif()
endif()
if(PROJECT_REQUIRE_ALPINE)
@ -140,6 +135,7 @@ endif()
-DPROJECT_DESC=${PROJECT_DESC}
-DPROJECT_DIST_DIR=${PROJECT_DIST_DIR}
-DPROJECT_ENABLE_WIN32_LONG_PATH_NAMES=${PROJECT_ENABLE_WIN32_LONG_PATH_NAMES}
-DPROJECT_ENABLE_BACKWARD_CPP=${PROJECT_ENABLE_BACKWARD_CPP}
-DPROJECT_ENABLE_BOOST=${PROJECT_ENABLE_BOOST}
-DPROJECT_ENABLE_CPP_HTTPLIB=${PROJECT_ENABLE_CPP_HTTPLIB}
-DPROJECT_ENABLE_CURL=${PROJECT_ENABLE_CURL}
@ -148,7 +144,6 @@ endif()
-DPROJECT_ENABLE_LIBSODIUM=${PROJECT_ENABLE_LIBSODIUM}
-DPROJECT_ENABLE_OPENSSL=${PROJECT_ENABLE_OPENSSL}
-DPROJECT_ENABLE_PUGIXML=${PROJECT_ENABLE_PUGIXML}
-DPROJECT_ENABLE_ROCKSDB=${PROJECT_ENABLE_ROCKSDB}
-DPROJECT_ENABLE_SPDLOG=${PROJECT_ENABLE_SPDLOG}
-DPROJECT_ENABLE_SQLITE=${PROJECT_ENABLE_SQLITE}
-DPROJECT_ENABLE_STDUUID=${PROJECT_ENABLE_STDUUID}

View File

@ -1,15 +1,16 @@
# Repertory
Repertory allows you to mount AWS S3 and Sia via FUSE on Linux ~~/OS X~~ or via WinFSP
Repertory allows you to mount AWS S3 and Sia via FUSE on Linux~~/OS X~~ or via WinFSP
on Windows.
## Details and Features
* Optimized for [Plex Media Server](https://www.plex.tv/)
* Single application to mount AWS S3 and/or Sia
* Remote mounting of Repertory instances on Linux ~~, OS X~~ and Windows
* Only 1 Sia mount and 1 S3 mount (per bucket) per user is supported.
* Remote mounting of Repertory instances on Linux~~, OS X~~ and Windows
* Securely share your mounts over TCP/IP (`XChaCha20-Poly1305` stream cipher)
* Cross-platform support (Linux 64-bit, Linux arm64/aarch64, ~~OS X,~~ Windows 64-bit)
* Cross-platform support (Linux 64-bit, Linux arm64/aarch64,~~OS X,~~ Windows 64-bit)
## Minimum Requirements
@ -28,70 +29,6 @@ on Windows.
* ~~OS X Mojave and above~~
* Windows 64-bit 10, 11
## Usage
### Notable Options
* `-dc`
* Display mount configuration.
* For Sia, `--name` is optional
* For S3, the `-s3` option is required along with `--name`
* `--help`
* Display all mount utility options.
* `--name, -na [name]`
* The `--name` option can be set to any valid value allowed as a file name for your filesystem.
* For Sia, the bucket name will be set to the same value if it is empty in the configuration file.
* If the `--name` option is not specified, `default` will be used.
* For S3, the `--name` option is required and does not affect the bucket name.
* `-set SiaConfig.Bucket`
* Set Sia bucket name for the mount.
* Can be used in combination with `--name` to target a unique configuration.
* `-set S3Config.Bucket`
* S3 bucket name for the mount.
* Must be used in combination with `--name` to target a unique configuration.
* Must be used in combination with `-s3`.
### Sia
* Linux
* `repertory /mnt/location`
* `repertory --name default /mnt/location`
* Windows
* `repertory.exe t:`
* `repertory.exe --name default t:`
### S3
* Linux
* `repertory --name storj -s3 /mnt/location`
* Windows
* `repertory.exe --name storj -s3 t:`
## Compiling
* Successful compilation will result in all required files being placed in the `dist/` directory
* Linux
* Ensure `docker` is installed
* For x86_64:
* RelWithDebInfo: `scripts/make_unix.sh`
* Release: `scripts/make_unix.sh x86_64 Release`
* Debug: `scripts/make_unix.sh x86_64 Debug`
* For aarch64:
* RelWithDebInfo: `scripts/make_unix.sh aarch64`
* Release: `scripts/make_unix.sh aarch64 Release`
* Debug: `scripts/make_unix.sh aarch64 Debug`
* Windows
* OFFICIAL: Cross-compiling on Linux
* Ensure `docker` is installed
* RelWithDebInfo: `scripts/make_win32.sh`
* Release: `scripts/make_win32.sh x86_64 Release`
* Debug: `scripts/make_win32.sh x86_64 Debug`
* UNOFFICIAL: Compiling on Windows
* Ensure latest [MSYS2](https://www.msys2.org/) is installed
* RelWithDebInfo: `scripts\make_win32.cmd`
* Release: `scripts\make_win32.cmd x86_64 Release`
* Debug: `scripts\make_win32.cmd x86_64 Debug`
## Credits
* [boost c++ libraries](https://www.boost.org/)

View File

@ -26,7 +26,7 @@ function(set_common_target_options name)
endif()
endfunction(set_common_target_options)
function(add_project_executable2 name dependencies libraries headers sources is_win32)
function(add_project_executable2 name dependencies libraries headers sources)
if (PROJECT_WINDOWS_VERSION_RC)
list(APPEND sources ${PROJECT_WINDOWS_VERSION_RC})
endif()
@ -52,10 +52,6 @@ function(add_project_executable2 name dependencies libraries headers sources is_
if(PROJECT_ENABLE_SDL AND PROJECT_IS_MINGW)
target_link_libraries(${name} PRIVATE SDL2::SDL2main)
endif ()
if (is_win32 AND PROJECT_IS_MINGW)
target_link_options(${name} PRIVATE -mwindows)
endif()
endfunction(add_project_executable2)
function(add_project_executable name dependencies libraries)
@ -73,15 +69,7 @@ function(add_project_executable name dependencies libraries)
${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/${name}/src/*.cxx
)
if(PROJECT_ENABLE_WXWIDGETS OR PROJECT_ENABLE_SDL OR PROJECT_ENABLE_SFML OR PROJECT_ENABLE_NANA)
set(IS_WIN32 ON)
endif()
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}" "${IS_WIN32}")
if(PROJECT_ENABLE_WXWIDGETS)
target_link_libraries(${name} PRIVATE ${wxWidgets_LIBRARIES})
endif()
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}")
endfunction(add_project_executable)
function(add_project_library name dependencies libraries additional_sources)
@ -133,7 +121,7 @@ function(add_project_test_executable name dependencies libraries)
${additional_sources}
)
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}" OFF)
add_project_executable2(${name} "${dependencies}" "${libraries}" "${headers}" "${sources}")
target_compile_definitions(${name} PRIVATE -DPROJECT_TESTING)

View File

@ -1,20 +0,0 @@
set(BINUTILS_HASH ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450)
set(BOOST_HASH f55c340aa49763b1925ccf02b2e83f35fdcf634c9d5164a2acb87540173c741d)
set(BOOST2_HASH 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca)
set(CPP_HTTPLIB_HASH 405abd8170f2a446fc8612ac635d0db5947c0d2e156e32603403a4496255ff00)
set(CURL_HASH 5a231145114589491fc52da118f9c7ef8abee885d1cb1ced99c7290e9a352f07)
set(EXPAT_HASH 372b18f6527d162fa9658f1c74d22a37429b82d822f5a1e1fc7e00f6045a06a2)
set(GCC_HASH 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293)
set(GTEST_HASH 7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926)
set(ICU_HASH 925e6b4b8cf8856e0ac214f6f34e30dee63b7bb7a50460ab4603950eff48f89e)
set(JSON_HASH 0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406)
set(LIBSODIUM_HASH 8e5aeca07a723a27bbecc3beef14b0068d37e7fc0e97f51b3f1c82d2a58005c1)
set(MINGW_HASH 3f66bce069ee8bed7439a1a13da7cb91a5e67ea6170f21317ac7f5794625ee10)
set(OPENSSL_HASH e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf)
set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591)
set(PUGIXML_HASH 2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015)
set(ROCKSDB_HASH 9b810c81731835fda0d4bbdb51d3199d901fa4395733ab63752d297da84c5a47)
set(SPDLOG_HASH 9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5)
set(SQLITE_HASH 77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784)
set(STDUUID_HASH b1176597e789531c38481acbbed2a6894ad419aab0979c10410d59eb0ebf40d3)
set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c)

View File

@ -11,13 +11,13 @@ include(cmake/libraries/openssl.cmake)
include(cmake/libraries/boost.cmake)
include(cmake/libraries/backward_cpp.cmake)
include(cmake/libraries/cpp_httplib.cmake)
include(cmake/libraries/curl.cmake)
include(cmake/libraries/fuse.cmake)
include(cmake/libraries/json.cmake)
include(cmake/libraries/libsodium.cmake)
include(cmake/libraries/pugixml.cmake)
include(cmake/libraries/rocksdb.cmake)
include(cmake/libraries/spdlog.cmake)
include(cmake/libraries/sqlite.cmake)
include(cmake/libraries/stduuid.cmake)

View File

@ -0,0 +1,11 @@
if(PROJECT_ENABLE_BACKWARD_CPP AND PROJECT_BUILD)
if(PROJECT_IS_MINGW)
add_definitions(-DPROJECT_ENABLE_BACKWARD_CPP)
link_libraries(msvcr90)
else()
add_definitions(-DBACKWARD_HAS_BFD)
link_libraries(bfd)
endif()
endif()

View File

@ -18,47 +18,25 @@ if(PROJECT_ENABLE_BOOST)
if(PROJECT_BUILD)
add_definitions(-DPROJECT_ENABLE_BOOST)
if (PROJECT_ENABLE_LIBBITCOIN_SYSTEM)
find_package(Boost ${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_PATCH_VERSION} EXACT
REQUIRED
COMPONENTS
atomic
chrono
date_time
filesystem
iostreams
locale
log
log_setup
program_options
random
regex
serialization
system
thread
wserialization
)
else()
find_package(Boost ${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_PATCH_VERSION}
REQUIRED
COMPONENTS
atomic
chrono
date_time
filesystem
iostreams
locale
log
log_setup
program_options
random
regex
serialization
system
thread
wserialization
)
endif()
find_package(Boost ${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_PATCH_VERSION} EXACT
REQUIRED
COMPONENTS
atomic
chrono
date_time
filesystem
iostreams
locale
log
log_setup
program_options
random
regex
serialization
system
thread
wserialization
)
include_directories(BEFORE SYSTEM
${Boost_INCLUDE_DIRS}
@ -68,72 +46,68 @@ if(PROJECT_ENABLE_BOOST)
${Boost_LIBRARIES}
)
elseif(NOT PROJECT_IS_MINGW OR CMAKE_HOST_WIN32)
if (PROJECT_ENABLE_LIBBITCOIN_SYSTEM OR NOT CMAKE_HOST_WIN32)
if(PROJECT_CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BOOST_BUILD_TYPE_LOWER debug)
else()
set(BOOST_BUILD_TYPE_LOWER release)
endif()
if(PROJECT_IS_ARM64)
set(BOOST_ARCH arm)
else()
set(BOOST_ARCH x86)
endif()
if(PROJECT_STATIC_LINK)
set(BOOST_LINK static)
else()
set(BOOST_LINK "static,shared")
endif()
set(BOOST_BUILD_ARGS
--openssldir=$ENV{OPENSSL_ROOT_DIR}
--prefix=${PROJECT_EXTERNAL_BUILD_ROOT}
address-model=64
architecture=${BOOST_ARCH}
cxxstd=20
cxxstd-dialect=gnu
cxxflags=-std=gnu++${CMAKE_CXX_STANDARD}
cxxstd=${CMAKE_CXX_STANDARD}
define=BOOST_ASIO_HAS_STD_STRING_VIEW
define=BOOST_SYSTEM_NO_DEPRECATED
link=${BOOST_LINK}
linkflags=-std=gnu++${CMAKE_CXX_STANDARD}
threading=multi
variant=${BOOST_BUILD_TYPE_LOWER}
)
if(PROJECT_ENABLE_LIBBITCOIN_SYSTEM)
set(BOOST_URL_HASH SHA256=${BOOST2_HASH})
else()
set(BOOST_URL_HASH SHA256=${BOOST_HASH})
endif()
ExternalProject_Add(boost_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_PATCH_VERSION}.tar.gz
URL_HASH ${BOOST_URL_HASH}
BUILD_IN_SOURCE 1
LIST_SEPARATOR |
CONFIGURE_COMMAND ./bootstrap.sh
--with-libraries=atomic,chrono,date_time,filesystem,iostreams,locale,log,program_options,random,regex,serialization,system,test,thread
BUILD_COMMAND
./b2
-j1
${BOOST_BUILD_ARGS}
INSTALL_COMMAND
./b2
-j1
${BOOST_BUILD_ARGS}
install
)
list(APPEND PROJECT_DEPENDENCIES boost_project)
if (NOT CMAKE_HOST_WIN32)
add_dependencies(boost_project openssl_project)
endif()
if(PROJECT_CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BOOST_BUILD_TYPE_LOWER debug)
else()
set(BOOST_BUILD_TYPE_LOWER release)
endif()
if(PROJECT_IS_ARM64)
set(BOOST_ARCH arm)
else()
set(BOOST_ARCH x86)
endif()
if(PROJECT_STATIC_LINK)
set(BOOST_LINK static)
else()
set(BOOST_LINK "static,shared")
endif()
set(BOOST_BUILD_ARGS
--openssldir=$ENV{OPENSSL_ROOT_DIR}
--prefix=${PROJECT_EXTERNAL_BUILD_ROOT}
address-model=64
architecture=${BOOST_ARCH}
cxxstd=20
cxxstd-dialect=gnu
cxxflags=-std=gnu++${CMAKE_CXX_STANDARD}
cxxstd=${CMAKE_CXX_STANDARD}
define=BOOST_ASIO_HAS_STD_STRING_VIEW
define=BOOST_SYSTEM_NO_DEPRECATED
link=${BOOST_LINK}
linkflags=-std=gnu++${CMAKE_CXX_STANDARD}
threading=multi
variant=${BOOST_BUILD_TYPE_LOWER}
)
if(PROJECT_ENABLE_LIBBITCOIN_SYSTEM)
set(BOOST_URL_HASH SHA256=7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca)
else()
set(BOOST_URL_HASH SHA256=be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b)
endif()
ExternalProject_Add(boost_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_PATCH_VERSION}.tar.gz
URL_HASH ${BOOST_URL_HASH}
BUILD_IN_SOURCE 1
LIST_SEPARATOR |
CONFIGURE_COMMAND ./bootstrap.sh
--with-libraries=atomic,chrono,date_time,filesystem,iostreams,locale,log,program_options,random,regex,serialization,system,test,thread
BUILD_COMMAND
./b2
-j1
${BOOST_BUILD_ARGS}
INSTALL_COMMAND
./b2
-j1
${BOOST_BUILD_ARGS}
install
)
list(APPEND PROJECT_DEPENDENCIES boost_project)
add_dependencies(boost_project openssl_project)
endif()
endif()

View File

@ -10,7 +10,7 @@ if(PROJECT_ENABLE_CPP_HTTPLIB)
ExternalProject_Add(cpphttplib_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/cpp-httplib-${CPP_HTTPLIB_VERSION}.tar.gz
URL_HASH SHA256=${CPP_HTTPLIB_HASH}
URL_HASH SHA256=c125022eb85eaa12235518dc4638be93b62c3216d0f87b655af7b17b71b38851
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}
@ -24,9 +24,9 @@ if(PROJECT_ENABLE_CPP_HTTPLIB)
list(APPEND PROJECT_DEPENDENCIES cpphttplib_project)
add_dependencies(cpphttplib_project curl_project)
if (NOT CMAKE_HOST_WIN32)
add_dependencies(cpphttplib_project openssl_project)
endif()
add_dependencies(cpphttplib_project
curl_project
openssl_project
)
endif()
endif()

View File

@ -16,7 +16,7 @@ if(PROJECT_ENABLE_CURL)
ExternalProject_Add(curl_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/curl-${CURL_VERSION}.tar.gz
URL_HASH SHA256=${CURL_HASH}
URL_HASH SHA256=77c0e1cd35ab5b45b659645a93b46d660224d0024f1185e8a95cdb27ae3d787d
LIST_SEPARATOR |
CMAKE_ARGS
${PROJECT_EXTERNAL_CMAKE_FLAGS}
@ -42,8 +42,6 @@ if(PROJECT_ENABLE_CURL)
list(APPEND PROJECT_DEPENDENCIES curl_project)
if (NOT CMAKE_HOST_WIN32)
add_dependencies(curl_project openssl_project)
endif()
add_dependencies(curl_project openssl_project)
endif()
endif()

View File

@ -13,7 +13,7 @@ if(PROJECT_ENABLE_JSON)
ExternalProject_Add(json_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/json-${JSON_VERSION}.tar.gz
URL_HASH SHA256=${JSON_HASH}
URL_HASH SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}

View File

@ -1,6 +1,6 @@
if(PROJECT_ENABLE_LIBSODIUM)
if(PROJECT_BUILD)
pkg_check_modules(SODIUM libsodium>=${LIBSODIUM_VERSION} REQUIRED)
pkg_check_modules(SODIUM libsodium=${LIBSODIUM_VERSION} REQUIRED)
add_definitions(-DPROJECT_ENABLE_LIBSODIUM)
@ -15,7 +15,7 @@ if(PROJECT_ENABLE_LIBSODIUM)
else()
link_libraries(${SODIUM_LIBRARIES})
endif()
elseif(NOT PROJECT_IS_MINGW)
elseif(NOT PROJECT_IS_MINGW OR CMAKE_HOST_WIN32)
if(PROJECT_IS_MINGW)
set(LIBSODIUM_TYPE mingw64)
else()
@ -31,7 +31,7 @@ if(PROJECT_ENABLE_LIBSODIUM)
ExternalProject_Add(libsodium_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/libsodium-${LIBSODIUM_VERSION}.tar.gz
URL_HASH SHA256=${LIBSODIUM_HASH}
URL_HASH SHA256=ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19
BUILD_IN_SOURCE 1
LIST_SEPARATOR |
CONFIGURE_COMMAND ${PROJECT_3RD_PARTY_DIR}/libsodium_configure.sh

View File

@ -12,7 +12,7 @@ if(PROJECT_ENABLE_OPENSSL)
OpenSSL::Crypto
OpenSSL::SSL
)
elseif(NOT PROJECT_IS_MINGW)
elseif(NOT PROJECT_IS_MINGW OR CMAKE_HOST_WIN32)
if(PROJECT_IS_MINGW)
set(OPENSSL_COMPILE_TYPE mingw64)
elseif(PROJECT_IS_ARM64)
@ -34,7 +34,7 @@ if(PROJECT_ENABLE_OPENSSL)
ExternalProject_Add(openssl_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/openssl-${OPENSSL_VERSION}.tar.gz
URL_HASH SHA256=${OPENSSL_HASH}
URL_HASH SHA256=777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e
BUILD_IN_SOURCE 1
LIST_SEPARATOR |
CONFIGURE_COMMAND ./Configure

View File

@ -11,11 +11,11 @@ if(PROJECT_ENABLE_PUGIXML)
else()
link_libraries(pugixml::pugixml)
endif()
elseif(NOT PROJECT_IS_MINGW)
elseif(NOT PROJECT_IS_MINGW OR CMAKE_HOST_WIN32)
ExternalProject_Add(pugixml_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/pugixml-${PUGIXML_VERSION}.tar.gz
URL_HASH SHA256=${PUGIXML_HASH}
URL_HASH SHA256=2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}

View File

@ -1,34 +0,0 @@
if(PROJECT_ENABLE_ROCKSDB)
if(PROJECT_BUILD)
add_definitions(-DPROJECT_ENABLE_ROCKSDB)
find_library(ROCKSDB_LIBRARY NAMES librocksdb.a REQUIRED)
link_libraries(${ROCKSDB_LIBRARY})
elseif(NOT PROJECT_IS_MINGW OR CMAKE_HOST_WIN32)
ExternalProject_Add(rocksdb_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/rocksdb-${ROCKSDB_VERSION}.tar.gz
URL_HASH SHA256=${ROCKSDB_HASH}
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=ON
-DFAIL_ON_WARNINGS=OFF
-DPORTABLE=1
-DROCKSDB_BUILD_SHARED=OFF
-DROCKSDB_INSTALL_ON_WINDOWS=ON
-DWITH_BENCHMARK=OFF
-DWITH_BENCHMARK_TOOLS=OFF
-DWITH_CORE_TOOLS=OFF
-DWITH_EXAMPLES=OFF
-DWITH_GFLAGS=OFF
-DWITH_IOSTATS_CONTEXT=OFF
-DWITH_PERF_CONTEXT=OFF
-DWITH_TESTS=OFF
-DWITH_TOOLS=OFF
-DWITH_TRACE_TOOLS=OFF
-DWITH_ZLIB=ON
)
list(APPEND PROJECT_DEPENDENCIES rocksdb_project)
endif()
endif()

View File

@ -11,7 +11,7 @@ if(PROJECT_ENABLE_SPDLOG)
ExternalProject_Add(spdlog_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/spdlog-${SPDLOG_VERSION}.tar.gz
URL_HASH SHA256=${SPDLOG_HASH}
URL_HASH SHA256=1586508029a7d0670dfcb2d97575dcdc242d3868a259742b69f100801ab4e16b
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}

View File

@ -1,24 +1,19 @@
if(PROJECT_ENABLE_SQLITE)
if(PROJECT_BUILD)
add_definitions(-DPROJECT_ENABLE_SQLITE)
if (PROJECT_IS_MINGW AND NOT PROJECT_IS_MINGW_UNIX)
pkg_check_modules(SQLITE3 REQUIRED sqlite3>=${SQLITE2_VERSION})
include_directories(SYSTEM BEFORE ${SQLITE3_INCLUDE_DIRS})
link_libraries(${SQLITE3_LIBRARIES})
else()
set(SQLITE_SYSTEM_ROOT ${PROJECT_BUILD_DIR}/external/src/sqlite_project)
include_directories(SYSTEM BEFORE ${SQLITE_SYSTEM_ROOT})
set(SQLITE_SYSTEM_ROOT ${PROJECT_BUILD_DIR}/external/src/sqlite_project)
list(APPEND PROJECT_ADDITIONAL_SOURCES
${SQLITE_SYSTEM_ROOT}/sqlite3.c
)
endif()
elseif(NOT PROJECT_IS_MINGW OR PROJECT_IS_MINGW_UNIX)
include_directories(SYSTEM BEFORE ${SQLITE_SYSTEM_ROOT})
list(APPEND PROJECT_ADDITIONAL_SOURCES
${SQLITE_SYSTEM_ROOT}/sqlite3.c
)
else()
ExternalProject_Add(sqlite_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/sqlite-amalgamation-${SQLITE_VERSION}.zip
URL_HASH SHA256=${SQLITE_HASH}
URL_HASH SHA256=712a7d09d2a22652fb06a49af516e051979a3984adb067da86760e60ed51a7f5
CONFIGURE_COMMAND echo "No configure"
BUILD_COMMAND echo "No build"
INSTALL_COMMAND echo "No install"

View File

@ -11,7 +11,7 @@ if(PROJECT_ENABLE_STDUUID)
ExternalProject_Add(stduuid_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/stduuid-${STDUUID_VERSION}.tar.gz
URL_HASH SHA256=${STDUUID_HASH}
URL_HASH SHA256=b1176597e789531c38481acbbed2a6894ad419aab0979c10410d59eb0ebf40d3
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}

View File

@ -1,11 +1,11 @@
if (PROJECT_ENABLE_TESTING)
if(PROJECT_BUILD)
add_definitions(-DPROJECT_ENABLE_TESTING)
elseif(NOT PROJECT_IS_MINGW)
elseif(NOT PROJECT_IS_MINGW OR CMAKE_HOST_WIN32)
ExternalProject_Add(gtest_project
PREFIX external
URL ${PROJECT_3RD_PARTY_DIR}/googletest-${GTEST_VERSION}.tar.gz
URL_HASH SHA256=${GTEST_HASH}
URL_HASH SHA256=7315acb6bf10e99f332c8a43f00d5fbb1ee6ca48c52f6b936991b216c586aaad
LIST_SEPARATOR |
CMAKE_ARGS ${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}

View File

@ -1,3 +1,4 @@
option(PROJECT_ENABLE_BACKWARD_CPP "Enable backward-cpp" ON)
option(PROJECT_ENABLE_BOOST "Enable boost libraries" ON)
option(PROJECT_ENABLE_CPP_HTTPLIB "Enable cpp-httplib" ON)
option(PROJECT_ENABLE_CURL "Enable curl library" ON)
@ -6,7 +7,6 @@ option(PROJECT_ENABLE_JSON "Enable JSON for Modern C++ library" ON)
option(PROJECT_ENABLE_LIBSODIUM "Enable libsodium library" ON)
option(PROJECT_ENABLE_OPENSSL "Enable OpenSSL library" ON)
option(PROJECT_ENABLE_PUGIXML "Enable PugiXML library" ON)
option(PROJECT_ENABLE_ROCKSDB "Enable RocksDB library" ON)
option(PROJECT_ENABLE_SPDLOG "Enable spdlog library" ON)
option(PROJECT_ENABLE_SQLITE "Enable SQLite" ON)
option(PROJECT_ENABLE_STDUUID "Enable stduuid library" ON)

View File

@ -3,26 +3,48 @@ set(BOOST2_MAJOR_VERSION 1)
set(BOOST2_MINOR_VERSION 76)
set(BOOST2_PATCH_VERSION 0)
set(BOOST_MAJOR_VERSION 1)
set(BOOST_MINOR_VERSION 87)
set(BOOST_MINOR_VERSION 85)
set(BOOST_PATCH_VERSION 0)
set(CPP_HTTPLIB_VERSION 0.18.1)
set(CURL2_VERSION 8_11_0)
set(CURL_VERSION 8.11.0)
set(EXPAT2_VERSION 2_6_4)
set(EXPAT_VERSION 2.6.4)
set(CLI11_VERSION 2.4.2)
set(CPP_HTTPLIB_VERSION 0.16.0)
set(CURL_VERSION 8.8.0)
set(CXXOPTS_VERSION 3.2.0)
set(DTL_VERSION 2.01)
set(EXPAT_VERSION 2.6.2)
set(FLAC_VERSION 1.4.3)
set(FMT_VERSION 10.2.1)
set(FONTCONFIG_VERSION 2.15.0)
set(FREETYPE2_VERSION 2.13.2)
set(GCC_VERSION 14.2.0)
set(GTEST_VERSION 1.15.2)
set(GTEST_VERSION 1.15.0)
set(GTKMM_VERSION 3.0)
set(ICU_VERSION 75-1)
set(JSON_VERSION 3.11.3)
set(LIBBITCOIN_SYSTEM_VERSION 3.8.0)
set(LIBDSM_VERSION 0.4.3)
set(LIBEVENT_VERSION 2.1.12)
set(LIBJPEG_TURBO_VERSION 3.0.3)
set(LIBPNG_VERSION 1.6.43)
set(LIBSODIUM_VERSION 1.0.20)
set(LIBTASN_VERSION 4.19.0)
set(LIBICONV_VERSION 1.17)
set(MESA_VERSION 23.3.3)
set(MINGW_VERSION 11.0.1)
set(OPENSSL_VERSION 3.4.0)
set(NANA_VERSION 1.7.4)
set(NUSPELL_VERSION 5.1.4)
set(OGG_VERSION 1.3.5)
set(OPENAL_VERSION 1.23.1)
set(OPENSSL_VERSION 3.3.1)
set(PKG_CONFIG_VERSION 0.29.2)
set(PUGIXML_VERSION 1.14)
set(ROCKSDB_VERSION 9.7.4)
set(SPDLOG_VERSION 1.15.0)
set(SQLITE2_VERSION 3.46.1)
set(SQLITE_VERSION 3460100)
set(ROCKSDB_VERSION 9.4.0)
set(SDL_VERSION 2.30.5)
set(SECP256K1_VERSION 0.1.0.20)
set(SFML_VERSION 2.6.1)
set(SPDLOG_VERSION 1.14.1)
set(SQLITE_VERSION 3460000)
set(STDUUID_VERSION 1.2.3)
set(VLC_VERSION 3.0)
set(VORBIS_VERSION 1.3.7)
set(WXWIDGETS_VERSION 3.2.5)
set(ZLIB_VERSION 1.3.1)

View File

@ -21,7 +21,7 @@ PROJECT_PUBLIC_KEY=${DEVELOPER_PUBLIC_KEY}
PROJECT_ENABLE_WIN32_LONG_PATH_NAMES=OFF
PROJECT_ENABLE_BACKWARD_CPP=OFF
PROJECT_ENABLE_BACKWARD_CPP=ON
PROJECT_ENABLE_BOOST=ON
PROJECT_ENABLE_CPP_HTTPLIB=ON
PROJECT_ENABLE_CURL=ON
@ -30,13 +30,13 @@ PROJECT_ENABLE_JSON=ON
PROJECT_ENABLE_LIBSODIUM=ON
PROJECT_ENABLE_OPENSSL=ON
PROJECT_ENABLE_PUGIXML=ON
PROJECT_ENABLE_ROCKSDB=ON
PROJECT_ENABLE_SPDLOG=ON
PROJECT_ENABLE_SQLITE=ON
PROJECT_ENABLE_STDUUID=ON
PROJECT_ENABLE_TESTING=ON
PROJECT_ENABLE_WINFSP=ON
PROJECT_KEEP_BACKWARD_CPP=1
PROJECT_STATIC_LINK=ON
PROJECT_MINGW64_COPY_DEPENDENCIES+=()

View File

@ -1,4 +1,4 @@
FROM arm64v8/alpine:3.20.3
FROM arm64v8/alpine:3.20.2
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
CMD bash

View File

@ -1,4 +1,4 @@
FROM alpine:3.20.3
FROM alpine:3.20.2
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
CMD bash

View File

@ -1,5 +1,5 @@
#comment
FROM alpine:3.20.3
# comment
FROM alpine:3.20.2
RUN apk update
RUN apk upgrade
@ -92,8 +92,8 @@ RUN echo -e \
"windres = '${MY_MINGW_PREFIX}-windres'\n"\
"exe_wrapper = 'wine64'\n"\
"[properties]\n"\
"c_args = ['-I${MY_MINGW_DIR}/include']\n"\
"c_link_args = ['-L${MY_MINGW_DIR}/lib', '-L${MY_MINGW_DIR}/lib64']\n"\
"c_args = []\n"\
"c_link_args = []\n"\
"[host_machine]\n"\
"cpu = 'x86_64'\n"\
"cpu_family = 'x86_64'\n"\
@ -113,8 +113,7 @@ ADD ./3rd_party /3rd_party
ARG BINUTILS_VERSION
ENV MY_BINUTILS_VERSION=${BINUTILS_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./binutils-${MY_BINUTILS_VERSION}.tar.xz.sha256 && cd - \
&& tar xvJf /3rd_party/mingw64/binutils-${MY_BINUTILS_VERSION}.tar.xz \
RUN tar xvJf /3rd_party/mingw64/binutils-${MY_BINUTILS_VERSION}.tar.xz \
&& cd binutils-${MY_BINUTILS_VERSION} \
&& ./configure \
--disable-lto \
@ -134,11 +133,10 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./binutils-${MY_BINUTILS_VERSION}.tar.
ARG MINGW_VERSION
ENV MY_MINGW_VERSION=${MINGW_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./mingw-w64-v${MY_MINGW_VERSION}.tar.bz2.sha256 && cd - \
&& tar xvjf /3rd_party/mingw64/mingw-w64-v${MY_MINGW_VERSION}.tar.bz2 \
RUN tar xvzf /3rd_party/mingw64/mingw-w64-${MY_MINGW_VERSION}.tar.gz \
&& mkdir mingw-w64 \
&& cd mingw-w64 \
&& ../mingw-w64-v${MY_MINGW_VERSION}/mingw-w64-headers/configure \
&& ../mingw-w64-${MY_MINGW_VERSION}/mingw-w64-headers/configure \
--enable-sdk=all \
--host=${MY_MINGW_PREFIX} \
--prefix=/usr/local/${MY_MINGW_PREFIX} \
@ -146,8 +144,7 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./mingw-w64-v${MY_MINGW_VERSION}.tar.b
ARG GCC_VERSION
ENV MY_GCC_VERSION=${GCC_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./gcc-${MY_GCC_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/mingw64/gcc-${MY_GCC_VERSION}.tar.gz \
RUN tar xvzf /3rd_party/mingw64/gcc-${MY_GCC_VERSION}.tar.gz \
&& (mv gcc-releases-gcc-${MY_GCC_VERSION} gcc-${MY_GCC_VERSION} || echo "") \
&& mkdir gcc \
&& cd gcc \
@ -190,7 +187,7 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./gcc-${MY_GCC_VERSION}.tar.gz.sha256
&& make install-gcc
RUN cd mingw-w64 \
&& ../mingw-w64-v${MY_MINGW_VERSION}/mingw-w64-crt/configure \
&& ../mingw-w64-${MY_MINGW_VERSION}/mingw-w64-crt/configure \
--disable-lib32 \
--enable-lib64 \
--enable-wildcard \
@ -200,7 +197,7 @@ RUN cd mingw-w64 \
&& make install
RUN cd mingw-w64 \
&& ../mingw-w64-v${MY_MINGW_VERSION}/mingw-w64-libraries/winpthreads/configure \
&& ../mingw-w64-${MY_MINGW_VERSION}/mingw-w64-libraries/winpthreads/configure \
--enable-shared \
--enable-static \
--host=${MY_MINGW_PREFIX} \
@ -215,12 +212,11 @@ RUN cd gcc \
RUN cp /usr/local/${MY_MINGW_PREFIX}/lib/*.dll ${MY_MINGW_DIR}/bin \
&& cp /usr/local/${MY_MINGW_PREFIX}/bin/*.dll ${MY_MINGW_DIR}/bin \
&& rm -r gcc gcc-${MY_GCC_VERSION} \
&& rm -r mingw-w64 mingw-w64-v${MY_MINGW_VERSION}
&& rm -r mingw-w64 mingw-w64-${MY_MINGW_VERSION}
ARG PKG_CONFIG_VERSION
ENV MY_PKG_CONFIG_VERSION=${PKG_CONFIG_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./pkg-config-${MY_PKG_CONFIG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/mingw64/pkg-config-${MY_PKG_CONFIG_VERSION}.tar.gz \
RUN tar xvzf /3rd_party/mingw64/pkg-config-${MY_PKG_CONFIG_VERSION}.tar.gz \
&& cd pkg-config-${MY_PKG_CONFIG_VERSION} \
&& ./configure \
--disable-nls \
@ -244,8 +240,7 @@ ENV PKG_CONFIG_PATH="${MY_MINGW_DIR}/lib/pkgconfig:${MY_MINGW_DIR}/lib64/pkgconf
ARG ZLIB_VERSION
ENV MY_ZLIB_VERSION=${ZLIB_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./zlib-${MY_ZLIB_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/mingw64/zlib-${MY_ZLIB_VERSION}.tar.gz \
RUN tar xvzf /3rd_party/mingw64/zlib-${MY_ZLIB_VERSION}.tar.gz \
&& cd zlib-${MY_ZLIB_VERSION} \
&& mkdir build \
&& cd build \
@ -263,8 +258,7 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./zlib-${MY_ZLIB_VERSION}.tar.gz.sha25
ARG LIBJPEG_TURBO_VERSION
ENV MY_LIBJPEG_TURBO_VERSION=${LIBJPEG_TURBO_VERSION}
RUN if [ -f "/3rd_party/libjpeg_turbo-${MY_LIBJPEG_TURBO_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libjpeg_turbo-${MY_LIBJPEG_TURBO_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libjpeg_turbo-${MY_LIBJPEG_TURBO_VERSION}.tar.gz \
tar xvzf /3rd_party/libjpeg_turbo-${MY_LIBJPEG_TURBO_VERSION}.tar.gz \
&& cd libjpeg-turbo-${MY_LIBJPEG_TURBO_VERSION} \
&& mkdir _build \
&& cd _build \
@ -287,8 +281,7 @@ RUN if [ -f "/3rd_party/libjpeg_turbo-${MY_LIBJPEG_TURBO_VERSION}.tar.gz" ]; the
ARG LIBPNG_VERSION
ENV MY_LIBPNG_VERSION=${LIBPNG_VERSION}
RUN if [ -f "/3rd_party/libpng-v${MY_LIBPNG_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libpng-v${MY_LIBPNG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libpng-v${MY_LIBPNG_VERSION}.tar.gz \
tar xvzf /3rd_party/libpng-v${MY_LIBPNG_VERSION}.tar.gz \
&& cd libpng-${MY_LIBPNG_VERSION} \
&& mkdir _build \
&& cd _build \
@ -312,8 +305,7 @@ RUN if [ -f "/3rd_party/libpng-v${MY_LIBPNG_VERSION}.tar.gz" ]; then \
ARG FREETYPE2_VERSION
ENV MY_FREETYPE2_VERSION=${FREETYPE2_VERSION}
RUN if [ -f "/3rd_party/freetype-${MY_FREETYPE2_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./freetype-${MY_FREETYPE2_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/freetype-${MY_FREETYPE2_VERSION}.tar.gz \
tar xvzf /3rd_party/freetype-${MY_FREETYPE2_VERSION}.tar.gz \
&& cd freetype-${MY_FREETYPE2_VERSION} \
&& meson setup \
--cross-file ${MY_TOOLCHAIN_FILE_MESON} \
@ -329,9 +321,8 @@ RUN if [ -f "/3rd_party/freetype-${MY_FREETYPE2_VERSION}.tar.gz" ]; then \
ARG EXPAT_VERSION
ENV MY_EXPAT_VERSION=${EXPAT_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./expat-${MY_EXPAT_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/mingw64/expat-${MY_EXPAT_VERSION}.tar.gz \
&& cd libexpat-*/expat \
RUN tar xvzf /3rd_party/mingw64/expat-${MY_EXPAT_VERSION}.tar.gz \
&& cd expat-${MY_EXPAT_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
@ -346,13 +337,12 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./expat-${MY_EXPAT_VERSION}.tar.gz.sha
&& make -j${MY_NUM_JOBS} \
&& make install \
&& cd ${MY_WORKDIR} \
&& rm -r libexpat-*
&& rm -r expat-${MY_EXPAT_VERSION}
ARG FONTCONFIG_VERSION
ENV MY_FONTCONFIG_VERSION=${FONTCONFIG_VERSION}
RUN if [ -f "/3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz \
tar xvzf /3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz \
&& cd fontconfig-${MY_FONTCONFIG_VERSION} \
&& meson setup \
--cross-file ${MY_TOOLCHAIN_FILE_MESON} \
@ -372,8 +362,7 @@ RUN if [ -f "/3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz" ]; then \
ARG OPENAL_VERSION
ENV MY_OPENAL_VERSION=${OPENAL_VERSION}
RUN if [ -f "/3rd_party/openal-${MY_OPENAL_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./openal-${MY_OPENAL_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/openal-${MY_OPENAL_VERSION}.tar.gz \
tar xvzf /3rd_party/openal-${MY_OPENAL_VERSION}.tar.gz \
&& cd openal-soft-${MY_OPENAL_VERSION} \
&& mkdir _build \
&& cd _build \
@ -390,8 +379,7 @@ RUN if [ -f "/3rd_party/openal-${MY_OPENAL_VERSION}.tar.gz" ]; then \
ARG ICU_VERSION
ENV MY_ICU_VERSION=${ICU_VERSION}
RUN cd /3rd_party/mingw64 && sha256sum -c ./icu-release-${MY_ICU_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/mingw64/icu-release-${MY_ICU_VERSION}.tar.gz \
RUN tar xvzf /3rd_party/mingw64/icu-release-${MY_ICU_VERSION}.tar.gz \
&& cp -r icu-release-${MY_ICU_VERSION} icu-release-${MY_ICU_VERSION}-cross \
&& cd icu-release-${MY_ICU_VERSION}-cross/icu4c/source \
&& CXXFLAGS="-std=gnu++17" ./configure \
@ -424,8 +412,7 @@ RUN cd ${MY_WORKDIR} \
ARG OPENSSL_VERSION
ENV MY_OPENSSL_VERSION=${OPENSSL_VERSION}
RUN if [ -f "/3rd_party/openssl-${MY_OPENSSL_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./openssl-${MY_OPENSSL_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/openssl-${MY_OPENSSL_VERSION}.tar.gz \
tar xvzf /3rd_party/openssl-${MY_OPENSSL_VERSION}.tar.gz \
&& cd openssl-${MY_OPENSSL_VERSION} \
&& ./Configure \
--cross-compile-prefix=${MY_MINGW_PREFIX}- \
@ -448,14 +435,13 @@ ARG BOOST2_PATCH_VERSION
ENV MY_BOOST2_PATCH_VERSION=${BOOST2_PATCH_VERSION}
ENV MY_BOOST2_VERSION=${MY_BOOST2_MAJOR_VERSION}_${MY_BOOST2_MINOR_VERSION}_${MY_BOOST2_PATCH_VERSION}
RUN if [ -f "/3rd_party/boost_${MY_BOOST2_MAJOR_VERSION}_${MY_BOOST2_MINOR_VERSION}_${MY_BOOST2_PATCH_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./boost_${MY_BOOST2_MAJOR_VERSION}_${MY_BOOST2_MINOR_VERSION}_${MY_BOOST2_PATCH_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/boost_${MY_BOOST2_MAJOR_VERSION}_${MY_BOOST2_MINOR_VERSION}_${MY_BOOST2_PATCH_VERSION}.tar.gz \
tar xvzf /3rd_party/boost_${MY_BOOST2_MAJOR_VERSION}_${MY_BOOST2_MINOR_VERSION}_${MY_BOOST2_PATCH_VERSION}.tar.gz \
&& cd boost_${MY_BOOST2_VERSION} \
&& ./bootstrap.sh \
--with-libraries=atomic,chrono,date_time,filesystem,iostreams,locale,log,program_options,random,regex,serialization,system,test,thread \
address-model=64 \
cxxstd=${MY_CXX_STANDARD} \
cxxstd-dialect=gnu \
cxxstd=${MY_CXX_STANDARD} \
cxxstd-dialect=gnu \
architecture=x86 \
link=static,shared \
target-os=windows \
@ -468,8 +454,8 @@ RUN if [ -f "/3rd_party/boost_${MY_BOOST2_MAJOR_VERSION}_${MY_BOOST2_MINOR_VERSI
--prefix=${MY_MINGW_DIR} \
-j${MY_NUM_JOBS} \
address-model=64 \
cxxstd=${MY_CXX_STANDARD} \
cxxstd-dialect=gnu \
cxxstd=${MY_CXX_STANDARD} \
cxxstd-dialect=gnu \
architecture=x86 \
link=static,shared \
target-os=windows \
@ -489,8 +475,7 @@ ARG BOOST_PATCH_VERSION
ENV MY_BOOST_PATCH_VERSION=${BOOST_PATCH_VERSION}
ENV MY_BOOST_VERSION=${MY_BOOST_MAJOR_VERSION}_${MY_BOOST_MINOR_VERSION}_${MY_BOOST_PATCH_VERSION}
RUN if [ -f "/3rd_party/boost_${MY_BOOST_MAJOR_VERSION}_${MY_BOOST_MINOR_VERSION}_${MY_BOOST_PATCH_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./boost_${MY_BOOST_MAJOR_VERSION}_${MY_BOOST_MINOR_VERSION}_${MY_BOOST_PATCH_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/boost_${MY_BOOST_MAJOR_VERSION}_${MY_BOOST_MINOR_VERSION}_${MY_BOOST_PATCH_VERSION}.tar.gz \
tar xvzf /3rd_party/boost_${MY_BOOST_MAJOR_VERSION}_${MY_BOOST_MINOR_VERSION}_${MY_BOOST_PATCH_VERSION}.tar.gz \
&& cd boost_${MY_BOOST_VERSION} \
&& echo "using gcc : gcc : ${MY_MINGW_PREFIX}-g++ ;" \
>./user-config.jam \
@ -525,9 +510,8 @@ RUN if [ -f "/3rd_party/boost_${MY_BOOST_MAJOR_VERSION}_${MY_BOOST_MINOR_VERSION
ARG OGG_VERSION
ENV MY_OGG_VERSION=${OGG_VERSION}
RUN if [ -f "/3rd_party/ogg-v${MY_OGG_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./ogg-v${MY_OGG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/ogg-v${MY_OGG_VERSION}.tar.gz \
&& cd libogg-${MY_OGG_VERSION} \
tar xvzf /3rd_party/ogg-v${MY_OGG_VERSION}.tar.gz \
&& cd ogg-${MY_OGG_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
@ -539,16 +523,14 @@ RUN if [ -f "/3rd_party/ogg-v${MY_OGG_VERSION}.tar.gz" ]; then \
&& make -j${MY_NUM_JOBS} \
&& make install \
&& cd ${MY_WORKDIR} \
&& rm -r libogg-${MY_OGG_VERSION} \
&& rm -r ogg-${MY_OGG_VERSION} \
; fi
ARG VORBIS_VERSION
ENV MY_VORBIS_VERSION=${VORBIS_VERSION}
RUN if [ -f "/3rd_party/vorbis-v${MY_VORBIS_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./vorbis-v${MY_VORBIS_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/vorbis-v${MY_VORBIS_VERSION}.tar.gz \
tar xvzf /3rd_party/vorbis-v${MY_VORBIS_VERSION}.tar.gz \
&& cd vorbis-${MY_VORBIS_VERSION} \
&& /3rd_party/vorbis_patch.sh /3rd_party . \
&& mkdir build \
&& cd build \
&& cmake .. \
@ -565,15 +547,14 @@ RUN if [ -f "/3rd_party/vorbis-v${MY_VORBIS_VERSION}.tar.gz" ]; then \
ARG FLAC_VERSION
ENV MY_FLAC_VERSION=${FLAC_VERSION}
RUN if [ -f "/3rd_party/flac-${MY_FLAC_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./flac-${MY_FLAC_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/flac-${MY_FLAC_VERSION}.tar.gz \
tar xvzf /3rd_party/flac-${MY_FLAC_VERSION}.tar.gz \
&& cd flac-${MY_FLAC_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_PROGRAMS=OFF \
-DBUILD_EXAMPLES=ON \
-DBUILD_PROGRAMS=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_TESTING=OFF \
@ -590,8 +571,7 @@ RUN if [ -f "/3rd_party/flac-${MY_FLAC_VERSION}.tar.gz" ]; then \
ARG SFML_VERSION
ENV MY_SFML_VERSION=${SFML_VERSION}
RUN if [ -f "/3rd_party/SFML-${MY_SFML_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./SFML-${MY_SFML_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/SFML-${MY_SFML_VERSION}.tar.gz \
tar xvzf /3rd_party/SFML-${MY_SFML_VERSION}.tar.gz \
&& cd SFML-${MY_SFML_VERSION} \
&& sed -i s/set_target_properties\(\$\{target\}\ PROPERTIES\ PREFIX\ \"\"\)// \
cmake/Macros.cmake \
@ -604,7 +584,6 @@ RUN if [ -f "/3rd_party/SFML-${MY_SFML_VERSION}.tar.gz" ]; then \
-DBUILD_STATIC_LIBS=ON \
-DCMAKE_CXX_STANDARD=${MY_CXX_STANDARD} \
-DCMAKE_INSTALL_PREFIX=${MY_MINGW_DIR} \
-DCMAKE_SYSTEM_PROCESSOR=AMD64 \
-DCMAKE_TOOLCHAIN_FILE=${MY_TOOLCHAIN_FILE_CMAKE} \
&& make -j${MY_NUM_JOBS} \
&& make install \
@ -615,8 +594,7 @@ RUN if [ -f "/3rd_party/SFML-${MY_SFML_VERSION}.tar.gz" ]; then \
ARG SPDLOG_VERSION
ENV MY_SPDLOG_VERSION=${SPDLOG_VERSION}
RUN if [ -f "/3rd_party/spdlog-${MY_SPDLOG_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./spdlog-${MY_SPDLOG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/spdlog-${MY_SPDLOG_VERSION}.tar.gz \
tar xvzf /3rd_party/spdlog-${MY_SPDLOG_VERSION}.tar.gz \
&& cd spdlog-${MY_SPDLOG_VERSION} \
&& mkdir build \
&& cd build \
@ -637,8 +615,7 @@ RUN if [ -f "/3rd_party/spdlog-${MY_SPDLOG_VERSION}.tar.gz" ]; then \
ARG CLI11_VERSION
ENV MY_CLI11_VERSION=${CLI11_VERSION}
RUN if [ -f "/3rd_party/CLI11-${MY_CLI11_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./CLI11-${MY_CLI11_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/CLI11-${MY_CLI11_VERSION}.tar.gz \
tar xvzf /3rd_party/CLI11-${MY_CLI11_VERSION}.tar.gz \
&& cd CLI11-${MY_CLI11_VERSION} \
&& mkdir build \
&& cd build \
@ -661,12 +638,9 @@ RUN if [ -f "/3rd_party/CLI11-${MY_CLI11_VERSION}.tar.gz" ]; then \
ARG CURL_VERSION
ENV MY_CURL_VERSION=${CURL_VERSION}
ARG CURL2_VERSION
ENV MY_CURL2_VERSION=${CURL2_VERSION}
RUN if [ -f "/3rd_party/curl-${MY_CURL_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./curl-${MY_CURL_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/curl-${MY_CURL_VERSION}.tar.gz \
&& cd curl-curl-${MY_CURL2_VERSION} \
tar xvzf /3rd_party/curl-${MY_CURL_VERSION}.tar.gz \
&& cd curl-${MY_CURL_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
@ -691,14 +665,13 @@ RUN if [ -f "/3rd_party/curl-${MY_CURL_VERSION}.tar.gz" ]; then \
&& make -j${MY_NUM_JOBS} \
&& make install \
&& cd ${MY_WORKDIR} \
&& rm -r curl-curl-${MY_CURL2_VERSION} \
&& rm -r curl-${MY_CURL_VERSION} \
; fi
ARG CPP_HTTPLIB_VERSION
ENV MY_CPP_HTTPLIB_VERSION=${CPP_HTTPLIB_VERSION}
RUN if [ -f "/3rd_party/cpp-httplib-${MY_CPP_HTTPLIB_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./cpp-httplib-${MY_CPP_HTTPLIB_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/cpp-httplib-${MY_CPP_HTTPLIB_VERSION}.tar.gz \
tar xvzf /3rd_party/cpp-httplib-${MY_CPP_HTTPLIB_VERSION}.tar.gz \
&& cd cpp-httplib-${MY_CPP_HTTPLIB_VERSION} \
&& mkdir build \
&& cd build \
@ -720,8 +693,7 @@ RUN if [ -f "/3rd_party/cpp-httplib-${MY_CPP_HTTPLIB_VERSION}.tar.gz" ]; then \
ARG FMT_VERSION
ENV MY_FMT_VERSION=${FMT_VERSION}
RUN if [ -f "/3rd_party/fmt-${MY_FMT_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./fmt-${MY_FMT_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/fmt-${MY_FMT_VERSION}.tar.gz \
tar xvzf /3rd_party/fmt-${MY_FMT_VERSION}.tar.gz \
&& cd fmt-${MY_FMT_VERSION} \
&& mkdir build \
&& cd build \
@ -742,8 +714,7 @@ RUN if [ -f "/3rd_party/fmt-${MY_FMT_VERSION}.tar.gz" ]; then \
ARG GTEST_VERSION
ENV MY_GTEST_VERSION=${GTEST_VERSION}
RUN if [ -f "/3rd_party/googletest-${MY_GTEST_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./googletest-${MY_GTEST_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/googletest-${MY_GTEST_VERSION}.tar.gz \
tar xvzf /3rd_party/googletest-${MY_GTEST_VERSION}.tar.gz \
&& cd googletest-${MY_GTEST_VERSION} \
&& mkdir build \
&& cd build \
@ -761,8 +732,7 @@ RUN if [ -f "/3rd_party/googletest-${MY_GTEST_VERSION}.tar.gz" ]; then \
ARG JSON_VERSION
ENV MY_JSON_VERSION=${JSON_VERSION}
RUN if [ -f "/3rd_party/json-${MY_JSON_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./json-${MY_JSON_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/json-${MY_JSON_VERSION}.tar.gz \
tar xvzf /3rd_party/json-${MY_JSON_VERSION}.tar.gz \
&& cd json-${MY_JSON_VERSION} \
&& mkdir build \
&& cd build \
@ -783,9 +753,8 @@ RUN if [ -f "/3rd_party/json-${MY_JSON_VERSION}.tar.gz" ]; then \
ARG LIBEVENT_VERSION
ENV MY_LIBEVENT_VERSION=${LIBEVENT_VERSION}
RUN if [ -f "/3rd_party/libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz \
&& cd libevent-release-${MY_LIBEVENT_VERSION}-stable \
tar xvzf /3rd_party/libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz \
&& cd libevent-${MY_LIBEVENT_VERSION}-stable \
&& mkdir build \
&& cd build \
&& cmake .. \
@ -800,15 +769,14 @@ RUN if [ -f "/3rd_party/libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz" ]; then \
&& make -j${MY_NUM_JOBS} \
&& make install \
&& cd ${MY_WORKDIR} \
&& rm -r libevent-release-${MY_LIBEVENT_VERSION}-stable \
&& rm -r libevent-${MY_LIBEVENT_VERSION}-stable \
; fi
ARG LIBSODIUM_VERSION
ENV MY_LIBSODIUM_VERSION=${LIBSODIUM_VERSION}
RUN if [ -f "/3rd_party/libsodium-${MY_LIBSODIUM_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libsodium-${MY_LIBSODIUM_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libsodium-${MY_LIBSODIUM_VERSION}.tar.gz \
&& cd libsodium-${MY_LIBSODIUM_VERSION}-RELEASE \
tar xvzf /3rd_party/libsodium-${MY_LIBSODIUM_VERSION}.tar.gz \
&& cd libsodium-${MY_LIBSODIUM_VERSION} \
&& CFLAGS="-O3 -fomit-frame-pointer -m64 -mtune=generic" ./configure \
--enable-shared=yes \
--enable-static=yes \
@ -817,19 +785,17 @@ RUN if [ -f "/3rd_party/libsodium-${MY_LIBSODIUM_VERSION}.tar.gz" ]; then \
&& make -j${MY_NUM_JOBS} \
&& make install \
&& cd ${MY_WORKDIR} \
&& rm -r libsodium-${MY_LIBSODIUM_VERSION}-RELEASE \
&& rm -r libsodium-${MY_LIBSODIUM_VERSION} \
; fi
ARG NUSPELL_VERSION
ENV MY_NUSPELL_VERSION=${NUSPELL_VERSION}
RUN if [ -f "/3rd_party/nuspell-v${MY_NUSPELL_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./nuspell-v${MY_NUSPELL_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/nuspell-v${MY_NUSPELL_VERSION}.tar.gz \
tar xvzf /3rd_party/nuspell-v${MY_NUSPELL_VERSION}.tar.gz \
&& cd nuspell-${MY_NUSPELL_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
-DBUILD_DOCS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_TOOLS=OFF \
-DCMAKE_BUILD_TYPE=Release \
@ -845,8 +811,7 @@ RUN if [ -f "/3rd_party/nuspell-v${MY_NUSPELL_VERSION}.tar.gz" ]; then \
ARG PUGIXML_VERSION
ENV MY_PUGIXML_VERSION=${PUGIXML_VERSION}
RUN if [ -f "/3rd_party/pugixml-${MY_PUGIXML_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./pugixml-${MY_PUGIXML_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/pugixml-${MY_PUGIXML_VERSION}.tar.gz \
tar xvzf /3rd_party/pugixml-${MY_PUGIXML_VERSION}.tar.gz \
&& cd pugixml-${MY_PUGIXML_VERSION} \
&& mkdir build \
&& cd build \
@ -864,8 +829,7 @@ RUN if [ -f "/3rd_party/pugixml-${MY_PUGIXML_VERSION}.tar.gz" ]; then \
ARG ROCKSDB_VERSION
ENV MY_ROCKSDB_VERSION=${ROCKSDB_VERSION}
RUN if [ -f "/3rd_party/rocksdb-${MY_ROCKSDB_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./rocksdb-${MY_ROCKSDB_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/rocksdb-${MY_ROCKSDB_VERSION}.tar.gz \
tar xvzf /3rd_party/rocksdb-${MY_ROCKSDB_VERSION}.tar.gz \
&& cd rocksdb-${MY_ROCKSDB_VERSION} \
&& echo -e "add_definitions(-include cstdint)">>CMakeLists.txt \
&& mkdir build \
@ -898,8 +862,7 @@ RUN if [ -f "/3rd_party/rocksdb-${MY_ROCKSDB_VERSION}.tar.gz" ]; then \
ARG SECP256K1_VERSION
ENV MY_SECP256K1_VERSION=${SECP256K1_VERSION}
RUN if [ -f "/3rd_party/secp256k1-${MY_SECP256K1_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./secp256k1-${MY_SECP256K1_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/secp256k1-${MY_SECP256K1_VERSION}.tar.gz \
tar xvzf /3rd_party/secp256k1-${MY_SECP256K1_VERSION}.tar.gz \
&& cd secp256k1-${MY_SECP256K1_VERSION} \
&& ./autogen.sh && ./configure \
--host=${MY_MINGW_PREFIX} \
@ -917,8 +880,7 @@ RUN if [ -f "/3rd_party/secp256k1-${MY_SECP256K1_VERSION}.tar.gz" ]; then \
ARG STDUUID_VERSION
ENV MY_STDUUID_VERSION=${STDUUID_VERSION}
RUN if [ -f "/3rd_party/stduuid-${MY_STDUUID_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./stduuid-${MY_STDUUID_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/stduuid-${MY_STDUUID_VERSION}.tar.gz \
tar xvzf /3rd_party/stduuid-${MY_STDUUID_VERSION}.tar.gz \
&& cd stduuid-${MY_STDUUID_VERSION} \
&& mkdir build \
&& cd build \
@ -937,8 +899,7 @@ RUN if [ -f "/3rd_party/stduuid-${MY_STDUUID_VERSION}.tar.gz" ]; then \
; fi
RUN if [ -f "/3rd_party/tiny-process-library.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./tiny-process-library.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/tiny-process-library.tar.gz \
tar xvzf /3rd_party/tiny-process-library.tar.gz \
&& cd tiny-process-library-master \
&& mkdir build \
&& cd build \
@ -959,8 +920,7 @@ RUN if [ -f "/3rd_party/tiny-process-library.tar.gz" ]; then \
ARG WXWIDGETS_VERSION
ENV MY_WXWIDGETS_VERSION=${WXWIDGETS_VERSION}
RUN if [ -f "/3rd_party/wxWidgets-${MY_WXWIDGETS_VERSION}.tar.bz2" ]; then \
cd /3rd_party && sha256sum -c ./wxWidgets-${MY_WXWIDGETS_VERSION}.tar.bz2.sha256 && cd - \
&& tar xvjf /3rd_party/wxWidgets-${MY_WXWIDGETS_VERSION}.tar.bz2 \
tar xvjf /3rd_party/wxWidgets-${MY_WXWIDGETS_VERSION}.tar.bz2 \
&& cd wxWidgets-${MY_WXWIDGETS_VERSION} \
&& mkdir _build \
&& cd _build \
@ -982,8 +942,7 @@ RUN if [ -f "/3rd_party/wxWidgets-${MY_WXWIDGETS_VERSION}.tar.bz2" ]; then \
ARG CXXOPTS_VERSION
ENV MY_CXXOPTS_VERSION=${CXXOPTS_VERSION}
RUN if [ -f "/3rd_party/cxxopts-v${MY_CXXOPTS_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./cxxopts-v${MY_CXXOPTS_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/cxxopts-v${MY_CXXOPTS_VERSION}.tar.gz \
tar xvzf /3rd_party/cxxopts-v${MY_CXXOPTS_VERSION}.tar.gz \
&& cd cxxopts-${MY_CXXOPTS_VERSION} \
&& mkdir _build \
&& cd _build \
@ -1008,10 +967,8 @@ RUN if [ -f "/3rd_party/cxxopts-v${MY_CXXOPTS_VERSION}.tar.gz" ]; then \
ARG NANA_VERSION
ENV MY_NANA_VERSION=${NANA_VERSION}
RUN if [ -f "/3rd_party/nana-v${MY_NANA_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./nana-v${MY_NANA_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/nana-v${MY_NANA_VERSION}.tar.gz \
tar xvzf /3rd_party/nana-v${MY_NANA_VERSION}.tar.gz \
&& cd nana-${MY_NANA_VERSION} \
&& /3rd_party/nana_patch.sh /3rd_party . \
&& mkdir _build \
&& cd _build \
&& cmake .. \
@ -1034,8 +991,7 @@ RUN if [ -f "/3rd_party/nana-v${MY_NANA_VERSION}.tar.gz" ]; then \
ARG SDL_VERSION
ENV MY_SDL_VERSION=${SDL_VERSION}
RUN if [ -f "/3rd_party/sdl-${MY_SDL_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./sdl-${MY_SDL_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/sdl-${MY_SDL_VERSION}.tar.gz \
tar xvzf /3rd_party/sdl-${MY_SDL_VERSION}.tar.gz \
&& cd SDL-release-${MY_SDL_VERSION} \
&& ./configure \
--host=${MY_MINGW_PREFIX} \
@ -1051,8 +1007,7 @@ RUN if [ -f "/3rd_party/sdl-${MY_SDL_VERSION}.tar.gz" ]; then \
ARG LIBTASN_VERSION
ENV MY_LIBTASN_VERSION=${LIBTASN_VERSION}
RUN if [ -f "/3rd_party/libtasn1-${MY_LIBTASN_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libtasn1-${MY_LIBTASN_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libtasn1-${MY_LIBTASN_VERSION}.tar.gz \
tar xvzf /3rd_party/libtasn1-${MY_LIBTASN_VERSION}.tar.gz \
&& cd libtasn1-${MY_LIBTASN_VERSION} \
&& ./configure \
--disable-doc \
@ -1064,19 +1019,12 @@ RUN if [ -f "/3rd_party/libtasn1-${MY_LIBTASN_VERSION}.tar.gz" ]; then \
&& make install \
&& cd ${MY_WORKDIR} \
&& rm -r libtasn1-${MY_LIBTASN_VERSION} \
&& echo -e \
"#!/bin/bash\n"\
"\n"\
"wine ${MY_MINGW_DIR}/bin/asn1Parser.exe \$@\n"\
> ${MY_MINGW_DIR}/bin/asn1Parser \
&& chmod +x ${MY_MINGW_DIR}/bin/asn1Parser \
; fi
ARG LIBICONV_VERSION
ENV MY_LIBICONV_VERSION=${LIBICONV_VERSION}
RUN if [ -f "/3rd_party/libiconv-${MY_LIBICONV_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libiconv-${MY_LIBICONV_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libiconv-${MY_LIBICONV_VERSION}.tar.gz \
tar xvzf /3rd_party/libiconv-${MY_LIBICONV_VERSION}.tar.gz \
&& cd libiconv-${MY_LIBICONV_VERSION} \
&& ./configure \
--enable-static=yes \
@ -1092,12 +1040,9 @@ RUN if [ -f "/3rd_party/libiconv-${MY_LIBICONV_VERSION}.tar.gz" ]; then \
ARG LIBDSM_VERSION
ENV MY_LIBDSM_VERSION=${LIBDSM_VERSION}
RUN if [ -f "/3rd_party/libdsm-${MY_LIBDSM_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./libdsm-${MY_LIBDSM_VERSION}.tar.gz.sha256 && cd - \
&& tar xvzf /3rd_party/libdsm-${MY_LIBDSM_VERSION}.tar.gz \
tar xvxf /3rd_party/libdsm-${MY_LIBDSM_VERSION}.tar.gz \
&& cd libdsm-${MY_LIBDSM_VERSION} \
&& /3rd_party/libdsm_patch.sh /3rd_party . \
&& meson setup \
--bindir=${MY_MINGW_DIR}/bin \
--cross-file ${MY_TOOLCHAIN_FILE_MESON} \
--prefix=${MY_MINGW_DIR} \
-Dbinaries=false \

View File

@ -3,8 +3,5 @@
CURRENT_DIR=$(dirname "$0")
CURRENT_DIR=$(realpath ${CURRENT_DIR})
rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_input/ \
${PROJECT_BUILD_DIR}/build/test_input/
rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_input/ \
${PROJECT_DIST_DIR}/test_input/
rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_data/ ${PROJECT_BUILD_DIR}/build/test_data/
rsync -av --progress ${CURRENT_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_test/test_data/ ${PROJECT_DIST_DIR}/test_data/

View File

@ -1,3 +1,15 @@
if (NOT PROJECT_STATIC_LINK)
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/deps/include)
if(PROJECT_IS_MINGW)
link_libraries(msvcr90)
endif()
list(APPEND PROJECT_ADDITIONAL_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/deps/src/backward.cpp
)
endif()
set(CMAKE_CXX_FLAGS "-include common.hpp ${CMAKE_CXX_FLAGS}")
add_project_library(lib${PROJECT_NAME} "" "" "${PROJECT_ADDITIONAL_SOURCES}")

View File

@ -19,12 +19,13 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_APP_CONFIG_HPP_
#define REPERTORY_INCLUDE_APP_CONFIG_HPP_
#ifndef INCLUDE_APP_CONFIG_HPP_
#define INCLUDE_APP_CONFIG_HPP_
#include "events/event.hpp"
#include "types/remote.hpp"
#include "events/event_system.hpp"
#include "events/events.hpp"
#include "types/repertory.hpp"
#include "utils/error_utils.hpp"
namespace repertory {
class app_config final {
@ -39,11 +40,14 @@ public:
default_data_directory(const provider_type &prov) -> std::string;
[[nodiscard]] static auto
default_remote_api_port(const provider_type &prov) -> std::uint16_t;
default_remote_port(const provider_type &prov) -> std::uint16_t;
[[nodiscard]] static auto
default_rpc_port(const provider_type &prov) -> std::uint16_t;
[[nodiscard]] static auto
get_provider_api_password(const provider_type &prov) -> std::string;
[[nodiscard]] static auto
get_provider_display_name(const provider_type &prov) -> std::string;
@ -53,206 +57,400 @@ public:
public:
app_config(const provider_type &prov, std::string_view data_directory = "");
app_config() = delete;
app_config(app_config &&) = delete;
app_config(const app_config &) = delete;
~app_config() { save(); }
auto operator=(const app_config &) -> app_config & = delete;
auto operator=(app_config &&) -> app_config & = delete;
private:
provider_type prov_;
atomic<std::string> api_auth_;
std::atomic<std::uint16_t> api_port_;
atomic<std::string> api_user_;
std::atomic<bool> config_changed_;
std::atomic<database_type> db_type_{database_type::rocksdb};
std::atomic<std::uint8_t> download_timeout_secs_;
std::atomic<bool> enable_download_timeout_;
std::atomic<bool> enable_drive_events_;
#if defined(_WIN32)
std::atomic<bool> enable_mount_manager_;
#endif // defined(_WIN32)
std::atomic<event_level> event_level_;
std::atomic<std::uint32_t> eviction_delay_mins_;
std::atomic<bool> eviction_uses_accessed_time_;
std::atomic<std::uint16_t> high_freq_interval_secs_;
std::atomic<std::uint16_t> low_freq_interval_secs_;
std::atomic<std::uint64_t> max_cache_size_bytes_;
std::atomic<std::uint8_t> max_upload_count_;
std::atomic<std::uint16_t> med_freq_interval_secs_;
std::atomic<std::uint16_t> online_check_retry_secs_;
std::atomic<std::uint16_t> orphaned_file_retention_days_;
std::atomic<download_type> preferred_download_type_;
std::atomic<std::uint16_t> retry_read_count_;
std::atomic<std::uint16_t> ring_buffer_file_size_;
std::atomic<std::uint16_t> task_wait_ms_;
private:
std::string cache_directory_;
std::string api_auth_;
std::uint16_t api_port_;
std::string api_user_;
bool config_changed_;
std::string data_directory_;
atomic<encrypt_config> encrypt_config_;
atomic<host_config> host_config_;
std::uint8_t download_timeout_secs_;
bool enable_chunk_downloader_timeout_;
bool enable_comm_duration_events_;
bool enable_drive_events_;
bool enable_max_cache_size_;
#if defined(_WIN32)
bool enable_mount_manager_;
#endif
bool enable_remote_mount_;
encrypt_config encrypt_config_;
event_level event_level_;
std::uint32_t eviction_delay_mins_;
bool eviction_uses_accessed_time_;
std::uint8_t high_freq_interval_secs_;
bool is_remote_mount_;
std::uint32_t low_freq_interval_secs_;
std::uint64_t max_cache_size_bytes_;
std::uint8_t max_upload_count_;
std::uint8_t min_download_timeout_secs_;
std::uint16_t online_check_retry_secs_;
std::uint16_t orphaned_file_retention_days_;
std::string preferred_download_type_;
std::uint8_t read_ahead_count_;
std::uint8_t remote_client_pool_size_;
std::string remote_host_name_or_ip_;
std::uint8_t remote_max_connections_;
std::uint16_t remote_port_;
std::uint16_t remote_receive_timeout_secs_;
std::uint16_t remote_send_timeout_secs_;
std::string remote_token_;
std::uint16_t retry_read_count_;
std::uint16_t ring_buffer_file_size_;
std::string cache_directory_;
host_config hc_;
s3_config s3_config_;
std::uint64_t version_{REPERTORY_CONFIG_VERSION};
std::string log_directory_;
mutable std::recursive_mutex read_write_mutex_;
atomic<remote::remote_config> remote_config_;
atomic<remote::remote_mount> remote_mount_;
atomic<s3_config> s3_config_;
atomic<sia_config> sia_config_;
std::unordered_map<std::string, std::function<std::string()>>
value_get_lookup_;
std::unordered_map<std::string,
std::function<std::string(const std::string &)>>
value_set_lookup_;
std::uint64_t version_{REPERTORY_CONFIG_VERSION};
mutable std::recursive_mutex remote_mount_mutex_;
private:
[[nodiscard]] auto load() -> bool;
template <typename dest>
auto get_value(const json &json_document, const std::string &name, dest &dst,
bool &success_flag) -> bool {
constexpr const auto *function_name =
static_cast<const char *>(__FUNCTION__);
auto ret = false;
try {
if (json_document.find(name) != json_document.end()) {
dst = json_document[name].get<dest>();
ret = true;
} else {
success_flag = false;
}
} catch (const json::exception &ex) {
utils::error::raise_error(function_name, ex, "exception occurred");
success_flag = false;
ret = false;
}
return ret;
}
template <typename dest, typename source>
auto set_value(dest &dst, const source &src) -> bool;
auto set_value(dest &dst, const source &src) -> bool {
auto ret = false;
recur_mutex_lock lock(read_write_mutex_);
if (dst != src) {
dst = src;
config_changed_ = true;
save();
ret = true;
}
return ret;
}
public:
[[nodiscard]] auto get_api_auth() const -> std::string;
[[nodiscard]] auto get_api_auth() const -> std::string { return api_auth_; }
[[nodiscard]] auto get_api_port() const -> std::uint16_t;
[[nodiscard]] auto get_api_port() const -> std::uint16_t { return api_port_; }
[[nodiscard]] auto get_api_user() const -> std::string;
[[nodiscard]] auto get_api_user() const -> std::string { return api_user_; }
[[nodiscard]] auto get_cache_directory() const -> std::string;
[[nodiscard]] auto get_cache_directory() const -> std::string {
return cache_directory_;
}
[[nodiscard]] auto get_chunk_downloader_timeout_secs() const -> std::uint8_t {
return std::max(min_download_timeout_secs_, download_timeout_secs_);
}
[[nodiscard]] auto get_config_file_path() const -> std::string;
[[nodiscard]] auto get_database_type() const -> database_type;
[[nodiscard]] auto get_data_directory() const -> std::string {
return data_directory_;
}
[[nodiscard]] auto get_data_directory() const -> std::string;
[[nodiscard]] auto get_enable_chunk_download_timeout() const -> bool {
return enable_chunk_downloader_timeout_;
}
[[nodiscard]] auto get_download_timeout_secs() const -> std::uint8_t;
[[nodiscard]] auto get_enable_comm_duration_events() const -> bool {
return enable_comm_duration_events_;
}
[[nodiscard]] auto get_enable_download_timeout() const -> bool;
[[nodiscard]] auto get_enable_drive_events() const -> bool {
return enable_drive_events_;
}
[[nodiscard]] auto get_enable_drive_events() const -> bool;
[[nodiscard]] auto get_encrypt_config() const -> encrypt_config;
[[nodiscard]] auto get_encrypt_config() const -> encrypt_config {
return encrypt_config_;
}
#if defined(_WIN32)
[[nodiscard]] auto get_enable_mount_manager() const -> bool;
#endif // defined(_WIN32)
[[nodiscard]] auto get_enable_mount_manager() const -> bool {
return enable_mount_manager_;
}
#endif
[[nodiscard]] auto get_event_level() const -> event_level;
[[nodiscard]] auto get_enable_max_cache_size() const -> bool {
return enable_max_cache_size_;
}
[[nodiscard]] auto get_eviction_delay_mins() const -> std::uint32_t;
[[nodiscard]] auto get_enable_remote_mount() const -> bool {
return enable_remote_mount_;
}
[[nodiscard]] auto get_eviction_uses_accessed_time() const -> bool;
[[nodiscard]] auto get_event_level() const -> event_level {
return event_level_;
}
[[nodiscard]] auto get_high_frequency_interval_secs() const -> std::uint16_t;
[[nodiscard]] auto get_eviction_delay_mins() const -> std::uint32_t {
return eviction_delay_mins_;
}
[[nodiscard]] auto get_host_config() const -> host_config;
[[nodiscard]] auto get_eviction_uses_accessed_time() const -> bool {
return eviction_uses_accessed_time_;
}
[[nodiscard]] auto get_high_frequency_interval_secs() const -> std::uint8_t {
return std::max(static_cast<std::uint8_t>(1U), high_freq_interval_secs_);
}
[[nodiscard]] auto get_host_config() const -> host_config { return hc_; }
[[nodiscard]] auto get_is_remote_mount() const -> bool {
return is_remote_mount_;
}
[[nodiscard]] auto get_json() const -> json;
[[nodiscard]] auto get_log_directory() const -> std::string;
[[nodiscard]] auto get_log_directory() const -> std::string {
return log_directory_;
}
[[nodiscard]] auto get_low_frequency_interval_secs() const -> std::uint16_t;
[[nodiscard]] auto get_low_frequency_interval_secs() const -> std::uint32_t {
return std::max(1U, low_freq_interval_secs_);
}
[[nodiscard]] auto get_max_cache_size_bytes() const -> std::uint64_t;
[[nodiscard]] auto get_max_upload_count() const -> std::uint8_t;
[[nodiscard]] auto get_max_upload_count() const -> std::uint8_t {
return std::max(std::uint8_t(1U), max_upload_count_);
}
[[nodiscard]] auto get_med_frequency_interval_secs() const -> std::uint16_t;
[[nodiscard]] auto get_online_check_retry_secs() const -> std::uint16_t {
return std::max(std::uint16_t(15U), online_check_retry_secs_);
}
[[nodiscard]] auto get_online_check_retry_secs() const -> std::uint16_t;
[[nodiscard]] auto get_orphaned_file_retention_days() const -> std::uint16_t {
return std::min(static_cast<std::uint16_t>(31U),
std::max(static_cast<std::uint16_t>(1U),
orphaned_file_retention_days_));
}
[[nodiscard]] auto get_orphaned_file_retention_days() const -> std::uint16_t;
[[nodiscard]] auto get_preferred_download_type() const -> download_type {
return download_type_from_string(preferred_download_type_,
download_type::fallback);
}
[[nodiscard]] auto get_preferred_download_type() const -> download_type;
[[nodiscard]] auto get_provider_type() const -> provider_type {
return prov_;
}
[[nodiscard]] auto get_provider_type() const -> provider_type;
[[nodiscard]] auto get_read_ahead_count() const -> std::uint8_t {
return std::max(static_cast<std::uint8_t>(1U), read_ahead_count_);
}
[[nodiscard]] auto get_remote_config() const -> remote::remote_config;
[[nodiscard]] auto get_remote_client_pool_size() const -> std::uint8_t {
return std::max(static_cast<std::uint8_t>(5U), remote_client_pool_size_);
}
[[nodiscard]] auto get_remote_mount() const -> remote::remote_mount;
[[nodiscard]] auto get_remote_host_name_or_ip() const -> std::string {
return remote_host_name_or_ip_;
}
[[nodiscard]] auto get_retry_read_count() const -> std::uint16_t;
[[nodiscard]] auto get_remote_max_connections() const -> std::uint8_t {
return std::max(static_cast<std::uint8_t>(1U), remote_max_connections_);
}
[[nodiscard]] auto get_ring_buffer_file_size() const -> std::uint16_t;
[[nodiscard]] auto get_remote_port() const -> std::uint16_t {
return remote_port_;
}
[[nodiscard]] auto get_s3_config() const -> s3_config;
[[nodiscard]] auto get_remote_receive_timeout_secs() const -> std::uint16_t {
return remote_receive_timeout_secs_;
}
[[nodiscard]] auto get_sia_config() const -> sia_config;
[[nodiscard]] auto get_remote_send_timeout_secs() const -> std::uint16_t {
return remote_send_timeout_secs_;
}
[[nodiscard]] auto get_task_wait_ms() const -> std::uint16_t;
[[nodiscard]] auto get_remote_token() const -> std::string {
return remote_token_;
}
[[nodiscard]] auto
get_value_by_name(const std::string &name) const -> std::string;
[[nodiscard]] auto get_retry_read_count() const -> std::uint16_t {
return std::max(std::uint16_t(2), retry_read_count_);
}
[[nodiscard]] auto get_version() const -> std::uint64_t;
[[nodiscard]] auto get_ring_buffer_file_size() const -> std::uint16_t {
return std::max(
static_cast<std::uint16_t>(64U),
std::min(static_cast<std::uint16_t>(1024U), ring_buffer_file_size_));
}
[[nodiscard]] auto get_s3_config() const -> s3_config { return s3_config_; }
[[nodiscard]] auto get_value_by_name(const std::string &name) -> std::string;
[[nodiscard]] auto get_version() const -> std::uint64_t { return version_; }
void save();
void set_api_auth(const std::string &value);
void set_api_auth(const std::string &api_auth) {
set_value(api_auth_, api_auth);
}
void set_api_port(std::uint16_t value);
void set_api_port(std::uint16_t api_port) { set_value(api_port_, api_port); }
void set_api_user(const std::string &value);
void set_api_user(const std::string &api_user) {
set_value(api_user_, api_user);
}
void set_download_timeout_secs(std::uint8_t value);
void set_chunk_downloader_timeout_secs(
std::uint8_t chunk_downloader_timeout_secs) {
set_value(download_timeout_secs_, chunk_downloader_timeout_secs);
}
void set_database_type(const database_type &value);
void
set_enable_chunk_downloader_timeout(bool enable_chunk_downloader_timeout) {
set_value(enable_chunk_downloader_timeout_,
enable_chunk_downloader_timeout);
}
void set_enable_download_timeout(bool value);
void set_enable_comm_duration_events(bool enable_comm_duration_events) {
set_value(enable_comm_duration_events_, enable_comm_duration_events);
}
void set_enable_drive_events(bool value);
void set_enable_drive_events(bool enable_drive_events) {
set_value(enable_drive_events_, enable_drive_events);
}
void set_enable_max_cache_size(bool enable_max_cache_size) {
set_value(enable_max_cache_size_, enable_max_cache_size);
}
#if defined(_WIN32)
void set_enable_mount_manager(bool value);
#endif // defined(_WIN32)
void set_enable_mount_manager(bool enable_mount_manager) {
set_value(enable_mount_manager_, enable_mount_manager);
}
#endif
void set_event_level(const event_level &value);
void set_enable_remote_mount(bool enable_remote_mount);
void set_encrypt_config(encrypt_config value);
void set_event_level(const event_level &level) {
if (set_value(event_level_, level)) {
event_system::instance().raise<event_level_changed>(
event_level_to_string(level));
}
}
void set_eviction_delay_mins(std::uint32_t value);
void set_eviction_delay_mins(std::uint32_t eviction_delay_mins) {
set_value(eviction_delay_mins_, eviction_delay_mins);
}
void set_eviction_uses_accessed_time(bool value);
void set_eviction_uses_accessed_time(bool eviction_uses_accessed_time) {
set_value(eviction_uses_accessed_time_, eviction_uses_accessed_time);
}
void set_high_frequency_interval_secs(std::uint16_t value);
void
set_high_frequency_interval_secs(std::uint8_t high_frequency_interval_secs) {
set_value(high_freq_interval_secs_, high_frequency_interval_secs);
}
void set_host_config(host_config value);
#if defined(PROJECT_TESTING)
void set_host_config(host_config hc) {
config_changed_ = true;
hc_ = std::move(hc);
save();
}
void set_low_frequency_interval_secs(std::uint16_t value);
void set_s3_config(s3_config s3) {
config_changed_ = true;
s3_config_ = std::move(s3);
save();
}
#endif
void set_max_cache_size_bytes(std::uint64_t value);
void set_is_remote_mount(bool is_remote_mount);
void set_max_upload_count(std::uint8_t value);
void
set_low_frequency_interval_secs(std::uint32_t low_frequency_interval_secs) {
set_value(low_freq_interval_secs_, low_frequency_interval_secs);
}
void set_med_frequency_interval_secs(std::uint16_t value);
void set_max_cache_size_bytes(std::uint64_t max_cache_size_bytes) {
set_value(max_cache_size_bytes_, max_cache_size_bytes);
}
void set_online_check_retry_secs(std::uint16_t value);
void set_max_upload_count(std::uint8_t max_upload_count) {
set_value(max_upload_count_, max_upload_count);
}
void set_orphaned_file_retention_days(std::uint16_t value);
void set_online_check_retry_secs(std::uint16_t online_check_retry_secs) {
set_value(online_check_retry_secs_, online_check_retry_secs);
}
void set_preferred_download_type(const download_type &value);
void
set_orphaned_file_retention_days(std::uint16_t orphaned_file_retention_days) {
set_value(orphaned_file_retention_days_, orphaned_file_retention_days);
}
void set_remote_config(remote::remote_config value);
void set_preferred_download_type(const download_type &dt) {
set_value(preferred_download_type_, download_type_to_string(dt));
}
void set_remote_mount(remote::remote_mount value);
void set_read_ahead_count(std::uint8_t read_ahead_count) {
set_value(read_ahead_count_, read_ahead_count);
}
void set_retry_read_count(std::uint16_t value);
void set_remote_client_pool_size(std::uint8_t remote_client_pool_size) {
set_value(remote_client_pool_size_, remote_client_pool_size);
}
void set_ring_buffer_file_size(std::uint16_t value);
void set_ring_buffer_file_size(std::uint16_t ring_buffer_file_size) {
set_value(ring_buffer_file_size_, ring_buffer_file_size);
}
void set_s3_config(s3_config value);
void set_remote_host_name_or_ip(const std::string &remote_host_name_or_ip) {
set_value(remote_host_name_or_ip_, remote_host_name_or_ip);
}
void set_sia_config(sia_config value);
void set_remote_max_connections(std::uint8_t remote_max_connections) {
set_value(remote_max_connections_, remote_max_connections);
}
void set_task_wait_ms(std::uint16_t value);
void set_remote_port(std::uint16_t remote_port) {
set_value(remote_port_, remote_port);
}
void
set_remote_receive_timeout_secs(std::uint16_t remote_receive_timeout_secs) {
set_value(remote_receive_timeout_secs_, remote_receive_timeout_secs);
}
void set_remote_send_timeout_secs(std::uint16_t remote_send_timeout_secs) {
set_value(remote_send_timeout_secs_, remote_send_timeout_secs);
}
void set_remote_token(const std::string &remote_token) {
set_value(remote_token_, remote_token);
}
void set_retry_read_count(std::uint16_t retry_read_count) {
set_value(retry_read_count_, retry_read_count);
}
[[nodiscard]] auto set_value_by_name(const std::string &name,
const std::string &value) -> std::string;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_APP_CONFIG_HPP_
#endif // INCLUDE_APP_CONFIG_HPP_

View File

@ -19,14 +19,15 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_CURL_COMM_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_CURL_COMM_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_COMM_HPP_
#define INCLUDE_COMM_CURL_CURL_COMM_HPP_
#include "comm/curl/multi_request.hpp"
#include "comm/i_http_comm.hpp"
#include "events/event_system.hpp"
#include "events/events.hpp"
#include "utils/encryption.hpp"
#include "utils/utils.hpp"
namespace repertory {
class curl_comm final : public i_http_comm {
@ -238,4 +239,4 @@ public:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_CURL_CURL_COMM_HPP_
#endif // INCLUDE_COMM_CURL_CURL_COMM_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_MULTI_REQUEST_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_MULTI_REQUEST_HPP_
#ifndef INCLUDE_COMM_CURL_MULTI_REQUEST_HPP_
#define INCLUDE_COMM_CURL_MULTI_REQUEST_HPP_
#include "types/repertory.hpp"
@ -41,4 +41,4 @@ public:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_CURL_MULTI_REQUEST_HPP_
#endif // INCLUDE_COMM_CURL_MULTI_REQUEST_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_DELETE_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_DELETE_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_DELETE_HPP_
#define INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_DELETE_HPP_
#include "comm/curl/requests/http_request_base.hpp"
@ -28,13 +28,13 @@ namespace repertory::curl::requests {
struct http_delete final : http_request_base {
~http_delete() override = default;
[[nodiscard]] auto
set_method(CURL *curl,
stop_type & /* stop_requested */) const -> bool override {
[[nodiscard]] auto set_method(CURL *curl,
stop_type & /* stop_requested */) const
-> bool override {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
return true;
}
};
} // namespace repertory::curl::requests
#endif // REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_DELETE_HPP_
#endif // INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_DELETE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_GET_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_GET_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_GET_HPP_
#define INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_GET_HPP_
#include "comm/curl/requests/http_request_base.hpp"
@ -33,13 +33,13 @@ struct http_get final : http_request_base {
auto operator=(http_get &&) -> http_get & = default;
~http_get() override = default;
[[nodiscard]] auto
set_method(CURL *curl,
stop_type & /*stop_requested*/) const -> bool override {
[[nodiscard]] auto set_method(CURL *curl,
stop_type & /*stop_requested*/) const
-> bool override {
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
return true;
}
};
} // namespace repertory::curl::requests
#endif // REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_GET_HPP_
#endif // INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_GET_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_HEAD_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_HEAD_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_HEAD_HPP_
#define INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_HEAD_HPP_
#include "comm/curl/requests/http_request_base.hpp"
@ -28,9 +28,9 @@ namespace repertory::curl::requests {
struct http_head final : http_request_base {
~http_head() override = default;
[[nodiscard]] auto
set_method(CURL *curl,
stop_type & /* stop_requested */) const -> bool override {
[[nodiscard]] auto set_method(CURL *curl,
stop_type & /* stop_requested */) const
-> bool override {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "HEAD");
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
return true;
@ -38,4 +38,4 @@ struct http_head final : http_request_base {
};
} // namespace repertory::curl::requests
#endif // REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_HEAD_HPP_
#endif // INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_HEAD_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_POST_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_POST_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_POST_HPP_
#define INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_POST_HPP_
#include "comm/curl/requests/http_request_base.hpp"
@ -36,8 +36,9 @@ struct http_post final : http_request_base {
std::optional<nlohmann::json> json;
[[nodiscard]] auto
set_method(CURL *curl, stop_type & /*stop_requested*/) const -> bool override;
[[nodiscard]] auto set_method(CURL *curl,
stop_type & /*stop_requested*/) const
-> bool override;
private:
mutable curl_slist *headers{nullptr};
@ -45,4 +46,4 @@ private:
};
} // namespace repertory::curl::requests
#endif // REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_POST_HPP_
#endif // INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_POST_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_PUT_FILE_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_PUT_FILE_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_PUT_FILE_HPP_
#define INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_PUT_FILE_HPP_
#include "comm/curl/requests/http_request_base.hpp"
#include "utils/encrypting_reader.hpp"
@ -47,4 +47,4 @@ private:
};
} // namespace repertory::curl::requests
#endif // REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_PUT_FILE_HPP_
#endif // INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_PUT_FILE_HPP_

View File

@ -19,14 +19,16 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_REQUEST_BASE_HPP_
#define REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_REQUEST_BASE_HPP_
#ifndef INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_REQUEST_BASE_HPP_
#define INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_REQUEST_BASE_HPP_
#include "types/repertory.hpp"
#include "utils/file.hpp"
namespace repertory::curl::requests {
using curl_response_callback =
using read_callback = size_t (*)(char *, size_t, size_t, void *);
using response_callback =
std::function<void(const data_buffer &data, long response_code)>;
struct read_file_info final {
@ -35,8 +37,19 @@ struct read_file_info final {
std::uint64_t offset{};
};
[[nodiscard]] auto curl_file_reader(char *buffer, size_t size, size_t nitems,
void *instream) -> size_t;
inline const auto read_file_data = static_cast<read_callback>(
[](char *buffer, size_t size, size_t nitems, void *instream) -> size_t {
auto *read_info = reinterpret_cast<read_file_info *>(instream);
std::size_t bytes_read{};
auto ret =
read_info->file->read(reinterpret_cast<unsigned char *>(buffer),
size * nitems, read_info->offset, &bytes_read);
if (ret) {
read_info->offset += bytes_read;
}
return ret && not read_info->stop_requested ? bytes_read
: CURL_READFUNC_ABORT;
});
struct http_request_base {
http_request_base() = default;
@ -55,16 +68,15 @@ struct http_request_base {
std::string path{};
http_query_parameters query{};
std::optional<http_range> range{};
std::optional<curl_response_callback> response_handler;
std::optional<response_callback> response_handler;
std::optional<http_headers> response_headers;
std::optional<std::uint64_t> total_size{};
[[nodiscard]] virtual auto get_path() const -> std::string { return path; }
[[nodiscard]] virtual auto set_method(CURL *curl,
stop_type &stop_requested) const
-> bool = 0;
[[nodiscard]] virtual auto
set_method(CURL *curl, stop_type &stop_requested) const -> bool = 0;
};
} // namespace repertory::curl::requests
#endif // REPERTORY_INCLUDE_COMM_CURL_REQUESTS_HTTP_REQUEST_BASE_HPP_
#endif // INCLUDE_COMM_CURL_CURL_REQUESTS_HTTP_REQUEST_BASE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_I_HTTP_COMM_HPP_
#define REPERTORY_INCLUDE_COMM_I_HTTP_COMM_HPP_
#ifndef INCLUDE_COMM_I_HTTP_COMM_HPP_
#define INCLUDE_COMM_I_HTTP_COMM_HPP_
#include "comm/curl/requests/http_delete.hpp"
#include "comm/curl/requests/http_get.hpp"
@ -40,23 +40,26 @@ public:
make_request(const curl::requests::http_delete &del, long &response_code,
stop_type &stop_requested) const -> bool = 0;
[[nodiscard]] virtual auto
make_request(const curl::requests::http_get &get, long &response_code,
stop_type &stop_requested) const -> bool = 0;
[[nodiscard]] virtual auto make_request(const curl::requests::http_get &get,
long &response_code,
stop_type &stop_requested) const
-> bool = 0;
[[nodiscard]] virtual auto
make_request(const curl::requests::http_head &head, long &response_code,
stop_type &stop_requested) const -> bool = 0;
[[nodiscard]] virtual auto make_request(const curl::requests::http_head &head,
long &response_code,
stop_type &stop_requested) const
-> bool = 0;
[[nodiscard]] virtual auto
make_request(const curl::requests::http_post &post, long &response_code,
stop_type &stop_requested) const -> bool = 0;
[[nodiscard]] virtual auto make_request(const curl::requests::http_post &post,
long &response_code,
stop_type &stop_requested) const
-> bool = 0;
[[nodiscard]] virtual auto
make_request(const curl::requests::http_put_file &put_file,
long &response_code,
stop_type &stop_requested) const -> bool = 0;
long &response_code, stop_type &stop_requested) const
-> bool = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_I_HTTP_COMM_HPP_
#endif // INCLUDE_COMM_I_HTTP_COMM_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_PACKET_CLIENT_POOL_HPP_
#define REPERTORY_INCLUDE_COMM_PACKET_CLIENT_POOL_HPP_
#ifndef INCLUDE_COMM_PACKET_CLIENT_POOL_HPP_
#define INCLUDE_COMM_PACKET_CLIENT_POOL_HPP_
#include "comm/packet/packet.hpp"
#include "types/repertory.hpp"
@ -107,4 +107,4 @@ public:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_PACKET_CLIENT_POOL_HPP_
#endif // INCLUDE_COMM_PACKET_CLIENT_POOL_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_PACKET_PACKET_HPP_
#define REPERTORY_INCLUDE_COMM_PACKET_PACKET_HPP_
#ifndef INCLUDE_COMM_PACKET_PACKET_HPP_
#define INCLUDE_COMM_PACKET_PACKET_HPP_
#include "types/remote.hpp"
#include "types/repertory.hpp"
@ -52,23 +52,23 @@ public:
~packet() = default;
private:
data_buffer buffer_{};
std::size_t decode_offset_{0U};
data_buffer buffer_;
std::size_t decode_offset_ = 0U;
public:
[[nodiscard]] static auto decode_json(packet &response, json &json_data)
-> int;
[[nodiscard]] static auto decode_json(packet &response,
json &json_data) -> int;
public:
void clear();
[[nodiscard]] auto current_pointer() -> unsigned char * {
return (decode_offset_ < buffer_.size()) ? &buffer_.at(decode_offset_)
return (decode_offset_ < buffer_.size()) ? &buffer_[decode_offset_]
: nullptr;
}
[[nodiscard]] auto current_pointer() const -> const unsigned char * {
return (decode_offset_ < buffer_.size()) ? &buffer_.at(decode_offset_)
return (decode_offset_ < buffer_.size()) ? &buffer_[decode_offset_]
: nullptr;
}
@ -206,7 +206,7 @@ public:
return static_cast<std::uint32_t>(buffer_.size());
}
void to_buffer(data_buffer &buffer);
void transfer_into(data_buffer &buffer);
public:
auto operator=(const data_buffer &buffer) noexcept -> packet &;
@ -226,6 +226,8 @@ public:
return buffer_.at(index);
}
};
using packet = packet;
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_PACKET_PACKET_HPP_
#endif // INCLUDE_COMM_PACKET_PACKET_HPP_

View File

@ -19,11 +19,10 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_PACKET_PACKET_CLIENT_HPP_
#define REPERTORY_INCLUDE_COMM_PACKET_PACKET_CLIENT_HPP_
#ifndef INCLUDE_COMM_PACKET_PACKET_CLIENT_HPP_
#define INCLUDE_COMM_PACKET_PACKET_CLIENT_HPP_
#include "comm/packet/packet.hpp"
#include "types/remote.hpp"
using boost::asio::ip::tcp;
@ -37,7 +36,9 @@ private:
};
public:
packet_client(remote::remote_config cfg);
packet_client(std::string host_name_or_ip, std::uint8_t max_connections,
std::uint16_t port, std::uint16_t receive_timeout,
std::uint16_t send_timeout, std::string encryption_token);
~packet_client();
@ -48,7 +49,12 @@ public:
private:
boost::asio::io_context io_context_;
remote::remote_config cfg_;
std::string host_name_or_ip_;
std::uint8_t max_connections_;
std::uint16_t port_;
std::uint16_t receive_timeout_;
std::uint16_t send_timeout_;
std::string encryption_token_;
std::string unique_id_;
private:
@ -69,22 +75,22 @@ private:
void put_client(std::shared_ptr<client> &cli);
[[nodiscard]] auto read_packet(client &cli, packet &response)
-> packet::error_type;
[[nodiscard]] auto read_packet(client &cli,
packet &response) -> packet::error_type;
void resolve();
public:
[[nodiscard]] auto send(std::string_view method, std::uint32_t &service_flags)
-> packet::error_type;
[[nodiscard]] auto send(std::string_view method,
std::uint32_t &service_flags) -> packet::error_type;
[[nodiscard]] auto send(std::string_view method, packet &request,
std::uint32_t &service_flags) -> packet::error_type;
[[nodiscard]] auto send(std::string_view method, packet &request,
packet &response, std::uint32_t &service_flags)
-> packet::error_type;
packet &response,
std::uint32_t &service_flags) -> packet::error_type;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_PACKET_PACKET_CLIENT_HPP_
#endif // INCLUDE_COMM_PACKET_PACKET_CLIENT_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMM_PACKET_PACKET_SERVER_HPP_
#define REPERTORY_INCLUDE_COMM_PACKET_PACKET_SERVER_HPP_
#ifndef INCLUDE_COMM_PACKET_PACKET_SERVER_HPP_
#define INCLUDE_COMM_PACKET_PACKET_SERVER_HPP_
#include "comm/packet/client_pool.hpp"
#include "utils/common.hpp"
@ -52,8 +52,8 @@ public:
private:
struct connection {
connection(io_context &ctx, tcp::acceptor &acceptor_)
: socket(ctx), acceptor(acceptor_) {}
connection(boost::asio::io_service &io_service, tcp::acceptor &acceptor_)
: socket(io_service), acceptor(acceptor_) {}
tcp::socket socket;
tcp::acceptor &acceptor;
@ -68,7 +68,7 @@ private:
std::string encryption_token_;
closed_callback closed_;
message_handler_callback message_handler_;
io_context io_context_;
boost::asio::io_context io_context_;
std::unique_ptr<std::thread> server_thread_;
std::vector<std::thread> service_threads_;
std::recursive_mutex connection_mutex_;
@ -95,4 +95,4 @@ private:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_COMM_PACKET_PACKET_SERVER_HPP_
#endif // INCLUDE_COMM_PACKET_PACKET_SERVER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_COMMON_HPP_
#define REPERTORY_INCLUDE_COMMON_HPP_
#ifndef INCLUDE_COMMON_HPP_
#define INCLUDE_COMMON_HPP_
#if defined(__GNUC__)
// clang-format off
@ -221,25 +221,44 @@ using WCHAR = wchar_t;
#define MAX_PATH 260
#define STATUS_SUCCESS std::uint32_t{0U}
#define STATUS_ACCESS_DENIED std::uint32_t{0xC0000022L}
#define STATUS_DEVICE_BUSY std::uint32_t{0x80000011L}
#define STATUS_DEVICE_INSUFFICIENT_RESOURCES std::uint32_t{0xC0000468L}
#define STATUS_DIRECTORY_NOT_EMPTY std::uint32_t{0xC0000101L}
#define STATUS_FILE_IS_A_DIRECTORY std::uint32_t{0xC00000BAL}
#define STATUS_FILE_TOO_LARGE std::uint32_t{0xC0000904L}
#define STATUS_INSUFFICIENT_RESOURCES std::uint32_t{0xC000009AL}
#define STATUS_INTERNAL_ERROR std::uint32_t{0xC00000E5L}
#define STATUS_INVALID_ADDRESS std::uint32_t{0xC0000141L}
#define STATUS_INVALID_HANDLE std::uint32_t{0xC0000006L}
#define STATUS_INVALID_IMAGE_FORMAT std::uint32_t{0xC000007BL}
#define STATUS_INVALID_PARAMETER std::uint32_t{0xC000000DL}
#define STATUS_NO_MEMORY std::uint32_t{0xC0000017L}
#define STATUS_NOT_IMPLEMENTED std::uint32_t{0xC0000002L}
#define STATUS_OBJECT_NAME_EXISTS std::uint32_t{0x40000000L}
#define STATUS_OBJECT_NAME_NOT_FOUND std::uint32_t{0xC0000034L}
#define STATUS_OBJECT_PATH_INVALID std::uint32_t{0xC0000039L}
#define STATUS_UNEXPECTED_IO_ERROR std::uint32_t{0xC00000E9L}
#define STATUS_SUCCESS \
std::uint32_t { 0U }
#define STATUS_ACCESS_DENIED \
std::uint32_t { 0xC0000022L }
#define STATUS_DEVICE_BUSY \
std::uint32_t { 0x80000011L }
#define STATUS_DEVICE_INSUFFICIENT_RESOURCES \
std::uint32_t { 0xC0000468L }
#define STATUS_DIRECTORY_NOT_EMPTY \
std::uint32_t { 0xC0000101L }
#define STATUS_FILE_IS_A_DIRECTORY \
std::uint32_t { 0xC00000BAL }
#define STATUS_FILE_TOO_LARGE \
std::uint32_t { 0xC0000904L }
#define STATUS_INSUFFICIENT_RESOURCES \
std::uint32_t { 0xC000009AL }
#define STATUS_INTERNAL_ERROR \
std::uint32_t { 0xC00000E5L }
#define STATUS_INVALID_ADDRESS \
std::uint32_t { 0xC0000141L }
#define STATUS_INVALID_HANDLE \
std::uint32_t { 0xC0000006L }
#define STATUS_INVALID_IMAGE_FORMAT \
std::uint32_t { 0xC000007BL }
#define STATUS_INVALID_PARAMETER \
std::uint32_t { 0xC000000DL }
#define STATUS_NO_MEMORY \
std::uint32_t { 0xC0000017L }
#define STATUS_NOT_IMPLEMENTED \
std::uint32_t { 0xC0000002L }
#define STATUS_OBJECT_NAME_EXISTS \
std::uint32_t { 0x40000000L }
#define STATUS_OBJECT_NAME_NOT_FOUND \
std::uint32_t { 0xC0000034L }
#define STATUS_OBJECT_PATH_INVALID \
std::uint32_t { 0xC0000039L }
#define STATUS_UNEXPECTED_IO_ERROR \
std::uint32_t { 0xC00000E9L }
#define CONVERT_STATUS_NOT_IMPLEMENTED(e) \
((std::uint32_t(e) == STATUS_NOT_IMPLEMENTED) ? -ENOTSUP : e)
@ -277,8 +296,8 @@ using namespace Fsp;
#define INTERFACE_SETUP(name) \
public: \
name(const name &) noexcept = delete; \
auto operator=(const name &) noexcept -> name & = delete; \
auto operator=(name &&) noexcept -> name & = delete; \
name &operator=(const name &) noexcept = delete; \
name &operator=(name &&) noexcept = delete; \
\
protected: \
name() = default; \
@ -288,4 +307,4 @@ public: \
virtual ~name() = default
#endif // __cplusplus
#endif // REPERTORY_INCLUDE_COMMON_HPP_
#endif // INCLUDE_COMMON_HPP_

View File

@ -0,0 +1,247 @@
/*
Copyright <2018-2024> <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 INCLUDE_DATABASE_DB_COMMON_HPP_
#define INCLUDE_DATABASE_DB_COMMON_HPP_
#include "utils/error_utils.hpp"
namespace repertory::db {
using db_types_t = std::variant<std::int64_t, std::string>;
struct sqlite3_deleter {
void operator()(sqlite3 *db3) {
if (db3 != nullptr) {
sqlite3_close_v2(db3);
}
}
};
using db3_t = std::unique_ptr<sqlite3, sqlite3_deleter>;
struct sqlite3_statement_deleter {
void operator()(sqlite3_stmt *stmt) {
if (stmt != nullptr) {
sqlite3_finalize(stmt);
}
}
};
using db3_stmt_t = std::unique_ptr<sqlite3_stmt, sqlite3_statement_deleter>;
struct comp_data_t final {
std::string column_name;
std::string op_type;
db_types_t value;
};
class db_column final {
public:
db_column() noexcept = default;
db_column(const db_column &) = default;
db_column(db_column &&column) noexcept = default;
~db_column() = default;
auto operator=(const db_column &) -> db_column & = default;
auto operator=(db_column &&) -> db_column & = default;
db_column(std::int32_t index, std::string name, db_types_t value) noexcept
: index_(index), name_(std::move(name)), value_(std::move(value)) {}
private:
std::int32_t index_{};
std::string name_;
db_types_t value_;
public:
[[nodiscard]] auto get_index() const -> std::int32_t { return index_; }
[[nodiscard]] auto get_name() const -> std::string { return name_; }
template <typename data_type>
[[nodiscard]] auto get_value() const -> data_type {
return std::visit(
overloaded{
[](const data_type &value) -> data_type { return value; },
[](auto &&) -> data_type {
throw std::runtime_error("data type not supported");
},
},
value_);
}
[[nodiscard]] auto get_value_as_json() const -> nlohmann::json {
return std::visit(
overloaded{
[this](std::int64_t value) -> auto {
return nlohmann::json({{name_, value}});
},
[](auto &&value) -> auto { return nlohmann::json::parse(value); },
},
value_);
}
};
template <typename context_t> class db_row final {
public:
db_row(std::shared_ptr<context_t> context) {
auto column_count = sqlite3_column_count(context->stmt.get());
for (std::int32_t col = 0; col < column_count; col++) {
std::string name{sqlite3_column_name(context->stmt.get(), col)};
auto column_type = sqlite3_column_type(context->stmt.get(), col);
db_types_t value;
switch (column_type) {
case SQLITE_INTEGER: {
value = sqlite3_column_int64(context->stmt.get(), col);
} break;
case SQLITE_TEXT: {
const auto *text = reinterpret_cast<const char *>(
sqlite3_column_text(context->stmt.get(), col));
value = std::string(text == nullptr ? "" : text);
} break;
default:
throw std::runtime_error("column type not implemented|" + name + '|' +
std::to_string(column_type));
}
columns_[name] = db_column{col, name, value};
}
}
private:
std::map<std::string, db_column> columns_;
public:
[[nodiscard]] auto get_columns() const -> std::vector<db_column> {
std::vector<db_column> ret;
for (const auto &item : columns_) {
ret.push_back(item.second);
}
return ret;
}
[[nodiscard]] auto get_column(std::int32_t index) const -> db_column {
auto iter = std::find_if(columns_.begin(), columns_.end(),
[&index](auto &&col) -> bool {
return col.second.get_index() == index;
});
if (iter == columns_.end()) {
throw std::out_of_range("");
}
return iter->second;
}
[[nodiscard]] auto get_column(std::string name) const -> db_column {
return columns_.at(name);
}
};
template <typename context_t> struct db_result final {
db_result(std::shared_ptr<context_t> context, std::int32_t res)
: context_(std::move(context)), res_(res) {
constexpr const auto *function_name =
static_cast<const char *>(__FUNCTION__);
if (res == SQLITE_OK) {
set_res(sqlite3_step(context_->stmt.get()), function_name);
}
}
private:
std::shared_ptr<context_t> context_;
mutable std::int32_t res_;
private:
void set_res(std::int32_t res, std::string_view function) const {
if (res != SQLITE_OK && res != SQLITE_DONE && res != SQLITE_ROW) {
utils::error::raise_error(function, "failed to step|" +
std::to_string(res) + '|' +
sqlite3_errstr(res));
}
res_ = res;
}
public:
[[nodiscard]] auto ok() const -> bool {
return res_ == SQLITE_DONE || res_ == SQLITE_ROW;
}
[[nodiscard]] auto get_error() const -> std::int32_t { return res_; }
[[nodiscard]] auto get_error_str() const -> std::string {
return sqlite3_errstr(res_);
}
[[nodiscard]] auto
get_row(std::optional<db_row<context_t>> &row) const -> bool {
constexpr const auto *function_name =
static_cast<const char *>(__FUNCTION__);
row.reset();
if (has_row()) {
row = db_row{context_};
set_res(sqlite3_step(context_->stmt.get()), function_name);
return true;
}
return false;
}
[[nodiscard]] auto has_row() const -> bool { return res_ == SQLITE_ROW; }
void next_row() const {
constexpr const auto *function_name =
static_cast<const char *>(__FUNCTION__);
if (has_row()) {
set_res(sqlite3_step(context_->stmt.get()), function_name);
}
}
};
inline void set_journal_mode(sqlite3 &db3) {
sqlite3_exec(&db3, "PRAGMA journal_mode = WAL;PRAGMA synchronous = NORMAL;",
nullptr, nullptr, nullptr);
}
[[nodiscard]] inline auto execute_sql(sqlite3 &db3, const std::string &sql,
std::string &err) -> bool {
char *err_msg{nullptr};
auto res = sqlite3_exec(&db3, sql.c_str(), nullptr, nullptr, &err_msg);
if (err_msg != nullptr) {
err = err_msg;
sqlite3_free(err_msg);
err_msg = nullptr;
}
if (res != SQLITE_OK) {
err = "failed to execute sql|" + sql + "|" + std::to_string(res) + '|' +
(err.empty() ? sqlite3_errstr(res) : err);
return false;
}
return true;
}
} // namespace repertory::db
#endif // INCLUDE_DATABASE_DB_COMMON_HPP_

View File

@ -19,46 +19,51 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_UTILS_DB_SQLITE_DB_INSERT_HPP_
#define REPERTORY_INCLUDE_UTILS_DB_SQLITE_DB_INSERT_HPP_
#if defined(PROJECT_ENABLE_SQLITE)
#ifndef INCLUDE_DATABASE_DB_INSERT_HPP_
#define INCLUDE_DATABASE_DB_INSERT_HPP_
#include "utils/db/sqlite/db_common.hpp"
#include "database/db_common.hpp"
#include "utils/error_utils.hpp"
namespace repertory::utils::db::sqlite {
namespace repertory::db {
class db_insert final {
public:
struct context final : db_context_t {
context(sqlite3 *db3_, std::string table_name_)
: db_context_t(db3_, table_name_) {}
struct context final {
context(sqlite3 &db3_, std::string table_name_)
: db3(db3_), table_name(std::move(table_name_)) {}
sqlite3 &db3;
std::string table_name;
bool or_replace{false};
std::map<std::string, db_types_t> values;
std::map<std::string, db_types_t> values{};
db3_stmt_t stmt{nullptr};
};
using row = db_row<context>;
public:
db_insert(sqlite3 &db3, std::string table_name)
: ctx_(std::make_shared<context>(&db3, table_name)) {}
: context_(std::make_shared<context>(db3, table_name)) {}
db_insert(std::shared_ptr<context> ctx) : ctx_(std::move(ctx)) {}
db_insert(std::shared_ptr<context> ctx) : context_(std::move(ctx)) {}
private:
std::shared_ptr<context> ctx_;
std::shared_ptr<context> context_;
public:
[[nodiscard]] auto or_replace() -> db_insert {
ctx_->or_replace = true;
[[nodiscard]] auto or_replace() -> db_insert & {
context_->or_replace = true;
return *this;
}
[[nodiscard]] auto column_value(std::string column_name, db_types_t value)
-> db_insert;
-> db_insert &;
[[nodiscard]] auto dump() const -> std::string;
[[nodiscard]] auto go() const -> db_result;
[[nodiscard]] auto go() const -> db_result<context>;
};
} // namespace repertory::utils::db::sqlite
} // namespace repertory::db
#endif // defined(PROJECT_ENABLE_SQLITE)
#endif // REPERTORY_INCLUDE_UTILS_DB_SQLITE_DB_INSERT_HPP_
#endif // INCLUDE_DATABASE_DB_INSERT_HPP_

View File

@ -0,0 +1,125 @@
/*
Copyright <2018-2024> <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 INCLUDE_DATABASE_DB_SELECT_HPP_
#define INCLUDE_DATABASE_DB_SELECT_HPP_
#include "database/db_common.hpp"
#include "utils/error_utils.hpp"
namespace repertory::db {
class db_select final {
public:
struct context final {
context(sqlite3 &db3_, std::string table_name_)
: db3(db3_), table_name(std::move(table_name_)) {}
sqlite3 &db3;
std::string table_name;
std::vector<comp_data_t> ands{};
std::vector<std::string> columns{};
std::map<std::string, std::string> count_columns{};
bool delete_query{false};
std::optional<std::int32_t> limit;
std::optional<std::pair<std::string, bool>> order_by;
db3_stmt_t stmt{nullptr};
};
using row = db_row<context>;
public:
db_select(sqlite3 &db3, std::string table_name)
: context_(std::make_shared<context>(db3, table_name)) {}
db_select(std::shared_ptr<context> ctx) : context_(std::move(ctx)) {}
public:
struct db_where final {
db_where(std::shared_ptr<context> ctx, std::string column_name)
: context_(std::move(ctx)), column_name_(std::move(column_name)) {}
public:
struct db_where_next final {
db_where_next(std::shared_ptr<context> ctx) : context_(std::move(ctx)) {}
private:
std::shared_ptr<context> context_;
public:
[[nodiscard]] auto and_where(std::string column_name) const -> db_where {
return db_where{context_, column_name};
}
[[nodiscard]] auto dump() const -> std::string {
return db_select{context_}.dump();
}
[[nodiscard]] auto go() const -> db_result<context> {
return db_select{context_}.go();
}
[[nodiscard]] auto limit(std::int32_t value) const -> db_select {
return db_select{context_}.limit(value);
}
[[nodiscard]] auto order_by(std::string column_name, bool ascending) const
-> db_select {
return db_select{context_}.order_by(column_name, ascending);
}
};
private:
std::shared_ptr<context> context_;
std::string column_name_;
public:
[[nodiscard]] auto equals(db_types_t value) const -> db_where_next {
context_->ands.emplace_back(comp_data_t{column_name_, "=", value});
return db_where_next{context_};
}
};
private:
std::shared_ptr<context> context_;
public:
[[nodiscard]] auto column(std::string column_name) -> db_select &;
[[nodiscard]] auto count(std::string column_name, std::string as_column_name)
-> db_select &;
[[nodiscard]] auto delete_query() -> db_select &;
[[nodiscard]] auto dump() const -> std::string;
[[nodiscard]] auto go() const -> db_result<context>;
[[nodiscard]] auto limit(std::int32_t value) -> db_select &;
[[nodiscard]] auto order_by(std::string column_name, bool ascending)
-> db_select &;
[[nodiscard]] auto where(std::string column_name) const -> db_where;
};
} // namespace repertory::db
#endif // INCLUDE_DATABASE_DB_SELECT_HPP_

View File

@ -1,34 +0,0 @@
/*
Copyright <2018-2024> <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_DB_FILE_DB_HPP_
#define REPERTORY_INCLUDE_DB_FILE_DB_HPP_
#include "db/i_file_db.hpp"
namespace repertory {
class app_config;
[[nodiscard]] auto create_file_db(const app_config &cfg)
-> std::unique_ptr<i_file_db>;
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_FILE_DB_HPP_

View File

@ -1,34 +0,0 @@
/*
Copyright <2018-2024> <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_DB_FILE_MGR_DB_HPP_
#define REPERTORY_INCLUDE_DB_FILE_MGR_DB_HPP_
#include "db/i_file_mgr_db.hpp"
namespace repertory {
class app_config;
[[nodiscard]] auto
create_file_mgr_db(const app_config &cfg) -> std::unique_ptr<i_file_mgr_db>;
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_FILE_MGR_DB_HPP_

View File

@ -1,95 +0,0 @@
/*
Copyright <2018-2024> <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_DB_I_FILE_DB_HPP_
#define REPERTORY_INCLUDE_DB_I_FILE_DB_HPP_
#include "types/repertory.hpp"
namespace repertory {
class i_file_db {
INTERFACE_SETUP(i_file_db);
public:
struct file_info final {
std::string api_path;
bool directory;
std::string source_path;
};
struct file_data final {
std::string api_path;
std::uint64_t file_size{};
std::vector<
std::array<unsigned char, crypto_aead_xchacha20poly1305_IETF_NPUBBYTES>>
iv_list{};
std::string source_path;
};
public:
[[nodiscard]] virtual auto add_directory(const std::string &api_path,
const std::string &source_path)
-> api_error = 0;
[[nodiscard]] virtual auto add_or_update_file(const file_data &data)
-> api_error = 0;
virtual void clear() = 0;
[[nodiscard]] virtual auto count() const -> std::uint64_t = 0;
[[nodiscard]] virtual auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error = 0;
[[nodiscard]] virtual auto
get_directory_api_path(const std::string &source_path,
std::string &api_path) const -> api_error = 0;
[[nodiscard]] virtual auto
get_directory_source_path(const std::string &api_path,
std::string &source_path) const -> api_error = 0;
[[nodiscard]] virtual auto get_file_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error = 0;
[[nodiscard]] virtual auto get_file_data(const std::string &api_path,
file_data &data) const
-> api_error = 0;
[[nodiscard]] virtual auto
get_file_source_path(const std::string &api_path,
std::string &source_path) const -> api_error = 0;
[[nodiscard]] virtual auto get_item_list() const
-> std::vector<file_info> = 0;
[[nodiscard]] virtual auto get_source_path(const std::string &api_path,
std::string &source_path) const
-> api_error = 0;
[[nodiscard]] virtual auto remove_item(const std::string &api_path)
-> api_error = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_I_FILE_DB_HPP_

View File

@ -1,86 +0,0 @@
/*
Copyright <2018-2024> <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_DB_I_FILE_MGR_DB_HPP_
#define REPERTORY_INCLUDE_DB_I_FILE_MGR_DB_HPP_
#include "types/repertory.hpp"
namespace repertory {
class i_file_mgr_db {
INTERFACE_SETUP(i_file_mgr_db);
public:
struct resume_entry final {
std::string api_path;
std::uint64_t chunk_size{};
boost::dynamic_bitset<> read_state;
std::string source_path;
};
struct upload_active_entry final {
std::string api_path;
std::string source_path;
};
struct upload_entry final {
std::string api_path;
std::string source_path;
};
public:
[[nodiscard]] virtual auto add_resume(const resume_entry &entry) -> bool = 0;
[[nodiscard]] virtual auto add_upload(const upload_entry &entry) -> bool = 0;
[[nodiscard]] virtual auto add_upload_active(const upload_active_entry &entry)
-> bool = 0;
virtual void clear() = 0;
[[nodiscard]] virtual auto get_next_upload() const
-> std::optional<upload_entry> = 0;
[[nodiscard]] virtual auto get_resume_list() const
-> std::vector<resume_entry> = 0;
[[nodiscard]] virtual auto get_upload(const std::string &api_path) const
-> std::optional<upload_entry> = 0;
[[nodiscard]] virtual auto get_upload_active_list() const
-> std::vector<upload_active_entry> = 0;
[[nodiscard]] virtual auto remove_resume(const std::string &api_path)
-> bool = 0;
[[nodiscard]] virtual auto remove_upload(const std::string &api_path)
-> bool = 0;
[[nodiscard]] virtual auto remove_upload_active(const std::string &api_path)
-> bool = 0;
[[nodiscard]] virtual auto rename_resume(const std::string &from_api_path,
const std::string &to_api_path)
-> bool = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_I_FILE_MGR_DB_HPP_

View File

@ -1,78 +0,0 @@
/*
Copyright <2018-2024> <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_DB_I_META_DB_HPP_
#define REPERTORY_INCLUDE_DB_I_META_DB_HPP_
#include "types/repertory.hpp"
namespace repertory {
class i_meta_db {
INTERFACE_SETUP(i_meta_db);
public:
virtual void clear() = 0;
[[nodiscard]] virtual auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error = 0;
[[nodiscard]] virtual auto get_api_path_list() const
-> std::vector<std::string> = 0;
[[nodiscard]] virtual auto 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,
const std::string &key,
std::string &value) const
-> api_error = 0;
[[nodiscard]] virtual auto get_pinned_files() const
-> std::vector<std::string> = 0;
[[nodiscard]] virtual auto get_total_item_count() const -> std::uint64_t = 0;
[[nodiscard]] virtual auto get_total_size() const -> std::uint64_t = 0;
virtual void remove_api_path(const std::string &api_path) = 0;
[[nodiscard]] virtual auto remove_item_meta(const std::string &api_path,
const std::string &key)
-> api_error = 0;
[[nodiscard]] virtual auto rename_item_meta(const std::string &from_api_path,
const std::string &to_api_path)
-> api_error = 0;
[[nodiscard]] virtual auto set_item_meta(const std::string &api_path,
const std::string &key,
const std::string &value)
-> api_error = 0;
[[nodiscard]] virtual auto set_item_meta(const std::string &api_path,
const api_meta_map &meta)
-> api_error = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_I_META_DB_HPP_

View File

@ -1,117 +0,0 @@
/*
Copyright <2018-2024> <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_DB_IMPL_RDB_FILE_DB_HPP_
#define REPERTORY_INCLUDE_DB_IMPL_RDB_FILE_DB_HPP_
#include "db/i_file_db.hpp"
namespace repertory {
class app_config;
class rdb_file_db final : public i_file_db {
public:
rdb_file_db(const app_config &cfg);
~rdb_file_db() override;
rdb_file_db(const rdb_file_db &) = delete;
rdb_file_db(rdb_file_db &&) = delete;
auto operator=(const rdb_file_db &) -> rdb_file_db & = delete;
auto operator=(rdb_file_db &&) -> rdb_file_db & = delete;
private:
const app_config &cfg_;
private:
std::unique_ptr<rocksdb::TransactionDB> db_{nullptr};
rocksdb::ColumnFamilyHandle *directory_family_{};
rocksdb::ColumnFamilyHandle *file_family_{};
rocksdb::ColumnFamilyHandle *path_family_{};
rocksdb::ColumnFamilyHandle *source_family_{};
private:
void create_or_open(bool clear);
[[nodiscard]] auto create_iterator(rocksdb::ColumnFamilyHandle *family) const
-> std::shared_ptr<rocksdb::Iterator>;
[[nodiscard]] static auto
perform_action(std::string_view function_name,
std::function<rocksdb::Status()> action) -> api_error;
[[nodiscard]] auto perform_action(
std::string_view function_name,
std::function<rocksdb::Status(rocksdb::Transaction *txn)> action)
-> api_error;
[[nodiscard]] auto remove_item(const std::string &api_path,
const std::string &source_path,
rocksdb::Transaction *txn) -> rocksdb::Status;
public:
[[nodiscard]] auto
add_directory(const std::string &api_path,
const std::string &source_path) -> api_error override;
[[nodiscard]] auto
add_or_update_file(const i_file_db::file_data &data) -> api_error override;
void clear() override;
[[nodiscard]] auto count() const -> std::uint64_t override;
[[nodiscard]] auto
get_api_path(const std::string &source_path,
std::string &api_path) const -> api_error override;
[[nodiscard]] auto
get_directory_api_path(const std::string &source_path,
std::string &api_path) const -> api_error override;
[[nodiscard]] auto get_directory_source_path(const std::string &api_path,
std::string &source_path) const
-> api_error override;
[[nodiscard]] auto
get_file_api_path(const std::string &source_path,
std::string &api_path) const -> api_error override;
[[nodiscard]] auto
get_file_data(const std::string &api_path,
i_file_db::file_data &data) const -> api_error override;
[[nodiscard]] auto
get_file_source_path(const std::string &api_path,
std::string &source_path) const -> api_error override;
[[nodiscard]] auto
get_item_list() const -> std::vector<i_file_db::file_info> override;
[[nodiscard]] auto
get_source_path(const std::string &api_path,
std::string &source_path) const -> api_error override;
[[nodiscard]] auto
remove_item(const std::string &api_path) -> api_error override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_IMPL_RDB_FILE_DB_HPP_

View File

@ -1,109 +0,0 @@
/*
Copyright <2018-2024> <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_DB_IMPL_RDB_FILE_MGR_DB_HPP_
#define REPERTORY_INCLUDE_DB_IMPL_RDB_FILE_MGR_DB_HPP_
#include "db/i_file_mgr_db.hpp"
namespace repertory {
class app_config;
class rdb_file_mgr_db final : public i_file_mgr_db {
public:
rdb_file_mgr_db(const app_config &cfg);
~rdb_file_mgr_db() override;
rdb_file_mgr_db(const rdb_file_mgr_db &) = delete;
rdb_file_mgr_db(rdb_file_mgr_db &&) = delete;
auto operator=(const rdb_file_mgr_db &) -> rdb_file_mgr_db & = delete;
auto operator=(rdb_file_mgr_db &&) -> rdb_file_mgr_db & = delete;
private:
const app_config &cfg_;
private:
std::unique_ptr<rocksdb::TransactionDB> db_{nullptr};
std::atomic<std::uint64_t> id_{0U};
rocksdb::ColumnFamilyHandle *resume_family_{};
rocksdb::ColumnFamilyHandle *upload_active_family_{};
rocksdb::ColumnFamilyHandle *upload_family_{};
private:
void create_or_open(bool clear);
[[nodiscard]] auto create_iterator(rocksdb::ColumnFamilyHandle *family) const
-> std::shared_ptr<rocksdb::Iterator>;
[[nodiscard]] static auto
perform_action(std::string_view function_name,
std::function<rocksdb::Status()> action) -> bool;
[[nodiscard]] auto perform_action(
std::string_view function_name,
std::function<rocksdb::Status(rocksdb::Transaction *txn)> action) -> bool;
[[nodiscard]] auto remove_resume(const std::string &api_path,
rocksdb::Transaction *txn)
-> rocksdb::Status;
[[nodiscard]] auto add_resume(const resume_entry &entry,
rocksdb::Transaction *txn) -> rocksdb::Status;
public:
[[nodiscard]] auto add_resume(const resume_entry &entry) -> bool override;
[[nodiscard]] auto add_upload(const upload_entry &entry) -> bool override;
[[nodiscard]] auto add_upload_active(const upload_active_entry &entry)
-> bool override;
void clear() override;
[[nodiscard]] auto get_next_upload() const
-> std::optional<upload_entry> override;
[[nodiscard]] auto get_resume_list() const
-> std::vector<resume_entry> override;
[[nodiscard]] auto get_upload(const std::string &api_path) const
-> std::optional<upload_entry> override;
[[nodiscard]] auto get_upload_active_list() const
-> std::vector<upload_active_entry> override;
[[nodiscard]] auto remove_resume(const std::string &api_path)
-> bool override;
[[nodiscard]] auto remove_upload(const std::string &api_path)
-> bool override;
[[nodiscard]] auto remove_upload_active(const std::string &api_path)
-> bool override;
[[nodiscard]] auto rename_resume(const std::string &from_api_path,
const std::string &to_api_path)
-> bool override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_IMPL_RDB_FILE_MGR_DB_HPP_

View File

@ -1,127 +0,0 @@
/*
Copyright <2018-2024> <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_DB_IMPL_RDB_META_DB_HPP_
#define REPERTORY_INCLUDE_DB_IMPL_RDB_META_DB_HPP_
#include "db/i_meta_db.hpp"
#include "types/repertory.hpp"
namespace repertory {
class app_config;
class rdb_meta_db final : public i_meta_db {
public:
rdb_meta_db(const app_config &cfg);
~rdb_meta_db() override;
rdb_meta_db(const rdb_meta_db &) = delete;
rdb_meta_db(rdb_meta_db &&) = delete;
auto operator=(const rdb_meta_db &) -> rdb_meta_db & = delete;
auto operator=(rdb_meta_db &&) -> rdb_meta_db & = delete;
private:
const app_config &cfg_;
private:
std::unique_ptr<rocksdb::TransactionDB> db_{nullptr};
rocksdb::ColumnFamilyHandle *meta_family_{};
rocksdb::ColumnFamilyHandle *pinned_family_{};
rocksdb::ColumnFamilyHandle *size_family_{};
rocksdb::ColumnFamilyHandle *source_family_{};
private:
[[nodiscard]] auto create_iterator(rocksdb::ColumnFamilyHandle *family) const
-> std::shared_ptr<rocksdb::Iterator>;
void create_or_open(bool clear);
[[nodiscard]] auto get_item_meta_json(const std::string &api_path,
json &json_data) const -> api_error;
[[nodiscard]] static auto
perform_action(std::string_view function_name,
std::function<rocksdb::Status()> action) -> api_error;
[[nodiscard]] auto perform_action(
std::string_view function_name,
std::function<rocksdb::Status(rocksdb::Transaction *txn)> action)
-> api_error;
[[nodiscard]] auto remove_api_path(const std::string &api_path,
const std::string &source_path,
rocksdb::Transaction *txn)
-> rocksdb::Status;
[[nodiscard]] auto update_item_meta(const std::string &api_path,
json json_data,
rocksdb::Transaction *base_txn = nullptr,
rocksdb::Status *status = nullptr)
-> api_error;
public:
void clear() override;
[[nodiscard]] auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;
[[nodiscard]] auto get_api_path_list() const
-> std::vector<std::string> override;
[[nodiscard]] auto get_item_meta(const std::string &api_path,
api_meta_map &meta) const
-> api_error override;
[[nodiscard]] auto get_item_meta(const std::string &api_path,
const std::string &key,
std::string &value) const
-> api_error override;
[[nodiscard]] auto get_pinned_files() const
-> std::vector<std::string> override;
[[nodiscard]] auto get_total_item_count() const -> std::uint64_t override;
[[nodiscard]] auto get_total_size() const -> std::uint64_t override;
void remove_api_path(const std::string &api_path) override;
[[nodiscard]] auto remove_item_meta(const std::string &api_path,
const std::string &key)
-> api_error override;
[[nodiscard]] auto rename_item_meta(const std::string &from_api_path,
const std::string &to_api_path)
-> api_error override;
[[nodiscard]] auto set_item_meta(const std::string &api_path,
const std::string &key,
const std::string &value)
-> api_error override;
[[nodiscard]] auto set_item_meta(const std::string &api_path,
const api_meta_map &meta)
-> api_error override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_IMPL_RDB_META_DB_HPP_

View File

@ -1,92 +0,0 @@
/*
Copyright <2018-2024> <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_DB_IMPL_SQLITE_FILE_DB_HPP_
#define REPERTORY_INCLUDE_DB_IMPL_SQLITE_FILE_DB_HPP_
#include "db/i_file_db.hpp"
#include "utils/db/sqlite/db_common.hpp"
namespace repertory {
class app_config;
class sqlite_file_db final : public i_file_db {
public:
sqlite_file_db(const app_config &cfg);
~sqlite_file_db() override;
sqlite_file_db(const sqlite_file_db &) = delete;
sqlite_file_db(sqlite_file_db &&) = delete;
auto operator=(const sqlite_file_db &) -> sqlite_file_db & = delete;
auto operator=(sqlite_file_db &&) -> sqlite_file_db & = delete;
private:
utils::db::sqlite::db3_t db_;
public:
[[nodiscard]] auto add_directory(const std::string &api_path,
const std::string &source_path)
-> api_error override;
[[nodiscard]] auto add_or_update_file(const i_file_db::file_data &data)
-> api_error override;
void clear() override;
[[nodiscard]] auto count() const -> std::uint64_t override;
[[nodiscard]] auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;
[[nodiscard]] auto get_directory_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;
[[nodiscard]] auto get_directory_source_path(const std::string &api_path,
std::string &source_path) const
-> api_error override;
[[nodiscard]] auto get_file_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;
[[nodiscard]] auto get_file_data(const std::string &api_path,
i_file_db::file_data &data) const
-> api_error override;
[[nodiscard]] auto get_file_source_path(const std::string &api_path,
std::string &source_path) const
-> api_error override;
[[nodiscard]] auto get_item_list() const
-> std::vector<i_file_db::file_info> override;
[[nodiscard]] auto get_source_path(const std::string &api_path,
std::string &source_path) const
-> api_error override;
[[nodiscard]] auto remove_item(const std::string &api_path)
-> api_error override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_IMPL_SQLITE_FILE_DB_HPP_

View File

@ -1,82 +0,0 @@
/*
Copyright <2018-2024> <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_DB_IMPL_SQLITE_FILE_MGR_DB_HPP_
#define REPERTORY_INCLUDE_DB_IMPL_SQLITE_FILE_MGR_DB_HPP_
#include "db/i_file_mgr_db.hpp"
#include "utils/db/sqlite/db_common.hpp"
namespace repertory {
class app_config;
class sqlite_file_mgr_db final : public i_file_mgr_db {
public:
sqlite_file_mgr_db(const app_config &cfg);
~sqlite_file_mgr_db() override;
sqlite_file_mgr_db(const sqlite_file_mgr_db &) = delete;
sqlite_file_mgr_db(sqlite_file_mgr_db &&) = delete;
auto operator=(const sqlite_file_mgr_db &) -> sqlite_file_mgr_db & = delete;
auto operator=(sqlite_file_mgr_db &&) -> sqlite_file_mgr_db & = delete;
private:
utils::db::sqlite::db3_t db_;
public:
[[nodiscard]] auto add_resume(const resume_entry &entry) -> bool override;
[[nodiscard]] auto add_upload(const upload_entry &entry) -> bool override;
[[nodiscard]] auto add_upload_active(const upload_active_entry &entry)
-> bool override;
void clear() override;
[[nodiscard]] auto get_next_upload() const
-> std::optional<upload_entry> override;
[[nodiscard]] auto get_resume_list() const
-> std::vector<resume_entry> override;
[[nodiscard]] auto get_upload(const std::string &api_path) const
-> std::optional<upload_entry> override;
[[nodiscard]] auto get_upload_active_list() const
-> std::vector<upload_active_entry> override;
[[nodiscard]] auto remove_resume(const std::string &api_path)
-> bool override;
[[nodiscard]] auto remove_upload(const std::string &api_path)
-> bool override;
[[nodiscard]] auto remove_upload_active(const std::string &api_path)
-> bool override;
[[nodiscard]] auto rename_resume(const std::string &from_api_path,
const std::string &to_api_path)
-> bool override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_IMPL_SQLITE_FILE_MGR_DB_HPP_

View File

@ -1,34 +0,0 @@
/*
Copyright <2018-2024> <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_DB_META_DB_HPP_
#define REPERTORY_INCLUDE_DB_META_DB_HPP_
#include "db/i_meta_db.hpp"
namespace repertory {
class app_config;
[[nodiscard]] auto create_meta_db(const app_config &cfg)
-> std::unique_ptr<i_meta_db>;
} // namespace repertory
#endif // REPERTORY_INCLUDE_DB_META_DB_HPP_

View File

@ -19,10 +19,11 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_
#define REPERTORY_INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_
#ifndef INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_
#define INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_
#include "utils/single_thread_service_base.hpp"
#include <memory>
namespace repertory {
class directory_iterator;
@ -34,7 +35,7 @@ public:
private:
struct open_directory final {
std::shared_ptr<directory_iterator> iterator;
std::vector<std::uint64_t> handles;
std::vector<std::uint64_t> handles{};
std::chrono::system_clock::time_point last_update{
std::chrono::system_clock::now()};
};
@ -60,8 +61,8 @@ public:
void execute_action(const std::string &api_path,
const execute_callback &execute);
[[nodiscard]] auto get_directory(std::uint64_t handle)
-> std::shared_ptr<directory_iterator>;
[[nodiscard]] auto
get_directory(std::uint64_t handle) -> std::shared_ptr<directory_iterator>;
[[nodiscard]] auto remove_directory(const std::string &api_path)
-> std::shared_ptr<directory_iterator>;
@ -73,4 +74,4 @@ public:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_
#endif // INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_DIRECTORY_ITERATOR_HPP_
#define REPERTORY_INCLUDE_DRIVES_DIRECTORY_ITERATOR_HPP_
#ifndef INCLUDE_DRIVES_DIRECTORY_ITERATOR_HPP_
#define INCLUDE_DRIVES_DIRECTORY_ITERATOR_HPP_
#include "types/remote.hpp"
#include "types/repertory.hpp"
@ -78,4 +78,4 @@ public:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_DIRECTORY_ITERATOR_HPP_
#endif // INCLUDE_DRIVES_DIRECTORY_ITERATOR_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_EVICTION_HPP_
#define REPERTORY_INCLUDE_DRIVES_EVICTION_HPP_
#ifndef INCLUDE_DRIVES_EVICTION_HPP_
#define INCLUDE_DRIVES_EVICTION_HPP_
#include "utils/single_thread_service_base.hpp"
@ -31,19 +31,18 @@ class i_provider;
class eviction final : public single_thread_service_base {
public:
eviction(i_provider &provider, const app_config &config,
i_file_manager &file_mgr)
eviction(i_provider &provider, const app_config &config, i_file_manager &fm)
: single_thread_service_base("eviction"),
provider_(provider),
config_(config),
file_mgr_(file_mgr),
provider_(provider) {}
fm_(fm) {}
~eviction() override = default;
private:
const app_config &config_;
i_file_manager &file_mgr_;
i_provider &provider_;
const app_config &config_;
i_file_manager &fm_;
private:
[[nodiscard]] auto check_minimum_requirements(const std::string &file_path)
@ -56,4 +55,4 @@ protected:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_EVICTION_HPP_
#endif // INCLUDE_DRIVES_EVICTION_HPP_

View File

@ -19,23 +19,23 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_EVENTS_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_EVENTS_HPP_
#ifndef INCLUDE_DRIVES_FUSE_EVENTS_HPP_
#define INCLUDE_DRIVES_FUSE_EVENTS_HPP_
#include "events/event_system.hpp"
namespace repertory {
// clang-format off
E_SIMPLE3(fuse_event, debug, true,
std::string, function, func, E_FROM_STRING,
std::string, api_path, ap, E_FROM_STRING,
std::string, function, func, E_STRING,
std::string, api_path, ap, E_STRING,
int, result, res, E_FROM_INT32
);
E_SIMPLE1(fuse_args_parsed, info, true,
std::string, arguments, args, E_FROM_STRING
std::string, arguments, args, E_STRING
);
// clang-format on
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_EVENTS_HPP_
#endif // INCLUDE_DRIVES_FUSE_EVENTS_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
#ifndef INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
#define INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
#if !defined(_WIN32)
#include "events/event_system.hpp"
@ -604,4 +604,4 @@ public:
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_
#endif // INCLUDE_DRIVES_FUSE_FUSE_BASE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
#ifndef INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
#define INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
#if !defined(_WIN32)
#include "drives/fuse/fuse_drive_base.hpp"
@ -103,7 +103,7 @@ protected:
struct fuse_file_info *file_info) -> api_error override;
[[nodiscard]] auto
fgetattr_impl(std::string api_path, struct stat *unix_st,
fgetattr_impl(std::string api_path, struct stat *st,
struct fuse_file_info *file_info) -> api_error override;
#if defined(__APPLE__)
@ -124,11 +124,11 @@ protected:
#if FUSE_USE_VERSION >= 30
[[nodiscard]] auto
getattr_impl(std::string api_path, struct stat *unix_st,
getattr_impl(std::string api_path, struct stat *st,
struct fuse_file_info *file_info) -> api_error override;
#else
[[nodiscard]] auto getattr_impl(std::string api_path,
struct stat *unix_st) -> api_error override;
struct stat *st) -> api_error override;
#endif
#if defined(__APPLE__)
@ -323,4 +323,4 @@ public:
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_
#endif // INCLUDE_DRIVES_FUSE_FUSE_DRIVE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
#ifndef INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
#define INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
#if !defined(_WIN32)
#include "drives/fuse/fuse_base.hpp"
@ -134,4 +134,4 @@ public:
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_
#endif // INCLUDE_DRIVES_FUSE_FUSE_DRIVE_BASE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
#ifndef INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
#define INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
#if !defined(_WIN32)
#include "types/repertory.hpp"
@ -81,4 +81,4 @@ public:
} // namespace repertory
#endif
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_
#endif // INCLUDE_DRIVES_FUSE_I_FUSE_DRIVE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_I_REMOTE_INSTANCE_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_I_REMOTE_INSTANCE_HPP_
#ifndef INCLUDE_DRIVES_FUSE_REMOTEFUSE_I_REMOTE_INSTANCE_HPP_
#define INCLUDE_DRIVES_FUSE_REMOTEFUSE_I_REMOTE_INSTANCE_HPP_
#include "drives/remote/i_remote_json.hpp"
#include "types/remote.hpp"
@ -30,25 +30,26 @@ class i_remote_instance : public virtual i_remote_json {
INTERFACE_SETUP(i_remote_instance);
public:
[[nodiscard]] virtual auto
fuse_access(const char *path,
const std::int32_t &mask) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_access(const char *path,
const std::int32_t &mask)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_chflags(const char *path, std::uint32_t flags) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_chflags(const char *path, std::uint32_t flags)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_chmod(const char *path,
const remote::file_mode &mode) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_chmod(const char *path,
const remote::file_mode &mode)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_chown(const char *path,
const remote::user_id &uid,
const remote::group_id &gid)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_create(const char *path, const remote::file_mode &mode,
const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type = 0;
const remote::open_flags &flags, remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_destroy() -> packet::error_type = 0;
/*[[nodiscard]] virtual packet::error_type fuse_fallocate(const char *path,
@ -60,21 +61,24 @@ public:
fuse_fgetattr(const char *path, remote::stat &r_stat, bool &directory,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_fsetattr_x(const char *path, const remote::setattr_x &attr,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_fsetattr_x(const char *path,
const remote::setattr_x &attr,
const remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_fsync(const char *path,
const std::int32_t &datasync,
const remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_ftruncate(const char *path, const remote::file_offset &size,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_ftruncate(const char *path,
const remote::file_offset &size,
const remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_getattr(const char *path, remote::stat &r_stat,
bool &directory) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_getattr(const char *path,
remote::stat &r_stat, bool &directory)
-> packet::error_type = 0;
/*[[nodiscard]] virtual packet::error_type fuse_getxattr(const char *path,
const char *name, char *value, const remote::file_size &size) = 0;
@ -83,9 +87,10 @@ public:
const char *name, char *value, const remote::file_size &size, std::uint32_t
position) = 0;*/
[[nodiscard]] virtual auto
fuse_getxtimes(const char *path, remote::file_time &bkuptime,
remote::file_time &crtime) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_getxtimes(const char *path,
remote::file_time &bkuptime,
remote::file_time &crtime)
-> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_init() -> packet::error_type = 0;
@ -93,63 +98,65 @@ public:
char *buffer, const remote::file_size &size) = 0;*/
[[nodiscard]] virtual auto
fuse_mkdir(const char *path,
const remote::file_mode &mode) -> packet::error_type = 0;
fuse_mkdir(const char *path, const remote::file_mode &mode)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_open(const char *path, const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_open(const char *path,
const remote::open_flags &flags,
remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_opendir(const char *path,
remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_opendir(const char *path,
remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual 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 = 0;
[[nodiscard]] virtual 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 = 0;
[[nodiscard]] virtual auto
fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_handle &handle,
std::string &item_path) -> packet::error_type = 0;
const remote::file_handle &handle, std::string &item_path)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_release(const char *path,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_release(const char *path,
const remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_releasedir(const char *path,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_releasedir(const char *path,
const remote::file_handle &handle)
-> packet::error_type = 0;
//[[nodiscard]] virtual packet::error_type fuse_removexattr(const char *path,
// const char *name) =
// 0;
[[nodiscard]] virtual auto
fuse_rename(const char *from, const char *to) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_rename(const char *from, const char *to)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_rmdir(const char *path) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_rmdir(const char *path)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_setattr_x(const char *path,
remote::setattr_x &attr) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_setattr_x(const char *path,
remote::setattr_x &attr)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_setbkuptime(const char *path,
const remote::file_time &bkuptime) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_setbkuptime(const char *path,
const remote::file_time &bkuptime)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_setchgtime(const char *path,
const remote::file_time &chgtime) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_setchgtime(const char *path,
const remote::file_time &chgtime)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_setcrtime(const char *path,
const remote::file_time &crtime) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_setcrtime(const char *path,
const remote::file_time &crtime)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_setvolname(const char *volname) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_setvolname(const char *volname)
-> packet::error_type = 0;
/*[[nodiscard]] virtual packet::error_type fuse_setxattr(const char *path,
const char *name, const char *value, const remote::file_size &size, const
@ -158,35 +165,36 @@ public:
const char *name, const char *value, const remote::file_size &size, const
std::int32_t &flags, std::uint32_t position) = 0;*/
[[nodiscard]] virtual auto
fuse_statfs(const char *path, std::uint64_t frsize,
remote::statfs &r_stat) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_statfs(const char *path, std::uint64_t frsize,
remote::statfs &r_stat)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_statfs_x(const char *path, std::uint64_t bsize,
remote::statfs_x &r_stat) -> packet::error_type = 0;
fuse_statfs_x(const char *path, std::uint64_t bsize, remote::statfs_x &r_stat)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_truncate(const char *path,
const remote::file_offset &size) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_truncate(const char *path,
const remote::file_offset &size)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_unlink(const char *path) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_unlink(const char *path)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_utimens(const char *path, const remote::file_time *tv, std::uint64_t op0,
std::uint64_t op1) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_utimens(const char *path,
const remote::file_time *tv,
std::uint64_t op0, std::uint64_t op1)
-> packet::error_type = 0;
[[nodiscard]] virtual auto
fuse_write(const char *path, const char *buffer,
const remote::file_size &writeSize,
const remote::file_offset &writeOffset,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_write(const char *path, const char *buffer,
const remote::file_size &writeSize,
const remote::file_offset &writeOffset,
const remote::file_handle &handle)
-> packet::error_type = 0;
[[nodiscard]] virtual auto fuse_write_base64(
const char *path, const char *buffer, const remote::file_size &writeSize,
const remote::file_offset &writeOffset,
const remote::file_handle &handle) -> packet::error_type = 0;
const remote::file_offset &writeOffset, const remote::file_handle &handle)
-> packet::error_type = 0;
virtual void set_fuse_uid_gid(const remote::user_id &uid,
const remote::group_id &gid) = 0;
@ -196,4 +204,4 @@ using remote_instance_factory =
std::function<std::unique_ptr<i_remote_instance>()>;
} // namespace repertory::remote_fuse
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_I_REMOTE_INSTANCE_HPP_
#endif // INCLUDE_DRIVES_FUSE_REMOTEFUSE_I_REMOTE_INSTANCE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_CLIENT_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_CLIENT_HPP_
#ifndef INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_CLIENT_HPP_
#define INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_CLIENT_HPP_
#include "comm/packet/packet_client.hpp"
#include "drives/fuse/remotefuse/i_remote_instance.hpp"
@ -51,9 +51,9 @@ public:
[[nodiscard]] auto fuse_chmod(const char *path, const remote::file_mode &mode)
-> packet::error_type override;
[[nodiscard]] auto
fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid) -> packet::error_type override;
[[nodiscard]] auto fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid)
-> packet::error_type override;
[[nodiscard]] auto fuse_destroy() -> packet::error_type override;
@ -67,21 +67,23 @@ public:
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto fuse_fsetattr_x(
const char *path, const remote::setattr_x &attr,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_fsetattr_x(const char *path,
const remote::setattr_x &attr,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto
fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto fuse_ftruncate(
const char *path, const remote::file_offset &size,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_ftruncate(const char *path,
const remote::file_offset &size,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto
fuse_getattr(const char *path, remote::stat &st,
bool &directory) -> packet::error_type override;
[[nodiscard]] auto fuse_getattr(const char *path, remote::stat &st,
bool &directory)
-> packet::error_type override;
/*[[nodiscard]] packet::error_type fuse_getxattr(const char *path, const char
*name, char *value, const remote::file_size &size) override ;
@ -90,9 +92,10 @@ public:
*name, char *value, const remote::file_size &size, std::uint32_t position)
override ;*/
[[nodiscard]] auto
fuse_getxtimes(const char *path, remote::file_time &bkuptime,
remote::file_time &crtime) -> packet::error_type override;
[[nodiscard]] auto fuse_getxtimes(const char *path,
remote::file_time &bkuptime,
remote::file_time &crtime)
-> packet::error_type override;
[[nodiscard]] auto fuse_init() -> packet::error_type override;
@ -107,25 +110,27 @@ public:
[[nodiscard]] auto
fuse_create(const char *path, const remote::file_mode &mode,
const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type override;
const remote::open_flags &flags, remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto
fuse_open(const char *path, const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_open(const char *path,
const remote::open_flags &flags,
remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] 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;
[[nodiscard]] 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;
[[nodiscard]] auto fuse_rename(const char *from,
const char *to) -> packet::error_type override;
[[nodiscard]] auto fuse_rename(const char *from, const char *to)
-> packet::error_type override;
[[nodiscard]] auto
fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_handle &handle,
std::string &item_path) -> packet::error_type override;
const remote::file_handle &handle, std::string &item_path)
-> packet::error_type override;
[[nodiscard]] auto fuse_release(const char *path,
const remote::file_handle &handle)
@ -139,8 +144,8 @@ public:
* char *name) override
* ;*/
[[nodiscard]] auto
fuse_rmdir(const char *path) -> packet::error_type override;
[[nodiscard]] auto fuse_rmdir(const char *path)
-> packet::error_type override;
[[nodiscard]] auto fuse_setattr_x(const char *path, remote::setattr_x &attr)
-> packet::error_type override;
@ -157,8 +162,8 @@ public:
const remote::file_time &crtime)
-> packet::error_type override;
[[nodiscard]] auto
fuse_setvolname(const char *volname) -> packet::error_type override;
[[nodiscard]] auto fuse_setvolname(const char *volname)
-> packet::error_type override;
[[nodiscard]] /*packet::error_type fuse_setxattr(const char *path, const char
*name, const char *value, const remote::file_size &size, const std::int32_t
@ -169,45 +174,48 @@ public:
std::int32_t &flags, std::uint32_t position) override ;*/
[[nodiscard]] auto
fuse_statfs(const char *path, std::uint64_t frsize,
remote::statfs &st) -> packet::error_type override;
fuse_statfs(const char *path, std::uint64_t frsize, remote::statfs &st)
-> packet::error_type override;
[[nodiscard]] auto
fuse_statfs_x(const char *path, std::uint64_t bsize,
remote::statfs_x &st) -> packet::error_type override;
[[nodiscard]] auto fuse_statfs_x(const char *path, std::uint64_t bsize,
remote::statfs_x &st)
-> packet::error_type override;
[[nodiscard]] auto
fuse_truncate(const char *path,
const remote::file_offset &size) -> packet::error_type override;
[[nodiscard]] auto fuse_truncate(const char *path,
const remote::file_offset &size)
-> packet::error_type override;
[[nodiscard]] auto
fuse_unlink(const char *path) -> 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;
[[nodiscard]] auto fuse_utimens(const char *path, const remote::file_time *tv,
std::uint64_t op0, std::uint64_t op1)
-> packet::error_type override;
[[nodiscard]] 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;
[[nodiscard]] 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;
[[nodiscard]] auto fuse_write_base64(
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;
[[nodiscard]] auto fuse_write_base64(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;
[[nodiscard]] auto json_create_directory_snapshot(
const std::string &path, json &json_data) -> packet::error_type override;
[[nodiscard]] auto json_create_directory_snapshot(const std::string &path,
json &json_data)
-> packet::error_type override;
[[nodiscard]] auto json_read_directory_snapshot(
const std::string &path, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override;
[[nodiscard]] auto json_release_directory_snapshot(
const std::string &path,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto
json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type override;
void set_fuse_uid_gid(const remote::user_id &uid,
const remote::group_id &gid) override;
@ -215,4 +223,4 @@ public:
} // namespace remote_fuse
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_CLIENT_HPP_
#endif // INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_CLIENT_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_FUSE_DRIVE_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_FUSE_DRIVE_HPP_
#ifndef INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_FUSE_DRIVE_HPP_
#define INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_FUSE_DRIVE_HPP_
#if !defined(_WIN32)
#include "drives/fuse/fuse_base.hpp"
@ -238,4 +238,4 @@ protected:
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_FUSE_DRIVE_HPP_
#endif // INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_FUSE_DRIVE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_SERVER_HPP_
#define REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_SERVER_HPP_
#ifndef INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_SERVER_HPP_
#define INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_SERVER_HPP_
#if !defined(_WIN32)
#include "drives/directory_cache.hpp"
@ -49,9 +49,9 @@ private:
[[nodiscard]] auto get_next_handle() -> std::uint64_t;
[[nodiscard]] auto populate_file_info(const std::string &api_path,
remote::file_info &file_info)
-> packet::error_type;
[[nodiscard]] auto
populate_file_info(const std::string &api_path,
remote::file_info &file_info) -> packet::error_type;
void populate_file_info(const std::string &api_path, const UINT64 &file_size,
const UINT32 &attributes,
@ -72,14 +72,14 @@ public:
[[nodiscard]] auto fuse_chmod(const char *path, const remote::file_mode &mode)
-> packet::error_type override;
[[nodiscard]] auto fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid)
-> packet::error_type override;
[[nodiscard]] auto
fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid) -> packet::error_type override;
[[nodiscard]] auto
fuse_create(const char *path, const remote::file_mode &mode,
const remote::open_flags &flags, remote::file_handle &handle)
-> packet::error_type override;
const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_destroy() -> packet::error_type override;
@ -88,28 +88,25 @@ public:
remote::file_offset &length, const remote::file_handle &handle) override
;*/
[[nodiscard]] auto fuse_fgetattr(const char *path, remote::stat &r_stat,
bool &directory,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto fuse_fgetattr(
const char *path, remote::stat &r_stat, bool &directory,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_fsetattr_x(const char *path,
const remote::setattr_x &attr,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto fuse_fsetattr_x(
const char *path, const remote::setattr_x &attr,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto
fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_ftruncate(const char *path,
const remote::file_offset &size,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto fuse_ftruncate(
const char *path, const remote::file_offset &size,
const remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_getattr(const char *path, remote::stat &r_stat,
bool &directory)
-> packet::error_type override;
[[nodiscard]] auto
fuse_getattr(const char *path, remote::stat &r_stat,
bool &directory) -> packet::error_type override;
/*[[nodiscard]] packet::error_type fuse_getxattr(const char *path, const char
*name, char *value, const remote::file_size &size) override ;
@ -118,10 +115,9 @@ public:
*name, char *value, const remote::file_size &size, std::uint32_t position)
override ;*/
[[nodiscard]] auto fuse_getxtimes(const char *path,
remote::file_time &bkuptime,
remote::file_time &crtime)
-> packet::error_type override;
[[nodiscard]] auto
fuse_getxtimes(const char *path, remote::file_time &bkuptime,
remote::file_time &crtime) -> packet::error_type override;
[[nodiscard]] auto fuse_init() -> packet::error_type override;
@ -129,30 +125,28 @@ public:
*buffer, const remote::file_size &size) override ;*/
[[nodiscard]] auto
fuse_mkdir(const char *path, const remote::file_mode &mode)
-> packet::error_type override;
fuse_mkdir(const char *path,
const remote::file_mode &mode) -> packet::error_type override;
[[nodiscard]] auto fuse_open(const char *path,
const remote::open_flags &flags,
remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto
fuse_open(const char *path, const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type override;
[[nodiscard]] auto fuse_opendir(const char *path, remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] 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;
[[nodiscard]] 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;
[[nodiscard]] auto fuse_rename(const char *from, const char *to)
-> packet::error_type override;
[[nodiscard]] auto fuse_rename(const char *from,
const char *to) -> packet::error_type override;
[[nodiscard]] auto
fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_handle &handle, std::string &item_path)
-> packet::error_type override;
const remote::file_handle &handle,
std::string &item_path) -> packet::error_type override;
[[nodiscard]] auto fuse_release(const char *path,
const remote::file_handle &handle)
@ -166,8 +160,8 @@ public:
* char *name) override
* ;*/
[[nodiscard]] auto fuse_rmdir(const char *path)
-> packet::error_type override;
[[nodiscard]] auto
fuse_rmdir(const char *path) -> packet::error_type override;
[[nodiscard]] auto fuse_setattr_x(const char *path, remote::setattr_x &attr)
-> packet::error_type override;
@ -184,8 +178,8 @@ public:
const remote::file_time &crtime)
-> packet::error_type override;
[[nodiscard]] auto fuse_setvolname(const char *volname)
-> packet::error_type override;
[[nodiscard]] auto
fuse_setvolname(const char *volname) -> packet::error_type override;
/*[[nodiscard]] packet::error_type fuse_setxattr(const char *path, const char
*name, const char *value, const remote::file_size &size, const std::int32_t
@ -195,70 +189,67 @@ public:
char *name, const char *value, const remote::file_size &size, const
std::int32_t &flags, std::uint32_t position) override ;*/
[[nodiscard]] auto fuse_statfs(const char *path, std::uint64_t frsize,
remote::statfs &r_stat)
-> packet::error_type override;
[[nodiscard]] auto
fuse_statfs(const char *path, std::uint64_t frsize,
remote::statfs &r_stat) -> packet::error_type override;
[[nodiscard]] auto fuse_statfs_x(const char *path, std::uint64_t bsize,
remote::statfs_x &r_stat)
-> packet::error_type override;
[[nodiscard]] auto
fuse_statfs_x(const char *path, std::uint64_t bsize,
remote::statfs_x &r_stat) -> packet::error_type override;
[[nodiscard]] auto fuse_truncate(const char *path,
const remote::file_offset &size)
-> packet::error_type override;
[[nodiscard]] auto
fuse_truncate(const char *path,
const remote::file_offset &size) -> packet::error_type override;
[[nodiscard]] auto fuse_unlink(const char *path)
-> 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;
[[nodiscard]] auto
fuse_utimens(const char *path, const remote::file_time *tv, std::uint64_t op0,
std::uint64_t op1) -> packet::error_type override;
[[nodiscard]] 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;
[[nodiscard]] 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;
[[nodiscard]] auto fuse_write_base64(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;
[[nodiscard]] auto fuse_write_base64(
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;
void set_fuse_uid_gid(const remote::user_id &,
const remote::group_id &) override {}
// JSON Layer
[[nodiscard]] auto winfsp_get_dir_buffer(PVOID /*file_desc*/,
PVOID *& /*ptr*/)
-> packet::error_type override {
[[nodiscard]] auto
winfsp_get_dir_buffer(PVOID /*file_desc*/,
PVOID *& /*ptr*/) -> packet::error_type override {
return static_cast<packet::error_type>(STATUS_INVALID_HANDLE);
}
[[nodiscard]] auto json_create_directory_snapshot(const std::string &path,
json &json_data)
-> packet::error_type override;
[[nodiscard]] auto json_create_directory_snapshot(
const std::string &path, json &json_data) -> packet::error_type override;
[[nodiscard]] auto json_read_directory_snapshot(
const std::string &path, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override;
[[nodiscard]] auto
json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type override;
[[nodiscard]] auto json_release_directory_snapshot(
const std::string &path,
const remote::file_handle &handle) -> packet::error_type override;
// WinFSP Layer
[[nodiscard]] auto winfsp_can_delete(PVOID file_desc, PWSTR file_name)
-> packet::error_type override;
[[nodiscard]] auto winfsp_cleanup(PVOID file_desc, PWSTR file_name,
UINT32 flags, BOOLEAN &was_deleted)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
BOOLEAN &was_closed) -> packet::error_type override;
[[nodiscard]] auto winfsp_close(PVOID file_desc)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_close(PVOID file_desc) -> packet::error_type override;
[[nodiscard]] auto
winfsp_create(PWSTR file_name, UINT32 create_options, UINT32 granted_access,
@ -273,66 +264,60 @@ public:
remote::file_info *file_info)
-> packet::error_type override;
[[nodiscard]] auto winfsp_get_security_by_name(
PWSTR file_name, PUINT32 attributes,
std::uint64_t * /*security_descriptor_size*/,
std::wstring & /*str_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;
[[nodiscard]] auto
winfsp_get_security_by_name(PWSTR file_name, PUINT32 attributes,
std::uint64_t * /*security_descriptor_size*/,
std::wstring & /*str_descriptor*/)
-> packet::error_type override;
winfsp_mounted(const std::wstring &location) -> packet::error_type override;
[[nodiscard]] auto winfsp_get_volume_info(UINT64 &total_size,
UINT64 &free_size,
std::string &volume_label)
-> packet::error_type override;
[[nodiscard]] 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;
[[nodiscard]] auto winfsp_mounted(const std::wstring &location)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 /*allocation_size*/,
remote::file_info *file_info) -> packet::error_type override;
[[nodiscard]] 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;
[[nodiscard]] auto
winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
PUINT32 bytes_transferred) -> packet::error_type override;
[[nodiscard]] auto winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes,
UINT64 /*allocation_size*/,
remote::file_info *file_info)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/, PWSTR marker,
json &itemList) -> packet::error_type override;
[[nodiscard]] auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset,
UINT32 length, PUINT32 bytes_transferred)
-> packet::error_type override;
[[nodiscard]] auto winfsp_read_directory(PVOID file_desc, PWSTR /*pattern*/,
PWSTR marker, json &itemList)
-> packet::error_type override;
[[nodiscard]] auto winfsp_rename(PVOID /*file_desc*/, PWSTR file_name,
PWSTR new_file_name,
BOOLEAN replace_if_exists)
-> packet::error_type override;
[[nodiscard]] auto
winfsp_rename(PVOID /*file_desc*/, PWSTR file_name, PWSTR new_file_name,
BOOLEAN replace_if_exists) -> 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_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_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;
PUINT32 bytes_transferred,
remote::file_info *file_info) -> packet::error_type override;
};
} // namespace remote_fuse
} // namespace repertory
#endif
#endif // REPERTORY_INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_SERVER_HPP_
#endif // INCLUDE_DRIVES_FUSE_REMOTEFUSE_REMOTE_SERVER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_REMOTE_I_REMOTE_JSON_HPP_
#define REPERTORY_INCLUDE_DRIVES_REMOTE_I_REMOTE_JSON_HPP_
#ifndef INCLUDE_DRIVES_REMOTE_I_REMOTE_JSON_HPP_
#define INCLUDE_DRIVES_REMOTE_I_REMOTE_JSON_HPP_
#include "comm/packet/packet.hpp"
@ -30,17 +30,18 @@ class i_remote_json {
public:
[[nodiscard]] virtual auto
json_create_directory_snapshot(const std::string &path,
json &json_data) -> packet::error_type = 0;
json_create_directory_snapshot(const std::string &path, json &json_data)
-> packet::error_type = 0;
[[nodiscard]] virtual auto json_read_directory_snapshot(
const std::string &path, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type = 0;
[[nodiscard]] virtual auto json_release_directory_snapshot(
const std::string &path,
const remote::file_handle &handle) -> packet::error_type = 0;
[[nodiscard]] virtual auto
json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_REMOTE_I_REMOTE_JSON_HPP_
#endif // INCLUDE_DRIVES_REMOTE_I_REMOTE_JSON_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_REMOTE_REMOTE_OPEN_FILE_TABLE_HPP_
#define REPERTORY_INCLUDE_DRIVES_REMOTE_REMOTE_OPEN_FILE_TABLE_HPP_
#ifndef INCLUDE_DRIVES_REMOTE_REMOTE_OPEN_FILE_TABLE_HPP_
#define INCLUDE_DRIVES_REMOTE_REMOTE_OPEN_FILE_TABLE_HPP_
#include "types/remote.hpp"
#include "types/repertory.hpp"
@ -33,32 +33,25 @@ protected:
virtual ~remote_open_file_table() = default;
protected:
struct compat_open_info final {
std::string client_id;
std::vector<remote::file_handle> handles;
struct compat_open_info {
std::size_t count = 0u;
std::string client_id = "";
std::string path;
};
struct open_info final {
std::string client_id;
PVOID directory_buffer{nullptr};
std::vector<native_handle> handles;
struct open_info {
std::size_t count = 0u;
std::string client_id = "";
PVOID directory_buffer = nullptr;
std::string path;
};
private:
std::unordered_map<std::string, std::unique_ptr<compat_open_info>>
compat_file_lookup_;
std::unordered_map<remote::file_handle, std::string> compat_handle_lookup_;
private:
std::unordered_map<remote::file_handle, compat_open_info> compat_lookup_;
std::recursive_mutex compat_mutex_;
std::unordered_map<std::string, std::vector<std::uint64_t>> directory_lookup_;
private:
std::unordered_map<std::string, std::unique_ptr<open_info>> file_lookup_;
std::unordered_map<native_handle, std::string> handle_lookup_;
private:
std::recursive_mutex directory_mutex_;
std::unordered_map<native_handle, open_info> file_lookup_;
mutable std::recursive_mutex file_mutex_;
protected:
@ -71,11 +64,11 @@ protected:
PVOID *&buffer) -> bool;
#endif // _WIN32
[[nodiscard]] auto get_open_file_path(const native_handle &handle)
-> std::string;
[[nodiscard]] auto
get_open_file_path(const native_handle &handle) -> std::string;
[[nodiscard]] auto get_open_info(const native_handle &handle, open_info &oi)
-> bool;
[[nodiscard]] auto get_open_info(const native_handle &handle,
open_info &oi) -> bool;
[[nodiscard]] auto has_open_directory(const std::string &client_id,
std::uint64_t handle) -> bool;
@ -84,21 +77,20 @@ protected:
int error_return) -> int;
template <typename error_type>
[[nodiscard]] auto has_open_info(const native_handle &handle,
const error_type &error_return)
-> error_type {
[[nodiscard]] auto
has_open_info(const native_handle &handle,
const error_type &error_return) -> error_type {
recur_mutex_lock file_lock(file_mutex_);
return handle_lookup_.contains(handle) ? 0 : error_return;
return ((file_lookup_.find(handle) == file_lookup_.end()) ? error_return
: 0);
}
void remove_all(const std::string &file_path);
void remove_and_close_all(const native_handle &handle);
void remove_compat_open_info(const remote::file_handle &handle);
auto remove_directory(const std::string &client_id, std::uint64_t handle)
-> bool;
auto remove_directory(const std::string &client_id,
std::uint64_t handle) -> bool;
void remove_open_info(const native_handle &handle);
@ -110,12 +102,12 @@ protected:
void set_compat_open_info(const remote::file_handle &handle,
const std::string &file_path);
void set_open_info(const native_handle &handle, open_info op_info);
void set_open_info(const native_handle &handle, open_info oi);
public:
[[nodiscard]] auto get_open_file_count(const std::string &file_path) const
-> std::size_t;
[[nodiscard]] auto
get_open_file_count(const std::string &file_path) const -> std::size_t;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_REMOTE_REMOTE_OPEN_FILE_TABLE_HPP_
#endif // INCLUDE_DRIVES_REMOTE_REMOTE_OPEN_FILE_TABLE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_REMOTE_REMOTE_SERVER_BASE_HPP_
#define REPERTORY_INCLUDE_DRIVES_REMOTE_REMOTE_SERVER_BASE_HPP_
#ifndef INCLUDE_DRIVES_REMOTE_REMOTE_SERVER_BASE_HPP_
#define INCLUDE_DRIVES_REMOTE_REMOTE_SERVER_BASE_HPP_
#include "app_config.hpp"
#include "comm/packet/client_pool.hpp"
@ -29,8 +29,6 @@
#include "drives/fuse/remotefuse/i_remote_instance.hpp"
#include "drives/remote/remote_open_file_table.hpp"
#include "drives/winfsp/remotewinfsp/i_remote_instance.hpp"
#include "events/event_system.hpp"
#include "events/events.hpp"
#include "types/remote.hpp"
#include "types/repertory.hpp"
#include "utils/base64.hpp"
@ -54,7 +52,7 @@ public:
: config_(config),
drive_(drv),
mount_location_(std::move(mount_location)),
client_pool_(config.get_remote_mount().client_pool_size) {
client_pool_(config.get_remote_client_pool_size()) {
event_system::instance().raise<service_started>("remote_server_base");
handler_lookup_.insert(
{"::winfsp_can_delete",
@ -87,10 +85,10 @@ public:
UINT32 flags{};
DECODE_OR_RETURN(request, flags);
BOOLEAN was_deleted{};
BOOLEAN was_closed{};
ret = this->winfsp_cleanup(file_desc, file_name.data(), flags,
was_deleted);
response.encode(was_deleted);
was_closed);
response.encode(was_closed);
return ret;
}});
@ -139,12 +137,12 @@ public:
if (ret == STATUS_SUCCESS) {
#if defined(_WIN32)
this->set_client_id(file_desc, client_id);
#else // !defined(_WIN32)
#else
this->set_client_id(
static_cast<native_handle>(
reinterpret_cast<std::uintptr_t>(file_desc)),
client_id);
#endif // defined(_WIN32)
#endif
response.encode(file_desc);
response.encode(file_info);
response.encode(normalized_name);
@ -279,12 +277,12 @@ public:
if (ret == STATUS_SUCCESS) {
#if defined(_WIN32)
this->set_client_id(file_desc, client_id);
#else // !defined(_WIN32)
#else
this->set_client_id(
static_cast<native_handle>(
reinterpret_cast<std::uintptr_t>(file_desc)),
client_id);
#endif // defined(_WIN32)
#endif
response.encode(file_desc);
response.encode(file_info);
response.encode(normalized_name);
@ -587,9 +585,9 @@ public:
0) {
#if defined(_WIN32)
this->set_compat_client_id(handle, client_id);
#else // !defined(_WIN32)
#else
this->set_client_id(static_cast<native_handle>(handle), client_id);
#endif // defined(_WIN32)
#endif
response.encode(handle);
}
return ret;
@ -843,9 +841,9 @@ public:
if ((ret = this->fuse_open(path.c_str(), flags, handle)) >= 0) {
#if defined(_WIN32)
this->set_compat_client_id(handle, client_id);
#else // !defined(_WIN32)
#else
this->set_client_id(static_cast<native_handle>(handle), client_id);
#endif // defined(_WIN32)
#endif
response.encode(handle);
}
return ret;
@ -1359,8 +1357,7 @@ public:
}});
packet_server_ = std::make_unique<packet_server>(
config_.get_remote_mount().api_port,
config_.get_remote_mount().encryption_token, 10,
config_.get_remote_port(), config_.get_remote_token(), 10,
[this](const std::string &client_id) {
return this->closed_handler(client_id);
},
@ -1433,4 +1430,4 @@ protected:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_REMOTE_REMOTE_SERVER_BASE_HPP_
#endif // INCLUDE_DRIVES_REMOTE_REMOTE_SERVER_BASE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_WINFSP_I_WINFSP_DRIVE_HPP_
#define REPERTORY_INCLUDE_DRIVES_WINFSP_I_WINFSP_DRIVE_HPP_
#ifndef INCLUDE_DRIVES_WINFSP_I_WINFSP_DRIVE_HPP_
#define INCLUDE_DRIVES_WINFSP_I_WINFSP_DRIVE_HPP_
#if defined(_WIN32)
#include "types/remote.hpp"
@ -31,25 +31,22 @@ class i_winfsp_drive {
INTERFACE_SETUP(i_winfsp_drive);
public:
[[nodiscard]] virtual auto
get_directory_item_count(const std::string &api_path) const
-> std::uint64_t = 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
get_directory_items(const std::string &api_path) const
-> directory_item_list = 0;
get_file_size(const std::string &api_path) const -> std::uint64_t = 0;
[[nodiscard]] virtual auto get_file_size(const std::string &api_path) const
-> std::uint64_t = 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_item_meta(const std::string &api_path,
const std::string &name,
std::string &value) const
-> api_error = 0;
[[nodiscard]] virtual auto 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,
api_meta_map &meta) const -> api_error = 0;
[[nodiscard]] virtual auto
get_security_by_name(PWSTR file_name, PUINT32 attributes,
@ -65,11 +62,11 @@ public:
virtual void get_volume_info(UINT64 &total_size, UINT64 &free_size,
std::string &volume_label) const = 0;
[[nodiscard]] virtual auto populate_file_info(const std::string &api_path,
remote::file_info &fi) const
-> api_error = 0;
[[nodiscard]] virtual auto
populate_file_info(const std::string &api_path,
remote::file_info &fi) -> api_error = 0;
};
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_WINFSP_I_WINFSP_DRIVE_HPP_
#endif // INCLUDE_DRIVES_WINFSP_I_WINFSP_DRIVE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_I_REMOTE_INSTANCE_HPP_
#define REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_I_REMOTE_INSTANCE_HPP_
#ifndef INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_I_REMOTE_INSTANCE_HPP_
#define INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_I_REMOTE_INSTANCE_HPP_
#include "drives/remote/i_remote_json.hpp"
@ -33,7 +33,7 @@ public:
-> packet::error_type = 0;
virtual auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
BOOLEAN &was_deleted) -> packet::error_type = 0;
BOOLEAN &was_closed) -> packet::error_type = 0;
virtual auto winfsp_close(PVOID file_desc) -> packet::error_type = 0;
@ -50,8 +50,7 @@ public:
virtual auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr)
-> packet::error_type = 0;
virtual auto winfsp_get_file_info(PVOID file_desc,
remote::file_info *file_info)
virtual auto winfsp_get_file_info(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type = 0;
virtual auto
@ -87,13 +86,11 @@ public:
PWSTR marker, json &itemList)
-> packet::error_type = 0;
virtual auto winfsp_rename(PVOID file_desc, PWSTR file_name,
PWSTR new_file_name, BOOLEAN replace_if_exists)
-> packet::error_type = 0;
virtual auto winfsp_rename(PVOID file_desc, PWSTR file_name, PWSTR new_file_name,
BOOLEAN replace_if_exists) -> packet::error_type = 0;
virtual auto winfsp_set_basic_info(PVOID file_desc, UINT32 file_attributes,
UINT64 creation_time,
UINT64 last_access_time,
UINT64 creation_time, UINT64 last_access_time,
UINT64 last_write_time, UINT64 change_time,
remote::file_info *file_info)
-> packet::error_type = 0;
@ -117,4 +114,4 @@ using remote_instance_factory =
std::function<std::unique_ptr<i_remote_instance>()>;
} // namespace repertory::remote_winfsp
#endif // REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_I_REMOTE_INSTANCE_HPP_
#endif // INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_I_REMOTE_INSTANCE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_CLIENT_HPP_
#define REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_CLIENT_HPP_
#ifndef INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_CLIENT_HPP_
#define INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_CLIENT_HPP_
#include "comm/packet/packet.hpp"
#include "comm/packet/packet_client.hpp"
@ -50,20 +50,19 @@ public:
auto json_create_directory_snapshot(const std::string &path, json &json_data)
-> packet::error_type override;
auto json_read_directory_snapshot(const std::string &path,
const remote::file_handle &handle,
std::uint32_t page, json &json_data)
-> packet::error_type override;
auto json_read_directory_snapshot(
const std::string &path, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override;
auto json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type override;
auto winfsp_can_delete(PVOID file_desc, PWSTR file_name)
-> packet::error_type override;
auto winfsp_can_delete(PVOID file_desc,
PWSTR file_name) -> packet::error_type override;
auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
BOOLEAN &was_deleted) -> packet::error_type override;
BOOLEAN &was_closed) -> packet::error_type override;
auto winfsp_close(PVOID file_desc) -> packet::error_type override;
@ -76,33 +75,32 @@ public:
auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override;
auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr)
-> packet::error_type override;
auto winfsp_get_dir_buffer(PVOID file_desc,
PVOID *&ptr) -> packet::error_type override;
auto winfsp_get_file_info(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override;
auto winfsp_get_security_by_name(PWSTR file_name, PUINT32 attributes,
std::uint64_t *descriptor_size,
std::wstring &string_descriptor)
-> packet::error_type override;
auto winfsp_get_security_by_name(
PWSTR file_name, PUINT32 attributes, std::uint64_t *descriptor_size,
std::wstring &string_descriptor) -> packet::error_type override;
auto winfsp_get_volume_info(UINT64 &total_size, UINT64 &free_size,
std::string &volume_label)
-> packet::error_type override;
auto winfsp_mounted(const std::wstring &location)
-> packet::error_type override;
auto
winfsp_mounted(const std::wstring &location) -> packet::error_type override;
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;
remote::file_info *file_info,
std::string &normalized_name) -> packet::error_type override;
auto winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 allocation_size,
remote::file_info *file_info)
-> packet::error_type override;
auto
winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 allocation_size,
remote::file_info *file_info) -> packet::error_type override;
auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
PUINT32 bytes_transferred) -> packet::error_type override;
@ -113,26 +111,25 @@ public:
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;
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;
auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type override;
auto winfsp_set_file_size(
PVOID file_desc, UINT64 new_size, BOOLEAN set_allocation_size,
remote::file_info *file_info) -> packet::error_type override;
auto winfsp_unmounted(const std::wstring &location)
-> packet::error_type override;
auto
winfsp_unmounted(const std::wstring &location) -> packet::error_type override;
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;
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;
};
} // namespace remote_winfsp
} // namespace repertory
#endif // REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_CLIENT_HPP_
#endif // INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_CLIENT_HPP_

View File

@ -21,8 +21,8 @@
*/
// NOTE: Most of the WinFSP pass-through code has been modified from:
// https://github.com/billziss-gh/winfsp/blob/master/tst/passthrough-cpp/passthrough-cpp.cpp
#ifndef REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_SERVER_HPP_
#define REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_SERVER_HPP_
#ifndef INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_SERVER_HPP_
#define INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_SERVER_HPP_
#if defined(_WIN32)
#include "comm/packet/packet.hpp"
@ -49,23 +49,23 @@ private:
[[nodiscard]] auto get_next_handle() -> std::uint64_t;
[[nodiscard]] auto populate_file_info(const std::string &api_path,
remote::file_info &file_info)
-> packet::error_type;
[[nodiscard]] auto
populate_file_info(const std::string &api_path,
remote::file_info &file_info) -> packet::error_type;
void populate_stat(const char *path, bool directory, remote::stat &r_stat,
const struct _stat64 &unix_st);
public:
// FUSE Layer
auto fuse_access(const char *path, const std::int32_t &mask)
-> packet::error_type override;
auto fuse_access(const char *path,
const std::int32_t &mask) -> packet::error_type override;
auto fuse_chflags(const char *path, std::uint32_t flags)
-> packet::error_type override;
auto fuse_chflags(const char *path,
std::uint32_t flags) -> packet::error_type override;
auto fuse_chmod(const char *path, const remote::file_mode &mode)
-> packet::error_type override;
auto fuse_chmod(const char *path,
const remote::file_mode &mode) -> packet::error_type override;
auto fuse_chown(const char *path, const remote::user_id &uid,
const remote::group_id &gid) -> packet::error_type override;
@ -84,16 +84,16 @@ public:
const remote::file_handle &handle)
-> packet::error_type override;
auto fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle)
-> packet::error_type override;
auto
fuse_fsync(const char *path, const std::int32_t &datasync,
const remote::file_handle &handle) -> packet::error_type override;
auto fuse_ftruncate(const char *path, const remote::file_offset &size,
const remote::file_handle &handle)
-> packet::error_type override;
auto fuse_getattr(const char *path, remote::stat &r_stat, bool &directory)
-> packet::error_type override;
auto fuse_getattr(const char *path, remote::stat &r_stat,
bool &directory) -> packet::error_type override;
/*packet::error_type fuse_getxattr(const char *path, const char *name, char
*value, const remote::file_size &size) override ;
@ -110,43 +110,41 @@ public:
const remote::file_size &size) override
;*/
auto fuse_mkdir(const char *path, const remote::file_mode &mode)
-> packet::error_type override;
auto fuse_mkdir(const char *path,
const remote::file_mode &mode) -> packet::error_type override;
auto fuse_opendir(const char *path, remote::file_handle &handle)
-> packet::error_type override;
auto fuse_opendir(const char *path,
remote::file_handle &handle) -> packet::error_type override;
auto fuse_create(const char *path, const remote::file_mode &mode,
const remote::open_flags &flags, remote::file_handle &handle)
-> packet::error_type override;
const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type override;
auto fuse_open(const char *path, const remote::open_flags &flags,
remote::file_handle &handle) -> packet::error_type override;
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;
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;
auto fuse_rename(const char *from, const char *to)
-> packet::error_type override;
auto fuse_rename(const char *from,
const char *to) -> packet::error_type override;
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;
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;
auto fuse_write_base64(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;
auto fuse_write_base64(
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;
auto fuse_readdir(const char *path, const remote::file_offset &offset,
const remote::file_handle &handle, std::string &item_path)
-> packet::error_type override;
const remote::file_handle &handle,
std::string &item_path) -> packet::error_type override;
auto fuse_release(const char *path, const remote::file_handle &handle)
-> packet::error_type override;
@ -159,8 +157,8 @@ public:
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;
auto fuse_setattr_x(const char *path,
remote::setattr_x &attr) -> packet::error_type override;
auto fuse_setbkuptime(const char *path, const remote::file_time &bkuptime)
-> packet::error_type override;
@ -193,8 +191,8 @@ public:
auto fuse_unlink(const char *path) -> packet::error_type override;
auto fuse_utimens(const char *path, const remote::file_time *tv,
std::uint64_t op0, std::uint64_t op1)
-> packet::error_type override;
std::uint64_t op0,
std::uint64_t op1) -> packet::error_type override;
void set_fuse_uid_gid(const remote::user_id & /* uid */,
const remote::group_id & /* gid */) override {}
@ -203,21 +201,20 @@ public:
auto json_create_directory_snapshot(const std::string &path, json &json_data)
-> packet::error_type override;
auto json_read_directory_snapshot(const std::string &path,
const remote::file_handle &handle,
std::uint32_t page, json &json_data)
-> packet::error_type override;
auto json_read_directory_snapshot(
const std::string &path, const remote::file_handle &handle,
std::uint32_t page, json &json_data) -> packet::error_type override;
auto json_release_directory_snapshot(const std::string &path,
const remote::file_handle &handle)
-> packet::error_type override;
// WinFSP Layer
auto winfsp_can_delete(PVOID file_desc, PWSTR file_name)
-> packet::error_type override;
auto winfsp_can_delete(PVOID file_desc,
PWSTR file_name) -> packet::error_type override;
auto winfsp_cleanup(PVOID file_desc, PWSTR file_name, UINT32 flags,
BOOLEAN &was_deleted) -> packet::error_type override;
BOOLEAN &was_closed) -> packet::error_type override;
auto winfsp_close(PVOID file_desc) -> packet::error_type override;
@ -230,33 +227,32 @@ public:
auto winfsp_flush(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override;
auto winfsp_get_dir_buffer(PVOID file_desc, PVOID *&ptr)
-> packet::error_type override;
auto winfsp_get_dir_buffer(PVOID file_desc,
PVOID *&ptr) -> packet::error_type override;
auto winfsp_get_file_info(PVOID file_desc, remote::file_info *file_info)
-> packet::error_type override;
auto winfsp_get_security_by_name(PWSTR file_name, PUINT32 attributes,
std::uint64_t *descriptor_size,
std::wstring &string_descriptor)
-> packet::error_type override;
auto winfsp_get_security_by_name(
PWSTR file_name, PUINT32 attributes, std::uint64_t *descriptor_size,
std::wstring &string_descriptor) -> packet::error_type override;
auto winfsp_get_volume_info(UINT64 &total_size, UINT64 &free_size,
std::string &volume_label)
-> packet::error_type override;
auto winfsp_mounted(const std::wstring &location)
-> packet::error_type override;
auto
winfsp_mounted(const std::wstring &location) -> packet::error_type override;
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;
remote::file_info *file_info,
std::string &normalized_name) -> packet::error_type override;
auto winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 allocation_size,
remote::file_info *file_info)
-> packet::error_type override;
auto
winfsp_overwrite(PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 allocation_size,
remote::file_info *file_info) -> packet::error_type override;
auto winfsp_read(PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length,
PUINT32 bytes_transferred) -> packet::error_type override;
@ -267,27 +263,26 @@ public:
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;
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;
auto winfsp_set_file_size(PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size,
remote::file_info *file_info)
-> packet::error_type override;
auto winfsp_set_file_size(
PVOID file_desc, UINT64 new_size, BOOLEAN set_allocation_size,
remote::file_info *file_info) -> packet::error_type override;
auto winfsp_unmounted(const std::wstring &location)
-> packet::error_type override;
auto
winfsp_unmounted(const std::wstring &location) -> packet::error_type override;
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;
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;
};
} // namespace remote_winfsp
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_SERVER_HPP_
#endif // INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_SERVER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_WINFSP_DRIVE_HPP_
#define REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_WINFSP_DRIVE_HPP_
#ifndef INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_WINFSP_DRIVE_HPP_
#define INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_WINFSP_DRIVE_HPP_
#if defined(_WIN32)
#include "drives/winfsp/remotewinfsp/i_remote_instance.hpp"
@ -50,10 +50,10 @@ public:
private:
app_config &config_;
lock_data &lock_;
remote_winfsp_drive &drive_;
const std::vector<std::string> drive_args_;
FileSystemHost host_;
lock_data &lock_;
protected:
auto OnStart(ULONG, PWSTR *) -> NTSTATUS override;
@ -75,8 +75,8 @@ private:
static void set_file_info(FileInfo &dest, const remote::file_info &src);
public:
auto CanDelete(PVOID file_node, PVOID file_desc, PWSTR file_name)
-> NTSTATUS override;
auto CanDelete(PVOID file_node, PVOID file_desc,
PWSTR file_name) -> NTSTATUS override;
VOID Cleanup(PVOID file_node, PVOID file_desc, PWSTR file_name,
ULONG flags) override;
@ -88,11 +88,11 @@ public:
UINT64 allocation_size, PVOID *file_node, PVOID *file_desc,
OpenFileInfo *ofi) -> NTSTATUS override;
auto Flush(PVOID file_node, PVOID file_desc, FileInfo *file_info)
-> NTSTATUS override;
auto Flush(PVOID file_node, PVOID file_desc,
FileInfo *file_info) -> NTSTATUS override;
auto GetFileInfo(PVOID file_node, PVOID file_desc, FileInfo *file_info)
-> NTSTATUS override;
auto GetFileInfo(PVOID file_node, PVOID file_desc,
FileInfo *file_info) -> NTSTATUS override;
auto GetSecurityByName(PWSTR file_name, PUINT32 attributes,
PSECURITY_DESCRIPTOR descriptor,
@ -107,8 +107,8 @@ public:
auto Mounted(PVOID host) -> NTSTATUS override;
auto Open(PWSTR file_name, UINT32 create_options, UINT32 granted_access,
PVOID *file_node, PVOID *file_desc, OpenFileInfo *ofi)
-> NTSTATUS override;
PVOID *file_node, PVOID *file_desc,
OpenFileInfo *ofi) -> NTSTATUS override;
auto Overwrite(PVOID file_node, PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 allocation_size,
@ -122,8 +122,8 @@ public:
PULONG bytes_transferred) -> NTSTATUS override;
auto Rename(PVOID file_node, PVOID file_desc, PWSTR file_name,
PWSTR new_file_name, BOOLEAN replace_if_exists)
-> NTSTATUS override;
PWSTR new_file_name,
BOOLEAN replace_if_exists) -> NTSTATUS override;
auto SetBasicInfo(PVOID file_node, PVOID file_desc, UINT32 attributes,
UINT64 creation_time, UINT64 last_access_time,
@ -131,15 +131,15 @@ public:
FileInfo *file_info) -> NTSTATUS override;
auto SetFileSize(PVOID file_node, PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size, FileInfo *file_info)
-> NTSTATUS override;
BOOLEAN set_allocation_size,
FileInfo *file_info) -> NTSTATUS override;
VOID Unmounted(PVOID host) override;
auto Write(PVOID file_node, PVOID file_desc, PVOID buffer, UINT64 offset,
ULONG length, BOOLEAN write_to_end, BOOLEAN constrained_io,
PULONG bytes_transferred, FileInfo *file_info)
-> NTSTATUS override;
PULONG bytes_transferred,
FileInfo *file_info) -> NTSTATUS override;
void shutdown() { ::GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0); }
@ -152,4 +152,4 @@ public:
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_WINFSP_DRIVE_HPP_
#endif // INCLUDE_DRIVES_WINFSP_REMOTEWINFSP_REMOTE_WINFSP_DRIVE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_DRIVES_WINFSP_WINFSP_DRIVE_HPP_
#define REPERTORY_INCLUDE_DRIVES_WINFSP_WINFSP_DRIVE_HPP_
#ifndef INCLUDE_DRIVES_WINFSP_WINFSP_DRIVE_HPP_
#define INCLUDE_DRIVES_WINFSP_WINFSP_DRIVE_HPP_
#if defined(_WIN32)
#include "drives/eviction.hpp"
@ -53,11 +53,11 @@ private:
~winfsp_service() override = default;
private:
app_config &config_;
winfsp_drive &drive_;
std::vector<std::string> drive_args_;
FileSystemHost host_;
lock_data &lock_;
winfsp_drive &drive_;
const std::vector<std::string> drive_args_;
FileSystemHost host_;
app_config &config_;
protected:
auto OnStart(ULONG, PWSTR *) -> NTSTATUS override;
@ -75,28 +75,22 @@ private:
std::unique_ptr<remote_winfsp::remote_server> remote_server_;
private:
[[nodiscard]] auto handle_error(std::string_view function_name,
const std::string &api_path, api_error error,
FileInfo *file_info, std::uint64_t file_size,
bool raise_on_failure_only = false) const
-> NTSTATUS;
static auto parse_mount_location(const std::wstring &mount_location)
-> std::string;
static auto
parse_mount_location(const std::wstring &mount_location) -> std::string;
void populate_file_info(const std::string &api_path, std::uint64_t file_size,
const api_meta_map &meta,
FSP_FSCTL_OPEN_FILE_INFO &ofi) const;
FSP_FSCTL_OPEN_FILE_INFO &ofi);
void populate_file_info(std::uint64_t file_size, api_meta_map meta,
FSP_FSCTL_FILE_INFO &fi) const;
FSP_FSCTL_FILE_INFO &fi);
static void set_file_info(remote::file_info &dest,
const FSP_FSCTL_FILE_INFO &src);
public:
auto CanDelete(PVOID file_node, PVOID file_desc, PWSTR file_name)
-> NTSTATUS override;
auto CanDelete(PVOID file_node, PVOID file_desc,
PWSTR file_name) -> NTSTATUS override;
VOID Cleanup(PVOID file_node, PVOID file_desc, PWSTR file_name,
ULONG flags) override;
@ -108,8 +102,8 @@ public:
UINT64 allocation_size, PVOID *file_node, PVOID *file_desc,
OpenFileInfo *ofi) -> NTSTATUS override;
auto Flush(PVOID file_node, PVOID file_desc, FileInfo *file_info)
-> NTSTATUS override;
auto Flush(PVOID file_node, PVOID file_desc,
FileInfo *file_info) -> NTSTATUS override;
[[nodiscard]] auto get_directory_item_count(const std::string &api_path) const
-> std::uint64_t override;
@ -117,25 +111,24 @@ public:
[[nodiscard]] auto get_directory_items(const std::string &api_path) const
-> directory_item_list override;
auto GetFileInfo(PVOID file_node, PVOID file_desc, FileInfo *file_info)
-> NTSTATUS override;
auto GetFileInfo(PVOID file_node, PVOID file_desc,
FileInfo *file_info) -> NTSTATUS override;
[[nodiscard]] auto get_file_size(const std::string &api_path) const
-> std::uint64_t override;
[[nodiscard]] auto
get_file_size(const std::string &api_path) const -> std::uint64_t override;
[[nodiscard]] auto get_item_meta(const std::string &api_path,
api_meta_map &meta) const
-> api_error override;
[[nodiscard]] auto
get_item_meta(const std::string &api_path,
api_meta_map &meta) const -> api_error override;
[[nodiscard]] auto get_item_meta(const std::string &api_path,
const std::string &name,
std::string &value) const
-> api_error override;
[[nodiscard]] auto
get_item_meta(const std::string &api_path, const std::string &name,
std::string &value) const -> api_error override;
[[nodiscard]] auto get_security_by_name(PWSTR file_name, PUINT32 attributes,
PSECURITY_DESCRIPTOR descriptor,
std::uint64_t *descriptor_size)
-> NTSTATUS override;
[[nodiscard]] auto
get_security_by_name(PWSTR file_name, PUINT32 attributes,
PSECURITY_DESCRIPTOR descriptor,
std::uint64_t *descriptor_size) -> NTSTATUS override;
auto GetSecurityByName(PWSTR file_name, PUINT32 attributes,
PSECURITY_DESCRIPTOR descriptor,
@ -159,16 +152,16 @@ public:
auto Mounted(PVOID host) -> NTSTATUS override;
auto Open(PWSTR file_name, UINT32 create_options, UINT32 granted_access,
PVOID *file_node, PVOID *file_desc, OpenFileInfo *ofi)
-> NTSTATUS override;
PVOID *file_node, PVOID *file_desc,
OpenFileInfo *ofi) -> NTSTATUS override;
auto Overwrite(PVOID file_node, PVOID file_desc, UINT32 attributes,
BOOLEAN replace_attributes, UINT64 allocation_size,
FileInfo *file_info) -> NTSTATUS override;
[[nodiscard]] auto populate_file_info(const std::string &api_path,
remote::file_info &file_info) const
-> api_error override;
[[nodiscard]] auto
populate_file_info(const std::string &api_path,
remote::file_info &file_info) -> api_error override;
auto Read(PVOID file_node, PVOID file_desc, PVOID buffer, UINT64 offset,
ULONG length, PULONG bytes_transferred) -> NTSTATUS override;
@ -178,8 +171,8 @@ public:
PULONG bytes_transferred) -> NTSTATUS override;
auto Rename(PVOID file_node, PVOID file_desc, PWSTR file_name,
PWSTR new_file_name, BOOLEAN replace_if_exists)
-> NTSTATUS override;
PWSTR new_file_name,
BOOLEAN replace_if_exists) -> NTSTATUS override;
auto SetBasicInfo(PVOID file_node, PVOID file_desc, UINT32 attributes,
UINT64 creation_time, UINT64 last_access_time,
@ -187,15 +180,15 @@ public:
FileInfo *file_info) -> NTSTATUS override;
auto SetFileSize(PVOID file_node, PVOID file_desc, UINT64 new_size,
BOOLEAN set_allocation_size, FileInfo *file_info)
-> NTSTATUS override;
BOOLEAN set_allocation_size,
FileInfo *file_info) -> NTSTATUS override;
VOID Unmounted(PVOID host) override;
auto Write(PVOID file_node, PVOID file_desc, PVOID buffer, UINT64 offset,
ULONG length, BOOLEAN write_to_end, BOOLEAN constrained_io,
PULONG bytes_transferred, FileInfo *file_info)
-> NTSTATUS override;
PULONG bytes_transferred,
FileInfo *file_info) -> NTSTATUS override;
void shutdown();
@ -207,4 +200,4 @@ public:
} // namespace repertory
#endif // _WIN32
#endif // REPERTORY_INCLUDE_DRIVES_WINFSP_WINFSP_DRIVE_HPP_
#endif // INCLUDE_DRIVES_WINFSP_WINFSP_DRIVE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_CONSUMERS_CONSOLE_CONSUMER_HPP_
#define REPERTORY_INCLUDE_EVENTS_CONSUMERS_CONSOLE_CONSUMER_HPP_
#ifndef INCLUDE_EVENTS_CONSUMERS_CONSOLE_CONSUMER_HPP_
#define INCLUDE_EVENTS_CONSUMERS_CONSOLE_CONSUMER_HPP_
#include "events/event_system.hpp"
@ -40,4 +40,4 @@ private:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_EVENTS_CONSUMERS_CONSOLE_CONSUMER_HPP_
#endif // INCLUDE_EVENTS_CONSUMERS_CONSOLE_CONSUMER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_CONSUMERS_LOGGING_CONSUMER_HPP_
#define REPERTORY_INCLUDE_EVENTS_CONSUMERS_LOGGING_CONSUMER_HPP_
#ifndef INCLUDE_EVENTS_CONSUMERS_LOGGING_CONSUMER_HPP_
#define INCLUDE_EVENTS_CONSUMERS_LOGGING_CONSUMER_HPP_
#include "events/event_system.hpp"
@ -43,4 +43,4 @@ private:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_EVENTS_CONSUMERS_LOGGING_CONSUMER_HPP_
#endif // INCLUDE_EVENTS_CONSUMERS_LOGGING_CONSUMER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_EVENT_HPP_
#define REPERTORY_INCLUDE_EVENTS_EVENT_HPP_
#ifndef INCLUDE_EVENTS_EVENT_HPP_
#define INCLUDE_EVENTS_EVENT_HPP_
namespace repertory {
enum class event_level {
@ -32,12 +32,9 @@ enum class event_level {
trace,
};
[[nodiscard]] auto
event_level_from_string(std::string level,
event_level default_level = event_level::info)
-> event_level;
auto event_level_from_string(std::string level) -> event_level;
[[nodiscard]] auto event_level_to_string(event_level level) -> std::string;
auto event_level_to_string(event_level level) -> std::string;
class event {
protected:
@ -75,18 +72,4 @@ public:
};
} // namespace repertory
NLOHMANN_JSON_NAMESPACE_BEGIN
template <> struct adl_serializer<std::atomic<repertory::event_level>> {
static void to_json(json &data,
const std::atomic<repertory::event_level> &value) {
data = repertory::event_level_to_string(value.load());
}
static void from_json(const json &data,
std::atomic<repertory::event_level> &value) {
value.store(repertory::event_level_from_string(data.get<std::string>()));
}
};
NLOHMANN_JSON_NAMESPACE_END
#endif // REPERTORY_INCLUDE_EVENTS_EVENT_HPP_
#endif // INCLUDE_EVENTS_EVENT_HPP_

View File

@ -19,32 +19,53 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_EVENT_SYSTEM_HPP_
#define REPERTORY_INCLUDE_EVENTS_EVENT_SYSTEM_HPP_
#ifndef INCLUDE_EVENTS_EVENT_SYSTEM_HPP_
#define INCLUDE_EVENTS_EVENT_SYSTEM_HPP_
#include "events/event.hpp"
#include "events/t_event_system.hpp"
#include "utils/string.hpp"
namespace repertory {
using event_system = t_event_system<event>;
using event_consumer = event_system::event_consumer;
#define E_FROM_API_FILE_ERROR(e) api_error_to_string(e)
#define E_FROM_BOOL(t) std::to_string(t)
#define E_FROM_CURL_CODE(t) std::string(curl_easy_strerror(t))
#define E_FROM_DOUBLE(d) std::to_string(d)
#define E_FROM_DOUBLE_PRECISE(dbl_val) \
#define E_CAST(t) ((std::string)t)
#define E_DOUBLE(d) std::to_string(d)
#define E_DOUBLE_PRECISE(dbl_val) \
([](const double &d) -> std::string { \
std::stringstream ss; \
ss << std::fixed << std::setprecision(2) << d; \
return ss.str(); \
})(dbl_val)
#define E_FROM_BOOL(t) std::to_string(t)
#define E_FROM_EXCEPTION(e) std::string(e.what() ? e.what() : "")
#define E_FROM_INT32(t) std::to_string(t)
#define E_FROM_SIZE_T(t) std::to_string(t)
#define E_FROM_STRING(t) t
#define E_FROM_INT64(t) std::to_string(t)
#define E_FROM_UINT16(t) std::to_string(t)
#define E_FROM_STRING_ARRAY(a) \
([](const auto &array) -> std::string { \
std::stringstream ret; \
for (const auto &item : array) { \
ret << (std::string(item) + " "); \
} \
return std::string(ret).TrimRight(); \
})(a)
#define E_PERCENT(d) \
([](const double &d) -> std::string { \
std::stringstream ss; \
ss << std::fixed << std::setprecision(2) << d; \
ss << "%"; \
return ss; \
})(d)
#define E_STRING(t) t
#define E_FROM_CURL_CODE(t) std::string(curl_easy_strerror(t))
#define E_FROM_UINT8(t) std::to_string(t)
#define E_FROM_UINT32(t) std::to_string(t)
#define E_FROM_UINT64(t) std::to_string(t)
#define E_FROM_DOWNLOAD_TYPE(t) download_type_to_string(t)
#define E_FROM_SIZE_T(t) std::to_string(t)
#define E_FROM_API_FILE_ERROR(e) api_error_to_string(e)
#define E_PROP(type, name, short_name, ts) \
private: \
@ -238,4 +259,4 @@ private: \
[this](const event &evt) { callback(evt); }))
} // namespace repertory
#endif // REPERTORY_INCLUDE_EVENTS_EVENT_SYSTEM_HPP_
#endif // INCLUDE_EVENTS_EVENT_SYSTEM_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_EVENTS_HPP_
#define REPERTORY_INCLUDE_EVENTS_EVENTS_HPP_
#ifndef INCLUDE_EVENTS_EVENTS_HPP_
#define INCLUDE_EVENTS_EVENTS_HPP_
#include "events/event_system.hpp"
#include "types/repertory.hpp"
@ -28,268 +28,274 @@
namespace repertory {
// clang-format off
E_SIMPLE2(curl_error, error, true,
std::string, url, url, E_FROM_STRING,
E_SIMPLE2(curl_error, info, true,
std::string, url, url, E_STRING,
CURLcode, res, res, E_FROM_CURL_CODE
);
E_SIMPLE3(debug_log, debug, true,
std::string, function, func, E_FROM_STRING,
std::string, api_path, ap, E_FROM_STRING,
std::string, data, data, E_FROM_STRING
std::string, function, func, E_STRING,
std::string, api_path, ap, E_STRING,
std::string, data, data, E_STRING
);
E_SIMPLE1(directory_removed, info, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE2(directory_removed_externally, warn, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE2(directory_remove_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE2(drive_mount_failed, error, true,
std::string, location, loc, E_FROM_STRING,
std::string, result, res, E_FROM_STRING
std::string, location, loc, E_STRING,
std::string, result, res, E_STRING
);
E_SIMPLE1(drive_mounted, info, true,
std::string, location, loc, E_FROM_STRING
std::string, location, loc, E_STRING
);
E_SIMPLE1(drive_mount_result, info, true,
std::string, result, res, E_FROM_STRING
std::string, result, res, E_STRING
);
E_SIMPLE1(drive_unmount_pending, info, true,
std::string, location, loc, E_FROM_STRING
std::string, location, loc, E_STRING
);
E_SIMPLE1(drive_unmounted, info, true,
std::string, location, loc, E_FROM_STRING
std::string, location, loc, E_STRING
);
E_SIMPLE1(event_level_changed, info, true,
std::string, new_event_level, level, E_FROM_STRING
std::string, new_event_level, level, E_STRING
);
E_SIMPLE1(failed_upload_queued, error, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE1(failed_upload_removed, warn, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE1(failed_upload_retry, info, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE2(file_get_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE1(file_get_api_list_failed, error, true,
std::string, error, err, E_FROM_STRING
std::string, error, err, E_STRING
);
E_SIMPLE1(file_pinned, info, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE3(file_read_bytes_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, error, err, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, error, err, E_STRING,
std::size_t, retry, retry, E_FROM_SIZE_T
);
E_SIMPLE1(file_removed, debug, true,
std::string, api_path, ap, E_FROM_STRING
E_SIMPLE1(file_removed, info, true,
std::string, api_path, ap, E_STRING
);
E_SIMPLE2(file_removed_externally, warn, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE2(file_remove_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE3(file_rename_failed, error, true,
std::string, from_api_path, FROM, E_FROM_STRING,
std::string, to_api_path, TO, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, from_api_path, FROM, E_STRING,
std::string, to_api_path, TO, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE2(file_get_size_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE3(filesystem_item_added, debug, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, parent, parent, E_FROM_STRING,
E_SIMPLE3(filesystem_item_added, info, true,
std::string, api_path, ap, E_STRING,
std::string, parent, parent, E_STRING,
bool, directory, dir, E_FROM_BOOL
);
E_SIMPLE4(filesystem_item_closed, trace, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING,
bool, directory, dir, E_FROM_BOOL,
bool, changed, changed, E_FROM_BOOL
);
E_SIMPLE5(filesystem_item_handle_closed, trace, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::uint64_t, handle, handle, E_FROM_UINT64,
std::string, source, src, E_FROM_STRING,
std::string, source, src, E_STRING,
bool, directory, dir, E_FROM_BOOL,
bool, changed, changed, E_FROM_BOOL
);
E_SIMPLE4(filesystem_item_handle_opened, trace, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::uint64_t, handle, handle, E_FROM_UINT64,
std::string, source, src, E_FROM_STRING,
std::string, source, src, E_STRING,
bool, directory, dir, E_FROM_BOOL
);
E_SIMPLE2(filesystem_item_evicted, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE2(filesystem_item_get_failed, error, true,
std::string, api_path, ap, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE3(filesystem_item_opened, trace, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING,
bool, directory, dir, E_FROM_BOOL
);
E_SIMPLE1(file_unpinned, info, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE4(file_upload_completed, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING,
api_error, result, res, E_FROM_API_FILE_ERROR,
bool, cancelled, cancel, E_FROM_BOOL
);
E_SIMPLE3(file_upload_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE2(file_upload_not_found, warn, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE2(file_upload_queued, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE1(file_upload_removed, debug, true,
std::string, api_path, ap, E_FROM_STRING
std::string, api_path, ap, E_STRING
);
E_SIMPLE3(file_upload_retry, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING,
api_error, result, res, E_FROM_API_FILE_ERROR
);
E_SIMPLE2(file_upload_started, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE(item_scan_begin, info, true);
E_SIMPLE(item_scan_end, info, true);
E_SIMPLE1(orphaned_file_deleted, warn, true,
std::string, source, src, E_FROM_STRING
std::string, source, src, E_STRING
);
E_SIMPLE1(orphaned_file_detected, warn, true,
std::string, source, src, E_FROM_STRING
std::string, source, src, E_STRING
);
E_SIMPLE2(orphaned_file_processed, warn, true,
std::string, source, src, E_STRING,
std::string, dest, dest, E_STRING
);
E_SIMPLE3(orphaned_file_processing_failed, error, true,
std::string, source, src, E_FROM_STRING,
std::string, dest, dest, E_FROM_STRING,
std::string, result, res, E_FROM_STRING
);
E_SIMPLE1(orphaned_source_file_detected, info, true,
std::string, source, src, E_FROM_STRING
);
E_SIMPLE1(orphaned_source_file_removed, info, true,
std::string, source, src, E_FROM_STRING
std::string, source, src, E_STRING,
std::string, dest, dest, E_STRING,
std::string, result, res, E_STRING
);
E_SIMPLE1(polling_item_begin, debug, true,
std::string, item_name, item, E_FROM_STRING
std::string, item_name, item, E_STRING
);
E_SIMPLE1(polling_item_end, debug, true,
std::string, item_name, item, E_FROM_STRING
std::string, item_name, item, E_STRING
);
E_SIMPLE2(provider_offline, error, true,
std::string, host_name_or_ip, host, E_FROM_STRING,
std::string, host_name_or_ip, host, E_STRING,
std::uint16_t, port, port, E_FROM_UINT16
);
E_SIMPLE2(provider_upload_begin, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING
);
E_SIMPLE3(provider_upload_end, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, source, src, E_STRING,
api_error, result, res, E_FROM_API_FILE_ERROR
);
E_SIMPLE2(repertory_exception, error, true,
std::string, function, func, E_FROM_STRING,
std::string, message, msg, E_FROM_STRING
std::string, function, func, E_STRING,
std::string, message, msg, E_STRING
);
E_SIMPLE1(rpc_server_exception, error, true,
std::string, exception, exception, E_FROM_STRING
std::string, exception, exception, E_STRING
);
E_SIMPLE1(service_shutdown_begin, debug, true,
std::string, service, svc, E_FROM_STRING
std::string, service, svc, E_STRING
);
E_SIMPLE1(service_shutdown_end, debug, true,
std::string, service, svc, E_FROM_STRING
std::string, service, svc, E_STRING
);
E_SIMPLE1(service_started, debug, true,
std::string, service, svc, E_FROM_STRING
std::string, service, svc, E_STRING
);
E_SIMPLE(unmount_requested, info, true);
#if !defined(_WIN32)
E_SIMPLE2(unmount_result, info, true,
std::string, location, loc, E_FROM_STRING,
std::string, result, res, E_FROM_STRING
std::string, location, loc, E_STRING,
std::string, result, res, E_STRING
);
#endif
// clang-format on
} // namespace repertory
#endif // REPERTORY_INCLUDE_EVENTS_EVENTS_HPP_
#endif // INCLUDE_EVENTS_EVENTS_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_EVENTS_T_EVENT_SYSTEM_HPP_
#define REPERTORY_INCLUDE_EVENTS_T_EVENT_SYSTEM_HPP_
#ifndef INCLUDE_EVENTS_T_EVENT_SYSTEM_HPP_
#define INCLUDE_EVENTS_T_EVENT_SYSTEM_HPP_
#include "events/event.hpp"
#include "utils/collection.hpp"
@ -190,4 +190,4 @@ public:
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_EVENTS_T_EVENT_SYSTEM_HPP_
#endif // INCLUDE_EVENTS_T_EVENT_SYSTEM_HPP_

View File

@ -1,67 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_CACHE_SIZE_MGR_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_CACHE_SIZE_MGR_HPP_
#include "types/repertory.hpp"
namespace repertory {
class app_config;
class cache_size_mgr final {
public:
cache_size_mgr(const cache_size_mgr &) = delete;
cache_size_mgr(cache_size_mgr &&) = delete;
auto operator=(const cache_size_mgr &) -> cache_size_mgr & = delete;
auto operator=(cache_size_mgr &&) -> cache_size_mgr & = delete;
protected:
cache_size_mgr() = default;
~cache_size_mgr() { stop(); }
private:
static cache_size_mgr instance_;
private:
app_config *cfg_{nullptr};
std::uint64_t cache_size_{0U};
mutable std::mutex mtx_;
std::condition_variable notify_;
stop_type stop_requested_{false};
public:
[[nodiscard]] auto expand(std::uint64_t size) -> api_error;
void initialize(app_config *cfg);
[[nodiscard]] static auto instance() -> cache_size_mgr & { return instance_; }
[[nodiscard]] auto shrink(std::uint64_t size) -> api_error;
[[nodiscard]] auto size() const -> std::uint64_t;
void stop();
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_CACHE_SIZE_MGR_HPP_

View File

@ -1,83 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_DIRECT_OPEN_FILE_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_DIRECT_OPEN_FILE_HPP_
#include "file_manager/ring_buffer_base.hpp"
#include "types/repertory.hpp"
namespace repertory {
class i_provider;
class i_upload_manager;
class direct_open_file final : public ring_buffer_base {
public:
direct_open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider);
~direct_open_file() override;
public:
direct_open_file() = delete;
direct_open_file(const direct_open_file &) noexcept = delete;
direct_open_file(direct_open_file &&) noexcept = delete;
auto operator=(direct_open_file &&) noexcept -> direct_open_file & = delete;
auto
operator=(const direct_open_file &) noexcept -> direct_open_file & = delete;
private:
std::array<data_buffer, min_ring_size> ring_data_;
protected:
[[nodiscard]] auto on_check_start() -> bool override;
[[nodiscard]] auto
on_chunk_downloaded(std::size_t /* chunk */,
const data_buffer & /* buffer */) -> api_error override {
return api_error::success;
}
[[nodiscard]] auto
on_read_chunk(std::size_t chunk, std::size_t read_size,
std::uint64_t read_offset, data_buffer &data,
std::size_t &bytes_read) -> api_error override;
[[nodiscard]] auto use_buffer(std::size_t chunk,
std::function<api_error(data_buffer &)> func)
-> api_error override;
public:
[[nodiscard]] auto native_operation(native_operation_callback /* callback */)
-> api_error override {
return api_error::not_supported;
}
[[nodiscard]] auto native_operation(std::uint64_t /* new_file_size */,
native_operation_callback /* callback */)
-> api_error override {
return api_error::not_supported;
}
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_DIRECT_OPEN_FILE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_FILE_MANAGER_EVENTS_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_EVENTS_HPP_
#ifndef INCLUDE_FILE_MANAGER_EVENTS_HPP_
#define INCLUDE_FILE_MANAGER_EVENTS_HPP_
#include "events/events.hpp"
#include "types/repertory.hpp"
@ -28,59 +28,75 @@
namespace repertory {
// clang-format off
E_SIMPLE2(download_begin, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING
);
E_SIMPLE5(download_chunk_begin, debug, true,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING,
std::size_t, chunk, chunk, E_FROM_SIZE_T,
std::size_t, total, total, E_FROM_SIZE_T,
std::size_t, complete, complete, E_FROM_SIZE_T
);
E_SIMPLE6(download_chunk_end, debug, true,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING,
std::size_t, chunk, chunk, E_FROM_SIZE_T,
std::size_t, total, total, E_FROM_SIZE_T,
std::size_t, complete, complete, E_FROM_SIZE_T,
api_error, result, result, E_FROM_API_FILE_ERROR
);
E_SIMPLE3(download_end, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING,
api_error, result, result, E_FROM_API_FILE_ERROR
);
E_SIMPLE3(download_progress, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING,
double, progress, prog, E_FROM_DOUBLE_PRECISE
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING,
double, progress, prog, E_DOUBLE_PRECISE
);
E_SIMPLE2(download_restored, info, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING
);
E_SIMPLE3(download_restore_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE3(download_resume_add_failed, error, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING,
std::string, error, err, E_FROM_STRING
E_SIMPLE2(download_resumed, info, true,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING
);
E_SIMPLE2(download_resume_added, debug, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING
E_SIMPLE2(download_stored, info, true,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING
);
E_SIMPLE2(download_resume_removed, debug, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, dest_path, dest, E_FROM_STRING
E_SIMPLE2(download_stored_removed, info, true,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING
);
E_SIMPLE1(item_timeout, trace, true,
std::string, api_path, ap, E_FROM_STRING
E_SIMPLE3(download_stored_failed, error, true,
std::string, api_path, ap, E_STRING,
std::string, dest_path, dest, E_STRING,
std::string, error, err, E_STRING
);
E_SIMPLE3(download_type_selected, debug, true,
std::string, api_path, ap, E_FROM_STRING,
std::string, source, src, E_FROM_STRING,
download_type, download_type, type, E_FROM_DOWNLOAD_TYPE
E_SIMPLE1(item_timeout, debug, true,
std::string, api_path, ap, E_STRING
);
// clang-format on
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_EVENTS_HPP_
#endif // INCLUDE_FILE_MANAGER_EVENTS_HPP_

View File

@ -19,16 +19,16 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_FILE_MANAGER_FILE_MANAGER_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_FILE_MANAGER_HPP_
#ifndef INCLUDE_FILE_MANAGER_FILE_MANAGER_HPP_
#define INCLUDE_FILE_MANAGER_FILE_MANAGER_HPP_
#include "db/i_file_mgr_db.hpp"
#include "database/db_common.hpp"
#include "events/event_system.hpp"
#include "events/events.hpp"
#include "file_manager/i_file_manager.hpp"
#include "file_manager/i_open_file.hpp"
#include "file_manager/i_upload_manager.hpp"
#include "file_manager/upload.hpp"
#include "platform/platform.hpp"
#include "types/repertory.hpp"
#include "utils/file.hpp"
@ -39,6 +39,402 @@ class i_provider;
class file_manager final : public i_file_manager, public i_upload_manager {
E_CONSUMER();
public:
class open_file_base : public i_closeable_open_file {
public:
open_file_base(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider);
open_file_base(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi,
std::map<std::uint64_t, open_file_data> open_data,
i_provider &provider);
~open_file_base() override = default;
public:
open_file_base() = delete;
open_file_base(const open_file_base &) noexcept = delete;
open_file_base(open_file_base &&) noexcept = delete;
auto operator=(open_file_base &&) noexcept -> open_file_base & = delete;
auto
operator=(const open_file_base &) noexcept -> open_file_base & = delete;
public:
class download final {
public:
download() = default;
~download() = default;
public:
download(const download &) noexcept = delete;
download(download &&) noexcept = delete;
auto operator=(download &&) noexcept -> download & = delete;
auto operator=(const download &) noexcept -> download & = delete;
private:
bool complete_{false};
api_error error_{api_error::success};
std::mutex mtx_;
std::condition_variable notify_;
public:
void notify(const api_error &err);
auto wait() -> api_error;
};
class io_item final {
public:
io_item(std::function<api_error()> action) : action_(std::move(action)) {}
~io_item() = default;
public:
io_item() = delete;
io_item(const io_item &) noexcept = delete;
io_item(io_item &&) noexcept = delete;
auto operator=(io_item &&) noexcept -> io_item & = delete;
auto operator=(const io_item &) noexcept -> io_item & = delete;
private:
std::function<api_error()> action_;
std::mutex mtx_;
std::condition_variable notify_;
std::optional<api_error> result_;
public:
void action();
[[nodiscard]] auto get_result() -> api_error;
};
protected:
std::uint64_t chunk_size_;
std::uint8_t chunk_timeout_;
filesystem_item fsi_;
std::size_t last_chunk_size_;
std::map<std::uint64_t, open_file_data> open_data_;
i_provider &provider_;
private:
api_error error_{api_error::success};
mutable std::mutex error_mtx_;
stop_type io_stop_requested_{false};
std::unique_ptr<std::thread> io_thread_;
protected:
std::unordered_map<std::size_t, std::shared_ptr<download>>
active_downloads_;
mutable std::recursive_mutex file_mtx_;
std::atomic<std::chrono::system_clock::time_point> last_access_{
std::chrono::system_clock::now()};
bool modified_{false};
std::unique_ptr<utils::file::i_file> nf_;
mutable std::mutex io_thread_mtx_;
std::condition_variable io_thread_notify_;
std::deque<std::shared_ptr<io_item>> io_thread_queue_;
bool removed_{false};
private:
void file_io_thread();
protected:
[[nodiscard]] auto do_io(std::function<api_error()> action) -> api_error;
virtual auto is_download_complete() const -> bool = 0;
void reset_timeout();
auto set_api_error(const api_error &e) -> api_error;
public:
void add(std::uint64_t handle, open_file_data ofd) override;
[[nodiscard]] auto can_close() const -> bool override;
auto close() -> bool override;
[[nodiscard]] auto get_api_error() const -> api_error;
[[nodiscard]] auto get_api_path() const -> std::string override;
[[nodiscard]] auto get_chunk_size() const -> std::size_t override {
return chunk_size_;
}
[[nodiscard]] auto get_file_size() const -> std::uint64_t override;
[[nodiscard]] auto get_filesystem_item() const -> filesystem_item override;
[[nodiscard]] auto
get_handles() const -> std::vector<std::uint64_t> override;
[[nodiscard]] auto
get_open_data() const -> std::map<std::uint64_t, open_file_data> override;
[[nodiscard]] auto
get_open_data(std::uint64_t handle) const -> open_file_data override;
[[nodiscard]] auto get_open_file_count() const -> std::size_t override;
[[nodiscard]] auto get_source_path() const -> std::string override {
return fsi_.source_path;
}
[[nodiscard]] auto has_handle(std::uint64_t handle) const -> bool override {
return open_data_.find(handle) != open_data_.end();
}
[[nodiscard]] auto is_directory() const -> bool override {
return fsi_.directory;
}
[[nodiscard]] auto is_modified() const -> bool override;
void remove(std::uint64_t handle) override;
void set_api_path(const std::string &api_path) override;
};
class open_file final : public open_file_base {
public:
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider, i_upload_manager &mgr);
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi,
std::map<std::uint64_t, open_file_data> open_data,
i_provider &provider, i_upload_manager &mgr);
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider,
std::optional<boost::dynamic_bitset<>> read_state,
i_upload_manager &mgr);
private:
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi,
std::map<std::uint64_t, open_file_data> open_data,
i_provider &provider,
std::optional<boost::dynamic_bitset<>> read_state,
i_upload_manager &mgr);
public:
open_file() = delete;
open_file(const open_file &) noexcept = delete;
open_file(open_file &&) noexcept = delete;
auto operator=(open_file &&) noexcept -> open_file & = delete;
auto operator=(const open_file &) noexcept -> open_file & = delete;
public:
~open_file() override;
private:
i_upload_manager &mgr_;
private:
bool notified_ = false;
std::size_t read_chunk_index_{};
boost::dynamic_bitset<> read_state_;
std::unique_ptr<std::thread> reader_thread_;
std::unique_ptr<std::thread> download_thread_;
stop_type stop_requested_ = false;
private:
void download_chunk(std::size_t chunk, bool skip_active, bool should_reset);
void download_range(std::size_t start_chunk_index,
std::size_t end_chunk_index_inclusive,
bool should_reset);
void set_modified();
void update_background_reader(std::size_t read_chunk);
protected:
auto is_download_complete() const -> bool override {
return read_state_.all();
}
public:
auto close() -> bool override;
[[nodiscard]] auto
get_read_state() const -> boost::dynamic_bitset<> override;
[[nodiscard]] auto get_read_state(std::size_t chunk) const -> bool override;
[[nodiscard]] auto is_complete() const -> bool override;
auto is_write_supported() const -> bool override { return true; }
[[nodiscard]] auto
native_operation(native_operation_callback callback) -> api_error override;
[[nodiscard]] auto
native_operation(std::uint64_t new_file_size,
native_operation_callback callback) -> api_error override;
void remove(std::uint64_t handle) override;
[[nodiscard]] auto read(std::size_t read_size, std::uint64_t read_offset,
data_buffer &data) -> api_error override;
[[nodiscard]] auto
resize(std::uint64_t new_file_size) -> api_error override;
[[nodiscard]] auto write(std::uint64_t write_offset,
const data_buffer &data,
std::size_t &bytes_written) -> api_error override;
};
class ring_buffer_open_file final : public open_file_base {
public:
ring_buffer_open_file(std::string buffer_directory,
std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider);
ring_buffer_open_file(std::string buffer_directory,
std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider,
std::size_t ring_size);
~ring_buffer_open_file() override;
public:
ring_buffer_open_file() = delete;
ring_buffer_open_file(const ring_buffer_open_file &) noexcept = delete;
ring_buffer_open_file(ring_buffer_open_file &&) noexcept = delete;
auto operator=(ring_buffer_open_file &&) noexcept
-> ring_buffer_open_file & = delete;
auto operator=(const ring_buffer_open_file &) noexcept
-> ring_buffer_open_file & = delete;
private:
boost::dynamic_bitset<> ring_state_;
std::size_t total_chunks_;
private:
std::unique_ptr<std::thread> chunk_forward_thread_;
std::unique_ptr<std::thread> chunk_reverse_thread_;
std::condition_variable chunk_notify_;
mutable std::mutex chunk_mtx_;
std::size_t current_chunk_{};
std::size_t first_chunk_{};
std::size_t last_chunk_;
private:
auto download_chunk(std::size_t chunk) -> api_error;
void forward_reader_thread(std::size_t count);
void reverse_reader_thread(std::size_t count);
protected:
auto is_download_complete() const -> bool override;
public:
void forward(std::size_t count);
[[nodiscard]] auto get_current_chunk() const -> std::size_t {
return current_chunk_;
}
[[nodiscard]] auto get_first_chunk() const -> std::size_t {
return first_chunk_;
}
[[nodiscard]] auto get_last_chunk() const -> std::size_t {
return last_chunk_;
}
[[nodiscard]] auto
get_read_state() const -> boost::dynamic_bitset<> override;
[[nodiscard]] auto get_read_state(std::size_t chunk) const -> bool override;
[[nodiscard]] auto get_total_chunks() const -> std::size_t {
return total_chunks_;
}
[[nodiscard]] auto is_complete() const -> bool override { return true; }
auto is_write_supported() const -> bool override { return false; }
[[nodiscard]] auto
native_operation(native_operation_callback callback) -> api_error override;
[[nodiscard]] auto
native_operation(std::uint64_t,
native_operation_callback) -> api_error override {
return api_error::not_supported;
}
[[nodiscard]] auto read(std::size_t read_size, std::uint64_t read_offset,
data_buffer &data) -> api_error override;
[[nodiscard]] auto resize(std::uint64_t) -> api_error override {
return api_error::not_supported;
}
void reverse(std::size_t count);
void set(std::size_t first_chunk, std::size_t current_chunk);
void set_api_path(const std::string &api_path) override;
[[nodiscard]] auto write(std::uint64_t, const data_buffer &,
std::size_t &) -> api_error override {
return api_error::not_supported;
}
};
class upload final {
public:
upload(filesystem_item fsi, i_provider &provider);
~upload();
public:
upload() = delete;
upload(const upload &) noexcept = delete;
upload(upload &&) noexcept = delete;
auto operator=(upload &&) noexcept -> upload & = delete;
auto operator=(const upload &) noexcept -> upload & = delete;
private:
filesystem_item fsi_;
i_provider &provider_;
private:
bool cancelled_ = false;
api_error error_ = api_error::success;
std::unique_ptr<std::thread> thread_;
stop_type stop_requested_ = false;
private:
void upload_thread();
public:
void cancel();
[[nodiscard]] auto get_api_error() const -> api_error { return error_; }
[[nodiscard]] auto get_api_path() const -> std::string {
return fsi_.api_path;
}
[[nodiscard]] auto get_source_path() const -> std::string {
return fsi_.source_path;
}
[[nodiscard]] auto is_cancelled() const -> bool { return cancelled_; }
void stop();
};
public:
file_manager(app_config &config, i_provider &provider);
@ -56,8 +452,8 @@ private:
i_provider &provider_;
private:
std::unique_ptr<i_file_mgr_db> mgr_db_;
std::atomic<std::uint64_t> next_handle_{0U};
db::db3_t db_{nullptr};
std::uint64_t next_handle_{0U};
mutable std::recursive_mutex open_file_mtx_;
std::unordered_map<std::string, std::shared_ptr<i_closeable_open_file>>
open_file_lookup_;
@ -68,8 +464,6 @@ private:
std::unique_ptr<std::thread> upload_thread_;
private:
[[nodiscard]] auto close_all(const std::string &api_path) -> bool;
void close_timed_out_files();
auto get_open_file_by_handle(std::uint64_t handle) const
@ -85,13 +479,9 @@ private:
void queue_upload(const std::string &api_path, const std::string &source_path,
bool no_lock);
void remove_resume(const std::string &api_path,
const std::string &source_path, bool no_lock);
void remove_upload(const std::string &api_path, bool no_lock);
void swap_renamed_items(std::string from_api_path, std::string to_api_path,
bool directory);
void swap_renamed_items(std::string from_api_path, std::string to_api_path);
void upload_completed(const file_upload_completed &evt);
@ -108,11 +498,6 @@ public:
void remove_resume(const std::string &api_path,
const std::string &source_path) override;
static auto remove_source_and_shrink_cache(const std::string &api_path,
const std::string &source_path,
std::uint64_t file_size,
bool allocated) -> bool;
void remove_upload(const std::string &api_path) override;
void store_resume(const i_open_file &file) override;
@ -120,6 +505,8 @@ public:
public:
void close(std::uint64_t handle);
void close_all(const std::string &api_path);
[[nodiscard]] auto create(const std::string &api_path, api_meta_map &meta,
open_file_data ofd, std::uint64_t &handle,
std::shared_ptr<i_open_file> &file) -> api_error;
@ -139,37 +526,38 @@ public:
[[nodiscard]] auto get_open_handle_count() const -> std::size_t;
[[nodiscard]] auto get_stored_downloads() const
-> std::vector<i_file_mgr_db::resume_entry>;
[[nodiscard]] auto get_stored_downloads() const -> std::vector<json>;
[[nodiscard]] auto has_no_open_file_handles() const -> bool override;
[[nodiscard]] auto is_processing(const std::string &api_path) const
-> bool override;
[[nodiscard]] auto
is_processing(const std::string &api_path) const -> bool override;
#if defined(PROJECT_TESTING)
[[nodiscard]] auto open(std::shared_ptr<i_closeable_open_file> of,
const open_file_data &ofd, std::uint64_t &handle,
std::shared_ptr<i_open_file> &file) -> api_error;
#endif // defined(PROJECT_TESTING)
#endif
[[nodiscard]] auto open(const std::string &api_path, bool directory,
const open_file_data &ofd, std::uint64_t &handle,
std::shared_ptr<i_open_file> &file) -> api_error;
[[nodiscard]] auto remove_file(const std::string &api_path) -> api_error;
[[nodiscard]] auto rename_directory(const std::string &from_api_path,
const std::string &to_api_path)
-> api_error;
[[nodiscard]] auto
rename_directory(const std::string &from_api_path,
const std::string &to_api_path) -> api_error;
[[nodiscard]] auto rename_file(const std::string &from_api_path,
const std::string &to_api_path, bool overwrite)
-> api_error;
const std::string &to_api_path,
bool overwrite) -> api_error;
void start();
void stop();
void update_used_space(std::uint64_t &used_space) const override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_FILE_MANAGER_HPP_
#endif // INCLUDE_FILE_MANAGER_FILE_MANAGER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_FILE_MANAGER_I_FILE_MANAGER_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_I_FILE_MANAGER_HPP_
#ifndef INCLUDE_FILE_MANAGER_I_FILE_MANAGER_HPP_
#define INCLUDE_FILE_MANAGER_I_FILE_MANAGER_HPP_
#include "types/repertory.hpp"
@ -45,7 +45,9 @@ public:
[[nodiscard]] virtual auto is_processing(const std::string &api_path) const
-> bool = 0;
virtual void update_used_space(std::uint64_t &used_space) const = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_I_FILE_MANAGER_HPP_
#endif // INCLUDE_FILE_MANAGER_I_FILE_MANAGER_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_FILE_MANAGER_I_OPEN_FILE_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_I_OPEN_FILE_HPP_
#ifndef INCLUDE_FILE_MANAGER_I_OPEN_FILE_HPP_
#define INCLUDE_FILE_MANAGER_I_OPEN_FILE_HPP_
#include "types/repertory.hpp"
@ -40,17 +40,11 @@ public:
[[nodiscard]] virtual auto get_filesystem_item() const -> filesystem_item = 0;
[[nodiscard]] virtual auto get_open_data()
-> std::map<std::uint64_t, open_file_data> & = 0;
[[nodiscard]] virtual auto get_open_data() const
-> const std::map<std::uint64_t, open_file_data> & = 0;
[[nodiscard]] virtual auto get_open_data(std::uint64_t handle)
-> open_file_data & = 0;
-> std::map<std::uint64_t, open_file_data> = 0;
[[nodiscard]] virtual auto get_open_data(std::uint64_t handle) const
-> const open_file_data & = 0;
-> open_file_data = 0;
[[nodiscard]] virtual auto get_open_file_count() const -> std::size_t = 0;
@ -62,12 +56,8 @@ public:
[[nodiscard]] virtual auto get_source_path() const -> std::string = 0;
[[nodiscard]] virtual auto is_complete() const -> bool = 0;
[[nodiscard]] virtual auto is_directory() const -> bool = 0;
[[nodiscard]] virtual auto is_write_supported() const -> bool = 0;
[[nodiscard]] virtual auto has_handle(std::uint64_t handle) const -> bool = 0;
[[nodiscard]] virtual auto
@ -97,8 +87,6 @@ class i_closeable_open_file : public i_open_file {
public:
virtual void add(std::uint64_t handle, open_file_data ofd) = 0;
[[nodiscard]] virtual auto get_allocated() const -> bool = 0;
[[nodiscard]] virtual auto can_close() const -> bool = 0;
virtual auto close() -> bool = 0;
@ -106,12 +94,14 @@ public:
[[nodiscard]] virtual auto get_handles() const
-> std::vector<std::uint64_t> = 0;
[[nodiscard]] virtual auto is_complete() const -> bool = 0;
[[nodiscard]] virtual auto is_modified() const -> bool = 0;
virtual void remove(std::uint64_t handle) = 0;
[[nodiscard]] virtual auto is_write_supported() const -> bool = 0;
virtual void remove_all() = 0;
virtual void remove(std::uint64_t handle) = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_I_OPEN_FILE_HPP_
#endif // INCLUDE_FILE_MANAGER_I_OPEN_FILE_HPP_

View File

@ -19,8 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_FILE_MANAGER_I_UPLOAD_MANAGER_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_I_UPLOAD_MANAGER_HPP_
#ifndef INCLUDE_FILE_MANAGER_I_UPLOAD_MANAGER_HPP_
#define INCLUDE_FILE_MANAGER_I_UPLOAD_MANAGER_HPP_
namespace repertory {
class i_open_file;
@ -29,15 +29,15 @@ class i_upload_manager {
INTERFACE_SETUP(i_upload_manager);
public:
virtual void queue_upload(const i_open_file &file) = 0;
virtual void queue_upload(const i_open_file &o) = 0;
virtual void remove_resume(const std::string &api_path,
const std::string &source_path) = 0;
virtual void remove_upload(const std::string &api_path) = 0;
virtual void store_resume(const i_open_file &file) = 0;
virtual void store_resume(const i_open_file &o) = 0;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_I_UPLOAD_MANAGER_HPP_
#endif // INCLUDE_FILE_MANAGER_I_UPLOAD_MANAGER_HPP_

View File

@ -1,135 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_OPEN_FILE_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_OPEN_FILE_HPP_
#include "file_manager/open_file_base.hpp"
#include "types/repertory.hpp"
#include "utils/types/file/i_file.hpp"
namespace repertory {
class i_provider;
class i_upload_manager;
class open_file final : public open_file_base {
public:
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider, i_upload_manager &mgr);
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi,
std::map<std::uint64_t, open_file_data> open_data,
i_provider &provider, i_upload_manager &mgr);
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider,
std::optional<boost::dynamic_bitset<>> read_state,
i_upload_manager &mgr);
private:
open_file(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi,
std::map<std::uint64_t, open_file_data> open_data,
i_provider &provider,
std::optional<boost::dynamic_bitset<>> read_state,
i_upload_manager &mgr);
public:
open_file() = delete;
open_file(const open_file &) noexcept = delete;
open_file(open_file &&) noexcept = delete;
auto operator=(open_file &&) noexcept -> open_file & = delete;
auto operator=(const open_file &) noexcept -> open_file & = delete;
public:
~open_file() override;
private:
i_upload_manager &mgr_;
private:
bool allocated{false};
std::unique_ptr<utils::file::i_file> nf_;
bool notified_{false};
std::size_t read_chunk_{};
boost::dynamic_bitset<> read_state_;
std::unique_ptr<std::thread> reader_thread_;
mutable std::recursive_mutex rw_mtx_;
stop_type stop_requested_{false};
private:
[[nodiscard]] auto adjust_cache_size(std::uint64_t file_size,
bool shrink) -> api_error;
[[nodiscard]] auto check_start() -> api_error;
void download_chunk(std::size_t chunk, bool skip_active, bool should_reset);
void download_range(std::size_t begin_chunk, std::size_t end_chunk,
bool should_reset);
void set_modified();
void set_read_state(std::size_t chunk);
void set_read_state(boost::dynamic_bitset<> read_state);
void update_reader(std::size_t chunk);
public:
auto close() -> bool override;
[[nodiscard]] auto get_allocated() const -> bool override;
[[nodiscard]] auto get_read_state() const -> boost::dynamic_bitset<> override;
[[nodiscard]] auto get_read_state(std::size_t chunk) const -> bool override;
[[nodiscard]] auto is_complete() const -> bool override;
[[nodiscard]] auto is_write_supported() const -> bool override {
return true;
}
[[nodiscard]] auto
native_operation(native_operation_callback callback) -> api_error override;
[[nodiscard]] auto
native_operation(std::uint64_t new_file_size,
native_operation_callback callback) -> api_error override;
void remove(std::uint64_t handle) override;
void remove_all() override;
[[nodiscard]] auto read(std::size_t read_size, std::uint64_t read_offset,
data_buffer &data) -> api_error override;
[[nodiscard]] auto resize(std::uint64_t new_file_size) -> api_error override;
[[nodiscard]] auto write(std::uint64_t write_offset, const data_buffer &data,
std::size_t &bytes_written) -> api_error override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_OPEN_FILE_HPP_

View File

@ -1,221 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_OPEN_FILE_BASE_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_OPEN_FILE_BASE_HPP_
#include "file_manager/i_open_file.hpp"
namespace repertory {
class i_provider;
class open_file_base : public i_closeable_open_file {
public:
open_file_base(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider, bool disable_io);
open_file_base(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi,
std::map<std::uint64_t, open_file_data> open_data,
i_provider &provider, bool disable_io);
~open_file_base() override = default;
public:
open_file_base() = delete;
open_file_base(const open_file_base &) noexcept = delete;
open_file_base(open_file_base &&) noexcept = delete;
auto operator=(open_file_base &&) noexcept -> open_file_base & = delete;
auto operator=(const open_file_base &) noexcept -> open_file_base & = delete;
public:
class download final {
public:
download() = default;
~download() = default;
public:
download(const download &) noexcept = delete;
download(download &&) noexcept = delete;
auto operator=(download &&) noexcept -> download & = delete;
auto operator=(const download &) noexcept -> download & = delete;
private:
bool complete_{false};
api_error error_{api_error::success};
std::mutex mtx_;
std::condition_variable notify_;
public:
void notify(const api_error &err);
auto wait() -> api_error;
};
class io_item final {
public:
io_item(std::function<api_error()> action) : action_(std::move(action)) {}
~io_item() = default;
public:
io_item() = delete;
io_item(const io_item &) noexcept = delete;
io_item(io_item &&) noexcept = delete;
auto operator=(io_item &&) noexcept -> io_item & = delete;
auto operator=(const io_item &) noexcept -> io_item & = delete;
private:
std::function<api_error()> action_;
std::mutex mtx_;
std::condition_variable notify_;
std::optional<api_error> result_;
public:
void action();
[[nodiscard]] auto get_result() -> api_error;
};
private:
std::uint64_t chunk_size_;
std::uint8_t chunk_timeout_;
filesystem_item fsi_;
std::size_t last_chunk_size_;
std::map<std::uint64_t, open_file_data> open_data_;
i_provider &provider_;
private:
std::unordered_map<std::size_t, std::shared_ptr<download>> active_downloads_;
api_error error_{api_error::success};
mutable std::mutex error_mtx_;
mutable std::recursive_mutex file_mtx_;
stop_type io_stop_requested_{false};
std::unique_ptr<std::thread> io_thread_;
mutable std::mutex io_thread_mtx_;
std::condition_variable io_thread_notify_;
std::deque<std::shared_ptr<io_item>> io_thread_queue_;
std::atomic<std::chrono::system_clock::time_point> last_access_{
std::chrono::system_clock::now(),
};
bool modified_{false};
bool removed_{false};
private:
void file_io_thread();
protected:
[[nodiscard]] auto do_io(std::function<api_error()> action) -> api_error;
[[nodiscard]] auto get_active_downloads()
-> std::unordered_map<std::size_t, std::shared_ptr<download>> & {
return active_downloads_;
}
[[nodiscard]] auto get_mutex() const -> std::recursive_mutex & {
return file_mtx_;
}
[[nodiscard]] auto get_last_chunk_size() const -> std::size_t;
[[nodiscard]] auto get_provider() -> i_provider & { return provider_; }
[[nodiscard]] auto get_provider() const -> const i_provider & {
return provider_;
}
[[nodiscard]] auto is_removed() const -> bool;
void notify_io();
void reset_timeout();
auto set_api_error(const api_error &err) -> api_error;
void set_file_size(std::uint64_t size);
void set_last_chunk_size(std::size_t size);
void set_modified(bool modified);
void set_removed(bool removed);
void set_source_path(std::string source_path);
void wait_for_io(stop_type &stop_requested);
public:
void add(std::uint64_t handle, open_file_data ofd) override;
[[nodiscard]] auto can_close() const -> bool override;
auto close() -> bool override;
[[nodiscard]] auto get_allocated() const -> bool override { return false; }
[[nodiscard]] auto get_api_error() const -> api_error;
[[nodiscard]] auto get_api_path() const -> std::string override;
[[nodiscard]] auto get_chunk_size() const -> std::size_t override {
return chunk_size_;
}
[[nodiscard]] auto get_file_size() const -> std::uint64_t override;
[[nodiscard]] auto get_filesystem_item() const -> filesystem_item override;
[[nodiscard]] auto get_handles() const -> std::vector<std::uint64_t> override;
[[nodiscard]] auto
get_open_data() -> std::map<std::uint64_t, open_file_data> & override;
[[nodiscard]] auto get_open_data() const
-> const std::map<std::uint64_t, open_file_data> & override;
[[nodiscard]] auto
get_open_data(std::uint64_t handle) -> open_file_data & override;
[[nodiscard]] auto
get_open_data(std::uint64_t handle) const -> const open_file_data & override;
[[nodiscard]] auto get_open_file_count() const -> std::size_t override;
[[nodiscard]] auto get_source_path() const -> std::string override;
[[nodiscard]] auto has_handle(std::uint64_t handle) const -> bool override;
[[nodiscard]] auto is_directory() const -> bool override {
return fsi_.directory;
}
[[nodiscard]] auto is_modified() const -> bool override;
void remove(std::uint64_t handle) override;
void remove_all() override;
void set_api_path(const std::string &api_path) override;
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_OPEN_FILE_BASE_HPP_

View File

@ -1,150 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_RING_BUFFER_BASE_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_RING_BUFFER_BASE_HPP_
#include "file_manager/open_file_base.hpp"
#include "types/repertory.hpp"
#include "utils/file.hpp"
namespace repertory {
class i_provider;
class i_upload_manager;
class ring_buffer_base : public open_file_base {
public:
ring_buffer_base(std::uint64_t chunk_size, std::uint8_t chunk_timeout,
filesystem_item fsi, i_provider &provider,
std::size_t ring_size, bool disable_io);
~ring_buffer_base() override = default;
public:
ring_buffer_base() = delete;
ring_buffer_base(const ring_buffer_base &) noexcept = delete;
ring_buffer_base(ring_buffer_base &&) noexcept = delete;
auto operator=(ring_buffer_base &&) noexcept -> ring_buffer_base & = delete;
auto
operator=(const ring_buffer_base &) noexcept -> ring_buffer_base & = delete;
public:
static constexpr const auto min_ring_size{5U};
private:
boost::dynamic_bitset<> read_state_;
std::size_t total_chunks_;
private:
std::condition_variable chunk_notify_;
mutable std::mutex chunk_mtx_;
std::mutex read_mtx_;
std::unique_ptr<std::thread> reader_thread_;
std::size_t ring_begin_{};
std::size_t ring_end_{};
std::size_t ring_pos_{};
stop_type stop_requested_{false};
private:
[[nodiscard]] auto check_start() -> api_error;
auto download_chunk(std::size_t chunk, bool skip_active) -> api_error;
void reader_thread();
void update_position(std::size_t count, bool is_forward);
protected:
[[nodiscard]] auto has_reader_thread() const -> bool {
return reader_thread_ != nullptr;
}
[[nodiscard]] auto get_ring_size() const -> std::size_t {
return read_state_.size();
}
[[nodiscard]] virtual auto on_check_start() -> bool = 0;
[[nodiscard]] virtual auto
on_chunk_downloaded(std::size_t chunk,
const data_buffer &buffer) -> api_error = 0;
[[nodiscard]] virtual auto
on_read_chunk(std::size_t chunk, std::size_t read_size,
std::uint64_t read_offset, data_buffer &data,
std::size_t &bytes_read) -> api_error = 0;
[[nodiscard]] virtual auto
use_buffer(std::size_t chunk,
std::function<api_error(data_buffer &)> func) -> api_error = 0;
public:
auto close() -> bool override;
void forward(std::size_t count);
[[nodiscard]] auto get_current_chunk() const -> std::size_t {
return ring_pos_;
}
[[nodiscard]] auto get_first_chunk() const -> std::size_t {
return ring_begin_;
}
[[nodiscard]] auto get_last_chunk() const -> std::size_t { return ring_end_; }
[[nodiscard]] auto get_read_state() const -> boost::dynamic_bitset<> override;
[[nodiscard]] auto get_read_state(std::size_t chunk) const -> bool override;
[[nodiscard]] auto get_total_chunks() const -> std::size_t {
return total_chunks_;
}
[[nodiscard]] auto is_complete() const -> bool override { return false; }
[[nodiscard]] auto is_write_supported() const -> bool override {
return false;
}
[[nodiscard]] auto read(std::size_t read_size, std::uint64_t read_offset,
data_buffer &data) -> api_error override;
[[nodiscard]] auto resize(std::uint64_t /* size */) -> api_error override {
return api_error::not_supported;
}
void reverse(std::size_t count);
void set(std::size_t first_chunk, std::size_t current_chunk);
void set_api_path(const std::string &api_path) override;
[[nodiscard]] auto
write(std::uint64_t /* write_offset */, const data_buffer & /* data */,
std::size_t & /* bytes_written */) -> api_error override {
return api_error::not_supported;
}
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_RING_BUFFER_BASE_HPP_

View File

@ -1,93 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_RING_BUFFER_OPEN_FILE_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_RING_BUFFER_OPEN_FILE_HPP_
#include "file_manager/ring_buffer_base.hpp"
#include "types/repertory.hpp"
#include "utils/file.hpp"
namespace repertory {
class i_provider;
class i_upload_manager;
class ring_buffer_open_file final : public ring_buffer_base {
public:
ring_buffer_open_file(std::string buffer_directory, std::uint64_t chunk_size,
std::uint8_t chunk_timeout, filesystem_item fsi,
i_provider &provider, std::size_t ring_size);
~ring_buffer_open_file() override;
public:
ring_buffer_open_file() = delete;
ring_buffer_open_file(const ring_buffer_open_file &) noexcept = delete;
ring_buffer_open_file(ring_buffer_open_file &&) noexcept = delete;
auto operator=(ring_buffer_open_file &&) noexcept -> ring_buffer_open_file & =
delete;
auto operator=(const ring_buffer_open_file &) noexcept
-> ring_buffer_open_file & = delete;
private:
std::string source_path_;
private:
std::unique_ptr<utils::file::i_file> nf_;
protected:
[[nodiscard]] auto on_check_start() -> bool override;
[[nodiscard]] auto
on_chunk_downloaded(std::size_t chunk,
const data_buffer &buffer) -> api_error override;
[[nodiscard]] auto
on_read_chunk(std::size_t chunk, std::size_t read_size,
std::uint64_t read_offset, data_buffer &data,
std::size_t &bytes_read) -> api_error override;
[[nodiscard]] auto use_buffer(std::size_t chunk,
std::function<api_error(data_buffer &)> func)
-> api_error override;
public:
[[nodiscard]] static auto can_handle_file(std::uint64_t file_size,
std::size_t chunk_size,
std::size_t ring_size) -> bool;
[[nodiscard]] auto
native_operation(native_operation_callback callback) -> api_error override;
[[nodiscard]] auto native_operation(std::uint64_t /* new_file_size */,
native_operation_callback /* callback */)
-> api_error override {
return api_error::not_supported;
}
[[nodiscard]] auto get_source_path() const -> std::string override {
return source_path_;
}
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_RING_BUFFER_OPEN_FILE_HPP_

View File

@ -1,75 +0,0 @@
/*
Copyright <2018-2024> <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_FILE_MANAGER_UPLOAD_HPP_
#define REPERTORY_INCLUDE_FILE_MANAGER_UPLOAD_HPP_
#include "types/repertory.hpp"
namespace repertory {
class i_provider;
class upload final {
public:
upload(filesystem_item fsi, i_provider &provider);
~upload();
public:
upload() = delete;
upload(const upload &) noexcept = delete;
upload(upload &&) noexcept = delete;
auto operator=(upload &&) noexcept -> upload & = delete;
auto operator=(const upload &) noexcept -> upload & = delete;
private:
filesystem_item fsi_;
i_provider &provider_;
private:
bool cancelled_{false};
api_error error_{api_error::success};
std::unique_ptr<std::thread> thread_;
stop_type stop_requested_{false};
private:
void upload_thread();
public:
void cancel();
[[nodiscard]] auto get_api_error() const -> api_error { return error_; }
[[nodiscard]] auto get_api_path() const -> std::string {
return fsi_.api_path;
}
[[nodiscard]] auto get_source_path() const -> std::string {
return fsi_.source_path;
}
[[nodiscard]] auto is_cancelled() const -> bool { return cancelled_; }
void stop();
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_FILE_MANAGER_UPLOAD_HPP_

View File

@ -19,17 +19,14 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_
#define REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_
#ifndef INCLUDE_PLATFORM_PLATFORM_HPP_
#define INCLUDE_PLATFORM_PLATFORM_HPP_
#if defined(_WIN32)
#include "platform/win32_platform.hpp"
#include "utils/windows.hpp"
#include "utils/windows/windows_utils.hpp"
#else // !defined(_WIN32)
#include "platform/unix_platform.hpp"
#include "platform/win32_platform.hpp"
#include "utils/unix.hpp"
#include "utils/unix/unix_utils.hpp"
#endif // defined(_WIN32)
#include "utils/windows.hpp"
#include "utils/windows/windows_utils.hpp"
#endif // REPERTORY_INCLUDE_PLATFORM_PLATFORM_HPP_
#endif // INCLUDE_PLATFORM_PLATFORM_HPP_

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