php_ldap.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 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. #ifndef PHP_LDAP_H
  21. #define PHP_LDAP_H
  22. #ifndef HAVE_ORALDAP
  23. #include <lber.h>
  24. #endif
  25. #include <ldap.h>
  26. extern zend_module_entry ldap_module_entry;
  27. #define ldap_module_ptr &ldap_module_entry
  28. #include "php_version.h"
  29. #define PHP_LDAP_VERSION PHP_VERSION
  30. /* LDAP functions */
  31. PHP_MINIT_FUNCTION(ldap);
  32. PHP_MSHUTDOWN_FUNCTION(ldap);
  33. PHP_MINFO_FUNCTION(ldap);
  34. ZEND_BEGIN_MODULE_GLOBALS(ldap)
  35. zend_long num_links;
  36. zend_long max_links;
  37. ZEND_END_MODULE_GLOBALS(ldap)
  38. #ifdef ZTS
  39. # define LDAPG(v) TSRMG(ldap_globals_id, zend_ldap_globals *, v)
  40. #else
  41. # define LDAPG(v) (ldap_globals.v)
  42. #endif
  43. #define phpext_ldap_ptr ldap_module_ptr
  44. /* Constants for ldap_modify_batch */
  45. #define LDAP_MODIFY_BATCH_ADD 0x01
  46. #define LDAP_MODIFY_BATCH_REMOVE 0x02
  47. #define LDAP_MODIFY_BATCH_REMOVE_ALL 0x12
  48. #define LDAP_MODIFY_BATCH_REPLACE 0x03
  49. #define LDAP_MODIFY_BATCH_ATTRIB "attrib"
  50. #define LDAP_MODIFY_BATCH_MODTYPE "modtype"
  51. #define LDAP_MODIFY_BATCH_VALUES "values"
  52. #endif /* PHP_LDAP_H */