Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQUnpacker.h 00003 ------------------- 00004 begin : 08/03/2011 00005 copyright : (C) 2003-2011 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef AQUNPACKER_H_ 00020 #define AQUNPACKER_H_ 00021 00022 #include <qstringlist.h> 00023 00024 #define AQPACKAGER_VERSION "AbanQ Packager 2.4.1" 00025 00026 #define AQ_STRERROR(V) \ 00027 errMsgs_ << QString().sprintf("'%s': %s", V.latin1(), strerror(errno)) 00028 00029 class QFile; 00030 00031 class AQUnpacker 00032 { 00033 public: 00034 AQUnpacker(const QString &input); 00035 ~AQUnpacker(); 00036 00037 QString getText() const; 00038 QByteArray getBinary() const; 00039 00040 QStringList errorMessages() const; 00041 00042 private: 00043 QFile *file_; 00044 QDataStream *stream_; 00045 QStringList errMsgs_; 00046 }; 00047 00048 #endif /* AQUNPACKER_H_ */