line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::MacOS::Sound; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
68584122
|
use strict; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
78
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
481
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
134
|
|
7
|
1
|
|
|
1
|
|
380
|
use FusionInventory::Agent::Tools::MacOS; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
161
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub isEnabled { |
10
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
11
|
0
|
0
|
|
|
|
|
return 0 if $params{no_category}->{sound}; |
12
|
0
|
|
|
|
|
|
return canRun('/usr/sbin/system_profiler'); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub doInventory { |
16
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
19
|
0
|
|
|
|
|
|
my $logger = $params{logger}; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $infos = getSystemProfilerInfos(logger => $logger); |
22
|
0
|
|
|
|
|
|
my $info = $infos->{'Audio (Built In)'}; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
foreach my $sound (keys %$info){ |
25
|
0
|
|
|
|
|
|
$inventory->addEntry( |
26
|
|
|
|
|
|
|
section => 'SOUNDS', |
27
|
|
|
|
|
|
|
entry => { |
28
|
|
|
|
|
|
|
NAME => $sound, |
29
|
|
|
|
|
|
|
MANUFACTURER => $sound, |
30
|
|
|
|
|
|
|
DESCRIPTION => $sound, |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |