dbwrap: intialize state.status in dbwrap_fetch_int32()
[Samba/gebeck_regimport.git] / source3 / lib / eventlog / proto.h
blobd3341ce16d865d63067da0fc12dc0336af4bd7e0
1 /*
2 * Unix SMB/CIFS implementation.
3 * Eventlog utility routines
5 * Copyright (C) Marcin Krzysztof Porwit 2005
6 * Copyright (C) Brian Moran 2005
7 * Copyright (C) Gerald (Jerry) Carter 2005
8 * Copyright (C) Guenther Deschner 2009
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 #ifndef _LIB_EVENTLOG_PROTO_H_
25 #define _LIB_EVENTLOG_PROTO_H_
27 /* The following definitions come from lib/eventlog/eventlog.c */
29 TDB_CONTEXT *elog_init_tdb( char *tdbfilename );
30 char *elog_tdbname(TALLOC_CTX *ctx, const char *name );
31 int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention );
32 bool prune_eventlog( TDB_CONTEXT * tdb );
33 ELOG_TDB *elog_open_tdb( const char *logname, bool force_clear, bool read_only );
34 int elog_close_tdb( ELOG_TDB *etdb, bool force_close );
35 bool parse_logentry( TALLOC_CTX *mem_ctx, char *line, struct eventlog_Record_tdb *entry, bool * eor );
36 size_t fixup_eventlog_record_tdb(struct eventlog_Record_tdb *r);
37 struct eventlog_Record_tdb *evlog_pull_record_tdb(TALLOC_CTX *mem_ctx,
38 TDB_CONTEXT *tdb,
39 uint32_t record_number);
40 NTSTATUS evlog_push_record_tdb(TALLOC_CTX *mem_ctx,
41 TDB_CONTEXT *tdb,
42 struct eventlog_Record_tdb *r,
43 uint32_t *record_number);
44 NTSTATUS evlog_push_record(TALLOC_CTX *mem_ctx,
45 TDB_CONTEXT *tdb,
46 struct EVENTLOGRECORD *r,
47 uint32_t *record_number);
48 struct EVENTLOGRECORD *evlog_pull_record(TALLOC_CTX *mem_ctx,
49 TDB_CONTEXT *tdb,
50 uint32_t record_number);
51 NTSTATUS evlog_evt_entry_to_tdb_entry(TALLOC_CTX *mem_ctx,
52 const struct EVENTLOGRECORD *e,
53 struct eventlog_Record_tdb *t);
54 NTSTATUS evlog_tdb_entry_to_evt_entry(TALLOC_CTX *mem_ctx,
55 const struct eventlog_Record_tdb *t,
56 struct EVENTLOGRECORD *e);
57 NTSTATUS evlog_convert_tdb_to_evt(TALLOC_CTX *mem_ctx,
58 ELOG_TDB *etdb,
59 DATA_BLOB *blob_p,
60 uint32_t *num_records_p);
62 #endif /* _LIB_EVENTLOG_PROTO_H_ */