2007-11-24 16:58:36 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2007 Vreixo Formoso
|
2022-04-26 12:12:15 +02:00
|
|
|
* Copyright (c) 2009 - 2022 Thomas Schmitt
|
2007-11-24 16:58:36 +01:00
|
|
|
*
|
|
|
|
* This file is part of the libisofs project; you can redistribute it and/or
|
2010-01-27 06:48:59 +01:00
|
|
|
* modify it under the terms of the GNU General Public License version 2
|
|
|
|
* or later as published by the Free Software Foundation.
|
|
|
|
* See COPYING file for details.
|
2007-11-24 16:58:36 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LIBISO_FSOURCE_H_
|
|
|
|
#define LIBISO_FSOURCE_H_
|
|
|
|
|
|
|
|
/*
|
2008-01-19 17:41:01 +01:00
|
|
|
* Definitions for the file sources. Most functions/structures related with
|
|
|
|
* this were moved to libisofs.h.
|
2007-11-24 16:58:36 +01:00
|
|
|
*/
|
|
|
|
|
2008-01-19 17:41:01 +01:00
|
|
|
#include "libisofs.h"
|
2007-11-24 16:58:36 +01:00
|
|
|
|
2008-01-10 17:22:53 +01:00
|
|
|
#define ISO_LOCAL_FS_ID 1
|
|
|
|
#define ISO_IMAGE_FS_ID 2
|
|
|
|
#define ISO_ELTORITO_FS_ID 3
|
2008-01-11 16:42:18 +01:00
|
|
|
#define ISO_MEM_FS_ID 4
|
2008-02-24 18:20:23 +01:00
|
|
|
#define ISO_FILTER_FS_ID 5
|
2008-01-10 17:22:53 +01:00
|
|
|
|
2007-11-25 19:54:13 +01:00
|
|
|
/**
|
|
|
|
* Create a new IsoFilesystem to deal with local filesystem.
|
|
|
|
*
|
|
|
|
* @return
|
2016-07-22 16:03:51 +02:00
|
|
|
* 1 success, < 0 error
|
2007-11-25 19:54:13 +01:00
|
|
|
*/
|
|
|
|
int iso_local_filesystem_new(IsoFilesystem **fs);
|
2007-11-24 16:58:36 +01:00
|
|
|
|
2009-05-24 18:22:02 +02:00
|
|
|
|
2011-01-25 10:50:37 +01:00
|
|
|
/* Rank two IsoFileSource of ifs_class by their eventual old image LBAs.
|
2015-03-09 19:49:39 +01:00
|
|
|
* @param cmp_ret will return the reply value -1, 0, or 1.
|
|
|
|
* @return 1= *cmp_ret is a valid reply
|
|
|
|
* 0= not both streams are of ifs_class,
|
|
|
|
* *cmp_ret is only a rough estimation.
|
2009-05-24 18:22:02 +02:00
|
|
|
*/
|
2015-03-09 19:49:39 +01:00
|
|
|
int iso_ifs_sections_cmp(IsoFileSource *s1, IsoFileSource *s2, int *cmp_ret,
|
|
|
|
int flag);
|
2009-05-24 18:22:02 +02:00
|
|
|
|
2011-01-25 10:50:37 +01:00
|
|
|
|
|
|
|
/* Create an independent copy of an ifs_class IsoFileSource.
|
|
|
|
*/
|
|
|
|
int iso_ifs_source_clone(IsoFileSource *old_source, IsoFileSource **new_source,
|
|
|
|
int flag);
|
|
|
|
|
|
|
|
|
2022-05-30 18:38:54 +02:00
|
|
|
off_t iso_file_source_lseek_capacity(IsoFileSource *src, off_t wanted_size,
|
|
|
|
int flag);
|
|
|
|
|
2022-04-26 12:12:15 +02:00
|
|
|
/* Determine whether src is random-access readable and return its capacity.
|
|
|
|
*/
|
2022-05-30 18:38:54 +02:00
|
|
|
off_t iso_file_source_determine_capacity(IsoFileSource *src, off_t wanted_size,
|
|
|
|
int flag);
|
|
|
|
|
2022-04-26 12:12:15 +02:00
|
|
|
|
|
|
|
|
2007-11-24 16:58:36 +01:00
|
|
|
#endif /*LIBISO_FSOURCE_H_*/
|