1 /*
2 * Copyright (c) 2024 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 "print_cups_wrapper.h"
17
18 namespace OHOS::Print {
19
GetNamedDest(http_t * http,const char * name,const char * instance)20 cups_dest_t* PrintCupsWrapper::GetNamedDest(http_t *http, const char *name, const char *instance)
21 {
22 return cupsGetNamedDest(http, name, instance);
23 }
24
FreeDests(int num,cups_dest_t * dests)25 void PrintCupsWrapper::FreeDests(int num, cups_dest_t *dests)
26 {
27 cupsFreeDests(num, dests);
28 }
29
FreeDestInfo(cups_dinfo_t * dinfo)30 void PrintCupsWrapper::FreeDestInfo(cups_dinfo_t *dinfo)
31 {
32 cupsFreeDestInfo(dinfo);
33 }
34
DoRequest(http_t * http,ipp_t * request,const char * resource)35 ipp_t *PrintCupsWrapper::DoRequest(http_t *http, ipp_t *request, const char *resource)
36 {
37 return cupsDoRequest(http, request, resource);
38 }
39
CopyDestInfo(http_t * http,cups_dest_t * dest)40 cups_dinfo_t *PrintCupsWrapper::CopyDestInfo(http_t *http, cups_dest_t *dest)
41 {
42 return cupsCopyDestInfo(http, dest);
43 }
44
FreeRequest(ipp_t * response)45 void PrintCupsWrapper::FreeRequest(ipp_t *response)
46 {
47 ippDelete(response);
48 }
49 }