summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-25 01:00:37 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:31 +0200
commit0fe1ff99a1aa6858ec0f1cfb1130b801238fc8e2 (patch)
tree3f4c1e5ee4b8bb5d921bad98ba575e3bc3970b8f /source3/registry
parent552e505cee966e7f734fb6bc8f5991bb5b73ba32 (diff)
downloadsamba-0fe1ff99a1aa6858ec0f1cfb1130b801238fc8e2.tar.gz
samba-0fe1ff99a1aa6858ec0f1cfb1130b801238fc8e2.tar.bz2
samba-0fe1ff99a1aa6858ec0f1cfb1130b801238fc8e2.zip
s3:registry: move reg_objects.h to registry/ and use it only where needed
Every place outside of registry/ where this is used, should probably be changed to use pure reg_api.c code.
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_api.c1
-rw-r--r--source3/registry/reg_backend_current_version.c1
-rw-r--r--source3/registry/reg_backend_db.c1
-rw-r--r--source3/registry/reg_backend_hkpt_params.c1
-rw-r--r--source3/registry/reg_backend_netlogon_params.c1
-rw-r--r--source3/registry/reg_backend_perflib.c1
-rw-r--r--source3/registry/reg_backend_printing.c1
-rw-r--r--source3/registry/reg_backend_prod_options.c1
-rw-r--r--source3/registry/reg_backend_shares.c1
-rw-r--r--source3/registry/reg_backend_tcpip_params.c1
-rw-r--r--source3/registry/reg_eventlog.c1
-rw-r--r--source3/registry/reg_objects.c1
-rw-r--r--source3/registry/reg_objects.h75
13 files changed, 87 insertions, 0 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 32759ed6e1..4f3b7a2f86 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -70,6 +70,7 @@
#include "reg_backend_db.h"
#include "reg_dispatcher.h"
#include "reg_util_marshalling.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_current_version.c b/source3/registry/reg_backend_current_version.c
index d5d1a496c0..ee4131ae67 100644
--- a/source3/registry/reg_backend_current_version.c
+++ b/source3/registry/reg_backend_current_version.c
@@ -27,6 +27,7 @@
#include "includes.h"
#include "registry.h"
#include "reg_util_internal.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index db2dccf4b3..0c906189bc 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -25,6 +25,7 @@
#include "reg_db.h"
#include "reg_util_internal.h"
#include "reg_backend_db.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_hkpt_params.c b/source3/registry/reg_backend_hkpt_params.c
index a303e72517..d34d1acf3c 100644
--- a/source3/registry/reg_backend_hkpt_params.c
+++ b/source3/registry/reg_backend_hkpt_params.c
@@ -27,6 +27,7 @@
#include "includes.h"
#include "registry.h"
#include "reg_perfcount.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_netlogon_params.c b/source3/registry/reg_backend_netlogon_params.c
index 5a5bcce577..b036e75f7e 100644
--- a/source3/registry/reg_backend_netlogon_params.c
+++ b/source3/registry/reg_backend_netlogon_params.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_perflib.c b/source3/registry/reg_backend_perflib.c
index da9e8521a7..396ea07e5d 100644
--- a/source3/registry/reg_backend_perflib.c
+++ b/source3/registry/reg_backend_perflib.c
@@ -28,6 +28,7 @@
#include "registry.h"
#include "reg_util_internal.h"
#include "reg_perfcount.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c
index 92d7846bc9..a874a62f9d 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -23,6 +23,7 @@
#include "registry.h"
#include "reg_util_internal.h"
#include "reg_backend_db.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_prod_options.c b/source3/registry/reg_backend_prod_options.c
index 764d98f6d6..655c587ac4 100644
--- a/source3/registry/reg_backend_prod_options.c
+++ b/source3/registry/reg_backend_prod_options.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_shares.c b/source3/registry/reg_backend_shares.c
index e211e439fd..3113f0f84c 100644
--- a/source3/registry/reg_backend_shares.c
+++ b/source3/registry/reg_backend_shares.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_tcpip_params.c b/source3/registry/reg_backend_tcpip_params.c
index 02bf59c23c..dd132df093 100644
--- a/source3/registry/reg_backend_tcpip_params.c
+++ b/source3/registry/reg_backend_tcpip_params.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index 3fe35542a1..6bedf4635e 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -24,6 +24,7 @@
#include "registry.h"
#include "reg_backend_db.h"
#include "reg_eventlog.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 5555946128..895435d44a 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_objects.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_objects.h b/source3/registry/reg_objects.h
new file mode 100644
index 0000000000..8cc74ed1bf
--- /dev/null
+++ b/source3/registry/reg_objects.h
@@ -0,0 +1,75 @@
+/*
+ Samba's Internal Registry objects
+
+ SMB parameters and setup
+ Copyright (C) Gerald Carter 2002-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, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _REG_OBJECTS_H /* _REG_OBJECTS_H */
+#define _REG_OBJECTS_H
+
+/* low level structure to contain registry values */
+
+struct regval_blob;
+
+/* container for registry values */
+
+struct regval_ctr;
+
+/* container for registry subkey names */
+
+struct regsubkey_ctr;
+
+/* The following definitions come from registry/reg_objects.c */
+
+WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
+WERROR regsubkey_ctr_reinit(struct regsubkey_ctr *ctr);
+WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum);
+int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr);
+WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
+WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
+bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
+int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
+char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index );
+WERROR regval_ctr_init(TALLOC_CTX *mem_ctx, struct regval_ctr **ctr);
+int regval_ctr_numvals(struct regval_ctr *ctr);
+struct regval_blob* dup_registry_value(struct regval_blob *val);
+void free_registry_value(struct regval_blob *val);
+uint8* regval_data_p(struct regval_blob *val);
+uint32 regval_size(struct regval_blob *val);
+char* regval_name(struct regval_blob *val);
+uint32 regval_type(struct regval_blob *val);
+struct regval_blob* regval_ctr_specific_value(struct regval_ctr *ctr,
+ uint32 idx);
+bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value);
+struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
+ uint16 type,
+ const uint8 *data_p, size_t size);
+int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
+ const uint8 *data_p, size_t size);
+int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data);
+int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data);
+int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
+int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
+struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
+ const char *name);
+int regval_ctr_get_seqnum(struct regval_ctr *ctr);
+WERROR regval_ctr_set_seqnum(struct regval_ctr *ctr, int seqnum);
+uint32 regval_dword(struct regval_blob *val);
+const char *regval_sz(struct regval_blob *val);
+
+
+#endif /* _REG_OBJECTS_H */