xref: /PHP-7.4/ext/ldap/php_ldap.h (revision f1b306fe)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) The PHP Group                                          |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Amitay Isaacs <amitay@w-o-i.com>                            |
16    |          Eric Warnke   <ericw@albany.edu>                            |
17    |          Jani Taskinen <sniper@iki.fi>                               |
18    +----------------------------------------------------------------------+
19 */
20 
21 #ifndef PHP_LDAP_H
22 #define PHP_LDAP_H
23 
24 #ifndef HAVE_ORALDAP
25 #include <lber.h>
26 #endif
27 
28 #include <ldap.h>
29 
30 extern zend_module_entry ldap_module_entry;
31 #define ldap_module_ptr &ldap_module_entry
32 
33 #include "php_version.h"
34 #define PHP_LDAP_VERSION PHP_VERSION
35 
36 /* LDAP functions */
37 PHP_MINIT_FUNCTION(ldap);
38 PHP_MSHUTDOWN_FUNCTION(ldap);
39 PHP_MINFO_FUNCTION(ldap);
40 
41 ZEND_BEGIN_MODULE_GLOBALS(ldap)
42 	zend_long num_links;
43 	zend_long max_links;
44 ZEND_END_MODULE_GLOBALS(ldap)
45 
46 #if defined(ZTS) && defined(COMPILE_DL_LDAP)
47 ZEND_TSRMLS_CACHE_EXTERN()
48 #endif
49 
50 ZEND_EXTERN_MODULE_GLOBALS(ldap)
51 #define LDAPG(v) ZEND_MODULE_GLOBALS_ACCESSOR(ldap, v)
52 
53 #define phpext_ldap_ptr ldap_module_ptr
54 
55 /* Constants for ldap_modify_batch */
56 #define LDAP_MODIFY_BATCH_ADD        0x01
57 #define LDAP_MODIFY_BATCH_REMOVE     0x02
58 #define LDAP_MODIFY_BATCH_REMOVE_ALL 0x12
59 #define LDAP_MODIFY_BATCH_REPLACE    0x03
60 
61 #define LDAP_MODIFY_BATCH_ATTRIB     "attrib"
62 #define LDAP_MODIFY_BATCH_MODTYPE    "modtype"
63 #define LDAP_MODIFY_BATCH_VALUES     "values"
64 
65 #endif /* PHP_LDAP_H */
66