4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
31 /* $Id: papi_impl.h 161 2006-05-03 04:32:59Z njacobs $ */
33 #pragma ident "%Z%%M% %I% %E% SMI"
42 #include <sys/types.h>
47 papi_attribute_t
**attributes
;
51 papi_attribute_t
**attributes
;
54 typedef struct stream
{
55 job_t
*job
; /* describes current job */
56 int fd
; /* the fd to write to */
57 char *metadata
; /* the converted metadata */
58 char *dfname
; /* the stream data (if we can't stream) */
62 typedef struct { /* used for query operations only */
69 papi_attribute_t
**attributes
; /* extra info */
70 uri_t
*uri
; /* printer uri */
71 cache_t
*cache
; /* printer/job cache */
72 int (*authCB
)(papi_service_t svc
, void *app_data
); /* unused */
73 void *app_data
; /* unused */
77 extern papi_status_t
service_fill_in(service_t
*svc
, char *name
);
78 extern void detailed_error(service_t
*svc
, char *fmt
, ...);
79 extern char *queue_name_from_uri(uri_t
*uri
);
80 extern char *fdgets(char *buf
, size_t len
, int fd
);
84 /* open a connection to remote print service */
85 extern int lpd_open(service_t
*svc
, char type
, char **args
,
88 extern papi_status_t
lpd_purge_jobs(service_t
*svc
, job_t
***jobs
);
89 extern papi_status_t
lpd_cancel_job(service_t
*svc
, int job_id
);
91 extern papi_status_t
lpd_submit_job(service_t
*svc
, char *metadata
,
92 papi_attribute_t
***attributes
, int *fd
);
93 extern papi_status_t
lpd_job_add_attributes(service_t
*svc
,
94 papi_attribute_t
**attributes
,
96 papi_attribute_t
***used_attributes
);
97 extern papi_status_t
lpd_job_add_files(service_t
*svc
,
98 papi_attribute_t
**attributes
, char **files
,
100 papi_attribute_t
***used_attributes
);
101 /* query cache lookup routines */
102 extern papi_status_t
lpd_find_printer_info(service_t
*svc
, printer_t
**result
);
103 extern papi_status_t
lpd_find_job_info(service_t
*svc
, int job_id
, job_t
**job
);
104 extern papi_status_t
lpd_find_jobs_info(service_t
*svc
, job_t
***jobs
);
111 #endif /* _PAPI_IMPL_H */