summaryrefslogtreecommitdiff
path: root/source3/tdb/tdb.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-03-28 02:19:58 +0000
committerAndrew Tridgell <tridge@samba.org>2004-03-28 02:19:58 +0000
commitfb53eff3e1a2cbd917f22de26534f84adacd8ca8 (patch)
treea6582b6c374027072b039a37e67ef01745368463 /source3/tdb/tdb.h
parent7c2b0d536b5b76aeec60a5c1d4be8316d19099d9 (diff)
downloadsamba-fb53eff3e1a2cbd917f22de26534f84adacd8ca8.tar.gz
samba-fb53eff3e1a2cbd917f22de26534f84adacd8ca8.tar.bz2
samba-fb53eff3e1a2cbd917f22de26534f84adacd8ca8.zip
merge tdb changes from samba4 - this means tdb is now under the LGPL, as discussed and agreed previously
(This used to be commit 9d1a08d65c4235a2a3941bba5b71631c4c35c9b7)
Diffstat (limited to 'source3/tdb/tdb.h')
-rw-r--r--source3/tdb/tdb.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h
index 6f3b1ff756..eb120a8cec 100644
--- a/source3/tdb/tdb.h
+++ b/source3/tdb/tdb.h
@@ -3,22 +3,28 @@
/*
Unix SMB/CIFS implementation.
- Samba database functions
- Copyright (C) Andrew Tridgell 1999
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ trivial database library
- This program is distributed in the hope that it will be useful,
+ Copyright (C) Andrew Tridgell 1999-2004
+
+ ** NOTE! The following LGPL license applies to the tdb
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __cplusplus
@@ -44,7 +50,8 @@ extern "C" {
/* error codes */
enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK,
- TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT };
+ TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT,
+ TDB_ERR_NOEXIST};
#ifndef u32
#define u32 unsigned
@@ -119,7 +126,7 @@ int tdb_append(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA new_dbuf);
int tdb_close(TDB_CONTEXT *tdb);
TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb);
TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA key);
-int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state);
+int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *);
int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]);
void tdb_unlockkeys(TDB_CONTEXT *tdb);