41 lines
827 B
C++
41 lines
827 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: IPCHandle.hpp
|
|
Date: 2022-4-13
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO::IPC
|
|
{
|
|
struct IPCHandle
|
|
{
|
|
IPCHandle();
|
|
|
|
bool flags[4];
|
|
AuUInt word;
|
|
union
|
|
{
|
|
char path[16];
|
|
struct
|
|
{
|
|
AuUInt32 cookie;
|
|
AuUInt32 pid;
|
|
};
|
|
};
|
|
|
|
void NewId();
|
|
void NewId(AuUInt len);
|
|
void NewId(bool a, bool b, bool c, bool d);
|
|
|
|
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
|
|
};
|
|
} |