Name Date Size

..25-Oct-20244 KiB

backport-Also-fix-cupsfilter.patchH A D25-Oct-20241.2 KiB

backport-CVE-2022-26691.patchH A D25-Oct-20241.1 KiB

backport-CVE-2023-32324.patchH A D25-Oct-2024944

backport-CVE-2023-34241.patchH A D25-Oct-20242.1 KiB

backport-CVE-2023-4504.patchH A D25-Oct-20241.2 KiB

backport-CVE-2024-35235.patchH A D25-Oct-20242.9 KiB

backport-Remove-legacy-code-for-RIP_MAX_CACHE-environment-variable.patchH A D25-Oct-20241.6 KiB

BUILD.gnH A D25-Oct-202413.3 KiB

bundle.jsonH A D25-Oct-20241.4 KiB

config.hH A D25-Oct-20243 KiB

cups-2.4.0-source.tar.gzH A D25-Oct-20247.7 MiB

cups-banners.patchH A D25-Oct-2024532

cups-direct-usb.patchH A D25-Oct-2024912

cups-driverd-timeout.patchH A D25-Oct-2024741

cups-freebind.patchH A D25-Oct-2024704

cups-ipp-multifile.patchH A D25-Oct-2024700

cups-multilib.patchH A D25-Oct-2024580

cups-system-auth.patchH A D25-Oct-20241.7 KiB

cups-uri-compat.patchH A D25-Oct-20241.5 KiB

cups-usb-paperout.patchH A D25-Oct-20241.3 KiB

cups-web-devices-timeout.patchH A D25-Oct-2024758

cups.gniH A D25-Oct-20241.3 KiB

cups.specH A D25-Oct-202418.7 KiB

cups.yamlH A D25-Oct-2024663

cupsprinter.pngH A D25-Oct-20242.1 KiB

fix-httpAddrGetList-test-case-fail.patchH A D25-Oct-20241.4 KiB

generate_mime_convs.pyH A D25-Oct-20241 KiB

install.pyH A D25-Oct-20243.3 KiB

LICENSEH A D25-Oct-202411.1 KiB

OAT.xmlH A D25-Oct-20247.7 KiB

ohos-add-openssl.patchH A D25-Oct-202444.6 KiB

ohos-modify-pthread.patchH A D25-Oct-2024332

ohos-multi-file-print.patchH A D25-Oct-2024432

ohos-usb-manager.patchH A D25-Oct-202441.3 KiB

ohos-usb-print.patchH A D25-Oct-202453.5 KiB

ohos_ip_conflict.patchH A D25-Oct-202413.5 KiB

README.mdH A D25-Oct-20242.6 KiB

README.OpenSourceH A D25-Oct-2024620

README_zh.mdH A D25-Oct-20244 KiB

README.md

1# CUPS
2## Introduction
3OpenPrinting CUPS is the most current version of CUPS, a standards-based, open source printing system for Linux® and other Unix®-like operating systems. CUPS supports printing to:
4- AirPrint™ and IPP Everywhere™ printers,
5- Network and local (USB) printers with Printer Applications, and
6- Network and local (USB) printers with (legacy) PPD-based printer drivers.
7
8You can also learn more about the CUPS project through [the official website](https://github.com/OpenPrinting/cups)
9
10## Background Brief
11In the process of OpenHarmony's southward ecological development, it is necessary to be compatible with printers in the stock market. The use of CUPS printing system can directly connect with most printers in the market, which also reduces the difficulty for printer manufacturers to adapt to OpenHarmony.
12
13## How to use
14### 1、Header file import
15```c
16#include <cups/cups-private.h>
17```
18### 2、Add Compilation Dependency
19Add in the bundle. json file
20```json
21"deps": {
22  "third_part": [
23    "cups"
24  ]
25}
26```
27Add dependencies where needed in BUILD.gn
28
29```json
30deps += [ "//third_party/cups:cups" ]
31```
32### 3、Example of interface usage
33```c
34// Example of using CUPS interface to query printer capabilities
35ipp_t *request; /* IPP Request */
36ipp_t *response; /* IPP response */
37http_t *http = NULL;
38char scheme[HTTP_MAX_URI]; // Protocol 
39char username[HTTP_MAX_URI];
40char host[HTTP_MAX_URI];
41int port;
42// Declare which printer capabilities need to be queried, here are all
43static const char * const pattrs[] = {
44    "all"
45};
46
47// Connect to printer
48http = httpConnect2(host, port, NULL, AF_UNSPEC, HTTP_ENCRYPTION_IF_REQUESTED, 1, TIME_OUT, NULL);
49if (http == nullptr) {
50    return;
51}
52request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
53ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printerUri.c_str());
54ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
55ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes",
56(int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
57response = cupsDoRequest(http, request, "/");
58// parse response
59if (cupsLastError() > IPP_STATUS_OK_CONFLICTING) {
60    ippDelete(response);
61    return;
62}
63// close http
64httpClose(http);
65```
66
67#### Repositories Involved
68[third_party_cups-filters](https://gitee.com/openharmony/third_party_cups-filters)
69
70[print_print_fwk](https://gitee.com/openharmony/print_print_fwk)
71
72#### Contribution
73[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/参与贡献.md)
74
75[Commit message spec](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83)
76
77

README.OpenSource

1[
2    {
3        "Name"                  : "openEuler:cups",
4        "License"               : "Apache 2.0 License",
5        "License File"          : "LICENSE",
6        "Version Number"        : "2.4.0-10.oe2203sp3",
7        "Owner"                 : "caizihua1@huawei.com",
8        "Upstream URL"          : "https://repo.openeuler.org/openEuler-22.03-LTS-SP3/source/Packages/cups-2.4.0-10.oe2203sp3.src.rpm",
9        "Description"           : "OpenPrinting CUPS is the most current version of CUPS, a standards-based, open source printing system for Linux® and other Unix®-like operating systems"
10    }
11]
12