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]
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
29 #pragma ident "%Z%%M% %I% %E% SMI"
38 #include <sys/types.h>
41 /* lpsched include files */
49 * Implementation specific types/prototypes/definitions follow
56 papi_attribute_t
**attributes
;
57 int (*authCB
)(papi_service_t svc
, void *app_data
);
65 papi_attribute_t
**attributes
; /* job attributes */
69 papi_attribute_t
**attributes
; /* queue attributes */
79 extern void lpsched_read_job_configuration(service_t
*svc
, job_t
*j
,
81 extern void lpsched_request_to_job(REQUEST
*r
, job_t
*j
);
83 extern void job_status_to_attributes(job_t
*job
, char *req_id
, char *user
,
84 char *slabel
, size_t size
, time_t date
,
85 short state
, char *destination
, char *form
,
86 char *charset
, short rank
, char *file
);
87 extern papi_status_t
addLPString(papi_attribute_t
***list
,
88 int flags
, char *name
, char *value
);
89 extern papi_status_t
papiAttributeListAddLPStrings(papi_attribute_t
***list
,
90 int flags
, char *name
, char **values
);
91 extern void papiAttributeListGetLPString(papi_attribute_t
**attributes
,
92 char *key
, char **string
);
93 extern void papiAttributeListGetLPStrings(papi_attribute_t
**attributes
,
94 char *key
, char ***string
);
96 extern papi_status_t
lpsched_printer_configuration_to_attributes(
97 service_t
*svc
, printer_t
*p
, char *dest
);
98 extern papi_status_t
lpsched_class_configuration_to_attributes(service_t
*svc
,
99 printer_t
*p
, char *dest
);
100 extern papi_status_t
class_status_to_attributes(printer_t
*p
, char *printer
,
101 short status
, char *reject_reason
, long reject_date
);
102 extern papi_status_t
lpsched_reject_printer(papi_service_t svc
,
103 char *printer
, char *message
);
104 extern papi_status_t
lpsched_accept_printer(papi_service_t svc
,
106 extern papi_status_t
lpsched_disable_printer(papi_service_t svc
,
107 char *printer
, char *message
);
108 extern papi_status_t
lpsched_enable_printer(papi_service_t svc
,
110 extern papi_status_t
lpsched_status_to_papi_status(int status
);
111 extern papi_status_t
job_attributes_to_lpsched_request(papi_service_t svc
,
112 REQUEST
*r
, papi_attribute_t
**attributes
);
113 extern papi_status_t
lpsched_alloc_files(papi_service_t svc
, int number
,
115 extern papi_status_t
lpsched_commit_job(papi_service_t svc
, char *job
,
117 extern papi_status_t
lpsched_start_change(papi_service_t svc
,
118 char *printer
, int32_t job_id
, char **tmp
);
119 extern papi_status_t
lpsched_end_change(papi_service_t svc
,
120 char *printer
, int32_t job_id
);
121 extern papi_status_t
printer_status_to_attributes(printer_t
*p
, char *printer
,
122 char *form
, char *character_set
, char *reject_reason
,
123 char *disable_reason
, short status
, char *request_id
, long enable_date
,
125 extern papi_status_t
lpsched_remove_printer(papi_service_t svc
, char *dest
);
126 extern papi_status_t
lpsched_remove_class(papi_service_t svc
, char *dest
);
127 extern papi_status_t
lpsched_add_modify_printer(papi_service_t svc
, char *dest
,
128 papi_attribute_t
**attributes
, int type
);
129 extern papi_status_t
lpsched_add_modify_class(papi_service_t svc
, char *dest
,
130 papi_attribute_t
**attributes
);
132 extern void lpsched_service_information(papi_attribute_t
***attrs
);
133 extern void lpsched_request_to_job_attributes(REQUEST
*r
, job_t
*j
);
134 extern void detailed_error(service_t
*svc
, char *fmt
, ...);
135 extern char *banner_type(unsigned short banner
);
136 extern char *mime_type_to_lp_type(char *mime_type
);
137 extern char *lp_type_to_mime_type(char *lp_type
);
138 extern char *fifo_name_from_uri(char *uri
);
139 extern char *printer_name_from_uri_id(char *uri
, int32_t id
);
141 extern int snd_msg(service_t
*svc
, int type
, ...);
142 extern int rcv_msg(service_t
*svc
, int type
, ...);
148 #endif /* _PAPI_IMPL_H */