line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::MacOS::Sound; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
79616579
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
47
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
60
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
368
|
use FusionInventory::Agent::Tools; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
126
|
|
7
|
1
|
|
|
1
|
|
350
|
use FusionInventory::Agent::Tools::MacOS; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
157
|
|
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(type => 'SPAudioDataType', 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; |