Author: jelmer Date: 2007-11-19 18:20:21 +0000 (Mon, 19 Nov 2007) New Revision: 26031
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26031 Log: Improve registry python bindings. Added: branches/4.0-python/source/bin/python/ Removed: branches/4.0-python/source/scripting/python/samba/credentials.py Modified: branches/4.0-python/ branches/4.0-python/source/auth/credentials/credentials.i branches/4.0-python/source/build/smb_build/makefile.pm branches/4.0-python/source/lib/registry/registry.i branches/4.0-python/source/scripting/python/samba/__init__.py branches/4.0-python/source/setup/provision Changeset: Property changes on: branches/4.0-python ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/4.0-python/source/auth/credentials/credentials.i =================================================================== --- branches/4.0-python/source/auth/credentials/credentials.i 2007-11-19 18:20:16 UTC (rev 26030) +++ branches/4.0-python/source/auth/credentials/credentials.i 2007-11-19 18:20:21 UTC (rev 26031) @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -%module credentials +%module(package="samba.credentials") credentials %{ Modified: branches/4.0-python/source/build/smb_build/makefile.pm =================================================================== --- branches/4.0-python/source/build/smb_build/makefile.pm 2007-11-19 18:20:16 UTC (rev 26030) +++ branches/4.0-python/source/build/smb_build/makefile.pm 2007-11-19 18:20:21 UTC (rev 26031) @@ -395,7 +395,6 @@ # $self->_prepare_list_ex($ctx, "LINK_FLAGS", "-Wl,--whole-archive", "-Wl,--no-whole-archive"); if ($ctx->{TYPE} eq "PYTHON") { - print "PYTHON: $ctx->{TYPE}\n"; push (@{$self->{python_dsos}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}"); } Modified: branches/4.0-python/source/lib/registry/registry.i =================================================================== --- branches/4.0-python/source/lib/registry/registry.i 2007-11-19 18:20:16 UTC (rev 26030) +++ branches/4.0-python/source/lib/registry/registry.i 2007-11-19 18:20:21 UTC (rev 26031) @@ -19,15 +19,18 @@ %module registry %{ - /* Include headers */ #include <stdint.h> #include <stdbool.h> #include "includes.h" #include "registry.h" + +typedef struct registry_context reg; %} +%include "stdint.i" + WERROR reg_open_local(TALLOC_CTX *mem_ctx, struct registry_context **ctx, struct auth_session_info *session_info, @@ -37,3 +40,21 @@ struct registry_context **ctx, struct auth_session_info *session_info, struct cli_credentials *credentials); + +WERROR reg_open_remote(struct registry_context **ctx, + struct auth_session_info *session_info, + struct cli_credentials *credentials, + const char *location, struct event_context *ev); + +const char *reg_get_predef_name(uint32_t hkey); +const char *str_regtype(int type); + +%rename(Registry) reg; +typedef struct registry_context { + %extend { + WERROR get_predefined_key_by_name(const char *name, + struct registry_key **key); + + WERROR get_predefined_key(uint32_t hkey, struct registry_key **key); + } +} reg; Modified: branches/4.0-python/source/scripting/python/samba/__init__.py =================================================================== --- branches/4.0-python/source/scripting/python/samba/__init__.py 2007-11-19 18:20:16 UTC (rev 26030) +++ branches/4.0-python/source/scripting/python/samba/__init__.py 2007-11-19 18:20:21 UTC (rev 26031) @@ -49,3 +49,6 @@ return text + +def system_session(): + pass Deleted: branches/4.0-python/source/scripting/python/samba/credentials.py =================================================================== --- branches/4.0-python/source/scripting/python/samba/credentials.py 2007-11-19 18:20:16 UTC (rev 26030) +++ branches/4.0-python/source/scripting/python/samba/credentials.py 2007-11-19 18:20:21 UTC (rev 26031) @@ -1,3 +0,0 @@ -credentials = "" -def system_session(): - pass Modified: branches/4.0-python/source/setup/provision =================================================================== --- branches/4.0-python/source/setup/provision 2007-11-19 18:20:16 UTC (rev 26030) +++ branches/4.0-python/source/setup/provision 2007-11-19 18:20:21 UTC (rev 26031) @@ -26,8 +26,9 @@ # Add path to the library for in-tree use sys.path.append("scripting/python") sys.path.append("lib/ldb/swig") +sys.path.append("auth/credentials") -from samba.credentials import system_session +from samba import system_session import samba.getopt as options import param from samba.provision import (provision, provision_guess,
