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: library.c 146 2006-03-24 00:26:54Z njacobs $ */
29*2264Sjacobs
30*2264Sjacobs #pragma ident "%Z%%M% %I% %E% SMI"
31*2264Sjacobs
32*2264Sjacobs #include <stdlib.h>
33*2264Sjacobs #include <stdio.h>
34*2264Sjacobs #include <stdarg.h>
35*2264Sjacobs #include <string.h>
36*2264Sjacobs #include <alloca.h>
37*2264Sjacobs #include <libintl.h>
38*2264Sjacobs #include <papi_impl.h>
39*2264Sjacobs
40*2264Sjacobs static char *calls[] = {
41*2264Sjacobs /* Attribute Calls */
42*2264Sjacobs "papiAttributeListAdd",
43*2264Sjacobs "papiAttributeListAddBoolean", "papiAttributeListAddCollection",
44*2264Sjacobs "papiAttributeListAddDatetime", "papiAttributeListAddInteger",
45*2264Sjacobs "papiAttributeListAddMetadata", "papiAttributeListAddRange",
46*2264Sjacobs "papiAttributeListAddResolution", "papiAttributeListAddString",
47*2264Sjacobs "papiAttributeListDelete",
48*2264Sjacobs "papiAttributeListGetValue", "papiAttributeListGetNext",
49*2264Sjacobs "papiAttributeListFind",
50*2264Sjacobs "papiAttributeListGetBoolean", "papiAttributeListGetCollection",
51*2264Sjacobs "papiAttributeListGetDatetime", "papiAttributeListGetInteger",
52*2264Sjacobs "papiAttributeListGetMetadata", "papiAttributeListGetRange",
53*2264Sjacobs "papiAttributeListGetResolution", "papiAttributeListGetString",
54*2264Sjacobs "papiAttributeListFromString", "papiAttributeListToString",
55*2264Sjacobs "papiAttributeListFree",
56*2264Sjacobs /* Job Calls */
57*2264Sjacobs "papiJobSubmit", "papiJobSubmitByReference",
58*2264Sjacobs "papiJobStreamOpen", "papiJobStreamWrite", "papiJobStreamClose",
59*2264Sjacobs "papiJobQuery", "papiJobCancel",
60*2264Sjacobs "papiJobGetAttributeList", "papiJobGetId", "papiJobGetPrinterName",
61*2264Sjacobs "papiJobFree", "papiJobListFree",
62*2264Sjacobs /* Printer Calls */
63*2264Sjacobs "papiPrinterQuery", "papiPrinterPurgeJobs", "papiPrinterListJobs",
64*2264Sjacobs "papiPrinterGetAttributeList", "papiPrinterFree",
65*2264Sjacobs /* Service Calls */
66*2264Sjacobs "papiServiceCreate", "papiServiceDestroy",
67*2264Sjacobs "papiServiceGetStatusMessage",
68*2264Sjacobs /* Misc Calls */
69*2264Sjacobs "papiStatusString",
70*2264Sjacobs "papiLibrarySupportedCall", "papiLibrarySupportedCalls",
71*2264Sjacobs NULL
72*2264Sjacobs };
73*2264Sjacobs
74*2264Sjacobs char **
papiLibrarySupportedCalls()75*2264Sjacobs papiLibrarySupportedCalls()
76*2264Sjacobs {
77*2264Sjacobs return (calls);
78*2264Sjacobs }
79*2264Sjacobs
80*2264Sjacobs char
papiLibrarySupportedCall(char * name)81*2264Sjacobs papiLibrarySupportedCall(char *name)
82*2264Sjacobs {
83*2264Sjacobs int i;
84*2264Sjacobs
85*2264Sjacobs for (i = 0; calls[i] != NULL; i++)
86*2264Sjacobs if (strcmp(name, calls[i]) == 0)
87*2264Sjacobs return (PAPI_TRUE);
88*2264Sjacobs
89*2264Sjacobs return (PAPI_FALSE);
90*2264Sjacobs }
91