X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fzipreader.h;fp=src%2Fzipreader.h;h=c510b7f55132e8c5a25b25fcd17dd96e89631587;hb=64f0d552c4c5235f19988138edeb3048ac7ec151;hp=0000000000000000000000000000000000000000;hpb=b92d758bf682d9ec98d1a92e07eb616829be3917;p=jspeed diff --git a/src/zipreader.h b/src/zipreader.h new file mode 100644 index 0000000..c510b7f --- /dev/null +++ b/src/zipreader.h @@ -0,0 +1,44 @@ +/* + * This file is part of jSpeed. + * + * jSpeed 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 3 of the License, or + * (at your option) any later version. + * + * jSpeed 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 jSpeed. If not, see . + * + */ + +#ifndef ZIPREADER_H +#define ZIPREADER_H + +#include "reader.h" +#include "zip.h" + +class QString; +class QByteArray; + +class ZipReader : public Reader +{ +public: + ZipReader(QString const& filename); + bool open(); + bool readFile(QString const& filename, QByteArray& data); + bool fileExists(QString const& filename) const; + bool close(); + QString const& errorString() const; + +private: + QString filename_; + zip* zip_; + QString error_; +}; + +#endif