From 7a183cfa367db01413c001306741d06e1826d077 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 3 Aug 2012 05:16:52 +0200 Subject: might as well push all this. a massive amount of changes --- lyt/archivepackage.h | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'lyt/archivepackage.h') diff --git a/lyt/archivepackage.h b/lyt/archivepackage.h index e2d5f25..786d962 100644 --- a/lyt/archivepackage.h +++ b/lyt/archivepackage.h @@ -22,39 +22,29 @@ #include "wii/archiveu8.h" class LYTArchivePackage : public LYTPackageBase { + Q_OBJECT public: - LYTArchivePackage(); - LYTArchivePackage(QString filename); + LYTArchivePackage(QObject *parent = 0); + LYTArchivePackage(QString filename, QObject *parent = 0); ~LYTArchivePackage(); - QStringList listAnims() const; - QStringList listLayouts() const; - QStringList listTextures() const; - QStringList listFonts() const; - - QByteArray getAnim(QString name) const; - QByteArray getLayout(QString name) const; - QByteArray getTexture(QString name) const; - QByteArray getFont(QString name) const; - - bool writeAnim(QString name, QByteArray data); - bool writeLayout(QString name, QByteArray data); - bool writeTexture(QString name, QByteArray data); - bool writeFont(QString name, QByteArray data); + QStringList list(ItemType type) const; + QByteArray get(ItemType type, const QString &name) const; + bool write(ItemType type, const QString &name, const QByteArray &data); + bool rename(ItemType type, const QString &from, const QString &to); + bool remove(ItemType type, const QString &name); + bool needsExplicitSave() const { return true; } bool savePackage(); QString description() const; WiiArchiveU8 *archive() const; QString filename() const; + void setFilename(QString path); protected: - QStringList listSubDirIfExists(QString dirName) const; - QByteArray getFileFromSubDirIfExists(QString dirName, QString fileName) const; - bool writeFileToSubDir(QString dirName, QString fileName, QByteArray data); - WiiArchiveU8 *m_archive; QString m_filename; }; -- cgit v1.2.3