1 | // |
---|---|
2 | // TaskNotification.cpp |
3 | // |
4 | // Library: Foundation |
5 | // Package: Tasks |
6 | // Module: Tasks |
7 | // |
8 | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. |
9 | // and Contributors. |
10 | // |
11 | // SPDX-License-Identifier: BSL-1.0 |
12 | // |
13 | |
14 | |
15 | #include "Poco/TaskNotification.h" |
16 | |
17 | |
18 | namespace Poco { |
19 | |
20 | |
21 | TaskNotification::TaskNotification(Task* pTask): |
22 | _pTask(pTask) |
23 | { |
24 | if (_pTask) _pTask->duplicate(); |
25 | } |
26 | |
27 | |
28 | TaskNotification::~TaskNotification() |
29 | { |
30 | if (_pTask) _pTask->release(); |
31 | } |
32 | |
33 | |
34 | TaskStartedNotification::TaskStartedNotification(Task* pTask): |
35 | TaskNotification(pTask) |
36 | { |
37 | } |
38 | |
39 | |
40 | TaskStartedNotification::~TaskStartedNotification() |
41 | { |
42 | } |
43 | |
44 | |
45 | TaskCancelledNotification::TaskCancelledNotification(Task* pTask): |
46 | TaskNotification(pTask) |
47 | { |
48 | } |
49 | |
50 | |
51 | TaskCancelledNotification::~TaskCancelledNotification() |
52 | { |
53 | } |
54 | |
55 | |
56 | TaskFinishedNotification::TaskFinishedNotification(Task* pTask): |
57 | TaskNotification(pTask) |
58 | { |
59 | } |
60 | |
61 | |
62 | TaskFinishedNotification::~TaskFinishedNotification() |
63 | { |
64 | } |
65 | |
66 | |
67 | TaskFailedNotification::TaskFailedNotification(Task* pTask, const Exception& exc): |
68 | TaskNotification(pTask), |
69 | _pException(exc.clone()) |
70 | { |
71 | } |
72 | |
73 | |
74 | TaskFailedNotification::~TaskFailedNotification() |
75 | { |
76 | delete _pException; |
77 | } |
78 | |
79 | |
80 | TaskProgressNotification::TaskProgressNotification(Task* pTask, float taskProgress): |
81 | TaskNotification(pTask), |
82 | _progress(taskProgress) |
83 | { |
84 | } |
85 | |
86 | |
87 | TaskProgressNotification::~TaskProgressNotification() |
88 | { |
89 | } |
90 | |
91 | |
92 | } // namespace Poco |
93 |