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 #include "iprint_adapter_inner.h"
17 #include "print_constant.h"
18 #include "print_log.h"
19
20 namespace OHOS::Print {
onStartLayoutWrite(const std::string & jobId,const PrintAttributes & oldAttrs,const PrintAttributes & newAttrs,uint32_t fd,std::function<void (std::string,uint32_t)> writeResultCallback)21 void PrintDocumentInnerAdapter::onStartLayoutWrite(const std::string &jobId, const PrintAttributes &oldAttrs,
22 const PrintAttributes &newAttrs, uint32_t fd,
23 std::function<void(std::string, uint32_t)> writeResultCallback)
24 {
25 PRINT_HILOGI("onStartLayoutWrite jobId:%{public}s", jobId.c_str());
26 // 应用写layout和write file的逻辑
27
28 //
29 writeResultCallback(jobId, PRINT_JOB_CREATE_FILE_COMPLETED_SUCCESS);
30 }
31
onJobStateChanged(const std::string & jobId,uint32_t state)32 void PrintDocumentInnerAdapter::onJobStateChanged(const std::string &jobId, uint32_t state)
33 {
34 PRINT_HILOGI("onJobStateChanged jobId:%{public}s state:%{public}d", jobId.c_str(), state);
35 }
36 }