|
ADC Home > Reference Library > Reference > Audio > Carbon > Disc Recording Framework Reference
|
DRDevice |
| Inherits from: | |
| Declared In: |
Represents a CD or DVD burner connected to the computer.
acquireExclusiveAccess |
Attempts to acquire an exclusive access session with the device.
- (BOOL) acquireExclusiveAccess;
Returns YES if the exclusinve access is acquired and NO if not.
Acquiring exclusive access to the device prevents any process
other than the one acquiring access from communicating with the
device. So once exclusive access is granted, the device is unusable by any other process.
Because of this all volumes mounted from media in the drive must be unmounted
before exclusive access can be granted.
Exclusive access can be acquired multiple times. Each time this method
is called, a call to releaseExclusiveAccess > must be made at a later time,
otherwise the process will never release its exclusive access.
acquireMediaReservation |
Indicate an interest in the blank media reservation.
- (void) acquireMediaReservation;
Blank media participates in a reservation system that allows applications to express
their claim on blank media to other applications. Indicating an interest in the reservation
isn't enough to assume it's been acquired, as there are likely to be other applications in
the system who have also indicated an interest in the blank media reservation. You will
receive a DRDeviceStatusChangedNotification with a value of TRUE for the
DRDeviceMediaIsReservedKey when the blank media reservation has been acquired.
This function may be called multiple times. Each time it is called, a call to
releaseMediaReservation must be made at a later time, otherwise the process will
never fully rescind its interest in the blank media reservation.
closeTray |
Commands the device to close its tray.
- (BOOL) closeTray;
Returns YES if the tray could be closed and NO if not.
Does nothing if the device does not have a tray (slotload).
deviceForBSDName: |
Obtains a DRDevice for the device corresponding to the bsd /dev node.
+ (DRDevice*) deviceForBSDName:(NSString*)bsdName;
bsdNameAn autoreleased DRDevice object.
If the device is not an authoring device (i.e., CDR, CDRW, DVR-R, etc), returns nil.
deviceForIORegistryEntryPath: |
Obtains a DRDevice for the device at the path.
+ (DRDevice*) deviceForIORegistryEntryPath:(NSString*)path;
pathAn autoreleased DRDevice object.
If the device is not an authoring device (i.e., CDR, CDRW, DVR-R, etc), returns nil.
devices |
Obtains a static list of devices connected to the computer.
+ (NSArray*) devices;
An NSArray of DRDevices.
Returns all CD/DVD devices connected to the computer at the time this method is called. Since devices can come and go at any time, the output of this method is simply a snapshot of the set of devices connected.
ejectMedia |
Commands the device to eject the media.
- (BOOL) ejectMedia;
Returns YES if the media could be ejected and NO if not.
This command first unmounts any volumes associated with the media and then ejects the media from the drive. If the media could not be ejected, most likely this is because a volume associated with the media could not be unmounted.
info |
Returns a dictionary of information describing the device.
- (NSDictionary*) info;
An NSDictionary containing device information.
The information returned include the types of media the device can write to, how it's connected and its identifying information such as the vendor and product name.
isEqualToDevice: |
Compares the receiver to another device.
- (BOOL) isEqualToDevice:(DRDevice*) otherDevice;
otherDeviceReturns YES if the receiver is equal to otherDevice.
isValid |
Returns whether or not the device represented by the receiver is still attached to the computer.
- (BOOL) isValid;
Returns YES if device is valid and NO if not.
Because of the way some physical interconnects work, a device which is unplugged and replugged in does not necessarily look like the same device to the computer and would be invalid in that instance.
openTray |
Commands the device to open its tray.
- (BOOL) openTray;
Returns YES if the tray could be opened and NO if not.
Does nothing if the device does not have a tray (slotload). If there is media in the drive this method will do nothing and return false. In this case use ejectMedia to eject the media and open the tray.
releaseExclusiveAccess |
Releases the latest exclusive access request for the device.
- (void) releaseExclusiveAccess;
A call to this method must be made for every call to acquireExclusiveAccess , otherwise the process will never release its exclusive access.
releaseMediaReservation |
Releases any media reservation that might be in place for the device.
- (void) releaseMediaReservation;
If media is inserted and reserved, then the reservation will be passed on to the next process with a reservation request.
status |
Returns a dictionary of information describing the media in the device.
- (NSDictionary*) status;
An NSDictionary containing media information.
In addition to information about the media (type, space available/used, etc), the dictionary returned includes those pieces of information about the device itself which are in part determined by the media (i.e., maximum burn speed).
|