|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The file side channel's store (files/1, spec 6 §18): uploads in chunks, and files a principal may read by a capability reference. More...
#include <algorithm>#include <chrono>#include <cstddef>#include <cstdint>#include <expected>#include <functional>#include <map>#include <mutex>#include <random>#include <string>#include <string_view>#include <utility>Go to the source code of this file.
Classes | |
| struct | morph::ui::FileInfo |
| What a file is, as its uploader described it. More... | |
| struct | morph::ui::FileSlice |
| A slice of a stored file. More... | |
| class | morph::ui::IFileStore |
| Where uploaded and issued files live. Every call names the principal it is made for, and an upload id or a file reference works only for the principal it was made for. More... | |
| struct | morph::ui::MemoryFileStoreOptions |
| How much a MemoryFileStore keeps. More... | |
| class | morph::ui::MemoryFileStore |
| An IFileStore in memory: bounded per file and per principal; an upload that stalls expires. More... | |
Enumerations | |
| enum class | morph::ui::FileError : std::uint8_t { NotFound , TooLarge , OverQuota , BadOffset , Incomplete } |
| Why a store refused a call. More... | |
Functions | |
| constexpr std::string_view | morph::ui::fileErrorText (FileError error) noexcept |
| The text of a FileError, as a ui-file refusal carries it. | |
| std::string | morph::ui::newFileRef (std::string_view prefix="file:") |
A new unguessable id: prefix, then 32 lower-case hex digits read straight from std::random_device. | |
The file side channel's store (files/1, spec 6 §18): uploads in chunks, and files a principal may read by a capability reference.
Specified in docs/spec/ui/service.md, "Files".
Definition in file file_store.hpp.
|
strong |
Why a store refused a call.
Definition at line 26 of file file_store.hpp.
|
nodiscardconstexprnoexcept |
The text of a FileError, as a ui-file refusal carries it.
| error | The error. |
Definition at line 37 of file file_store.hpp.
|
inlinenodiscard |
A new unguessable id: prefix, then 32 lower-case hex digits read straight from std::random_device.
std::random_device is read directly, never used as a seed: libstdc++, libc++ and MSVC back it with the operating system's entropy source, which is what makes the id a capability.
| prefix | file: for a reference, upload: for an upload id. |
Definition at line 135 of file file_store.hpp.