diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-05-22 18:49:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:53:53 -0500 |
commit | bf52e242f53aeaac33eea69fbdfb3477634b90fb (patch) | |
tree | 76b04dc95e3e7befd45180a661cd7f55d085701e /source4/lib/registry/common/registry.h | |
parent | 4e9d01c2a7cd044ac4b466a1039c9a7e3978d6ef (diff) | |
download | samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.gz samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.tar.bz2 samba-bf52e242f53aeaac33eea69fbdfb3477634b90fb.zip |
r825: - Introduce support for multiple roots (or 'hives')
- Clean up rpc backend (possible now that multiple hives are supported)
(This used to be commit 8cd1b6bc70510fe576135a66351e9e3ea895c9ff)
Diffstat (limited to 'source4/lib/registry/common/registry.h')
-rw-r--r-- | source4/lib/registry/common/registry.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source4/lib/registry/common/registry.h b/source4/lib/registry/common/registry.h index 208bcae1e1..d4e8cccade 100644 --- a/source4/lib/registry/common/registry.h +++ b/source4/lib/registry/common/registry.h @@ -40,6 +40,7 @@ struct reg_key_s { int cache_values_count; REG_KEY **cache_subkeys; int cache_subkeys_count; + int hive; TALLOC_CTX *mem_ctx; int ref; }; @@ -61,10 +62,14 @@ struct reg_val_s { typedef void (*key_notification_function) (void); typedef void (*value_notification_function) (void); - /* * Container for function pointers to enumeration routines * for virtual registry view + * + * Backends can provide : + * - just one hive (example: nt4, w95) + * - several hives (example: rpc) + * */ struct registry_ops { @@ -73,17 +78,23 @@ struct registry_ops { WERROR (*sync_key)(REG_KEY *, const char *location); WERROR (*close_registry) (REG_HANDLE *); + /* Implement this one */ + WERROR (*get_hive) (REG_HANDLE *, int , REG_KEY **); + + /* Or this one */ + WERROR (*open_key) (REG_HANDLE *, int hive, const char *name, REG_KEY **); + /* Either implement these */ - WERROR (*open_root_key) (REG_HANDLE *, REG_KEY **); WERROR (*num_subkeys) (REG_KEY *, int *count); WERROR (*num_values) (REG_KEY *, int *count); WERROR (*get_subkey_by_index) (REG_KEY *, int idx, REG_KEY **); + /* Can not contain more then one level */ WERROR (*get_subkey_by_name) (REG_KEY *, const char *name, REG_KEY **); WERROR (*get_value_by_index) (REG_KEY *, int idx, REG_VAL **); + /* Can not contain more then one level */ WERROR (*get_value_by_name) (REG_KEY *, const char *name, REG_VAL **); /* Or these */ - WERROR (*open_key) (REG_HANDLE *, const char *name, REG_KEY **); WERROR (*fetch_subkeys) (REG_KEY *, int *count, REG_KEY ***); WERROR (*fetch_values) (REG_KEY *, int *count, REG_VAL ***); @@ -111,15 +122,8 @@ struct registry_ops { void (*free_val_backend_data) (REG_VAL *); }; -typedef struct reg_sub_tree_s { - char *path; - REG_HANDLE *handle; - struct reg_sub_tree_s *prev, *next; -} REG_SUBTREE; - struct reg_handle_s { struct registry_ops *functions; - REG_SUBTREE *subtrees; char *location; char *credentials; void *backend_data; |