1/*
2 * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef JOB_STATE_LISTENER_H
6#define JOB_STATE_LISTENER_H
7
8
9#include <Job.h>
10
11
12class JobStateListener : public BSupportKit::BJobStateListener {
13public:
14			enum {
15				EXIT_ON_ERROR	= 0x01,
16				EXIT_ON_ABORT	= 0x02,
17			};
18
19
20public:
21								JobStateListener(
22									uint32 flags = EXIT_ON_ERROR
23										| EXIT_ON_ABORT);
24
25	virtual	void				JobStarted(BSupportKit::BJob* job);
26	virtual	void				JobSucceeded(BSupportKit::BJob* job);
27	virtual	void				JobFailed(BSupportKit::BJob* job);
28	virtual	void				JobAborted(BSupportKit::BJob* job);
29
30private:
31			uint32				fFlags;
32};
33
34
35#endif	// JOB_STATE_LISTENER_H
36