summaryrefslogtreecommitdiff
path: root/usr/src/lib/print/libpapi-common/common/status.c
blob: 897aa1322d2b9143ae92c4ce580701d98636cda0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 *
 */

/* $Id: status.c 146 2006-03-24 00:26:54Z njacobs $ */

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#include <stdlib.h>
#include <papi.h>
#include <libintl.h>

char *
papiStatusString(const papi_status_t status)
{
	switch (status) {
	case PAPI_OK:
		return (gettext("ok"));
	case PAPI_OK_SUBST:
		return (gettext("ok-substitution"));
	case PAPI_OK_CONFLICT:
		return (gettext("ok-conflict"));
	case PAPI_OK_IGNORED_SUBSCRIPTIONS:
		return (gettext("ok-ignored-subscriptions"));
	case PAPI_OK_IGNORED_NOTIFICATIONS:
		return (gettext("ok-ignored-notifications"));
	case PAPI_OK_TOO_MANY_EVENTS:
		return (gettext("ok-too-many-events"));
	case PAPI_OK_BUT_CANCEL_SUBSCRIPTION:
		return (gettext("ok-but-cancel-subscription"));
	case PAPI_REDIRECTION_OTHER_SITE:
		return (gettext("redirection-to-other-site"));
	case PAPI_BAD_REQUEST:
		return (gettext("bad-request"));
	case PAPI_FORBIDDEN:
		return (gettext("forbidden"));
	case PAPI_NOT_AUTHENTICATED:
		return (gettext("not-authenticated"));
	case PAPI_NOT_AUTHORIZED:
		return (gettext("not-authorized"));
	case PAPI_NOT_POSSIBLE:
		return (gettext("not-possible"));
	case PAPI_TIMEOUT:
		return (gettext("timeout"));
	case PAPI_NOT_FOUND:
		return (gettext("not-found"));
	case PAPI_GONE:
		return (gettext("gone"));
	case PAPI_REQUEST_ENTITY:
		return (gettext("request-entity"));
	case PAPI_REQUEST_VALUE:
		return (gettext("request-value"));
	case PAPI_DOCUMENT_FORMAT:
		return (gettext("document-format"));
	case PAPI_ATTRIBUTES:
		return (gettext("attributes"));
	case PAPI_URI_SCHEME:
		return (gettext("uri-scheme"));
	case PAPI_CHARSET:
		return (gettext("charset"));
	case PAPI_CONFLICT:
		return (gettext("conflict"));
	case PAPI_COMPRESSION_NOT_SUPPORTED:
		return (gettext("compression-not-supported"));
	case PAPI_COMPRESSION_ERROR:
		return (gettext("compression-error"));
	case PAPI_DOCUMENT_FORMAT_ERROR:
		return (gettext("document-format-error"));
	case PAPI_DOCUMENT_ACCESS_ERROR:
		return (gettext("document-access-error"));
	case PAPI_ATTRIBUTES_NOT_SETTABLE:
		return (gettext("attributes-not-settable"));
	case PAPI_IGNORED_ALL_SUBSCRIPTIONS:
		return (gettext("ignored-all-subscriptions"));
	case PAPI_TOO_MANY_SUBSCRIPTIONS:
		return (gettext("too-many-subscriptions"));
	case PAPI_IGNORED_ALL_NOTIFICATIONS:
		return (gettext("ignored-all-notifications"));
	case PAPI_PRINT_SUPPORT_FILE_NOT_FOUND:
		return (gettext("print-support-file-not-found"));
	case PAPI_INTERNAL_ERROR:
		return (gettext("internal-error"));
	case PAPI_OPERATION_NOT_SUPPORTED:
		return (gettext("operation-not-supported"));
	case PAPI_SERVICE_UNAVAILABLE:
		return (gettext("service-unavailable"));
	case PAPI_VERSION_NOT_SUPPORTED:
		return (gettext("version-not-supported"));
	case PAPI_DEVICE_ERROR:
		return (gettext("device-error"));
	case PAPI_TEMPORARY_ERROR:
		return (gettext("temporary-error"));
	case PAPI_NOT_ACCEPTING:
		return (gettext("not-accepting"));
	case PAPI_PRINTER_BUSY:
		return (gettext("printer-busy"));
	case PAPI_ERROR_JOB_CANCELLED:
		return (gettext("error-job-cancelled"));
	case PAPI_MULTIPLE_JOBS_NOT_SUPPORTED:
		return (gettext("multiple-jobs-not-supported"));
	case PAPI_PRINTER_IS_DEACTIVATED:
		return (gettext("printer-is-deactivated"));
	case PAPI_BAD_ARGUMENT:
		return (gettext("bad-argument"));
	case PAPI_JOB_TICKET_NOT_SUPPORTED:
		return (gettext("job-ticket-not-supported"));
	default:
		return (gettext("unknown-error"));
	}
}