-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathphp_pcsc.h
58 lines (46 loc) · 1.33 KB
/
php_pcsc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef PHP_PCSC_H
#define PHP_PCSC_H
extern zend_module_entry pcsc_module_entry;
#define phpext_pcsc_ptr &pcsc_module_entry
#define PHP_PCSC_VERSION "0.6.0"
#ifdef PHP_WIN32
#define PHP_PCSC_API __declspec(dllexport)
#else
#define PHP_PCSC_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
#include <winscard.h>
#ifndef PHP_WIN32
#include <PCSC/pcsclite.h>
#endif
PHP_MINIT_FUNCTION(pcsc);
PHP_MSHUTDOWN_FUNCTION(pcsc);
PHP_MINFO_FUNCTION(pcsc);
PHP_FUNCTION(scard_establish_context);
PHP_FUNCTION(scard_is_valid_context);
PHP_FUNCTION(scard_release_context);
PHP_FUNCTION(scard_list_readers);
PHP_FUNCTION(scard_connect);
//PHP_FUNCTION(scard_reconnect);
PHP_FUNCTION(scard_disconnect);
PHP_FUNCTION(scard_begin_transaction);
PHP_FUNCTION(scard_end_transaction);
PHP_FUNCTION(scard_status);
//PHP_FUNCTION(scard_get_status_change);
PHP_FUNCTION(scard_transmit);
PHP_FUNCTION(scard_last_errno);
PHP_FUNCTION(scard_errstr);
#define PHP_PCSC_CTX_RES_NAME "PC/SC Context"
#define PHP_PCSC_CONN_RES_NAME "PC/SC Connection"
static char* php_pcsc_error_to_string(DWORD dwRC);
ZEND_BEGIN_MODULE_GLOBALS(pcsc)
DWORD last_errno;
ZEND_END_MODULE_GLOBALS(pcsc)
#ifdef ZTS
#define PCSC_G(v) TSRMG(pcsc_globals_id,zend_pcsc_globals*,v)
#else
#define PCSC_G(v) (pcsc_globals.v)
#endif
#endif /* PHP_PCSC_H */