line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Win32::Modems; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
81123235
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
83
|
|
4
|
1
|
|
|
1
|
|
55
|
use warnings; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
141
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1085
|
use FusionInventory::Agent::Tools::Win32; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
287
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub isEnabled { |
9
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
10
|
0
|
0
|
|
|
|
|
return 0 if $params{no_category}->{modem}; |
11
|
0
|
|
|
|
|
|
return 1; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub doInventory { |
15
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
foreach my $object (getWMIObjects( |
20
|
|
|
|
|
|
|
class => 'Win32_POTSModem', |
21
|
|
|
|
|
|
|
properties => [ qw/Name DeviceType Model Description/ ] |
22
|
|
|
|
|
|
|
)) { |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$inventory->addEntry( |
25
|
|
|
|
|
|
|
section => 'MODEMS', |
26
|
|
|
|
|
|
|
entry => { |
27
|
|
|
|
|
|
|
NAME => $object->{Name}, |
28
|
|
|
|
|
|
|
TYPE => $object->{DeviceType}, |
29
|
|
|
|
|
|
|
MODEL => $object->{Model}, |
30
|
|
|
|
|
|
|
DESCRIPTION => $object->{Description}, |
31
|
|
|
|
|
|
|
} |
32
|
0
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |