Debian Codegraph @

libuna/libuna_utf7_stream.h

raw symbols SCIP
1 /*
2 * UTF-7 stream functions
3 *
4 * Copyright (C) 2008-2024, Joachim Metz <[email protected]>
5 *
6 * Refer to AUTHORS for acknowledgements.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #if !defined( _LIBUNA_UTF7_STREAM_H )
23 #define _LIBUNA_UTF7_STREAM_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "libuna_extern.h"
29 #include "libuna_libcerror.h"
30 #include "libuna_types.h"
31
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35
36 LIBUNA_EXTERN \
37 int libuna_utf7_stream_size_from_utf8(
38 const libuna_utf8_character_t *utf8_string,
39 size_t utf8_string_size,
40 size_t *utf7_stream_size,
41 libcerror_error_t **error );
42
43 LIBUNA_EXTERN \
44 int libuna_utf7_stream_copy_from_utf8(
45 uint8_t *utf7_stream,
46 size_t utf7_stream_size,
47 const libuna_utf8_character_t *utf8_string,
48 size_t utf8_string_size,
49 libcerror_error_t **error );
50
51 /* The functionality for libuna_utf7_stream_copy_to_utf8 is implemented by
52 * libuna_utf8_string_copy_from_utf7_stream
53 */
54
55 LIBUNA_EXTERN \
56 int libuna_utf7_stream_size_from_utf16(
57 const libuna_utf16_character_t *utf16_string,
58 size_t utf16_string_size,
59 size_t *utf7_stream_size,
60 libcerror_error_t **error );
61
62 LIBUNA_EXTERN \
63 int libuna_utf7_stream_copy_from_utf16(
64 uint8_t *utf7_stream,
65 size_t utf7_stream_size,
66 const libuna_utf16_character_t *utf16_string,
67 size_t utf16_string_size,
68 libcerror_error_t **error );
69
70 /* The functionality for libuna_utf7_stream_copy_to_utf16 is implemented by
71 * libuna_utf16_string_copy_from_utf7_stream
72 */
73
74 LIBUNA_EXTERN \
75 int libuna_utf7_stream_size_from_utf32(
76 const libuna_utf32_character_t *utf32_string,
77 size_t utf32_string_size,
78 size_t *utf7_stream_size,
79 libcerror_error_t **error );
80
81 LIBUNA_EXTERN \
82 int libuna_utf7_stream_copy_from_utf32(
83 uint8_t *utf7_stream,
84 size_t utf7_stream_size,
85 const libuna_utf32_character_t *utf32_string,
86 size_t utf32_string_size,
87 libcerror_error_t **error );
88
89 /* The functionality for libuna_utf7_stream_copy_to_utf32 is implemented by
90 * libuna_utf32_string_copy_from_utf7_stream
91 */
92
93 #if defined( __cplusplus )
94 }
95 #endif
96
97 #endif /* !defined( _LIBUNA_UTF7_STREAM_H ) */
98