| 54 | #endif |
| 55 | |
| 56 | std::vector<std::string> GetOpticalDriveList() |
| 57 | { |
| 58 | #ifdef __APPLE__ |
| 59 | std::vector<std::string> drives; |
| 60 | |
| 61 | if (CFMutableDictionaryRef cd_classes = IOServiceMatching(kIOCDMediaClass)) |
| 62 | { |
| 63 | std::vector<std::string> cd = GetDriveListFromClasses(cd_classes); |
| 64 | drives.insert(drives.end(), cd.begin(), cd.end()); |
| 65 | } |
| 66 | |
| 67 | if (CFMutableDictionaryRef dvd_classes = IOServiceMatching(kIODVDMediaClass)) |
| 68 | { |
| 69 | std::vector<std::string> dvd = GetDriveListFromClasses(dvd_classes); |
| 70 | drives.insert(drives.end(), dvd.begin(), dvd.end()); |
| 71 | } |
| 72 | return drives; |
| 73 | #else |
| 74 | return {}; |
| 75 | #endif |
| 76 | } |
| 77 | |
| 78 | void GetValidDrive(std::string& drive) |
| 79 | { |
no test coverage detected