146debc2cSopenharmony_ci/*
246debc2cSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
346debc2cSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
446debc2cSopenharmony_ci * you may not use this file except in compliance with the License.
546debc2cSopenharmony_ci * You may obtain a copy of the License at
646debc2cSopenharmony_ci *
746debc2cSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
846debc2cSopenharmony_ci *
946debc2cSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1046debc2cSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1146debc2cSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1246debc2cSopenharmony_ci * See the License for the specific language governing permissions and
1346debc2cSopenharmony_ci * limitations under the License.
1446debc2cSopenharmony_ci */
1546debc2cSopenharmony_ci#define private public
1646debc2cSopenharmony_ci#define protected public
1746debc2cSopenharmony_ci#include "printcupsclient_fuzzer.h"
1846debc2cSopenharmony_ci#include "fuzzer/FuzzedDataProvider.h"
1946debc2cSopenharmony_ci#include "print_constant.h"
2046debc2cSopenharmony_ci#include "printer_capability.h"
2146debc2cSopenharmony_ci#include "print_log.h"
2246debc2cSopenharmony_ci#include "print_cups_client.h"
2346debc2cSopenharmony_ci
2446debc2cSopenharmony_cinamespace OHOS {
2546debc2cSopenharmony_cinamespace Print {
2646debc2cSopenharmony_ciconstexpr uint8_t MAX_STRING_LENGTH = 255;
2746debc2cSopenharmony_ciconstexpr int MAX_SET_NUMBER = 100;
2846debc2cSopenharmony_ciconstexpr size_t FOO_MAX_LEN = 1024;
2946debc2cSopenharmony_ciconstexpr size_t U32_AT_SIZE = 4;
3046debc2cSopenharmony_ci
3146debc2cSopenharmony_civoid TestQueryPPDInformation(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
3246debc2cSopenharmony_ci{
3346debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
3446debc2cSopenharmony_ci    std::string makeModelStr = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
3546debc2cSopenharmony_ci    std::string ppd = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
3646debc2cSopenharmony_ci    std::vector<std::string> ppds;
3746debc2cSopenharmony_ci    ppds.push_back(ppd);
3846debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->QueryPPDInformation(makeModelStr.c_str(), ppds);
3946debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->StopCupsdService();
4046debc2cSopenharmony_ci}
4146debc2cSopenharmony_ci
4246debc2cSopenharmony_civoid TestAddPrinterToCups(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
4346debc2cSopenharmony_ci{
4446debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
4546debc2cSopenharmony_ci    std::string printerUri = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
4646debc2cSopenharmony_ci    std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
4746debc2cSopenharmony_ci    std::string printerMake = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
4846debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->AddPrinterToCups(printerUri, printerName, printerMake);
4946debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->JobCompleteCallback();
5046debc2cSopenharmony_ci}
5146debc2cSopenharmony_ci
5246debc2cSopenharmony_civoid TestQueryPrinterCapabilityByUri(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
5346debc2cSopenharmony_ci{
5446debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
5546debc2cSopenharmony_ci    std::string printerUri = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
5646debc2cSopenharmony_ci    std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
5746debc2cSopenharmony_ci    PrinterCapability printerCaps;
5846debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->QueryPrinterCapabilityByUri(printerUri, printerName, printerCaps);
5946debc2cSopenharmony_ci}
6046debc2cSopenharmony_ci
6146debc2cSopenharmony_civoid TestDeleteCupsPrinter(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
6246debc2cSopenharmony_ci{
6346debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
6446debc2cSopenharmony_ci    std::string printerNameStr = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
6546debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->DeleteCupsPrinter(printerNameStr.c_str());
6646debc2cSopenharmony_ci}
6746debc2cSopenharmony_ci
6846debc2cSopenharmony_civoid TestAddCupsPrintJob(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
6946debc2cSopenharmony_ci{
7046debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
7146debc2cSopenharmony_ci    PrintJob jobInfo;
7246debc2cSopenharmony_ci    std::string option = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
7346debc2cSopenharmony_ci    jobInfo.SetOption(option);
7446debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->AddCupsPrintJob(jobInfo);
7546debc2cSopenharmony_ci}
7646debc2cSopenharmony_ci
7746debc2cSopenharmony_civoid TestCancelCupsJob(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
7846debc2cSopenharmony_ci{
7946debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
8046debc2cSopenharmony_ci    std::string serviceJobId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
8146debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->CancelCupsJob(serviceJobId);
8246debc2cSopenharmony_ci}
8346debc2cSopenharmony_ci
8446debc2cSopenharmony_civoid TestQueryAddedPrinterList(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
8546debc2cSopenharmony_ci{
8646debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
8746debc2cSopenharmony_ci    std::string printerNameStr = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
8846debc2cSopenharmony_ci    std::vector<std::string> printerName;
8946debc2cSopenharmony_ci    printerName.push_back(printerNameStr);
9046debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->QueryAddedPrinterList(printerName);
9146debc2cSopenharmony_ci}
9246debc2cSopenharmony_ci
9346debc2cSopenharmony_civoid TestGetPPDFile(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
9446debc2cSopenharmony_ci{
9546debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
9646debc2cSopenharmony_ci    std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
9746debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->GetPPDFile(printerName);
9846debc2cSopenharmony_ci}
9946debc2cSopenharmony_ci
10046debc2cSopenharmony_civoid TestSetDefaultPrinter(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
10146debc2cSopenharmony_ci{
10246debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
10346debc2cSopenharmony_ci    std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
10446debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->SetDefaultPrinter(printerName);
10546debc2cSopenharmony_ci}
10646debc2cSopenharmony_ci
10746debc2cSopenharmony_civoid TestQueryPrinterAttrList(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
10846debc2cSopenharmony_ci{
10946debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
11046debc2cSopenharmony_ci    std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
11146debc2cSopenharmony_ci    std::string key = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
11246debc2cSopenharmony_ci    std::vector<std::string> keyList;
11346debc2cSopenharmony_ci    keyList.push_back(key);
11446debc2cSopenharmony_ci    std::string value = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
11546debc2cSopenharmony_ci    std::vector<std::string> valueList;
11646debc2cSopenharmony_ci    valueList.push_back(value);
11746debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->QueryPrinterAttrList(printerName, keyList, valueList);
11846debc2cSopenharmony_ci}
11946debc2cSopenharmony_ci
12046debc2cSopenharmony_civoid TestQueryPrinterInfoByPrinterId(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
12146debc2cSopenharmony_ci{
12246debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
12346debc2cSopenharmony_ci    std::string printerId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
12446debc2cSopenharmony_ci    PrinterInfo info;
12546debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->QueryPrinterInfoByPrinterId(printerId, info);
12646debc2cSopenharmony_ci}
12746debc2cSopenharmony_ci
12846debc2cSopenharmony_civoid TestCheckPrinterMakeModel(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
12946debc2cSopenharmony_ci{
13046debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
13146debc2cSopenharmony_ci    JobParameters jobParams;
13246debc2cSopenharmony_ci    jobParams.printerUri = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
13346debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->CheckPrinterMakeModel(&jobParams);
13446debc2cSopenharmony_ci}
13546debc2cSopenharmony_ci
13646debc2cSopenharmony_civoid TestDeletePrinterFromCups(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
13746debc2cSopenharmony_ci{
13846debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->InitCupsResources();
13946debc2cSopenharmony_ci    std::string printerName = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
14046debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->DeleteCupsPrinter(printerName.c_str());
14146debc2cSopenharmony_ci}
14246debc2cSopenharmony_ci
14346debc2cSopenharmony_civoid TestCheckPrinterOnline(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
14446debc2cSopenharmony_ci{
14546debc2cSopenharmony_ci    JobMonitorParam monitorParam;
14646debc2cSopenharmony_ci    monitorParam.printerUri = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
14746debc2cSopenharmony_ci    monitorParam.printerId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
14846debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->CheckPrinterOnline(&monitorParam);
14946debc2cSopenharmony_ci}
15046debc2cSopenharmony_ci
15146debc2cSopenharmony_civoid TestGetIpAddress(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
15246debc2cSopenharmony_ci{
15346debc2cSopenharmony_ci    unsigned int number = dataProvider->ConsumeIntegralInRange<unsigned int>(0, MAX_SET_NUMBER);
15446debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->GetIpAddress(number);
15546debc2cSopenharmony_ci}
15646debc2cSopenharmony_ci
15746debc2cSopenharmony_civoid TestIsIpConflict(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
15846debc2cSopenharmony_ci{
15946debc2cSopenharmony_ci    std::string printerId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
16046debc2cSopenharmony_ci    std::string nic = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
16146debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->IsIpConflict(printerId, nic);
16246debc2cSopenharmony_ci}
16346debc2cSopenharmony_ci
16446debc2cSopenharmony_civoid TestConvertInchTo100MM(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
16546debc2cSopenharmony_ci{
16646debc2cSopenharmony_ci    int num = dataProvider->ConsumeIntegralInRange<int>(0, MAX_SET_NUMBER);
16746debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->ConvertInchTo100MM(num);
16846debc2cSopenharmony_ci}
16946debc2cSopenharmony_ci
17046debc2cSopenharmony_civoid TestGetColorString(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
17146debc2cSopenharmony_ci{
17246debc2cSopenharmony_ci    uint32_t colorCode = dataProvider->ConsumeIntegralInRange<uint32_t>(0, MAX_SET_NUMBER);
17346debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->GetColorString(colorCode);
17446debc2cSopenharmony_ci}
17546debc2cSopenharmony_ci
17646debc2cSopenharmony_civoid TestGetDulpexString(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
17746debc2cSopenharmony_ci{
17846debc2cSopenharmony_ci    uint32_t duplexCode = dataProvider->ConsumeIntegralInRange<uint32_t>(0, MAX_SET_NUMBER);
17946debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->GetDulpexString(duplexCode);
18046debc2cSopenharmony_ci}
18146debc2cSopenharmony_ci
18246debc2cSopenharmony_civoid TestGetMedieSize(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
18346debc2cSopenharmony_ci{
18446debc2cSopenharmony_ci    PrintJob printJob;
18546debc2cSopenharmony_ci    printJob.SetJobId(dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH));
18646debc2cSopenharmony_ci    printJob.SetPrinterId(dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH));
18746debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->GetMedieSize(printJob);
18846debc2cSopenharmony_ci}
18946debc2cSopenharmony_ci
19046debc2cSopenharmony_civoid TestDumpJobParameters(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
19146debc2cSopenharmony_ci{
19246debc2cSopenharmony_ci    JobParameters jobParams;
19346debc2cSopenharmony_ci    jobParams.serviceJobId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
19446debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->DumpJobParameters(&jobParams);
19546debc2cSopenharmony_ci}
19646debc2cSopenharmony_ci
19746debc2cSopenharmony_civoid TestBuildJobParameters(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
19846debc2cSopenharmony_ci{
19946debc2cSopenharmony_ci    PrintJob printJob;
20046debc2cSopenharmony_ci    printJob.SetJobId(dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH));
20146debc2cSopenharmony_ci    printJob.SetPrinterId(dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH));
20246debc2cSopenharmony_ci    printJob.SetOption(dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH));
20346debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->BuildJobParameters(printJob);
20446debc2cSopenharmony_ci}
20546debc2cSopenharmony_ci
20646debc2cSopenharmony_civoid TestQueryJobState(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
20746debc2cSopenharmony_ci{
20846debc2cSopenharmony_ci    http_t *http;
20946debc2cSopenharmony_ci    JobMonitorParam param;
21046debc2cSopenharmony_ci    param.serviceJobId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
21146debc2cSopenharmony_ci    JobStatus jobStatus;
21246debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->QueryJobState(http, &param, &jobStatus);
21346debc2cSopenharmony_ci}
21446debc2cSopenharmony_ci
21546debc2cSopenharmony_civoid TestGetBlockedSubstate(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
21646debc2cSopenharmony_ci{
21746debc2cSopenharmony_ci    JobStatus jobStatus;
21846debc2cSopenharmony_ci    std::string printerReason = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
21946debc2cSopenharmony_ci    printerReason.copy(jobStatus.printer_state_reasons, printerReason.length() + 1);
22046debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->GetBlockedSubstate(&jobStatus);
22146debc2cSopenharmony_ci}
22246debc2cSopenharmony_ci
22346debc2cSopenharmony_civoid TestReportBlockedReason(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
22446debc2cSopenharmony_ci{
22546debc2cSopenharmony_ci    JobMonitorParam param;
22646debc2cSopenharmony_ci    param.serviceJobId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
22746debc2cSopenharmony_ci    JobStatus jobStatus;
22846debc2cSopenharmony_ci    std::string printerReason = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
22946debc2cSopenharmony_ci    printerReason.copy(jobStatus.printer_state_reasons, printerReason.length() + 1);
23046debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->ReportBlockedReason(&param, &jobStatus);
23146debc2cSopenharmony_ci}
23246debc2cSopenharmony_ci
23346debc2cSopenharmony_civoid TestJobStatusCallback(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
23446debc2cSopenharmony_ci{
23546debc2cSopenharmony_ci    JobMonitorParam param;
23646debc2cSopenharmony_ci    param.serviceJobId = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
23746debc2cSopenharmony_ci    JobStatus jobStatus;
23846debc2cSopenharmony_ci    std::string printerReason = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
23946debc2cSopenharmony_ci    printerReason.copy(jobStatus.printer_state_reasons, printerReason.length() + 1);
24046debc2cSopenharmony_ci    bool isOffline = dataProvider->ConsumeBool();
24146debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->JobStatusCallback(&param, &jobStatus, isOffline);
24246debc2cSopenharmony_ci}
24346debc2cSopenharmony_ci
24446debc2cSopenharmony_civoid TestUpdateJobStatus(const uint8_t *data, size_t size, FuzzedDataProvider *dataProvider)
24546debc2cSopenharmony_ci{
24646debc2cSopenharmony_ci    JobStatus prevousJobStatus;
24746debc2cSopenharmony_ci    std::string prevousPrinterReason = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
24846debc2cSopenharmony_ci    prevousPrinterReason.copy(prevousJobStatus.printer_state_reasons, prevousPrinterReason.length() + 1);
24946debc2cSopenharmony_ci    JobStatus jobStatus;
25046debc2cSopenharmony_ci    std::string printerReason = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH);
25146debc2cSopenharmony_ci    printerReason.copy(jobStatus.printer_state_reasons, printerReason.length() + 1);
25246debc2cSopenharmony_ci    PrintCupsClient::GetInstance()->UpdateJobStatus(&prevousJobStatus, &jobStatus);
25346debc2cSopenharmony_ci}
25446debc2cSopenharmony_ci
25546debc2cSopenharmony_ci}  // namespace Print
25646debc2cSopenharmony_ci}  // namespace OHOS
25746debc2cSopenharmony_ci
25846debc2cSopenharmony_ci/* Fuzzer entry point */
25946debc2cSopenharmony_ciextern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
26046debc2cSopenharmony_ci{
26146debc2cSopenharmony_ci    /* Run your code on data */
26246debc2cSopenharmony_ci    if (data == nullptr) {
26346debc2cSopenharmony_ci        return 0;
26446debc2cSopenharmony_ci    }
26546debc2cSopenharmony_ci
26646debc2cSopenharmony_ci    if (size < OHOS::Print::U32_AT_SIZE || size > OHOS::Print::FOO_MAX_LEN) {
26746debc2cSopenharmony_ci    }
26846debc2cSopenharmony_ci
26946debc2cSopenharmony_ci    FuzzedDataProvider dataProvider(data, size);
27046debc2cSopenharmony_ci    OHOS::Print::TestQueryPPDInformation(data, size, &dataProvider);
27146debc2cSopenharmony_ci    OHOS::Print::TestAddPrinterToCups(data, size, &dataProvider);
27246debc2cSopenharmony_ci    OHOS::Print::TestQueryPrinterCapabilityByUri(data, size, &dataProvider);
27346debc2cSopenharmony_ci    OHOS::Print::TestDeleteCupsPrinter(data, size, &dataProvider);
27446debc2cSopenharmony_ci    OHOS::Print::TestAddCupsPrintJob(data, size, &dataProvider);
27546debc2cSopenharmony_ci    OHOS::Print::TestCancelCupsJob(data, size, &dataProvider);
27646debc2cSopenharmony_ci    OHOS::Print::TestQueryAddedPrinterList(data, size, &dataProvider);
27746debc2cSopenharmony_ci    OHOS::Print::TestGetPPDFile(data, size, &dataProvider);
27846debc2cSopenharmony_ci    OHOS::Print::TestSetDefaultPrinter(data, size, &dataProvider);
27946debc2cSopenharmony_ci    OHOS::Print::TestQueryPrinterAttrList(data, size, &dataProvider);
28046debc2cSopenharmony_ci    OHOS::Print::TestQueryPrinterInfoByPrinterId(data, size, &dataProvider);
28146debc2cSopenharmony_ci    OHOS::Print::TestCheckPrinterMakeModel(data, size, &dataProvider);
28246debc2cSopenharmony_ci    OHOS::Print::TestDeletePrinterFromCups(data, size, &dataProvider);
28346debc2cSopenharmony_ci    OHOS::Print::TestCheckPrinterOnline(data, size, &dataProvider);
28446debc2cSopenharmony_ci    OHOS::Print::TestGetIpAddress(data, size, &dataProvider);
28546debc2cSopenharmony_ci    OHOS::Print::TestIsIpConflict(data, size, &dataProvider);
28646debc2cSopenharmony_ci    OHOS::Print::TestConvertInchTo100MM(data, size, &dataProvider);
28746debc2cSopenharmony_ci    OHOS::Print::TestGetColorString(data, size, &dataProvider);
28846debc2cSopenharmony_ci    OHOS::Print::TestGetDulpexString(data, size, &dataProvider);
28946debc2cSopenharmony_ci    OHOS::Print::TestGetMedieSize(data, size, &dataProvider);
29046debc2cSopenharmony_ci    OHOS::Print::TestDumpJobParameters(data, size, &dataProvider);
29146debc2cSopenharmony_ci    OHOS::Print::TestBuildJobParameters(data, size, &dataProvider);
29246debc2cSopenharmony_ci    OHOS::Print::TestQueryJobState(data, size, &dataProvider);
29346debc2cSopenharmony_ci    OHOS::Print::TestGetBlockedSubstate(data, size, &dataProvider);
29446debc2cSopenharmony_ci    OHOS::Print::TestReportBlockedReason(data, size, &dataProvider);
29546debc2cSopenharmony_ci    OHOS::Print::TestJobStatusCallback(data, size, &dataProvider);
29646debc2cSopenharmony_ci    OHOS::Print::TestUpdateJobStatus(data, size, &dataProvider);
29746debc2cSopenharmony_ci
29846debc2cSopenharmony_ci    return 0;
29946debc2cSopenharmony_ci}
300