mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
LibCore+LibIPC: Move various encode/decode specializations to LibIPC
This removes a dependency on LibIPC from LibCore.
This commit is contained in:
parent
18f28f398b
commit
a4d931d14a
Notes:
github-actions[bot]
2025-06-14 20:04:39 +00:00
Author: https://github.com/rmg-x
Commit: a4d931d14a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5084
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/trflynn89
7 changed files with 22 additions and 34 deletions
|
@ -7,7 +7,6 @@
|
||||||
#include <AK/Try.h>
|
#include <AK/Try.h>
|
||||||
#include <LibCore/AnonymousBuffer.h>
|
#include <LibCore/AnonymousBuffer.h>
|
||||||
#include <LibCore/System.h>
|
#include <LibCore/System.h>
|
||||||
#include <LibIPC/File.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
#include <AK/RefPtr.h>
|
#include <AK/RefPtr.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <LibIPC/Forward.h>
|
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
|
@ -75,13 +74,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace IPC {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
ErrorOr<void> encode(Encoder&, Core::AnonymousBuffer const&);
|
|
||||||
|
|
||||||
template<>
|
|
||||||
ErrorOr<Core::AnonymousBuffer> decode(Decoder&);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include <AK/ByteString.h>
|
#include <AK/ByteString.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibIPC/Forward.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
@ -107,13 +106,3 @@ struct Formatter<Core::DateTime> : StandardFormatter {
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace IPC {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
ErrorOr<void> encode(Encoder&, Core::DateTime const&);
|
|
||||||
|
|
||||||
template<>
|
|
||||||
ErrorOr<Core::DateTime> decode(Decoder&);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ class TimeZoneWatcher;
|
||||||
class UDPServer;
|
class UDPServer;
|
||||||
class UDPSocket;
|
class UDPSocket;
|
||||||
|
|
||||||
|
struct ProxyData;
|
||||||
|
|
||||||
enum class TimerShouldFireWhenNotVisible;
|
enum class TimerShouldFireWhenNotVisible;
|
||||||
|
|
||||||
#ifdef AK_OS_MACH
|
#ifdef AK_OS_MACH
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <AK/Error.h>
|
#include <AK/Error.h>
|
||||||
#include <AK/IPv4Address.h>
|
#include <AK/IPv4Address.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <LibIPC/Forward.h>
|
|
||||||
#include <LibURL/URL.h>
|
#include <LibURL/URL.h>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
@ -48,13 +47,3 @@ struct ProxyData {
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace IPC {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
ErrorOr<void> encode(Encoder&, Core::ProxyData const&);
|
|
||||||
|
|
||||||
template<>
|
|
||||||
ErrorOr<Core::ProxyData> decode(Decoder&);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <AK/Try.h>
|
#include <AK/Try.h>
|
||||||
#include <AK/TypeList.h>
|
#include <AK/TypeList.h>
|
||||||
#include <AK/Variant.h>
|
#include <AK/Variant.h>
|
||||||
|
#include <LibCore/Forward.h>
|
||||||
#include <LibCore/SharedCircularQueue.h>
|
#include <LibCore/SharedCircularQueue.h>
|
||||||
#include <LibCore/Socket.h>
|
#include <LibCore/Socket.h>
|
||||||
#include <LibIPC/Concepts.h>
|
#include <LibIPC/Concepts.h>
|
||||||
|
@ -117,6 +118,15 @@ ErrorOr<File> decode(Decoder&);
|
||||||
template<>
|
template<>
|
||||||
ErrorOr<Empty> decode(Decoder&);
|
ErrorOr<Empty> decode(Decoder&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
ErrorOr<Core::AnonymousBuffer> decode(Decoder&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
ErrorOr<Core::DateTime> decode(Decoder&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
ErrorOr<Core::ProxyData> decode(Decoder&);
|
||||||
|
|
||||||
template<Concepts::Array T>
|
template<Concepts::Array T>
|
||||||
ErrorOr<T> decode(Decoder& decoder)
|
ErrorOr<T> decode(Decoder& decoder)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <AK/HashMap.h>
|
#include <AK/HashMap.h>
|
||||||
#include <AK/StdLibExtras.h>
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/Variant.h>
|
#include <AK/Variant.h>
|
||||||
|
#include <LibCore/Forward.h>
|
||||||
#include <LibCore/SharedCircularQueue.h>
|
#include <LibCore/SharedCircularQueue.h>
|
||||||
#include <LibIPC/Concepts.h>
|
#include <LibIPC/Concepts.h>
|
||||||
#include <LibIPC/File.h>
|
#include <LibIPC/File.h>
|
||||||
|
@ -116,6 +117,15 @@ ErrorOr<void> encode(Encoder&, File const&);
|
||||||
template<>
|
template<>
|
||||||
ErrorOr<void> encode(Encoder&, Empty const&);
|
ErrorOr<void> encode(Encoder&, Empty const&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
ErrorOr<void> encode(Encoder&, Core::AnonymousBuffer const&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
ErrorOr<void> encode(Encoder&, Core::DateTime const&);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
ErrorOr<void> encode(Encoder&, Core::ProxyData const&);
|
||||||
|
|
||||||
template<Concepts::Span T>
|
template<Concepts::Span T>
|
||||||
ErrorOr<void> encode(Encoder& encoder, T const& span)
|
ErrorOr<void> encode(Encoder& encoder, T const& span)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue