import type { _NSCoding } from "./NSCoding.js";
import type { _NSConnection } from "./NSConnection.js";
import type { _NSCopying } from "./NSCopying.js";
import type { _NSDate } from "./NSDate.js";
import type { _NSMutableArray } from "./NSMutableArray.js";
import type { _NSObject } from "./NSObject.js";
import type { _NSPortDelegate } from "./NSPortDelegate.js";
import type { _NSRunLoop } from "./NSRunLoop.js";
import type { _NSString } from "./NSString.js";
export declare class _NSPort extends _NSObject {
    static alloc(): _NSPort;
    static new(): _NSPort;
    init(): _NSPort;
    /**
     * For backwards compatibility on Mach, +allocWithZone: returns an instance of the NSMachPort class when sent to the NSPort class. Otherwise, it returns an instance of a concrete subclass which can be used for messaging between threads or processes on the local machine.
     */
    static port(): _NSPort;
    invalidate(): void;
    setDelegate$(anObject: _NSPortDelegate | null): void;
    delegate(): _NSPortDelegate | null;
    /**
     * These two methods should be implemented by subclasses to setup monitoring of the port when added to a run loop, and stop monitoring if needed when removed; These methods should not be called directly!
     */
    scheduleInRunLoop$forMode$(runLoop: _NSRunLoop, mode: _NSString): void;
    removeFromRunLoop$forMode$(runLoop: _NSRunLoop, mode: _NSString): void;
    sendBeforeDate$components$from$reserved$(limitDate: _NSDate, components: _NSMutableArray | null, receivePort: _NSPort | null, headerSpaceReserved: number): boolean;
    sendBeforeDate$msgid$components$from$reserved$(limitDate: _NSDate, msgID: number, components: _NSMutableArray | null, receivePort: _NSPort | null, headerSpaceReserved: number): boolean;
    /**
     * The components array consists of a series of instances of some subclass of NSData, and instances of some subclass of NSPort; since one subclass of NSPort does not necessarily know how to transport an instance of another subclass of NSPort (or could do it even if it knew about the other subclass), all of the instances of NSPort in the components array and the 'receivePort' argument MUST be of the same subclass of NSPort that receives this message. If multiple DO transports are being used in the same program, this requires some care.
     * @deprecated Use NSXPCConnection instead
     */
    addConnection$toRunLoop$forMode$(conn: _NSConnection, runLoop: _NSRunLoop, mode: _NSString): void;
    /** @deprecated Use NSXPCConnection instead */
    removeConnection$fromRunLoop$forMode$(conn: _NSConnection, runLoop: _NSRunLoop, mode: _NSString): void;
    valid(): boolean;
    /** DO Transport API; subclassers should implement these methods default is 0 */
    reservedSpaceLength(): number;
}
export interface _NSPort extends _NSCopying, _NSCoding {
}
