line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Generic::PCI::Sounds; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
148387092
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
117
|
|
4
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
181
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
908
|
use FusionInventory::Agent::Tools; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
409
|
|
7
|
2
|
|
|
2
|
|
1278
|
use FusionInventory::Agent::Tools::Generic; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
621
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub isEnabled { |
10
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
11
|
0
|
0
|
|
|
|
0
|
return 0 if $params{no_category}->{sound}; |
12
|
0
|
|
|
|
|
0
|
return 1; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub doInventory { |
16
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
0
|
my $inventory = $params{inventory}; |
19
|
0
|
|
|
|
|
0
|
my $logger = $params{logger}; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
0
|
foreach my $sound (_getSounds(logger => $logger)) { |
22
|
0
|
|
|
|
|
0
|
$inventory->addEntry( |
23
|
|
|
|
|
|
|
section => 'SOUNDS', |
24
|
|
|
|
|
|
|
entry => $sound |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _getSounds { |
30
|
1
|
|
|
1
|
|
11
|
my @sounds; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
27
|
foreach my $device (getPCIDevices(@_)) { |
33
|
24
|
100
|
|
|
|
140
|
next unless $device->{NAME} =~ /audio/i; |
34
|
|
|
|
|
|
|
push @sounds, { |
35
|
|
|
|
|
|
|
NAME => $device->{NAME}, |
36
|
|
|
|
|
|
|
MANUFACTURER => $device->{MANUFACTURER}, |
37
|
1
|
|
33
|
|
|
9
|
DESCRIPTION => $device->{REV} && "rev $device->{REV}", |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
|
|
5
|
return @sounds; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |