LibIPC: Remove DateTime encoder/decoder

Remove LibCore::DateTime encoder/decoder as it is not longer needed.
This commit is contained in:
Tomasz Strejczek 2025-06-22 13:58:21 +02:00 committed by Jelle Raaijmakers
parent 27dfaea32f
commit 6fc4c544de
Notes: github-actions[bot] 2025-09-30 10:40:28 +00:00
2 changed files with 0 additions and 15 deletions

View file

@ -9,7 +9,6 @@
#include <AK/NumericLimits.h> #include <AK/NumericLimits.h>
#include <AK/Utf16String.h> #include <AK/Utf16String.h>
#include <LibCore/AnonymousBuffer.h> #include <LibCore/AnonymousBuffer.h>
#include <LibCore/DateTime.h>
#include <LibCore/Proxy.h> #include <LibCore/Proxy.h>
#include <LibCore/Socket.h> #include <LibCore/Socket.h>
#include <LibIPC/Decoder.h> #include <LibIPC/Decoder.h>
@ -149,13 +148,6 @@ ErrorOr<Core::AnonymousBuffer> decode(Decoder& decoder)
return Core::AnonymousBuffer::create_from_anon_fd(anon_file.take_fd(), size); return Core::AnonymousBuffer::create_from_anon_fd(anon_file.take_fd(), size);
} }
template<>
ErrorOr<Core::DateTime> decode(Decoder& decoder)
{
auto timestamp = TRY(decoder.decode<i64>());
return Core::DateTime::from_timestamp(static_cast<time_t>(timestamp));
}
template<> template<>
ErrorOr<Core::ProxyData> decode(Decoder& decoder) ErrorOr<Core::ProxyData> decode(Decoder& decoder)
{ {

View file

@ -17,7 +17,6 @@
#include <AK/Utf16String.h> #include <AK/Utf16String.h>
#include <AK/Utf16View.h> #include <AK/Utf16View.h>
#include <LibCore/AnonymousBuffer.h> #include <LibCore/AnonymousBuffer.h>
#include <LibCore/DateTime.h>
#include <LibCore/Proxy.h> #include <LibCore/Proxy.h>
#include <LibCore/System.h> #include <LibCore/System.h>
#include <LibIPC/Encoder.h> #include <LibIPC/Encoder.h>
@ -181,12 +180,6 @@ ErrorOr<void> encode(Encoder& encoder, Core::AnonymousBuffer const& buffer)
return {}; return {};
} }
template<>
ErrorOr<void> encode(Encoder& encoder, Core::DateTime const& datetime)
{
return encoder.encode(static_cast<i64>(datetime.timestamp()));
}
template<> template<>
ErrorOr<void> encode(Encoder& encoder, Core::ProxyData const& proxy) ErrorOr<void> encode(Encoder& encoder, Core::ProxyData const& proxy)
{ {