include/util_tdb.h

説明を見る。
00001 /* 
00002    Unix SMB/CIFS implementation.
00003    tdb utility functions
00004    Copyright (C) Andrew Tridgell 1999
00005    
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015    
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 
00021 #ifndef __TDBUTIL_H__
00022 #define __TDBUTIL_H__
00023 
00024 #include "tdb.h"
00025 
00026 #ifndef _BOOL
00027 typedef int BOOL;
00028 #define _BOOL
00029 #endif
00030 
00031 /* single node of a list returned by tdb_search_keys */
00032 typedef struct keys_node 
00033 {
00034         struct keys_node *prev, *next;
00035         TDB_DATA node_key;
00036 } TDB_LIST_NODE;
00037 
00038 struct tdb_wrap {
00039         struct tdb_context *tdb;
00040         const char *name;
00041         struct tdb_wrap *next, *prev;
00042 };
00043 
00044 TDB_LIST_NODE *tdb_search_keys(struct tdb_context*, const char*);
00045 void tdb_search_list_free(TDB_LIST_NODE*);
00046 int32_t tdb_change_int32_atomic(struct tdb_context *tdb, const char *keystr, int32_t *oldval, int32_t change_val);
00047 int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval);
00048 int tdb_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
00049                                    int timeout);
00050 void tdb_unlock_bystring(struct tdb_context *tdb, const char *keyval);
00051 int tdb_read_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
00052                                         unsigned int timeout);
00053 void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval);
00054 int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
00055 int tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32_t value);
00056 int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32_t v);
00057 int tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *value);
00058 int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA dbuf,
00059                      void *state);
00060 int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags);
00061 TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr);
00062 int tdb_delete_bystring(struct tdb_context *tdb, const char *keystr);
00063 struct tdb_context *tdb_open_log(const char *name, int hash_size,
00064                                  int tdb_flags, int open_flags, mode_t mode);
00065 int tdb_unpack(char *buf, int bufsize, const char *fmt, ...);
00066 size_t tdb_pack(char *buf, int bufsize, const char *fmt, ...);
00067 TDB_DATA make_tdb_data(const char *dptr, size_t dsize);
00068 TDB_DATA string_tdb_data(const char *string);
00069 int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf,
00070                     int flag);
00071 int tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
00072                               uint32 *oldval, uint32 change_val);
00073 int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key,
00074                                 unsigned int timeout);
00075 
00076 #endif /* __TDBUTIL_H__ */

Sambaに対してSat Aug 29 21:22:57 2009に生成されました。  doxygen 1.4.7