| 1 | package Udev::FFI::Device; | ||||||||||
| 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 | _device => 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 | sub get_devpath { | ||||||||||
| 32 | 0 | ▶ | return udev_device_get_devpath($_[0]->{_device}); | ||||||||
|
Subroutine
get_devpath: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | sub get_subsystem { | ||||||||||
| 36 | 0 | ▶ | return udev_device_get_subsystem($_[0]->{_device}); | ||||||||
|
Subroutine
get_subsystem: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | sub get_devtype { | ||||||||||
| 40 | 0 | ▶ | return udev_device_get_devtype($_[0]->{_device}); | ||||||||
|
Subroutine
get_devtype: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | sub get_syspath { | ||||||||||
| 44 | 0 | ▶ | return udev_device_get_syspath($_[0]->{_device}); | ||||||||
|
Subroutine
get_syspath: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 45 | } | ||||||||||
| 46 | |||||||||||
| 47 | sub get_sysname { | ||||||||||
| 48 | 0 | ▶ | return udev_device_get_sysname($_[0]->{_device}); | ||||||||
|
Subroutine
get_sysname: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | sub get_sysnum { | ||||||||||
| 52 | 0 | ▶ | return udev_device_get_sysnum($_[0]->{_device}); | ||||||||
|
Subroutine
get_sysnum: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | sub get_devnode { | ||||||||||
| 56 | 0 | ▶ | return udev_device_get_devnode($_[0]->{_device}); | ||||||||
|
Subroutine
get_devnode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 57 | } | ||||||||||
| 58 | |||||||||||
| 59 | sub get_is_initialized { | ||||||||||
| 60 | 0 | ▶ | return udev_device_get_is_initialized($_[0]->{_device}); | ||||||||
|
Subroutine
get_is_initialized: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 61 | } | ||||||||||
| 62 | |||||||||||
| 63 | sub get_property_value { | ||||||||||
| 64 | # self, key | ||||||||||
| 65 | 0 | ▶ | return udev_device_get_property_value($_[0]->{_device}, $_[1]); | ||||||||
|
Subroutine
get_property_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | sub get_driver { | ||||||||||
| 69 | 0 | ▶ | return udev_device_get_driver($_[0]->{_device}); | ||||||||
|
Subroutine
get_driver: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 70 | } | ||||||||||
| 71 | |||||||||||
| 72 | sub get_devnum { | ||||||||||
| 73 | 0 | ▶ | return udev_device_get_devnum($_[0]->{_device}); | ||||||||
|
Subroutine
get_devnum: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 74 | } | ||||||||||
| 75 | |||||||||||
| 76 | sub get_action { | ||||||||||
| 77 | 0 | ▶ | return udev_device_get_action($_[0]->{_device}); | ||||||||
|
Subroutine
get_action: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 78 | } | ||||||||||
| 79 | |||||||||||
| 80 | sub get_seqnum { | ||||||||||
| 81 | 0 | ▶ | return udev_device_get_seqnum($_[0]->{_device}); | ||||||||
|
Subroutine
get_seqnum: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 82 | } | ||||||||||
| 83 | |||||||||||
| 84 | sub get_usec_since_initialized { | ||||||||||
| 85 | 0 | ▶ | return udev_device_get_usec_since_initialized($_[0]->{_device}); | ||||||||
|
Subroutine
get_usec_since_initialized: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | sub get_sysattr_value { | ||||||||||
| 89 | # self, sysattr | ||||||||||
| 90 | 0 | ▶ | return udev_device_get_sysattr_value($_[0]->{_device}, $_[1]); | ||||||||
|
Subroutine
get_sysattr_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | sub set_sysattr_value { | ||||||||||
| 94 | # self, sysattr, value | ||||||||||
| 95 | 0 | ▶ | return udev_device_set_sysattr_value($_[0]->{_device}, $_[1], $_[2]); | ||||||||
|
Subroutine
set_sysattr_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 96 | } | ||||||||||
| 97 | |||||||||||
| 98 | sub has_tag { | ||||||||||
| 99 | # self, tag | ||||||||||
| 100 | 0 | ▶ | return udev_device_has_tag($_[0]->{_device}, $_[1]); | ||||||||
|
Subroutine
has_tag: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 101 | } | ||||||||||
| 102 | |||||||||||
| 103 | |||||||||||
| 104 | sub get_parent { | ||||||||||
| 105 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
get_parent: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 106 | |||||||||||
| 107 | 0 | my $device = udev_device_get_parent( $self->{_device} ); | |||||||||
| 108 | 0 | ▶ | if (defined($device)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 109 | 0 | udev_device_ref($device); | |||||||||
| 110 | |||||||||||
| 111 | 0 | return Udev::FFI::Device->new($device, $self->{_udev}); | |||||||||
| 112 | } | ||||||||||
| 113 | |||||||||||
| 114 | 0 | return undef; | |||||||||
| 115 | } | ||||||||||
| 116 | |||||||||||
| 117 | |||||||||||
| 118 | sub get_parent_with_subsystem_devtype { | ||||||||||
| 119 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
get_parent_with_subsystem_devtype: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 120 | 0 | my $subsystem = shift; | |||||||||
| 121 | 0 | my $devtype = shift; | |||||||||
| 122 | |||||||||||
| 123 | 0 | my $device = udev_device_get_parent_with_subsystem_devtype( $self->{_device}, $subsystem, $devtype ); | |||||||||
| 124 | 0 | ▶ | if (defined($device)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 125 | 0 | udev_device_ref($device); | |||||||||
| 126 | |||||||||||
| 127 | 0 | return Udev::FFI::Device->new($device, $self->{_udev}); | |||||||||
| 128 | } | ||||||||||
| 129 | |||||||||||
| 130 | 0 | return undef; | |||||||||
| 131 | } | ||||||||||
| 132 | |||||||||||
| 133 | |||||||||||
| 134 | sub get_devlinks_list_entries { | ||||||||||
| 135 | 0 | ▶ | return Udev::FFI::Helper::get_entries_all( udev_device_get_devlinks_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_devlinks_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 136 | } | ||||||||||
| 137 | |||||||||||
| 138 | sub get_properties_list_entries { | ||||||||||
| 139 | 0 | ▶ | return Udev::FFI::Helper::get_entries_all( udev_device_get_properties_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_properties_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 140 | } | ||||||||||
| 141 | |||||||||||
| 142 | sub get_tags_list_entries { | ||||||||||
| 143 | 0 | ▶ | return Udev::FFI::Helper::get_entries_all( udev_device_get_tags_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_tags_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 144 | } | ||||||||||
| 145 | |||||||||||
| 146 | sub get_sysattr_list_entries { | ||||||||||
| 147 | 0 | ▶ | return Udev::FFI::Helper::get_entries_all( udev_device_get_sysattr_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_sysattr_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 148 | } | ||||||||||
| 149 | |||||||||||
| 150 | |||||||||||
| 151 | |||||||||||
| 152 | sub DESTROY { | ||||||||||
| 153 | 0 | ▶ | udev_device_unref( $_[0]->{_device} ); | ||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=6.9
| |||||||||||
| 154 | } | ||||||||||
| 155 | |||||||||||
| 156 | |||||||||||
| 157 | |||||||||||
| 158 | 3 | 1; | |||||||||
| 159 | |||||||||||
| 160 | |||||||||||
| 161 | |||||||||||
| 162 | __END__ | ||||||||||