r16100: Patch from Michael Wood <mwood@icts.uct.ac.za>: s/then/than/ for correct...
[kai/samba.git] / source / lib / registry / registry.h
index efe22573c27cc7415983215cbafc62e1fad86fc7..6b3675b0ee7e10ab6ecc952a5d696bf4541ed0c9 100644 (file)
 #define HKEY_PERFORMANCE_TEXT   0x80000050
 #define HKEY_PERFORMANCE_NLSTEXT 0x80000060
 
-#define        REG_DELETE                                                                 -1
+struct reg_predefined_key {
+       uint32_t handle;
+       const char *name;
+};
+
+extern const struct reg_predefined_key reg_predefined_keys[];
+
+#define        REG_DELETE              -1
 
 /*
  * The general idea here is that every backend provides a 'hive'. Combining
@@ -96,11 +103,11 @@ struct hive_operations {
        WERROR (*num_values) (const struct registry_key *, uint32_t *count);
        WERROR (*get_subkey_by_index) (TALLOC_CTX *, const struct registry_key *, int idx, struct registry_key **);
 
-       /* Can not contain more then one level */
+       /* Can not contain more than one level */
        WERROR (*get_subkey_by_name) (TALLOC_CTX *, const struct registry_key *, const char *name, struct registry_key **);
        WERROR (*get_value_by_index) (TALLOC_CTX *, const struct registry_key *, int idx, struct registry_value **);
 
-       /* Can not contain more then one level */
+       /* Can not contain more than one level */
        WERROR (*get_value_by_name) (TALLOC_CTX *, const struct registry_key *, const char *name, struct registry_value **);
 
        /* Security control */
@@ -125,6 +132,8 @@ struct registry_hive
 {
        const struct hive_operations *functions;
        struct registry_key *root;
+       struct auth_session_info *session_info;
+       struct cli_credentials *credentials;
        void *backend_data;
        const char *location;
 };
@@ -133,6 +142,8 @@ struct registry_hive
  * contains zero or more hives */
 struct registry_context {
     void *backend_data;
+       struct cli_credentials *credentials;
+       struct auth_session_info *session_info;
        WERROR (*get_predefined_key) (struct registry_context *, uint32_t hkey, struct registry_key **);
 };
 
@@ -141,6 +152,8 @@ struct reg_init_function_entry {
        struct reg_init_function_entry *prev, *next;
 };
 
+/* Representing differences between registry files */
+
 struct reg_diff_value
 {
        char *name;
@@ -164,6 +177,9 @@ struct reg_diff
        struct reg_diff_key *keys;
 };
 
-#include "registry_proto.h"
+struct auth_session_info;
+struct event_context;
+
+#include "lib/registry/registry_proto.h"
 
 #endif /* _REGISTRY_H */