~ubuntu-branches/ubuntu/trusty/pgagent/trusty

« back to all changes in this revision

Viewing changes to include/job.h

  • Committer: Package Import Robot
  • Author(s): Gerfried Fuchs
  • Date: 2012-04-30 20:04:50 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120430200450-y05reghn6ces1kd8
Tags: 3.2.1-1
* New upstream release.
* Relicense packaging under WTFPLv2.
* Add recommended targets build-{arch,indep} to debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgAgent - PostgreSQL Tools
4
 
// $Id: job.h 8019 2009-09-01 11:59:21Z dpage $
5
 
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
6
 
// This software is released under the BSD Licence
 
4
//
 
5
// Copyright (C) 2002 - 2012, The pgAdmin Development Team
 
6
// This software is released under the PostgreSQL Licence
7
7
//
8
8
// job.h - agent job
9
9
//
19
19
class Job
20
20
{
21
21
public:
22
 
    Job(DBconn *conn, const wxString &jid);
23
 
    ~Job();
 
22
        Job(DBconn *conn, const wxString &jid);
 
23
        ~Job();
24
24
 
25
 
    int Execute();
26
 
    bool Runnable() { return status == wxT("r"); }
 
25
        int Execute();
 
26
        bool Runnable()
 
27
        {
 
28
                return status == wxT("r");
 
29
        }
27
30
 
28
31
protected:
29
 
    DBconn *threadConn;
30
 
    wxString jobid, logid;
31
 
    wxString status;
 
32
        DBconn *threadConn;
 
33
        wxString jobid, logid;
 
34
        wxString status;
32
35
};
33
36
 
34
37
 
35
38
class JobThread : public wxThread
36
39
{
37
40
public:
38
 
    JobThread(const wxString &jid);
39
 
    ~JobThread();
40
 
        bool Runnable() { return runnable; }
 
41
        JobThread(const wxString &jid);
 
42
        ~JobThread();
 
43
        bool Runnable()
 
44
        {
 
45
                return runnable;
 
46
        }
41
47
 
42
48
        virtual void *Entry();
43
49