widl: Support WinRT parameterized delegate type.
[wine/zf.git] / include / winscard.h
blob5aee1b3e54831d9548df5b607569eb18837522ef
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 /* Valid scopes for contexts */
28 #define SCARD_SCOPE_USER 0
29 #define SCARD_SCOPE_TERMINAL 1
30 #define SCARD_SCOPE_SYSTEM 2
32 #ifndef _LPCBYTE_DEFINED
33 #define _LPCBYTE_DEFINED
34 typedef const BYTE *LPCBYTE;
35 #endif
37 typedef ULONG_PTR SCARDCONTEXT, *PSCARDCONTEXT, *LPSCARDCONTEXT;
38 typedef ULONG_PTR SCARDHANDLE, *PSCARDHANDLE, *LPSCARDHANDLE;
40 typedef struct _SCARD_ATRMASK
42 DWORD cbAtr;
43 BYTE rgbAtr[36];
44 BYTE rgbMask[36];
45 } SCARD_ATRMASK, *PSCARD_ATRMASK, *LPSCARD_ATRMASK;
47 typedef struct
49 LPCSTR szReader;
50 LPVOID pvUserData;
51 DWORD dwCurrentState;
52 DWORD dwEventState;
53 DWORD cbAtr;
54 BYTE rgbAtr[36];
55 } SCARD_READERSTATEA, *PSCARD_READERSTATEA, *LPSCARD_READERSTATEA;
56 typedef struct
58 LPCWSTR szReader;
59 LPVOID pvUserData;
60 DWORD dwCurrentState;
61 DWORD dwEventState;
62 DWORD cbAtr;
63 BYTE rgbAtr[36];
64 } SCARD_READERSTATEW, *PSCARD_READERSTATEW, *LPSCARD_READERSTATEW;
65 DECL_WINELIB_TYPE_AW(SCARD_READERSTATE)
66 DECL_WINELIB_TYPE_AW(PSCARD_READERSTATE)
67 DECL_WINELIB_TYPE_AW(LPSCARD_READERSTATE)
69 #define SCARD_AUTOALLOCATE (DWORD)(-1)
71 #define SCARD_SCOPE_USER 0
72 #define SCARD_SCOPE_TERMINAL 1
73 #define SCARD_SCOPE_SYSTEM 2
75 #define SCARD_STATE_UNAWARE 0x00000000
76 #define SCARD_STATE_IGNORE 0x00000001
77 #define SCARD_STATE_CHANGED 0x00000002
78 #define SCARD_STATE_UNKNOWN 0x00000004
79 #define SCARD_STATE_UNAVAILABLE 0x00000008
80 #define SCARD_STATE_EMPTY 0x00000010
81 #define SCARD_STATE_PRESENT 0x00000020
82 #define SCARD_STATE_ATRMATCH 0x00000040
83 #define SCARD_STATE_EXCLUSIVE 0x00000080
84 #define SCARD_STATE_INUSE 0x00000100
85 #define SCARD_STATE_MUTE 0x00000200
86 #define SCARD_STATE_UNPOWERED 0x00000400
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
92 HANDLE WINAPI SCardAccessStartedEvent(void);
93 LONG WINAPI SCardAddReaderToGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
94 LONG WINAPI SCardAddReaderToGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
95 #define SCardAddReaderToGroup WINELIB_NAME_AW(SCardAddReaderToGroup)
96 LONG WINAPI SCardBeginTransaction(SCARDHANDLE);
97 LONG WINAPI SCardCancel(SCARDCONTEXT);
98 LONG WINAPI SCardConnectA(SCARDCONTEXT,LPCSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
99 LONG WINAPI SCardConnectW(SCARDCONTEXT,LPCWSTR,DWORD,DWORD,LPSCARDHANDLE,LPDWORD);
100 #define SCardConnect WINELIB_NAME_AW(SCardConnect)
101 LONG WINAPI SCardControl(SCARDHANDLE,DWORD,LPCVOID,DWORD,LPVOID,DWORD,LPDWORD);
102 LONG WINAPI SCardDisconnect(SCARDHANDLE,DWORD);
103 LONG WINAPI SCardEndTransaction(SCARDHANDLE,DWORD);
104 LONG WINAPI SCardEstablishContext(DWORD,LPCVOID,LPCVOID,LPSCARDCONTEXT);
105 LONG WINAPI SCardForgetCardTypeA(SCARDCONTEXT,LPCSTR);
106 LONG WINAPI SCardForgetCardTypeW(SCARDCONTEXT,LPCWSTR);
107 #define SCardForgetCardType WINELIB_NAME_AW(SCardForgetCardType)
108 LONG WINAPI SCardForgetReaderA(SCARDCONTEXT,LPCSTR);
109 LONG WINAPI SCardForgetReaderW(SCARDCONTEXT,LPCWSTR);
110 #define SCardForgetReader WINELIB_NAME_AW(SCardForgetReader)
111 LONG WINAPI SCardForgetReaderGroupA(SCARDCONTEXT,LPCSTR);
112 LONG WINAPI SCardForgetReaderGroupW(SCARDCONTEXT,LPCWSTR);
113 #define SCardForgetReaderGroup WINELIB_NAME_AW(SCardForgetReaderGroup)
114 LONG WINAPI SCardFreeMemory(SCARDCONTEXT,LPCVOID);
115 LONG WINAPI SCardGetAttrib(SCARDHANDLE,DWORD,LPBYTE,LPDWORD);
116 LONG WINAPI SCardGetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPSTR,LPDWORD);
117 LONG WINAPI SCardGetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPWSTR,LPDWORD);
118 #define SCardGetCardTypeProviderName WINELIB_NAME_AW(SCardGetCardTypeProviderName)
119 LONG WINAPI SCardGetProviderIdA(SCARDCONTEXT,LPCSTR,LPGUID);
120 LONG WINAPI SCardGetProviderIdW(SCARDCONTEXT,LPCWSTR,LPGUID);
121 #define SCardGetProviderId WINELIB_NAME_AW(SCardGetProviderId)
122 LONG WINAPI SCardGetStatusChangeA(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEA,DWORD);
123 LONG WINAPI SCardGetStatusChangeW(SCARDCONTEXT,DWORD,LPSCARD_READERSTATEW,DWORD);
124 #define SCardGetStatusChange WINELIB_NAME_AW(SCardGetStatusChange)
125 LONG WINAPI SCardIntroduceCardTypeA(SCARDCONTEXT,LPCSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
126 LONG WINAPI SCardIntroduceCardTypeW(SCARDCONTEXT,LPCWSTR,LPCGUID,LPCGUID,DWORD,LPCBYTE,LPCBYTE,DWORD);
127 #define SCardIntroduceCardType WINELIB_NAME_AW(SCardIntroduceCardType)
128 LONG WINAPI SCardIntroduceReaderA(SCARDCONTEXT,LPCSTR,LPCSTR);
129 LONG WINAPI SCardIntroduceReaderW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
130 #define SCardIntroduceReader WINELIB_NAME_AW(SCardIntroduceReader)
131 LONG WINAPI SCardIntroduceReaderGroupA(SCARDCONTEXT,LPCSTR);
132 LONG WINAPI SCardIntroduceReaderGroupW(SCARDCONTEXT,LPCWSTR);
133 #define SCardIntroduceReaderGroup WINELIB_NAME_AW(SCardIntroduceReaderGroup)
134 LONG WINAPI SCardIsValidContext(SCARDCONTEXT);
135 LONG WINAPI SCardListCardsA(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPSTR,LPDWORD);
136 LONG WINAPI SCardListCardsW(SCARDCONTEXT,LPCBYTE,LPCGUID,DWORD,LPWSTR,LPDWORD);
137 #define SCardListCards WINELIB_NAME_AW(SCardListCards)
138 LONG WINAPI SCardListInterfacesA(SCARDCONTEXT,LPCSTR,LPGUID,LPDWORD);
139 LONG WINAPI SCardListInterfacesW(SCARDCONTEXT,LPCWSTR,LPGUID,LPDWORD);
140 #define SCardListInterfaces WINELIB_NAME_AW(SCardListInterfaces)
141 LONG WINAPI SCardListReadersA(SCARDCONTEXT,const CHAR *,CHAR *,DWORD *);
142 LONG WINAPI SCardListReadersW(SCARDCONTEXT,const WCHAR *,WCHAR *,DWORD *);
143 #define SCardListReaders WINELIB_NAME_AW(SCardListReaders)
144 LONG WINAPI SCardListReaderGroupsA(SCARDCONTEXT,LPSTR,LPDWORD);
145 LONG WINAPI SCardListReaderGroupsW(SCARDCONTEXT,LPWSTR,LPDWORD);
146 #define SCardListReaderGroups WINELIB_NAME_AW(SCardListReaderGroups)
147 LONG WINAPI SCardLocateCardsA(SCARDCONTEXT,LPCSTR,LPSCARD_READERSTATEA,DWORD);
148 LONG WINAPI SCardLocateCardsW(SCARDCONTEXT,LPCWSTR,LPSCARD_READERSTATEW,DWORD);
149 #define SCardLocateCards WINELIB_NAME_AW(SCardLocateCards)
150 LONG WINAPI SCardLocateCardsByATRA(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEA,DWORD);
151 LONG WINAPI SCardLocateCardsByATRW(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPSCARD_READERSTATEW,DWORD);
152 #define SCardLocateCardsByATR WINELIB_NAME_AW(SCardLocateCardsByATR)
153 LONG WINAPI SCardReconnect(SCARDHANDLE,DWORD,DWORD,DWORD,LPDWORD);
154 LONG WINAPI SCardReleaseContext(SCARDCONTEXT);
155 void WINAPI SCardReleaseStartedEvent(void);
156 LONG WINAPI SCardRemoveReaderFromGroupA(SCARDCONTEXT,LPCSTR,LPCSTR);
157 LONG WINAPI SCardRemoveReaderFromGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR);
158 #define SCardRemoveReaderFromGroup WINELIB_NAME_AW(SCardRemoveReaderFromGroup)
159 LONG WINAPI SCardSetAttrib(SCARDHANDLE,DWORD,LPCBYTE,DWORD);
160 LONG WINAPI SCardSetCardTypeProviderNameA(SCARDCONTEXT,LPCSTR,DWORD,LPCSTR);
161 LONG WINAPI SCardSetCardTypeProviderNameW(SCARDCONTEXT,LPCWSTR,DWORD,LPCWSTR);
162 #define SCardSetCardTypeProviderName WINELIB_NAME_AW(SCardSetCardTypeProviderName)
163 LONG WINAPI SCardState(SCARDHANDLE,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
164 LONG WINAPI SCardStatusA(SCARDHANDLE,LPSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
165 LONG WINAPI SCardStatusW(SCARDHANDLE,LPWSTR,LPDWORD,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
166 #define SCardStatus WINELIB_NAME_AW(SCardStatus)
167 LONG WINAPI SCardTransmit(SCARDHANDLE,LPCSCARD_IO_REQUEST,LPCBYTE,DWORD,LPSCARD_IO_REQUEST,LPBYTE,LPDWORD);
169 #ifdef __cplusplus
171 #endif
173 #endif /* __WINE_WINSCARD_H */