libodraw(3)
π libodraw(3) β the manual, but make it cute π
Okay so bestie, you're looking at the libodraw(3) manual page from the Library Functions Manual. Buckle up, because this library is lowkey iconic β it's all about accessing optical disc (split) RAW formats, and we're gonna go through every single function together. No skipping, no cap. β¨
πΈ NAME πΈ
libodraw.h β Library to access optical disc (split) RAW formats. That's the whole vibe. It's giving "I read raw optical discs for breakfast" and honestly? Obsessed. πΏπ¦
β¨ SYNOPSIS β¨
First things first, you gotta include the header. Like, obviously:
#include <libodraw.h>
Then you've got a whole squad of functions. I'm gonna drop the entire synopsis here verbatim because every single one matters, then we'll break it down by category so it doesn't feel like a wall of text. π«Ά
Support functions
const char *
libodraw_get_version(void);
int
libodraw_get_access_flags_read(void);
int
libodraw_get_access_flags_read_write(void);
int
libodraw_get_access_flags_write(void);
int
libodraw_get_codepage(int *codepage, libodraw_error_t **error);
int
libodraw_set_codepage(int codepage, libodraw_error_t **error);
Notify functions
void
libodraw_notify_set_verbose(int verbose);
int
libodraw_notify_set_stream(FILE *stream, libodraw_error_t **error);
int
libodraw_notify_stream_open(const char *filename,
libodraw_error_t **error);
int
libodraw_notify_stream_close(libodraw_error_t **error);
Error functions
void
libodraw_error_free(libodraw_error_t **error);
int
libodraw_error_fprint(libodraw_error_t *error, FILE *stream);
int
libodraw_error_sprint(libodraw_error_t *error, char *string,
size_t size);
int
libodraw_error_backtrace_fprint(libodraw_error_t *error, FILE *stream);
int
libodraw_error_backtrace_sprint(libodraw_error_t *error, char *string,
size_t size);
Handle functions
int
libodraw_handle_initialize(libodraw_handle_t **handle,
libodraw_error_t **error);
int
libodraw_handle_free(libodraw_handle_t **handle,
libodraw_error_t **error);
int
libodraw_handle_signal_abort(libodraw_handle_t *handle,
libodraw_error_t **error);
int
libodraw_handle_open(libodraw_handle_t *handle, const char *filename,
int access_flags, libodraw_error_t **error);
int
libodraw_handle_open_data_files(libodraw_handle_t *handle,
libodraw_error_t **error);
int
libodraw_handle_close(libodraw_handle_t *handle,
libodraw_error_t **error);
ssize_t
libodraw_handle_read_buffer(libodraw_handle_t *handle, void *buffer,
size_t buffer_size, libodraw_error_t **error);
ssize_t
libodraw_handle_read_buffer_at_offset(libodraw_handle_t *handle,
void *buffer, size_t buffer_size, off64_t offset,
libodraw_error_t **error);
off64_t
libodraw_handle_seek_offset(libodraw_handle_t *handle, off64_t offset,
int whence, libodraw_error_t **error);
int
libodraw_handle_get_offset(libodraw_handle_t *handle, off64_t *offset,
libodraw_error_t **error);
int
libodraw_handle_set_maximum_number_of_open_handles(libodraw_handle_t *handle,
int maximum_number_of_open_handles, libodraw_error_t **error);
int
libodraw_handle_get_ascii_codepage(libodraw_handle_t *handle,
int *ascii_codepage, libodraw_error_t **error);
int
libodraw_handle_set_ascii_codepage(libodraw_handle_t *handle,
int ascii_codepage, libodraw_error_t **error);
int
libodraw_handle_get_number_of_data_files(libodraw_handle_t *handle,
int *number_of_data_files, libodraw_error_t **error);
int
libodraw_handle_get_data_file(libodraw_handle_t *handle, int index,
libodraw_data_file_t **data_file, libodraw_error_t **error);
int
libodraw_handle_append_data_file(libodraw_handle_t *handle,
const char *name, size_t name_length, uint8_t type,
libodraw_error_t **error);
Available when compiled with wide character string support:
int
libodraw_handle_open_wide(libodraw_handle_t *handle,
const wchar_t *filename, int access_flags,
libodraw_error_t **error);
int
libodraw_handle_append_data_file_wide(libodraw_handle_t *handle,
const wchar_t *name, size_t name_length, uint8_t type,
libodraw_error_t **error);
Available when compiled with libbfio support:
int
libodraw_handle_open_handle_io_handle(libodraw_handle_t *handle,
libbfio_handle_t *file_io_handle, int access_flags,
libodraw_error_t **error);
int
libodraw_handle_open_data_files_file_io_pool(libodraw_handle_t *handle,
libbfio_pool_t *file_io_pool, libodraw_error_t **error);
Meta data functions
int
libodraw_handle_get_media_size(libodraw_handle_t *handle,
size64_t *media_size, libodraw_error_t **error);
int
libodraw_handle_get_bytes_per_sector(libodraw_handle_t *handle,
uint32_t *bytes_per_sector, libodraw_error_t **error);
int
libodraw_handle_set_bytes_per_sector(libodraw_handle_t *handle,
uint32_t bytes_per_sector, libodraw_error_t **error);
int
libodraw_handle_get_number_of_sectors(libodraw_handle_t *handle,
uint64_t *number_of_sectors, libodraw_error_t **error);
int
libodraw_handle_get_number_of_sessions(libodraw_handle_t *handle,
int *number_of_sessions, libodraw_error_t **error);
int
libodraw_handle_get_session(libodraw_handle_t *handle, int index,
uint64_t *start_sector, uint64_t *number_of_sectors,
libodraw_error_t **error);
int
libodraw_handle_append_session(libodraw_handle_t *handle,
uint64_t first_sector, uint64_t number_of_sectors,
libodraw_error_t **error);
int
libodraw_handle_get_number_of_lead_outs(libodraw_handle_t *handle,
int *number_of_lead_outs, libodraw_error_t **error);
int
libodraw_handle_get_lead_out(libodraw_handle_t *handle, int index,
uint64_t *start_sector, uint64_t *number_of_sectors,
libodraw_error_t **error);
int
libodraw_handle_append_lead_out(libodraw_handle_t *handle,
uint64_t first_sector, uint64_t number_of_sectors,
libodraw_error_t **error);
int
libodraw_handle_get_number_of_tracks(libodraw_handle_t *handle,
int *number_of_tracks, libodraw_error_t **error);
int
libodraw_handle_get_track(libodraw_handle_t *handle, int index,
uint64_t *start_sector, uint64_t *number_of_sectors, uint8_t *type,
int *data_file_index, uint64_t *data_file_start_sector,
libodraw_error_t **error);
int
libodraw_handle_append_track(libodraw_handle_t *handle,
uint64_t start_sector, uint64_t number_of_sectors, uint8_t type,
int data_file_index, uint64_t data_file_start_sector,
libodraw_error_t **error);
Data file functions
int
libodraw_data_file_free(libodraw_data_file_t **data_file,
libodraw_error_t **error);
int
libodraw_data_file_get_filename_size(libodraw_data_file_t *data_file,
size_t *filename_size, libodraw_error_t **error);
int
libodraw_data_file_get_filename(libodraw_data_file_t *data_file,
char *filename, size_t filename_size, libodraw_error_t **error);
int
libodraw_data_file_set_filename(libodraw_data_file_t *data_file,
const char *filename, size_t filename_length,
libodraw_error_t **error);
int
libodraw_data_file_get_type(libodraw_data_file_t *data_file,
uint8_t *type, libodraw_error_t **error);
Available when compiled with wide character string support:
int
libodraw_data_file_get_filename_size_wide(libodraw_data_file_t *data_file,
size_t *filename_size, libodraw_error_t **error);
int
libodraw_data_file_get_filename_wide(libodraw_data_file_t *data_file,
wchar_t *filename, size_t filename_size, libodraw_error_t **error);
int
libodraw_data_file_set_filename_wide(libodraw_data_file_t *data_file,
const wchar_t *filename, size_t filename_length,
libodraw_error_t **error);
Like, that's a lot, right? But it's organized. Let me walk you through the groups so you know what's what. π§
π οΈ Support functions
These are your basics β get the version, get access flags, handle codepage. If you're initializing anything, you'll probably touch these.
π’ Notify functions
These control how the library talks to you β verbosity, streams, opening/closing notification streams. Basically, how it says "hey bestie, here's what's happening." π¬
π Error functions
Error handling, but make it useful. You can free errors, print them to a stream, sprint them into a string, and even get a backtrace. So when something goes wrong, you'll know exactly where and why. No vague "something failed" energy here. π ββοΈ
π Handle functions
The main character energy of the library. You initialize a handle, open files, read buffers, seek around, manage data files, and close it all down. There are also wide-character and libbfio variants if you compiled with those. Handle with care β literally. π
π Meta data functions
All the disc details: media size, bytes per sector, number of sectors, sessions, lead-outs, tracks. You can get and append all of these. If you're into optical disc structure, this is your moment. π
π Data file functions
Everything about the actual data files: free them, get/set filenames, get their type. Plus wide-character versions for when you're feeling fancy with wchar_t. π
π DESCRIPTION π
So the main function described here is libodraw_get_version(). It's used to retrieve the library version. That's it. That's the description. Short and sweet, just like a good group chat message. β¨
π RETURN VALUES π
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values, see "libodraw.h". So like, don't guess β check the header. It's giving "read the docs, bestie." π
π ENVIRONMENT π
None. Zero. Nada. The environment variable section is empty, and that's valid. Sometimes less is more. π
ποΈ FILES ποΈ
None. Again, nothing to see here. The library doesn't have associated files listed in this section. Moving on! π¦
π NOTES π
Okay, important stuff here. libodraw can be compiled with wide character support (wchar_t). If you want that, you've got options:
- To compile
libodrawwith wide character support, use:./configure --enable-wide-character-type=yes - Or define
_UNICODEduring compilation. - Or define
UNICODEduring compilation.
And if you're ever wondering whether your build has wide character support, check LIBODRAW_WIDE_CHARACTER_TYPE in libodraw/features.h. That macro will tell you. So no guessing! π₯
π BUGS π
Found a bug? Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libodraw/issues. They want to hear from you, fr fr. Don't be shy. π«Ά
βοΈ AUTHOR βοΈ
These man pages are generated from "libodraw.h". So like, the header is the source of truth. Iconic. π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (C) 2010-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. So like, use it, love it, but don't come for them if something breaks. Periodt. π
π SEE ALSO π
the libodraw.h include fileβ that's the reference, bestie. Go read it. π
And that's the whole page! This manual page is from libodraw, dated October 3, 2019, and it's version libodraw(3). Catch you in the next man page. Stay slaying, stay reading raw optical discs. πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: libodraw-devel 20240505-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libodraw-devel 20240505-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libodraw-devel 20240505-bp160.1.13 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libodraw-devel 20240505-bp160.1.13 Β· GFDL-1.3-or-later AND 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