Fix license URL must point to YAZ license (revised BSD) PHPYAZ-28
[phpyaz-moved-to-github.git] / php_yaz.h
1 /* This file is part of PHP YAZ.
2  * Copyright (C) Index Data 2004-1014
3  * See the file LICENSE for details.
4  */
5
6 #ifndef PHP_YAZ_H
7 #define PHP_YAZ_H
8
9 #define PHP_YAZ_VERSION "1.1.8"
10
11 #if HAVE_YAZ
12
13 #ifdef ZTS
14 #include "TSRM.h"
15 #endif
16
17 extern zend_module_entry yaz_module_entry;
18 #define yaz_module_ptr &yaz_module_entry
19
20 PHP_FUNCTION(yaz_connect);
21 PHP_FUNCTION(yaz_close);
22 PHP_FUNCTION(yaz_search);
23 PHP_FUNCTION(yaz_wait);
24 PHP_FUNCTION(yaz_errno);
25 PHP_FUNCTION(yaz_error);
26 PHP_FUNCTION(yaz_addinfo);
27 PHP_FUNCTION(yaz_hits);
28 PHP_FUNCTION(yaz_record);
29 PHP_FUNCTION(yaz_syntax);
30 PHP_FUNCTION(yaz_element);
31 PHP_FUNCTION(yaz_range);
32 PHP_FUNCTION(yaz_itemorder);
33 PHP_FUNCTION(yaz_scan);
34 PHP_FUNCTION(yaz_scan_result);
35 PHP_FUNCTION(yaz_es_result);
36 PHP_FUNCTION(yaz_present);
37 PHP_FUNCTION(yaz_ccl_conf);
38 PHP_FUNCTION(yaz_ccl_parse);
39 #if YAZ_VERSIONL >= 0x050100
40 PHP_FUNCTION(yaz_cql_parse);
41 PHP_FUNCTION(yaz_cql_conf);
42 #endif
43 PHP_FUNCTION(yaz_database);
44 PHP_FUNCTION(yaz_sort);
45 PHP_FUNCTION(yaz_schema);
46 PHP_FUNCTION(yaz_set_option);
47 PHP_FUNCTION(yaz_get_option);
48 PHP_FUNCTION(yaz_es);
49
50 ZEND_BEGIN_MODULE_GLOBALS(yaz)
51         int assoc_seq;
52         long max_links;
53         long keepalive;
54         char *log_file;
55         char *log_mask;
56 ZEND_END_MODULE_GLOBALS(yaz)
57
58 #ifdef ZTS
59 #define YAZSG(v) TSRMG(yaz_globals_id, zend_yaz_globals *, v)
60 #else
61 #define YAZSG(v) (yaz_globals.v)
62 #endif
63
64 #else
65
66 #define yaz_module_ptr NULL
67 #endif
68
69 #define phpext_yaz_ptr yaz_module_ptr
70 #endif