annotate ui/taskscheduler.h @ 867:ecdc279dea15

Add newline add end of file after the text signature
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 05 Aug 2014 17:44:00 +0200
parents 8de162b91a22
children 78798d3af8f0
rev   line source
827
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
3 *
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
6 * See LICENSE.txt for details.
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
7 */
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
8 #ifndef TASKSCHEDULER_H
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
9 #define TASKSCHEDULER_H
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
10
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 /**
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12 * @file Interface to the Task Scheduler API
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13 * @brief Provides a Qt / C++ API to work with the windows task scheduler
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 */
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
15
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
16 #include <QString>
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17 #include <QTime>
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 #ifndef INITGUID
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
19 #define INITGUID
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
20 #include <mstask.h>
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
21 #undef INITGUID
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
22 #endif
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24 //struct ITaskScheduler;
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 class TaskScheduler
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27 {
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 public:
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 /** @brief Initializes the COM objects */
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30 TaskScheduler();
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 /**@brief Uninitializes the COM objects */
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 ~TaskScheduler();
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34 /** @brief create a task that is executed daily if the user is logged in.
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 *
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
36 * @param[in] executable Absolute path to the executable to run.
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
37 * @param[in] args the arguements to pass to the executable.
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
38 * @param[in] startTime the preferred time to start the task.
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
39 *
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
40 * @returns True on success, false on error */
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
41 bool createDailyTask(const QString &executable, const QString &args, const QTime &startTime);
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
42
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
43 /** @brief check if the Initialization was successful */
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
44 bool isInitialized() {return mInitialized;}
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
45
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
46 private:
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
47 bool mInitialized;
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
48 ITaskScheduler *mTaskScheduler;
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
49 };
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
50
8de162b91a22 (Issue49) Create a Scheduled daily task to run trustbridge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
51 #endif // TASKSCHEDULER_H

http://wald.intevation.org/projects/trustbridge/