summaryrefslogtreecommitdiff
path: root/lib/qt-tar-xz/QTarDecode.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2017-11-24 23:24:09 +0000
committerThomas Preud'homme <robotux@celest.fr>2017-11-24 23:24:09 +0000
commitb3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (patch)
tree8fce8a51adfb245db8ab2a76831661780c0c713e /lib/qt-tar-xz/QTarDecode.h
parente297dbd8052ef4e66f069e2dd1865ae7fa8af28e (diff)
New upstream version 1.2.3.6
Diffstat (limited to 'lib/qt-tar-xz/QTarDecode.h')
-rw-r--r--lib/qt-tar-xz/QTarDecode.h45
1 files changed, 22 insertions, 23 deletions
diff --git a/lib/qt-tar-xz/QTarDecode.h b/lib/qt-tar-xz/QTarDecode.h
index 6e8e5e5..b37dc0e 100644
--- a/lib/qt-tar-xz/QTarDecode.h
+++ b/lib/qt-tar-xz/QTarDecode.h
@@ -1,37 +1,36 @@
/** \file QTarDecode.h
\brief To read a tar data block
\author alpha_one_x86
-\version 0.3
-\date 2010
\licence GPL3, see the file COPYING */
#ifndef QTARDECODE_H
#define QTARDECODE_H
-#include <QObject>
-#include <QList>
-#include <QByteArray>
-#include <QString>
-#include <QStringList>
+#include <vector>
+#include <string>
+#include <string>
/// \brief read the raw tar data, and organize it into data structure
-class QTarDecode : public QObject
+class QTarDecode
{
- public:
- QTarDecode();
- /// \brief to get the file list
- QStringList getFileList();
- /// \brief to get the data of the file
- QList<QByteArray> getDataList();
- /// \brief to pass the raw tar data
- bool decodeData(QByteArray data);
- /// \brief to return error string
- QString errorString();
- private:
- QStringList fileList;
- QList<QByteArray> dataList;
- QString error;
- void setErrorString(QString error);
+ public:
+ QTarDecode();
+ /// \brief to get the file list
+ std::vector<std::string> getFileList();
+ /// \brief to get the data of the file
+ std::vector<std::vector<char> > getDataList();
+ /// \brief to pass the raw tar data
+ bool decodeData(const std::vector<char> &data);
+ /// \brief to return error string
+ std::string errorString();
+ uint64_t stringtouint64(const std::string &string,bool *ok);
+ uint64_t octaltouint64(const std::string &string,bool *ok);
+ private:
+ std::vector<std::string> fileList;
+ std::vector<std::vector<char> > dataList;
+ std::string error;
+ void setErrorString(const std::string &error);
+ bool stringStartWith(std::string const &fullString, std::string const &starting);
};
#endif // QTARDECODE_H