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_CALLBACK_H 17 #define IPRINT_CALLBACK_H 18 19 #include "iremote_broker.h" 20 #include "iremote_object.h" 21 #include "print_job.h" 22 #include "printer_info.h" 23 24 namespace OHOS::Print { 25 class IPrintCallback : public IRemoteBroker { 26 public: 27 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Print.IPrintCallback"); 28 virtual bool OnCallback() = 0; 29 virtual bool OnCallback(uint32_t state, const PrinterInfo &info) = 0; 30 virtual bool OnCallback(uint32_t state, const PrintJob &info) = 0; 31 virtual bool OnCallback(const std::string &extensionId, const std::string &info) = 0; 32 }; 33 34 enum { 35 PRINT_CALLBACK_TASK, 36 PRINT_CALLBACK_PRINTER, 37 PRINT_CALLBACK_PRINT_JOB, 38 PRINT_CALLBACK_EXTINFO, 39 }; 40 } // namespace OHOS::Print 41 #endif // IPRINT_CALLBACK_H