Files
Talon bba605401d
Some checks failed
Build Linux Binaries / linux/amd64 (push) Has been cancelled
Build Linux Binaries / linux/arm64 (push) Has been cancelled
chore: comment cleanup pass ahead of open-sourcing
Removes leftover debug scaffolding (stray Console.WriteLine/NSLog traces,
dead nick_buf_ptr, a no-op --print-config flag now implemented for real),
fixes stale/misleading comments (channel passwords are no longer a "future
M5+" feature, a wrong cross-reference, a stale TlsContext::close() mention,
an incomplete BanRecord::subject_type doc, and a smoke test pointing at a
build/m1-dev preset that no longer exists), strips internal M1-M5 milestone
jargon from comments now that the roadmap is done, trims comments that just
restated the following line, and consolidates a few "why" explanations that
were duplicated 2-3 times in the same file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-03 10:20:18 +01:00

111 lines
2.6 KiB
C#

// 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,
/// <summary>Handshake succeeded, waiting on vc_confirm_server_identity().</summary>
VerifyingIdentity = 5,
}
public enum VcTextScope
{
Channel = 0,
Private = 1,
Server = 2,
}
public enum VcDeviceKind
{
Input = 0,
Output = 1,
}
public enum VcStreamKind
{
Mic = 0,
/// <summary>System/desktop audio (WASAPI loopback on Windows).</summary>
ScreenAudio = 1,
AuxDevice = 2,
}
/// <summary>Send-side input gate (docs/voice.md §11).</summary>
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,
/// <summary>Reply to VoiceCatClient.JoinChannelAsync's underlying vc_join_channel.</summary>
JoinResult = 12,
/// <summary>The TOFU server-identity gate — see VcTofuStatus.</summary>
ServerIdentity = 13,
/// <summary>Async result for moderation/admin/channel operations.</summary>
GenericResult = 14,
/// <summary>Reply to VoiceCatClient.RequestAccountList — call ListAccounts() to read.</summary>
AccountList = 15,
/// <summary>Voice-plane subscription state. u32a = 1 (subscribed) or 0 (unsubscribed).</summary>
VoiceState = 16,
}
/// <summary>
/// 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).
/// </summary>
public enum VcTofuStatus
{
FirstConnect = 0,
Matched = 1,
Mismatch = 2,
}