Home
last modified time | relevance | path

Searched refs:printerId (Results 1 – 25 of 29) sorted by relevance

12

/base/print/print_fwk/interfaces/kits/jsnapi/extension/
Dprint_extension.js29 onConnectPrinter(printerId) { argument
30 console.log('onConnectPrinter:' + printerId);
33 onDisconnectPrinter(printerId) { argument
45 onRequestPrinterCapability(printerId) { argument
46 console.log('onRequestPrinterCapability:' + printerId);
/base/print/print_fwk/frameworks/innerkitsimpl/src/
Dprint_extension_callback_stub.cpp61 bool PrintExtensionCallbackStub::OnCallback(const std::string &printerId) in OnCallback() argument
64 return cb_(printerId); in OnCallback()
77 bool PrintExtensionCallbackStub::OnCallback(const std::string &printerId, PrinterCapability &cap) in OnCallback() argument
80 if (capability_(printerId, cap)) { in OnCallback()
117 std::string printerId = data.ReadString(); in HandlePrinterCallback() local
118 bool result = OnCallback(printerId); in HandlePrinterCallback()
138 std::string printerId = data.ReadString(); in HandleCapabilityCallback() local
140 bool result = OnCallback(printerId, cap); in HandleCapabilityCallback()
Dprint_manager_client.cpp125 int32_t PrintManagerClient::ConnectPrinter(const std::string &printerId) in ConnectPrinter() argument
130 ret = printServiceProxy_->ConnectPrinter(printerId); in ConnectPrinter()
136 int32_t PrintManagerClient::DisconnectPrinter(const std::string &printerId) in DisconnectPrinter() argument
141 ret = printServiceProxy_->DisconnectPrinter(printerId); in DisconnectPrinter()
235 int32_t PrintManagerClient::UpdatePrinterState(const std::string &printerId, uint32_t state) in UpdatePrinterState() argument
240 ret = printServiceProxy_->UpdatePrinterState(printerId, state); in UpdatePrinterState()
279 int32_t PrintManagerClient::QueryPrinterCapability(const std::string &printerId) in QueryPrinterCapability() argument
284 ret = printServiceProxy_->QueryPrinterCapability(printerId); in QueryPrinterCapability()
Dprint_service_proxy.cpp120 int32_t PrintServiceProxy::ConnectPrinter(const std::string &printerId) in ConnectPrinter() argument
125 data.WriteString(printerId); in ConnectPrinter()
133 int32_t PrintServiceProxy::DisconnectPrinter(const std::string &printerId) in DisconnectPrinter() argument
138 data.WriteString(printerId); in DisconnectPrinter()
274 int32_t PrintServiceProxy::UpdatePrinterState(const std::string &printerId, uint32_t state) in UpdatePrinterState() argument
279 data.WriteString(printerId); in UpdatePrinterState()
331 int32_t PrintServiceProxy::QueryPrinterCapability(const std::string &printerId) in QueryPrinterCapability() argument
336 data.WriteString(printerId); in QueryPrinterCapability()
Dprinter_info.cpp59 void PrinterInfo::SetPrinterId(const std::string &printerId) in SetPrinterId() argument
61 printerId_ = printerId; in SetPrinterId()
/base/print/print_fwk/interfaces/kits/jskits/
D@ohos.PrintExtensionAbility.d.ts72 onConnectPrinter(printerId: number): void;
83 onDisconnectPrinter(printerId: number): void;
116 onRequestPrinterCapability(printerId: number): print.PrinterCapability;
D@ohos.print.d.ts119 printerId: string; // printer id property
131 printerId: string; // printer id to take charge of printing property
265 function connectPrinter(printerId: string, callback: AsyncCallback<boolean>): void;
266 function connectPrinter(printerId: string): Promise<boolean>;
278 function disconnectPrinter(printerId: string, callback: AsyncCallback<boolean>): void;
279 function disconnectPrinter(printerId: string): Promise<boolean>;
291 function queryPrinterCapability(printerId: string, callback: AsyncCallback<boolean>): void;
292 function queryPrinterCapability(printerId: string): Promise<boolean>;
456 …function updatePrinterState(printerId: string, state: PrinterState, callback: AsyncCallback<boolea…
457 function updatePrinterState(printerId: string, state: PrinterState): Promise<boolean>;
/base/print/print_fwk/services/include/
Dprint_service_ability.h53 int32_t ConnectPrinter(const std::string &printerId) override;
54 int32_t DisconnectPrinter(const std::string &printerId) override;
63 int32_t UpdatePrinterState(const std::string &printerId, uint32_t state) override;
67 int32_t QueryPrinterCapability(const std::string &printerId) override;
97 void SendQueuePrintJob(const std::string &printerId);
99 void DestroyExtension(const std::string &printerId);
101 std::shared_ptr<PrinterInfo> getPrinterInfo(const std::string printerId);
102 bool isEprint(const std::string &printerId);
103 …void ReportHisysEvent(const std::shared_ptr<PrintJob> &jobInfo, const std::string &printerId, uint…
104 void ReportCompletedPrint(const std::string &printerId);
Dprint_extension_callback_proxy.h28 bool OnCallback(const std::string &printerId) override;
30 bool OnCallback(const std::string &printerId, PrinterCapability &cap) override;
/base/print/print_fwk/services/src/
Dprint_service_ability.cpp331 int32_t PrintServiceAbility::ConnectPrinter(const std::string &printerId) in ConnectPrinter() argument
342 if (printerInfoList_.find(printerId) == printerInfoList_.end()) { in ConnectPrinter()
347 std::string extensionId = PrintUtils::GetExtensionId(printerId); in ConnectPrinter()
357 cbFunc->OnCallback(printerId); in ConnectPrinter()
368 int32_t PrintServiceAbility::DisconnectPrinter(const std::string &printerId) in DisconnectPrinter() argument
379 if (printerInfoList_.find(printerId) == printerInfoList_.end()) { in DisconnectPrinter()
384 std::string extensionId = PrintUtils::GetExtensionId(printerId); in DisconnectPrinter()
394 cbFunc->OnCallback(printerId); in DisconnectPrinter()
630 auto printerId = jobInfo.GetPrinterId(); in StartPrintJob() local
631 auto extensionId = PrintUtils::GetExtensionId(printerId); in StartPrintJob()
[all …]
Dprint_extension_callback_proxy.cpp43 bool PrintExtensionCallbackProxy::OnCallback(const std::string &printerId) in OnCallback() argument
50 data.WriteString(printerId); in OnCallback()
80 bool PrintExtensionCallbackProxy::OnCallback(const std::string &printerId, PrinterCapability &cap) in OnCallback() argument
87 data.WriteString(printerId); in OnCallback()
Dprint_security_guard_info.cpp39 std::string printerId = printerInfo.GetPrinterId(); in setPrintTypeInfo() local
42 printTypeInfo_.mac = PrintUtil::SplitStr(printerId, '/', SPLIT_INDEX); in setPrintTypeInfo()
43 subType_ = PrintSecurityGuardUtil::GetPrinterType(printerId); in setPrintTypeInfo()
Dprint_service_stub.cpp278 std::string printerId = data.ReadString(); in OnUpdatePrinterState() local
280 int32_t ret = UpdatePrinterState(printerId, state); in OnUpdatePrinterState()
333 std::string printerId = data.ReadString(); in OnQueryPrinterCapability() local
334 PRINT_HILOGD("printerId : %{private}s", printerId.c_str()); in OnQueryPrinterCapability()
335 int32_t ret = QueryPrinterCapability(printerId); in OnQueryPrinterCapability()
/base/print/print_fwk/frameworks/innerkitsimpl/include/
Diprint_extension_callback.h29 virtual bool OnCallback(const std::string &printerId) = 0;
31 virtual bool OnCallback(const std::string &printerId, PrinterCapability &cap) = 0;
Diprint_service.h39 virtual int32_t ConnectPrinter(const std::string &printerId) = 0;
40 virtual int32_t DisconnectPrinter(const std::string &printerId) = 0;
49 virtual int32_t UpdatePrinterState(const std::string &printerId, uint32_t state) = 0;
53 virtual int32_t QueryPrinterCapability(const std::string &printerId) = 0;
Dprint_service_proxy.h33 int32_t ConnectPrinter(const std::string &printerId) override;
34 int32_t DisconnectPrinter(const std::string &printerId) override;
43 int32_t UpdatePrinterState(const std::string &printerId, uint32_t state) override;
47 int32_t QueryPrinterCapability(const std::string &printerId) override;
Dprint_manager_client.h53 int32_t ConnectPrinter(const std::string &printerId);
54 int32_t DisconnectPrinter(const std::string &printerId);
57 int32_t UpdatePrinterState(const std::string &printerId, uint32_t state);
61 int32_t QueryPrinterCapability(const std::string &printerId);
Dprint_extension_callback_stub.h38 bool OnCallback(const std::string &printerId) override;
40 bool OnCallback(const std::string &printerId, PrinterCapability &cap) override;
Dprinter_info.h33 void SetPrinterId(const std::string &printerId);
/base/print/print_fwk/interfaces/kits/napi/src/
Dnapi_inner_print.cpp143 …std::string printerId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ZER… in ConnectPrinter() local
144 PRINT_HILOGD("printerId : %{private}s", printerId.c_str()); in ConnectPrinter()
145 context->printerId = printerId; in ConnectPrinter()
154 int32_t ret = PrintManagerClient::GetInstance()->ConnectPrinter(context->printerId); in ConnectPrinter()
175 …std::string printerId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ZER… in DisconnectPrinter() local
176 PRINT_HILOGD("printerId : %{private}s", printerId.c_str()); in DisconnectPrinter()
177 context->printerId = printerId; in DisconnectPrinter()
186 int32_t ret = PrintManagerClient::GetInstance()->DisconnectPrinter(context->printerId); in DisconnectPrinter()
313 …std::string printerId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ZER… in QueryCapability() local
314 PRINT_HILOGD("printerId : %{private}s", printerId.c_str()); in QueryCapability()
[all …]
Dnapi_print_ext.cpp93 std::string printerId = NapiPrintUtils::GetStringFromValueUtf8(env, value); in RemovePrinters() local
94 if (printerId != "") { in RemovePrinters()
95 context->printerIds.emplace_back(printerId); in RemovePrinters()
185 …std::string printerId = NapiPrintUtils::GetStringFromValueUtf8(env, argv[NapiPrintUtils::INDEX_ZER… in UpdatePrinterState() local
186 PRINT_HILOGD("printerId : %{public}s", printerId.c_str()); in UpdatePrinterState()
191 if (printerId == "" || !IsValidPrinterState(printerState)) { in UpdatePrinterState()
197 context->printerId = printerId; in UpdatePrinterState()
198 PRINT_HILOGD("context->printerId : %{private}s", context->printerId.c_str()); in UpdatePrinterState()
208 …int32_t ret = PrintManagerClient::GetInstance()->UpdatePrinterState(context->printerId, context->p… in UpdatePrinterState()
/base/print/print_fwk/frameworks/helper/src/
Dprinter_info_helper.cpp73 … std::string printerId = NapiPrintUtils::GetStringPropertyUtf8(env, jsValue, PARAM_INFO_PRINTERID); in BuildFromJs() local
75 if (printerId == "" || printerName == "") { in BuildFromJs()
77 printerId.c_str(), printerName.c_str()); in BuildFromJs()
80 nativeObj->SetPrinterId(printerId); in BuildFromJs()
/base/print/print_fwk/test/unittest/fwk_inner_napi_test/
Dprint_manager_client_test.cpp513 std::string printerId = "printId-123"; variable
514 printerInfo.SetPrinterId(printerId);
676 std::string printerId = "printId-123"; variable
677 printerInfo.SetPrinterId(printerId);
718 std::string printerId = "printerId-1"; variable
720 int32_t ret = PrintManagerClient::GetInstance()->ConnectPrinter(printerId);
732 std::string printerId = "printerId-1"; variable
735 int32_t ret = PrintManagerClient::GetInstance()->ConnectPrinter(printerId);
747 std::string printerId = "printerId-1"; variable
750 int32_t ret = PrintManagerClient::GetInstance()->ConnectPrinter(printerId);
[all …]
/base/print/print_fwk/test/unittest/service_test/mock/
Dmock_print_service.h40 int32_t ConnectPrinter(const std::string &printerId) override in ConnectPrinter() argument
44 int32_t DisconnectPrinter(const std::string &printerId) override in DisconnectPrinter() argument
80 int32_t UpdatePrinterState(const std::string &printerId, uint32_t state) override in UpdatePrinterState() argument
96 int32_t QueryPrinterCapability(const std::string &printerId) override in QueryPrinterCapability() argument
/base/print/print_fwk/interfaces/kits/napi/include/
Dnapi_print_ext.h52 std::string printerId = ""; member

12