Skip to main content

ICCameraDevice

Trait ICCameraDevice 

Source
pub trait ICCameraDevice: Sized {
Show 21 methods // Required methods unsafe fn batteryLevelAvailable(self) -> BOOL; unsafe fn batteryLevel(self) -> NSUInteger; unsafe fn contentCatalogPercentCompleted(self) -> NSUInteger; unsafe fn contents(self) -> id; unsafe fn mediaFiles(self) -> id; unsafe fn timeOffset(self) -> NSTimeInterval; unsafe fn isAccessRestrictedAppleDevice(self) -> BOOL; unsafe fn mountPoint(self) -> id; unsafe fn tetheredCaptureEnabled(self) -> BOOL; unsafe fn filesOfType(self, fileUTType: id) -> id; unsafe fn requestSyncClock(self); unsafe fn requestEnableTethering(self); unsafe fn requestDisableTethering(self); unsafe fn requestTakePicture(self); unsafe fn requestDeleteFiles(self, files: id); unsafe fn cancelDelete(self); unsafe fn requestDownloadFile( self, file: id, options: id, downloadDelegate: id, didDownloadSelector: id, contextInfo: id, ); unsafe fn cancelDownload(self); unsafe fn requestUploadFile( self, fileURL: id, options: id, uploadDelegate: id, didUploadSelector: id, contextInfo: id, ); unsafe fn requestReadDataFromFile( self, file: id, atOffset: off_t, length: off_t, readDelegate: id, didReadDataSelector: id, contextInfo: id, ); unsafe fn requestSendPTPCommand( self, command: id, outData: id, sendCommandDelegate: id, didSendCommandSelector: id, contextInfo: id, );
}

Required Methods§

Source

unsafe fn batteryLevelAvailable(self) -> BOOL

Indicates if the device has reported battery charge level.

Source

unsafe fn batteryLevel(self) -> NSUInteger

Indicates the battery charge level. Its value ranges from 0 to 100.

Source

unsafe fn contentCatalogPercentCompleted(self) -> NSUInteger

Indicates the percentage of content cataloging completed on the device. Its value ranges from 0 to 100.

Source

unsafe fn contents(self) -> id

Contents of the camera. The structure of the elements in this array will reflect the folder structure of the storage reported by the camera. Each item in this array will correspond to a storage on the camera.

Source

unsafe fn mediaFiles(self) -> id

The property mediaFiles represents all image, movie and audio files on the camera. These files are returned as a single array without regard to the folder hierarchy used to store these files on the camera.

Source

unsafe fn timeOffset(self) -> NSTimeInterval

Indicates the time offset, in seconds, between the camera’s clock and the computer’s clock. This value is positive if the camera’s clock is ahead of the computer’s clock. This property should be ignored if the camera’s capabilities property does not contain ICCameraDeviceCanSyncClock.

Source

unsafe fn isAccessRestrictedAppleDevice(self) -> BOOL

Set to YES if the device is made by Apple and is pass-coded locked and connected to an untrusted host.

Source

unsafe fn mountPoint(self) -> id

Filesystem mount point for a device with transportType of ICTransportTypeMassStorage. This will be NULL for all other devices.

Source

unsafe fn tetheredCaptureEnabled(self) -> BOOL

This property is set to YES when tethered capture is enabled on the device.

Source

unsafe fn filesOfType(self, fileUTType: id) -> id

This method returns an array of files on the camera of type fileType.

Source

unsafe fn requestSyncClock(self)

Synchronize camera’s clock with the computer’s clock. You should send this request only if the camera has the ‘ICCameraDeviceCanSyncClock’ capability.

Source

unsafe fn requestEnableTethering(self)

Send this message to enable tethered capture on the camera device if the camera has the ‘ICCameraDeviceCanTakePicture’ capability.

Source

unsafe fn requestDisableTethering(self)

Send this message to disable tethered capture on the camera device if the camera has the ‘ICCameraDeviceCanTakePicture’ capability and if your process has already sent a ‘requestEnableTethering’ to it.

Source

unsafe fn requestTakePicture(self)

Capture a new image using the camera, the camera capabilities include ‘ICCameraDeviceCanTakePicture’.

Source

unsafe fn requestDeleteFiles(self, files: id)

Deletes files.

Source

unsafe fn cancelDelete(self)

Cancels the current delete operation started by sending a ‘requestDeleteFiles:’.

Source

unsafe fn requestDownloadFile( self, file: id, options: id, downloadDelegate: id, didDownloadSelector: id, contextInfo: id, )

Download a file from the camera. Please refer to the top of this header for information about the options.

Source

unsafe fn cancelDownload(self)

Cancels the current download operation.

Source

unsafe fn requestUploadFile( self, fileURL: id, options: id, uploadDelegate: id, didUploadSelector: id, contextInfo: id, )

Upload a file at fileURL to the camera. The options dictionary is not used in this version.

Source

unsafe fn requestReadDataFromFile( self, file: id, atOffset: off_t, length: off_t, readDelegate: id, didReadDataSelector: id, contextInfo: id, )

This method asynchronously reads data of a specified length from a specified offset.

Source

unsafe fn requestSendPTPCommand( self, command: id, outData: id, sendCommandDelegate: id, didSendCommandSelector: id, contextInfo: id, )

This method asynchronously sends a PTP command to a camera.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ICCameraDevice for id

Source§

unsafe fn batteryLevelAvailable(self) -> BOOL

Source§

unsafe fn batteryLevel(self) -> NSUInteger

Source§

unsafe fn contentCatalogPercentCompleted(self) -> NSUInteger

Source§

unsafe fn contents(self) -> id

Source§

unsafe fn mediaFiles(self) -> id

Source§

unsafe fn timeOffset(self) -> NSTimeInterval

Source§

unsafe fn isAccessRestrictedAppleDevice(self) -> BOOL

Source§

unsafe fn mountPoint(self) -> id

Source§

unsafe fn tetheredCaptureEnabled(self) -> BOOL

Source§

unsafe fn filesOfType(self, fileUTType: id) -> id

Source§

unsafe fn requestSyncClock(self)

Source§

unsafe fn requestEnableTethering(self)

Source§

unsafe fn requestDisableTethering(self)

Source§

unsafe fn requestTakePicture(self)

Source§

unsafe fn requestDeleteFiles(self, files: id)

Source§

unsafe fn cancelDelete(self)

Source§

unsafe fn requestDownloadFile( self, file: id, options: id, downloadDelegate: id, didDownloadSelector: id, contextInfo: id, )

Source§

unsafe fn cancelDownload(self)

Source§

unsafe fn requestUploadFile( self, fileURL: id, options: id, uploadDelegate: id, didUploadSelector: id, contextInfo: id, )

Source§

unsafe fn requestReadDataFromFile( self, file: id, atOffset: off_t, length: off_t, readDelegate: id, didReadDataSelector: id, contextInfo: id, )

Source§

unsafe fn requestSendPTPCommand( self, command: id, outData: id, sendCommandDelegate: id, didSendCommandSelector: id, contextInfo: id, )

Implementors§