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 PRINT_CALLBACK_PROXY_H
17 #define PRINT_CALLBACK_PROXY_H
18 
19 #include "iprint_callback.h"
20 #include "iremote_proxy.h"
21 
22 namespace OHOS::Print {
23 class PrintCallbackProxy : public IRemoteProxy<IPrintCallback> {
24 public:
25     explicit PrintCallbackProxy(const sptr<IRemoteObject> &impl);
26     ~PrintCallbackProxy() = default;
27     bool OnCallback() override;
28     bool OnCallback(uint32_t state, const PrinterInfo &info) override;
29     bool OnCallback(uint32_t state, const PrintJob &info) override;
30     bool OnCallback(const std::string &extensionId, const std::string &info) override;
31     bool OnCallbackAdapterLayout(const std::string &jobId, const PrintAttributes &oldAttrs,
32         const PrintAttributes &newAttrs, uint32_t fd) override;
33     bool onCallbackAdapterJobStateChanged(const std::string jobId, const uint32_t state,
34         const uint32_t subState) override;
35     bool OnCallbackAdapterGetFile(uint32_t state) override;
36 
37 private:
38     static inline BrokerDelegator<PrintCallbackProxy> delegator_;
39 };
40 }  // namespace OHOS::Print
41 #endif  // PRINT_CALLBACK_PROXY_H
42