diff options
Diffstat (limited to 'torrentparser.h')
-rw-r--r-- | torrentparser.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/torrentparser.h b/torrentparser.h new file mode 100644 index 0000000..02129fb --- /dev/null +++ b/torrentparser.h @@ -0,0 +1,31 @@ +#ifndef TORRENTPARSER_H +#define TORRENTPARSER_H + +#include <QObject> +#include <QString> +#include <QByteArray> +#include <QList> +#include <QVariant> +#include <QHash> + +class TorrentParser : public QObject { + Q_OBJECT + public: + TorrentParser(const QString file, QObject *parent = 0); + const QList<QVariant> parse(); + const QString lastError() const { return mLastError; } + + private: + const QVariant parseObject(); + const QByteArray parseString(); + int parseInt(); + const QList<QVariant> parseList(); + const QHash<QString,QVariant> parseDict(); + QString mFile; + QString mLastError; + QByteArray mData; + int mPos; + bool mOk; +}; + +#endif // TORRENTPARSER_H |