mirror of
https://github.com/nzbget/nzbget.git
synced 2026-01-14 00:48:07 -05:00
If there are no active downloads the disk service can now sleep for 10 seconds instead of 1.
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/*
|
|
* This file is part of nzbget. See <http://nzbget.net>.
|
|
*
|
|
* Copyright (C) 2015-2019 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
|
*
|
|
* 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.
|
|
*
|
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
|
|
#ifndef DISKSERVICE_H
|
|
#define DISKSERVICE_H
|
|
|
|
#include "Service.h"
|
|
#include "Observer.h"
|
|
|
|
class DiskService : public Service, public Observer
|
|
{
|
|
public:
|
|
DiskService();
|
|
|
|
protected:
|
|
virtual int ServiceInterval();
|
|
virtual void ServiceWork();
|
|
virtual void Update(Subject* caller, void* aspect);
|
|
|
|
private:
|
|
bool m_waitingRequiredDir = true;
|
|
bool m_waitingReported = false;
|
|
|
|
void CheckDiskSpace();
|
|
void CheckRequiredDir();
|
|
};
|
|
|
|
#endif
|