summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-07-19 18:49:44 +0000
committerGerald Carter <jerry@samba.org>2002-07-19 18:49:44 +0000
commit9fe3bd1259e7bda901f7a264bd7fc88c72d2112f (patch)
tree7099006b7ed3b3dbfabe514d84183cd4bda609ac /source3/include
parent80c8fe63d2d2149ff9d2294da281d61a683e27ea (diff)
downloadsamba-9fe3bd1259e7bda901f7a264bd7fc88c72d2112f.tar.gz
samba-9fe3bd1259e7bda901f7a264bd7fc88c72d2112f.tar.bz2
samba-9fe3bd1259e7bda901f7a264bd7fc88c72d2112f.zip
* refactored registry operations some. subkey lists and
registry values are now passed around in containers (REGSUBKEY_CTR & REGVAL_CTR) which each possess a TALLOC_CTX. * removed subkey_specific_fn() from REGISTRY_OPS. Is implemented in the form of a wrapper * temporarily broke the printing registry ops. * implemented inheritence for the data_p of nodes in a SORTED_TREE * All REGISTRY_KEY instances now store a valid REGISTRY_HOOK since the default REGOSTRY_OPS structure is stored in the root of the cache_tree. * Probably some other change I forgot.... T (This used to be commit e7b55e8f017e638342d9c8c1a9259000745a0298)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/rpc_reg.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index 071ef408d4..7dbf49cf84 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -66,7 +66,7 @@
#define KEY_HKLM "HKLM"
#define KEY_HKU "HKU"
#define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print"
-
+#define KEY_TREE_ROOT ""
/* Registry data types */
@@ -89,7 +89,7 @@
/* structure to contain registry values */
-typedef struct _RegistryValue {
+typedef struct {
fstring valuename;
uint16 type;
uint32 size; /* in bytes */
@@ -100,22 +100,37 @@ typedef struct _RegistryValue {
} data;
} REGISTRY_VALUE;
+/* container for regostry values */
+
+typedef struct {
+ TALLOC_CTX *ctx;
+ uint32 num_values;
+ REGISTRY_VALUE **values;
+} REGVAL_CTR;
+
+/* container for registry subkey names */
+
+typedef struct {
+ TALLOC_CTX *ctx;
+ uint32 num_subkeys;
+ char **subkeys;
+} REGSUBKEY_CTR;
+
/*
* container for function pointers to enumeration routines
* for vitural registry view
*/
-typedef struct _reg_ops {
+typedef struct {
/* functions for enumerating subkeys and values */
- int (*subkey_fn)( char *key, char **subkeys );
- int (*subkey_specific_fn)( char *key, char** subkey, uint32 indx );
- int (*value_fn) ( char *key, REGISTRY_VALUE **val );
- BOOL (*store_subkeys_fn)( char *key, char **subkeys, uint32 num_subkeys );
- BOOL (*store_values_fn)( char *key, REGISTRY_VALUE **val, uint32 num_values );
+ int (*subkey_fn)( char *key, REGSUBKEY_CTR *subkeys);
+ int (*value_fn) ( char *key, REGVAL_CTR *val );
+ BOOL (*store_subkeys_fn)( char *key, REGSUBKEY_CTR *subkeys );
+ BOOL (*store_values_fn)( char *key, REGVAL_CTR *val );
} REGISTRY_OPS;
-typedef struct _reg_hook {
+typedef struct {
char *keyname; /* full path to name of key */
REGISTRY_OPS *ops; /* registry function hooks */
} REGISTRY_HOOK;