1
2use strict;
3use Class::Generate qw(class);
4
5class 'Nmap::Scanner::TaskProgress' => {
6    qw(task        Nmap::Scanner::Task
7       time        $
8       percent     $
9       remaining   $
10       etc         $),
11    '&as_xml' => q!
12
13    my $name = $task->name();
14
15    return qq(<taskprogress task="$name" time="$time"/>) .
16           qq(percent="$percent" remaining="$remaining" etc="$etc"/>\n);
17
18    !
19};
20
21=pod
22
23=head1 DESCRIPTION
24
25This class represents Nmap live task status messages; note that the
26included Nmap::Scanner::Task reference will not have an end_time()
27attribute as the task has not ended yet ;).
28
29=head1 PROPERTIES
30
31=head2 task()
32
33Reference to Nmap::Scanner::Task instance
34
35=head2 time()
36
37Time this progress event occurred.
38
39=head2 percent()
40
41Percent of this task done.
42
43=head2 remaining()
44
45Percent of this task left to do.
46
47=head2 etc()
48
49Estimated time to complete for this task.
50
51=cut
52
531;
54