filename | src/drivers/cdrom/isofs.h |
changeset | 1108:305ef2082079 |
prev | 1107:7b279d10f46f |
next | 1111:742c073f353f |
author | nkeynes |
date | Fri Jun 04 09:13:40 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Add ability to wrap a binary program up in a virtual cd image (so that we can boot it normally) |
view | annotate | diff | log | raw |
1 /**
2 * $Id$
3 *
4 * libisofs adapter
5 *
6 * Copyright (c) 2010 Nathan Keynes.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 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 */
19 #ifndef cdrom_isofs_H
20 #define cdrom_isofs_H 1
22 #include <libisofs/libisofs.h>
23 #include "drivers/cdrom/sector.h"
25 /**
26 * Construct an IsoFilesystem from an existing sector source
27 */
28 IsoImageFilesystem *iso_filesystem_new_from_source( sector_source_t track, cdrom_lba_t start, ERROR *err );
29 IsoImageFilesystem *iso_filesystem_new_from_disc( cdrom_disc_t disc, cdrom_lba_t start, ERROR *err );
30 IsoImageFilesystem *iso_filesystem_new_from_track( cdrom_disc_t disc, cdrom_track_t track, ERROR *err );
33 /**
34 * Convenience function to read an entire IsoFileSource
35 */
36 int iso_source_file_read_all( IsoFileSource *file, unsigned char *buf, size_t max_size );
38 /**
39 * Construct an IsoImage image from an existing sector source, for use in
40 * creating a modified image
41 */
42 IsoImage *iso_image_new_from_source( sector_source_t track, cdrom_lba_t start, ERROR *err );
44 /**
45 * Construct an IsoImage from a cdrom disc and sector position.
46 * @return a new isofs_reader, or NULL on an error.
47 */
48 IsoImage *iso_image_new_from_disc( cdrom_disc_t disc, cdrom_lba_t start_sector, ERROR *err );
50 IsoImage *iso_image_new_from_track( cdrom_disc_t disc, cdrom_track_t track, ERROR *err );
52 /**
53 * Construct a sector source from a given IsoImage.
54 */
55 sector_source_t iso_sector_source_new( IsoImage *image, sector_mode_t mode, cdrom_lba_t start_sector,
56 const char *bootstrap, ERROR *err );
59 /** Prototypes for "Internal" Libisofs functions */
60 int iso_memory_stream_new(unsigned char *buf, size_t size, IsoStream **stream);
62 #endif /* !cdrom_isofs_H */
.