1
0

cl4_api.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. /* cl4_api.h - minimal interface to 4.0 changelog necessary to link 4.0 changelog
  13. to 5.0 replication
  14. */
  15. #ifndef CL4_API_H
  16. #define CL4_API_H
  17. #include "repl.h"
  18. /*** Error Codes ***/
  19. enum
  20. {
  21. CL4_SUCCESS,
  22. CL4_BAD_DATA,
  23. CL4_BAD_FORMAT,
  24. CL4_NOT_FOUND,
  25. CL4_MEMORY_ERROR,
  26. CL4_CSNPL_ERROR,
  27. CL4_LDAP_ERROR,
  28. CL4_INTERNAL_ERROR
  29. };
  30. /*** APIs ***/
  31. /* Name: cl4Init
  32. Description: initializes 4.0 changelog subsystem
  33. Parameters: none
  34. Return: ????
  35. */
  36. int cl4Init ();
  37. /* Name: cl4WriteOperation
  38. Description: logs operation to 4.0 changelog; operation must go through CD&R engine first
  39. Parameters: op - operation to be logged
  40. Return: ????
  41. */
  42. int cl4WriteOperation (const slapi_operation_parameters *op);
  43. /* Name: cl4ChangeTargetDN
  44. Description: modifies change entry target dn; should be called for conflicts due to naming collisions;
  45. raw dn should be passed for add operations; normolized dn otherwise.
  46. Parameters: csn - csn of the change entry to be modified
  47. newDN - new target dn of the entry
  48. Return: ????
  49. */
  50. int cl4ChangeTargetDN (const CSN* csn, const char *newDN);
  51. /* Name: cl4AssignChangeNumbers
  52. Description: this function should be called periodically to assign change numbers to changelog
  53. entries. Intended for use with event queue
  54. Parameters: parameters are not currently used
  55. Return: none
  56. */
  57. void cl4AssignChangeNumbers (time_t when, void *arg);
  58. /* Name: cl4Cleanup
  59. Description: frees memory held by 4.0 changelog subsystem
  60. Parameters: none
  61. Return: none
  62. */
  63. void cl4Clean ();
  64. #endif