Home
last modified time | relevance | path

Searched refs:printerName (Results 1 - 25 of 41) sorted by relevance

12

/base/print/print_fwk/services/print_service/src/
H A Dprint_http_server_manager.cpp83 bool PrintHttpServerManager::CreateServer(std::string printerName, int32_t &port) in CreateServer() argument
85 PRINT_HILOGD("PrintHttpServerManager init printerName: %{public}s, port: %{public}d", printerName.c_str(), port); in CreateServer()
86 if (printHttpServerMap.find(printerName) != printHttpServerMap.end()) { in CreateServer()
87 PRINT_HILOGI("printerName: %{public}s has server", printerName.c_str()); in CreateServer()
88 if (printHttpPortMap.find(printerName) != printHttpPortMap.end()) { in CreateServer()
89 port = printHttpPortMap[printerName]; in CreateServer()
92 PRINT_HILOGE("printerName: %{public}s has server, but do not has port", printerName in CreateServer()
124 StopServer(std::string printerName) StopServer() argument
157 std::string printerName = DelayedSingleton<PrintUsbManager>::GetInstance()->GetPrinterName(name); DealUsbDevDetach() local
[all...]
H A Dprint_usb_manager.cpp42 bool PrintUsbManager::isExistIppOverUsbPrinter(std::string printerName) in isExistIppOverUsbPrinter() argument
44 PRINT_HILOGD("isExistIppOverUsbPrinter printerName = %{public}s", printerName.c_str()); in isExistIppOverUsbPrinter()
45 if (!printerName.empty() && printDeviceMap.find(printerName) != printDeviceMap.end()) { in isExistIppOverUsbPrinter()
52 bool PrintUsbManager::isPrintDevice(USB::UsbDevice &usbdevice, std::string &printerName) in isPrintDevice() argument
78 printerName = GetProductName(usbdevice); in isPrintDevice()
79 PRINT_HILOGI("support IppPrint printerName = %{public}s.", printerName.c_str()); in isPrintDevice()
80 if (printerName in isPrintDevice()
104 std::string printerName; RefreshUsbPrinterDevice() local
132 std::string printerName = productName + "-" + serialNumber; GetProductName() local
169 AllocateInterface(const std::string &printerName, UsbDevice &usbdevice, USBDevicePipe &usbDevicePipe) AllocateInterface() argument
216 ConnectUsbPinter(const std::string &printerName) ConnectUsbPinter() argument
241 DisConnectUsbPinter(const std::string &printerName) DisConnectUsbPinter() argument
263 BulkTransferWrite(std::string printerName, const Operation operation, std::vector<uint8_t> &vectorRequestBuffer) BulkTransferWrite() argument
298 BulkTransferRead(std::string printerName, const Operation operation, std::vector<uint8_t> &readTempBUffer) BulkTransferRead() argument
349 std::string printerName = GetPrinterName(dev->GetName()); DealUsbDevStatusChange() local
358 std::string printerName; DealUsbDevStatusChange() local
[all...]
H A Dprint_ipp_over_usb_manager.cpp76 std::string printerName = tmp.substr(INDEX_4); in ConnectPrinter() local
77 PRINT_HILOGI("ConnectPrinter printerName = %{public}s", printerName.c_str()); in ConnectPrinter()
78 if (DelayedSingleton<PrintUsbManager>::GetInstance()->isExistIppOverUsbPrinter(printerName)) { in ConnectPrinter()
79 if (DelayedSingleton<PrintUsbManager>::GetInstance()->ConnectUsbPinter(printerName)) { in ConnectPrinter()
80 auto ret = DelayedSingleton<PrintHttpServerManager>::GetInstance()->CreateServer(printerName, port); in ConnectPrinter()
81 PRINT_HILOGI("printerName = %{public}s CreateServer ret: %{public}d ", printerName.c_str(), ret); in ConnectPrinter()
84 PRINT_HILOGE("usb connect printerName = %{public}s fail", printerName in ConnectPrinter()
108 std::string printerName = tmp.substr(INDEX_4); DisConnectPrinter() local
[all...]
H A Dprint_cups_client.cpp157 std::string printerName(deviceInfo); in DeviceCb()
160 info.SetPrinterId(PRINTER_ID_USB_PREFIX + "-" + printerName + "-" + serial); in DeviceCb()
161 info.SetPrinterName(PRINTER_ID_USB_PREFIX + "-" + printerName + "-" + serial); in DeviceCb()
482 int32_t PrintCupsClient::AddPrinterToCups(const std::string &printerUri, const std::string &printerName, in AddPrinterToCups() argument
490 std::string standardName = PrintUtil::StandardizePrinterName(printerName); in AddPrinterToCups()
529 int32_t PrintCupsClient::AddPrinterToCupsWithPpd(const std::string &printerUri, const std::string &printerName, in AddPrinterToCupsWithPpd() argument
536 std::string standardName = PrintUtil::StandardizePrinterName(printerName); in AddPrinterToCupsWithPpd()
582 int32_t PrintCupsClient::DeleteCupsPrinter(const char *printerName) in DeleteCupsPrinter() argument
587 PRINT_HILOGD("PrintCupsClient DeleteCupsPrinter start: %{private}s", printerName); in DeleteCupsPrinter()
593 httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, "localhost", 0, "/printers/%s", printerName); in DeleteCupsPrinter()
694 QueryPrinterCapabilityFromPPD(const std::string &printerName, PrinterCapability &printerCaps) QueryPrinterCapabilityFromPPD() argument
891 SetDefaultPrinter(const std::string &printerName) SetDefaultPrinter() argument
925 GetPPDFile(const std::string &printerName) GetPPDFile() argument
964 QueryPrinterAttrList(const std::string &printerName, const std::vector<std::string> &keyList, std::vector<std::string> &valueList) QueryPrinterAttrList() argument
1657 IsPrinterExist(const char *printerUri, const char *printerName, const char *ppdName) IsPrinterExist() argument
[all...]
H A Dvendor_ipp_everywhere.cpp183 if (!capJson.contains("printerName") || !capJson["printerName"].is_string()) { in ConvertCapabilityToInfo()
184 PRINT_HILOGW("printerName invalid"); in ConvertCapabilityToInfo()
187 std::string printerName = capJson["printerName"].get<std::string>(); in ConvertCapabilityToInfo() local
194 printerInfo->SetPrinterName(printerName); in ConvertCapabilityToInfo()
201 option["printerName"] = printerName; in ConvertCapabilityToInfo()
/base/print/print_fwk/test/unittest/service_test/
H A Dprint_http_server_manager_test.cpp85 std::string printerName = "HUAWEI PixLab V1-0105"; in HWTEST_F() local
87 EXPECT_TRUE(service->CreateServer(printerName, port)); in HWTEST_F()
89 service->StopServer(printerName); in HWTEST_F()
102 std::string printerName = "HUAWEI PixLab V1-0105"; in HWTEST_F() local
106 service->printHttpServerMap[printerName] = newServer; in HWTEST_F()
107 service->CreateServer(printerName, port); in HWTEST_F()
109 service->StopServer(printerName); in HWTEST_F()
122 std::string printerName = "HUAWEI PixLab V1-0105"; in HWTEST_F() local
126 service->printHttpServerMap[printerName] = newServer; in HWTEST_F()
127 service->printHttpPortMap[printerName] in HWTEST_F()
144 std::string printerName = "HUAWEI PixLab V1-0105"; HWTEST_F() local
[all...]
H A Dprint_usb_manager_test.cpp117 std::string printerName = "HUAWEI PixLab V1-0105";
119 printUsbManager.printDeviceMap[printerName] = usbDevice;
120 bool ret = printUsbManager.isExistIppOverUsbPrinter(printerName);
135 std::string printerName;
136 bool ret = printUsbManager.isPrintDevice(usbDevice, printerName);
173 std::string printerName = printUsbManager.GetProductName(usbDevice);
174 EXPECT_EQ("-", printerName);
204 std::string printerName = "HUAWEI PixLab V1-0105";
206 printUsbManager.printPipeMap[printerName] = usbDevicePipe;
208 printUsbManager.printDeviceMap[printerName]
[all...]
H A Dprint_system_data_test.cpp95 std::string printerName = "Direct Pixlab1620"; in HWTEST_F() local
96 EXPECT_EQ(systemData->QueryPrinterIdByStandardizeName(printerName), ""); in HWTEST_F()
98 systemData->QueryPrinterIdByStandardizeName(printerName); in HWTEST_F()
106 std::string printerName = "Direct Pixlab1620"; in HWTEST_F() local
107 EXPECT_EQ(systemData->QueryPrinterIdByStandardizeName(printerName), ""); in HWTEST_F()
108 std::string re = systemData->QueryPrinterIdByStandardizeName(printerName); in HWTEST_F()
115 if (cupsPrinterInfo.name == printerName) { in HWTEST_F()
185 std::string printerName = systemData->QueryPrinterIdByStandardizeName("HUAWEI_PixLab_V1-0105"); in HWTEST_F() local
219 std::string printerName = "Direct"; in HWTEST_F() local
220 systemData->QueryPrinterIdByStandardizeName(printerName); in HWTEST_F()
1155 std::string printerName = "name"; HWTEST_F() local
[all...]
/base/print/print_fwk/services/print_service/include/
H A Dprint_usb_manager.h51 bool isExistIppOverUsbPrinter(std::string printerName);
52 bool ConnectUsbPinter(const std::string &printerName);
53 void DisConnectUsbPinter(const std::string &printerName);
54 int32_t BulkTransferWrite(std::string printerName, const Operation operation,
56 int32_t BulkTransferRead(std::string printerName, const Operation operation,
64 bool isPrintDevice(USB::UsbDevice &usbdevice, std::string &printerName);
68 void DisConnectLastUsbPinter(const std::string &printerName);
69 bool AllocateInterface(const std::string &printerName, USB::UsbDevice &usbdevice,
H A Dprint_cups_client.h42 std::string printerName; member
64 std::string printerName; member
82 int32_t AddPrinterToCups(const std::string &printerUri, const std::string &printerName,
84 int32_t AddPrinterToCupsWithPpd(const std::string &printerUri, const std::string &printerName,
89 int32_t DeleteCupsPrinter(const char *printerName);
93 int32_t QueryAddedPrinterList(std::vector<std::string> &printerName);
94 ppd_file_t* GetPPDFile(const std::string &printerName);
95 int32_t SetDefaultPrinter(const std::string &printerName);
97 int32_t QueryPrinterAttrList(const std::string &printerName, const std::vector<std::string> &keyList,
142 bool IsPrinterExist(const char *printerUri, const char *printerName, cons
[all...]
H A Dprint_http_server_manager.h35 bool CreateServer(std::string printerName, int32_t &port);
38 void StopServer(std::string printerName);
H A Dprint_system_data.h47 std::string QueryPrinterIdByStandardizeName(const std::string &printerName);
65 std::shared_ptr<PrinterInfo> QueryDiscoveredPrinterInfoByName(const std::string &printerName);
/base/print/print_fwk/utils/include/
H A Dprint_util.h42 static std::string StandardizePrinterName(std::string printerName);
44 static std::string RemoveUnderlineFromPrinterName(std::string printerName);
133 inline std::string PrintUtil::StandardizePrinterName(std::string printerName) in StandardizePrinterName() argument
136 std::string name = std::regex_replace(printerName, pattern, "_"); in StandardizePrinterName()
143 inline std::string PrintUtil::RemoveUnderlineFromPrinterName(std::string printerName) in RemoveUnderlineFromPrinterName() argument
146 std::string name = std::regex_replace(printerName, pattern, " "); in RemoveUnderlineFromPrinterName()
/base/print/print_fwk/test/fuzztest/printcupsclient_fuzzer/
H A Dprintcupsclient_fuzzer.cpp46 std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH); in TestAddPrinterToCups() local
48 PrintCupsClient::GetInstance()->AddPrinterToCups(printerUri, printerName, printerMake); in TestAddPrinterToCups()
56 std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH); in TestQueryPrinterCapabilityByUri() local
58 PrintCupsClient::GetInstance()->QueryPrinterCapabilityByUri(printerUri, printerName, printerCaps); in TestQueryPrinterCapabilityByUri()
88 std::vector<std::string> printerName; in TestQueryAddedPrinterList() local
89 printerName.push_back(printerNameStr); in TestQueryAddedPrinterList()
90 PrintCupsClient::GetInstance()->QueryAddedPrinterList(printerName); in TestQueryAddedPrinterList()
96 std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH); in TestGetPPDFile() local
97 PrintCupsClient::GetInstance()->GetPPDFile(printerName); in TestGetPPDFile()
103 std::string printerName in TestSetDefaultPrinter() local
110 std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH); TestQueryPrinterAttrList() local
139 std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH); TestDeletePrinterFromCups() local
[all...]
/base/print/print_fwk/frameworks/helper/print_helper/src/
H A Dprinter_info_helper.cpp24 static constexpr const char *PARAM_INFO_PRINTERNAME = "printerName";
95 std::string printerName = NapiPrintUtils::GetStringPropertyUtf8(env, jsValue, PARAM_INFO_PRINTERNAME); in BuildFromJs() local
96 if (printerId == "" || printerName == "") { in BuildFromJs()
98 printerId.c_str(), printerName.c_str()); in BuildFromJs()
102 nativeObj->SetPrinterName(printerName); in BuildFromJs()
/base/print/print_fwk/test/unittest/fwk_print_cups_client_test/
H A Dprint_cups_wrapper_test.cpp103 std::string printerName = "testPrinterName"; in HWTEST_F() local
108 EXPECT_EQ(printCupsClient.QueryPrinterAttrList(printerName, keyList, valueList), E_PRINT_SERVER_FAILURE); in HWTEST_F()
110 EXPECT_EQ(printCupsClient.DeleteCupsPrinter(printerName.c_str()), E_PRINT_SERVER_FAILURE); in HWTEST_F()
113 EXPECT_EQ(printCupsClient.SetDefaultPrinter(printerName.c_str()), E_PRINT_SERVER_FAILURE); in HWTEST_F()
127 std::string printerName = "testPrinterName"; in HWTEST_F()
130 EXPECT_EQ(printCupsClient.QueryPrinterAttrList(printerName, keyList, valueList), E_PRINT_SERVER_FAILURE); in HWTEST_F()
147 std::string printerName = "testPrinterName"; in HWTEST_F()
150 EXPECT_EQ(printCupsClient.QueryPrinterAttrList(printerName, keyList, valueList), E_PRINT_NONE); in HWTEST_F()
245 option["printerName"] = "name"; in HWTEST_F()
268 option["printerName"] in HWTEST_F()
[all...]
H A Dprint_cups_client_test.cpp35 "\"printerName\":\"printer1\",\"printerUri\":\"ipp://192.168.0.1:111/ipp/print\",\"borderless\":true,"
220 std::string printerName = "DIRECT-PixLab_V1-0105"; in HWTEST_F() local
221 printCupsClient.SetDefaultPrinter(printerName); in HWTEST_F()
223 printCupsClient.SetDefaultPrinter(printerName); in HWTEST_F()
235 std::string printerName = "DIRECT-PixLab_V1-0105"; in HWTEST_F() local
238 info.SetPrinterName(printerName); in HWTEST_F()
580 std::string printerName = "testPrinterName"; in HWTEST_F() local
582 ppd_file_t *ppd = printCupsClient.GetPPDFile(printerName); in HWTEST_F()
595 std::string printerName = "testPrinterName"; in HWTEST_F() local
597 printCupsClient.GetPPDFile(printerName); in HWTEST_F()
609 std::string printerName = "testPrinterName"; HWTEST_F() local
1528 const char *printerName = "DIRECT-PixLab_V1-0105"; HWTEST_F() local
[all...]
/base/print/print_fwk/frameworks/ohprint/include/
H A Dvendor_extension.h63 char *printerName; member
/base/print/print_fwk/test/unittest/fwk_vendor_manager_test/
H A Dvendor_helper_test.cpp61 discoveryItem.printerName = "printerName"; in BuildDiscoveryItem()
186 EXPECT_EQ(discoveryItem.printerName, nullptr); in HWTEST_F()
196 EXPECT_EQ(discoveryItem.printerName, "printerName"); in HWTEST_F()
/base/print/print_fwk/interfaces/kits/napi/print_napi/include/
H A Dnapi_print_ext.h68 std::string printerName = ""; member
/base/print/print_fwk/interfaces/kits/napi/print_napi/src/
H A Dnapi_print_ext.cpp339 PRINT_ASSERT_BASE(env, valuetype == napi_string, "printerName is not a string", napi_string_expected); in AddPrinterToCups()
345 std::string printerName = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ONE]); in AddPrinterToCups()
346 PRINT_HILOGD("printerName : %{private}s", printerName.c_str()); in AddPrinterToCups()
347 context->printerName = printerName; in AddPrinterToCups()
362 int32_t ret = PrintManagerClient::GetInstance()->AddPrinterToCups(context->printerUri, context->printerName, in AddPrinterToCups()
441 PRINT_ASSERT_BASE(env, valuetype == napi_string, "printerName is not a string", napi_string_expected); in DeletePrinterFromCups()
450 std::string printerName = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ONE]); in DeletePrinterFromCups()
451 PRINT_HILOGD("printerName in DeletePrinterFromCups()
[all...]
/base/print/print_fwk/frameworks/innerkitsimpl/print_impl/include/
H A Diprint_service.h64 virtual int32_t AddPrinterToCups(const std::string &printerUri, const std::string &printerName,
82 virtual int32_t DeletePrinterFromCups(const std::string &printerUri, const std::string &printerName,
H A Dprint_service_proxy.h57 int32_t AddPrinterToCups(const std::string &printerUri, const std::string &printerName,
79 int32_t DeletePrinterFromCups(const std::string &printerUri, const std::string &printerName,
H A Dprint_manager_client.h68 int32_t AddPrinterToCups(const std::string &printerUri, const std::string &printerName,
74 int32_t DeletePrinterFromCups(const std::string &printerUri, const std::string &printerName,
/base/print/print_fwk/frameworks/models/print_models/include/
H A Dprinter_info.h35 void SetPrinterName(std::string printerName);

Completed in 14 milliseconds

12