mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
This commit is contained in:
parent
b7e3810b5c
commit
2d39da5405
265 changed files with 1380 additions and 1167 deletions
|
@ -32,7 +32,9 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
class CSocketAddress {
|
||||
namespace Core {
|
||||
|
||||
class SocketAddress {
|
||||
public:
|
||||
enum class Type {
|
||||
Invalid,
|
||||
|
@ -40,23 +42,23 @@ public:
|
|||
Local
|
||||
};
|
||||
|
||||
CSocketAddress() {}
|
||||
CSocketAddress(const IPv4Address& address)
|
||||
SocketAddress() {}
|
||||
SocketAddress(const IPv4Address& address)
|
||||
: m_type(Type::IPv4)
|
||||
, m_ipv4_address(address)
|
||||
{
|
||||
}
|
||||
|
||||
CSocketAddress(const IPv4Address& address, u16 port)
|
||||
SocketAddress(const IPv4Address& address, u16 port)
|
||||
: m_type(Type::IPv4)
|
||||
, m_ipv4_address(address)
|
||||
, m_port(port)
|
||||
{
|
||||
}
|
||||
|
||||
static CSocketAddress local(const String& address)
|
||||
static SocketAddress local(const String& address)
|
||||
{
|
||||
CSocketAddress addr;
|
||||
SocketAddress addr;
|
||||
addr.m_type = Type::Local;
|
||||
addr.m_local_address = address;
|
||||
return addr;
|
||||
|
@ -106,7 +108,9 @@ private:
|
|||
String m_local_address;
|
||||
};
|
||||
|
||||
inline const LogStream& operator<<(const LogStream& stream, const CSocketAddress& value)
|
||||
inline const LogStream& operator<<(const LogStream& stream, const SocketAddress& value)
|
||||
{
|
||||
return stream << value.to_string();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue