1*355b4669Sjacobs /*
2*355b4669Sjacobs * CDDL HEADER START
3*355b4669Sjacobs *
4*355b4669Sjacobs * The contents of this file are subject to the terms of the
5*355b4669Sjacobs * Common Development and Distribution License (the "License").
6*355b4669Sjacobs * You may not use this file except in compliance with the License.
7*355b4669Sjacobs *
8*355b4669Sjacobs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*355b4669Sjacobs * or http://www.opensolaris.org/os/licensing.
10*355b4669Sjacobs * See the License for the specific language governing permissions
11*355b4669Sjacobs * and limitations under the License.
12*355b4669Sjacobs *
13*355b4669Sjacobs * When distributing Covered Code, include this CDDL HEADER in each
14*355b4669Sjacobs * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*355b4669Sjacobs * If applicable, add the following below this CDDL HEADER, with the
16*355b4669Sjacobs * fields enclosed by brackets "[]" replaced with your own identifying
17*355b4669Sjacobs * information: Portions Copyright [yyyy] [name of copyright owner]
18*355b4669Sjacobs *
19*355b4669Sjacobs * CDDL HEADER END
20*355b4669Sjacobs */
21*355b4669Sjacobs
22*355b4669Sjacobs /*
23*355b4669Sjacobs * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24*355b4669Sjacobs * Use is subject to license terms.
25*355b4669Sjacobs *
26*355b4669Sjacobs */
27*355b4669Sjacobs
28*355b4669Sjacobs /* $Id: library.c 146 2006-03-24 00:26:54Z njacobs $ */
29*355b4669Sjacobs
30*355b4669Sjacobs #pragma ident "%Z%%M% %I% %E% SMI"
31*355b4669Sjacobs
32*355b4669Sjacobs #include <stdlib.h>
33*355b4669Sjacobs #include <stdio.h>
34*355b4669Sjacobs #include <stdarg.h>
35*355b4669Sjacobs #include <string.h>
36*355b4669Sjacobs #include <alloca.h>
37*355b4669Sjacobs #include <libintl.h>
38*355b4669Sjacobs #include <papi_impl.h>
39*355b4669Sjacobs
40*355b4669Sjacobs static char *calls[] = {
41*355b4669Sjacobs /* Attribute Calls */
42*355b4669Sjacobs "papiAttributeListAdd",
43*355b4669Sjacobs "papiAttributeListAddBoolean", "papiAttributeListAddCollection",
44*355b4669Sjacobs "papiAttributeListAddDatetime", "papiAttributeListAddInteger",
45*355b4669Sjacobs "papiAttributeListAddMetadata", "papiAttributeListAddRange",
46*355b4669Sjacobs "papiAttributeListAddResolution", "papiAttributeListAddString",
47*355b4669Sjacobs "papiAttributeListDelete",
48*355b4669Sjacobs "papiAttributeListGetValue", "papiAttributeListGetNext",
49*355b4669Sjacobs "papiAttributeListFind",
50*355b4669Sjacobs "papiAttributeListGetBoolean", "papiAttributeListGetCollection",
51*355b4669Sjacobs "papiAttributeListGetDatetime", "papiAttributeListGetInteger",
52*355b4669Sjacobs "papiAttributeListGetMetadata", "papiAttributeListGetRange",
53*355b4669Sjacobs "papiAttributeListGetResolution", "papiAttributeListGetString",
54*355b4669Sjacobs "papiAttributeListFromString", "papiAttributeListToString",
55*355b4669Sjacobs "papiAttributeListFree",
56*355b4669Sjacobs /* Job Calls */
57*355b4669Sjacobs "papiJobSubmit", "papiJobSubmitByReference",
58*355b4669Sjacobs "papiJobStreamOpen", "papiJobStreamWrite", "papiJobStreamClose",
59*355b4669Sjacobs "papiJobQuery", "papiJobCancel",
60*355b4669Sjacobs "papiJobGetAttributeList", "papiJobGetId", "papiJobGetPrinterName",
61*355b4669Sjacobs "papiJobFree", "papiJobListFree",
62*355b4669Sjacobs /* Printer Calls */
63*355b4669Sjacobs "papiPrinterQuery", "papiPrinterPurgeJobs", "papiPrinterListJobs",
64*355b4669Sjacobs "papiPrinterGetAttributeList", "papiPrinterFree",
65*355b4669Sjacobs /* Service Calls */
66*355b4669Sjacobs "papiServiceCreate", "papiServiceDestroy",
67*355b4669Sjacobs "papiServiceGetStatusMessage",
68*355b4669Sjacobs /* Misc Calls */
69*355b4669Sjacobs "papiStatusString",
70*355b4669Sjacobs "papiLibrarySupportedCall", "papiLibrarySupportedCalls",
71*355b4669Sjacobs NULL
72*355b4669Sjacobs };
73*355b4669Sjacobs
74*355b4669Sjacobs char **
papiLibrarySupportedCalls()75*355b4669Sjacobs papiLibrarySupportedCalls()
76*355b4669Sjacobs {
77*355b4669Sjacobs return (calls);
78*355b4669Sjacobs }
79*355b4669Sjacobs
80*355b4669Sjacobs char
papiLibrarySupportedCall(char * name)81*355b4669Sjacobs papiLibrarySupportedCall(char *name)
82*355b4669Sjacobs {
83*355b4669Sjacobs int i;
84*355b4669Sjacobs
85*355b4669Sjacobs for (i = 0; calls[i] != NULL; i++)
86*355b4669Sjacobs if (strcmp(name, calls[i]) == 0)
87*355b4669Sjacobs return (PAPI_TRUE);
88*355b4669Sjacobs
89*355b4669Sjacobs return (PAPI_FALSE);
90*355b4669Sjacobs }
91