cl5.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /* cl5.h - changelog related function */
  13. #ifndef CL5_H
  14. #define CL5_H
  15. #include "cl5_api.h" /* changelog access APIs */
  16. typedef struct changelog5Config
  17. {
  18. char *dir;
  19. /* These 3 parameters are needed for changelog trimming. */
  20. char *maxAge;
  21. int maxEntries;
  22. long trimInterval;
  23. /* configuration of changelog encryption */
  24. char *encryptionAlgorithm;
  25. char *symmetricKey;
  26. } changelog5Config;
  27. /* upgrade changelog*/
  28. int changelog5_upgrade(void);
  29. /* initialize changelog*/
  30. int changelog5_init(void);
  31. /* cleanups changelog data */
  32. void changelog5_cleanup(void);
  33. /* initializes changelog configurationd */
  34. int changelog5_config_init(void);
  35. /* cleanups config data */
  36. void changelog5_config_cleanup(void);
  37. /* reads changelog configuration */
  38. int changelog5_read_config(changelog5Config *config);
  39. /* transforms entry to internal config */
  40. void changelog5_extract_config(Slapi_Entry *entry, changelog5Config *config);
  41. /* registeri/unregister functions to handle config changes */
  42. int changelog5_register_config_callbacks(const char *dn, Replica *replica);
  43. int changelog5_remove_config_callbacks(const char *dn);
  44. /* cleanups the content of the config structure */
  45. void changelog5_config_done(changelog5Config *config);
  46. /* frees the content and the config structure */
  47. void changelog5_config_free(changelog5Config **config);
  48. #define MAX_TRIALS 50 /* number of retries on db operations */
  49. #endif