summaryrefslogtreecommitdiff
path: root/include/LuaTask.h
blob: eded9ace4b36e4949ff54e97fdaf261855de6137 (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
31
32
33
34
#ifndef __LUATASK_H__
#define __LUATASK_H__

#include <hashtab.h>

#include <Task.h>
#include <Buffer.h>
#include <BLua.h>
#include <InPipe.h>

class LuaTask : public Task {
  public:
      LuaTask(Lua *, const String &);
      LuaTask(Lua *, int) throw (GeneralException);
      virtual ~LuaTask();
    virtual String GetName();
  protected:
    virtual int Do() throw (GeneralException);
  private:
    LuaTask * gettop();
    void settop(LuaTask *);
    Lua * L;
    String cmd;
    int nargs, stacktop, r;
    Task * c;
    Buffer * b;
    InPipe * p;

    String task;

    static htab * h;
};

#endif