2022-04-16 15:42:48 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
2022-12-14 05:03:37 +00:00
|
|
|
File: AuIPCMemory.NT.hpp
|
2022-04-16 15:42:48 +00:00
|
|
|
Date: 2022-4-15
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
2022-08-02 04:52:17 +00:00
|
|
|
#include <Source/IO/IPC/IPC.hpp>
|
2022-12-14 05:03:37 +00:00
|
|
|
#include <Source/IO/IPC/AuIPCHandle.hpp>
|
2022-08-02 04:52:17 +00:00
|
|
|
|
2022-06-11 23:52:46 +00:00
|
|
|
namespace Aurora::IO::IPC
|
2022-04-16 15:42:48 +00:00
|
|
|
{
|
2022-08-02 04:52:17 +00:00
|
|
|
struct IPCSharedMemoryImpl : IPCSharedMemory
|
|
|
|
{
|
2022-12-14 05:03:37 +00:00
|
|
|
IPCSharedMemoryImpl(HANDLE handle,
|
|
|
|
void *pBase,
|
|
|
|
const IPC::IPCHandle &ipcHandle);
|
2022-08-02 04:52:17 +00:00
|
|
|
~IPCSharedMemoryImpl();
|
|
|
|
|
|
|
|
virtual Memory::MemoryViewWrite GetMemory() override;
|
|
|
|
virtual AuUInt GetLength() override;
|
|
|
|
|
|
|
|
virtual AuString ExportToString() override;
|
2022-04-16 15:42:48 +00:00
|
|
|
|
2022-08-02 04:52:17 +00:00
|
|
|
private:
|
|
|
|
IPC::IPCHandle ipcHandle_;
|
2022-12-14 05:03:37 +00:00
|
|
|
HANDLE handle_ {};
|
|
|
|
void *pBase_ {};
|
|
|
|
AuUInt uLen_ {};
|
|
|
|
bool bOwns_;
|
2022-08-02 04:52:17 +00:00
|
|
|
};
|
2022-04-16 15:42:48 +00:00
|
|
|
}
|