70 lines
1.5 KiB
C#
70 lines
1.5 KiB
C#
// Plain managed record types — what survives past the native struct/free-list lifetime
|
|
// (Marshaling.cs converts the native *Native structs into these and immediately frees the
|
|
// native list). Nothing here holds an IntPtr.
|
|
namespace VoiceCat.Interop;
|
|
|
|
public sealed record ChannelInfo(
|
|
uint Id,
|
|
uint ParentId,
|
|
string Name,
|
|
string Topic,
|
|
bool PasswordProtected,
|
|
uint MaxUsers);
|
|
|
|
public sealed record ChannelEditInfo(
|
|
uint Id,
|
|
uint ParentId,
|
|
string Name,
|
|
string Topic,
|
|
bool PasswordProtected,
|
|
string? Password,
|
|
uint MaxUsers,
|
|
uint SortOrder,
|
|
AudioConfigInfo Audio);
|
|
|
|
public sealed record UserInfo(
|
|
uint Id,
|
|
string Nickname,
|
|
bool IsGuest,
|
|
uint ChannelId,
|
|
bool SelfMicMuted,
|
|
bool SelfDeafened,
|
|
bool ServerMuted,
|
|
bool ServerDeafened);
|
|
|
|
public sealed record PermissionsInfo(
|
|
bool CanCreateTempChannel,
|
|
bool CanKick,
|
|
bool CanBan,
|
|
bool CanMoveUsers,
|
|
bool CanAdminAccounts,
|
|
bool IsAdmin);
|
|
|
|
public sealed record AccountInfo(
|
|
string Username,
|
|
bool IsAdmin,
|
|
ulong CreatedAtUnixMs,
|
|
ulong LastLoginUnixMs);
|
|
|
|
public sealed record StreamSummary(
|
|
uint StreamId,
|
|
VcStreamKind Kind,
|
|
string Label);
|
|
|
|
public sealed record DeviceInfo(
|
|
string Id,
|
|
string Name,
|
|
bool IsDefault);
|
|
|
|
public sealed record AudioConfigInfo(
|
|
uint Codec,
|
|
bool Stereo,
|
|
uint SampleRate,
|
|
uint BitrateBps,
|
|
uint FrameMs,
|
|
uint Application,
|
|
bool Fec,
|
|
uint ExpectedPacketLoss,
|
|
bool Dtx,
|
|
uint Complexity);
|