110 Commits

Author SHA1 Message Date
b5ae3e4ed1 updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-16 19:52:51 -06:00
89a2d5866a updated CHANGELOG.md
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-01-16 19:48:33 -06:00
5264d17ae8 remote fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-16 19:45:41 -06:00
1718464c60 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-05 20:12:02 -06:00
85756ddd8c updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-01-05 20:06:09 -06:00
e8240948b7 updated build system
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2025-01-05 20:01:45 -06:00
77088e6608 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-05 14:55:44 -06:00
ddbebef850 updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2025-01-04 15:22:49 -06:00
7cf636b8ed updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-02 20:30:25 -06:00
754dfc49db updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2025-01-02 20:28:51 -06:00
63b2d0e741 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-02 20:19:27 -06:00
96ac72ae21 fix comment
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-02 17:39:48 -06:00
0bbf6b5942 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-02 14:24:58 -06:00
74ef36956d re-enable cleanup 2025-01-02 14:22:40 -06:00
bbe065819c refactor 2025-01-02 14:22:17 -06:00
3493054f1a handle remove error 2025-01-02 14:20:20 -06:00
743281497c refactor 2025-01-02 14:14:21 -06:00
eaa6a6f92e refactor cleanup 2025-01-02 14:01:16 -06:00
a25dd8178e refactor cleanup 2025-01-02 13:43:22 -06:00
71463bfee4 refactor 2025-01-02 12:07:01 -06:00
270df62dbe refactor 2025-01-02 12:01:45 -06:00
5bd7ded7d9 refactor 2025-01-02 11:59:01 -06:00
b5048a422f refactor 2025-01-02 11:56:12 -06:00
c27528fe73 begin working on better handling of removed files 2025-01-02 10:27:52 -06:00
c3978562d5 cleanup 2025-01-02 08:59:19 -06:00
637892cff1 refactor 2025-01-02 08:58:02 -06:00
998a3d9d83 updated test 2025-01-02 08:50:44 -06:00
8ed8822625 refactor 2025-01-02 08:38:43 -06:00
196abaebcc refactor 2025-01-02 08:36:55 -06:00
653e8000ff refactor 2025-01-02 08:34:51 -06:00
ea362211aa fix 2025-01-02 08:32:42 -06:00
a4a9d069d3 fix 2025-01-02 08:27:45 -06:00
9cb7f9accf updated CHANGELOG.md 2025-01-02 08:19:42 -06:00
4e5454efb5 always use direct for read-only providers 2025-01-02 08:19:10 -06:00
a8c3f31298 refactor 2025-01-02 07:59:07 -06:00
f3093c27cd refactor 2025-01-02 07:57:07 -06:00
4526a9d860 refactor 2025-01-02 07:50:58 -06:00
a1ada5aa8c refactor 2025-01-02 07:48:56 -06:00
1ae8b8b793 refactor 2025-01-02 07:45:08 -06:00
f44cc99a82 refactor 2025-01-02 07:08:12 -06:00
75657bec58 fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-01 01:35:45 -06:00
4fef036f10 refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2025-01-01 01:19:59 -06:00
ecb9783f4e refactor 2025-01-01 01:15:11 -06:00
bdf85908ca updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-31 17:30:20 -06:00
9cb3cdabb0 cleanup
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-31 14:49:26 -06:00
6cf082dfa7 refactor 2024-12-31 14:45:52 -06:00
1a140d4dfd refactor 2024-12-31 14:45:11 -06:00
1cc8571a04 refactor 2024-12-31 14:42:57 -06:00
cf8c631938 refactor 2024-12-31 14:42:24 -06:00
4cba2a16f9 updated CHANGELOG.md 2024-12-31 14:29:55 -06:00
7c5f074d5a [bug] Address slow directory responses in S3 mounts for deep nested directories #28 2024-12-31 14:22:55 -06:00
a251cf6abf exception handling 2024-12-31 13:42:50 -06:00
31f7a47889 exception handling 2024-12-31 13:41:38 -06:00
23de2af98d exception handling 2024-12-31 13:41:00 -06:00
2446f024ef exception handling 2024-12-31 13:39:29 -06:00
45ddd528b2 exception handling 2024-12-31 13:37:55 -06:00
36908f7da9 [bug] Sia provider error responses are not being logged #30 2024-12-31 13:34:08 -06:00
1a11d55782 updated CHANGELOG.md 2024-12-31 13:20:50 -06:00
e344eddbcb [bug] Sia provider error responses are not being logged #30 2024-12-31 13:19:42 -06:00
09da7a29a9 [bug] Sia provider error responses are not being logged #30 2024-12-31 13:13:17 -06:00
5b5ac0937c [bug] Sia provider error responses are not being logged #30 2024-12-31 13:12:49 -06:00
c69818fed6 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 12:56:13 -06:00
81712e7a99 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 12:55:52 -06:00
75d2d39e7c refactor 2024-12-31 12:53:08 -06:00
ccc4a30ad5 spelling 2024-12-31 11:35:27 -06:00
a9bb12015a fix missing request headers 2024-12-31 11:32:47 -06:00
474f90ee33 fix missing request headers 2024-12-31 11:31:03 -06:00
ae7d5fe284 fix missing request headers 2024-12-31 11:29:05 -06:00
bf700b9d59 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 11:05:20 -06:00
0d4b3f5e7e [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 10:55:33 -06:00
67076458f0 updated CHANGELOG.md 2024-12-31 10:28:57 -06:00
a8479eefd1 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 10:22:49 -06:00
e1eda99a72 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 10:15:21 -06:00
ed4a4f0742 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 10:14:13 -06:00
84e89d3b83 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 09:50:20 -06:00
5e3efde376 [bug] S3 provider should limit max key size to 1024 #31 2024-12-31 09:39:20 -06:00
f28e17f3e5 updated CHANGELOG.md 2024-12-31 08:53:55 -06:00
699ecafc22 updated CHANGELOG.md 2024-12-31 08:53:00 -06:00
247cc301ea [bug] S3 error responses are not being logged #29 2024-12-31 08:47:28 -06:00
bc43338127 [bug] S3 error responses are not being logged #29 2024-12-31 08:46:17 -06:00
4e86f2a7de refactor 2024-12-31 08:42:22 -06:00
b9fe2746e3 refactor 2024-12-31 08:31:36 -06:00
4fe9d09f0a updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-30 19:37:41 -06:00
777db300e1 fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-30 18:44:21 -06:00
62a303e856 [bug] Address slow directory responses in S3 mounts for deep nested directories #28
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
[bug] S3 error responses are not being logged #29
2024-12-30 12:09:52 -06:00
ae573af89d updated CHANGELOG.md
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-29 17:49:12 -06:00
0c41a3309e fix invalid error
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-12-29 17:43:09 -06:00
4cb3e22308 moved event to debug
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-12-29 14:44:19 -06:00
9d7d36922f updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-29 12:18:01 -06:00
3190c5f133 updated build system
Some checks are pending
BlockStorage/repertory/pipeline/head Build queued...
2024-12-29 12:04:17 -06:00
5fadb796d1 fix CHANGELOG.md
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-12-29 09:57:29 -06:00
4a213e5ca5 updated CHANGELOG.md 2024-12-29 09:57:14 -06:00
9fea962563 updated CHANGELOG.md 2024-12-29 09:43:54 -06:00
ac6c333df3 updated CHANGELOG.md 2024-12-29 09:41:37 -06:00
4bbff47b6f updated build system 2024-12-29 09:21:56 -06:00
f01daa4296 [Unit Test] Complete FUSE unit tests #22
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-29 07:09:49 -06:00
96c2f8ee1e [Unit Test] Complete FUSE unit tests #22 2024-12-29 07:08:25 -06:00
9eb3e7a22d [Unit Test] Complete FUSE unit tests #22 2024-12-29 07:06:19 -06:00
3c2c783683 [Unit Test] Complete FUSE unit tests #22 2024-12-29 06:41:55 -06:00
2e24f9bb44 updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
2024-12-28 22:23:27 -06:00
6bb3351cb8 fix deliver script
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-12-28 22:08:24 -06:00
6086a0ea12 cleanup 2024-12-28 19:36:25 -06:00
b4b688d3b9 refactor 2024-12-28 19:35:17 -06:00
43bf3c0cb2 refactor 2024-12-28 19:33:42 -06:00
26897c256b call shutdown before close 2024-12-28 19:31:02 -06:00
a788563db6 cleanup 2024-12-28 19:27:36 -06:00
9fb1c747a6 updated CHANGELOG.md
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
2024-12-28 16:30:32 -06:00
5982978879 updated CHANGELOG.md
Some checks reported errors
BlockStorage/repertory/pipeline/head Something is wrong with the build of this commit
2024-12-28 16:25:22 -06:00
5ca4584416 updated copyright 2024-12-28 16:20:41 -06:00
3eca1af971 updated version 2024-12-28 16:04:38 -06:00
314 changed files with 2559 additions and 1775 deletions

View File

@ -26,6 +26,7 @@ cppvsdbg
create_notraverse
crypto_aead_xchacha20poly1305_ietf_npubbytes
cstdint
curlopt_aws_sigv4
cxxflags
cxxstd
d_largefile64_source
@ -154,6 +155,7 @@ nlohmann_json
nmakeprg
nominmax
ntstatus
nullptr
nuspell_version
oleaut32
openal_version

View File

@ -1,14 +1,37 @@
# Changelog
## v2.0.3-rc
### Issues
* ~~\#12 \[Unit Test\] Complete all providers unit tests~~
* ~~\#20 Add support to evict open files~~
* ~~\#21 \[Unit Test \] Complete WinFSP unit tests~~
* ~~\#22 \[Unit Test\] Complete FUSE unit tests~~
* \#28 \[bug\] Address slow directory responses in S3 mounts for deeply nested directories
* \#29 \[bug\] S3 error responses are not being logged
* \#30 \[bug\] Sia provider error responses are not logged
* ~~\#31 \[bug\] S3 provider should limit max key size to 1024~~
### Changes from v2.0.2-rc
* Always use direct for read-only providers
* Fixed http headers not being added for requests
* Fixed incorrect `stat` values for remote mounts
* Fixed invalid directory nullptr error on remote mounts
* Updated build system to Alpine 3.21.0
* Updated build system to MinGW-w64 12.0.0
* Updated copyright to 2018-2025
## v2.0.2-rc
### BREAKING CHANGES
* Refactored `config.json` - will need to verify configuration settings prior to mounting
<!-- markdownlint-disable-next-line -->
### 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

View File

@ -1,5 +1,5 @@
# Repertory MIT License
### Copyright <2018-2024> <scott.e.graves@protonmail.com>
### Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,15 +1,15 @@
set(BINUTILS_HASH ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450)
set(BOOST_HASH f55c340aa49763b1925ccf02b2e83f35fdcf634c9d5164a2acb87540173c741d)
set(BINUTILS_HASH b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365)
set(BOOST2_HASH 7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca)
set(BOOST_HASH f55c340aa49763b1925ccf02b2e83f35fdcf634c9d5164a2acb87540173c741d)
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(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2)
set(JSON_HASH 0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406)
set(LIBSODIUM_HASH 8e5aeca07a723a27bbecc3beef14b0068d37e7fc0e97f51b3f1c82d2a58005c1)
set(MINGW_HASH 3f66bce069ee8bed7439a1a13da7cb91a5e67ea6170f21317ac7f5794625ee10)
set(MINGW_HASH 30e5aad2c48dd318150f79cff47661232c4175876d6b4d6b270961cf2b49a48b)
set(OPENSSL_HASH e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf)
set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591)
set(PUGIXML_HASH 2f10e276870c64b1db6809050a75e11a897a8d7456c4be5c6b2e35a11168a015)

View File

@ -20,11 +20,13 @@ if(PROJECT_ENABLE_CURL)
LIST_SEPARATOR |
CMAKE_ARGS
${PROJECT_EXTERNAL_CMAKE_FLAGS}
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}
-DBUILD_STATIC_LIBS=ON
-DBUILD_CURL_EXE=OFF
-DBUILD_LIBCURL_DOCS=OFF
-DBUILD_MISC_DOCS=OFF
-DBUILD_SHARED_LIBS=${PROJECT_BUILD_SHARED_LIBS}
-DBUILD_STATIC_CURL=ON
-DBUILD_STATIC_LIBS=ON
-DBUILD_STATIC_LIBS=ON
-DBUILD_TESTING=OFF
-DCURL_CA_BUNDLE=./cacert.pem
-DCURL_CA_FALLBACK=ON
@ -33,6 +35,7 @@ if(PROJECT_ENABLE_CURL)
-DCURL_USE_LIBSSH2=OFF
-DCURL_USE_OPENSSL=${PROJECT_ENABLE_OPENSSL}
-DCURL_ZLIB=ON
-DENABLE_CURL_MANUAL=OFF
-DENABLE_THREADED_RESOLVER=ON
-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
-DOPENSSL_USE_STATIC_LIBS=${OPENSSL_USE_STATIC_LIBS}

View File

@ -1,4 +1,4 @@
set(BINUTILS_VERSION 2.41)
set(BINUTILS_VERSION 2.43)
set(BOOST2_MAJOR_VERSION 1)
set(BOOST2_MINOR_VERSION 76)
set(BOOST2_PATCH_VERSION 0)
@ -12,11 +12,11 @@ set(EXPAT2_VERSION 2_6_4)
set(EXPAT_VERSION 2.6.4)
set(GCC_VERSION 14.2.0)
set(GTEST_VERSION 1.15.2)
set(ICU_VERSION 75-1)
set(ICU_VERSION 76-1)
set(JSON_VERSION 3.11.3)
set(LIBSODIUM_VERSION 1.0.20)
set(MESA_VERSION 23.3.3)
set(MINGW_VERSION 11.0.1)
set(MINGW_VERSION 12.0.0)
set(OPENSSL_VERSION 3.4.0)
set(PKG_CONFIG_VERSION 0.29.2)
set(PUGIXML_VERSION 1.14)

View File

@ -5,12 +5,12 @@ PROJECT_NAME="repertory"
PROJECT_COMPANY_NAME="https://git.fifthgrid.com/blockstorage"
PROJECT_URL="${PROJECT_COMPANY_NAME}/repertory"
PROJECT_COPYRIGHT="Copyright <2018-2024> <MIT License> <${PROJECT_URL}>"
PROJECT_COPYRIGHT="Copyright <2018-2025> <MIT License> <${PROJECT_URL}>"
PROJECT_DESC="Mount utility for Sia and S3"
PROJECT_MAJOR_VERSION=2
PROJECT_MINOR_VERSION=0
PROJECT_REVISION_VERSION=2
PROJECT_REVISION_VERSION=3
PROJECT_RELEASE_NUM=0
PROJECT_RELEASE_ITER=rc

View File

@ -1,4 +1,4 @@
FROM arm64v8/alpine:3.20.3
FROM arm64v8/alpine:3.21.0
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
CMD bash
@ -30,7 +30,6 @@ RUN apk add \
gflags \
gflags-dev \
git \
gtkmm3-dev \
icu-dev \
icu-libs \
icu-static \
@ -69,7 +68,6 @@ RUN apk add \
tcl \
tcl-dev \
texinfo \
vlc-dev \
wget \
xz \
xz-dev \
@ -82,3 +80,6 @@ RUN apk add \
zstd-libs \
zstd-static \
xz-static
RUN ln -sf /usr/bin/aclocal-1.17 /usr/bin/aclocal-1.16
RUN ln -sf /usr/bin/automake-1.17 /usr/bin/automake-1.16

View File

@ -1,4 +1,4 @@
FROM alpine:3.20.3
FROM alpine:3.21.0
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
CMD bash
@ -80,3 +80,6 @@ RUN apk add \
zstd-libs \
zstd-static \
xz-static
RUN ln -sf /usr/bin/aclocal-1.17 /usr/bin/aclocal-1.16
RUN ln -sf /usr/bin/automake-1.17 /usr/bin/automake-1.16

View File

@ -1,5 +1,5 @@
#comment
FROM alpine:3.20.3
FROM alpine:3.21.0
RUN apk update
RUN apk upgrade
@ -671,6 +671,8 @@ RUN if [ -f "/3rd_party/curl-${MY_CURL_VERSION}.tar.gz" ]; then \
&& cd build \
&& cmake .. \
-DBUILD_CURL_EXE=ON \
-DBUILD_LIBCURL_DOCS=OFF \
-DBUILD_MISC_DOCS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_TESTING=OFF \
@ -684,6 +686,7 @@ RUN if [ -f "/3rd_party/curl-${MY_CURL_VERSION}.tar.gz" ]; then \
-DCURL_USE_LIBSSH2=OFF \
-DCURL_USE_OPENSSL=ON \
-DCURL_ZLIB=ON \
-DENABLE_CURL_MANUAL=OFF \
-DENABLE_THREADED_RESOLVER=ON \
-DOPENSSL_USE_STATIC_LIBS=ON \
-DUSE_LIBIDN2=OFF \

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -61,13 +61,14 @@ public:
[[nodiscard]] static auto reset_curl(CURL *curl_handle) -> CURL *;
public:
[[nodiscard]] static auto
construct_url(CURL *curl, const std::string &relative_path,
const host_config &cfg) -> std::string;
[[nodiscard]] static auto construct_url(CURL *curl,
const std::string &relative_path,
const host_config &cfg)
-> std::string;
[[nodiscard]] static auto
create_host_config(const s3_config &cfg,
bool use_s3_path_style) -> host_config;
[[nodiscard]] static auto create_host_config(const s3_config &cfg,
bool use_s3_path_style)
-> host_config;
[[nodiscard]] static auto url_encode(CURL *curl, const std::string &data,
bool allow_slash) -> std::string;
@ -75,8 +76,8 @@ public:
template <typename request_type>
[[nodiscard]] static auto
make_encrypted_request(const host_config &cfg, const request_type &request,
long &response_code,
stop_type &stop_requested) -> bool {
long &response_code, stop_type &stop_requested)
-> bool {
response_code = 0;
if (not request.decryption_token.has_value() ||
@ -193,6 +194,16 @@ public:
request.aws_service.value().c_str());
}
curl_slist *header_list{nullptr};
if (not request.headers.empty()) {
for (const auto &header : request.headers) {
header_list = curl_slist_append(
header_list,
fmt::format("{}: {}", header.first, header.second).c_str());
}
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list);
}
auto url = construct_url(curl, request.get_path(), cfg) + parameters;
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
@ -200,6 +211,11 @@ public:
CURLcode curl_code{};
curl_request.get_result(curl_code, response_code);
if (header_list != nullptr) {
curl_slist_free_all(header_list);
}
if (curl_code != CURLE_OK) {
event_system::instance().raise<curl_error>(url, curl_code);
return false;
@ -215,26 +231,30 @@ public:
public:
void enable_s3_path_style(bool enable) override;
[[nodiscard]] auto
make_request(const curl::requests::http_delete &del, long &response_code,
stop_type &stop_requested) const -> bool override;
[[nodiscard]] auto
make_request(const curl::requests::http_get &get, long &response_code,
stop_type &stop_requested) const -> bool override;
[[nodiscard]] auto
make_request(const curl::requests::http_head &head, long &response_code,
stop_type &stop_requested) const -> bool override;
[[nodiscard]] auto
make_request(const curl::requests::http_post &post_file, long &response_code,
stop_type &stop_requested) const -> bool override;
[[nodiscard]] auto
make_request(const curl::requests::http_put_file &put_file,
[[nodiscard]] auto make_request(const curl::requests::http_delete &del,
long &response_code,
stop_type &stop_requested) const -> bool override;
stop_type &stop_requested) const
-> bool override;
[[nodiscard]] auto make_request(const curl::requests::http_get &get,
long &response_code,
stop_type &stop_requested) const
-> bool override;
[[nodiscard]] auto make_request(const curl::requests::http_head &head,
long &response_code,
stop_type &stop_requested) const
-> bool override;
[[nodiscard]] auto make_request(const curl::requests::http_post &post_file,
long &response_code,
stop_type &stop_requested) const
-> bool override;
[[nodiscard]] auto make_request(const curl::requests::http_put_file &put_file,
long &response_code,
stop_type &stop_requested) const
-> bool override;
};
} // namespace repertory

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -32,15 +32,15 @@ struct http_post final : http_request_base {
auto operator=(const http_post &) -> http_post & = default;
auto operator=(http_post &&) -> http_post & = default;
~http_post() override;
~http_post() override = default;
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};
mutable std::optional<std::string> json_str;
};
} // namespace repertory::curl::requests

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -51,7 +51,7 @@ struct http_request_base {
bool allow_timeout{};
std::optional<std::string> aws_service;
std::optional<std::string> decryption_token{};
http_headers headers{};
mutable http_headers headers{};
std::string path{};
http_query_parameters query{};
std::optional<http_range> range{};

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -69,21 +69,21 @@ 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) const -> 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

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -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)

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -31,7 +31,7 @@ class i_file_db {
public:
struct file_info final {
std::string api_path;
bool directory;
bool directory{};
std::string source_path;
};
@ -56,6 +56,10 @@ public:
[[nodiscard]] virtual auto count() const -> std::uint64_t = 0;
virtual void enumerate_item_list(
std::function<void(const std::vector<i_file_db::file_info> &)> callback,
stop_type &stop_requested) const = 0;
[[nodiscard]] virtual auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error = 0;
@ -80,7 +84,7 @@ public:
get_file_source_path(const std::string &api_path,
std::string &source_path) const -> api_error = 0;
[[nodiscard]] virtual auto get_item_list() const
[[nodiscard]] virtual auto get_item_list(stop_type &stop_requested) const
-> std::vector<file_info> = 0;
[[nodiscard]] virtual auto get_source_path(const std::string &api_path,

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -41,10 +41,7 @@ public:
std::string source_path;
};
struct upload_entry final {
std::string api_path;
std::string source_path;
};
using upload_entry = upload_active_entry;
public:
[[nodiscard]] virtual auto add_resume(const resume_entry &entry) -> bool = 0;

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -31,6 +31,10 @@ class i_meta_db {
public:
virtual void clear() = 0;
virtual void enumerate_api_path_list(
std::function<void(const std::vector<std::string> &)> callback,
stop_type &stop_requested) const = 0;
[[nodiscard]] virtual auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error = 0;

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -67,50 +67,54 @@ private:
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_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;
[[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;
void enumerate_item_list(
std::function<void(const std::vector<i_file_db::file_info> &)> callback,
stop_type &stop_requested) const override;
[[nodiscard]] auto
get_directory_api_path(const std::string &source_path,
std::string &api_path) const -> api_error 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_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_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_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_item_list(stop_type &stop_requested) 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 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;
[[nodiscard]] auto remove_item(const std::string &api_path)
-> api_error override;
};
} // namespace repertory

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -80,6 +80,10 @@ private:
public:
void clear() override;
void enumerate_api_path_list(
std::function<void(const std::vector<std::string> &)> callback,
stop_type &stop_requested) const override;
[[nodiscard]] auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -53,6 +53,10 @@ public:
[[nodiscard]] auto count() const -> std::uint64_t override;
void enumerate_item_list(
std::function<void(const std::vector<i_file_db::file_info> &)> callback,
stop_type &stop_requested) const override;
[[nodiscard]] auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;
@ -77,7 +81,7 @@ public:
std::string &source_path) const
-> api_error override;
[[nodiscard]] auto get_item_list() const
[[nodiscard]] auto get_item_list(stop_type &stop_requested) const
-> std::vector<i_file_db::file_info> override;
[[nodiscard]] auto get_source_path(const std::string &api_path,

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -50,6 +50,10 @@ private:
public:
void clear() override;
void enumerate_api_path_list(
std::function<void(const std::vector<std::string> &)> callback,
stop_type &stop_requested) const override;
[[nodiscard]] auto get_api_path(const std::string &source_path,
std::string &api_path) const
-> api_error override;

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -60,10 +60,10 @@ 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)
auto remove_directory(const std::string &api_path)
-> std::shared_ptr<directory_iterator>;
void remove_directory(std::uint64_t handle);

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -53,7 +53,7 @@ private:
bool was_mounted_ = false;
private:
void populate_stat(const remote::stat &r_stat, bool directory,
static void populate_stat(const remote::stat &r_stat, bool directory,
struct stat &unix_st);
protected:

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -39,7 +39,7 @@ E_SIMPLE3(debug_log, debug, true,
std::string, data, data, E_FROM_STRING
);
E_SIMPLE1(directory_removed, info, true,
E_SIMPLE1(directory_removed, debug, true,
std::string, api_path, ap, E_FROM_STRING
);

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -42,8 +42,8 @@ public:
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;
auto operator=(const direct_open_file &) noexcept
-> direct_open_file & = delete;
private:
std::array<data_buffer, min_ring_size> ring_data_;
@ -51,22 +51,26 @@ private:
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_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,
[[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;
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 get_source_path() const -> std::string override {
return "direct";
}
[[nodiscard]] auto native_operation(native_operation_callback /* callback */)
-> api_error override {
return api_error::not_supported;

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -53,19 +53,19 @@ private:
i_file_manager *fm_{};
private:
void add_all_items(const stop_type &stop_requested);
void add_all_items(stop_type &stop_requested);
void process_removed_directories(std::deque<removed_item> removed_list,
const stop_type &stop_requested);
stop_type &stop_requested);
void process_removed_files(std::deque<removed_item> removed_list,
const stop_type &stop_requested);
stop_type &stop_requested);
void process_removed_items(const stop_type &stop_requested);
void process_removed_items(stop_type &stop_requested);
void remove_deleted_items(const stop_type &stop_requested);
void remove_deleted_items(stop_type &stop_requested);
void remove_unmatched_source_files(const stop_type &stop_requested);
void remove_unmatched_source_files(stop_type &stop_requested);
protected:
[[nodiscard]] static auto create_api_file(std::string path, std::string key,

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -82,7 +82,7 @@ private:
const encrypt_config &cfg,
std::string &api_path) const -> bool;
void remove_deleted_files(const stop_type &stop_requested);
void remove_deleted_files(stop_type &stop_requested);
public:
[[nodiscard]] auto create_directory(const std::string &api_path,

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -54,14 +54,18 @@ private:
const std::string &object_name) const
-> api_error;
[[nodiscard]] auto
create_directory_object(const std::string &api_path,
const std::string &object_name) const -> api_error;
[[nodiscard]] auto create_directory_paths(const std::string &api_path,
const std::string &key) const
-> api_error;
[[nodiscard]] auto create_file_extra(const std::string &api_path,
api_meta_map &meta)
-> api_error override;
[[nodiscard]] auto create_path_directories(const std::string &api_path,
const std::string &key) const
-> api_error;
[[nodiscard]] auto decrypt_object_name(std::string &object_name) const
-> api_error;
@ -85,6 +89,9 @@ private:
return s3_config_;
}
[[nodiscard]] auto set_meta_key(const std::string &api_path,
api_meta_map &meta) -> api_error;
protected:
[[nodiscard]] auto create_directory_impl(const std::string &api_path,
api_meta_map &meta)

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -41,9 +41,6 @@ private:
std::atomic<bool> started_ = false;
private:
// [[nodiscard]] bool check_authorization(const httpserver::http_request
// &request);
[[nodiscard]] auto check_authorization(const httplib::Request &req) -> bool;
void handle_get_config(const httplib::Request &req, httplib::Response &res);

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -41,6 +41,7 @@ constexpr const auto default_task_wait_ms{100U};
constexpr const auto default_timeout_ms{60000U};
constexpr const auto max_orphaned_file_retention_days{std::uint16_t(31U)};
constexpr const auto max_ring_buffer_file_size{std::uint16_t(1024U)};
constexpr const auto max_s3_object_name_length{1024U};
constexpr const auto min_cache_size_bytes{
std::uint64_t(100UL * 1024UL * 1024UL)};
constexpr const auto min_download_timeout_secs{std::uint8_t(5U)};
@ -200,6 +201,7 @@ enum class api_error {
item_exists,
item_not_found,
more_data,
name_too_long,
no_disk_space,
not_implemented,
not_supported,
@ -216,31 +218,33 @@ enum class api_error {
[[nodiscard]] auto api_error_from_string(std::string_view str) -> api_error;
[[nodiscard]] auto
api_error_to_string(const api_error &error) -> const std::string &;
[[nodiscard]] auto api_error_to_string(const api_error &error)
-> const std::string &;
enum class database_type {
rocksdb,
sqlite,
};
[[nodiscard]] auto database_type_from_string(
std::string type,
database_type default_type = database_type::rocksdb) -> database_type;
[[nodiscard]] auto
database_type_to_string(const database_type &type) -> std::string;
database_type_from_string(std::string type,
database_type default_type = database_type::rocksdb)
-> database_type;
[[nodiscard]] auto database_type_to_string(const database_type &type)
-> std::string;
enum class download_type {
default_,
direct,
ring_buffer,
};
[[nodiscard]] auto download_type_from_string(
std::string type,
download_type default_type = download_type::default_) -> download_type;
[[nodiscard]] auto
download_type_to_string(const download_type &type) -> std::string;
download_type_from_string(std::string type,
download_type default_type = download_type::default_)
-> download_type;
[[nodiscard]] auto download_type_to_string(const download_type &type)
-> std::string;
enum class exit_code : std::int32_t {
success = 0,

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -40,7 +40,7 @@ public:
struct polling_item final {
std::string name;
frequency freq;
std::function<void(const stop_type &stop_requested)> action;
std::function<void(stop_type &stop_requested)> action;
};
public:

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
/*
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Copyright <2018-2025> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -30,7 +30,7 @@ class app_config;
class tasks final {
public:
struct task final {
std::function<void(const stop_type &task_stopped)> action;
std::function<void(stop_type &task_stopped)> action;
};
class i_task {

View File

@ -1,59 +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_UTILS_THROTTLE_HPP_
#define REPERTORY_INCLUDE_UTILS_THROTTLE_HPP_
namespace repertory {
class throttle final {
public:
throttle() : max_size_(10u) {}
explicit throttle(std::size_t max_size) : max_size_(max_size) {}
public:
throttle(const throttle &) noexcept = delete;
throttle(throttle &&) noexcept = delete;
auto operator=(const throttle &) -> throttle & = delete;
auto operator=(throttle &&) -> throttle & = delete;
public:
~throttle() { shutdown(); }
private:
const std::size_t max_size_;
std::size_t count_ = 0u;
bool shutdown_ = false;
std::mutex mutex_;
std::condition_variable notify_;
public:
void decrement();
void increment_or_wait();
void reset();
void shutdown();
};
} // namespace repertory
#endif // REPERTORY_INCLUDE_UTILS_THROTTLE_HPP_

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