mirror of
https://gitee.com/openharmony/print_print_fwk
synced 2024-11-27 02:50:40 +00:00
修改不规范代码
Signed-off-by: 张智勇 <zhangzhiyong43@huawei.com>
This commit is contained in:
parent
83561c3c8a
commit
2546b57063
@ -1676,8 +1676,16 @@ bool PrintCupsClient::IsPrinterExist(const char *printerUri, const char *printer
|
||||
dest = printAbility_->GetNamedDest(CUPS_HTTP_DEFAULT, printerName, NULL);
|
||||
if (dest != NULL) {
|
||||
const char *deviceUri = cupsGetOption("device-uri", dest->num_options, dest->options);
|
||||
if (deviceUri == nullptr) {
|
||||
PRINT_HILOGD("deviceUri is null");
|
||||
return false;
|
||||
}
|
||||
PRINT_HILOGD("deviceUri=%{private}s", deviceUri);
|
||||
const char *makeModel = cupsGetOption("printer-make-and-model", dest->num_options, dest->options);
|
||||
if (makeModel == nullptr) {
|
||||
PRINT_HILOGD("makeModel is null");
|
||||
return false;
|
||||
}
|
||||
PRINT_HILOGD("makeModel=%{private}s", makeModel);
|
||||
int printerState = cupsGetIntegerOption("printer-state", dest->num_options, dest->options);
|
||||
PRINT_HILOGD("printerState=%{private}d", printerState);
|
||||
|
@ -347,8 +347,6 @@ void PrintSystemData::ConvertPrinterCapabilityToJson(PrinterCapability &printerC
|
||||
ConvertPrintMarginToJson(printerCapability, capsJson);
|
||||
}
|
||||
|
||||
ConvertPageSizeToJson(printerCapability, capsJson);
|
||||
|
||||
if (printerCapability.HasResolution()) {
|
||||
ConvertPrintResolutionToJson(printerCapability, capsJson);
|
||||
}
|
||||
|
@ -110,7 +110,6 @@ void PrintUsbManager::RefreshUsbPrinterDevice()
|
||||
|
||||
std::string PrintUsbManager::GetProductName(UsbDevice &usbDevice)
|
||||
{
|
||||
PRINT_HILOGI("getProductName dev.GetName() = %{public}s.", usbDevice.GetName().c_str());
|
||||
USBDevicePipe usbDevicePipe;
|
||||
int32_t openDeviceRet = UEC_OK;
|
||||
if (isUsbEnable) {
|
||||
|
Loading…
Reference in New Issue
Block a user