php_ldap.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #ifndef PHP_LDAP_H
  19. #define PHP_LDAP_H
  20. #ifndef HAVE_ORALDAP
  21. #include <lber.h>
  22. #endif
  23. #include <ldap.h>
  24. extern zend_module_entry ldap_module_entry;
  25. #define ldap_module_ptr &ldap_module_entry
  26. #include "php_version.h"
  27. #define PHP_LDAP_VERSION PHP_VERSION
  28. /* LDAP functions */
  29. PHP_MINIT_FUNCTION(ldap);
  30. PHP_MSHUTDOWN_FUNCTION(ldap);
  31. PHP_MINFO_FUNCTION(ldap);
  32. ZEND_BEGIN_MODULE_GLOBALS(ldap)
  33. zend_long num_links;
  34. zend_long max_links;
  35. ZEND_END_MODULE_GLOBALS(ldap)
  36. #if defined(ZTS) && defined(COMPILE_DL_LDAP)
  37. ZEND_TSRMLS_CACHE_EXTERN()
  38. #endif
  39. ZEND_EXTERN_MODULE_GLOBALS(ldap)
  40. #define LDAPG(v) ZEND_MODULE_GLOBALS_ACCESSOR(ldap, v)
  41. #define phpext_ldap_ptr ldap_module_ptr
  42. /* Constants for ldap_modify_batch */
  43. #define LDAP_MODIFY_BATCH_ADD 0x01
  44. #define LDAP_MODIFY_BATCH_REMOVE 0x02
  45. #define LDAP_MODIFY_BATCH_REMOVE_ALL 0x12
  46. #define LDAP_MODIFY_BATCH_REPLACE 0x03
  47. #define LDAP_MODIFY_BATCH_ATTRIB "attrib"
  48. #define LDAP_MODIFY_BATCH_MODTYPE "modtype"
  49. #define LDAP_MODIFY_BATCH_VALUES "values"
  50. #endif /* PHP_LDAP_H */