1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:18:12 +00:00
serenity/Userland/Libraries/LibCore
sin-ack 19e13117ad LibCore: Implement the Serenity Stream API classes
The Serenity Stream API is the name for the new set of classes intended
to replace IODevice and its descendants. It provides more flexibility
for subclasses by allowing each subclass to override all the possible
functionalities according to their wishes.

Stream is the base class which implements majority of the functionality
expected from a readable and writable stream. SeekableStream adds
seeking on top, and provides a couple utility methods which derive from
seek. Socket adds a couple of BSD socket utility functions such as
checking whether there is data available to read and checking the
pending bytes on the socket.

As for the concrete classes, there is File which is a SeekableStream and
is intended to operate on file-like objects; and TCPSocket, UDPSocket
and LocalSocket, which handle TCP, UDP and UNIX sockets respectively.

The concrete classes do not do buffering by default. For buffering
functionality, a set of augmentative classes named BufferedSeekable and
BufferedSocket have been implemented, intended to wrap a SeekableStream
and a Socket, respectively.
2021-12-16 22:21:35 +03:30
..
Account.cpp LibCore: Don't include crypt.h in Account.cpp on FreeBSD 2021-11-16 19:06:13 +00:00
Account.h LibCore: Replace Result<T, E> use with ErrorOr<T> in Core::Account 2021-11-08 00:35:27 +01:00
AnonymousBuffer.cpp AK: Bring AK::Error into the global namespace 2021-11-08 00:35:27 +01:00
AnonymousBuffer.h LibIPC+IPCCompiler+AK: Make IPC value decoders return ErrorOr<void> 2021-11-28 23:14:19 +01:00
ArgsParser.cpp Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
ArgsParser.h Userland: Use Core::ArgsParser's Vector<StringView> API everywhere 2021-11-26 23:27:57 +01:00
CMakeLists.txt LibCore: Implement the Serenity Stream API classes 2021-12-16 22:21:35 +03:30
Command.cpp LibCore: Remove unused header includes 2021-08-01 08:10:16 +02:00
Command.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ConfigFile.cpp Base+LibCore: Store booleans in human-readable format 2021-11-04 23:44:02 +01:00
ConfigFile.h Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to open 2021-08-22 01:32:25 +02:00
DateTime.cpp LibCore: Make DateTime's members signed 2021-08-19 19:15:00 +01:00
DateTime.h LibIPC+IPCCompiler+AK: Make IPC value decoders return ErrorOr<void> 2021-11-28 23:14:19 +01:00
DeferredInvocationContext.h LibCore+Userland: Implement Core::deferred_invoke 2021-09-02 03:47:47 +04:30
DirIterator.cpp LibCore: Allow moving, but not copying, DirIterator 2021-11-23 22:58:05 +01:00
DirIterator.h LibCore: Allow moving, but not copying, DirIterator 2021-11-23 22:58:05 +01:00
ElapsedTimer.cpp LibCore: Add ElapsedTimer::reset() 2021-10-28 11:21:18 +02:00
ElapsedTimer.h LibCore: Add ElapsedTimer::reset() 2021-10-28 11:21:18 +02:00
Event.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.h LibCore+Userland: Implement Core::deferred_invoke 2021-09-02 03:47:47 +04:30
EventLoop.cpp AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
EventLoop.h LibCore: Add Core::EventLoop::spin_until(Function<bool()>) 2021-09-25 19:32:14 +02:00
File.cpp Everywhere: Move shared library checks into a common function 2021-11-10 14:42:49 +01:00
File.h Everywhere: Move shared library checks into a common function 2021-11-10 14:42:49 +01:00
FileStream.h LibCore: Use ErrorOr<T> for Core::File::open() 2021-11-08 00:35:27 +01:00
FileWatcher.cpp LibCore: Replace Result<T, E> use with ErrorOr<T> in Core::FileWatcher 2021-11-08 00:35:27 +01:00
FileWatcher.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
Forward.h LibCore+Userland: Implement Core::deferred_invoke 2021-09-02 03:47:47 +04:30
GetPassword.cpp LibCore: Use LibCore syscall wrappers in get_password() 2021-11-30 23:34:40 +01:00
GetPassword.h LibCore: Use ErrorOr<T> for Core::get_password() 2021-11-08 00:35:27 +01:00
IODevice.cpp LibCore: Add support for range-based for loops on LineIterators 2021-12-12 14:06:38 +03:30
IODevice.h LibCore: Add support for range-based for loops on LineIterators 2021-12-12 14:06:38 +03:30
LocalServer.cpp LibCore: Make LocalServer::take_over_from_system_server() return ErrorOr 2021-12-06 19:22:16 +01:00
LocalServer.h LibCore: Make LocalServer::take_over_from_system_server() return ErrorOr 2021-12-06 19:22:16 +01:00
LocalSocket.cpp LibCore: Make LocalSocket takeover mechanism return ErrorOr<T> 2021-11-23 11:33:36 +01:00
LocalSocket.h LibCore: Make LocalSocket takeover mechanism return ErrorOr<T> 2021-11-23 11:33:36 +01:00
LockFile.cpp Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LockFile.h Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
MappedFile.cpp LibCore: Use open() wrapper in Core::MappedFile :^) 2021-11-23 12:23:54 +01:00
MappedFile.h LibCore+AK: Move MappedFile from AK to LibCore 2021-11-23 11:33:36 +01:00
MimeData.cpp Everywhere: Pass AK::ReadonlyBytes by value 2021-11-11 01:27:46 +01:00
MimeData.h LibCore: Avoid implicitly copying ByteBuffer 2021-12-08 09:46:13 -08:00
NetworkJob.cpp LibHTTP: Respect the 'Connection: close' header on keep-alive jobs 2021-09-30 11:46:37 +02:00
NetworkJob.h LibHTTP: Respect the 'Connection: close' header on keep-alive jobs 2021-09-30 11:46:37 +02:00
NetworkResponse.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NetworkResponse.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Notifier.cpp LibCore: Remove unused header includes 2021-08-01 08:10:16 +02:00
Notifier.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Object.cpp LibCore: Add Core::Object::try_add<T>(...) 2021-11-24 13:52:01 +01:00
Object.h LibCore: Add Core::Object::try_add<T>(...) 2021-11-24 13:52:01 +01:00
Process.cpp LibCore: Explicitly declare environ in Process.cpp to unbreak macOS 2021-08-06 01:29:09 +02:00
Process.h LibCore: Add Core::Process::spawn() 2021-08-06 01:04:11 +02:00
ProcessStatisticsReader.cpp AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional) 2021-11-17 00:21:10 +01:00
ProcessStatisticsReader.h Everywhere: Make tracking cpu usage independent from system ticks 2021-07-18 22:08:26 +02:00
Promise.h Libraries: Fix visibility of Object-derivative constructors 2021-11-02 22:56:53 +01:00
Property.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Property.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
SecretString.cpp LibCore: Avoid buffer overrun when invoking crypt() with a SecretString 2021-10-19 18:19:33 +02:00
SecretString.h LibCore: Add SecretString, a buffer that is zero'd on destruction 2021-09-12 16:36:52 +02:00
Socket.cpp LibCore: Add a Socket::set_idle() API that turns the notifiers on/off 2021-10-04 15:31:26 +02:00
Socket.h LibCore: Add a Socket::set_idle() API that turns the notifiers on/off 2021-10-04 15:31:26 +02:00
SocketAddress.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
StandardPaths.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StandardPaths.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Stream.cpp LibCore: Implement the Serenity Stream API classes 2021-12-16 22:21:35 +03:30
Stream.h LibCore: Implement the Serenity Stream API classes 2021-12-16 22:21:35 +03:30
System.cpp LibCore: Add waitpid() wrapper that return ErrorOr<pid_t> 2021-12-16 02:10:47 -08:00
System.h LibCore: Add waitpid() wrapper that return ErrorOr<pid_t> 2021-12-16 02:10:47 -08:00
TCPServer.cpp LibCore: Allow TCPServer to be blocking 2021-06-16 09:10:48 +02:00
TCPServer.h LibCore: Allow TCPServer to be blocking 2021-06-16 09:10:48 +02:00
TCPSocket.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
TCPSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Timer.cpp LibCore: Add unit to Core::Timer interval arguments 2021-05-12 22:38:20 +02:00
Timer.h LibCore: Add unit to Core::Timer interval arguments 2021-05-12 22:38:20 +02:00
UDPServer.cpp LibCore+LookupServer: Implement and use UDPServer::send 2021-12-16 22:21:35 +03:30
UDPServer.h LibCore+LookupServer: Implement and use UDPServer::send 2021-12-16 22:21:35 +03:30
UDPSocket.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
UDPSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Version.cpp LibCore: Refactor a version-reading utility 2021-09-02 16:17:18 +01:00
Version.h LibCore: Refactor a version-reading utility 2021-09-02 16:17:18 +01:00