import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSData } from "../Foundation/NSData.js";
import type { _NSDate } from "../Foundation/NSDate.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _GKCloudPlayer } from "./GKCloudPlayer.js";
import type { GKConnectionState } from "./GKConnectionState.js";
import type { GKTransportType } from "./GKTransportType.js";
export declare class _GKGameSession extends _NSObject {
    static alloc(): _GKGameSession;
    static new(): _GKGameSession;
    init(): _GKGameSession;
    /**
     * Create a new session with the given title and maximum number of connected players. (You may pass 0 to use the system limit of 16 players.)
     */
    static createSessionInContainer$withTitle$maxConnectedPlayers$completionHandler$(containerName: _NSString | null, title: _NSString, maxPlayers: number, completionHandler: ((session: _GKGameSession, error: _NSError) => void) | null): void;
    /** Load all sessions involving the current user. */
    static loadSessionsInContainer$completionHandler$(containerName: _NSString | null, completionHandler: ((sessions: _NSArray, error: _NSError) => void) | null): void;
    /** Load a specific session. */
    static loadSessionWithIdentifier$completionHandler$(identifier: _NSString, completionHandler: ((session: _GKGameSession, error: _NSError) => void) | null): void;
    /**
     * Remove a session. If called by the owner this deletes the session from the server.
     */
    static removeSessionWithIdentifier$completionHandler$(identifier: _NSString, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * @deprecated Use the ``GKLocalPlayer/register(_:)`` method of the ``GKLocalPlayer`` class instead.
     */
    static addEventListener$(listener: _NSObject): void;
    /**
     * @deprecated Use the ``GKLocalPlayer/unregisterListener(_:)`` or ``GKLocalPlayer/unregisterAllListeners()`` methods of ``GKLocalPlayer`` instead.
     */
    static removeEventListener$(listener: _NSObject): void;
    /** Get the URL needed to share this session. */
    getShareURLWithCompletionHandler$(completionHandler: ((url: _NSURL, error: _NSError) => void) | null): void;
    /** Load associated persistent data. */
    loadDataWithCompletionHandler$(completionHandler: ((data: _NSData, error: _NSError) => void) | null): void;
    /**
     * Save new/updated persistent data. Data size is limited to 512K. The session's lastModifiedDate and lastModifiedPlayer will be updated upon completion. If a version conflict is detected the handler will include the version currently on the server and an error. In this case the data has not been saved. To resolve the conflict a client would call this method again, presumably after merging data or giving the user a choice on how to resolve the conflict. (Note that when calling again it is possible to get a new conflict, if another device has since written a new version.)
     */
    saveData$completionHandler$(data: _NSData, completionHandler: ((conflictingData: _NSData, error: _NSError) => void) | null): void;
    /**
     * Set your connection state. May fail if you attempt to connect but the connected player limit has already been reached or there are network problems. The session's lastModifiedDate and lastModifiedPlayer will be updated upon completion.
     */
    setConnectionState$completionHandler$(state: GKConnectionState, completionHandler: ((error: _NSError) => void) | null): void;
    /** Get the players with the given connection state. */
    playersWithConnectionState$(state: GKConnectionState): _NSArray;
    /** Send data to all connected players. */
    sendData$withTransportType$completionHandler$(data: _NSData, transport: GKTransportType, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * Send a message to any players in the session. This uses an unreliable push mechanism. Message/data delivery is not guaranteed and may take some time to arrive. Receiving players may optionally have their application badged for this session.
     */
    sendMessageWithLocalizedFormatKey$arguments$data$toPlayers$badgePlayers$completionHandler$(key: _NSString, arguments_: _NSArray, data: _NSData | null, players: _NSArray, badgePlayers: boolean, completionHandler: ((error: _NSError) => void) | null): void;
    /** Clear application badge state for players for this session. */
    clearBadgeForPlayers$completionHandler$(players: _NSArray, completionHandler: ((error: _NSError) => void) | null): void;
    identifier(): _NSString;
    title(): _NSString;
    owner(): _GKCloudPlayer;
    players(): _NSArray;
    lastModifiedDate(): _NSDate;
    lastModifiedPlayer(): _GKCloudPlayer;
    maxNumberOfConnectedPlayers(): number;
    badgedPlayers(): _NSArray;
}
