summaryrefslogtreecommitdiff
path: root/source3/utils/regedit_treeview.h
diff options
context:
space:
mode:
authorChris Davis <cd.rattan@gmail.com>2014-06-30 23:19:53 -0700
committerMichael Adam <obnox@samba.org>2014-10-01 14:32:09 +0200
commitf9a2f2eb7cc3c69f20ab615dd98b750414672fe3 (patch)
treea1c7b709dfb797d44df004d166839f2c6f0db055 /source3/utils/regedit_treeview.h
parent41d5112407d7426d75671ac6967e62b080f63857 (diff)
downloadsamba-f9a2f2eb7cc3c69f20ab615dd98b750414672fe3.tar.gz
regedit: make all hives descend from a root node
This helps simplify cleanup, since each node's talloc context is the parent node, and freeing the root node will destroy the entire tree without any extra utility functions. It also wouldn't be hard to extend this later on to support browsing multiple registries at the same time. Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils/regedit_treeview.h')
-rw-r--r--source3/utils/regedit_treeview.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/utils/regedit_treeview.h b/source3/utils/regedit_treeview.h
index 29c5fe2e655..4d1851ab1d8 100644
--- a/source3/utils/regedit_treeview.h
+++ b/source3/utils/regedit_treeview.h
@@ -48,8 +48,14 @@ struct tree_view {
struct multilist *list;
};
+struct registry_context;
+
struct tree_node *tree_node_new(TALLOC_CTX *ctx, struct tree_node *parent,
const char *name, struct registry_key *key);
+struct tree_node *tree_node_new_root(TALLOC_CTX *ctx,
+ struct registry_context *regctx);
+#define tree_node_is_root(node) ((node)->key == NULL)
+#define tree_node_is_top_level(node) tree_node_is_root((node)->parent)
void tree_node_append(struct tree_node *left, struct tree_node *right);
struct tree_node *tree_node_pop(struct tree_node **plist);
struct tree_node *tree_node_first(struct tree_node *list);