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 /* $Id: common.c 151 2006-04-25 16:55:34Z njacobs $ */
29*2264Sjacobs 
30*2264Sjacobs #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*2264Sjacobs 
32*2264Sjacobs /*
33*2264Sjacobs  * Shared "unsupported" function implementations that can be overridden
34*2264Sjacobs  * by libpapi and the various print service modules (psms).
35*2264Sjacobs  */
36*2264Sjacobs 
37*2264Sjacobs #include <stdlib.h>
38*2264Sjacobs #include <papi.h>
39*2264Sjacobs 
40*2264Sjacobs static papi_status_t
41*2264Sjacobs _unsupported()
42*2264Sjacobs {
43*2264Sjacobs 	return (PAPI_OPERATION_NOT_SUPPORTED);
44*2264Sjacobs }
45*2264Sjacobs 
46*2264Sjacobs static void *
47*2264Sjacobs _unsupported_null_return()
48*2264Sjacobs {
49*2264Sjacobs 	return (NULL);
50*2264Sjacobs }
51*2264Sjacobs 
52*2264Sjacobs static void
53*2264Sjacobs _unsupported_no_return()
54*2264Sjacobs {
55*2264Sjacobs }
56*2264Sjacobs 
57*2264Sjacobs /*
58*2264Sjacobs  * Service interfaces
59*2264Sjacobs  */
60*2264Sjacobs #pragma weak papiServiceCreate = _unsupported
61*2264Sjacobs #pragma weak papiServiceDestroy = _unsupported_no_return
62*2264Sjacobs #pragma weak papiServiceSetPeer = _unsupported
63*2264Sjacobs #pragma weak papiServiceSetUserName = _unsupported
64*2264Sjacobs #pragma weak papiServiceSetPassword = _unsupported
65*2264Sjacobs #pragma weak papiServiceSetEncryption = _unsupported
66*2264Sjacobs #pragma weak papiServiceSetAuthCB = _unsupported
67*2264Sjacobs #pragma weak papiServiceSetAppData = _unsupported
68*2264Sjacobs 
69*2264Sjacobs #pragma weak papiServiceGetServiceName = _unsupported_null_return
70*2264Sjacobs #pragma weak papiServiceGetUserName = _unsupported_null_return
71*2264Sjacobs #pragma weak papiServiceGetPassword = _unsupported_null_return
72*2264Sjacobs #pragma weak papiServiceGetAppData = _unsupported_null_return
73*2264Sjacobs 
74*2264Sjacobs papi_encryption_t
75*2264Sjacobs papiServiceGetEncryption(papi_service_t handle)
76*2264Sjacobs {
77*2264Sjacobs 	return (PAPI_ENCRYPT_NEVER);
78*2264Sjacobs }
79*2264Sjacobs 
80*2264Sjacobs #pragma weak papiServiceGetAttributeList = _unsupported_null_return
81*2264Sjacobs #pragma weak papiServiceGetStatusMessage = _unsupported_null_return
82*2264Sjacobs 
83*2264Sjacobs /*
84*2264Sjacobs  * Printer operations
85*2264Sjacobs  */
86*2264Sjacobs #pragma weak papiPrintersList = _unsupported
87*2264Sjacobs #pragma weak papiPrinterQuery = _unsupported
88*2264Sjacobs #pragma weak papiPrinterEnable = _unsupported
89*2264Sjacobs #pragma weak papiPrinterDisable = _unsupported
90*2264Sjacobs #pragma weak papiPrinterPause = _unsupported
91*2264Sjacobs #pragma weak papiPrinterResume = _unsupported
92*2264Sjacobs #pragma weak papiPrinterAdd = _unsupported
93*2264Sjacobs #pragma weak papiPrinterModify = _unsupported
94*2264Sjacobs #pragma weak papiPrinterRemove = _unsupported
95*2264Sjacobs #pragma weak papiPrinterPurgeJobs = _unsupported
96*2264Sjacobs #pragma weak papiPrinterListJobs = _unsupported
97*2264Sjacobs #pragma weak papiPrinterGetAttributeList = _unsupported_null_return
98*2264Sjacobs #pragma weak papiPrinterFree = _unsupported_no_return
99*2264Sjacobs #pragma weak papiPrinterListFree = _unsupported_no_return
100*2264Sjacobs 
101*2264Sjacobs /*
102*2264Sjacobs  * Job interfaces
103*2264Sjacobs  */
104*2264Sjacobs #pragma weak papiJobHold = _unsupported
105*2264Sjacobs #pragma weak papiJobRelease = _unsupported
106*2264Sjacobs #pragma weak papiJobRestart = _unsupported
107*2264Sjacobs #pragma weak papiJobPromote = _unsupported
108*2264Sjacobs #pragma weak papiJobModify = _unsupported
109*2264Sjacobs #pragma weak papiJobSubmit = _unsupported
110*2264Sjacobs #pragma weak papiJobSubmitByReference = _unsupported
111*2264Sjacobs #pragma weak papiJobValidate = _unsupported
112*2264Sjacobs #pragma weak papiJobStreamOpen = _unsupported
113*2264Sjacobs #pragma weak papiJobStreamWrite = _unsupported
114*2264Sjacobs #pragma weak papiJobStreamClose = _unsupported
115*2264Sjacobs #pragma weak papiJobQuery = _unsupported
116*2264Sjacobs #pragma weak papiJobMove = _unsupported
117*2264Sjacobs #pragma weak papiJobCancel = _unsupported
118*2264Sjacobs #pragma weak papiJobGetAttributeList = _unsupported_null_return
119*2264Sjacobs #pragma weak papiJobGetPrinterName = _unsupported_null_return
120*2264Sjacobs #pragma weak papiJobCreate = _unsupported
121*2264Sjacobs #pragma weak papiJobStreamAdd = _unsupported
122*2264Sjacobs #pragma weak papiJobCommit = _unsupported
123*2264Sjacobs 
124*2264Sjacobs int
125*2264Sjacobs papiJobGetId(papi_job_t job)
126*2264Sjacobs {
127*2264Sjacobs 	return (-1);
128*2264Sjacobs }
129*2264Sjacobs 
130*2264Sjacobs #pragma weak papiJobGetJobTicket = _unsupported_null_return
131*2264Sjacobs #pragma weak papiJobFree = _unsupported_no_return
132*2264Sjacobs #pragma weak papiJobListFree = _unsupported_no_return
133