File indexing completed on 2024-04-28 15:38:20

0001 /***************************************************************************
0002  *   Copyright (C) 2008 by Jakub Stachowski <qbast@go2.pl>                 *
0003  *                                                                         *
0004  *   This program is free software; you can redistribute it and/or modify  *
0005  *   it under the terms of the GNU General Public License as published by  *
0006  *   the Free Software Foundation; either version 2 of the License, or     *
0007  *   (at your option) any later version.                                   *
0008  ***************************************************************************/
0009 
0010 #include "qfilestream.h"
0011 
0012 using namespace Mobipocket;
0013 
0014 QFileStream::QFileStream(const QString& name)
0015  : d(new QFile(name))
0016 {
0017     d->open(QIODevice::ReadOnly);
0018 }
0019 
0020 QFileStream::~QFileStream()
0021 {
0022     delete d;
0023 }
0024 
0025 int QFileStream::read(char* buf, int size)
0026 {
0027     return d->read(buf,size);
0028 }
0029 
0030 bool QFileStream::seek(int pos)
0031 {
0032     return d->seek(pos);
0033 }