From 6e19ab2bbce0b113b628e6f8e9b5c0640053933e Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 4 Dec 2022 18:02:33 +0000 Subject: AK+Everywhere: Rename String to DeprecatedString We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^) --- Userland/Libraries/LibCore/Stream.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Userland/Libraries/LibCore/Stream.h') diff --git a/Userland/Libraries/LibCore/Stream.h b/Userland/Libraries/LibCore/Stream.h index 257fd28c74..f4048f386a 100644 --- a/Userland/Libraries/LibCore/Stream.h +++ b/Userland/Libraries/LibCore/Stream.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -162,9 +162,9 @@ protected: static ErrorOr create_fd(SocketDomain, SocketType); // FIXME: This will need to be updated when IPv6 socket arrives. Perhaps a // base class for all address types is appropriate. - static ErrorOr resolve_host(String const&, SocketType); + static ErrorOr resolve_host(DeprecatedString const&, SocketType); - static ErrorOr connect_local(int fd, String const& path); + static ErrorOr connect_local(int fd, DeprecatedString const& path); static ErrorOr connect_inet(int fd, SocketAddress const&); int default_flags() const @@ -187,7 +187,7 @@ public: virtual bool is_connected() = 0; /// Reconnects the socket to the given host and port. Returns EALREADY if /// is_connected() is true. - virtual ErrorOr reconnect(String const& host, u16 port) = 0; + virtual ErrorOr reconnect(DeprecatedString const& host, u16 port) = 0; /// Connects the socket to the given socket address (IP address + port). /// Returns EALREADY is_connected() is true. virtual ErrorOr reconnect(SocketAddress const&) = 0; @@ -325,7 +325,7 @@ private: class TCPSocket final : public Socket { public: - static ErrorOr> connect(String const& host, u16 port); + static ErrorOr> connect(DeprecatedString const& host, u16 port); static ErrorOr> connect(SocketAddress const& address); static ErrorOr> adopt_fd(int fd); @@ -388,7 +388,7 @@ private: class UDPSocket final : public Socket { public: - static ErrorOr> connect(String const& host, u16 port, Optional