1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1995-1996 by Sun Microsystems, Inc.
24*7c478bd9Sstevel@tonic-gate  * All rights reserved.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef _CS_STRINGS_H
28*7c478bd9Sstevel@tonic-gate #define	_CS_STRINGS_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
31*7c478bd9Sstevel@tonic-gate extern "C" {
32*7c478bd9Sstevel@tonic-gate #endif
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate /*
35*7c478bd9Sstevel@tonic-gate  * These values depend on the size of the cs_ss_event_text_t array
36*7c478bd9Sstevel@tonic-gate  *	and on the number of CS events that we want the client to
37*7c478bd9Sstevel@tonic-gate  *	be able to display.
38*7c478bd9Sstevel@tonic-gate  * XXX - this should be determined automatically
39*7c478bd9Sstevel@tonic-gate  */
40*7c478bd9Sstevel@tonic-gate #define	MAX_SS_EVENTS	9	/* maximum SS events */
41*7c478bd9Sstevel@tonic-gate #define	MAX_CS_EVENTS	28	/* maximum CS events */
42*7c478bd9Sstevel@tonic-gate 
43*7c478bd9Sstevel@tonic-gate /*
44*7c478bd9Sstevel@tonic-gate  * The cs_ss_event_text_t structure is used to support the Event2Text
45*7c478bd9Sstevel@tonic-gate  *	and cs_event2text function.  MAX_SS_EVENTS and MAX_CS_EVENTS
46*7c478bd9Sstevel@tonic-gate  *	are defined in the cs_priv.h header file.  If the size of this
47*7c478bd9Sstevel@tonic-gate  *	array or strctures changes, the MAX_CS_EVENT_BUFSIZE define
48*7c478bd9Sstevel@tonic-gate  *	which is in cs.h might need to be changed as well.
49*7c478bd9Sstevel@tonic-gate  */
50*7c478bd9Sstevel@tonic-gate cs_ss_event_text_t cs_ss_event_text[MAX_CS_EVENTS+1] = {
51*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_REMOVAL, CS_EVENT_CARD_REMOVAL, "CARD_REMOVAL" },
52*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_INSERT, CS_EVENT_CARD_INSERTION, "CARD_INSERTION" },
53*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_READY, CS_EVENT_CARD_READY, "CARD_READY" },
54*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_BATTERY_WARN, CS_EVENT_BATTERY_LOW, "BATTERY_WARN" },
55*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_BATTERY_DEAD, CS_EVENT_BATTERY_DEAD, "BATTERY_DEAD" },
56*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_STATUS_CHANGE, 0, "STATUS_CHANGE" },
57*7c478bd9Sstevel@tonic-gate 	{ PCE_CARD_WRITE_PROTECT, CS_EVENT_WRITE_PROTECT, "WRITE_PROTECT" },
58*7c478bd9Sstevel@tonic-gate 	{ PCE_PM_RESUME, CS_EVENT_PM_RESUME, "PM_RESUME" },
59*7c478bd9Sstevel@tonic-gate 	{ PCE_PM_SUSPEND, CS_EVENT_PM_SUSPEND, "PM_SUSPEND" },
60*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_REGISTRATION_COMPLETE, "REGISTRATION_COMPLETE" },
61*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_LOCK, "CARD_LOCK" },
62*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_RESET, "CARD_RESET" },
63*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_UNLOCK, "CARD_UNLOCK" },
64*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_EJECTION_COMPLETE, "EJECTION_COMPLETE" },
65*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_EJECTION_REQUEST, "EJECTION_REQUEST" },
66*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_ERASE_COMPLETE, "ERASE_COMPLETE" },
67*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_EXCLUSIVE_COMPLETE, "EXCLUSIVE_COMPLETE" },
68*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_EXCLUSIVE_REQUEST, "EXCLUSIVE_REQUEST" },
69*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_INSERTION_COMPLETE, "INSERTION_COMPLETE" },
70*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_INSERTION_REQUEST, "INSERTION_REQUEST" },
71*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_RESET_COMPLETE, "RESET_COMPLETE" },
72*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_RESET_PHYSICAL, "RESET_PHYSICAL" },
73*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_RESET_REQUEST, "RESET_REQUEST" },
74*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_MTD_REQUEST, "MTD_REQUEST" },
75*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_CLIENT_INFO, "CLIENT_INFO" },
76*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_TIMER_EXPIRED, "TIMER_EXPIRED" },
77*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_SS_UPDATED, "SS_UPDATED" },
78*7c478bd9Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_REMOVAL_LOWP, "CARD_REMOVAL_LOWP" },
79*7c478bd9Sstevel@tonic-gate 	{ MAX_SS_EVENTS, 0, "{undefined}" },
80*7c478bd9Sstevel@tonic-gate };
81*7c478bd9Sstevel@tonic-gate 
82*7c478bd9Sstevel@tonic-gate cs_csfunc2text_strings_t cs_csfunc2text_funcstrings[] = {
83*7c478bd9Sstevel@tonic-gate 	{ CISRegister, "CISRegister" },
84*7c478bd9Sstevel@tonic-gate 	{ CISUnregister, "CISUnregister" },
85*7c478bd9Sstevel@tonic-gate 	{ InitCISWindow, "InitCISWindow" },
86*7c478bd9Sstevel@tonic-gate 	{ GetCardServicesInfo, "GetCardServicesInfo" },
87*7c478bd9Sstevel@tonic-gate 	{ RegisterClient, "RegisterClient" },
88*7c478bd9Sstevel@tonic-gate 	{ DeregisterClient, "DeregisterClient" },
89*7c478bd9Sstevel@tonic-gate 	{ GetStatus, "GetStatus" },
90*7c478bd9Sstevel@tonic-gate 	{ ResetFunction, "ResetFunction" },
91*7c478bd9Sstevel@tonic-gate 	{ SetEventMask, "SetEventMask" },
92*7c478bd9Sstevel@tonic-gate 	{ GetEventMask, "GetEventMask" },
93*7c478bd9Sstevel@tonic-gate 	{ RequestIO, "RequestIO" },
94*7c478bd9Sstevel@tonic-gate 	{ ReleaseIO, "ReleaseIO" },
95*7c478bd9Sstevel@tonic-gate 	{ RequestIRQ, "RequestIRQ" },
96*7c478bd9Sstevel@tonic-gate 	{ ReleaseIRQ, "ReleaseIRQ" },
97*7c478bd9Sstevel@tonic-gate 	{ RequestWindow, "RequestWindow" },
98*7c478bd9Sstevel@tonic-gate 	{ ReleaseWindow, "ReleaseWindow" },
99*7c478bd9Sstevel@tonic-gate 	{ ModifyWindow, "ModifyWindow" },
100*7c478bd9Sstevel@tonic-gate 	{ MapMemPage, "MapMemPage" },
101*7c478bd9Sstevel@tonic-gate 	{ RequestSocketMask, "RequestSocketMask" },
102*7c478bd9Sstevel@tonic-gate 	{ ReleaseSocketMask, "ReleaseSocketMask" },
103*7c478bd9Sstevel@tonic-gate 	{ RequestConfiguration, "RequestConfiguration" },
104*7c478bd9Sstevel@tonic-gate 	{ GetConfigurationInfo, "GetConfigurationInfo" },
105*7c478bd9Sstevel@tonic-gate 	{ ModifyConfiguration, "ModifyConfiguration" },
106*7c478bd9Sstevel@tonic-gate 	{ ReleaseConfiguration, "ReleaseConfiguration" },
107*7c478bd9Sstevel@tonic-gate 	{ OpenMemory, "OpenMemory" },
108*7c478bd9Sstevel@tonic-gate 	{ ReadMemory, "ReadMemory" },
109*7c478bd9Sstevel@tonic-gate 	{ WriteMemory, "WriteMemory" },
110*7c478bd9Sstevel@tonic-gate 	{ CopyMemory, "CopyMemory" },
111*7c478bd9Sstevel@tonic-gate 	{ RegisterEraseQueue, "RegisterEraseQueue" },
112*7c478bd9Sstevel@tonic-gate 	{ CheckEraseQueue, "CheckEraseQueue" },
113*7c478bd9Sstevel@tonic-gate 	{ DeregisterEraseQueue, "DeregisterEraseQueue" },
114*7c478bd9Sstevel@tonic-gate 	{ CloseMemory, "CloseMemory" },
115*7c478bd9Sstevel@tonic-gate 	{ GetFirstRegion, "GetFirstRegion" },
116*7c478bd9Sstevel@tonic-gate 	{ GetNextRegion, "GetNextRegion" },
117*7c478bd9Sstevel@tonic-gate 	{ GetFirstPartition, "GetFirstPartition" },
118*7c478bd9Sstevel@tonic-gate 	{ GetNextPartition, "GetNextPartition" },
119*7c478bd9Sstevel@tonic-gate 	{ ReturnSSEntry, "ReturnSSEntry" },
120*7c478bd9Sstevel@tonic-gate 	{ MapLogSocket, "MapLogSocket" },
121*7c478bd9Sstevel@tonic-gate 	{ MapPhySocket, "MapPhySocket" },
122*7c478bd9Sstevel@tonic-gate 	{ MapLogWindow, "MapLogWindow" },
123*7c478bd9Sstevel@tonic-gate 	{ MapPhyWindow, "MapPhyWindow" },
124*7c478bd9Sstevel@tonic-gate 	{ RegisterMTD, "RegisterMTD" },
125*7c478bd9Sstevel@tonic-gate 	{ RegisterTimer, "RegisterTimer" },
126*7c478bd9Sstevel@tonic-gate 	{ SetRegion, "SetRegion" },
127*7c478bd9Sstevel@tonic-gate 	{ RequestExclusive, "RequestExclusive" },
128*7c478bd9Sstevel@tonic-gate 	{ ReleaseExclusive, "ReleaseExclusive" },
129*7c478bd9Sstevel@tonic-gate 	{ GetFirstClient, "GetFirstClient" },
130*7c478bd9Sstevel@tonic-gate 	{ GetNextClient, "GetNextClient" },
131*7c478bd9Sstevel@tonic-gate 	{ GetClientInfo, "GetClientInfo" },
132*7c478bd9Sstevel@tonic-gate 	{ AddSocketServices, "AddSocketServices" },
133*7c478bd9Sstevel@tonic-gate 	{ ReplaceSocketServices, "ReplaceSocketServices" },
134*7c478bd9Sstevel@tonic-gate 	{ VendorSpecific, "VendorSpecific" },
135*7c478bd9Sstevel@tonic-gate 	{ AdjustResourceInfo, "AdjustResourceInfo" },
136*7c478bd9Sstevel@tonic-gate 	{ ValidateCIS, "ValidateCIS" },
137*7c478bd9Sstevel@tonic-gate 	{ GetFirstTuple, "GetFirstTuple" },
138*7c478bd9Sstevel@tonic-gate 	{ GetNextTuple, "GetNextTuple" },
139*7c478bd9Sstevel@tonic-gate 	{ GetTupleData, "GetTupleData" },
140*7c478bd9Sstevel@tonic-gate 	{ ParseTuple, "ParseTuple" },
141*7c478bd9Sstevel@tonic-gate 	{ MakeDeviceNode, "MakeDeviceNode" },
142*7c478bd9Sstevel@tonic-gate 	{ RemoveDeviceNode, "RemoveDeviceNode" },
143*7c478bd9Sstevel@tonic-gate 	{ ConvertSpeed, "ConvertSpeed" },
144*7c478bd9Sstevel@tonic-gate 	{ ConvertSize, "ConvertSize" },
145*7c478bd9Sstevel@tonic-gate 	{ Event2Text, "Event2Text" },
146*7c478bd9Sstevel@tonic-gate 	{ Error2Text, "Error2Text" },
147*7c478bd9Sstevel@tonic-gate 	{ AccessConfigurationRegister, "AccessConfigurationRegister" },
148*7c478bd9Sstevel@tonic-gate 	{ CS_DDI_Info, "CS_DDI_Info" },
149*7c478bd9Sstevel@tonic-gate 	{ CS_Sys_Ctl, "CS_Sys_Ctl" },
150*7c478bd9Sstevel@tonic-gate 	{ CSFuncListEnd, "{unknown Card Services function}" },
151*7c478bd9Sstevel@tonic-gate };
152*7c478bd9Sstevel@tonic-gate 
153*7c478bd9Sstevel@tonic-gate cs_csfunc2text_strings_t cs_csfunc2text_returnstrings[] = {
154*7c478bd9Sstevel@tonic-gate 	{ CS_SUCCESS, "CS_SUCCESS" },
155*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_ADAPTER, "CS_BAD_ADAPTER" },
156*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_ATTRIBUTE, "CS_BAD_ATTRIBUTE" },
157*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_BASE, "CS_BAD_BASE" },
158*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_EDC, "CS_BAD_EDC" },
159*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_IRQ, "CS_BAD_IRQ" },
160*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_OFFSET, "CS_BAD_OFFSET" },
161*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_PAGE, "CS_BAD_PAGE" },
162*7c478bd9Sstevel@tonic-gate 	{ CS_READ_FAILURE, "CS_READ_FAILURE" },
163*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_SIZE, "CS_BAD_SIZE" },
164*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_SOCKET, "CS_BAD_SOCKET" },
165*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_TYPE, "CS_BAD_TYPE" },
166*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_VCC, "CS_BAD_VCC" },
167*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_VPP, "CS_BAD_VPP" },
168*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_WINDOW, "CS_BAD_WINDOW" },
169*7c478bd9Sstevel@tonic-gate 	{ CS_WRITE_FAILURE, "CS_WRITE_FAILURE" },
170*7c478bd9Sstevel@tonic-gate 	{ CS_NO_CARD, "CS_NO_CARD" },
171*7c478bd9Sstevel@tonic-gate 	{ CS_UNSUPPORTED_FUNCTION, "CS_UNSUPPORTED_FUNCTION" },
172*7c478bd9Sstevel@tonic-gate 	{ CS_UNSUPPORTED_MODE, "CS_UNSUPPORTED_MODE" },
173*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_SPEED, "CS_BAD_SPEED" },
174*7c478bd9Sstevel@tonic-gate 	{ CS_BUSY, "CS_BUSY" },
175*7c478bd9Sstevel@tonic-gate 	{ CS_GENERAL_FAILURE, "CS_GENERAL_FAILURE" },
176*7c478bd9Sstevel@tonic-gate 	{ CS_WRITE_PROTECTED, "CS_WRITE_PROTECTED" },
177*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_ARG_LENGTH, "CS_BAD_ARG_LENGTH" },
178*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_ARGS, "CS_BAD_ARGS" },
179*7c478bd9Sstevel@tonic-gate 	{ CS_CONFIGURATION_LOCKED, "CS_CONFIGURATION_LOCKED" },
180*7c478bd9Sstevel@tonic-gate 	{ CS_IN_USE, "CS_IN_USE" },
181*7c478bd9Sstevel@tonic-gate 	{ CS_NO_MORE_ITEMS, "CS_NO_MORE_ITEMS" },
182*7c478bd9Sstevel@tonic-gate 	{ CS_OUT_OF_RESOURCE, "CS_OUT_OF_RESOURCE" },
183*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_HANDLE, "CS_BAD_HANDLE" },
184*7c478bd9Sstevel@tonic-gate 	{ CS_NO_CIS, "CS_NO_CIS" },
185*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_CIS, "CS_BAD_CIS" },
186*7c478bd9Sstevel@tonic-gate 	{ CS_UNKNOWN_TUPLE, "CS_UNKNOWN_TUPLE" },
187*7c478bd9Sstevel@tonic-gate 	{ CS_BAD_VERSION, "CS_BAD_VERSION" },
188*7c478bd9Sstevel@tonic-gate 	{ CS_UNSUPPORTED_EVENT, "CS_UNSUPPORTED_EVENT" },
189*7c478bd9Sstevel@tonic-gate 	{ CS_CSI_ERROR, "CS_CSI_ERROR" },
190*7c478bd9Sstevel@tonic-gate 	{ CS_CSI_NOT_INIT, "CS_CSI_NOT_INIT" },
191*7c478bd9Sstevel@tonic-gate 	{ CS_NO_TUPLE_PARSER, "CS_NO_TUPLE_PARSER" },
192*7c478bd9Sstevel@tonic-gate 	{ CS_ERRORLIST_END, "{unknown Card Services return code}" },
193*7c478bd9Sstevel@tonic-gate };
194*7c478bd9Sstevel@tonic-gate 
195*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
196*7c478bd9Sstevel@tonic-gate }
197*7c478bd9Sstevel@tonic-gate #endif
198*7c478bd9Sstevel@tonic-gate 
199*7c478bd9Sstevel@tonic-gate #endif /* _CS_STRINGS_H */
200