summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-04-20 14:07:30 +0200
committerAndreas Schneider <asn@samba.org>2012-04-25 14:23:04 +0200
commit37715930c29acbbd6527e7737fd3114cda6c89d2 (patch)
treea9dbc89b053fd8cb8e11e94a464862389a9318c9
parent36cb40ef2bd04d7b09bea0400404fcd2bbd5face (diff)
downloadsamba-37715930c29acbbd6527e7737fd3114cda6c89d2.tar.gz
samba-37715930c29acbbd6527e7737fd3114cda6c89d2.tar.bz2
samba-37715930c29acbbd6527e7737fd3114cda6c89d2.zip
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 <asn@samba.org>
-rw-r--r--source3/registry/reg_backend_printing.c19
1 files 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);
}
/**********************************************************************