import type { _NSObject } from "./NSObject.js";
import type { _NSString } from "./NSString.js";
import type { _NSXPCListenerDelegate } from "./NSXPCListenerDelegate.js";
import type { _NSXPCListenerEndpoint } from "./NSXPCListenerEndpoint.js";
export declare class _NSXPCListener extends _NSObject {
    static alloc(): _NSXPCListener;
    static new(): _NSXPCListener;
    init(): _NSXPCListener;
    /**
     * If your listener is an XPCService (that is, in the XPCServices folder of an application or framework), then use this method to get the shared, singleton NSXPCListener object that will await new connections. When the resume method is called on this listener, it will not return. Instead it hands over control to the object and allows it to service the listener as appropriate. This makes it ideal for use in your main() function. For more info on XPCServices, please refer to the developer documentation.
     */
    static serviceListener(): _NSXPCListener;
    /**
     * Create an anonymous listener connection. Other processes may connect to this listener by passing this listener object's endpoint to NSXPCConnection's -initWithListenerEndpoint: method.
     */
    static anonymousListener(): _NSXPCListener;
    /**
     * Use this if listening on name advertised in a launchd.plist For example, an agent with a launchd.plist in ~/Library/LaunchAgents, or a daemon with a launchd.plist in /Library/LaunchDaemons.
     */
    initWithMachServiceName$(name: _NSString): _NSXPCListener;
    /**
     * All listeners start suspended and must be resumed before they will process incoming requests. If called on the serviceListener, this method will never return. Call it as the last step inside your main function in your XPC service after setting up desired initial state and the listener itself. If called on any other NSXPCListener, the connection is resumed and the method returns immediately. For new code, calling `-activate` is preferred for the initial activation of the listener.
     */
    resume(): void;
    /**
     * Suspend the listener. Suspends must be balanced with resumes before the listener may be invalidated.
     */
    suspend(): void;
    /**
     * Activates the listener. Listeners start in an inactive state. You must call `-activate` on a listener before it will send or receive any messages. Calling `-activate` on an active listener has no effect. For backward compatibility reasons, `-resume` on an inactive and otherwise not suspended NSXPCListener has the same effect as calling `-activate`. For new code, using `-activate` is preferred.
     */
    activate(): void;
    /**
     * Invalidate the listener. No more connections will be created. Once a listener is invalidated it may not be resumed or suspended.
     */
    invalidate(): void;
    /**
     * Sets the code signing requirement for new connections. If the requirement is malformed, an exception is thrown. If new peer connections do not match the requirement, the incoming connection is automatically rejected before consulting the delegate. This method will only work on `anonymousListener` or `initWithMachServiceName` listener instances. Use on other types of listeners will result in an assertion failure. See https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html for more information on the format.
     */
    setConnectionCodeSigningRequirement$(requirement: _NSString): void;
    /**
     * The delegate for the connection listener. If no delegate is set, all new connections will be rejected. See the protocol for more information on how to implement it.
     */
    delegate(): _NSXPCListenerDelegate | null;
    setDelegate$(value: _NSXPCListenerDelegate | null): void;
    /**
     * Get an endpoint object which may be sent over an existing connection. This allows the receiver of the endpoint to create a new connection to this NSXPCListener. The NSXPCListenerEndpoint uniquely names this listener object across connections.
     */
    endpoint(): _NSXPCListenerEndpoint;
}
