xref: /titanic_50/usr/src/lib/print/libpapi-dynamic/common/papi_impl.h (revision 9a70fc3be3b1e966bf78825cdb8d509963a6f0a1)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  */
27 
28 #ifndef _PAPI_IMPL_H
29 #define	_PAPI_IMPL_H
30 
31 /* $Id: papi_impl.h 161 2006-05-03 04:32:59Z njacobs $ */
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"
34 
35 #include <papi.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #include <time.h>
42 #include <sys/types.h>
43 #include <stdarg.h>
44 #include <uri.h>
45 
46 /*
47  * Implementation specific types/prototypes/definitions follow
48  *
49  *
50  * Ex:
51  */
52 
53 typedef struct {
54 	papi_attribute_t **attributes;
55 	void *so_handle;
56 	void *svc_handle;
57 	char *name;
58 	char *user;
59 	char *password;
60 	int (*authCB)(papi_service_t svc, void *app_data);
61 	papi_encryption_t encryption;
62 	void *app_data;
63 	uri_t *uri;
64 	int peer_fd;
65 } service_t;
66 
67 typedef struct job {
68 	service_t *svc;
69 	papi_job_t *job;
70 } job_t;
71 
72 typedef struct {
73 	service_t *svc;
74 	papi_printer_t *printer;
75 	papi_attribute_t **attributes;
76 	char svc_is_internal;
77 } printer_t;
78 
79 extern papi_status_t psm_open(service_t *svc, char *name);
80 extern void *psm_sym(service_t *svc, char *name);
81 extern void psm_close(void *handle);
82 extern void detailed_error(service_t *svc, char *fmt, ...);
83 extern papi_status_t service_connect(service_t *svc, char *uri);
84 extern papi_attribute_t **getprinterentry(char *ns);
85 extern papi_attribute_t **getprinterbyname(char *name, char *ns);
86 extern int setprinterentry(int stayopen, char *ns);
87 extern int endprinterentry(int stayopen);
88 
89 
90 
91 extern void list_remove();
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif /* _PAPI_IMPL_H */
98