1 | /*
|
---|
2 | * Winscard definitions
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __WINE_WINSCARD_H
|
---|
29 | #define __WINE_WINSCARD_H
|
---|
30 |
|
---|
31 | #include <wtypes.h>
|
---|
32 | #include <winioctl.h>
|
---|
33 | #include <winsmcrd.h>
|
---|
34 | #include <scarderr.h>
|
---|
35 |
|
---|
36 | #ifndef _LPCBYTE_DEFINED
|
---|
37 | #define _LPCBYTE_DEFINED
|
---|
38 | typedef const BYTE *LPCBYTE;
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | typedef ULONG_PTR SCARDCONTEXT, *PSCARDCONTEXT, *LPSCARDCONTEXT;
|
---|
42 | typedef ULONG_PTR SCARDHANDLE, *PSCARDHANDLE, *LPSCARDHANDLE;
|
---|
43 |
|
---|
44 | typedef struct _SCARD_ATRMASK
|
---|
45 | {
|
---|
46 | DWORD cbAtr;
|
---|
47 | BYTE rgbAtr[36];
|
---|
48 | BYTE rgbMask[36];
|
---|
49 | } SCARD_ATRMASK, *PSCARD_ATRMASK, *LPSCARD_ATRMASK;
|
---|
50 |
|
---|
51 | typedef struct
|
---|
52 | {
|
---|
53 | LPCSTR szReader;
|
---|
54 | LPVOID pvUserData;
|
---|
55 | DWORD dwCurrentState;
|
---|
56 | DWORD dwEventState;
|
---|
57 | DWORD cbAtr;
|
---|
58 | BYTE rgbAtr[36];
|
---|
59 | } SCARD_READERSTATEA, *PSCARD_READERSTATEA, *LPSCARD_READERSTATEA;
|
---|
60 | typedef struct
|
---|
61 | {
|
---|
62 | LPCWSTR szReader;
|
---|
63 | LPVOID pvUserData;
|
---|
64 | DWORD dwCurrentState;
|
---|
65 | DWORD dwEventState;
|
---|
66 | DWORD cbAtr;
|
---|
67 | BYTE rgbAtr[36];
|
---|
68 | } SCARD_READERSTATEW, *PSCARD_READERSTATEW, *LPSCARD_READERSTATEW;
|
---|
69 | DECL_WINELIB_TYPE_AW(SCARD_READERSTATE)
|
---|
70 | DECL_WINELIB_TYPE_AW(PSCARD_READERSTATE)
|
---|
71 | DECL_WINELIB_TYPE_AW(LPSCARD_READERSTATE)
|
---|
72 |
|
---|
73 |
|
---|
74 | #ifdef __cplusplus
|
---|
75 | extern "C" {
|
---|
76 | #endif
|
---|
77 |
|
---|
78 | HANDLE WINAPI SCardAccessStartedEvent(void);
|
---|
79 | LONG WINAPI SCardAddReaderToGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
|
---|
80 | LONG WINAPI SCardAddReaderToGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
|
---|
81 | #define SCardAddReaderToGroup WINELIB_NAME_AW(SCardAddReaderToGroup)
|
---|
82 | LONG WINAPI SCardBeginTransaction(SCARDHANDLE);
|
---|
83 | LONG WINAPI SCardCancel(SCARDCONTEXT);
|
---|
84 | LONG WINAPI SCardConnectA(SCARDCONTEXT,LPCSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
|
---|
85 | LONG WINAPI SCardConnectW(SCARDCONTEXT,LPCWSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
|
---|
86 | #define SCardConnect WINELIB_NAME_AW(SCardConnect)
|
---|
87 | LONG WINAPI SCardControl(SCARDHANDLE,DWORD,LPCVOID,DWORD,LPVOID,DWORD,LPDWORD);
|
---|
88 | LONG WINAPI SCardDisconnect(SCARDHANDLE,DWORD);
|
---|
89 | LONG WINAPI SCardEndTransaction(SCARDHANDLE,DWORD);
|
---|
90 | LONG WINAPI SCardEstablishContext(DWORD,LPCVOID,LPCVOID,LPSCARDCONTEXT);
|
---|
91 | LONG WINAPI SCardForgetCardTypeA(SCARDCONTEXT,LPCSTR);
|
---|
92 | LONG WINAPI SCardForgetCardTypeW(SCARDCONTEXT,LPCWSTR);
|
---|
93 | #define SCardForgetCardType WINELIB_NAME_AW(SCardForgetCardType)
|
---|
94 | LONG WINAPI SCardForgetReaderA(SCARDCONTEXT,LPCSTR);
|
---|
95 | LONG WINAPI SCardForgetReaderW(SCARDCONTEXT,LPCWSTR);
|
---|
96 | #define SCardForgetReader WINELIB_NAME_AW(SCardForgetReader)
|
---|
97 | LONG WINAPI SCardForgetReaderGroupA(SCARDCONTEXT,LPCSTR);
|
---|
98 | LONG WINAPI SCardForgetReaderGroupW(SCARDCONTEXT,LPCWSTR);
|
---|
99 | #define SCardForgetReaderGroup WINELIB_NAME_AW(SCardForgetReaderGroup)
|
---|
100 | LONG WINAPI SCardFreeMemory(SCARDCONTEXT,LPCVOID);
|
---|
101 | LONG WINAPI SCardGetAttrib(SCARDHANDLE,DWORD,LPBYTE,LPDWORD);
|
---|
102 | LONG WINAPI SCardGetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPSTR,LPDWORD);
|
---|
103 | LONG WINAPI SCardGetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPWSTR,LPDWORD);
|
---|
104 | #define SCardGetCardTypeProviderName WINELIB_NAME_AW(SCardGetCardTypeProviderName)
|
---|
105 | LONG WINAPI SCardGetProviderIdA(SCARDCONTEXT,LPCSTR,LPGUID);
|
---|
106 | LONG WINAPI SCardGetProviderIdW(SCARDCONTEXT,LPCWSTR,LPGUID);
|
---|
107 | #define SCardGetProviderId WINELIB_NAME_AW(SCardGetProviderId)
|
---|
108 | LONG WINAPI SCardGetStatusChangeA(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEA,DWORD);
|
---|
109 | LONG WINAPI SCardGetStatusChangeW(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEW,DWORD);
|
---|
110 | #define SCardGetStatusChange WINELIB_NAME_AW(SCardGetStatusChange)
|
---|
111 | LONG WINAPI SCardIntroduceCardTypeA(SCARDCONTEXT,LPCSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
|
---|
112 | LONG WINAPI SCardIntroduceCardTypeW(SCARDCONTEXT,LPCWSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
|
---|
113 | #define SCardIntroduceCardType WINELIB_NAME_AW(SCardIntroduceCardType)
|
---|
114 | LONG WINAPI SCardIntroduceReaderA(SCARDCONTEXT,LPCSTR,LPCSTR);
|
---|
115 | LONG WINAPI SCardIntroduceReaderW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
|
---|
116 | #define SCardIntroduceReader WINELIB_NAME_AW(SCardIntroduceReader)
|
---|
117 | LONG WINAPI SCardIntroduceReaderGroupA(SCARDCONTEXT,LPCSTR);
|
---|
118 | LONG WINAPI SCardIntroduceReaderGroupW(SCARDCONTEXT,LPCWSTR);
|
---|
119 | #define SCardIntroduceReaderGroup WINELIB_NAME_AW(SCardIntroduceReaderGroup)
|
---|
120 | LONG WINAPI SCardIsValidContext(SCARDCONTEXT);
|
---|
121 | LONG WINAPI SCardListCardsA(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPSTR,LPDWORD);
|
---|
122 | LONG WINAPI SCardListCardsW(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPWSTR,LPDWORD);
|
---|
123 | #define SCardListCards WINELIB_NAME_AW(SCardListCards)
|
---|
124 | LONG WINAPI SCardListInterfacesA(SCARDCONTEXT,LPCSTR,LPGUID,LPDWORD);
|
---|
125 | LONG WINAPI SCardListInterfacesW(SCARDCONTEXT,LPCWSTR,LPGUID,LPDWORD);
|
---|
126 | #define SCardListInterfaces WINELIB_NAME_AW(SCardListInterfaces)
|
---|
127 | LONG WINAPI SCardListReadersA(SCARDCONTEXT,LPCSTR,LPSTR,LPDWORD);
|
---|
128 | LONG WINAPI SCardListReadersW(SCARDCONTEXT,LPCWSTR,LPWSTR,LPDWORD);
|
---|
129 | #define SCardListReaders WINELIB_NAME_AW(SCardListReaders)
|
---|
130 | LONG WINAPI SCardListReaderGroupsA(SCARDCONTEXT,LPSTR,LPDWORD);
|
---|
131 | LONG WINAPI SCardListReaderGroupsW(SCARDCONTEXT,LPWSTR,LPDWORD);
|
---|
132 | #define SCardListReaderGroups WINELIB_NAME_AW(SCardListReaderGroups)
|
---|
133 | LONG WINAPI SCardLocateCardsA(SCARDCONTEXT,LPCSTR,LPSCARD_READERSTATEA,DWORD);
|
---|
134 | LONG WINAPI SCardLocateCardsW(SCARDCONTEXT,LPCWSTR,LPSCARD_READERSTATEW,DWORD);
|
---|
135 | #define SCardLocateCards WINELIB_NAME_AW(SCardLocateCards)
|
---|
136 | LONG WINAPI SCardLocateCardsByATRA(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEA,DWORD);
|
---|
137 | LONG WINAPI SCardLocateCardsByATRW(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEW,DWORD);
|
---|
138 | #define SCardLocateCardsByATR WINELIB_NAME_AW(SCardLocateCardsByATR)
|
---|
139 | LONG WINAPI SCardReconnect(SCARDHANDLE,DWORD,DWORD,DWORD,LPDWORD);
|
---|
140 | LONG WINAPI SCardReleaseContext(SCARDCONTEXT);
|
---|
141 | void WINAPI SCardReleaseStartedEvent(HANDLE);
|
---|
142 | LONG WINAPI SCardRemoveReaderFromGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
|
---|
143 | LONG WINAPI SCardRemoveReaderFromGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
|
---|
144 | #define SCardRemoveReaderFromGroup WINELIB_NAME_AW(SCardRemoveReaderFromGroup)
|
---|
145 | LONG WINAPI SCardSetAttrib(SCARDHANDLE,DWORD,LPCBYTE,DWORD);
|
---|
146 | LONG WINAPI SCardSetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPCSTR);
|
---|
147 | LONG WINAPI SCardSetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPCWSTR);
|
---|
148 | #define SCardSetCardTypeProviderName WINELIB_NAME_AW(SCardSetCardTypeProviderName)
|
---|
149 | LONG WINAPI SCardState(SCARDHANDLE,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
---|
150 | LONG WINAPI SCardStatusA(SCARDHANDLE,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
---|
151 | LONG WINAPI SCardStatusW(SCARDHANDLE,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
|
---|
152 | #define SCardStatus WINELIB_NAME_AW(SCardStatus)
|
---|
153 | LONG WINAPI SCardTransmit(SCARDHANDLE,LPCSCARD_IO_REQUEST,LPCBYTE,DWORD,LPSCARD_IO_REQUEST,LPBYTE,LPDWORD);
|
---|
154 |
|
---|
155 | #ifdef __cplusplus
|
---|
156 | }
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | #endif /* __WINE_WINSCARD_H */
|
---|