OSDN Git Service

Updated the QAAC add-in for LameXP to QAAC v2.33 (2014-01-14), compiled with MSVC...
[lamexp/LameXP.git] / src / Thread_DiskObserver.h
index 05c71c8..f255805 100644 (file)
@@ -1,11 +1,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
+// (at your option) any later version, but always including the *additional*
+// restrictions defined in the "License.txt" file.
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,6 +23,7 @@
 #pragma once
 
 #include <QThread>
+#include <QSemaphore>
 
 class DiskObserverThread: public QThread
 {
@@ -31,7 +33,7 @@ public:
        DiskObserverThread(const QString &path);
        ~DiskObserverThread(void);
 
-       void stop(void) { m_terminated = true; }
+       void stop(void) { m_semaphore.release(); }
        
 protected:
        void run(void);
@@ -40,9 +42,10 @@ protected:
        static QString makeRootDir(const QString &baseDir);
 
 signals:
-       void messageLogged(const QString &text, bool isWarning);
+       void messageLogged(const QString &text, int type);
+       void freeSpaceChanged(const quint64);
 
 private:
-       volatile bool m_terminated;
+       QSemaphore m_semaphore;
        const QString m_path;
 };