import type { IAppiumIpc } from '@appium/types';
import type { XCUITestDriver } from './driver';
export type SessionUdidIpcMessage = {
    udid: string;
    sessionId: string;
};
type IpcProvider = () => Promise<IAppiumIpc | undefined>;
export declare class SessionClaimHandler {
    private readonly getIpc;
    static readonly CLAIMED_TOPIC = "xcuitest:sessionUdidClaimed";
    static readonly CONTENDED_TOPIC = "xcuitest:sessionUdidContended";
    static readonly RELEASED_TOPIC = "xcuitest:sessionUdidReleased";
    private static readonly CONTENTION_PROBE_MS;
    private static readonly RELEASE_WAIT_MS;
    private readonly subscriptionsBySessionId;
    constructor(getIpc: IpcProvider);
    /** Subscribe the current session to udid claim messages from other sessions. */
    registerActiveSession(driver: XCUITestDriver): Promise<void>;
    /** Unsubscribe the current session from udid claim messages. */
    unregisterActiveSession(driver: XCUITestDriver): void;
    /** Publish this session's udid so any existing session on the same device can terminate. */
    claimSessionUdid(driver: XCUITestDriver): Promise<void>;
    private dispatchSessionUdidMessage;
    private handleSessionUdidMessage;
    private publishSessionUdidContended;
    private terminateSessionOnRequest;
    private publishSessionUdidReleased;
    private getPublisherId;
    private isMatchingSessionUdidMessage;
}
export declare const sessionClaimHandler: SessionClaimHandler;
export {};
//# sourceMappingURL=session-claim-handler.d.ts.map