Top Description Inners Fields Methods
com.sun.jna.platform.mac

public Interface DiskArbitration

extends Library
Imports
com.sun.jna.Library, .Native, com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef, .CoreFoundation.CFDictionaryRef, .CoreFoundation.CFTypeRef, .IOKit.IOObject

Disk Arbitration is a low-level framework based on Core Foundation. The Disk Arbitration framework provides the ability to get various pieces of information about a volume.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DiskArbitration.DADiskRef

Type of a reference to DADisk instances.

public static class
DiskArbitration.DASessionRef

Type of a reference to DASession instances.

Field Summary

Modifier and TypeField and Description
public static final DiskArbitration
Inherited from com.sun.jna.Library:
OPTION_ALLOW_OBJECTSOPTION_CALLING_CONVENTIONOPTION_CLASSLOADEROPTION_FUNCTION_MAPPEROPTION_INVOCATION_MAPPEROPTION_OPEN_FLAGSOPTION_STRING_ENCODINGOPTION_STRUCTURE_ALIGNMENTOPTION_SYMBOL_PROVIDEROPTION_TYPE_MAPPER

Method Summary

Modifier and TypeMethod and Description
public CoreFoundation.CFDictionaryRef

Returns:

The disk's Disk Arbitration description.
DADiskCopyDescription
(DiskArbitration.DADiskRef
The DADisk for which to obtain the Disk Arbitration description.
disk
)

Obtains the Disk Arbitration description of the specified disk.

public DiskArbitration.DADiskRef

Returns:

A reference to a new DADisk.
DADiskCreateFromBSDName
(CoreFoundation.CFAllocatorRef
The allocator object to be used to allocate memory.
alloc
,
DiskArbitration.DASessionRef
The DASession in which to contact Disk Arbitration.
session
,
String
the BSD device name.
diskName
)

Creates a new disk object.

public DiskArbitration.DADiskRef

Returns:

A reference to a new DADisk.
DADiskCreateFromIOMedia
(CoreFoundation.CFAllocatorRef
The allocator object to be used to allocate memory.
allocator
,
DiskArbitration.DASessionRef
The DASession in which to contact Disk Arbitration.
session
,
IOKit.IOObject
The I/O Kit media object.
media
)

Creates a new disk object.

public String

Returns:

The disk's BSD device name.
DADiskGetBSDName
(DiskArbitration.DADiskRef
The DADisk for which to obtain the BSD device name.
disk
)

Obtains the BSD device name for the specified disk.

public DiskArbitration.DASessionRef

Returns:

A reference to a new DASession.
DASessionCreate
(CoreFoundation.CFAllocatorRef
The allocator object to be used to allocate memory.
alloc
)

Creates a new session.

Field Detail

INSTANCEback to summary
public static final DiskArbitration INSTANCE

Method Detail

DADiskCopyDescriptionback to summary
public CoreFoundation.CFDictionaryRef DADiskCopyDescription(DiskArbitration.DADiskRef disk)

Obtains the Disk Arbitration description of the specified disk. This function will contact Disk Arbitration to acquire the latest description of the specified disk, unless this function is called on a disk object passed within the context of a registered callback, in which case the description is current as of that callback event.

The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CoreFoundation#CFRelease.

Parameters
disk:DiskArbitration.DADiskRef

The DADisk for which to obtain the Disk Arbitration description.

Returns:CoreFoundation.CFDictionaryRef

The disk's Disk Arbitration description.

DADiskCreateFromBSDNameback to summary
public DiskArbitration.DADiskRef DADiskCreateFromBSDName(CoreFoundation.CFAllocatorRef alloc, DiskArbitration.DASessionRef session, String diskName)

Creates a new disk object. The caller of this function receives a reference to the returned object.

The caller also implicitly retains the object and is responsible for releasing it with CoreFoundation#CFRelease.

Parameters
alloc:CoreFoundation.CFAllocatorRef

The allocator object to be used to allocate memory.

session:DiskArbitration.DASessionRef

The DASession in which to contact Disk Arbitration.

diskName:String

the BSD device name.

Returns:DiskArbitration.DADiskRef

A reference to a new DADisk.

DADiskCreateFromIOMediaback to summary
public DiskArbitration.DADiskRef DADiskCreateFromIOMedia(CoreFoundation.CFAllocatorRef allocator, DiskArbitration.DASessionRef session, IOKit.IOObject media)

Creates a new disk object. The caller of this function receives a reference to the returned object.

The caller also implicitly retains the object and is responsible for releasing it with CoreFoundation#CFRelease.

Parameters
allocator:CoreFoundation.CFAllocatorRef

The allocator object to be used to allocate memory.

session:DiskArbitration.DASessionRef

The DASession in which to contact Disk Arbitration.

media:IOKit.IOObject

The I/O Kit media object.

Returns:DiskArbitration.DADiskRef

A reference to a new DADisk.

DADiskGetBSDNameback to summary
public String DADiskGetBSDName(DiskArbitration.DADiskRef disk)

Obtains the BSD device name for the specified disk.

Parameters
disk:DiskArbitration.DADiskRef

The DADisk for which to obtain the BSD device name.

Returns:String

The disk's BSD device name.

DASessionCreateback to summary
public DiskArbitration.DASessionRef DASessionCreate(CoreFoundation.CFAllocatorRef alloc)

Creates a new session. The caller of this function receives a reference to the returned object.

The caller also implicitly retains the object and is responsible for releasing it with CoreFoundation#CFRelease.

Parameters
alloc:CoreFoundation.CFAllocatorRef

The allocator object to be used to allocate memory.

Returns:DiskArbitration.DASessionRef

A reference to a new DASession.

com.sun.jna.platform.mac back to summary

public Class DiskArbitration.DADiskRef

extends CFTypeRef
Class Inheritance

Type of a reference to DADisk instances.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.jna.platform.mac.CoreFoundation.CFTypeRef:
getTypeIDisTypeIDreleaseretain

Constructor Detail

DADiskRefback to summary
public DADiskRef()
com.sun.jna.platform.mac back to summary

public Class DiskArbitration.DASessionRef

extends CFTypeRef
Class Inheritance

Type of a reference to DASession instances.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.jna.platform.mac.CoreFoundation.CFTypeRef:
getTypeIDisTypeIDreleaseretain

Constructor Detail

DASessionRefback to summary
public DASessionRef()