本文整理汇总了C++中BDiskDevice::GetPath方法的典型用法代码示例。如果您正苦于以下问题:C++ BDiskDevice::GetPath方法的具体用法?C++ BDiskDevice::GetPath怎么用?C++ BDiskDevice::GetPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BDiskDevice
的用法示例。
在下文中一共展示了BDiskDevice::GetPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
DriveItem::DriveItem(const BDiskDevice& device, const BootMenuList& menus)
:
fBaselineOffset(0),
fSizeWidth(0)
{
device.GetPath(&fPath);
if (device.Name() != NULL && device.Name()[0])
fName = device.Name();
else if (strstr(fPath.Path(), "usb") != NULL)
fName = B_TRANSLATE_COMMENT("USB Drive", "Default disk name");
else
fName = B_TRANSLATE_COMMENT("Hard Drive", "Default disk name");
fIcon = new BBitmap(BRect(0, 0, B_LARGE_ICON - 1, B_LARGE_ICON - 1),
B_RGBA32);
if (device.GetIcon(fIcon, B_LARGE_ICON) != B_OK)
memset(fIcon->Bits(), 0, fIcon->BitsLength());
fDrive = new BootDrive(fPath.Path());
fIsInstalled = fDrive->InstalledMenu(menus) != NULL;
fCanBeInstalled = fDrive->CanMenuBeInstalled(menus);
char buffer[256];
fSize = string_for_size(device.Size(), buffer, sizeof(buffer));
}