#include <cstddef>
#include <cstring>
#include <memory>
#include "api.h"
#include "ipcz/api_context.h"
#include "ipcz/api_object.h"
#include "ipcz/application_object.h"
#include "ipcz/box.h"
#include "ipcz/driver_object.h"
#include "ipcz/ipcz.h"
#include "ipcz/node.h"
#include "ipcz/node_link_memory.h"
#include "ipcz/parcel.h"
#include "ipcz/parcel_wrapper.h"
#include "ipcz/router.h"
#include "util/ref_counted.h"
extern "C" {
IpczResult Close(IpczHandle handle, uint32_t flags, const void* options) { … }
IpczResult CreateNode(const IpczDriver* driver,
IpczCreateNodeFlags flags,
const IpczCreateNodeOptions* options,
IpczHandle* node) { … }
IpczResult ConnectNode(IpczHandle node_handle,
IpczDriverHandle driver_transport,
size_t num_initial_portals,
IpczConnectNodeFlags flags,
const void* options,
IpczHandle* initial_portals) { … }
IpczResult OpenPortals(IpczHandle node_handle,
uint32_t flags,
const void* options,
IpczHandle* portal0,
IpczHandle* portal1) { … }
IpczResult MergePortals(IpczHandle portal0,
IpczHandle portal1,
uint32_t flags,
const void* options) { … }
IpczResult QueryPortalStatus(IpczHandle portal_handle,
uint32_t flags,
const void* options,
IpczPortalStatus* status) { … }
IpczResult Put(IpczHandle portal_handle,
const void* data,
size_t num_bytes,
const IpczHandle* handles,
size_t num_handles,
uint32_t flags,
const void* options) { … }
IpczResult BeginPut(IpczHandle portal_handle,
IpczBeginPutFlags flags,
const void* options,
volatile void** data,
size_t* num_bytes,
IpczTransaction* transaction) { … }
IpczResult EndPut(IpczHandle portal_handle,
IpczTransaction transaction,
size_t num_bytes_produced,
const IpczHandle* handles,
size_t num_handles,
IpczEndPutFlags flags,
const void* options) { … }
IpczResult Get(IpczHandle source,
IpczGetFlags flags,
const void* options,
void* data,
size_t* num_bytes,
IpczHandle* handles,
size_t* num_handles,
IpczHandle* parcel) { … }
IpczResult BeginGet(IpczHandle source,
uint32_t flags,
const void* options,
const volatile void** data,
size_t* num_bytes,
IpczHandle* handles,
size_t* num_handles,
IpczTransaction* transaction) { … }
IpczResult EndGet(IpczHandle source,
IpczTransaction transaction,
IpczEndGetFlags flags,
const void* options,
IpczHandle* parcel) { … }
IpczResult Trap(IpczHandle portal_handle,
const IpczTrapConditions* conditions,
IpczTrapEventHandler handler,
uintptr_t context,
uint32_t flags,
const void* options,
IpczTrapConditionFlags* satisfied_condition_flags,
IpczPortalStatus* status) { … }
IpczResult Reject(IpczHandle parcel_handle,
uintptr_t context,
uint32_t flags,
const void* options) { … }
IpczResult Box(IpczHandle node_handle,
const IpczBoxContents* contents,
uint32_t flags,
const void* options,
IpczHandle* handle) { … }
IpczResult Unbox(IpczHandle handle,
IpczUnboxFlags flags,
const void* options,
IpczBoxContents* contents) { … }
constexpr IpczAPI kCurrentAPI = …;
constexpr size_t kVersion0APISize = …;
IPCZ_EXPORT IpczResult IPCZ_API IpczGetAPI(IpczAPI* api) { … }
}