From 5be50a222facee943edae868e39ff11f7dd68965 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 13:58:05 +0200 Subject: Merge patchfile.h into registry.h (This used to be commit 7b434df67aefc667993f0ebd955af9c1c258f153) --- source4/lib/registry/config.mk | 2 +- source4/lib/registry/patchfile.c | 1 - source4/lib/registry/patchfile.h | 55 --------------------------------- source4/lib/registry/patchfile_dotreg.c | 1 - source4/lib/registry/patchfile_preg.c | 1 - source4/lib/registry/registry.h | 31 +++++++++++++++++-- 6 files changed, 30 insertions(+), 61 deletions(-) delete mode 100644 source4/lib/registry/patchfile.h (limited to 'source4') diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk index 70ffce020a..1deac1dd46 100644 --- a/source4/lib/registry/config.mk +++ b/source4/lib/registry/config.mk @@ -39,7 +39,7 @@ PUBLIC_DEPENDENCIES = \ # End MODULE registry_ldb ################################################ -PUBLIC_HEADERS += $(addprefix lib/registry/, registry.h hive.h patchfile.h) +PUBLIC_HEADERS += $(addprefix lib/registry/, registry.h hive.h) [SUBSYSTEM::registry_common] PUBLIC_DEPENDENCIES = registry diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c index 687fd4b91b..15e3a158f2 100644 --- a/source4/lib/registry/patchfile.c +++ b/source4/lib/registry/patchfile.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "lib/registry/patchfile.h" #include "lib/registry/registry.h" #include "system/filesys.h" #include "param/param.h" diff --git a/source4/lib/registry/patchfile.h b/source4/lib/registry/patchfile.h deleted file mode 100644 index d586aa4c31..0000000000 --- a/source4/lib/registry/patchfile.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Unix SMB/CIFS implementation. - Patchfile interface - Copyright (C) Jelmer Vernooij 2006 - Copyright (C) Wilco Baan Hofman 2006 - - 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 3 of the License, or - (at your option) any later version. - - This program 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. - - 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. -*/ - -#ifndef _PATCHFILE_H -#define _PATCHFILE_H - -#include "lib/registry/registry.h" - -struct reg_diff_callbacks { - WERROR (*add_key) (void *callback_data, const char *key_name); - WERROR (*set_value) (void *callback_data, const char *key_name, - const char *value_name, uint32_t value_type, - DATA_BLOB value); - WERROR (*del_value) (void *callback_data, const char *key_name, - const char *value_name); - WERROR (*del_key) (void *callback_data, const char *key_name); - WERROR (*del_all_values) (void *callback_data, const char *key_name); - WERROR (*done) (void *callback_data); -}; - -WERROR reg_diff_apply(struct registry_context *ctx, const char *filename); - -WERROR reg_generate_diff(struct registry_context *ctx1, - struct registry_context *ctx2, - const struct reg_diff_callbacks *callbacks, - void *callback_data); -WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename, - struct smb_iconv_convenience *iconv_convenience, - struct reg_diff_callbacks **callbacks, - void **callback_data); -WERROR reg_generate_diff_key(struct registry_key *oldkey, - struct registry_key *newkey, - const char *path, - const struct reg_diff_callbacks *callbacks, - void *callback_data); - -#endif /* _PATCHFILE_H */ diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c index 5150c90291..59f4044713 100644 --- a/source4/lib/registry/patchfile_dotreg.c +++ b/source4/lib/registry/patchfile_dotreg.c @@ -23,7 +23,6 @@ /* FIXME Newer .REG files, created by Windows XP and above use unicode UTF-16 */ #include "includes.h" -#include "lib/registry/patchfile.h" #include "lib/registry/registry.h" #include "system/filesys.h" #include "param/param.h" diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index 8f02a0b5e3..0fa367bfcb 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -21,7 +21,6 @@ #include "includes.h" #include "lib/registry/registry.h" -#include "lib/registry/patchfile.h" #include "system/filesys.h" #include "param/param.h" diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index 5e0b971a1d..b76f2c4bcc 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -66,8 +66,6 @@ struct registry_key struct registry_context *context; }; -#include "lib/registry/patchfile.h" - struct registry_value { const char *name; @@ -285,5 +283,34 @@ WERROR reg_get_security(TALLOC_CTX *mem_ctx, WERROR reg_set_security(struct registry_key *key, struct security_descriptor *security); +struct reg_diff_callbacks { + WERROR (*add_key) (void *callback_data, const char *key_name); + WERROR (*set_value) (void *callback_data, const char *key_name, + const char *value_name, uint32_t value_type, + DATA_BLOB value); + WERROR (*del_value) (void *callback_data, const char *key_name, + const char *value_name); + WERROR (*del_key) (void *callback_data, const char *key_name); + WERROR (*del_all_values) (void *callback_data, const char *key_name); + WERROR (*done) (void *callback_data); +}; + +WERROR reg_diff_apply(struct registry_context *ctx, const char *filename); + +WERROR reg_generate_diff(struct registry_context *ctx1, + struct registry_context *ctx2, + const struct reg_diff_callbacks *callbacks, + void *callback_data); +WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename, + struct smb_iconv_convenience *iconv_convenience, + struct reg_diff_callbacks **callbacks, + void **callback_data); +WERROR reg_generate_diff_key(struct registry_key *oldkey, + struct registry_key *newkey, + const char *path, + const struct reg_diff_callbacks *callbacks, + void *callback_data); + + #endif /* _REGISTRY_H */ -- cgit