apr_perms_set.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef APR_PERMS_SET_H
  17. #define APR_PERMS_SET_H
  18. /**
  19. * @file apr_perms_set.h
  20. * @brief APR Process Locking Routines
  21. */
  22. #include "apr.h"
  23. #include "apr_pools.h"
  24. #include "apr_errno.h"
  25. #include "apr_user.h"
  26. #include "apr_file_info.h"
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif /* __cplusplus */
  30. /**
  31. * @defgroup apr_perms_set Object permission set functions
  32. * @ingroup APR
  33. * @{
  34. */
  35. /** Permission set callback function. */
  36. typedef apr_status_t (apr_perms_setfn_t)(void *object, apr_fileperms_t perms,
  37. apr_uid_t uid, apr_gid_t gid);
  38. #define APR_PERMS_SET_IMPLEMENT(type) \
  39. APR_DECLARE(apr_status_t) apr_##type##_perms_set \
  40. (void *the##type, apr_fileperms_t perms, \
  41. apr_uid_t uid, apr_gid_t gid)
  42. #define APR_PERMS_SET_ENOTIMPL(type) \
  43. APR_DECLARE(apr_status_t) apr_##type##_perms_set \
  44. (void *the##type, apr_fileperms_t perms, \
  45. apr_uid_t uid, apr_gid_t gid) \
  46. { return APR_ENOTIMPL ; }
  47. #define APR_PERMS_SET_FN(type) apr_##type##_perms_set
  48. /** @} */
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif /* ! APR_PERMS_SET */