using System; using AppKit; using Foundation; using IOBluetooth; using IOBluetoothUI; using ObjCRuntime; namespace IOBluetoothUI { /// /// An NSWindowController subclass to display a window to initiate pairing to other bluetooth devices. /// // @interface IOBluetoothDeviceSelectorController : NSWindowController [BaseType(typeof(NSWindowController), Name = "IOBluetoothDeviceSelectorController")] public interface DeviceSelectorController { // +(IOBluetoothDeviceSelectorController *)deviceSelector; /// /// Method call to instantiate a new IOBluetoothDeviceSelectorController object. /// /// Success - a new instance of the device selector Controller Failure - nil. [Static] [Export("deviceSelector")] DeviceSelectorController DeviceSelector { get; } // -(int)runModal; /// /// Runs the device selector panel in a modal session to allow the user to select a Bluetooth device. /// /// The modal. [Export("runModal")] int RunModal(); // -(IOReturn)beginSheetModalForWindow:(NSWindow *)sheetWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo; /// /// Runs the device selector panel as a sheet on the target window. /// /// The sheet modal for window. /// Sheet window. /// Modal delegate. /// Did end selector. /// Context info. [Export("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:")] unsafe int BeginSheetModalForWindow(NSWindow sheetWindow, NSObject modalDelegate, Selector didEndSelector, IntPtr contextInfo); // -(NSArray *)getResults; /// /// Returns the result of the user's selection. /// /// The results. [Export("getResults")] BluetoothDevice[] Results { get; } // -(void)setOptions:(IOBluetoothServiceBrowserControllerOptions)options; // -(IOBluetoothServiceBrowserControllerOptions)getOptions; /// /// Gets or sets the option bits that control the panel's behavior. /// /// The options. [Export("options")] ServiceBrowserControllerOptions Options { [Bind("getOptions")] get; set; } // -(void)setSearchAttributes:(const IOBluetoothDeviceSearchAttributes *)searchAttributes; //[Export("setSearchAttributes:")] //unsafe void SetSearchAttributes(IOBluetoothDeviceSearchAttributes* searchAttributes); // -(const IOBluetoothDeviceSearchAttributes *)getSearchAttributes; //[Export("getSearchAttributes")] //[Verify(MethodToProperty)] //unsafe IOBluetoothDeviceSearchAttributes* SearchAttributes { get; } // -(void)addAllowedUUID:(IOBluetoothSDPUUID *)allowedUUID; /// /// Adds a Uuid to the list of Uuids that are used to validate the user's selection. /// /// Allowed Uuid. [Export("addAllowedUUID:")] void AddAllowedUuid(SdpUuid allowedUuid); // -(void)addAllowedUUIDArray:(NSArray *)allowedUUIDArray; /// /// Adds an array of Uuids to the list of Uuids that are used to validate the user's selection. /// /// Allowed Uuid Array. [Export("addAllowedUUIDArray:")] void AddAllowedUuidArray(SdpUuid[] allowedUuidArray); // -(void)clearAllowedUUIDs; /// /// Resets the controller back to the default state where it will accept any device the user selects. /// [Export("clearAllowedUUIDs")] void ClearAllowedUuids(); // -(void)setTitle:(NSString *)windowTitle; // -(NSString *)getTitle; /// /// Gets or sets the title of the panel when not run as a sheet. /// /// The title. [Export("title")] string Title { [Bind("getTitle")] get; set; } // -(void)setHeader:(NSString *)headerText; // -(NSString *)getHeader; /// /// Gets or sets the header text that appears in the device selector panel. /// /// The header. [Export("header")] string Header { [Bind("getHeader")] get; set; } // -(void)setDescriptionText:(NSString *)descriptionText; // -(NSString *)getDescriptionText; /// /// Gets or sets the description text that appears in the device selector panel. /// /// The description text. [Export("descriptionText")] string DescriptionText { [Bind("getDescriptionText")] get; set; } // -(void)setPrompt:(NSString *)prompt; // -(NSString *)getPrompt; /// /// Gets or sets the title of the default/select button in the device selector panel. /// /// The prompt. [Export("prompt")] string Prompt { [Bind("getPrompt")] get; set; } // -(void)setCancel:(NSString *)prompt; // -(NSString *)getCancel; /// /// Gets or sets the title of the default/cancel button in the device selector panel. /// /// String that appears in the default/cancel button in the device selector panel. [Export("cancel")] string Cancel { [Bind("getCancel")] get; set; } } /// /// An NSWindowController subclass to display a window to initiate pairing to other bluetooth devices. /// // @interface IOBluetoothPairingController : NSWindowController [BaseType(typeof(NSWindowController), Name = "IOBluetoothPairingController")] public interface BluetoothPairingController { // +(IOBluetoothPairingController *)pairingController; [Static] [Export("pairingController")] BluetoothPairingController PairingController { get; } /// /// Runs the pairing panel in a modal session to allow the user to select a Bluetooth device. /// /// Returns kIOBluetoothUISuccess if a successful, validated device selection was made by the user and that device successfully paired. /// Returns kIOBluetoothUIUserCanceledErr if the user cancelled the panel. /// These return values are the same as NSRunStoppedResponse and NSRunAbortedResponse respectively. /// They are the standard values used in a modal session. // -(int)runModal; [Export("runModal")] int RunModal(); /// /// Returns an array of the devices that were paired. /// /// The results. // -(NSArray *)getResults; [Export("getResults")] BluetoothDevice[] Results { get; } // -(void)setOptions:(IOBluetoothServiceBrowserControllerOptions)options; // -(IOBluetoothServiceBrowserControllerOptions)getOptions; [Export("options")] ServiceBrowserControllerOptions Options { [Bind("getOptions")] get; set; } // -(void)setSearchAttributes:(const IOBluetoothDeviceSearchAttributes *)searchAttributes; //[Export("setSearchAttributes:")] //unsafe void SetSearchAttributes(IOBluetoothDeviceSearchAttributes* searchAttributes); // -(const IOBluetoothDeviceSearchAttributes *)getSearchAttributes; //[Export("getSearchAttributes")] //unsafe IOBluetoothDeviceSearchAttributes* SearchAttributes { get; } // -(void)addAllowedUUID:(IOBluetoothSDPUUID *)allowedUUID; [Export("addAllowedUUID:")] void AddAllowedUuid(SdpUuid allowedUuid); // -(void)addAllowedUUIDArray:(NSArray *)allowedUUIDArray; [Export("addAllowedUUIDArray:")] void AddAllowedUuidArray(SdpUuid[] allowedUuidArray); // -(void)clearAllowedUUIDs; [Export("clearAllowedUUIDs")] void ClearAllowedUuids(); /// /// Gets or sets the title of the device selector panel. /// /// The title. // -(NSString *)getTitle; // -(void)setTitle:(NSString *)windowTitle; [Export("title")] string Title { [Bind("getTitle")]get; set; } /// /// Gets or sets the description text that appears in the device selector panel. /// /// The description text. // -(NSString *)getDescriptionText; // -(void)setDescriptionText:(NSString *)descriptionText; [Export("descriptionText")] string DescriptionText { [Bind("getDescriptionText")] get; set; } /// /// Gets or sets the title of the default/select button in the device selector panel. /// /// The prompt. // -(NSString *)getPrompt; // -(void)setPrompt:(NSString *)prompt; [Export("prompt")] string Prompt { [Bind("getPrompt")] get; set; } } // @interface IOBluetoothServiceBrowserController : NSWindowController /// /// An NSWindowController subclass to display a window to search for and perform SDP queries on bluetooth devices within range. /// [BaseType(typeof(NSWindowController), Name = "IOBluetoothServiceBrowserController")] public interface ServiceBrowserController { // +(IOBluetoothServiceBrowserController *)serviceBrowserController:(IOBluetoothServiceBrowserControllerOptions)inOptions; [Static] [Export("serviceBrowserController:")] ServiceBrowserController CreateServiceBrowserController(ServiceBrowserControllerOptions options); // +(IOBluetoothServiceBrowserController *)withServiceBrowserControllerRef:(IOBluetoothServiceBrowserControllerRef)serviceBrowserControllerRef; //[Static] //[Export("withServiceBrowserControllerRef:")] //unsafe IOBluetoothServiceBrowserController WithServiceBrowserControllerRef(IOBluetoothServiceBrowserControllerRef* serviceBrowserControllerRef); // -(IOBluetoothServiceBrowserControllerRef)getServiceBrowserControllerRef; //[Export("getServiceBrowserControllerRef")] //[Verify(MethodToProperty)] //unsafe IOBluetoothServiceBrowserControllerRef* ServiceBrowserControllerRef { get; } // -(int)runModal; /// /// Runs the service browser panel in a modal session to allow the user to select a service on a Bluetooth device. /// /// Returns kIOBluetoothUISuccess if a successful, validated service selection was made by the user. /// Returns kIOBluetoothUIUserCanceledErr if the user cancelled the panel. /// These return values are the same as NSRunStoppedResponse and NSRunAbortedResponse respectively. /// They are the standard values used in a modal session. [Export("runModal")] nint RunModal(); // -(IOReturn)beginSheetModalForWindow:(NSWindow *)sheetWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo; /// /// Runs the service browser panel as a sheet on the target window. /// /// The sheet modal for window. /// NSWindow to attach the service browser panel to as a sheet. /// Delegate object that gets sent the didEndSelector when the sheet modal session is finished. /// Selector sent to the modalDelegate when the sheet modal session is finished. /// User-definied value passed to the modalDelegate in the didEndSelector. [Export("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:")] unsafe int BeginSheetModalForWindow(NSWindow sheetWindow, NSObject modalDelegate, Selector didEndSelector, IntPtr contextInfo); // -(NSArray *)getResults; /// /// Returns the result of the user's selection. /// /// The results. [Export("getResults")] SdpServiceRecord[] Results { get; } // -(void)setOptions:(IOBluetoothServiceBrowserControllerOptions)inOptions; // -(IOBluetoothServiceBrowserControllerOptions)getOptions; /// /// Gets or sets the option bits that control the panel's behavior. /// /// The options. [Export("options")] ServiceBrowserControllerOptions Options { [Bind("getOptions")] get; set; } //// -(void)setSearchAttributes:(const IOBluetoothDeviceSearchAttributes *)searchAttributes; //[Export("setSearchAttributes:")] //unsafe void SetSearchAttributes(IOBluetoothDeviceSearchAttributes* searchAttributes); //// -(const IOBluetoothDeviceSearchAttributes *)getSearchAttributes; //[Export("getSearchAttributes")] //IOBluetoothDeviceSearchAttributes SearchAttributes { [Bind("getSearchAttributes")]get; } // -(void)addAllowedUUID:(IOBluetoothSDPUUID *)allowedUUID; /// /// Adds a Uuid to the list of Uuids that are used to validate the user's selection. /// /// Allowed Uuid. [Export("addAllowedUUID:")] void AddAllowedUuid(SdpUuid allowedUuid); // -(void)addAllowedUUIDArray:(NSArray *)allowedUUIDArray; /// /// Adds an array of Uuids to the list of Uuids that are used to validate the user's selection. /// /// Allowed Uuid Array. [Export("addAllowedUUIDArray:")] void AddAllowedUuidArray(SdpUuid[] allowedUuidArray); // -(void)clearAllowedUUIDs; /// /// Resets the controller back to the default state where it will accept any device the user selects. /// [Export("clearAllowedUUIDs")] void ClearAllowedUuids(); // -(void)setTitle:(NSString *)windowTitle; // -(NSString *)getTitle; /// /// Gets or sets the title of the panel when not run as a sheet. /// /// The title. [Export("title")] string Title { [Bind("getTitle")] get; set; } // -(void)setDescriptionText:(NSString *)descriptionText; // -(NSString *)getDescriptionText; /// /// Gets or sets the description text that appears in the device selector panel. /// /// The description text. [Export("descriptionText")] string DescriptionText { [Bind("getDescriptionText")] get; set; } // -(void)setPrompt:(NSString *)prompt; // -(NSString *)getPrompt; /// /// Gets or sets the title of the default/select button in the device selector panel. /// /// The prompt. [Export("prompt")] string Prompt { [Bind("getPrompt")] get; set; } } // @interface IOBluetoothObjectPushUIController : NSWindowController [BaseType(typeof(NSWindowController), Name = "IOBluetoothObjectPushUIController")] public interface ObjectPushUIController { // -(IOBluetoothObjectPushUIController *)initObjectPushWithBluetoothDevice:(IOBluetoothDevice *)inDevice withFiles:(NSArray *)inFiles delegate:(id)inDelegate; [Export("initObjectPushWithBluetoothDevice:withFiles:delegate:")] IntPtr Constructor(BluetoothDevice device, NSString[] files, NSObject inDelegate); // -(void)runModal; [Export("runModal")] void RunModal(); // -(void)runPanel; [Export("runPanel")] void RunPanel(); // -(IOReturn)beginSheetModalForWindow:(NSWindow *)sheetWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo; [Export("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:")] unsafe int BeginSheetModalForWindow(NSWindow sheetWindow, NSObject modalDelegate, Selector didEndSelector, IntPtr contextInfo); // -(void)stop; [Export("stop")] void Stop(); // -(void)setTitle:(NSString *)windowTitle; // -(NSString *)getTitle; [Export("title")] string Title { [Bind("getTitle")] get; set; } // -(void)setIconImage:(NSImage *)image; [Export("setIconImage:")] void SetIconImage(NSImage image); // -(IOBluetoothDevice *)getDevice; [Export("getDevice")] BluetoothDevice Device { get; } // -(BOOL)isTransferInProgress; [Export("isTransferInProgress")] bool IsTransferInProgress { get; } } // @interface IOBluetoothPasskeyDisplay : NSView [BaseType(typeof(NSView), Name = "IOBluetoothPasskeyDisplay")] interface PasskeyDisplay { // @property (assign) BOOL usePasskeyNotificaitons; [Export("usePasskeyNotificaitons")] bool UsePasskeyNotifications { get; set; } // @property (assign) BOOL isIncomingRequest; [Export("isIncomingRequest")] bool IsIncomingRequest { get; set; } // @property (copy) NSString * passkey; [Export("passkey")] string Passkey { get; set; } // @property (retain) NSImage * returnImage; [Export("returnImage", ArgumentSemantic.Retain)] NSImage ReturnImage { get; set; } // @property (retain) NSImage * returnHighlightImage; [Export("returnHighlightImage", ArgumentSemantic.Retain)] NSImage ReturnHighlightImage { get; set; } // @property (assign) NSView * centeredView __attribute__((iboutlet)); [Export("centeredView", ArgumentSemantic.Assign)] NSView CenteredView { get; set; } // @property (assign) NSLayoutConstraint * backgroundImageConstraint __attribute__((iboutlet)); [Export("backgroundImageConstraint", ArgumentSemantic.Assign)] NSLayoutConstraint BackgroundImageConstraint { get; set; } // +(IOBluetoothPasskeyDisplay *)sharedDisplayView; [Static] [Export("sharedDisplayView")] PasskeyDisplay SharedDisplayView { get; } // -(void)setPasskey:(NSString *)inString forDevice:(IOBluetoothDevice *)device usingSSP:(BOOL)isSSP; [Export("setPasskey:forDevice:usingSSP:")] void SetPasskey(string passkey, BluetoothDevice device, bool isSSP); // -(void)advancePasskeyIndicator; [Export("advancePasskeyIndicator")] void AdvancePasskeyIndicator(); // -(void)retreatPasskeyIndicator; [Export("retreatPasskeyIndicator")] void RetreatPasskeyIndicator(); // -(void)resetPasskeyIndicator; [Export("resetPasskeyIndicator")] void ResetPasskeyIndicator(); } // @interface IOBluetoothAccessibilityIgnoredTextFieldCell : NSTextFieldCell [Internal] [BaseType(typeof(NSTextFieldCell))] interface IOBluetoothAccessibilityIgnoredTextFieldCell { } // @interface IOBluetoothAccessibilityIgnoredImageCell : NSImageCell [Internal] [BaseType(typeof(NSImageCell))] interface IOBluetoothAccessibilityIgnoredImageCell { } }