aclglobal.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. /*
  13. ** Header file containing global data elements. These are duplicated
  14. ** when a cache flush is done.
  15. */
  16. #include <libaccess/acl.h>
  17. struct ACLGlobal_s {
  18. ACLListHandle_t *masterlist;
  19. pool_handle_t *pool; /* Deallocate at the start of cache flush */
  20. pool_handle_t *databasepool;
  21. pool_handle_t *methodpool;
  22. PRHashTable *urihash;
  23. PRHashTable *urigethash;
  24. PRHashTable *listhash;
  25. PRHashTable *evalhash;
  26. PRHashTable *flushhash;
  27. PRHashTable *methodhash;
  28. PRHashTable *dbtypehash;
  29. PRHashTable *dbnamehash;
  30. PRHashTable *attrgetterhash;
  31. PRHashTable *userLdbHash; /* user's LDAP handle hash */
  32. };
  33. typedef struct ACLGlobal_s ACLGlobal_t;
  34. typedef struct ACLGlobal_s *ACLGlobal_p;
  35. #define acl_uri_hash_pool ACLGlobal->pool
  36. #define acl_uri_hash ACLGlobal->urihash
  37. #define acl_uri_get_hash ACLGlobal->urigethash
  38. #define ACLListHash ACLGlobal->listhash
  39. #define ACLLasEvalHash ACLGlobal->evalhash
  40. #define ACLLasFlushHash ACLGlobal->flushhash
  41. #define ACLMethodHash ACLGlobal->methodhash
  42. #define ACLDbTypeHash ACLGlobal->dbtypehash
  43. #define ACLDbNameHash ACLGlobal->dbnamehash
  44. #define ACLAttrGetterHash ACLGlobal->attrgetterhash
  45. #define ACLUserLdbHash ACLGlobal->userLdbHash
  46. #define ACL_DATABASE_POOL ACLGlobal->databasepool
  47. #define ACL_METHOD_POOL ACLGlobal->methodpool
  48. NSPR_BEGIN_EXTERN_C
  49. extern ACLGlobal_p ACLGlobal;
  50. extern ACLGlobal_p oldACLGlobal;
  51. NSPR_END_EXTERN_C