2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2017 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
25 #include "tray_conf.h"
29 class RunJob: public QDialog
46 void levelChanged(int);
47 void jobStarted(task *);
49 void fill_defaults(task *);
50 void tabChange(int idx);
52 /* close the window properly */
53 void close_cb(task *t);
57 /* Object that can scan a directory to find jobs */
58 class TSched: public QObject
63 bool read_command_file(const char *file, alist *lst, btime_t mtime);
69 void init(const char *cmd_dir);
70 bool scan_for_commands(alist *lst);
72 timer = startTimer(60000); // 1-minute timer
81 void jobStarted(task *t);
83 void timerEvent(QTimerEvent *event);
88 /* Job found in the command directory */
89 class TSchedJob: public QObject
94 char *component; // Name of the daemon
95 char *command; // job command
96 btime_t create_date; // When the command file was created
97 TSchedJob() : component(NULL), command(NULL) {};
99 TSchedJob(const char *comp, const char *cmd, btime_t cd) {
100 component = bstrdup(comp);
101 command = bstrdup(cmd);
110 bfree_and_null(component);
113 bfree_and_null(command);