apr_env.h revision 251875
1251875Speter/* Licensed to the Apache Software Foundation (ASF) under one or more 2251875Speter * contributor license agreements. See the NOTICE file distributed with 3251875Speter * this work for additional information regarding copyright ownership. 4251875Speter * The ASF licenses this file to You under the Apache License, Version 2.0 5251875Speter * (the "License"); you may not use this file except in compliance with 6251875Speter * the License. You may obtain a copy of the License at 7251875Speter * 8251875Speter * http://www.apache.org/licenses/LICENSE-2.0 9251875Speter * 10251875Speter * Unless required by applicable law or agreed to in writing, software 11251875Speter * distributed under the License is distributed on an "AS IS" BASIS, 12251875Speter * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13251875Speter * See the License for the specific language governing permissions and 14251875Speter * limitations under the License. 15251875Speter */ 16251875Speter 17251875Speter#ifndef APR_ENV_H 18251875Speter#define APR_ENV_H 19251875Speter/** 20251875Speter * @file apr_env.h 21251875Speter * @brief APR Environment functions 22251875Speter */ 23251875Speter#include "apr_errno.h" 24251875Speter#include "apr_pools.h" 25251875Speter 26251875Speter#ifdef __cplusplus 27251875Speterextern "C" { 28251875Speter#endif /* __cplusplus */ 29251875Speter 30251875Speter/** 31251875Speter * @defgroup apr_env Functions for manipulating the environment 32251875Speter * @ingroup APR 33251875Speter * @{ 34251875Speter */ 35251875Speter 36251875Speter/** 37251875Speter * Get the value of an environment variable 38251875Speter * @param value the returned value, allocated from @a pool 39251875Speter * @param envvar the name of the environment variable 40251875Speter * @param pool where to allocate @a value and any temporary storage from 41251875Speter */ 42251875SpeterAPR_DECLARE(apr_status_t) apr_env_get(char **value, const char *envvar, 43251875Speter apr_pool_t *pool); 44251875Speter 45251875Speter/** 46251875Speter * Set the value of an environment variable 47251875Speter * @param envvar the name of the environment variable 48251875Speter * @param value the value to set 49251875Speter * @param pool where to allocate temporary storage from 50251875Speter */ 51251875SpeterAPR_DECLARE(apr_status_t) apr_env_set(const char *envvar, const char *value, 52251875Speter apr_pool_t *pool); 53251875Speter 54251875Speter/** 55251875Speter * Delete a variable from the environment 56251875Speter * @param envvar the name of the environment variable 57251875Speter * @param pool where to allocate temporary storage from 58251875Speter */ 59251875SpeterAPR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool); 60251875Speter 61251875Speter/** @} */ 62251875Speter 63251875Speter#ifdef __cplusplus 64251875Speter} 65251875Speter#endif 66251875Speter 67251875Speter#endif /* ! APR_ENV_H */ 68