Search
lxdream.org :: lxdream/src/drivers/cdrom/isofs.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/cdrom/isofs.h
changeset 1107:7b279d10f46f
next1108:305ef2082079
author nkeynes
date Mon May 17 22:01:23 2010 +1000 (12 years ago)
permissions -rw-r--r--
last change Rip out my hacked-up isofs code and replace with libisofs. Much better.
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/drivers/cdrom/isofs.h Mon May 17 22:01:23 2010 +1000
1.3 @@ -0,0 +1,58 @@
1.4 +/**
1.5 + * $Id$
1.6 + *
1.7 + * libisofs adapter
1.8 + *
1.9 + * Copyright (c) 2010 Nathan Keynes.
1.10 + *
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.15 + *
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.20 + */
1.21 +
1.22 +#ifndef cdrom_isofs_H
1.23 +#define cdrom_isofs_H 1
1.24 +
1.25 +#include <libisofs/libisofs.h>
1.26 +#include "drivers/cdrom/sector.h"
1.27 +
1.28 +/**
1.29 + * Construct an IsoFilesystem from an existing sector source
1.30 + */
1.31 +IsoImageFilesystem *iso_filesystem_new_from_source( sector_source_t track, cdrom_lba_t start, ERROR *err );
1.32 +IsoImageFilesystem *iso_filesystem_new_from_disc( cdrom_disc_t disc, cdrom_lba_t start, ERROR *err );
1.33 +IsoImageFilesystem *iso_filesystem_new_from_track( cdrom_disc_t disc, cdrom_track_t track, ERROR *err );
1.34 +
1.35 +
1.36 +/**
1.37 + * Convenience function to read an entire IsoFileSource
1.38 + */
1.39 +int iso_source_file_read_all( IsoFileSource *file, unsigned char *buf, size_t max_size );
1.40 +
1.41 +/**
1.42 + * Construct an IsoImage image from an existing sector source, for use in
1.43 + * creating a modified image
1.44 + */
1.45 +IsoImage *iso_image_new_from_source( sector_source_t track, cdrom_lba_t start, ERROR *err );
1.46 +
1.47 +/**
1.48 + * Construct an IsoImage from a cdrom disc and sector position.
1.49 + * @return a new isofs_reader, or NULL on an error.
1.50 + */
1.51 +IsoImage *iso_image_new_from_disc( cdrom_disc_t disc, cdrom_lba_t start_sector, ERROR *err );
1.52 +
1.53 +IsoImage *iso_image_new_from_track( cdrom_disc_t disc, cdrom_track_t track, ERROR *err );
1.54 +
1.55 +/**
1.56 + * Construct a sector source from a given IsoImage.
1.57 + */
1.58 +sector_source_t iso_sector_source_new( IsoImage *image, sector_mode_t mode, cdrom_lba_t start_sector,
1.59 + const char *bootstrap, ERROR *err );
1.60 +
1.61 +#endif /* !cdrom_isofs_H */
.