apr_env.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_ENV_H
  17. #define APR_ENV_H
  18. /**
  19. * @file apr_env.h
  20. * @brief APR Environment functions
  21. */
  22. #include "apr_errno.h"
  23. #include "apr_pools.h"
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif /* __cplusplus */
  27. /**
  28. * @defgroup apr_env Functions for manipulating the environment
  29. * @ingroup APR
  30. * @{
  31. */
  32. /**
  33. * Get the value of an environment variable
  34. * @param value the returned value, allocated from @a pool
  35. * @param envvar the name of the environment variable
  36. * @param pool where to allocate @a value and any temporary storage from
  37. */
  38. APR_DECLARE(apr_status_t) apr_env_get(char **value, const char *envvar,
  39. apr_pool_t *pool);
  40. /**
  41. * Set the value of an environment variable
  42. * @param envvar the name of the environment variable
  43. * @param value the value to set
  44. * @param pool where to allocate temporary storage from
  45. */
  46. APR_DECLARE(apr_status_t) apr_env_set(const char *envvar, const char *value,
  47. apr_pool_t *pool);
  48. /**
  49. * Delete a variable from the environment
  50. * @param envvar the name of the environment variable
  51. * @param pool where to allocate temporary storage from
  52. */
  53. APR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool);
  54. /** @} */
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58. #endif /* ! APR_ENV_H */