2022-04-14 16:13:19 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: IPCHandle.hpp
|
|
|
|
Date: 2022-4-13
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
2022-06-11 23:52:46 +00:00
|
|
|
namespace Aurora::IO::IPC
|
2022-04-14 16:13:19 +00:00
|
|
|
{
|
|
|
|
struct IPCHandle
|
|
|
|
{
|
2022-04-15 14:46:07 +00:00
|
|
|
IPCHandle();
|
|
|
|
|
2022-04-14 16:13:19 +00:00
|
|
|
bool flags[4];
|
2022-04-15 10:01:43 +00:00
|
|
|
AuUInt word;
|
2022-04-14 16:13:19 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
char path[16];
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
AuUInt32 cookie;
|
|
|
|
AuUInt32 pid;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-15 10:01:43 +00:00
|
|
|
void NewId();
|
|
|
|
void NewId(AuUInt len);
|
2022-04-14 16:13:19 +00:00
|
|
|
void NewId(bool a, bool b, bool c, bool d);
|
2022-04-15 14:46:07 +00:00
|
|
|
|
2022-04-14 16:13:19 +00:00
|
|
|
bool FromString(const AuString &in);
|
|
|
|
AuString ToString() const;
|
|
|
|
AuString ToNTPath() const;
|
|
|
|
AuUInt32 ToUnixServerCookie() const;
|
|
|
|
|
|
|
|
#if defined(AURORA_IS_POSIX_DERIVED)
|
|
|
|
pid_t ToUnixPid() const;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
}
|