1251881Speter/* miscellaneous-table.h : internal interface to ops on `miscellaneous' table 2251881Speter * 3251881Speter * ==================================================================== 4251881Speter * Licensed to the Apache Software Foundation (ASF) under one 5251881Speter * or more contributor license agreements. See the NOTICE file 6251881Speter * distributed with this work for additional information 7251881Speter * regarding copyright ownership. The ASF licenses this file 8251881Speter * to you under the Apache License, Version 2.0 (the 9251881Speter * "License"); you may not use this file except in compliance 10251881Speter * with the License. You may obtain a copy of the License at 11251881Speter * 12251881Speter * http://www.apache.org/licenses/LICENSE-2.0 13251881Speter * 14251881Speter * Unless required by applicable law or agreed to in writing, 15251881Speter * software distributed under the License is distributed on an 16251881Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17251881Speter * KIND, either express or implied. See the License for the 18251881Speter * specific language governing permissions and limitations 19251881Speter * under the License. 20251881Speter * ==================================================================== 21251881Speter */ 22251881Speter 23251881Speter#ifndef SVN_LIBSVN_FS_MISCELLANEOUS_TABLE_H 24251881Speter#define SVN_LIBSVN_FS_MISCELLANEOUS_TABLE_H 25251881Speter 26251881Speter#include "svn_fs.h" 27251881Speter#include "svn_error.h" 28251881Speter#include "../trail.h" 29251881Speter#include "../fs.h" 30251881Speter 31251881Speter#ifdef __cplusplus 32251881Speterextern "C" { 33251881Speter#endif /* __cplusplus */ 34251881Speter 35251881Speter 36251881Speter/* Open a `miscellaneous' table in ENV. If CREATE is non-zero, create 37251881Speter one if it doesn't exist. Set *MISCELLANEOUS_P to the new table. 38251881Speter Return a Berkeley DB error code. */ 39251881Speterint 40251881Spetersvn_fs_bdb__open_miscellaneous_table(DB **miscellaneous_p, 41251881Speter DB_ENV *env, 42251881Speter svn_boolean_t create); 43251881Speter 44251881Speter 45251881Speter/* Add data to the `miscellaneous' table in FS, as part of TRAIL. 46251881Speter 47251881Speter KEY and VAL should be NULL-terminated strings. If VAL is NULL, 48251881Speter the key is removed from the table. */ 49251881Spetersvn_error_t * 50251881Spetersvn_fs_bdb__miscellaneous_set(svn_fs_t *fs, 51251881Speter const char *key, 52251881Speter const char *val, 53251881Speter trail_t *trail, 54251881Speter apr_pool_t *pool); 55251881Speter 56251881Speter 57251881Speter/* Set *VAL to the value of data cooresponding to KEY in the 58251881Speter `miscellaneous' table of FS, or to NULL if that key isn't found. */ 59251881Spetersvn_error_t * 60251881Spetersvn_fs_bdb__miscellaneous_get(const char **val, 61251881Speter svn_fs_t *fs, 62251881Speter const char *key, 63251881Speter trail_t *trail, 64251881Speter apr_pool_t *pool); 65251881Speter 66251881Speter 67251881Speter#ifdef __cplusplus 68251881Speter} 69251881Speter#endif /* __cplusplus */ 70251881Speter 71251881Speter#endif /* SVN_LIBSVN_FS_MISCELLANEOUS_TABLE_H */ 72