diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-23 16:24:07 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-23 16:24:07 +0200 |
commit | cceac63aaab26a72e2f3fd150dd1e4e83a0e5279 (patch) | |
tree | 6203cca724fc5f17f068e3fd4d0b403fdff3f8f9 /source4/lib/registry/registry.i | |
parent | 7c7880695b02df4cbe0faab959846c63d0cc0536 (diff) | |
parent | 72fce654072b2d7317ff21c95558bd365701d5dd (diff) | |
download | samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.gz samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.tar.bz2 samba-cceac63aaab26a72e2f3fd150dd1e4e83a0e5279.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-wsgi
Conflicts:
source/scripting/python/samba/provision.py
(This used to be commit d27de633656f8a699222df77c4c58326890889a2)
Diffstat (limited to 'source4/lib/registry/registry.i')
-rw-r--r-- | source4/lib/registry/registry.i | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/source4/lib/registry/registry.i b/source4/lib/registry/registry.i index 8ab402d57d..7dd02b344c 100644 --- a/source4/lib/registry/registry.i +++ b/source4/lib/registry/registry.i @@ -26,6 +26,7 @@ #include "includes.h" #include "registry.h" #include "param/param.h" +#include "events/events.h" typedef struct registry_context reg; typedef struct hive_key hive_key; @@ -41,6 +42,7 @@ typedef struct hive_key hive_key; %import "../../auth/credentials/credentials.i" %import "../../libcli/util/errors.i" %import "../../param/param.i" +%import "../events/events.i" /* Utility functions */ @@ -57,9 +59,7 @@ const char *str_regtype(int type); } %rename(Registry) reg_open_local; -WERROR reg_open_local(TALLOC_CTX *parent_ctx, struct registry_context **ctx, - struct auth_session_info *session_info, - struct cli_credentials *credentials); +WERROR reg_open_local(TALLOC_CTX *parent_ctx, struct registry_context **ctx); %typemap(in,noblock=1) const char ** { /* Check if is a list */ @@ -93,11 +93,20 @@ WERROR reg_open_local(TALLOC_CTX *parent_ctx, struct registry_context **ctx, typedef struct registry_context { %extend { + %feature("docstring") get_predefined_key_by_name "S.get_predefined_key_by_name(name) -> key\n" + "Find a predefined key by name"; WERROR get_predefined_key_by_name(const char *name, struct registry_key **key); + %feature("docstring") key_del_abs "S.key_del_abs(name) -> None\n" + "Delete a key by absolute path."; WERROR key_del_abs(const char *path); + %feature("docstring") get_predefined_key "S.get_predefined_key(hkey_id) -> key\n" + "Find a predefined key by id"; WERROR get_predefined_key(uint32_t hkey_id, struct registry_key **key); + %feature("docstring") diff_apply "S.diff_apply(filename) -> None\n" + "Apply the diff from the specified file"; + WERROR diff_apply(const char *filename); WERROR generate_diff(struct registry_context *ctx2, const struct reg_diff_callbacks *callbacks, void *callback_data); @@ -106,6 +115,8 @@ typedef struct registry_context { const char **elements=NULL); struct registry_key *import_hive_key(struct hive_key *hive, uint32_t predef_key, const char **elements); + %feature("docstring") mount_hive "S.mount_hive(key, predef_name) -> None\n" + "Mount the specified key at the specified path."; WERROR mount_hive(struct hive_key *key, const char *predef_name) { int i; @@ -130,24 +141,30 @@ typedef struct registry_context { $result = SWIG_NewPointerObj(*$1, SWIGTYPE_p_hive_key, 0); } +%feature("docstring") reg_open_hive "S.__init__(location, session_info=None, credentials=None, loadparm_context=None)"; %rename(hive_key) reg_open_hive; WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, + struct event_context *ev_ctx, struct loadparm_context *lp_ctx, struct hive_key **root); +%feature("docstring") reg_open_ldb_file "open_ldb(location, session_info=None, credentials=None, loadparm_context=None) -> key"; %rename(open_ldb) reg_open_ldb_file; WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, + struct event_context *ev_ctx, struct loadparm_context *lp_ctx, struct hive_key **k); +%feature("docstring") reg_create_directory "create_dir(location) -> key"; %rename(create_dir) reg_create_directory; WERROR reg_create_directory(TALLOC_CTX *parent_ctx, const char *location, struct hive_key **key); +%feature("docstring") reg_open_directory "open_dir(location) -> key"; %rename(open_dir) reg_open_directory; WERROR reg_open_directory(TALLOC_CTX *parent_ctx, const char *location, struct hive_key **key); @@ -156,17 +173,27 @@ WERROR reg_open_directory(TALLOC_CTX *parent_ctx, typedef struct hive_key { %extend { + %feature("docstring") del "S.del(name) -> None\n" + "Delete a subkey"; WERROR del(const char *name); + %feature("docstring") flush "S.flush() -> None\n" + "Flush this key to disk"; WERROR flush(void); + %feature("docstring") del_value "S.del_value(name) -> None\n" + "Delete a value"; WERROR del_value(const char *name); + %feature("docstring") set_value "S.set_value(name, type, data) -> None\n" + "Set a value"; WERROR set_value(const char *name, uint32_t type, const DATA_BLOB data); } } hive_key; %rename(open_samba) reg_open_samba; +%feature("docstring") reg_open_samba "open_samba() -> reg"; WERROR reg_open_samba(TALLOC_CTX *mem_ctx, struct registry_context **ctx, + struct event_context *ev_ctx, struct loadparm_context *lp_ctx, struct auth_session_info *session_info, struct cli_credentials *credentials); |