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

zbxmockdata.h « tests - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 434f153e3655bd21fb131ec0f73508367d32314e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
** Zabbix
** Copyright (C) 2001-2017 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_MOCK_DATA_H
#define ZABBIX_MOCK_DATA_H

int	zbx_mock_data_init(void **state);
int	zbx_mock_data_free(void **state);

typedef int	zbx_mock_handle_t;

typedef enum
{
	ZBX_MOCK_SUCCESS,
	ZBX_MOCK_INVALID_HANDLE,
	ZBX_MOCK_NO_PARAMETER,
	ZBX_MOCK_NO_EXIT_CODE,
	ZBX_MOCK_NOT_AN_OBJECT,
	ZBX_MOCK_NO_SUCH_MEMBER,
	ZBX_MOCK_NOT_A_VECTOR,
	ZBX_MOCK_END_OF_VECTOR,
	ZBX_MOCK_NOT_A_STRING,
	ZBX_MOCK_INTERNAL_ERROR,
	ZBX_MOCK_INVALID_YAML_PATH
}
zbx_mock_error_t;

const char	*zbx_mock_error_string(zbx_mock_error_t error);

zbx_mock_error_t	zbx_mock_in_parameter(const char *name, zbx_mock_handle_t *parameter);
zbx_mock_error_t	zbx_mock_out_parameter(const char *name, zbx_mock_handle_t *parameter);
zbx_mock_error_t	zbx_mock_db_rows(const char *data_source, zbx_mock_handle_t *rows);
zbx_mock_error_t	zbx_mock_file(const char *path, zbx_mock_handle_t *file);
zbx_mock_error_t	zbx_mock_exit_code(int *status);
zbx_mock_error_t	zbx_mock_object_member(zbx_mock_handle_t object, const char *name, zbx_mock_handle_t *member);
zbx_mock_error_t	zbx_mock_vector_element(zbx_mock_handle_t vector, zbx_mock_handle_t *element);
zbx_mock_error_t	zbx_mock_string(zbx_mock_handle_t string, const char **value);
zbx_mock_error_t	zbx_mock_parameter(const char *path, zbx_mock_handle_t *parameter);

#endif	/* ZABBIX_MOCK_DATA_H */