import { CallEventHandler } from "./CallEventArgs";
import { ConnectionId } from "../network/index";
import { MediaConfig } from "./MediaConfig";
/**
 * This interface closely mirrors the C# ICall interface and follows a specific usage pattern:
 * 1. Create an instance using a specific NetworkConfig e.g. new BrowserWebRtcCall(nconfig)
 * 2. Register an event handler at CallEvent and regularly call Update (30-60 times per second for real-time applications).
 * 3. Call Configure with a MediaConfig instance to define required features.
 * 4. Wait for a ConfigurationComplete (or failed) event, during which the user may grant device access permissions.
 * 5. Initiate a call using Listen (for incoming connections) or Call (to connect to a listening ICall).
 * 6. Once CallAccepted and other events are received, the call is active. You can send messages, adjust volume, etc.
 * 7. After the call, ensure to call Dispose to prevent background resource usage.
 *
 * Refer to example apps and guides for detailed usage instructions.
 */
export interface ICall {
    addEventListener(listener: CallEventHandler): void;
    removeEventListener(listener: CallEventHandler): void;
    Call(address: string): void;
    Configure(config: MediaConfig): void;
    Listen(address: string): void;
    Send(message: string, reliable?: boolean, id?: ConnectionId): void;
    SendData(message: Uint8Array, reliable: boolean, id: ConnectionId): void;
    Update(): void;
    Dispose(): void;
    HasAudioTrack(remoteUserId: ConnectionId): boolean;
    HasVideoTrack(remoteUserId: ConnectionId): boolean;
}
