Files
nzbget/daemon/postprocess/Cleanup.h
Andrey Prygunkov 9e2d8544da #126: full use of class BString
1) replaced characters arrays with class BString through the whole
program. The string formatting code has become much cleaner.
2) class Util returns error message via CString instead of character
buffers.
3) few more places to use CString.
2015-12-19 18:43:52 +01:00

70 lines
1.7 KiB
C++

/*
* This file is part of nzbget
*
* Copyright (C) 2013-2015 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Revision$
* $Date$
*
*/
#ifndef CLEANUP_H
#define CLEANUP_H
#include "NString.h"
#include "Log.h"
#include "Thread.h"
#include "DownloadInfo.h"
#include "Script.h"
class MoveController : public Thread, public ScriptController
{
private:
PostInfo* m_postInfo;
CString m_interDir;
CString m_destDir;
bool MoveFiles();
protected:
virtual void AddMessage(Message::EKind kind, const char* text);
public:
virtual void Run();
static void StartJob(PostInfo* postInfo);
};
class CleanupController : public Thread, public ScriptController
{
private:
PostInfo* m_postInfo;
CString m_destDir;
CString m_finalDir;
bool Cleanup(const char* destDir, bool *deleted);
protected:
virtual void AddMessage(Message::EKind kind, const char* text);
public:
virtual void Run();
static void StartJob(PostInfo* postInfo);
};
#endif