Files
nzbget/daemon/main/DiskService.h
Andrey Prygunkov bdc7ba38db #351: sleep longer in disk service
If there are no active downloads the disk service can now sleep for 10
seconds instead of 1.
2019-01-26 18:17:36 +01:00

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