// Mirrors of voicecat.h's enums. Keep these in lockstep with core/include/voicecat.h —
// values are append-only per the C ABI's house rule, so it's safe to add new members at the
// end here too, but never renumber/remove existing ones.
namespace VoiceCat.Interop;
public enum VcResult
{
Ok = 0,
NotImplemented = 1,
InvalidArg = 2,
NotConnected = 3,
Already = 4,
AuthFailed = 5,
PermissionDenied = 6,
Timeout = 7,
Io = 8,
Protocol = 9,
Crypto = 10,
Audio = 11,
Internal = 12,
}
public enum VcLogLevel
{
Trace = 0,
Debug = 1,
Info = 2,
Warn = 3,
Error = 4,
Off = 5,
}
public enum VcConnectionState
{
Disconnected = 0,
Connecting = 1,
TlsHandshake = 2,
Authenticating = 3,
Connected = 4,
/// M4: handshake succeeded, waiting on vc_confirm_server_identity().
VerifyingIdentity = 5,
}
public enum VcTextScope
{
Channel = 0,
Private = 1,
Server = 2,
}
public enum VcDeviceKind
{
Input = 0,
Output = 1,
}
public enum VcStreamKind
{
Mic = 0,
/// System/desktop audio (WASAPI loopback on Windows).
ScreenAudio = 1,
AuxDevice = 2,
}
/// Send-side input gate (docs/voice.md §11).
public enum VcInputMode
{
VoiceActivation = 0,
PushToTalk = 1,
AlwaysOn = 2, // transmit unconditionally, no VAD gate
}
public enum VcEventType
{
ConnectionState = 0,
AuthResult = 1,
ChannelList = 2,
UserJoined = 3,
UserLeft = 4,
UserUpdated = 5,
TextMessage = 6,
StreamStarted = 7,
StreamStopped = 8,
TalkState = 9,
Error = 10,
Disconnected = 11,
/// M4: reply to VoiceCatClient.JoinChannelAsync's underlying vc_join_channel.
JoinResult = 12,
/// M4: the TOFU server-identity gate — see VcTofuStatus.
ServerIdentity = 13,
/// M5: async result for moderation/admin/channel operations.
GenericResult = 14,
/// M5: reply to VoiceCatClient.RequestAccountList — call ListAccounts() to read.
AccountList = 15,
/// Voice-plane subscription state. u32a = 1 (subscribed) or 0 (unsubscribed).
VoiceState = 16,
}
///
/// TOFU server-identity classification. Pins the TLS leaf certificate's own SHA-256
/// fingerprint (real, verifiable from the handshake) — NOT the declared Ed25519 identity
/// fingerprint from ServerHello, which is informational/display-only (see
/// VoiceCatClient.GetServerIdentityDisplay and docs/security.md §1.1).
///
public enum VcTofuStatus
{
FirstConnect = 0,
Matched = 1,
Mismatch = 2,
}