Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmands Arseniuss Skolmeisters <armands.skolmeisters@zabbix.com>2022-10-26 11:17:32 +0300
committerArmands Arseniuss Skolmeisters <armands.skolmeisters@zabbix.com>2022-10-26 11:17:32 +0300
commit9644791c07a6ff701cd5d6e64f9a665ab1e323ff (patch)
treeeadef054224bdf99b21e3e6ba4369e2a139e9c1f /include
parent84fd57ae26bbe3e3f5d33bbd92858e34a6e61145 (diff)
...G...... [DEV-2302] refactored zbxwin32 library
Diffstat (limited to 'include')
-rw-r--r--include/disk.h31
-rw-r--r--include/zbxwin32.h (renamed from include/perfmon.h)32
2 files changed, 19 insertions, 44 deletions
diff --git a/include/disk.h b/include/disk.h
deleted file mode 100644
index e544863e612..00000000000
--- a/include/disk.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-** Zabbix
-** Copyright (C) 2001-2022 Zabbix SIA
-**
-** 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 2 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, write to the Free Software
-** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-**/
-
-#ifndef ZABBIX_DISK_H
-#define ZABBIX_DISK_H
-
-#include "config.h"
-
-#if !defined(_WINDOWS) && !defined(__MINGW32__)
-# error "This module is only available for Windows OS"
-#endif
-
-zbx_uint64_t get_cluster_size(const char *path, char **error);
-
-#endif /* ZABBIX_DISK_H */
diff --git a/include/perfmon.h b/include/zbxwin32.h
index c52c85a2f9b..104d4d9cd42 100644
--- a/include/perfmon.h
+++ b/include/zbxwin32.h
@@ -17,10 +17,12 @@
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
-#ifndef ZABBIX_PERFMON_H
-#define ZABBIX_PERFMON_H
+#ifndef ZABBIX_WIN32_H
+#define ZABBIX_WIN32_H
+#include "config.h"
#include "zbxsysinc.h"
+#include "zbxtypes.h"
#if !defined(_WINDOWS) && !defined(__MINGW32__)
# error "This module is only available for Windows OS"
@@ -80,22 +82,26 @@ typedef struct perf_counter_data
}
zbx_perf_counter_data_t;
+zbx_uint64_t zbx_get_cluster_size(const char *path, char **error);
+
PDH_STATUS zbx_PdhMakeCounterPath(const char *function, PDH_COUNTER_PATH_ELEMENTS *cpe, char *counterpath);
PDH_STATUS zbx_PdhOpenQuery(const char *function, PDH_HQUERY query);
PDH_STATUS zbx_PdhAddCounter(const char *function, zbx_perf_counter_data_t *counter, PDH_HQUERY query,
const char *counterpath, zbx_perf_counter_lang_t lang, PDH_HCOUNTER *handle);
PDH_STATUS zbx_PdhCollectQueryData(const char *function, const char *counterpath, PDH_HQUERY query);
-PDH_STATUS zbx_PdhGetRawCounterValue(const char *function, const char *counterpath, PDH_HCOUNTER handle, PPDH_RAW_COUNTER value);
+PDH_STATUS zbx_PdhGetRawCounterValue(const char *function, const char *counterpath, PDH_HCOUNTER handle,
+ PPDH_RAW_COUNTER value);
-PDH_STATUS calculate_counter_value(const char *function, const char *counterpath, zbx_perf_counter_lang_t lang, double *value);
-wchar_t *get_counter_name(DWORD pdhIndex);
-int check_counter_path(char *counterPath, int convert_from_numeric);
-int init_builtin_counter_indexes(void);
-DWORD get_builtin_object_index(zbx_builtin_counter_ref_t counter_ref);
-DWORD get_builtin_counter_index(zbx_builtin_counter_ref_t counter_ref);
-wchar_t *get_all_counter_names(HKEY reg_key, wchar_t *reg_value_name);
+PDH_STATUS zbx_calculate_counter_value(const char *function, const char *counterpath,
+ zbx_perf_counter_lang_t lang, double *value);
+wchar_t *zbx_get_counter_name(DWORD pdhIndex);
+int zbx_check_counter_path(char *counterPath, int convert_from_numeric);
+int zbx_init_builtin_counter_indexes(void);
+DWORD zbx_get_builtin_object_index(zbx_builtin_counter_ref_t counter_ref);
+DWORD zbx_get_builtin_counter_index(zbx_builtin_counter_ref_t counter_ref);
+wchar_t *zbx_get_all_counter_names(HKEY reg_key, wchar_t *reg_value_name);
-#define get_builtin_object_name(ctr) get_counter_name(get_builtin_object_index(ctr))
-#define get_builtin_counter_name(ctr) get_counter_name(get_builtin_counter_index(ctr))
+#define get_builtin_object_name(ctr) zbx_get_counter_name(zbx_get_builtin_object_index(ctr))
+#define get_builtin_counter_name(ctr) zbx_get_counter_name(zbx_get_builtin_counter_index(ctr))
-#endif /* ZABBIX_PERFMON_H */
+#endif /* ZABBIX_WIN32_H */