File: libfwsi_item.h

package info (click to toggle)
libfwsi 20181227-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 9,912 kB
  • sloc: ansic: 124,133; sh: 5,880; makefile: 1,190; python: 349; sed: 16
file content (162 lines) | stat: -rw-r--r-- 3,773 bytes parent folder | download | duplicates (6)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*
 * Windows Shell Item functions
 *
 * Copyright (C) 2010-2018, Joachim Metz <joachim.metz@gmail.com>
 *
 * Refer to AUTHORS for acknowledgements.
 *
 * This software is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This software 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 Lesser General Public License
 * along with this software.  If not, see <http://www.gnu.org/licenses/>.
 */

#if !defined( _LIBFWSI_INTERNAL_ITEM_H )
#define _LIBFWSI_INTERNAL_ITEM_H

#include <common.h>
#include <types.h>

#include "libfwsi_extern.h"
#include "libfwsi_libcdata.h"
#include "libfwsi_libcerror.h"
#include "libfwsi_types.h"

#if defined( __cplusplus )
extern "C" {
#endif

typedef struct libfwsi_internal_item libfwsi_internal_item_t;

struct libfwsi_internal_item
{
	/* The (item) type
	 */
	int type;

	/* The class type
	 */
	uint8_t class_type;

	/* The signature (mainly used for class type 0x00)
	 */
	uint32_t signature;

	/* The data size
	 */
	uint16_t data_size;

	/* The item value
	 */
        intptr_t *value;

	/* The item free value function
	 */
	int (*free_value)(
	       intptr_t **value,
	       libcerror_error_t **error );

	/* The extension blocks array
	 */
	libcdata_array_t *extension_blocks_array;

	/* The parent shell item
	 */
	libfwsi_item_t *parent_item;

	/* The codepage of the extended ASCII strings
	 */
	int ascii_codepage;

	/* Value to indicate if the item is managed by the list
	 */
	uint8_t is_managed;
};

LIBFWSI_EXTERN \
int libfwsi_item_initialize(
     libfwsi_item_t **item,
     libcerror_error_t **error );

int libfwsi_internal_item_initialize(
     libfwsi_internal_item_t **internal_item,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_free(
     libfwsi_item_t **item,
     libcerror_error_t **error );

int libfwsi_internal_item_free(
     libfwsi_internal_item_t **internal_item,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_copy_from_byte_stream(
     libfwsi_item_t *item,
     const uint8_t *byte_stream,
     size_t byte_stream_size,
     int ascii_codepage,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_get_type(
     libfwsi_item_t *item,
     int *type,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_get_class_type(
     libfwsi_item_t *item,
     uint8_t *class_type,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_get_signature(
     libfwsi_item_t *item,
     uint32_t *signature,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_get_data_size(
     libfwsi_item_t *item,
     size_t *data_size,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_get_number_of_extension_blocks(
     libfwsi_item_t *item,
     int *number_of_extension_blocks,
     libcerror_error_t **error );

LIBFWSI_EXTERN \
int libfwsi_item_get_extension_block(
     libfwsi_item_t *item,
     int extension_block_index,
     libfwsi_extension_block_t **extension_block,
     libcerror_error_t **error );

int libfwsi_item_get_parent_item(
     libfwsi_item_t *item,
     libfwsi_item_t **parent_item,
     libcerror_error_t **error );

int libfwsi_item_set_parent_item(
     libfwsi_item_t *item,
     libfwsi_item_t *parent_item,
     libcerror_error_t **error );

#if defined( __cplusplus )
}
#endif

#endif /* !defined( _LIBFWSI_INTERNAL_ITEM_H ) */