mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Move MachPortServer from LibWebView into LibIPC as MachBootstrapListener and move the Mach message structs from MachMessageTypes.h into LibIPC. These types are IPC infrastructure, not UI or platform concerns. Consolidating them in LibIPC keeps the Mach bootstrap handshake self-contained in a single library and removes LibWebView's dependency on LibThreading.
45 lines
804 B
C++
45 lines
804 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Error.h>
|
|
#include <AK/Platform.h>
|
|
|
|
namespace IPC {
|
|
|
|
class Attachment;
|
|
class AutoCloseFileDescriptor;
|
|
class Decoder;
|
|
class Encoder;
|
|
class Message;
|
|
class MessageBuffer;
|
|
class File;
|
|
class Stub;
|
|
class TransportHandle;
|
|
|
|
#if defined(AK_OS_MACOS)
|
|
class MachBootstrapListener;
|
|
class TransportMachPort;
|
|
using Transport = TransportMachPort;
|
|
#elif !defined(AK_OS_WINDOWS)
|
|
class TransportSocket;
|
|
using Transport = TransportSocket;
|
|
#else
|
|
class TransportSocketWindows;
|
|
using Transport = TransportSocketWindows;
|
|
#endif
|
|
|
|
template<typename T>
|
|
ErrorOr<void> encode(Encoder&, T const&);
|
|
|
|
template<typename T>
|
|
ErrorOr<T> decode(Decoder&);
|
|
|
|
using MessageDataType = Vector<u8, 1024>;
|
|
|
|
}
|