xref: /onnv-gate/usr/src/lib/print/libpapi-dynamic/common/papi_impl.h (revision 2264:b2b9267d002d)
1*2264Sjacobs /*
2*2264Sjacobs  * CDDL HEADER START
3*2264Sjacobs  *
4*2264Sjacobs  * The contents of this file are subject to the terms of the
5*2264Sjacobs  * Common Development and Distribution License (the "License").
6*2264Sjacobs  * You may not use this file except in compliance with the License.
7*2264Sjacobs  *
8*2264Sjacobs  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*2264Sjacobs  * or http://www.opensolaris.org/os/licensing.
10*2264Sjacobs  * See the License for the specific language governing permissions
11*2264Sjacobs  * and limitations under the License.
12*2264Sjacobs  *
13*2264Sjacobs  * When distributing Covered Code, include this CDDL HEADER in each
14*2264Sjacobs  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*2264Sjacobs  * If applicable, add the following below this CDDL HEADER, with the
16*2264Sjacobs  * fields enclosed by brackets "[]" replaced with your own identifying
17*2264Sjacobs  * information: Portions Copyright [yyyy] [name of copyright owner]
18*2264Sjacobs  *
19*2264Sjacobs  * CDDL HEADER END
20*2264Sjacobs  */
21*2264Sjacobs 
22*2264Sjacobs /*
23*2264Sjacobs  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*2264Sjacobs  * Use is subject to license terms.
25*2264Sjacobs  *
26*2264Sjacobs  */
27*2264Sjacobs 
28*2264Sjacobs #ifndef _PAPI_IMPL_H
29*2264Sjacobs #define	_PAPI_IMPL_H
30*2264Sjacobs 
31*2264Sjacobs /* $Id: papi_impl.h 161 2006-05-03 04:32:59Z njacobs $ */
32*2264Sjacobs 
33*2264Sjacobs #pragma ident	"%Z%%M%	%I%	%E% SMI"
34*2264Sjacobs 
35*2264Sjacobs #include <papi.h>
36*2264Sjacobs 
37*2264Sjacobs #ifdef __cplusplus
38*2264Sjacobs extern "C" {
39*2264Sjacobs #endif
40*2264Sjacobs 
41*2264Sjacobs #include <time.h>
42*2264Sjacobs #include <sys/types.h>
43*2264Sjacobs #include <stdarg.h>
44*2264Sjacobs #include <uri.h>
45*2264Sjacobs 
46*2264Sjacobs /*
47*2264Sjacobs  * Implementation specific types/prototypes/definitions follow
48*2264Sjacobs  *
49*2264Sjacobs  *
50*2264Sjacobs  * Ex:
51*2264Sjacobs  */
52*2264Sjacobs 
53*2264Sjacobs typedef struct {
54*2264Sjacobs 	papi_attribute_t **attributes;
55*2264Sjacobs 	void *so_handle;
56*2264Sjacobs 	void *svc_handle;
57*2264Sjacobs 	char *name;
58*2264Sjacobs 	char *user;
59*2264Sjacobs 	char *password;
60*2264Sjacobs 	int (*authCB)(papi_service_t svc, void *app_data);
61*2264Sjacobs 	papi_encryption_t encryption;
62*2264Sjacobs 	void *app_data;
63*2264Sjacobs 	uri_t *uri;
64*2264Sjacobs 	int peer_fd;
65*2264Sjacobs } service_t;
66*2264Sjacobs 
67*2264Sjacobs typedef struct job {
68*2264Sjacobs 	service_t *svc;
69*2264Sjacobs 	papi_job_t *job;
70*2264Sjacobs } job_t;
71*2264Sjacobs 
72*2264Sjacobs typedef struct {
73*2264Sjacobs 	service_t *svc;
74*2264Sjacobs 	papi_printer_t *printer;
75*2264Sjacobs 	papi_attribute_t **attributes;
76*2264Sjacobs 	char svc_is_internal;
77*2264Sjacobs } printer_t;
78*2264Sjacobs 
79*2264Sjacobs extern papi_status_t psm_open(service_t *svc, char *name);
80*2264Sjacobs extern void *psm_sym(service_t *svc, char *name);
81*2264Sjacobs extern void psm_close(void *handle);
82*2264Sjacobs extern void detailed_error(service_t *svc, char *fmt, ...);
83*2264Sjacobs extern papi_status_t service_connect(service_t *svc, char *uri);
84*2264Sjacobs extern papi_attribute_t **getprinterentry(char *ns);
85*2264Sjacobs extern papi_attribute_t **getprinterbyname(char *name, char *ns);
86*2264Sjacobs extern int setprinterentry(int stayopen, char *ns);
87*2264Sjacobs extern int endprinterentry(int stayopen);
88*2264Sjacobs 
89*2264Sjacobs 
90*2264Sjacobs 
91*2264Sjacobs extern void list_remove();
92*2264Sjacobs 
93*2264Sjacobs #ifdef __cplusplus
94*2264Sjacobs }
95*2264Sjacobs #endif
96*2264Sjacobs 
97*2264Sjacobs #endif /* _PAPI_IMPL_H */
98