3
MediaTomb - http://www.mediatomb.cc/
5
executor.h - this file is part of MediaTomb.
7
Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
10
Copyright (C) 2006-2008 Gena Batyan <bgeradz@mediatomb.cc>,
11
Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
Leonhard Wimmer <leo@mediatomb.cc>
14
MediaTomb is free software; you can redistribute it and/or modify
15
it under the terms of the GNU General Public License version 2
16
as published by the Free Software Foundation.
18
MediaTomb is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
GNU General Public License for more details.
23
You should have received a copy of the GNU General Public License
24
version 2 along with MediaTomb; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
27
$Id: executor.h 1698 2008-02-23 20:48:30Z lww $
32
#ifndef __EXECUTOR_H__
33
#define __EXECUTOR_H__
35
#include "zmmf/zmmf.h"
37
/// \brief wraps something executable e.g. a thread or a process
38
class Executor : public zmm::Object
42
/// \brief destructor of the executor, has to make sure that the executor is dead
43
virtual ~Executor() {};
45
/// \brief method to check if the executor is still running
46
/// \return true if the executor is still running, false otherwise
47
virtual bool isAlive() = 0;
49
/// \brief kill the executor
50
/// \return true if the executor was killed successfully, false otherwise
51
virtual bool kill() = 0;
53
/// \brief get the status, exit or return code of the executor
54
/// \return the status, exit or return code. 0 for normal shutdown
55
virtual int getStatus() = 0;
58
#endif // __EXECUTOR_H__