Apache Portable Runtime
apr_perms_set.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_PERMS_SET_H
00018 #define APR_PERMS_SET_H
00019 
00020 /**
00021  * @file apr_perms_set.h
00022  * @brief APR Process Locking Routines
00023  */
00024 
00025 #include "apr.h"
00026 #include "apr_pools.h"
00027 #include "apr_errno.h"
00028 #include "apr_user.h"
00029 #include "apr_file_info.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif /* __cplusplus */
00034 
00035 /**
00036  * @defgroup apr_perms_set Object permission set functions
00037  * @ingroup APR 
00038  * @{
00039  */
00040 
00041 /** Permission set callback function. */
00042 typedef apr_status_t (apr_perms_setfn_t)(void *object, apr_fileperms_t perms,
00043                                          apr_uid_t uid, apr_gid_t gid);
00044 
00045 #define APR_PERMS_SET_IMPLEMENT(type) \
00046     APR_DECLARE(apr_status_t) apr_##type##_perms_set \
00047         (void *the##type, apr_fileperms_t perms, \
00048          apr_uid_t uid, apr_gid_t gid)
00049 
00050 #define APR_PERMS_SET_ENOTIMPL(type) \
00051     APR_DECLARE(apr_status_t) apr_##type##_perms_set \
00052         (void *the##type, apr_fileperms_t perms, \
00053          apr_uid_t uid, apr_gid_t gid) \
00054         { return APR_ENOTIMPL ; }
00055 
00056 #define APR_PERMS_SET_FN(type) apr_##type##_perms_set
00057 
00058 
00059 /** @} */
00060 
00061 #ifdef __cplusplus
00062 }
00063 #endif
00064 
00065 #endif  /* ! APR_PERMS_SET */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines