/* Copyright 2008 David Moews (dmoews@fastmail.fm)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
#ifndef IO_INCL

#define IO_INCL

#include <iosfwd>

#include "Types.h"

// Returns succ/failure.
bool file_size(std::istream &i, u32 block_size, u32 *p_size);  
           // Size is returned in blocks

// Read only first 2048 characters of sector 
bool read_sector(std::istream &i, u32 sector_number, u32 sector_size, 
                 char p_cs[2048]);

bool read_blocks(std::istream &i, u32 block_number, u32 number_of_blocks,
                 u32 block_size, char *p_cs);

#endif
