From 37715930c29acbbd6527e7737fd3114cda6c89d2 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 20 Apr 2012 14:07:30 +0200 Subject: s3:registry: printing backend: use regdb options via ops struct, not directly just like the other backends. This is in preparation of making the backend functions private Signed-off-by: Andreas Schneider --- source3/registry/reg_backend_printing.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c index f76495253e..3b5e7bfb83 100644 --- a/source3/registry/reg_backend_printing.c +++ b/source3/registry/reg_backend_printing.c @@ -23,11 +23,12 @@ #include "includes.h" #include "registry.h" #include "reg_util_internal.h" -#include "reg_backend_db.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_REGISTRY +extern struct registry_ops regdb_ops; + /* registry paths used in the print_registry[] */ #define KEY_CONTROL_PRINTERS "HKLM\\SYSTEM\\CURRENTCONTROLSET\\CONTROL\\PRINT\\PRINTERS" #define KEY_WINNT_PRINTERS "HKLM\\SOFTWARE\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\PRINT\\PRINTERS" @@ -88,10 +89,10 @@ static int key_printers_fetch_keys( const char *key, struct regsubkey_ctr *subke printers_key = create_printer_registry_path(ctx, key); if (printers_key == NULL) { /* normalize on the 'HKLM\SOFTWARE\....\Print\Printers' key */ - return regdb_fetch_keys(KEY_WINNT_PRINTERS, subkeys); + return regdb_ops.fetch_subkeys(KEY_WINNT_PRINTERS, subkeys); } - return regdb_fetch_keys(printers_key, subkeys); + return regdb_ops.fetch_subkeys(printers_key, subkeys); } /********************************************************************** @@ -105,10 +106,10 @@ static bool key_printers_store_keys( const char *key, struct regsubkey_ctr *subk printers_key = create_printer_registry_path(ctx, key); if (printers_key == NULL) { /* normalize on the 'HKLM\SOFTWARE\....\Print\Printers' key */ - return regdb_store_keys(KEY_WINNT_PRINTERS, subkeys); + return regdb_ops.store_subkeys(KEY_WINNT_PRINTERS, subkeys); } - return regdb_store_keys(printers_key, subkeys); + return regdb_ops.store_subkeys(printers_key, subkeys); } /********************************************************************** @@ -122,10 +123,10 @@ static int key_printers_fetch_values(const char *key, struct regval_ctr *values) printers_key = create_printer_registry_path(ctx, key); if (printers_key == NULL) { /* normalize on the 'HKLM\SOFTWARE\....\Print\Printers' key */ - return regdb_fetch_values(KEY_WINNT_PRINTERS, values); + return regdb_ops.fetch_values(KEY_WINNT_PRINTERS, values); } - return regdb_fetch_values(printers_key, values); + return regdb_ops.fetch_values(printers_key, values); } /********************************************************************** @@ -139,10 +140,10 @@ static bool key_printers_store_values(const char *key, struct regval_ctr *values printers_key = create_printer_registry_path(ctx, key); if (printers_key == NULL) { /* normalize on the 'HKLM\SOFTWARE\....\Print\Printers' key */ - return regdb_store_values(KEY_WINNT_PRINTERS, values); + return regdb_ops.store_values(KEY_WINNT_PRINTERS, values); } - return regdb_store_values(printers_key, values); + return regdb_ops.store_values(printers_key, values); } /********************************************************************** -- cgit