X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Futils%2Ffileutil.h;h=a51d8790e1dc23d5cc5661df54354d7a9f47081e;hb=dadb794e9802c8f34b894fae4fc97e17cb9dee95;hp=3362b5359b9ca19077ffaabd6f00988b24ea768a;hpb=33e33e2b404f23424b1e284879ca6325ce1f83a4;p=emufront
diff --git a/src/utils/fileutil.h b/src/utils/fileutil.h
index 3362b53..a51d879 100644
--- a/src/utils/fileutil.h
+++ b/src/utils/fileutil.h
@@ -1,22 +1,58 @@
+// EmuFront
+// Copyright 2010 Mikko Keinänen
+//
+// This file is part of EmuFront.
+//
+//
+// EmuFront is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation and appearing in the file gpl.txt included in the
+// packaging of this file.
+//
+// EmuFront is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with EmuFront. If not, see .
+
#ifndef FILEUTIL_H
#define FILEUTIL_H
#include
-#include "../dataobjects/emufrontfileobject.h"
-#include "../dataobjects/filepathobject.h"
+#include "emufrontfileobject.h"
+#include "filepathobject.h"
+
+#define READ_BUFFER (256*1024)
class QStringList;
+class MediaImageContainer;
+class MediaImage;
+class DbMediaImageContainer;
+class UnzipHelper;
+class QProgressDialog;
-class FileUtil : QObject
+class FileUtil : public QObject
{
-
-
+ Q_OBJECT
public:
FileUtil(QObject *parent);
+ ~FileUtil();
+ int scanFilePath(FilePathObject *fpo, const QStringList filters, DbMediaImageContainer *mic, QProgressDialog *);
+signals:
+ void dbUpdateInProgress();
+ void dbUpdateFinished();
- QList scanFilePath(const FilePathObject *fpo, const QStringList filters);
private:
- QList listContents(const QString filePath, const FilePathObject *fp);
+ char *buf;
+ quint32 readCrc32(QString filePath);
+ bool isSupportedFile(const QString filename, const QStringList supportedFileExtensions);
+ static const int MIC_BUFFER_SIZE = 50;
+ UnzipHelper *unzipHelper;
+ void showDbUpdating(QProgressDialog*);
+ void hideDbUpdating(QProgressDialog*);
+
};
#endif // FILEUTIL_H