Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.h
32288 views
/*1* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425typedef LONG (*FPTR_SCardEstablishContext)(DWORD dwScope,26LPCVOID pvReserved1,27LPCVOID pvReserved2,28LPSCARDCONTEXT phContext);2930typedef LONG (*FPTR_SCardConnect)(SCARDCONTEXT hContext,31LPCSTR szReader,32DWORD dwShareMode,33DWORD dwPreferredProtocols,34LPSCARDHANDLE phCard, LPDWORD pdwActiveProtocol);3536typedef LONG (*FPTR_SCardDisconnect)(SCARDHANDLE hCard, DWORD dwDisposition);3738typedef LONG (*FPTR_SCardStatus)(SCARDHANDLE hCard,39LPSTR mszReaderNames,40LPDWORD pcchReaderLen,41LPDWORD pdwState,42LPDWORD pdwProtocol,43LPBYTE pbAtr, LPDWORD pcbAtrLen);4445typedef LONG (*FPTR_SCardGetStatusChange)(SCARDCONTEXT hContext,46DWORD dwTimeout,47SCARD_READERSTATE *rgReaderStates, DWORD cReaders);4849typedef LONG (*FPTR_SCardTransmit)(SCARDHANDLE hCard,50const SCARD_IO_REQUEST *pioSendPci,51LPCBYTE pbSendBuffer,52DWORD cbSendLength,53SCARD_IO_REQUEST *pioRecvPci,54LPBYTE pbRecvBuffer, LPDWORD pcbRecvLength);5556typedef LONG (*FPTR_SCardListReaders)(SCARDCONTEXT hContext,57LPCSTR mszGroups,58LPSTR mszReaders, LPDWORD pcchReaders);5960typedef LONG (*FPTR_SCardBeginTransaction)(SCARDHANDLE hCard);6162typedef LONG (*FPTR_SCardEndTransaction)(SCARDHANDLE hCard,63DWORD dwDisposition);6465typedef LONG (*FPTR_SCardControl)(SCARDHANDLE hCard, DWORD dwControlCode,66LPCVOID pbSendBuffer, DWORD cbSendLength, LPVOID pbRecvBuffer,67DWORD pcbRecvLength, LPDWORD lpBytesReturned);6869#define CALL_SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext) \70((scardEstablishContext)(dwScope, pvReserved1, pvReserved2, phContext))7172#define CALL_SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols) \73((scardConnect)(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols))7475#define CALL_SCardDisconnect(hCard, dwDisposition) \76((scardDisconnect)(hCard, dwDisposition))7778#define CALL_SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen) \79((scardStatus)(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen))8081#define CALL_SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders) \82((scardGetStatusChange)(hContext, dwTimeout, rgReaderStates, cReaders))8384#define CALL_SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \85pioRecvPci, pbRecvBuffer, pcbRecvLength) \86((scardTransmit)(hCard, pioSendPci, pbSendBuffer, cbSendLength, \87pioRecvPci, pbRecvBuffer, pcbRecvLength))8889#define CALL_SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders) \90((scardListReaders)(hContext, mszGroups, mszReaders, pcchReaders))9192#define CALL_SCardBeginTransaction(hCard) \93((scardBeginTransaction)(hCard))9495#define CALL_SCardEndTransaction(hCard, dwDisposition) \96((scardEndTransaction)(hCard, dwDisposition))9798#define CALL_SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \99pbRecvBuffer, pcbRecvLength, lpBytesReturned) \100((scardControl)(hCard, dwControlCode, pbSendBuffer, cbSendLength, \101pbRecvBuffer, pcbRecvLength, lpBytesReturned))102103extern FPTR_SCardEstablishContext scardEstablishContext;104extern FPTR_SCardConnect scardConnect;105extern FPTR_SCardDisconnect scardDisconnect;106extern FPTR_SCardStatus scardStatus;107extern FPTR_SCardGetStatusChange scardGetStatusChange;108extern FPTR_SCardTransmit scardTransmit;109extern FPTR_SCardListReaders scardListReaders;110extern FPTR_SCardBeginTransaction scardBeginTransaction;111extern FPTR_SCardEndTransaction scardEndTransaction;112extern FPTR_SCardControl scardControl;113114115