/src/sleuthkit/tsk/img/img_open.h
Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef _TSK_IMG_IMG_OPEN_H |
2 | | #define _TSK_IMG_IMG_OPEN_H |
3 | | |
4 | | #include "tsk_img_i.h" |
5 | | |
6 | | #include <memory> |
7 | | #include <string> |
8 | | |
9 | | bool sector_size_ok(unsigned int sector_size); |
10 | | |
11 | | template <class T> |
12 | 0 | bool images_ok(int num_img, const T* const images[]) { |
13 | 0 | if (num_img < 0) { |
14 | 0 | tsk_error_set_errno(TSK_ERR_IMG_ARG); |
15 | 0 | tsk_error_set_errstr("number of images is negative (%d)", num_img); |
16 | 0 | return false; |
17 | 0 | } |
18 | | |
19 | 0 | if (num_img == 0 || !images || !images[0]) { |
20 | 0 | tsk_error_set_errno(TSK_ERR_IMG_NOFILE); |
21 | 0 | tsk_error_set_errstr("tsk_img_open"); |
22 | 0 | return false; |
23 | 0 | } |
24 | | |
25 | 0 | return true; |
26 | 0 | } |
27 | | |
28 | | void img_info_deleter(TSK_IMG_INFO* img_info); |
29 | | |
30 | | std::unique_ptr<TSK_IMG_INFO, decltype(&img_info_deleter)> |
31 | | img_open_by_type( |
32 | | int num_img, |
33 | | const TSK_TCHAR* const images[], |
34 | | TSK_IMG_TYPE_ENUM type, |
35 | | unsigned int a_ssize |
36 | | ); |
37 | | |
38 | | const char* type_name(TSK_IMG_TYPE_ENUM t); |
39 | | |
40 | | #endif |