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
18namespace Poco {
19
20
21TaskNotification::TaskNotification(Task* pTask):
22 _pTask(pTask)
23{
24 if (_pTask) _pTask->duplicate();
25}
26
27
28TaskNotification::~TaskNotification()
29{
30 if (_pTask) _pTask->release();
31}
32
33
34TaskStartedNotification::TaskStartedNotification(Task* pTask):
35 TaskNotification(pTask)
36{
37}
38
39
40TaskStartedNotification::~TaskStartedNotification()
41{
42}
43
44
45TaskCancelledNotification::TaskCancelledNotification(Task* pTask):
46 TaskNotification(pTask)
47{
48}
49
50
51TaskCancelledNotification::~TaskCancelledNotification()
52{
53}
54
55
56TaskFinishedNotification::TaskFinishedNotification(Task* pTask):
57 TaskNotification(pTask)
58{
59}
60
61
62TaskFinishedNotification::~TaskFinishedNotification()
63{
64}
65
66
67TaskFailedNotification::TaskFailedNotification(Task* pTask, const Exception& exc):
68 TaskNotification(pTask),
69 _pException(exc.clone())
70{
71}
72
73
74TaskFailedNotification::~TaskFailedNotification()
75{
76 delete _pException;
77}
78
79
80TaskProgressNotification::TaskProgressNotification(Task* pTask, float taskProgress):
81 TaskNotification(pTask),
82 _progress(taskProgress)
83{
84}
85
86
87TaskProgressNotification::~TaskProgressNotification()
88{
89}
90
91
92} // namespace Poco
93