1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:48:11 +00:00
serenity/Userland/Libraries
kleines Filmröllchen 96d02a3e75 LibAudio: New error propagation API in Loader and Buffer
Previously, a libc-like out-of-line error information was used in the
loader and its plugins. Now, all functions that may fail to do their job
return some sort of Result. The universally-used error type ist the new
LoaderError, which can contain information about the general error
category (such as file format, I/O, unimplemented features), an error
description, and location information, such as file index or sample
index.

Additionally, the loader plugins try to do as little work as possible in
their constructors. Right after being constructed, a user should call
initialize() and check the errors returned from there. (This is done
transparently by Loader itself.) If a constructor caused an error, the
call to initialize should check and return it immediately.

This opportunity was used to rework a lot of the internal error
propagation in both loader classes, especially FlacLoader. Therefore, a
couple of other refactorings may have sneaked in as well.

The adoption of LibAudio users is minimal. Piano's adoption is not
important, as the code will receive major refactoring in the near future
anyways. SoundPlayer's adoption is also less important, as changes to
refactor it are in the works as well. aplay's adoption is the best and
may serve as an example for other users. It also includes new buffering
behavior.

Buffer also gets some attention, making it OOM-safe and thereby also
propagating its errors to the user.
2021-11-28 13:33:51 -08:00
..
LibArchive LibArchive: Limit all Tar header fields to their buffer length 2021-11-24 19:09:00 +02:00
LibAudio LibAudio: New error propagation API in Loader and Buffer 2021-11-28 13:33:51 -08:00
LibC LibC: Make SIZE_MAX be understood by the preprocessor 2021-11-28 09:38:57 -08:00
LibCards AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
LibChess Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibCompress Everywhere: Pass AK::ReadonlyBytes by value 2021-11-11 01:27:46 +01:00
LibConfig LibConfig: Add list methods for groups and keys 2021-11-18 09:08:51 +01:00
LibCore LibCore: Allow System::pledge execpromises argument to be omitted 2021-11-28 08:04:57 +01:00
LibCoredump LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
LibCpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibCrypt Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibCrypto AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
LibDebug LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
LibDesktop LibDesktop: Make allowlist APIs return ErrorOr<void> 2021-11-24 00:25:23 +01:00
LibDeviceTree Libraries: Add LibDeviceTree for manipulating OpenFirmware Device Trees 2021-10-21 19:20:03 -07:00
LibDiff Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibDl Toolchain+Userland: Enable TLS for x86_64 2021-07-04 01:07:28 +02:00
LibDSP SoundPlayer+LibDSP: Move the FFT implementation to LibDSP 2021-11-24 23:45:08 +00:00
LibELF Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibFileSystemAccessClient Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibGemini Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibGfx LibGfx: Correct BitmapFont row indexing when un/masking fonts 2021-11-24 16:05:40 +03:30
LibGL LibGL: Initialize all GL context matrices with the identity matrix 2021-11-28 10:07:34 -08:00
LibGUI LibGUI: Move GUI::SettingsWindow setup out of the constructor 2021-11-28 08:54:22 +01:00
LibHTTP LibWeb+LibHTTP: Support multiple Set-Cookie response headers 2021-11-19 13:54:35 +03:30
LibImageDecoderClient Everywhere: Pass AK::ReadonlyBytes by value 2021-11-11 01:27:46 +01:00
LibIMAP Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibIPC Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibJS LibJS: Spin the event loop while waiting for async completion in await 2021-11-28 13:28:01 +00:00
LibKeyboard AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
LibLine Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibM Libraries: Fix typos 2021-10-01 01:06:40 +01:00
LibMain LibMain: Rename .arguments to .strings :^) 2021-11-22 22:13:22 +01:00
LibMarkdown Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibPCIDB LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
LibPDF AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
LibProtocol RequestServer+LibProtocol: Add an 'EnsureConnection' IPC endpoint 2021-09-28 22:32:31 +02:00
LibPthread LibPthread: Initialize conditions with realtime clock 2021-11-24 19:44:57 +01:00
LibRegex LibRegex: Avoid rewriting a+ as a* as part of atomic rewriting 2021-11-18 09:09:22 +01:00
LibSanitizer LibSanitizer+AK: Add float cast overflow handler 2021-08-08 10:55:36 +02:00
LibSQL AK: Make ByteBuffer::try_* functions return ErrorOr<void> 2021-11-10 21:58:58 +01:00
LibSymbolication LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
LibSyntax LibWeb: Implement first draft of CSS syntax highlighting :^) 2021-10-23 19:07:44 +02:00
LibSystem LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore 2021-11-23 11:33:36 +01:00
LibTest AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
LibTextCodec Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
LibThreading LibThreading: Remove redundant method 2021-11-02 11:07:26 +01:00
LibTLS Everywhere: Pass AK::ReadonlyBytes by value 2021-11-11 01:27:46 +01:00
LibUnicode Meta+LibUnicode: Provide code point names through library 2021-11-20 00:31:55 +01:00
LibUSBDB LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
LibVideo LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
LibVT LibGUI+Everywhere: Make sync requests to Clipboard server more obvious 2021-11-21 11:49:06 +00:00
LibWasm AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
LibWeb LibWeb: Use a string instead of an internal Parser class in Supports 2021-11-24 22:57:46 +01:00
LibWebSocket Libraries: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
LibX86 LibX86: Take load base address into consideration during disassembly 2021-10-25 12:14:26 +02:00
CMakeLists.txt LibMain: Add a new library for more ergonomic userspace entry functions 2021-11-22 19:28:31 +01:00