summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-05-24 22:59:04 +0200
committerMichael Adam <obnox@samba.org>2010-05-25 10:35:26 +0200
commit5a92d88f38dc9fc65db7e6451eae2d22da04463e (patch)
treefa925e07cebac0454e70c04e3ab25b8f9004d3a8
parentb94267aa3f83ec604e8b242006e09ecf4f7d5e57 (diff)
downloadsamba-5a92d88f38dc9fc65db7e6451eae2d22da04463e.tar.gz
samba-5a92d88f38dc9fc65db7e6451eae2d22da04463e.tar.bz2
samba-5a92d88f38dc9fc65db7e6451eae2d22da04463e.zip
s3:registry: extract reg_perfcount prototypes into header of their own.
And use them only when necessary.
-rw-r--r--source3/include/registry.h10
-rw-r--r--source3/registry/reg_backend_hkpt_params.c1
-rw-r--r--source3/registry/reg_backend_perflib.c1
-rw-r--r--source3/registry/reg_init_full.c1
-rw-r--r--source3/registry/reg_perfcount.c1
-rw-r--r--source3/registry/reg_perfcount.h33
-rw-r--r--source3/rpc_server/srv_winreg_nt.c1
7 files changed, 38 insertions, 10 deletions
diff --git a/source3/include/registry.h b/source3/include/registry.h
index a36c8dae9e..3496f13c49 100644
--- a/source3/include/registry.h
+++ b/source3/include/registry.h
@@ -77,16 +77,6 @@ NTSTATUS registry_create_admin_token(TALLOC_CTX *mem_ctx,
NT_USER_TOKEN **ptoken);
WERROR registry_init_smbconf(const char *keyname);
-/* The following definitions come from registry/reg_perfcount.c */
-
-void perfcount_init_keys( void );
-uint32 reg_perfcount_get_base_index(void);
-uint32 reg_perfcount_get_last_counter(uint32 base_index);
-uint32 reg_perfcount_get_last_help(uint32 last_counter);
-uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
-uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
-WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
-
/* The following definitions come from lib/util_reg_api.c */
WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
diff --git a/source3/registry/reg_backend_hkpt_params.c b/source3/registry/reg_backend_hkpt_params.c
index f0212f3e1b..a303e72517 100644
--- a/source3/registry/reg_backend_hkpt_params.c
+++ b/source3/registry/reg_backend_hkpt_params.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "registry.h"
+#include "reg_perfcount.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_backend_perflib.c b/source3/registry/reg_backend_perflib.c
index 35564b4309..f13c37ac2b 100644
--- a/source3/registry/reg_backend_perflib.c
+++ b/source3/registry/reg_backend_perflib.c
@@ -27,6 +27,7 @@
#include "includes.h"
#include "registry.h"
#include "reg_util.h"
+#include "reg_perfcount.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_init_full.c b/source3/registry/reg_init_full.c
index 2eec48a8ea..a3604e6c38 100644
--- a/source3/registry/reg_init_full.c
+++ b/source3/registry/reg_init_full.c
@@ -24,6 +24,7 @@
#include "registry.h"
#include "reg_cachehook.h"
#include "reg_backend_db.h"
+#include "reg_perfcount.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index d71f40ce31..c53036fc8b 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "../librpc/gen_ndr/perfcount.h"
#include "registry.h"
+#include "reg_perfcount.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_perfcount.h b/source3/registry/reg_perfcount.h
new file mode 100644
index 0000000000..c6b76a5360
--- /dev/null
+++ b/source3/registry/reg_perfcount.h
@@ -0,0 +1,33 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * Virtual Windows Registry Layer
+ *
+ * Copyright (C) Marcin Krzysztof Porwit 2005,
+ * Copyright (C) Gerald (Jerry) Carter 2005.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _REG_PERFCOUNT_H
+#define _REG_PERFCOUNT_H
+
+void perfcount_init_keys( void );
+uint32 reg_perfcount_get_base_index(void);
+uint32 reg_perfcount_get_last_counter(uint32 base_index);
+uint32 reg_perfcount_get_last_help(uint32 last_counter);
+uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
+uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
+WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
+
+#endif /* _REG_PERFCOUNT_H */
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index 9f8c75acea..b84740ba04 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "../librpc/gen_ndr/srv_winreg.h"
#include "registry.h"
+#include "registry/reg_perfcount.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV