diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-02-01 20:49:29 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-21 13:55:00 +0200 |
commit | fc7d231b004e6d141caf880dc837b701dd1898f5 (patch) | |
tree | 5b37f9a73c5be26a6e870b7f3be3cfb4e8981262 /Userland/Libraries/LibIPC/Encoder.h | |
parent | 6b13436ef64b8ae91f71b3fed2e8555f733d7998 (diff) | |
download | serenity-fc7d231b004e6d141caf880dc837b701dd1898f5.zip |
LibIPC: Allow transporting a SharedCircularQueue over IPC
Diffstat (limited to 'Userland/Libraries/LibIPC/Encoder.h')
-rw-r--r-- | Userland/Libraries/LibIPC/Encoder.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Libraries/LibIPC/Encoder.h b/Userland/Libraries/LibIPC/Encoder.h index b207e73ccd..4c39ebd64b 100644 --- a/Userland/Libraries/LibIPC/Encoder.h +++ b/Userland/Libraries/LibIPC/Encoder.h @@ -8,6 +8,7 @@ #include <AK/Concepts.h> #include <AK/StdLibExtras.h> +#include <LibCore/SharedCircularQueue.h> #include <LibIPC/Forward.h> #include <LibIPC/Message.h> @@ -77,6 +78,13 @@ public: return *this; } + template<typename T, size_t Size> + Encoder& operator<<(Core::SharedSingleProducerCircularQueue<T, Size> const& queue) + { + *this << IPC::File(queue.fd()); + return *this; + } + template<Enum T> Encoder& operator<<(T const& enum_value) { |