Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC
ADC Home > Reference Library > Reference > Hardware & Drivers > Bluetooth > Bluetooth User Interface Framework Reference

 


IOBluetoothObjectPushUIController

Inherits from:
Declared In:

Overview

An NSWindowController subclass that supports the creation of an IOBluetoothObjectPushUIController object.



Methods

-beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:
Runs the transfer UI as a sheet on the target window.
-getDevice
Gets the object representing the remote target device in the transfer.
-getTitle
Returns the title of the transfer panel (i.e. what was set in -setTitle:).
-initObjectPushWithBluetoothDevice: withFiles: andEventDelegate:
Creates and returns a new IOBluetoothObjectPush object
-initObjectPushWithBluetoothDevice:withFiles:delegate:
Creates and returns a new IOBluetoothObjectPush object
-isTransferInProgress
Gets state of the transfer
-runModal
Runs the transfer UI panel in a modal session
-runPanel
Runs the transfer UI as a panel with no modal session
-setIconImage:
Manually sets the icon used in the panel.
-setTitle:
Sets the title of the panel when not run as a sheet.
-stop
Stops the transfer UI

beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:


Runs the transfer UI as a sheet on the target window.

- (IOReturn) beginSheetModalForWindow: (NSWindow *) sheetWindow modalDelegate: (id) modalDelegate didEndSelector: (SEL) didEndSelector contextInfo: (void *) contextInfo; 
Parameters
sheetWindow
NSWindow to attach the device selector panel to as a sheet.
modalDelegate
Delegate object that gets sent the didEndSelector when the sheet modal session is finished.
didEndSelector
Selector sent to the modalDelegate when the sheet modal session is finished.
contextInfo
User-definied value passed to the modalDelegate in the didEndSelector.
Return Value

Returns kIOReturnSuccess if the sheet modal session was started.

Discussion

This function works the same way as -[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]. The didEndSelector has a similar prototype as in NSApplication except that the first argument is the IOBluetoothDeviceSelectorController object instead of the window:

-(void)sheetDidEnd:(IOBluetoothDeviceSelectorController *)controller returnCode:(int)returnCode contextInfo:(void *)contextInfo. The returnCode parameter will either be kIOBluetoothUISuccess or kIOBluetoothUIUserCancelledErr as described in -runModal.


getDevice


Gets the object representing the remote target device in the transfer.

- (IOBluetoothDevice*) getDevice; 
Return Value

The remote device of the transfer.


getTitle


Returns the title of the transfer panel (i.e. what was set in -setTitle:).

- (NSString *) getTitle; 
Return Value

Returns the title of the transfer panel.


initObjectPushWithBluetoothDevice: withFiles: andEventDelegate:


Creates and returns a new IOBluetoothObjectPush object

See Also:
initObjectPushWithBluetoothDevice:withFiles:delegate:
- (IOBluetoothObjectPushUIController*) 
        initObjectPushWithBluetoothDevice: (IOBluetoothDevice*) inDevice withFiles: (NSArray *) inFiles delegate: (id) inDelegate; 
Parameters
inDevice
The remote device to send the files to
inFiles
An array of file paths to send
inDelegate
A delegate object that implements the single method above. If no delegate is specified this object will release itself when the transaction is complete.
Return Value

An IOBluetoothObjectPushUIController object on success, nil on fail.

Discussion

The event delegate should implement a single delegate method:

- (void) objectPushComplete: (IOBluetoothObjectPushUIController*) inPusher

The method will be called when the transaction is complete and should be used to release the push object by the delegate. If no delegate is set the object will release itself when the transfer is finished.


initObjectPushWithBluetoothDevice:withFiles:delegate:


Creates and returns a new IOBluetoothObjectPush object

See Also:
initObjectPushWithBluetoothDevice:
- (IOBluetoothObjectPushUIController*) 
        initObjectPushWithBluetoothDevice: (IOBluetoothDevice*) inDevice withFiles: (NSArray *) inFiles delegate: (id) inDelegate; 
Parameters
inDevice
The remote device to send the files to
inFiles
An array of file paths to send
inDelegate
A delegate object that implements the single method above. If no delegate is specified this object will release itself when the transaction is complete.
Discussion

The event delegate should implement a single delegate method:

- (void) objectPushComplete: (IOBluetoothObjectPushUIController*) inPusher

The method will be called when the transaction is complete and should be used to release the push object by the delegate. If no delegate is set the object will release itself when the transfer is finished.


isTransferInProgress


Gets state of the transfer

- (BOOL) isTransferInProgress; 
Return Value

The state of the transfer


runModal


Runs the transfer UI panel in a modal session

- (void) runModal; 
Return Value

The call will stall in this method until the modal session is complete.

Discussion

Returns when the modal session has ended. This object will call back over the delegate method (above) when the transfer is complete. Users should release the object then. If no delegate is set the object will release itself.


runPanel


Runs the transfer UI as a panel with no modal session

- (void) runPanel; 
Return Value

The method will return immediately.

Discussion

Returns immediately. The object will callback over the delegate method (above) when the transfer is completed. If no delegate is set the object will release itself.


setIconImage:


Manually sets the icon used in the panel.

- (void) setIconImage:(NSImage*)image; 
Parameters
image
Image to use as the icon.
Discussion

The panel icon should be set to the icon of the calling application. If not set, the panel will try to load up the correct icon for the target device, and will default to the icon of the running application on fail.


setTitle:


Sets the title of the panel when not run as a sheet.

- (void) setTitle: (NSString *) windowTitle; 
Parameters
windowTitle
Title of the device selector panel.
Discussion

The panel title should be localized for best user experience.


stop


Stops the transfer UI

- (void) stop; 
Return Value

The method will return immediately.

Discussion

Returns immediately. The object will callback over the delegate method (above) when the transfer is completed, or will release itself if no delegate is set.




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11