urp.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #define REASON_ANNOTATE_DN "namingConflict"
  15. #define REASON_RESURRECT_ENTRY "deletedEntryHasChildren"
  16. /*
  17. * urp.c
  18. */
  19. int urp_modify_operation( Slapi_PBlock *pb );
  20. int urp_add_operation( Slapi_PBlock *pb );
  21. int urp_delete_operation( Slapi_PBlock *pb );
  22. int urp_post_delete_operation( Slapi_PBlock *pb );
  23. int urp_modrdn_operation( Slapi_PBlock *pb );
  24. int urp_post_modrdn_operation( Slapi_PBlock *pb );
  25. char *get_rdn_plus_uniqueid(char *sessionid, const char *olddn, const char *uniqueid);
  26. /* urp internal ops */
  27. int urp_fixup_add_entry (Slapi_Entry *e, const char *target_uniqueid, const char *parentuniqueid, CSN *opcsn, int opflags);
  28. int urp_fixup_delete_entry (const char *uniqueid, const char *dn, CSN *opcsn, int opflags);
  29. int urp_fixup_rename_entry (const Slapi_Entry *entry, const char *newrdn, const char *parentuniqueid, int opflags);
  30. int urp_fixup_modify_entry (const char *uniqueid, const Slapi_DN *sdn, CSN *opcsn, Slapi_Mods *smods, int opflags);
  31. int is_suffix_dn (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn);
  32. int is_suffix_dn_ext (Slapi_PBlock *pb, const Slapi_DN *dn, Slapi_DN **parenddn, int is_tombstone);
  33. /*
  34. * urp_glue.c
  35. */
  36. int is_glue_entry(const Slapi_Entry* entry);
  37. int create_glue_entry ( Slapi_PBlock *pb, char *sessionid, Slapi_DN *dn, const char *uniqueid, CSN *opcsn );
  38. int entry_to_glue(char *sessionid, const Slapi_Entry* entry, const char *reason, CSN *opcsn);
  39. int glue_to_entry (Slapi_PBlock *pb, Slapi_Entry *entry );
  40. PRBool get_glue_csn(const Slapi_Entry *entry, const CSN **gluecsn);
  41. /*
  42. * urp_tombstone.c
  43. */
  44. int is_tombstone_entry(const Slapi_Entry* entry);
  45. int tombstone_to_glue(Slapi_PBlock *pb, char *sessionid, Slapi_Entry *entry, const Slapi_DN *parentdn, const char *reason, CSN *opcsn, Slapi_DN **newparentdn);
  46. int entry_to_tombstone ( Slapi_PBlock *pb, Slapi_Entry *entry );
  47. PRBool get_tombstone_csn(const Slapi_Entry *entry, const CSN **delcsn);