I have used disk-arbitration framework for managing various drives and disks.
I have registered callback functions DADiskAppearedCallback
and DADiskDisappearCallback
.
For the usb drives all seems to work perfectly but for the CD/DVD I am facing the problem.
After CD/DVD get loaded I have unmount (DADiskUnmount()
) the drive using BSDName of the disk.
Then after some verification of the disk I do mount (DADiskMount()
) the disk again using BSDName.
When I mount CD/DVD again, the default application set in the
system preference->Hardware->Cds & DVSs
is not getting launch.
For eg. For Video DVD - Open DVD Player. Here DVD player should get launched.
How do I overcome this problem?
I am still searching for the solution came across, "SystemUIServer" manages the application that should mount on insertion of CD/DVD. Can I able to trigger that action on the CD/DVD mount? Or Is this proper way to manually launch user provided application on CD/DVD mount?