summaryrefslogtreecommitdiff
path: root/source3/utils/regedit_treeview.h
diff options
context:
space:
mode:
authorC. Davis <cd.rattan@gmail.com>2012-07-12 21:11:55 -0700
committerMichael Adam <obnox@samba.org>2013-04-29 13:05:46 +0200
commitd3633c08cd5e997d329ff42930d320a8eb4ac7f2 (patch)
treee268a51b4d3f8783727e97df2e684cf8cfdde00f /source3/utils/regedit_treeview.h
parentc99675b813c9e7020f670542750320b9145b3096 (diff)
downloadsamba-d3633c08cd5e997d329ff42930d320a8eb4ac7f2.tar.gz
samba-d3633c08cd5e997d329ff42930d320a8eb4ac7f2.tar.bz2
samba-d3633c08cd5e997d329ff42930d320a8eb4ac7f2.zip
regedit: Setup a test tree view of HKLM.
Expand on the former test by allowing the user to walk HKLM with the tree view. Subkeys are loaded dynamically in memory as the user walks the hierarchy with tree_node_load_children(). One issue with this at the moment is detecting if the in-memory copy of the hierarchy is out of date. TODO: figure out when to reload out of date portions of the hierarchy (probably by checking last_modified_time). 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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/utils/regedit_treeview.h b/source3/utils/regedit_treeview.h
index 1af6ad3458..5be542514a 100644
--- a/source3/utils/regedit_treeview.h
+++ b/source3/utils/regedit_treeview.h
@@ -24,10 +24,13 @@
#include <ncurses.h>
#include <menu.h>
+struct registry_key;
+
struct tree_node {
char *name;
char *label;
+ struct registry_key *key;
struct tree_node *parent;
struct tree_node *child_head;
@@ -45,7 +48,7 @@ struct tree_view {
};
struct tree_node *tree_node_new(TALLOC_CTX *ctx, struct tree_node *parent,
- const char *name);
+ const char *name, struct registry_key *key);
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);
@@ -56,5 +59,7 @@ struct tree_view *tree_view_new(TALLOC_CTX *ctx, struct tree_node *root,
int begin_y, int begin_x);
void tree_view_show(struct tree_view *view);
WERROR tree_view_update(struct tree_view *view, struct tree_node *list);
+bool tree_node_has_children(struct tree_node *node);
+WERROR tree_node_load_children(struct tree_node *node);
#endif