cl4_api.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright 2001 Sun Microsystems, Inc.
  3. * Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
  4. * All rights reserved.
  5. * END COPYRIGHT BLOCK **/
  6. /* cl4_api.h - minimal interface to 4.0 changelog necessary to link 4.0 changelog
  7. to 5.0 replication
  8. */
  9. #ifndef CL4_API_H
  10. #define CL4_API_H
  11. #include "repl.h"
  12. /*** Error Codes ***/
  13. enum
  14. {
  15. CL4_SUCCESS,
  16. CL4_BAD_DATA,
  17. CL4_BAD_FORMAT,
  18. CL4_NOT_FOUND,
  19. CL4_MEMORY_ERROR,
  20. CL4_CSNPL_ERROR,
  21. CL4_LDAP_ERROR,
  22. CL4_INTERNAL_ERROR
  23. };
  24. /*** APIs ***/
  25. /* Name: cl4Init
  26. Description: initializes 4.0 changelog subsystem
  27. Parameters: none
  28. Return: ????
  29. */
  30. int cl4Init ();
  31. /* Name: cl4WriteOperation
  32. Description: logs operation to 4.0 changelog; operation must go through CD&R engine first
  33. Parameters: op - operation to be logged
  34. Return: ????
  35. */
  36. int cl4WriteOperation (const slapi_operation_parameters *op);
  37. /* Name: cl4ChangeTargetDN
  38. Description: modifies change entry target dn; should be called for conflicts due to naming collisions;
  39. raw dn should be passed for add operations; normolized dn otherwise.
  40. Parameters: csn - csn of the change entry to be modified
  41. newDN - new target dn of the entry
  42. Return: ????
  43. */
  44. int cl4ChangeTargetDN (const CSN* csn, const char *newDN);
  45. /* Name: cl4AssignChangeNumbers
  46. Description: this function should be called periodically to assign change numbers to changelog
  47. entries. Intended for use with event queue
  48. Parameters: parameters are not currently used
  49. Return: none
  50. */
  51. void cl4AssignChangeNumbers (time_t when, void *arg);
  52. /* Name: cl4Cleanup
  53. Description: frees memory held by 4.0 changelog subsystem
  54. Parameters: none
  55. Return: none
  56. */
  57. void cl4Clean ();
  58. #endif