libnk2(3)
π libnk2(3) β Library to access the Nickfile (NK2) format π
πΈ NAME πΈ
libnk2.h β Library to access the Nickfile (NK2) format. π
β¨ SYNOPSIS β¨
okay so first you include this, bestie:
#include <libnk2.h>
π«Ά Support functions
const char *
libnk2_get_version(void);
int
libnk2_get_access_flags_read(void);
int
libnk2_get_codepage(int *codepage, libnk2_error_t **error);
int
libnk2_set_codepage(int codepage, libnk2_error_t **error);
int
libnk2_check_file_signature(const char *filename,
libnk2_error_t **error);
Available when compiled with wide character string support:
int
libnk2_check_file_signature_wide(const wchar_t *filename,
libnk2_error_t **error);
Available when compiled with libbfio support:
int
libnk2_check_file_signature_file_io_handle(libbfio_handle_t *file_io_handle,
libnk2_error_t **error);
π Notify functions
void
libnk2_notify_set_verbose(int verbose);
int
libnk2_notify_set_stream(FILE *stream, libnk2_error_t **error);
int
libnk2_notify_stream_open(const char *filename, libnk2_error_t **error);
int
libnk2_notify_stream_close(libnk2_error_t **error);
π Error functions
void
libnk2_error_free(libnk2_error_t **error);
int
libnk2_error_fprint(libnk2_error_t *error, FILE *stream);
int
libnk2_error_sprint(libnk2_error_t *error, char *string, size_t size);
int
libnk2_error_backtrace_fprint(libnk2_error_t *error, FILE *stream);
int
libnk2_error_backtrace_sprint(libnk2_error_t *error, char *string,
size_t size);
ποΈ File functions
int
libnk2_file_initialize(libnk2_file_t **file, libnk2_error_t **error);
int
libnk2_file_free(libnk2_file_t **file, libnk2_error_t **error);
int
libnk2_file_signal_abort(libnk2_file_t *file, libnk2_error_t **error);
int
libnk2_file_open(libnk2_file_t *file, const char *filename,
int access_flags, libnk2_error_t **error);
int
libnk2_file_close(libnk2_file_t *file, libnk2_error_t **error);
int
libnk2_file_get_ascii_codepage(libnk2_file_t *file, int *ascii_codepage,
libnk2_error_t **error);
int
libnk2_file_set_ascii_codepage(libnk2_file_t *file, int ascii_codepage,
libnk2_error_t **error);
int
libnk2_file_get_modification_time(libnk2_file_t *file,
uint64_t *filetime, libnk2_error_t **error);
int
libnk2_file_get_number_of_items(libnk2_file_t *file,
int *number_of_items, libnk2_error_t **error);
int
libnk2_file_get_item(libnk2_file_t *file, int item_index,
libnk2_item_t **item, libnk2_error_t **error);
Available when compiled with wide character string support:
int
libnk2_file_open_wide(libnk2_file_t *file, const wchar_t *filename,
int access_flags, libnk2_error_t **error);
Available when compiled with libbfio support:
int
libnk2_file_open_file_io_handle(libnk2_file_t *file,
libbfio_handle_t *file_io_handle, int access_flags,
libnk2_error_t **error);
π Item functions
int
libnk2_item_free(libnk2_item_t **item, libnk2_error_t **error);
int
libnk2_item_get_identifier(libnk2_item_t *item, uint32_t *identifier,
libnk2_error_t **error);
int
libnk2_item_get_number_of_entries(libnk2_item_t *item,
int *number_of_entries, libnk2_error_t **error);
int
libnk2_item_get_entry_by_index(libnk2_item_t *item, int entry_index,
libnk2_record_entry_t **record_entry, libnk2_error_t **error);
int
libnk2_item_get_entry_by_type(libnk2_item_t *item, uint32_t entry_type,
uint32_t value_type, libnk2_record_entry_t **record_entry,
uint8_t flags, libnk2_error_t **error);
π¦ Record entry functions
int
libnk2_record_entry_free(libnk2_record_entry_t **record_entry,
libnk2_error_t **error);
int
libnk2_record_entry_get_entry_type(libnk2_record_entry_t *record_entry,
uint32_t *entry_type, libnk2_error_t **error);
int
libnk2_record_entry_get_value_type(libnk2_record_entry_t *record_entry,
uint32_t *value_type, libnk2_error_t **error);
int
libnk2_record_entry_get_data_size(libnk2_record_entry_t *record_entry,
size_t *data_size, libnk2_error_t **error);
int
libnk2_record_entry_get_data(libnk2_record_entry_t *record_entry,
uint8_t *data, size_t data_size, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_boolean(libnk2_record_entry_t *record_entry,
uint8_t *value_boolean, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_16bit_integer(libnk2_record_entry_t *record_entry,
uint16_t *value_16bit, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_32bit_integer(libnk2_record_entry_t *record_entry,
uint32_t *value_32bit, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_64bit_integer(libnk2_record_entry_t *record_entry,
uint64_t *value_64bit, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_filetime(libnk2_record_entry_t *record_entry,
uint64_t *filetime, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_floatingtime(libnk2_record_entry_t *record_entry,
uint64_t *floatingtime, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_size(libnk2_record_entry_t *record_entry,
size64_t *value_size, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_floating_point(libnk2_record_entry_t *record_entry,
double *value_floating_point, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_utf8_string_size(libnk2_record_entry_t *record_entry,
size_t *utf8_string_size, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_utf8_string(libnk2_record_entry_t *record_entry,
uint8_t *utf8_string, size_t utf8_string_size,
libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_utf16_string_size(libnk2_record_entry_t *record_entry,
size_t *utf16_string_size, libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_utf16_string(libnk2_record_entry_t *record_entry,
uint16_t *utf16_string, size_t utf16_string_size,
libnk2_error_t **error);
int
libnk2_record_entry_get_data_as_guid(libnk2_record_entry_t *record_entry,
uint8_t *guid_data, size_t guid_data_size, libnk2_error_t **error);
π¦ DESCRIPTION π¦
The libnk2_get_version() function is used to retrieve the library version. Thatβs the whole description section, and honestly sheβs short but iconic. β¨
π RETURN VALUES π
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libnk2.h".
π ENVIRONMENT π
None. Not a single environment variable here, bestie. π
π FILES π
None. No files listed in this section. β¨
π§ NOTES π§
libnk2 can be compiled with wide character support (wchar_t).
To compile libnk2 with wide character support use:
./configure --enable-wide-character-type=yes
or define: _UNICODE or UNICODE during compilation.
LIBNK2_WIDE_CHARACTER_TYPE in libnk2/features.h can be used to determine if libnk2 was compiled with wide character support.
π BUGS π
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libnk2/issues
π AUTHOR π
These man pages are generated from "libnk2.h".
π COPYRIGHT π
Copyright (C) 2009-2024, Joachim Metz <joachim.metz@gmail.com>.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
β SEE ALSO β
the libnk2.h include file.
xoxo, bestie π
β source/version: libnk2 Β· date: April 20, 2019. periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: libnk2-devel 20240426-bp160.1.13 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libnk2-devel 20240426-bp160.1.13 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libnk2-devel 20240426-bp160.1.13 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libnk2-devel 20240426-bp160.1.13 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms