summaryrefslogtreecommitdiff
path: root/include/Task.h
blob: c67a59c6e7ea021b86a26cdb91f725b8dcbeae6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __TASK_H__
#define __TASK_H__
#ifdef __cplusplus

#include "Exceptions.h"

#define TASK_ON_HOLD 	1
#define TASK_DONE 	2
#define TASK_WAITING_HANDLE	4
#define TASK_WAITING_TIMEOUT	8
#define TASK_WAITING_TASK	16

class Task : public Base {
  public:
      Task();
      virtual ~Task();
    virtual String GetName();
    int Run();
    int GetState();
  protected:
    virtual int Do();
    
  private:
    int state;
};

#else
#error This only works with a C++ compiler
#endif
#endif