import type { _CBATTRequest } from "./CBATTRequest.js";
import type { _CBCentral } from "./CBCentral.js";
import type { _CBCharacteristic } from "./CBCharacteristic.js";
import type { _CBL2CAPChannel } from "./CBL2CAPChannel.js";
import type { _CBPeripheralManager } from "./CBPeripheralManager.js";
import type { _CBService } from "./CBService.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSError } from "../Foundation/NSError.js";
export interface _CBPeripheralManagerDelegate {
    /**
     * @method peripheralManagerDidUpdateState: @param peripheral The peripheral manager whose state has changed. @discussion Invoked whenever the peripheral manager's state has been updated. Commands should only be issued when the state is <code>CBPeripheralManagerStatePoweredOn</code>. A state below <code>CBPeripheralManagerStatePoweredOn</code> implies that advertisement has paused and any connected centrals have been disconnected. If the state moves below <code>CBPeripheralManagerStatePoweredOff</code>, advertisement is stopped and must be explicitly restarted, and the local database is cleared and all services must be re-added. @see state
     */
    peripheralManagerDidUpdateState$?(peripheral: _CBPeripheralManager): void;
    /**
     * @method peripheralManager:willRestoreState: @param peripheral The peripheral manager providing this information. @param dict A dictionary containing information about <i>peripheral</i> that was preserved by the system at the time the app was terminated. @discussion For apps that opt-in to state preservation and restoration, this is the first method invoked when your app is relaunched into the background to complete some Bluetooth-related task. Use this method to synchronize your app's state with the state of the Bluetooth system. @seealso CBPeripheralManagerRestoredStateServicesKey; @seealso CBPeripheralManagerRestoredStateAdvertisementDataKey;
     */
    peripheralManager$willRestoreState$?(peripheral: _CBPeripheralManager, dict: _NSDictionary): void;
    /**
     * @method peripheralManagerDidStartAdvertising:error: @param peripheral The peripheral manager providing this information. @param error If an error occurred, the cause of the failure. @discussion This method returns the result of a @link startAdvertising: @/link call. If advertisement could not be started, the cause will be detailed in the <i>error</i> parameter.
     */
    peripheralManagerDidStartAdvertising$error$?(peripheral: _CBPeripheralManager, error: _NSError | null): void;
    /**
     * @method peripheralManager:didAddService:error: @param peripheral The peripheral manager providing this information. @param service The service that was added to the local database. @param error If an error occurred, the cause of the failure. @discussion This method returns the result of an @link addService: @/link call. If the service could not be published to the local database, the cause will be detailed in the <i>error</i> parameter.
     */
    peripheralManager$didAddService$error$?(peripheral: _CBPeripheralManager, service: _CBService, error: _NSError | null): void;
    /**
     * @method peripheralManager:central:didSubscribeToCharacteristic: @param peripheral The peripheral manager providing this update. @param central The central that issued the command. @param characteristic The characteristic on which notifications or indications were enabled. @discussion This method is invoked when a central configures <i>characteristic</i> to notify or indicate. It should be used as a cue to start sending updates as the characteristic value changes.
     */
    peripheralManager$central$didSubscribeToCharacteristic$?(peripheral: _CBPeripheralManager, central: _CBCentral, characteristic: _CBCharacteristic): void;
    /**
     * @method peripheralManager:central:didUnsubscribeFromCharacteristic: @param peripheral The peripheral manager providing this update. @param central The central that issued the command. @param characteristic The characteristic on which notifications or indications were disabled. @discussion This method is invoked when a central removes notifications/indications from <i>characteristic</i>.
     */
    peripheralManager$central$didUnsubscribeFromCharacteristic$?(peripheral: _CBPeripheralManager, central: _CBCentral, characteristic: _CBCharacteristic): void;
    /**
     * @method peripheralManager:didReceiveReadRequest: @param peripheral The peripheral manager requesting this information. @param request A <code>CBATTRequest</code> object. @discussion This method is invoked when <i>peripheral</i> receives an ATT request for a characteristic with a dynamic value. For every invocation of this method, @link respondToRequest:withResult: @/link must be called. @see CBATTRequest
     */
    peripheralManager$didReceiveReadRequest$?(peripheral: _CBPeripheralManager, request: _CBATTRequest): void;
    /**
     * @method peripheralManager:didReceiveWriteRequests: @param peripheral The peripheral manager requesting this information. @param requests A list of one or more <code>CBATTRequest</code> objects. @discussion This method is invoked when <i>peripheral</i> receives an ATT request or command for one or more characteristics with a dynamic value. For every invocation of this method, @link respondToRequest:withResult: @/link should be called exactly once. If <i>requests</i> contains multiple requests, they must be treated as an atomic unit. If the execution of one of the requests would cause a failure, the request and error reason should be provided to <code>respondToRequest:withResult:</code> and none of the requests should be executed. @see CBATTRequest
     */
    peripheralManager$didReceiveWriteRequests$?(peripheral: _CBPeripheralManager, requests: _NSArray): void;
    /**
     * @method peripheralManagerIsReadyToUpdateSubscribers: @param peripheral The peripheral manager providing this update. @discussion This method is invoked after a failed call to @link updateValue:forCharacteristic:onSubscribedCentrals: @/link, when <i>peripheral</i> is again ready to send characteristic value updates.
     */
    peripheralManagerIsReadyToUpdateSubscribers$?(peripheral: _CBPeripheralManager): void;
    /**
     * @method peripheralManager:didPublishL2CAPChannel:error: @param peripheral The peripheral manager requesting this information. @param PSM The PSM of the channel that was published. @param error If an error occurred, the cause of the failure. @discussion This method is the response to a @link publishL2CAPChannel: @/link call. The PSM will contain the PSM that was assigned for the published channel
     */
    peripheralManager$didPublishL2CAPChannel$error$?(peripheral: _CBPeripheralManager, PSM: number, error: _NSError | null): void;
    /**
     * @method peripheralManager:didUnublishL2CAPChannel:error: @param peripheral The peripheral manager requesting this information. @param PSM The PSM of the channel that was published. @param error If an error occurred, the cause of the failure. @discussion This method is the response to a @link unpublishL2CAPChannel: @/link call.
     */
    peripheralManager$didUnpublishL2CAPChannel$error$?(peripheral: _CBPeripheralManager, PSM: number, error: _NSError | null): void;
    /**
     * @method peripheralManager:didOpenL2CAPChannel:error: @param peripheral The peripheral manager requesting this information. @param channel A <code>CBL2CAPChannel</code> object. @param error If an error occurred, the cause of the failure. @discussion This method returns the result of establishing an incoming L2CAP channel , following publishing a channel using @link publishL2CAPChannel: @link call.
     */
    peripheralManager$didOpenL2CAPChannel$error$?(peripheral: _CBPeripheralManager, channel: _CBL2CAPChannel | null, error: _NSError | null): void;
}
