cl5.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 2 parameters are needed for changelog trimming. Already present in 5.0 */
  20. char *maxAge;
  21. int maxEntries;
  22. /* the changelog DB configuration parameters are defined as CL5DBConfig in cl5_api.h */
  23. CL5DBConfig dbconfig;
  24. char *symmetricKey;
  25. long compactInterval;
  26. long trimInterval;
  27. }changelog5Config;
  28. /* initializes changelog*/
  29. int changelog5_init();
  30. /* cleanups changelog data */
  31. void changelog5_cleanup();
  32. /* initializes changelog configurationd */
  33. int changelog5_config_init();
  34. /* cleanups config data */
  35. void changelog5_config_cleanup();
  36. /* reads changelog configuration */
  37. int changelog5_read_config (changelog5Config *config);
  38. /* cleanups the content of the config structure */
  39. void changelog5_config_done (changelog5Config *config);
  40. /* frees the content and the config structure */
  41. void changelog5_config_free (changelog5Config **config);
  42. #define MAX_TRIALS 50 /* number of retries on db operations */
  43. #endif