Loading...
Searching...
No Matches
apr_dbm.h
Go to the documentation of this file.
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef APR_DBM_H
#define APR_DBM_H
#include "apu.h"
#include "apr.h"
#include "apr_errno.h"
#include "apr_pools.h"
#include "apr_file_info.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct apr_dbm_t apr_dbm_t;
typedef struct
{
char *dptr;
apr_size_t dsize;
} apr_datum_t;
/* modes to open the DB */
#define APR_DBM_READONLY 1
#define APR_DBM_READWRITE 2
#define APR_DBM_RWCREATE 3
#define APR_DBM_RWTRUNC 4
APU_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **dbm, const char* type,
const char *name,
apr_int32_t mode, apr_fileperms_t perm,
apr_pool_t *cntxt);
APU_DECLARE(apr_status_t) apr_dbm_open(apr_dbm_t **dbm, const char *name,
apr_int32_t mode, apr_fileperms_t perm,
apr_pool_t *cntxt);
APU_DECLARE(void) apr_dbm_close(apr_dbm_t *dbm);
APU_DECLARE(apr_status_t) apr_dbm_fetch(apr_dbm_t *dbm, apr_datum_t key,
apr_datum_t *pvalue);
APU_DECLARE(apr_status_t) apr_dbm_store(apr_dbm_t *dbm, apr_datum_t key,
apr_datum_t value);
APU_DECLARE(apr_status_t) apr_dbm_delete(apr_dbm_t *dbm, apr_datum_t key);
APU_DECLARE(int) apr_dbm_exists(apr_dbm_t *dbm, apr_datum_t key);
APU_DECLARE(apr_status_t) apr_dbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey);
APU_DECLARE(apr_status_t) apr_dbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey);
APU_DECLARE(void) apr_dbm_freedatum(apr_dbm_t *dbm, apr_datum_t data);
APU_DECLARE(char *) apr_dbm_geterror(apr_dbm_t *dbm, int *errcode,
char *errbuf, apr_size_t errbufsize);
APU_DECLARE(apr_status_t) apr_dbm_get_usednames_ex(apr_pool_t *pool,
const char *type,
const char *pathname,
const char **used1,
const char **used2);
APU_DECLARE(void) apr_dbm_get_usednames(apr_pool_t *pool,
const char *pathname,
const char **used1,
const char **used2);
#ifdef __cplusplus
}
#endif
#endif /* !APR_DBM_H */
apr_dbm_store
apr_status_t apr_dbm_store(apr_dbm_t *dbm, apr_datum_t key, apr_datum_t value)
apr_dbm_get_usednames
void apr_dbm_get_usednames(apr_pool_t *pool, const char *pathname, const char **used1, const char **used2)
apr_dbm_exists
int apr_dbm_exists(apr_dbm_t *dbm, apr_datum_t key)
apr_dbm_delete
apr_status_t apr_dbm_delete(apr_dbm_t *dbm, apr_datum_t key)
apr_dbm_get_usednames_ex
apr_status_t apr_dbm_get_usednames_ex(apr_pool_t *pool, const char *type, const char *pathname, const char **used1, const char **used2)
apr_dbm_nextkey
apr_status_t apr_dbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
apr_dbm_close
void apr_dbm_close(apr_dbm_t *dbm)
apr_dbm_open
apr_status_t apr_dbm_open(apr_dbm_t **dbm, const char *name, apr_int32_t mode, apr_fileperms_t perm, apr_pool_t *cntxt)
apr_dbm_fetch
apr_status_t apr_dbm_fetch(apr_dbm_t *dbm, apr_datum_t key, apr_datum_t *pvalue)
apr_dbm_freedatum
void apr_dbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
apr_dbm_geterror
char * apr_dbm_geterror(apr_dbm_t *dbm, int *errcode, char *errbuf, apr_size_t errbufsize)
apr_dbm_firstkey
apr_status_t apr_dbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey)
apr_dbm_open_ex
apr_status_t apr_dbm_open_ex(apr_dbm_t **dbm, const char *type, const char *name, apr_int32_t mode, apr_fileperms_t perm, apr_pool_t *cntxt)
apr_datum_t
Definition apr_dbm.h:48
apr_datum_t::dsize
apr_size_t dsize
Definition apr_dbm.h:52
apr_datum_t::dptr
char * dptr
Definition apr_dbm.h:50
apr_dbm_t
Definition apr_dbm_private.h:94
apr_dbm_t::errcode
int errcode
Definition apr_dbm_private.h:102
apr_dbm_t::type
const apr_dbm_type_t * type
Definition apr_dbm_private.h:107
apr_dbm_t::pool
apr_pool_t * pool
Definition apr_dbm_private.h:96