plugin-utils.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  3. * Copyright (C) 2005 Red Hat, Inc.
  4. * All rights reserved.
  5. *
  6. * License: GPL (version 3 or any later version).
  7. * See LICENSE for details.
  8. * END COPYRIGHT BLOCK **/
  9. #ifdef HAVE_CONFIG_H
  10. # include <config.h>
  11. #endif
  12. /***********************************************************************
  13. **
  14. ** NAME
  15. ** plugin-utils.h
  16. **
  17. ** DESCRIPTION
  18. **
  19. **
  20. ** AUTHOR
  21. ** <[email protected]>
  22. **
  23. ***********************************************************************/
  24. #ifndef _PLUGIN_UTILS_H_
  25. #define _PLUGIN_UTILS_H_
  26. /***********************************************************************
  27. ** Includes
  28. ***********************************************************************/
  29. #include <slapi-plugin.h>
  30. /*
  31. * slapi-plugin-compat4.h is needed because we use the following deprecated
  32. * functions:
  33. *
  34. * slapi_search_internal()
  35. * slapi_modify_internal()
  36. */
  37. #include "slapi-plugin-compat4.h"
  38. #include <stdio.h>
  39. #include <string.h>
  40. #ifdef LDAP_DEBUG
  41. #ifndef DEBUG
  42. #define DEBUG
  43. #endif
  44. #endif
  45. #define BEGIN do {
  46. #define END } while(0);
  47. int op_error(int internal_error);
  48. Slapi_PBlock *readPblockAndEntry( Slapi_DN *baseDN, const char *filter,
  49. char *attrs[] );
  50. int entryHasObjectClass(Slapi_PBlock *pb, Slapi_Entry *e,
  51. const char *objectClass);
  52. Slapi_PBlock *dnHasObjectClass( Slapi_DN *baseDN, const char *objectClass );
  53. Slapi_PBlock *dnHasAttribute( const char *baseDN, const char *attrName );
  54. #endif /* _PLUGIN_UTILS_H_ */