wineps.drv: Write PageBoundingBox for every page.
[wine.git] / include / winscard.h
blob132972a4a9b78fda336a994e635c993731b8596e
1 /*
2 * Winscard definitions
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.
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.
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
19 #ifndef __WINE_WINSCARD_H
20 #define __WINE_WINSCARD_H
22 #include <wtypes.h>
23 #include <winioctl.h>
24 #include <winsmcrd.h>
25 #include <scarderr.h>
27 #ifndef WINSCARDAPI
28 #define WINSCARDAPI DECLSPEC_IMPORT
29 #endif
31 /* Valid scopes for contexts */
32 #define SCARD_SCOPE_USER 0
33 #define SCARD_SCOPE_TERMINAL 1
34 #define SCARD_SCOPE_SYSTEM 2
36 #ifndef _LPCBYTE_DEFINED
37 #define _LPCBYTE_DEFINED
38 typedef const BYTE *LPCBYTE;
39 #endif
41 typedef ULONG_PTR SCARDCONTEXT, *PSCARDCONTEXT, *LPSCARDCONTEXT;
42 typedef ULONG_PTR SCARDHANDLE, *PSCARDHANDLE, *LPSCARDHANDLE;
44 typedef struct _SCARD_ATRMASK
46 DWORD cbAtr;
47 BYTE rgbAtr[36];
48 BYTE rgbMask[36];
49 } SCARD_ATRMASK, *PSCARD_ATRMASK, *LPSCARD_ATRMASK;
51 typedef struct
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
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)
73 #define SCARD_AUTOALLOCATE (DWORD)(-1)
75 #define SCARD_SCOPE_USER 0
76 #define SCARD_SCOPE_TERMINAL 1
77 #define SCARD_SCOPE_SYSTEM 2
79 #define SCARD_STATE_UNAWARE 0x00000000
80 #define SCARD_STATE_IGNORE 0x00000001
81 #define SCARD_STATE_CHANGED 0x00000002
82 #define SCARD_STATE_UNKNOWN 0x00000004
83 #define SCARD_STATE_UNAVAILABLE 0x00000008
84 #define SCARD_STATE_EMPTY 0x00000010
85 #define SCARD_STATE_PRESENT 0x00000020
86 #define SCARD_STATE_ATRMATCH 0x00000040
87 #define SCARD_STATE_EXCLUSIVE 0x00000080
88 #define SCARD_STATE_INUSE 0x00000100
89 #define SCARD_STATE_MUTE 0x00000200
90 #define SCARD_STATE_UNPOWERED 0x00000400
92 #define SCARD_SHARE_EXCLUSIVE 1
93 #define SCARD_SHARE_SHARED 2
94 #define SCARD_SHARE_DIRECT 3
96 #define SCARD_LEAVE_CARD 0
97 #define SCARD_RESET_CARD 1
98 #define SCARD_UNPOWER_CARD 2
99 #define SCARD_EJECT_CARD 3
101 #ifdef __cplusplus
102 extern "C" {
103 #endif
105 WINSCARDAPI HANDLE WINAPI SCardAccessStartedEvent(void);
106 WINSCARDAPI LONG WINAPI SCardAddReaderToGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
107 WINSCARDAPI LONG WINAPI SCardAddReaderToGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
108 #define SCardAddReaderToGroup WINELIB_NAME_AW(SCardAddReaderToGroup)
109 WINSCARDAPI LONG WINAPI SCardBeginTransaction(SCARDHANDLE);
110 WINSCARDAPI LONG WINAPI SCardCancel(SCARDCONTEXT);
111 WINSCARDAPI LONG WINAPI SCardConnectA(SCARDCONTEXT,LPCSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
112 WINSCARDAPI LONG WINAPI SCardConnectW(SCARDCONTEXT,LPCWSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
113 #define SCardConnect WINELIB_NAME_AW(SCardConnect)
114 WINSCARDAPI LONG WINAPI SCardControl(SCARDHANDLE,DWORD,LPCVOID,DWORD,LPVOID,DWORD,LPDWORD);
115 WINSCARDAPI LONG WINAPI SCardDisconnect(SCARDHANDLE,DWORD);
116 WINSCARDAPI LONG WINAPI SCardEndTransaction(SCARDHANDLE,DWORD);
117 WINSCARDAPI LONG WINAPI SCardEstablishContext(DWORD,LPCVOID,LPCVOID,LPSCARDCONTEXT);
118 WINSCARDAPI LONG WINAPI SCardForgetCardTypeA(SCARDCONTEXT,LPCSTR);
119 WINSCARDAPI LONG WINAPI SCardForgetCardTypeW(SCARDCONTEXT,LPCWSTR);
120 #define SCardForgetCardType WINELIB_NAME_AW(SCardForgetCardType)
121 WINSCARDAPI LONG WINAPI SCardForgetReaderA(SCARDCONTEXT,LPCSTR);
122 WINSCARDAPI LONG WINAPI SCardForgetReaderW(SCARDCONTEXT,LPCWSTR);
123 #define SCardForgetReader WINELIB_NAME_AW(SCardForgetReader)
124 WINSCARDAPI LONG WINAPI SCardForgetReaderGroupA(SCARDCONTEXT,LPCSTR);
125 WINSCARDAPI LONG WINAPI SCardForgetReaderGroupW(SCARDCONTEXT,LPCWSTR);
126 #define SCardForgetReaderGroup WINELIB_NAME_AW(SCardForgetReaderGroup)
127 WINSCARDAPI LONG WINAPI SCardFreeMemory(SCARDCONTEXT,LPCVOID);
128 WINSCARDAPI LONG WINAPI SCardGetAttrib(SCARDHANDLE,DWORD,LPBYTE,LPDWORD);
129 WINSCARDAPI LONG WINAPI SCardGetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPSTR,LPDWORD);
130 WINSCARDAPI LONG WINAPI SCardGetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPWSTR,LPDWORD);
131 #define SCardGetCardTypeProviderName WINELIB_NAME_AW(SCardGetCardTypeProviderName)
132 WINSCARDAPI LONG WINAPI SCardGetProviderIdA(SCARDCONTEXT,LPCSTR,LPGUID);
133 WINSCARDAPI LONG WINAPI SCardGetProviderIdW(SCARDCONTEXT,LPCWSTR,LPGUID);
134 #define SCardGetProviderId WINELIB_NAME_AW(SCardGetProviderId)
135 WINSCARDAPI LONG WINAPI SCardGetStatusChangeA(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEA,DWORD);
136 WINSCARDAPI LONG WINAPI SCardGetStatusChangeW(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEW,DWORD);
137 #define SCardGetStatusChange WINELIB_NAME_AW(SCardGetStatusChange)
138 WINSCARDAPI LONG WINAPI SCardIntroduceCardTypeA(SCARDCONTEXT,LPCSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
139 WINSCARDAPI LONG WINAPI SCardIntroduceCardTypeW(SCARDCONTEXT,LPCWSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
140 #define SCardIntroduceCardType WINELIB_NAME_AW(SCardIntroduceCardType)
141 WINSCARDAPI LONG WINAPI SCardIntroduceReaderA(SCARDCONTEXT,LPCSTR,LPCSTR);
142 WINSCARDAPI LONG WINAPI SCardIntroduceReaderW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
143 #define SCardIntroduceReader WINELIB_NAME_AW(SCardIntroduceReader)
144 WINSCARDAPI LONG WINAPI SCardIntroduceReaderGroupA(SCARDCONTEXT,LPCSTR);
145 WINSCARDAPI LONG WINAPI SCardIntroduceReaderGroupW(SCARDCONTEXT,LPCWSTR);
146 #define SCardIntroduceReaderGroup WINELIB_NAME_AW(SCardIntroduceReaderGroup)
147 WINSCARDAPI LONG WINAPI SCardIsValidContext(SCARDCONTEXT);
148 WINSCARDAPI LONG WINAPI SCardListCardsA(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPSTR,LPDWORD);
149 WINSCARDAPI LONG WINAPI SCardListCardsW(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPWSTR,LPDWORD);
150 #define SCardListCards WINELIB_NAME_AW(SCardListCards)
151 WINSCARDAPI LONG WINAPI SCardListInterfacesA(SCARDCONTEXT,LPCSTR,LPGUID,LPDWORD);
152 WINSCARDAPI LONG WINAPI SCardListInterfacesW(SCARDCONTEXT,LPCWSTR,LPGUID,LPDWORD);
153 #define SCardListInterfaces WINELIB_NAME_AW(SCardListInterfaces)
154 WINSCARDAPI LONG WINAPI SCardListReadersA(SCARDCONTEXT,const CHAR *,CHAR *,DWORD *);
155 WINSCARDAPI LONG WINAPI SCardListReadersW(SCARDCONTEXT,const WCHAR *,WCHAR *,DWORD *);
156 #define SCardListReaders WINELIB_NAME_AW(SCardListReaders)
157 WINSCARDAPI LONG WINAPI SCardListReaderGroupsA(SCARDCONTEXT,LPSTR,LPDWORD);
158 WINSCARDAPI LONG WINAPI SCardListReaderGroupsW(SCARDCONTEXT,LPWSTR,LPDWORD);
159 #define SCardListReaderGroups WINELIB_NAME_AW(SCardListReaderGroups)
160 WINSCARDAPI LONG WINAPI SCardLocateCardsA(SCARDCONTEXT,LPCSTR,LPSCARD_READERSTATEA,DWORD);
161 WINSCARDAPI LONG WINAPI SCardLocateCardsW(SCARDCONTEXT,LPCWSTR,LPSCARD_READERSTATEW,DWORD);
162 #define SCardLocateCards WINELIB_NAME_AW(SCardLocateCards)
163 WINSCARDAPI LONG WINAPI SCardLocateCardsByATRA(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEA,DWORD);
164 WINSCARDAPI LONG WINAPI SCardLocateCardsByATRW(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEW,DWORD);
165 #define SCardLocateCardsByATR WINELIB_NAME_AW(SCardLocateCardsByATR)
166 WINSCARDAPI LONG WINAPI SCardReconnect(SCARDHANDLE,DWORD,DWORD,DWORD,LPDWORD);
167 WINSCARDAPI LONG WINAPI SCardReleaseContext(SCARDCONTEXT);
168 WINSCARDAPI void WINAPI SCardReleaseStartedEvent(void);
169 WINSCARDAPI LONG WINAPI SCardRemoveReaderFromGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
170 WINSCARDAPI LONG WINAPI SCardRemoveReaderFromGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
171 #define SCardRemoveReaderFromGroup WINELIB_NAME_AW(SCardRemoveReaderFromGroup)
172 WINSCARDAPI LONG WINAPI SCardSetAttrib(SCARDHANDLE,DWORD,LPCBYTE,DWORD);
173 WINSCARDAPI LONG WINAPI SCardSetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPCSTR);
174 WINSCARDAPI LONG WINAPI SCardSetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPCWSTR);
175 #define SCardSetCardTypeProviderName WINELIB_NAME_AW(SCardSetCardTypeProviderName)
176 WINSCARDAPI LONG WINAPI SCardState(SCARDHANDLE,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
177 WINSCARDAPI LONG WINAPI SCardStatusA(SCARDHANDLE,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
178 WINSCARDAPI LONG WINAPI SCardStatusW(SCARDHANDLE,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
179 #define SCardStatus WINELIB_NAME_AW(SCardStatus)
180 WINSCARDAPI LONG WINAPI SCardTransmit(SCARDHANDLE,LPCSCARD_IO_REQUEST,LPCBYTE,DWORD,LPSCARD_IO_REQUEST,LPBYTE,LPDWORD);
182 #ifdef __cplusplus
184 #endif
186 #endif /* __WINE_WINSCARD_H */