API Notes: DiskArbitration framework

Introduction

An introduction to PyObjC describes the general method for translating Objective-C calls into Python calls, including the handling of pass-by-reference arguments and buffers.

This document describes where the PyObjC bindings for this framework are different from the general rule, such as mentioning APIs that are not supported or where the interface is different than expected.

The full API is described in Apple’s documentation, both the C and Objective-C APIs are available (but see the API Notes below).

These bindings are accessed through the DiskArbitration package (that is, import DiskArbitration).

API Notes

The entire framework is available from Python.

DADiskCreateFromIOMedia

This function cannot be called from Python because IOKit is not yet wrapped.

DADiskCopyIOMedia

This function cannot be called from Python because IOKit is not yet wrapped.

DASessionSetDispatchQueue

This function cannot be called from Python because dispatch queues aren’t avaible through PyObjC at the moment.

DAUnregisterCallback and DAUnregisterApprovalCallback

The callback argument should be the result of calling objc.callbackPointer on the function that was used to register a callback.