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