csnpl.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. /* csnpl.h - interface for csn pending list */
  13. #ifndef CSNPL_H
  14. #define CSNPL_H
  15. #include "slapi-private.h"
  16. #include "repl5.h"
  17. typedef struct csnpl CSNPL;
  18. CSNPL *csnplNew(void);
  19. void csnplFree(CSNPL **csnpl);
  20. int csnplInsert(CSNPL *csnpl, const CSN *csn, const CSNPL_CTX *prim_csn);
  21. int csnplRemove(CSNPL *csnpl, const CSN *csn);
  22. int csnplRemoveAll(CSNPL *csnpl, const CSNPL_CTX *csn_ctx);
  23. int csnplCommitAll(CSNPL *csnpl, const CSNPL_CTX *csn_ctx);
  24. PRBool csn_primary(Replica *replica, const CSN *csn, const CSNPL_CTX *csn_ctx);
  25. CSN *csnplGetMinCSN(CSNPL *csnpl, PRBool *committed);
  26. int csnplCommit(CSNPL *csnpl, const CSN *csn);
  27. CSN *csnplRollUp(CSNPL *csnpl, CSN **first);
  28. void csnplDumpContent(CSNPL *csnpl, const char *caller);
  29. #endif