1 /*
2  * Copyright (c) 2019 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _SETTINGS_TEST_FILE_H
8 #define _SETTINGS_TEST_FILE_H
9 
10 #include <stdio.h>
11 #include <string.h>
12 #include <zephyr/ztest.h>
13 #include <zephyr/fs/fs.h>
14 
15 #include <zephyr/settings/settings.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 extern uint8_t val8;
22 extern uint16_t val16;
23 extern uint32_t val32;
24 extern uint64_t val64;
25 
26 extern int test_get_called;
27 extern int test_set_called;
28 extern int test_commit_called;
29 extern int test_export_block;
30 
31 extern struct settings_handler c_test_handlers[];
32 
33 void ctest_clear_call_state(void);
34 int ctest_get_call_state(void);
35 
36 void config_wipe_srcs(void);
37 
38 int fsutil_read_file(const char *path, off_t offset, size_t len, void *dst,
39 		     size_t *out_len);
40 int fsutil_write_file(const char *path, const void *data, size_t len);
41 int settings_test_file_strstr(const char *fname, char const *string,
42 			      size_t str_len);
43 
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif /* _SETTINGS_TEST_FILE_H */
50