1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef IPRINT_EXTENSION_CALLBACK_H 17 #define IPRINT_EXTENSION_CALLBACK_H 18 19 #include "iremote_broker.h" 20 #include "iremote_object.h" 21 #include "print_job.h" 22 #include "printer_capability.h" 23 24 namespace OHOS::Print { 25 class IPrintExtensionCallback : public IRemoteBroker { 26 public: 27 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Print.IPrintExtensionCallback"); 28 virtual bool OnCallback() = 0; 29 virtual bool OnCallback(const std::string &printerId) = 0; 30 virtual bool OnCallback(const PrintJob &job) = 0; 31 virtual bool OnCallback(const std::string &printerId, PrinterCapability &cap) = 0; 32 }; 33 34 enum { 35 PRINT_EXTCB, 36 PRINT_EXTCB_PRINTER, 37 PRINT_EXTCB_PRINTJOB, 38 PRINT_EXTCB_PRINTCAPABILITY, 39 }; 40 41 enum { 42 PRINT_EXTCB_START_DISCOVERY, 43 PRINT_EXTCB_STOP_DISCOVERY, 44 PRINT_EXTCB_CONNECT_PRINTER, 45 PRINT_EXTCB_DISCONNECT_PRINTER, 46 PRINT_EXTCB_START_PRINT, 47 PRINT_EXTCB_CANCEL_PRINT, 48 PRINT_EXTCB_REQUEST_CAP, 49 PRINT_EXTCB_REQUEST_PREVIEW, 50 PRINT_EXTCB_DESTROY_EXTENSION, 51 PRINT_EXTCB_MAX, 52 }; 53 } // namespace OHOS::Print 54 #endif // IPRINT_EXTCB_H