Initial implementation for UnzipHelper::extractAll(...)
authorMikko Keinänen <mikko.keinanen@gmail.com>
Sat, 16 Oct 2010 15:31:52 +0000 (18:31 +0300)
committerMikko Keinänen <mikko.keinanen@gmail.com>
Sat, 16 Oct 2010 15:31:52 +0000 (18:31 +0300)
src/utils/emuhelper.cpp
src/utils/unziphelper.cpp
src/utils/unziphelper.h

index 44a99d9..a17f1e3 100644 (file)
@@ -45,6 +45,8 @@ void EmuHelper::launch(const Executable * ex, const MediaImageContainer * mic)
     //int err = unz.extractAll("/tmp/"); // TODO: this must be set dynamically
     //qDebug() << "extractAll to " << fp << " : " << err;
 
+    unzipHelper->extractAll(fp, "/tmp/");
+
     // TODO: launch the 1st media image in the media image list of ex
     // or if emulator command options has a place for more than one
     // media image assign the media images in the list order
index 311d265..7d387cf 100644 (file)
@@ -139,3 +139,8 @@ QList<MediaImage*> UnzipHelper::listContents(const QString filePath, const FileP
 
 }
 
+bool UnzipHelper::extractAll(QString filePath, QString targetPath)
+{
+    // unzip filepath -d targetpath
+    return false;
+}
index e55b317..50fc563 100644 (file)
@@ -30,6 +30,7 @@ class UnzipHelper : public ProcessHelper
 public:
     UnzipHelper(QObject *parent = 0);
     QList<MediaImage*> listContents(const QString filePath, const FilePathObject *fp);
+    bool extractAll(QString filePath, QString targetPath);
 private:
     static const QString UNZIP_COMMAND;
     static const QString UNZIP_LIST_ARGS;