-
Notifications
You must be signed in to change notification settings - Fork 42
/
job.h
57 lines (44 loc) · 835 Bytes
/
job.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//////////////////////////////////////////////////////////////////////////
//
// pgAgent - PostgreSQL Tools
//
// Copyright (C) 2002 - 2014, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// job.h - agent job
//
//////////////////////////////////////////////////////////////////////////
#ifndef JOB_H
#define JOB_H
#include <wx/wx.h>
class Job
{
public:
Job(DBconn *conn, const wxString &jid);
~Job();
int Execute();
bool Runnable()
{
return status == wxT("r");
}
protected:
DBconn *threadConn;
wxString jobid, logid;
wxString status;
};
class JobThread : public wxThread
{
public:
JobThread(const wxString &jid);
~JobThread();
bool Runnable()
{
return runnable;
}
virtual void *Entry();
private:
wxString jobid;
bool runnable;
Job *job;
};
#endif // JOB_H