%}
/* FIXME: This should be in another file */
-%typemap(default) struct auth_session_info * {
+%typemap(default,noblock=1) struct auth_session_info * {
$1 = NULL;
}
const char *str_regtype(int type);
/* Registry contexts */
-%typemap(in,numinputs=0) struct registry_context ** (struct registry_context *tmp) {
+%typemap(in,noblock=1,numinputs=0) struct registry_context ** (struct registry_context *tmp) {
$1 = &tmp;
}
-%typemap(argout) struct registry_context ** {
+%typemap(argout,noblock=1) struct registry_context ** {
$result = SWIG_NewPointerObj(*$1, SWIGTYPE_p_registry_context, 0);
}
struct auth_session_info *session_info,
struct cli_credentials *credentials);
-%typemap(in) const char ** {
+%typemap(in,noblock=1) const char ** {
/* Check if is a list */
if (PyList_Check($input)) {
int size = PyList_Size($input);
}
}
-%typemap(freearg) const char ** {
+%typemap(freearg,noblock=1) const char ** {
free((char **) $1);
}
} reg;
/* Hives */
-%typemap(in,numinputs=0) struct hive_key ** (struct hive_key *tmp) {
+%typemap(in,noblock=1,numinputs=0) struct hive_key ** (struct hive_key *tmp) {
$1 = &tmp;
}
-%typemap(argout) struct hive_key ** {
+%typemap(argout,noblock=1) struct hive_key ** {
Py_XDECREF($result);
$result = SWIG_NewPointerObj(*$1, SWIGTYPE_p_hive_key, 0);
}
struct loadparm_context *lp_ctx,
struct hive_key **root);
+%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 loadparm_context *lp_ctx,
+ struct hive_key **k);
+
+%rename(create_dir) reg_create_directory;
+WERROR reg_create_directory(TALLOC_CTX *parent_ctx,
+ const char *location, struct hive_key **key);
+
+%rename(open_dir) reg_open_directory;
+WERROR reg_open_directory(TALLOC_CTX *parent_ctx,
+ const char *location, struct hive_key **key);
+
%talloctype(hive_key);
typedef struct hive_key {
WERROR del(const char *name);
WERROR flush(void);
WERROR del_value(const char *name);
+ WERROR set_value(const char *name, uint32_t type, const DATA_BLOB data);
}
} hive_key;