filter.h 966 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #ifndef _FILTER_H_
  13. #define _FILTER_H_
  14. #include "slapi-plugin.h" /* struct berval, Slapi_PBlock, mrFilterMatchFn */
  15. typedef Slapi_Attr* attr_ptr;
  16. typedef int (*mrf_plugin_fn) (Slapi_PBlock*);
  17. #define MRF_ANY_TYPE 1
  18. #define MRF_ANY_VALUE 2
  19. typedef struct mr_filter_t {
  20. char* mrf_oid;
  21. char* mrf_type;
  22. struct berval mrf_value;
  23. char mrf_dnAttrs;
  24. mrFilterMatchFn mrf_match;
  25. mrf_plugin_fn mrf_index;
  26. unsigned int mrf_reusable; /* MRF_ANY_xxx */
  27. mrf_plugin_fn mrf_reset;
  28. void* mrf_object; /* whatever the implementation needs */
  29. mrf_plugin_fn mrf_destroy;
  30. } mr_filter_t;
  31. #endif