| 1 | package Udev::FFI::Enumerate; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use Udev::FFI::Functions qw(:all); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 3 | ▶ | use Udev::FFI::Helper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | sub new { | ||||||||||
| 12 | 0 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 13 | |||||||||||
| 14 | 0 | my $self = { | |||||||||
| 15 | _enumerate => shift, | ||||||||||
| 16 | _udev => shift | ||||||||||
| 17 | }; | ||||||||||
| 18 | |||||||||||
| 19 | 0 | bless $self, $class; | |||||||||
| 20 | |||||||||||
| 21 | 0 | return $self; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | sub get_udev { | ||||||||||
| 27 | 0 | ▶ | return $_[0]->{_udev}; | ||||||||
|
Subroutine
get_udev: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | sub add_match_subsystem { | ||||||||||
| 33 | # self, subsystem | ||||||||||
| 34 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_subsystem($_[0]->{_enumerate}, $_[1]))) { | ||||||||
|
Subroutine
add_match_subsystem: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 35 | 0 | return 1; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 0 | $! = -$!; | |||||||||
| 39 | 0 | return 0; | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | |||||||||||
| 43 | sub add_nomatch_subsystem { | ||||||||||
| 44 | # self, subsystem | ||||||||||
| 45 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_nomatch_subsystem($_[0]->{_enumerate}, $_[1]))) { | ||||||||
|
Subroutine
add_nomatch_subsystem: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 46 | 0 | return 1; | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 0 | $! = -$!; | |||||||||
| 50 | 0 | return 0; | |||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | |||||||||||
| 54 | sub add_match_sysattr { | ||||||||||
| 55 | # self, sysattr, value | ||||||||||
| 56 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_sysattr($_[0]->{_enumerate}, $_[1], $_[2]))) { | ||||||||
|
Subroutine
add_match_sysattr: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 57 | 0 | return 1; | |||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | 0 | $! = -$!; | |||||||||
| 61 | 0 | return 0; | |||||||||
| 62 | } | ||||||||||
| 63 | |||||||||||
| 64 | |||||||||||
| 65 | sub add_nomatch_sysattr { | ||||||||||
| 66 | # self, sysattr, value | ||||||||||
| 67 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_nomatch_sysattr($_[0]->{_enumerate}, $_[1], $_[2]))) { | ||||||||
|
Subroutine
add_nomatch_sysattr: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 68 | 0 | return 1; | |||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | 0 | $! = -$!; | |||||||||
| 72 | 0 | return 0; | |||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | |||||||||||
| 76 | sub add_match_property { | ||||||||||
| 77 | # self, property, value | ||||||||||
| 78 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_property($_[0]->{_enumerate}, $_[1], $_[2]))) { | ||||||||
|
Subroutine
add_match_property: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 79 | 0 | return 1; | |||||||||
| 80 | } | ||||||||||
| 81 | |||||||||||
| 82 | 0 | $! = -$!; | |||||||||
| 83 | 0 | return 0; | |||||||||
| 84 | } | ||||||||||
| 85 | |||||||||||
| 86 | |||||||||||
| 87 | sub add_match_sysname { | ||||||||||
| 88 | # self, sysname | ||||||||||
| 89 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_sysname($_[0]->{_enumerate}, $_[1]))) { | ||||||||
|
Subroutine
add_match_sysname: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 90 | 0 | return 1; | |||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | 0 | $! = -$!; | |||||||||
| 94 | 0 | return 0; | |||||||||
| 95 | } | ||||||||||
| 96 | |||||||||||
| 97 | |||||||||||
| 98 | sub add_match_tag { | ||||||||||
| 99 | # self, tag | ||||||||||
| 100 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_tag($_[0]->{_enumerate}, $_[1]))) { | ||||||||
|
Subroutine
add_match_tag: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 101 | 0 | return 1; | |||||||||
| 102 | } | ||||||||||
| 103 | |||||||||||
| 104 | 0 | $! = -$!; | |||||||||
| 105 | 0 | return 0; | |||||||||
| 106 | } | ||||||||||
| 107 | |||||||||||
| 108 | |||||||||||
| 109 | sub add_match_parent { | ||||||||||
| 110 | # self, parent | ||||||||||
| 111 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_parent($_[0]->{_enumerate}, $_[1]))) { | ||||||||
|
Subroutine
add_match_parent: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 112 | 0 | return 1; | |||||||||
| 113 | } | ||||||||||
| 114 | |||||||||||
| 115 | 0 | $! = -$!; | |||||||||
| 116 | 0 | return 0; | |||||||||
| 117 | } | ||||||||||
| 118 | |||||||||||
| 119 | |||||||||||
| 120 | sub add_match_is_initialized { | ||||||||||
| 121 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_match_is_initialized($_[0]->{_enumerate}))) { | ||||||||
|
Subroutine
add_match_is_initialized: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 122 | 0 | return 1; | |||||||||
| 123 | } | ||||||||||
| 124 | |||||||||||
| 125 | 0 | $! = -$!; | |||||||||
| 126 | 0 | return 0; | |||||||||
| 127 | } | ||||||||||
| 128 | |||||||||||
| 129 | |||||||||||
| 130 | sub add_syspath { | ||||||||||
| 131 | # self, syspath | ||||||||||
| 132 | 0 | ▶ | if (0 == ($! = udev_enumerate_add_syspath($_[0]->{_enumerate}, $_[1]))) { | ||||||||
|
Subroutine
add_syspath: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 133 | 0 | return 1; | |||||||||
| 134 | } | ||||||||||
| 135 | |||||||||||
| 136 | 0 | $! = -$!; | |||||||||
| 137 | 0 | return 0; | |||||||||
| 138 | } | ||||||||||
| 139 | |||||||||||
| 140 | |||||||||||
| 141 | |||||||||||
| 142 | sub scan_devices { | ||||||||||
| 143 | 0 | ▶ | if (0 == ($! = udev_enumerate_scan_devices($_[0]->{_enumerate}))) { | ||||||||
|
Subroutine
scan_devices: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 144 | 0 | return 1; | |||||||||
| 145 | } | ||||||||||
| 146 | |||||||||||
| 147 | 0 | $! = -$!; | |||||||||
| 148 | 0 | return 0; | |||||||||
| 149 | } | ||||||||||
| 150 | |||||||||||
| 151 | |||||||||||
| 152 | sub scan_subsystems { | ||||||||||
| 153 | 0 | ▶ | if (0 == ($! = udev_enumerate_scan_subsystems($_[0]->{_enumerate}))) { | ||||||||
|
Subroutine
scan_subsystems: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 154 | 0 | return 1; | |||||||||
| 155 | } | ||||||||||
| 156 | |||||||||||
| 157 | 0 | $! = -$!; | |||||||||
| 158 | 0 | return 0; | |||||||||
| 159 | } | ||||||||||
| 160 | |||||||||||
| 161 | |||||||||||
| 162 | |||||||||||
| 163 | sub get_list_entries { | ||||||||||
| 164 | 0 | ▶ | return Udev::FFI::Helper::get_entries_all( udev_enumerate_get_list_entry( $_[0]->{_enumerate} ) ); | ||||||||
|
Subroutine
get_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 165 | } | ||||||||||
| 166 | |||||||||||
| 167 | |||||||||||
| 168 | |||||||||||
| 169 | sub DESTROY { | ||||||||||
| 170 | 0 | ▶ | udev_enumerate_unref( $_[0]->{_enumerate} ); | ||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=6.9
| |||||||||||
| 171 | } | ||||||||||
| 172 | |||||||||||
| 173 | |||||||||||
| 174 | |||||||||||
| 175 | 3 | 1; | |||||||||
| 176 | |||||||||||
| 177 | |||||||||||
| 178 | |||||||||||
| 179 | __END__ | ||||||||||