com.sun.jna.platform.mac

## Interface DiskArbitration

- All Superinterfaces:
    Library

      public interface DiskArbitration
      extends Library

  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 Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `DiskArbitration.DADiskRef` Type of a reference to `DADisk` instances.
    `static class` | `DiskArbitration.DASessionRef` Type of a reference to `DASession` instances.

    - ### Nested classes/interfaces inherited from interface com.sun.jna.Library

      `Library.Handler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DiskArbitration` | `INSTANCE`

    - ### Fields inherited from interface com.sun.jna.Library

      `OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `CoreFoundation.CFDictionaryRef` | `DADiskCopyDescription(DiskArbitration.DADiskRef disk)` Obtains the Disk Arbitration description of the specified disk.
    `DiskArbitration.DADiskRef` | `DADiskCreateFromBSDName(CoreFoundation.CFAllocatorRef alloc, DiskArbitration.DASessionRef session, java.lang.String diskName)` Creates a new disk object.
    `DiskArbitration.DADiskRef` | `DADiskCreateFromIOMedia(CoreFoundation.CFAllocatorRef allocator, DiskArbitration.DASessionRef session, IOKit.IOObject media)` Creates a new disk object.
    `java.lang.String` | `DADiskGetBSDName(DiskArbitration.DADiskRef disk)` Obtains the BSD device name for the specified disk.
    `DiskArbitration.DASessionRef` | `DASessionCreate(CoreFoundation.CFAllocatorRef alloc)` Creates a new session.

- - ### Field Detail

    - #### INSTANCE

          static final DiskArbitration INSTANCE

  - ### Method Detail

    - #### DASessionCreate

          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(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)`.

      Parameters:
        `alloc` - The allocator object to be used to allocate memory.
      Returns:
        A reference to a new `DASession`.

    - #### DADiskCreateFromBSDName

          DiskArbitration.DADiskRef DADiskCreateFromBSDName(CoreFoundation.CFAllocatorRef alloc,
                                                            DiskArbitration.DASessionRef session,
                                                            java.lang.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(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)`.

      Parameters:
        `alloc` - The allocator object to be used to allocate memory.
        `session` - The `DASession` in which to contact Disk Arbitration.
        `diskName` - the BSD device name.
      Returns:
        A reference to a new `DADisk`.

    - #### DADiskCreateFromIOMedia

          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(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)`.

      Parameters:
        `allocator` - The allocator object to be used to allocate memory.
        `session` - The `DASession` in which to contact Disk Arbitration.
        `media` - The I/O Kit media object.
      Returns:
        A reference to a new `DADisk`.

    - #### DADiskCopyDescription

          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(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef)`.

      Parameters:
        `disk` - The `DADisk` for which to obtain the Disk Arbitration description.
      Returns:
        The disk's Disk Arbitration description.

    - #### DADiskGetBSDName

          java.lang.String DADiskGetBSDName(DiskArbitration.DADiskRef disk)

      Obtains the BSD device name for the specified disk.
      Parameters:
        `disk` - The `DADisk` for which to obtain the BSD device name.
      Returns:
        The disk's BSD device name.

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.